This commit is contained in:
parent
8ab0580add
commit
3322082043
|
@ -2,3 +2,34 @@ page {
|
||||||
background-color: #f0f0f0;
|
background-color: #f0f0f0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.myProject {
|
||||||
|
.myProjectItem {
|
||||||
|
margin: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
background: #ffffff;
|
||||||
|
padding: 15px;
|
||||||
|
font-size: 28px;
|
||||||
|
line-height: 50px;
|
||||||
|
color: #333333;
|
||||||
|
|
||||||
|
.myProjectIndex {
|
||||||
|
color: #9b9b9f;
|
||||||
|
}
|
||||||
|
|
||||||
|
.project {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-flow: wrap;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
view {
|
||||||
|
width: 45%;
|
||||||
|
height: 100rpx;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
line-height: 100rpx;
|
||||||
|
margin: 8px 0 8px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,52 +1,47 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="myProject">
|
<view class="myProject">
|
||||||
<view>
|
<view class="myProjectItem" v-for="(item,index) in myProjectList" :key="index">
|
||||||
|
<view style="display: flex;justify-content: space-between">
|
||||||
|
<text>{{ item?.name }}</text>
|
||||||
|
<!--<text>进行中</text>-->
|
||||||
|
</view>
|
||||||
|
<view class="myProjectIndex">地址:
|
||||||
|
<text>{{ item?.provinceName }}{{ item.cityName }}{{ item.districtsName }}{{ item.streetName }}</text>
|
||||||
|
</view>
|
||||||
|
<view style="display: flex;justify-content: space-between">
|
||||||
|
<text>项目负责人:{{ item?.contactPersonInfo.name }}</text>
|
||||||
|
<text>电话:{{ item?.contactPersonInfo.telephone }}</text>
|
||||||
|
</view>
|
||||||
|
<view class="project">
|
||||||
|
<view v-for="(items,index) in item.serviceProjectList" :key="index">{{ items.name }}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import api from "@/request/index";
|
import api from "@/request/index";
|
||||||
import {onMounted} from "vue";
|
import {onMounted, ref} from "vue";
|
||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
|
import './index.scss'
|
||||||
|
|
||||||
|
const myProjectList = ref<myProjectList[]>()
|
||||||
const getMyServiceProject = async () => {
|
const getMyServiceProject = async () => {
|
||||||
const token = Taro.getStorageSync('token')
|
const token = Taro.getStorageSync('token')
|
||||||
const resp = await api.get(`/projectManageIndex/getMyServiceProject`, {
|
const resp = await api.get<myProjectList[]>(`/policeIndex/getUnitServiceProjectList`, {
|
||||||
token: token.value
|
token: token.value
|
||||||
})
|
})
|
||||||
|
|
||||||
|
myProjectList.value = resp.data
|
||||||
console.log(resp.data)
|
console.log(resp.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getMyServiceProject()
|
await getMyServiceProject()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<!--<template>-->
|
|
||||||
<!-- <view>-->
|
|
||||||
<!-- <view class="content">-->
|
|
||||||
|
|
||||||
<!-- </view>-->
|
|
||||||
|
|
||||||
<!-- </view>-->
|
|
||||||
<!--</template>-->
|
|
||||||
<!--<script setup lang="ts">-->
|
|
||||||
|
|
||||||
<!--import Taro, {useLoad} from "@tarojs/taro";-->
|
|
||||||
|
|
||||||
<!--useLoad(() => {-->
|
|
||||||
<!-- console.log('onLoad')-->
|
|
||||||
<!--})-->
|
|
||||||
|
|
||||||
<!--import './index.scss'-->
|
|
||||||
<!--</script>-->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,26 +7,14 @@
|
||||||
<div v-else class="logo flex-center">
|
<div v-else class="logo flex-center">
|
||||||
<img src="@/assets/vue.svg" title="超级后台" alt="xx"/>
|
<img src="@/assets/vue.svg" title="超级后台" alt="xx"/>
|
||||||
</div>
|
</div>
|
||||||
<!-- -->
|
|
||||||
<!-- <a-menu v-model:selectedKeys="selectedKeys" theme="light" mode="inline">
|
|
||||||
<a-menu-item key="1">
|
|
||||||
<router-link to="/index">
|
|
||||||
<pie-chart-outlined />
|
|
||||||
<span>首页</span>
|
|
||||||
</router-link>
|
|
||||||
</a-menu-item>
|
|
||||||
<a-menu-item key="2">
|
|
||||||
<router-link to="/register/index">
|
|
||||||
<pie-chart-outlined />
|
|
||||||
<span>注册</span>
|
|
||||||
</router-link>
|
|
||||||
</a-menu-item>
|
|
||||||
</a-menu> -->
|
|
||||||
<!-- 动态生成菜单项 -->
|
<!-- 动态生成菜单项 -->
|
||||||
<a-menu v-model:selectedKeys="selectedKeys" v-model:openKeys="openKeys" theme="light" mode="inline">
|
<a-menu v-model:selectedKeys="selectedKeys" v-model:openKeys="openKeys" theme="light" mode="inline">
|
||||||
<template v-for="route in staticRouter">
|
<template v-for="route in staticRouter">
|
||||||
<a-menu-item v-if="route.meta?.title === undefined && route.children" :key="route.path" @click="handleMenuClick(route.children[0].path)">
|
<a-menu-item v-if="route.meta?.title === undefined && route.children" :key="route.path"
|
||||||
<router-link :to="`${route.children[0].path}`">
|
@click="handleMenuClick(route.children[0].path)">
|
||||||
|
<router-link :to="`${route.children[0].path}`" class="flex_">
|
||||||
|
<!-- <icon-font :font-class="route.icon"/>-->
|
||||||
<HomeOutlined v-if="route.name === 'dashboard'"/>
|
<HomeOutlined v-if="route.name === 'dashboard'"/>
|
||||||
<InsuranceOutlined v-if="route.name === 'police'"/>
|
<InsuranceOutlined v-if="route.name === 'police'"/>
|
||||||
<SoundOutlined v-if="route.name === 'law'"/>
|
<SoundOutlined v-if="route.name === 'law'"/>
|
||||||
|
@ -40,7 +28,8 @@
|
||||||
<UserOutlined v-if="route.name === 'user'"/>
|
<UserOutlined v-if="route.name === 'user'"/>
|
||||||
<span>{{ route.meta?.title }}</span>
|
<span>{{ route.meta?.title }}</span>
|
||||||
</template>
|
</template>
|
||||||
<a-menu-item v-for="child in route.children" :key="child.path" @click="handleMenuClick(`${route.path}/${child.path}`)">
|
<a-menu-item v-for="child in route.children" :key="child.path"
|
||||||
|
@click="handleMenuClick(`${route.path}/${child.path}`)">
|
||||||
<router-link :to="`${route.path}/${child.path}`">{{ child.meta?.title }}</router-link>
|
<router-link :to="`${route.path}/${child.path}`">{{ child.meta?.title }}</router-link>
|
||||||
</a-menu-item>
|
</a-menu-item>
|
||||||
</a-sub-menu>
|
</a-sub-menu>
|
||||||
|
@ -69,11 +58,21 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { InsuranceOutlined, HomeOutlined, SoundOutlined, MailOutlined, ApartmentOutlined, UserOutlined, AppstoreOutlined } from '@ant-design/icons-vue'
|
import IconFont from "@/components/iconfont/IconFont.vue";
|
||||||
|
import {
|
||||||
|
InsuranceOutlined,
|
||||||
|
HomeOutlined,
|
||||||
|
SoundOutlined,
|
||||||
|
MailOutlined,
|
||||||
|
ApartmentOutlined,
|
||||||
|
UserOutlined,
|
||||||
|
AppstoreOutlined
|
||||||
|
} from '@ant-design/icons-vue'
|
||||||
import LayoutHeader from '@/components/layout/header/LayoutHeader.vue'
|
import LayoutHeader from '@/components/layout/header/LayoutHeader.vue'
|
||||||
import {computed, watch, onMounted} from 'vue'
|
import {computed, watch, onMounted} from 'vue'
|
||||||
import {staticRouter} from '@/router/staticRouters'
|
import {staticRouter} from '@/router/staticRouters'
|
||||||
import {useRoute} from 'vue-router'
|
import {useRoute} from 'vue-router'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const selectedKeys = ref([route.path])
|
const selectedKeys = ref([route.path])
|
||||||
/**
|
/**
|
||||||
|
@ -141,6 +140,13 @@ const keepAliveNames = ref<string[]>(['index', 'rindex'])
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.flex_ {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.main-content {
|
.main-content {
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
|
|
@ -9,6 +9,7 @@ export const staticRouter: RouteRecordRaw[] =
|
||||||
path: '/',
|
path: '/',
|
||||||
name: 'dashboard',
|
name: 'dashboard',
|
||||||
redirect: '/index',
|
redirect: '/index',
|
||||||
|
icon: 'icon-policeman-full',
|
||||||
meta: {
|
meta: {
|
||||||
keepalive: true
|
keepalive: true
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue