From 7472cb566aaff92869915f7d67eb18c347948266 Mon Sep 17 00:00:00 2001 From: wangyilin <1454641981@qq.com> Date: Fri, 13 Sep 2024 14:37:22 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- collect_information/src/app.config.ts | 4 +- .../src/subPages/pages/form/form.vue | 7 ++- .../subPages/pages/policeManager/index.vue | 4 +- .../pages/projectDetails/projectDetails.scss | 17 ++++--- .../pages/projectDetails/projectDetails.vue | 51 ++++++++++--------- .../types/pages/form/index.d.ts | 1 - .../types/pages/login/index.d.ts | 2 +- .../types/pages/myProject/index.d.ts | 1 + .../types/pages/projectDetails/index.d.ts | 7 +-- 9 files changed, 50 insertions(+), 44 deletions(-) diff --git a/collect_information/src/app.config.ts b/collect_information/src/app.config.ts index 2e2f8bd..84fbadb 100644 --- a/collect_information/src/app.config.ts +++ b/collect_information/src/app.config.ts @@ -9,9 +9,9 @@ export default defineAppConfig({ ], window: { backgroundTextStyle: 'light', - navigationBarBackgroundColor: '#f7f8fa', + navigationBarBackgroundColor: '#4e87ff', navigationBarTitleText: '', - navigationBarTextStyle: 'black', + navigationBarTextStyle:'white', backgroundColor: "#008080" }, subpackages: [ diff --git a/collect_information/src/subPages/pages/form/form.vue b/collect_information/src/subPages/pages/form/form.vue index 26b1795..d6851ce 100644 --- a/collect_information/src/subPages/pages/form/form.vue +++ b/collect_information/src/subPages/pages/form/form.vue @@ -59,7 +59,6 @@ import Taro, {useLoad} from "@tarojs/taro"; const showPicker = ref(false) const formData = ref({ snowFlakeId:'', - serviceProjectId:'', name: '', workPost:'', sex:0, @@ -70,6 +69,7 @@ const formData = ref({ remark:'', homeAddress: '' }) +const serviceProjectId = ref('') const pickerValue = ref(new Date()) const formRef = ref(null) @@ -94,7 +94,7 @@ const rules: FormRules = { }; useLoad((options)=>{ - formData.value.serviceProjectId = JSON.parse(options.item).snowFlakeId + serviceProjectId.value = JSON.parse(options.item).snowFlakeId }) const openDate = ()=>{ showPicker.value = true @@ -121,7 +121,7 @@ const submit = () => { formRef.value?.validate().then(({valid, errors}) => { if (valid) { const saveOrUpdateSecurityUserParams = { - serviceProjectId:formData.value.serviceProjectId, + serviceProjectId:serviceProjectId.value, name: formData.value.name, workPost:formData.value.workPost, sex:formData.value.sex, @@ -141,7 +141,6 @@ const submit = () => { }).then() formData.value = { snowFlakeId:'', - serviceProjectId:formData.value.serviceProjectId, name: '', workPost:'', sex:0, diff --git a/collect_information/src/subPages/pages/policeManager/index.vue b/collect_information/src/subPages/pages/policeManager/index.vue index f299bd0..5bba601 100644 --- a/collect_information/src/subPages/pages/policeManager/index.vue +++ b/collect_information/src/subPages/pages/policeManager/index.vue @@ -25,10 +25,10 @@ import {onMounted, ref} from "vue"; import Taro from "@tarojs/taro"; import './index.scss' -const myProjectList = ref() +const myProjectList = ref() const getMyServiceProject = async () => { const token = Taro.getStorageSync('token') - const resp = await api.get(`/policeIndex/getUnitServiceProjectList`, { + const resp = await api.get(`/policeIndex/getUnitServiceProjectList`, { token: token.value }) diff --git a/collect_information/src/subPages/pages/projectDetails/projectDetails.scss b/collect_information/src/subPages/pages/projectDetails/projectDetails.scss index 277cd71..390f6dd 100644 --- a/collect_information/src/subPages/pages/projectDetails/projectDetails.scss +++ b/collect_information/src/subPages/pages/projectDetails/projectDetails.scss @@ -5,6 +5,7 @@ display: flex; flex-direction: column; .projectDetailsItem{ + height: 18%; margin: 20px; border-radius: 10px; background: #ffffff; @@ -19,17 +20,17 @@ } } .projectDetailsTableDrop{ - height: 500px; + height: 80%; .projectDetailsTable{ margin: 20px; border-radius: 10px; background: #ffffff; padding: 15px; font-size: 28px; - line-height: 65px; + line-height: 50px; color: #333333; .projectDetailsTableItem{ - display: flex; + //display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; @@ -38,12 +39,14 @@ } } } - .projectDetailsButton{ + position: fixed; + bottom: 19px; display: flex; - margin-top: auto; - justify-content: space-around; - margin-bottom: 30px + -webkit-justify-content: space-around; + margin-bottom: 10rpx; + right: 0; + width: 100%; } } diff --git a/collect_information/src/subPages/pages/projectDetails/projectDetails.vue b/collect_information/src/subPages/pages/projectDetails/projectDetails.vue index 58cc5d1..e7d77a1 100644 --- a/collect_information/src/subPages/pages/projectDetails/projectDetails.vue +++ b/collect_information/src/subPages/pages/projectDetails/projectDetails.vue @@ -34,31 +34,38 @@ - 项目人员 - 项目人员 + - - + + - 姓名:{{ item?.name }} - 性别:{{ item.sex.label }} - 职位:{{ item.workPost }} - 保安证件:{{ item.securityNumber }} - 地址:{{ item.homeAddress }} - 出生年月:{{ item.dateOfBirth }} - 创建时间:{{ item.createTime }} - 身份证:{{ item.idCard }} + + + 姓名:{{ item?.name?item?.name:'创建者' }} + 性别:{{ item.sex?.label?item.sex?.label:' 隐藏' }} + 职位:{{ item.workPost?item.workPost:'创建者' }} + + + 保安证件:{{ item.securityNumber?item.securityNumber:'125241256451' }} + 出生年月:{{ dayjs(item.dateOfBirth).format('YYYY-MM-DD')}} + + + 创建时间:{{ item.createTime }} + 身份证:{{ item.idCard }} + + + + 删除 + - - - 项目人员录入 二维码录入 @@ -70,10 +77,10 @@ import Taro, {useLoad} from "@tarojs/taro"; import './projectDetails.scss' import {ref} from "vue"; import api from "@/request/index"; - +import * as dayjs from 'dayjs' const detailsList = ref() const nameValue = ref('') -const projectData = ref([]) +const projectData = ref[]>([]) useLoad(async (options: MyProjectList) => { nameValue.value = options.name detailsList.value = await JSON.parse(options.item) @@ -89,7 +96,7 @@ const projectDetailsTable = async () => { serviceProjectId: detailsList.value?.snowFlakeId, }, page: { - size: 2, + size: 4, current: current.value } } @@ -102,7 +109,7 @@ const projectDetailsTable = async () => { const formAdd = () => { Taro.navigateTo({url: `/subPages/pages/form/form?item=${JSON.stringify(detailsList.value)}`}) } -const total = ref(null) +const total = ref(null) const current = ref(1) const isRefresher = ref(false) const scrollTop = ref(0) @@ -130,10 +137,6 @@ const onRefresherRefresh = (e) => { console.log('自定义下拉刷新被触发:', e) projectDetailsTable() } -const scroll = (e) => { - // console.log('scroll:', e) -} - diff --git a/collect_information/src/subPages/pages/policeManager/index.vue b/collect_information/src/subPages/pages/policeManager/index.vue index 4abe0cf..f48865c 100644 --- a/collect_information/src/subPages/pages/policeManager/index.vue +++ b/collect_information/src/subPages/pages/policeManager/index.vue @@ -42,7 +42,7 @@ const projectClick = (items: ServiceProjectList, name: string) => { console.log(name, JSON.stringify(items)) Taro.navigateTo({ - url: `/subPages/pages/projectDetails/projectDetails?name=${name}&item=${JSON.stringify(items)}`, + url: `/subPages/pages/policeDetails/index?name=${name}&item=${JSON.stringify(items)}`, }) } onMounted(async () => { From a2da7db75748d320d3ea8eeb0bc8af7df9a8b698 Mon Sep 17 00:00:00 2001 From: TimSpan Date: Fri, 13 Sep 2024 15:13:16 +0800 Subject: [PATCH 4/4] ... --- collect_information/src/app.config.ts | 1 - .../src/subPages/pages/policeDetails/index.vue | 6 ------ 2 files changed, 7 deletions(-) diff --git a/collect_information/src/app.config.ts b/collect_information/src/app.config.ts index 52ab2a9..32cd338 100644 --- a/collect_information/src/app.config.ts +++ b/collect_information/src/app.config.ts @@ -12,7 +12,6 @@ export default defineAppConfig({ navigationBarBackgroundColor: '#4e87ff', navigationBarTitleText: '', navigationBarTextStyle:'white', - backgroundColor: "#008080" }, subpackages: [ { diff --git a/collect_information/src/subPages/pages/policeDetails/index.vue b/collect_information/src/subPages/pages/policeDetails/index.vue index c01f8af..fd91676 100644 --- a/collect_information/src/subPages/pages/policeDetails/index.vue +++ b/collect_information/src/subPages/pages/policeDetails/index.vue @@ -59,7 +59,6 @@ - @@ -120,8 +119,6 @@ const lower = (e) => { current.value = current.value + 1 projectDetailsTable() } - - } // 自定义下拉刷新被触发 const onRefresherRefresh = (e) => { @@ -133,7 +130,4 @@ const onRefresherRefresh = (e) => { projectDetailsTable() } -