From c7d91dc682ee8ebca508c38953c7e106f3bd0d4e Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Mon, 18 Mar 2024 23:28:44 +0800 Subject: [PATCH] add --- src/components/detailPage/index.vue | 46 ++++++++++++++----- src/views/manage_company/detail.js | 2 +- src/views/manage_company/index.vue | 2 +- src/views/manage_project/detail.js | 10 ++-- src/views/manage_project/index.vue | 2 +- src/views/supervision_accept/index.vue | 3 -- .../supervision_commencement_report/index.vue | 4 -- .../supervision_design_disclosure/index.vue | 3 -- src/views/supervision_inspection/index.vue | 3 -- .../index.vue | 4 -- src/views/supervision_planning/detail.js | 17 ------- src/views/supervision_planning/index.vue | 4 +- src/views/supervision_rules/index.vue | 5 -- .../supervision_rules_disclosure/index.vue | 5 -- src/views/supervision_side_station/index.vue | 3 -- .../detail.js | 2 +- .../index.vue | 4 +- .../supervision_witness_sampling/index.vue | 3 -- 18 files changed, 47 insertions(+), 75 deletions(-) diff --git a/src/components/detailPage/index.vue b/src/components/detailPage/index.vue index 65d5b87..0f563ec 100644 --- a/src/components/detailPage/index.vue +++ b/src/components/detailPage/index.vue @@ -24,15 +24,28 @@ - - - - - - +
+ + + + + + + + + +
+ + @@ -42,7 +55,7 @@ import Popup from '@/components/popup/index.vue' import { defineProps, ref, defineExpose } from "vue" - +import { cloneDeep } from 'lodash-es' const props = defineProps({ detailConfig: { type: Object, @@ -71,9 +84,17 @@ const formData = ref({}) // 获取详情 const setFormData = async (data: Record) => { formData.value = data - if (props.detailConfig?.table) { - let res = await props.detailConfig.table.fetchFun({ [props.detailConfig.table.query]: formData.value.id }) + let query = cloneDeep(props.detailConfig.table.query) + if (typeof (props.detailConfig.table.query) === 'object') { + for (let key in query) { + query[key] ||= data.id + } + } else { + query = { [query]: data.id } + } + + let res = await props.detailConfig.table.fetchFun({ ...query }) tableLists.value = res.lists } @@ -89,6 +110,7 @@ const open = () => { // 关闭回调 const handleClose = () => { emit('close') + console.log("gianni1") } diff --git a/src/views/manage_company/detail.js b/src/views/manage_company/detail.js index de9dd2a..f2a3546 100644 --- a/src/views/manage_company/detail.js +++ b/src/views/manage_company/detail.js @@ -14,7 +14,7 @@ const detailConfig = { }, { label: "单位类别", - value: "type" + value: "type_text" }, { label: "资质等级", diff --git a/src/views/manage_company/index.vue b/src/views/manage_company/index.vue index dfe4d87..545ffee 100644 --- a/src/views/manage_company/index.vue +++ b/src/views/manage_company/index.vue @@ -54,7 +54,7 @@ @click="handleDelete(row.id)"> 删除 - 详情 diff --git a/src/views/manage_project/detail.js b/src/views/manage_project/detail.js index 2aa9dee..04332cd 100644 --- a/src/views/manage_project/detail.js +++ b/src/views/manage_project/detail.js @@ -7,11 +7,11 @@ const detailConfig = { }, { label: "性质", - value: "nature" + value: "nature_text" }, { label: "行业", - value: "industry" + value: "industry_text" }, { label: "建设单位", @@ -19,7 +19,7 @@ const detailConfig = { }, { label: "建设区域", - value: "build_area" + value: "build_area_text" }, { label: "项目地址", @@ -27,7 +27,7 @@ const detailConfig = { }, { label: "项目级别", - value: "project_level" + value: "project_level_text" }, { label: "总投资(万元)", @@ -35,7 +35,7 @@ const detailConfig = { }, { label: "工程状态", - value: "engineering_status" + value: "engineering_status_text" }, { label: "合同服务内容", diff --git a/src/views/manage_project/index.vue b/src/views/manage_project/index.vue index 9441a11..67920c2 100644 --- a/src/views/manage_project/index.vue +++ b/src/views/manage_project/index.vue @@ -101,7 +101,7 @@ @click="handleDelete(row.id)"> 删除 - 详情 diff --git a/src/views/supervision_accept/index.vue b/src/views/supervision_accept/index.vue index 6c5afda..2d4556f 100644 --- a/src/views/supervision_accept/index.vue +++ b/src/views/supervision_accept/index.vue @@ -112,10 +112,7 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiSupervisionAcceptLists, apiSupervisionAcceptDelete, apiSupervisionAcceptDetail, apisupervision_accept } from '@/api/supervision_accept' -<<<<<<< HEAD -======= import { apiSupervisionProjectSearch } from '@/api/supervision_project' ->>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f import feedback from '@/utils/feedback' import EditPopup from './edit.vue' import DetailPopup from './detail.vue' diff --git a/src/views/supervision_commencement_report/index.vue b/src/views/supervision_commencement_report/index.vue index 12d627d..bdc7734 100644 --- a/src/views/supervision_commencement_report/index.vue +++ b/src/views/supervision_commencement_report/index.vue @@ -64,12 +64,8 @@