Update myEnterprisesUnit.vue

This commit is contained in:
TimSpan 2024-10-31 10:02:29 +08:00
parent ee650bba12
commit 5d8d860786
1 changed files with 17 additions and 10 deletions

View File

@ -1,11 +1,12 @@
<template>
<view class="myProject">
<view class="myProjectItem" v-for="(item,index) in myProjectList" :key="index">
<view v-if="number !== 0" 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">地址
<view class="myProjectIndex"
>地址
<text>{{ item?.provinceName }}{{ item.cityName }}{{ item.districtsName }}{{ item.streetName }}</text>
</view>
<view style="display: flex; justify-content: space-between">
@ -13,26 +14,32 @@
<text>电话{{ item?.contactPersonInfo.telephone }}</text>
</view>
<view class="project">
<view @click="projectClick(item?.name,serviceProject)" v-for="(serviceProject,index) in item.serviceProjectList"
:key="index">
<view @click="projectClick(item?.name, serviceProject)" v-for="(serviceProject, index) in item.serviceProjectList" :key="index">
{{ serviceProject.name }}
</view>
</view>
</view>
<view v-else class="myProject">
<nut-empty image="empty" description="暂无项目">
<div style="margin-top: 10px"></div>
</nut-empty>
</view>
</view>
</template>
<script setup lang="ts">
import api from "@/request/index";
import {onMounted, ref} from "vue";
import Taro from "@tarojs/taro";
import api from '@/request/index'
import { onMounted, ref } from 'vue'
import Taro from '@tarojs/taro'
import './myEnterprisesUnit.scss'
import {MyProjectList, ServiceProjectList} from "@/types/subPages/projectManager/myProject";
import { MyProjectList, ServiceProjectList } from '@/types/subPages/projectManager/myProject'
const myProjectList = ref<MyProjectList[]>()
const number = ref(0)
const getMyServiceProject = async () => {
const resp = await api.get<MyProjectList[]>(`/policeIndex/getUnitServiceProjectList`)
myProjectList.value = resp.data
number.value = resp.data?.length || 0
}
const projectClick = (enterprisesUnitName: string, serviceProject: ServiceProjectList) => {