接口内容变动

This commit is contained in:
TimSpan 2024-11-19 11:36:39 +08:00
parent fffa527ea2
commit 85db3000d9
3 changed files with 44 additions and 35 deletions

View File

@ -3,7 +3,7 @@
<view v-if="number !== 0" 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"> <view style="display: flex; justify-content: space-between">
<text>{{ item?.name }}</text> <text>{{ item?.name }}</text>
<text>单位类型{{ item?.type.label }}</text> <text>单位类型{{ item?.type?.label }}</text>
</view> </view>
<view class="myProjectIndex" <view class="myProjectIndex"
>地址 >地址
@ -15,18 +15,17 @@
</view> </view>
<view class="project"> <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">
<view style="border: 1px solid #cccccc;color: #9b9b9f"> <view style="border: 1px solid #cccccc; color: #9b9b9f">
<view style="display: flex; justify-content: space-between"> <view style="display: flex; justify-content: space-between">
<text>项目名称{{serviceProject.name}}</text> <text>项目名称{{ serviceProject.name }}</text>
<text>项目类型{{serviceProject.type.label}}</text> <text>项目类型{{ serviceProject.type?.label }}</text>
</view>
<view style="display: flex; justify-content: space-between">
<text>项目负责人{{serviceProject.projectManagerMiniProgramUserInfo?.name?serviceProject.projectManagerMiniProgramUserInfo?.name:'无分配项目经理'}}</text>
</view>
<view>责任单位{{serviceProject.securityUnitName}}</view>
</view> </view>
<view style="display: flex; justify-content: space-between">
<text>项目负责人{{ serviceProject.projectManagerMiniProgramUserInfo?.name ? serviceProject.projectManagerMiniProgramUserInfo?.name : '无分配项目经理' }}</text>
</view>
<view>责任单位{{ serviceProject.securityUnitName }}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
<view v-else class="myProject"> <view v-else class="myProject">

View File

@ -2,14 +2,12 @@
<view class="projectDetails"> <view class="projectDetails">
<view class="projectDetailsItem" style="line-height: 50rpx"> <view class="projectDetailsItem" style="line-height: 50rpx">
<view> <view>
<view style="display: flex;justify-content: space-between"> <view style="display: flex; justify-content: space-between">
<text style="font-size: 18px">{{ enterprisesUnitName }}-----{{ serviceProject?.name }}项目</text> <text style="font-size: 18px">{{ enterprisesUnitName }}-----{{ serviceProject?.name }}项目</text>
<!-- <text>进行中</text>--> <!-- <text>进行中</text>-->
</view> </view>
<view> <view>
<view style="float: left;width: 50%;" class="content"> <view style="float: left; width: 50%" class="content"> 经理名称:{{ serviceProject?.projectManagerMiniProgramUserInfo.name }} </view>
经理名称:{{ serviceProject?.projectManagerMiniProgramUserInfo.name }}
</view>
<view class="content">手机号:{{ serviceProject?.projectManagerMiniProgramUserInfo.telephone }}</view> <view class="content">手机号:{{ serviceProject?.projectManagerMiniProgramUserInfo.telephone }}</view>
</view> </view>
</view> </view>
@ -47,26 +45,33 @@
<!--表格--> <!--表格-->
<view class="projectDetailsTableDrop"> <view class="projectDetailsTableDrop">
<view style="padding: 0 12px">项目人员</view> <view style="padding: 0 12px">项目人员</view>
<scroll-view :scroll-y="true" style="height: 80%;" @scrolltoupper="upper" @scrolltolower="lower" <scroll-view
:scroll-into-view="toView" :scroll-top="scrollTop" :refresherEnabled="true" :scroll-y="true"
@refresherrefresh="onRefresherRefresh" :refresher-triggered="isRefresher" style="height: 80%"
@scrolltoupper="upper"
@scrolltolower="lower"
:scroll-into-view="toView"
:scroll-top="scrollTop"
:refresherEnabled="true"
@refresherrefresh="onRefresherRefresh"
:refresher-triggered="isRefresher"
> >
<view class="projectDetailsTable" v-for="(item,index) in securityUserList" :key="index"> <view class="projectDetailsTable" v-for="(item, index) in securityUserList" :key="index">
<view> <view>
<view class="projectDetailsTableItem"> <view class="projectDetailsTableItem">
<view> <view>
<view style="display: flex;justify-content: space-between"> <view style="display: flex; justify-content: space-between">
<text>姓名:{{ item?.name ? item?.name : '创建者' }}</text> <text>姓名:{{ item?.name ? item?.name : '创建者' }}</text>
<text>性别:{{ item.sex?.label ? item.sex?.label : ' 隐藏' }}</text> <text>性别:{{ item.sex?.label ? item.sex?.label : ' 隐藏' }}</text>
<text>职位:{{ item.workPost ? item.workPost : '创建者' }}</text> <text>职位:{{ item.workPost ? item.workPost : '创建者' }}</text>
</view> </view>
<view style="display: flex;justify-content: space-between"> <view style="display: flex; justify-content: space-between">
<text>保安证件:{{ item.securityNumber ? item.securityNumber : '无' }}</text> <text>保安证件:{{ item.securityNumber ? item.securityNumber : '无' }}</text>
<text>出生年月:{{ dayjs(item.dateOfBirth).format('YYYY-MM-DD') }}</text> <text>出生年月:{{ dayjs(item.dateOfBirth).format('YYYY-MM-DD') }}</text>
</view> </view>
<view style="display: flex;justify-content: space-between"> <view style="display: flex; justify-content: space-between">
<text>创建时间:{{ item.createTime }}</text> <text>创建时间:{{ item.createTime }}</text>
<text>身份证:{{ item.idCard }}</text> <text>身份证:{{ item.idCard?.desensitizedValue }}</text>
</view> </view>
</view> </view>
</view> </view>
@ -74,16 +79,15 @@
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import Taro, {useLoad} from "@tarojs/taro"; import Taro, { useLoad } from '@tarojs/taro'
import './projectDetails.scss' import './projectDetails.scss'
import {ref} from "vue"; import { ref } from 'vue'
import api from "@/request/index"; import api from '@/request/index'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import {ServiceProjectSecurityUserPagerVo} from "@/types/subPages/projectManager/myProject"; import { ServiceProjectSecurityUserPagerVo } from '@/types/subPages/projectManager/myProject'
const serviceProject = ref() const serviceProject = ref()
const enterprisesUnitName = ref('') const enterprisesUnitName = ref('')
@ -91,7 +95,7 @@ const securityUserList = ref<ServiceProjectSecurityUserPagerVo[]>([])
useLoad(async (options) => { useLoad(async (options) => {
enterprisesUnitName.value = options.enterprisesUnitName enterprisesUnitName.value = options.enterprisesUnitName
serviceProject.value = JSON.parse(options.serviceProject) serviceProject.value = JSON.parse(options.serviceProject)
console.log(serviceProject.value); console.log(serviceProject.value)
await projectDetailsTable() await projectDetailsTable()
}) })
const projectDetailsTable = async () => { const projectDetailsTable = async () => {
@ -104,8 +108,8 @@ const projectDetailsTable = async () => {
}, },
page: { page: {
size: 4, size: 4,
current: current.value current: current.value,
} },
} }
const resp = await api.post<PagerVo<ServiceProjectSecurityUserPagerVo>>('/miniProgramUser/securityUserPager', queryParams) const resp = await api.post<PagerVo<ServiceProjectSecurityUserPagerVo>>('/miniProgramUser/securityUserPager', queryParams)
securityUserList.value = [...securityUserList.value, ...resp.data!.records] securityUserList.value = [...securityUserList.value, ...resp.data!.records]
@ -134,7 +138,7 @@ const lower = () => {
const onRefresherRefresh = (e) => { const onRefresherRefresh = (e) => {
securityUserList.value = [] securityUserList.value = []
total.value = null total.value = null
current.value = 1 // current.value = 1 //
isRefresher.value = true isRefresher.value = true
console.log('自定义下拉刷新被触发:', e) console.log('自定义下拉刷新被触发:', e)
projectDetailsTable() projectDetailsTable()

View File

@ -15,7 +15,7 @@ export interface MyProjectList {
securityUnitId: string; securityUnitId: string;
street?: string; street?: string;
streetName?: string; streetName?: string;
type?:any type?: any
} }
export interface ContactPersonInfo { export interface ContactPersonInfo {
@ -31,7 +31,7 @@ export interface ServiceProjectList {
name?: string; name?: string;
remark?: string; remark?: string;
securityUserTotal?: number; securityUserTotal?: number;
securityUnitName?:string; securityUnitName?: string;
serviceArea?: number; serviceArea?: number;
snowFlakeId?: string; snowFlakeId?: string;
staffTotal?: number; staffTotal?: number;
@ -45,11 +45,16 @@ export interface ProgramUserInfo {
telephone?: string telephone?: string
} }
export interface ServiceProjectSecurityUserPagerVo { export interface ServiceProjectSecurityUserPagerVo {
createTime?: string; createTime?: string;
dateOfBirth?: string; dateOfBirth?: string;
homeAddress?: string; homeAddress?: string;
idCard?: string; idCard?: {
originalValue: string;
desensitizedValue: string;
};
name?: string; name?: string;
nativePlace?: string; nativePlace?: string;
remark?: string; remark?: string;
@ -60,4 +65,5 @@ export interface ServiceProjectSecurityUserPagerVo {
snowFlakeId: string; snowFlakeId: string;
workPost?: string; workPost?: string;
sex: BaseEnum<number> sex: BaseEnum<number>
} }