From 64c826947678a45621b047c324c20ef00b1d3a99 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Mon, 18 Mar 2024 10:20:21 +0800 Subject: [PATCH] add --- src/components/detailPage/index.vue | 17 +++-- src/views/manage_company/index.vue | 3 +- .../supervision_commencement_report/edit.vue | 4 +- .../supervision_commencement_report/index.vue | 8 ++- .../supervision_contract_disclosure/edit.vue | 5 +- .../supervision_contract_disclosure/index.vue | 11 ++- .../detail.js | 53 ++++++++++++++ .../index.vue | 21 +++++- .../supervision_participating_units/detail.js | 69 +++++++++++++++++++ .../supervision_participating_units/index.vue | 26 +++++-- src/views/supervision_planning/detail.js | 66 ++++++++++++++++++ src/views/supervision_planning/edit.vue | 9 --- src/views/supervision_planning/index.vue | 21 +++++- src/views/supervision_rules/edit.vue | 4 +- src/views/supervision_rules/index.vue | 8 ++- .../supervision_rules_disclosure/edit.vue | 4 +- .../supervision_rules_disclosure/index.vue | 8 ++- 17 files changed, 299 insertions(+), 38 deletions(-) create mode 100644 src/views/supervision_monitoring_equipment/detail.js create mode 100644 src/views/supervision_participating_units/detail.js create mode 100644 src/views/supervision_planning/detail.js diff --git a/src/components/detailPage/index.vue b/src/components/detailPage/index.vue index 67065b9..a1e79cc 100644 --- a/src/components/detailPage/index.vue +++ b/src/components/detailPage/index.vue @@ -1,8 +1,8 @@ diff --git a/src/views/supervision_commencement_report/edit.vue b/src/views/supervision_commencement_report/edit.vue index 8743c7b..f6bde46 100644 --- a/src/views/supervision_commencement_report/edit.vue +++ b/src/views/supervision_commencement_report/edit.vue @@ -2,7 +2,7 @@
- + @@ -48,7 +48,7 @@ const showDialog = ref(false) // 弹窗标题 const popupTitle = computed(() => { - return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议' + return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '工程监理--第一次工地会议' }) // 表单数据 diff --git a/src/views/supervision_commencement_report/index.vue b/src/views/supervision_commencement_report/index.vue index ee0c741..3536818 100644 --- a/src/views/supervision_commencement_report/index.vue +++ b/src/views/supervision_commencement_report/index.vue @@ -53,6 +53,10 @@ type="danger" link @click="handleDelete(row.id)"> 删除 + + 详情 + @@ -109,10 +113,10 @@ const handleAdd = async () => { } // 编辑 -const handleEdit = async (data: any) => { +const handleEdit = async (data: any, mode = 'add') => { showEdit.value = true await nextTick() - editRef.value?.open('edit') + editRef.value?.open(mode) editRef.value?.setFormData(data) } diff --git a/src/views/supervision_contract_disclosure/edit.vue b/src/views/supervision_contract_disclosure/edit.vue index fe44b7d..bf8378a 100644 --- a/src/views/supervision_contract_disclosure/edit.vue +++ b/src/views/supervision_contract_disclosure/edit.vue @@ -2,7 +2,7 @@
- + @@ -60,7 +60,7 @@ const formData = reactive({ doc_name: '', doc_desc: '', annex: [], - create_user: '', + create_user: '', create_time: '', }) const customEvent = (e) => { @@ -123,6 +123,7 @@ const handleSubmit = async () => { //打开弹窗 const open = (type = 'add') => { mode.value = type + console.log(mode.value, "value") popupRef.value?.open() } diff --git a/src/views/supervision_contract_disclosure/index.vue b/src/views/supervision_contract_disclosure/index.vue index c4ad979..e38574c 100644 --- a/src/views/supervision_contract_disclosure/index.vue +++ b/src/views/supervision_contract_disclosure/index.vue @@ -40,6 +40,10 @@ type="danger" link @click="handleDelete(row.id)"> 删除 + + 详情 + @@ -96,11 +100,11 @@ const handleAdd = async () => { } // 编辑 -const handleEdit = async (data: any) => { +const handleEdit = async (data: any, mode = 'edit') => { let res = await apiSupervisionContractDisclosureDetail({ id: data.id }) showEdit.value = true await nextTick() - editRef.value?.open('edit') + editRef.value?.open(mode) editRef.value?.setFormData(res) } @@ -111,5 +115,8 @@ const handleDelete = async (id: number | any[]) => { getLists() } + + + getLists() diff --git a/src/views/supervision_monitoring_equipment/detail.js b/src/views/supervision_monitoring_equipment/detail.js new file mode 100644 index 0000000..0fb3726 --- /dev/null +++ b/src/views/supervision_monitoring_equipment/detail.js @@ -0,0 +1,53 @@ +import { apiSupervisionMonitoringEquipmentDetailLists } from '@/api/supervision_monitoring_equipment_detail' + + + +const detailConfig = { + title: "工程监理--监控设备信息", + config: [ + { + label: "项目名称", + value: "project_name" + }, + { + label: "监控设备名称", + value: "device_name" + }, + { + label: "设备类型", + value: "device_type" + }, + { + label: "设备序列号", + value: "device_sn" + }, + { + label: "编号", + value: "number" + }, + { + label: "备注", + value: "remark", + column: 1 + }, + ], + table: { + title: "设备", + tableConfig: [ + { + label: "设备名称", + value: 'name', + + }, + { + label: "是否显示", + value: 'is_show' + }, + + ], + query: 'device_id', + fetchFun: apiSupervisionMonitoringEquipmentDetailLists, + } + +} +export default detailConfig; \ No newline at end of file diff --git a/src/views/supervision_monitoring_equipment/index.vue b/src/views/supervision_monitoring_equipment/index.vue index c56b61d..cf4c86e 100644 --- a/src/views/supervision_monitoring_equipment/index.vue +++ b/src/views/supervision_monitoring_equipment/index.vue @@ -72,6 +72,10 @@ type="danger" link @click="handleDelete(row.id)"> 删除 + + 详情 + @@ -81,20 +85,25 @@
+
diff --git a/src/views/supervision_participating_units/detail.js b/src/views/supervision_participating_units/detail.js new file mode 100644 index 0000000..69b0679 --- /dev/null +++ b/src/views/supervision_participating_units/detail.js @@ -0,0 +1,69 @@ +import { + apiSupervisionParticipatingUnitsContactsLists, +} from "@/api/supervision_participating_units_contacts"; + + +const detailConfig = { + title: "工程监理--参建单位", + config: [ + { + label: "项目名称", + value: "project_name" + }, + { + label: "单位名称", + value: "unit_name" + }, + { + label: "单位类别", + value: "unit_type" + }, + { + label: "资质等级", + value: "qualification_grade" + }, + { + label: "联系电话", + value: "telephone" + }, + { + label: "责任范围", + value: "duty" + }, + ], + table: { + title: "联系人", + tableConfig: [ + { + label: "姓名", + value: 'name', + + }, + { + label: "职务", + value: 'duties' + }, + { + label: "办公电话", + value: 'telephone', + }, + { + label: "手机号码", + value: 'mobile', + }, + { + label: "电子邮箱", + value: 'email', + }, + { + label: "传真", + value: 'fax', + }, + + ], + query: 'unit_id', + fetchFun: apiSupervisionParticipatingUnitsContactsLists, + } + +} +export default detailConfig; \ No newline at end of file diff --git a/src/views/supervision_participating_units/index.vue b/src/views/supervision_participating_units/index.vue index 9803ad4..92cd63b 100644 --- a/src/views/supervision_participating_units/index.vue +++ b/src/views/supervision_participating_units/index.vue @@ -12,7 +12,8 @@ - + 查询 @@ -43,14 +44,18 @@ @@ -60,6 +65,8 @@ + @@ -67,13 +74,15 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiSupervisionParticipatingUnitsLists, apiSupervisionParticipatingUnitsDelete, apiSupervisionParticipatingUnitsDetail } from '@/api/supervision_participating_units' -import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' +import detailConfig from './detail' const editRef = shallowRef>() +const detailRef = ref('') // 是否显示编辑框 const showEdit = ref(false) +const showDetail = ref(false) // 查询条件 @@ -124,7 +133,14 @@ const handleDelete = async (id: number | any[]) => { getLists() } +// 详情 +const handleDetail = async (id: any) => { + let res = await apiSupervisionParticipatingUnitsDetail({ id }) + showDetail.value = true + await nextTick() + detailRef.value?.open() + detailRef.value?.setFormData(res) +} getLists() - diff --git a/src/views/supervision_planning/detail.js b/src/views/supervision_planning/detail.js new file mode 100644 index 0000000..e322865 --- /dev/null +++ b/src/views/supervision_planning/detail.js @@ -0,0 +1,66 @@ +import { apiSupervisionMonitoringEquipmentDetailLists } from '@/api/supervision_monitoring_equipment_detail' + + + +const detailConfig = { + title: "工程监理--监理规划", + config: [ + { + label: "项目名称", + value: "project_name" + }, + { + label: "专项审批类型", + value: "approval_type" + }, + { + label: "评审人员", + value: "approval_user" + }, + { + label: "方案名称", + value: "scheme_name" + }, + { + label: "创建人", + value: "create_user" + }, + { + label: "创建时间", + value: "create_time" + }, + { + label: "评审内容", + value: "approval_content" + }, + { + label: "备注", + value: "remark", + column: 1 + }, + { + label: "附件", + value: "annex", + column: 1 + }, + ], + table: { + title: "设备", + tableConfig: [ + { + label: "设备名称", + value: 'name', + + }, + { + label: "是否显示", + value: 'is_show_text' + }, + + ], + query: 'device_id', + fetchFun: apiSupervisionMonitoringEquipmentDetailLists, + } + +} +export default detailConfig; \ No newline at end of file diff --git a/src/views/supervision_planning/edit.vue b/src/views/supervision_planning/edit.vue index b8b1442..bbb1a7d 100644 --- a/src/views/supervision_planning/edit.vue +++ b/src/views/supervision_planning/edit.vue @@ -58,15 +58,6 @@ const popupRef = shallowRef>() const mode = ref('add') const showDialog = ref(false) - -const handleAvatarSuccess_four = (response: any) => { - // @ts-ignore - response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg); -}; - -// 删除上传的文件 -const delFileFn = (index: number) => { formData.annex.splice(index, 1) } - // 弹窗标题 const popupTitle = computed(() => { return mode.value == 'edit' ? '编辑工程监理--监理规划' : '新增工程监理--监理规划' diff --git a/src/views/supervision_planning/index.vue b/src/views/supervision_planning/index.vue index 8442095..1e83bd1 100644 --- a/src/views/supervision_planning/index.vue +++ b/src/views/supervision_planning/index.vue @@ -71,6 +71,10 @@ @click="handleDelete(row.id)"> 删除 + + 详情 + @@ -80,6 +84,8 @@ + @@ -87,13 +93,16 @@ import { usePaging } from '@/hooks/usePaging' import { useDictData } from '@/hooks/useDictOptions' import { apiSupervisionPlanningLists, apiSupervisionPlanningDelete, apiSupervisionPlanningDetail } from '@/api/supervision_planning' -import { timeFormat } from '@/utils/util' import feedback from '@/utils/feedback' import EditPopup from './edit.vue' +import detailConfig from './detail' + const editRef = shallowRef>() +const detailRef = ref('') // 是否显示编辑框 const showEdit = ref(false) +const showDetail = ref(false) // 查询条件 @@ -145,5 +154,15 @@ const handleDelete = async (id: number | any[]) => { getLists() } +// 详情 +const handleDetail = async (id: any) => { + let res = await apiSupervisionPlanningDetail({ id }) + showDetail.value = true + await nextTick() + detailRef.value?.open() + detailRef.value?.setFormData(res) +} + + getLists() diff --git a/src/views/supervision_rules/edit.vue b/src/views/supervision_rules/edit.vue index e25783e..ab83bf3 100644 --- a/src/views/supervision_rules/edit.vue +++ b/src/views/supervision_rules/edit.vue @@ -2,7 +2,7 @@
- + @@ -49,7 +49,7 @@ const showDialog = ref(false) // 弹窗标题 const popupTitle = computed(() => { - return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议' + return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '工程监理--第一次工地会议' }) // 表单数据 diff --git a/src/views/supervision_rules/index.vue b/src/views/supervision_rules/index.vue index 32acbdc..3d7667e 100644 --- a/src/views/supervision_rules/index.vue +++ b/src/views/supervision_rules/index.vue @@ -51,6 +51,10 @@ link @click="handleDelete(row.id)"> 删除 + + 详情 + @@ -107,10 +111,10 @@ const handleAdd = async () => { } // 编辑 -const handleEdit = async (data: any) => { +const handleEdit = async (data: any, mode = 'add') => { showEdit.value = true await nextTick() - editRef.value?.open('edit') + editRef.value?.open(mode) editRef.value?.setFormData(data) } diff --git a/src/views/supervision_rules_disclosure/edit.vue b/src/views/supervision_rules_disclosure/edit.vue index 7f7c231..c0aa6dd 100644 --- a/src/views/supervision_rules_disclosure/edit.vue +++ b/src/views/supervision_rules_disclosure/edit.vue @@ -2,7 +2,7 @@
- + @@ -49,7 +49,7 @@ const showDialog = ref(false) // 弹窗标题 const popupTitle = computed(() => { - return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议' + return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '工程监理--第一次工地会议' }) // 表单数据 diff --git a/src/views/supervision_rules_disclosure/index.vue b/src/views/supervision_rules_disclosure/index.vue index 0eea89c..78f6439 100644 --- a/src/views/supervision_rules_disclosure/index.vue +++ b/src/views/supervision_rules_disclosure/index.vue @@ -53,6 +53,10 @@ type="danger" link @click="handleDelete(row.id)"> 删除 + + 详情 + @@ -109,10 +113,10 @@ const handleAdd = async () => { } // 编辑 -const handleEdit = async (data: any) => { +const handleEdit = async (data: any, mode = 'detail') => { showEdit.value = true await nextTick() - editRef.value?.open('edit') + editRef.value?.open(mode) editRef.value?.setFormData(data) }