99 lines
3.2 KiB
Vue
99 lines
3.2 KiB
Vue
<template>
|
||
<view class="projectDetails">
|
||
<view class="projectDetailsItem">
|
||
<view style="display: flex;justify-content: space-between">
|
||
<text style="font-size: 18px">{{ nameValue ? nameValue : '' }}{{ '-----' + detailsList?.name }}项目</text>
|
||
<!--<text>进行中</text>-->
|
||
</view>
|
||
<view class="projectDetailsIndex">
|
||
<nut-row>
|
||
<nut-col :span="12">
|
||
<view class="content">工作人员数量:{{ detailsList?.staffTotal }}</view>
|
||
</nut-col>
|
||
<nut-col :span="12">
|
||
<view class="content">保安人员数量:{{ detailsList?.securityUserTotal }}</view>
|
||
</nut-col>
|
||
</nut-row>
|
||
<nut-row>
|
||
<nut-col :span="12">
|
||
<view class="content">服务区域面积:{{ detailsList?.serviceArea }}</view>
|
||
</nut-col>
|
||
<nut-col :span="12">
|
||
<view class="content">楼栋数量:{{ detailsList?.buildingTotal }}</view>
|
||
</nut-col>
|
||
</nut-row>
|
||
<nut-row>
|
||
<nut-col :span="16">
|
||
<view class="content">证件号:{{ detailsList?.idNumber }}</view>
|
||
</nut-col>
|
||
<nut-col :span="8">
|
||
<view class="content">户数:{{ detailsList?.houseTotal }}</view>
|
||
</nut-col>
|
||
</nut-row>
|
||
</view>
|
||
</view>
|
||
<!--表格-->
|
||
<view class="projectDetailsTableDrop">
|
||
<view class="projectDetailsTable" >
|
||
<view>项目人员</view>
|
||
<view style="border: 1px solid #ccc" v-for="(item,index) in projectData" :key="index">
|
||
<view class="projectDetailsTableItem">
|
||
<text>姓名:{{ item?.name }}</text>
|
||
<text>性别:{{ item.sex.label }}</text>
|
||
<text>职位:{{ item.workPost }}</text>
|
||
<text>保安证件:{{ item.securityNumber }}</text>
|
||
<text>地址:{{ item.homeAddress }}</text>
|
||
<text>出生年月:{{ item.dateOfBirth }}</text>
|
||
<text>创建时间:{{ item.createTime }}</text>
|
||
<text>身份证:{{ item.idCard }}</text>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|
||
</view>
|
||
|
||
<view class="projectDetailsButton">
|
||
<nut-button style="width: 45%" type="info" @click="formAdd">项目人员录入</nut-button>
|
||
<nut-button style="width: 45%" type="info">二维码录入</nut-button>
|
||
</view>
|
||
</view>
|
||
</template>
|
||
<script setup lang="ts">
|
||
import Taro, {useLoad} from "@tarojs/taro";
|
||
import './projectDetails.scss'
|
||
import {ref} from "vue";
|
||
import api from "@/request/index";
|
||
|
||
const detailsList = ref()
|
||
const nameValue = ref('')
|
||
const projectData = ref<Records[]>([])
|
||
useLoad(async (options: MyProjectList) => {
|
||
nameValue.value = options.name
|
||
detailsList.value = await JSON.parse(options.item)
|
||
await projectDetailsTable()
|
||
})
|
||
const projectDetailsTable = async () => {
|
||
const queryParams = {
|
||
params: {
|
||
serviceProjectId: detailsList.value?.snowFlakeId,
|
||
},
|
||
page: {
|
||
size: 6,
|
||
current: 1
|
||
}
|
||
}
|
||
const resp = await api.post<ProjectData>('/miniProgramUser/securityUserPager', queryParams)
|
||
projectData.value = resp?.data.records
|
||
|
||
}
|
||
const formAdd = () => {
|
||
Taro.navigateTo({url: `/subPages/pages/form/form?item=${JSON.stringify(detailsList.value)}`})
|
||
}
|
||
|
||
|
||
</script>
|
||
<style scoped lang="scss">
|
||
|
||
|
||
</style>
|