From 8f6f89cad0e36a9cd498dbb0fd1b71fbb22210e5 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Fri, 22 Mar 2024 16:43:35 +0800 Subject: [PATCH] add --- src/views/project_alarm_set/detail.js | 32 +++++ src/views/project_alarm_set/detail.vue | 137 -------------------- src/views/project_alarm_set/index.vue | 24 ++-- src/views/project_cost_temp_set/detail.vue | 141 --------------------- src/views/project_cost_temp_set/index.vue | 32 +++-- src/views/project_profit_set/detail.vue | 5 - src/views/project_profit_set/edit.vue | 44 +++---- src/views/project_profit_set/index.vue | 7 +- 8 files changed, 83 insertions(+), 339 deletions(-) create mode 100644 src/views/project_alarm_set/detail.js delete mode 100644 src/views/project_alarm_set/detail.vue delete mode 100644 src/views/project_cost_temp_set/detail.vue diff --git a/src/views/project_alarm_set/detail.js b/src/views/project_alarm_set/detail.js new file mode 100644 index 0000000..3711871 --- /dev/null +++ b/src/views/project_alarm_set/detail.js @@ -0,0 +1,32 @@ +const detailConfig = { + title: "项目预警设置", + config: [ + { + label: "项目名称", + value: "project_name" + }, + { + label: "项目编码", + value: "project_code" + }, + { + label: "材料预算花费比例", + value: "material_budget_expenditure_ratio" + }, + { + label: "人工预算花费比例", + value: "labour_budget_expenditure_ratio" + }, + { + label: "费用预算花费比例", + value: "cost_budget_expenditure_ratio" + }, + { + label: "分包预算花费比例", + value: "subcontract_budget_expenditure_ratio" + }, + + ] + +} +export default detailConfig; \ No newline at end of file diff --git a/src/views/project_alarm_set/detail.vue b/src/views/project_alarm_set/detail.vue deleted file mode 100644 index 6f32b24..0000000 --- a/src/views/project_alarm_set/detail.vue +++ /dev/null @@ -1,137 +0,0 @@ - - - - - diff --git a/src/views/project_alarm_set/index.vue b/src/views/project_alarm_set/index.vue index 30157ec..4a17144 100644 --- a/src/views/project_alarm_set/index.vue +++ b/src/views/project_alarm_set/index.vue @@ -34,8 +34,7 @@ - + @@ -52,7 +51,7 @@ @click="handleDelete(row.id)"> 删除 - + 详情 @@ -65,7 +64,8 @@ - + @@ -78,13 +78,13 @@ import { getAllProjectTypes } from '@/api/projecttype' const protype = reactive([]) import feedback from '@/utils/feedback' import EditPopup from './edit.vue' -import DetailPopup from './detail.vue' -const detailRef = shallowRef>() +import detailConfig from './detail' + const editRef = shallowRef>() +const detailRef = ref('') // 是否显示编辑框 const showEdit = ref(false) -const showDtail = ref(false) - +const showDetail = ref(false) // 查询条件 const queryParams = reactive({ name: '' @@ -133,14 +133,14 @@ const handleDelete = async (id: number | any[]) => { await apiProjectalarmDelete({ id }) getLists() } -const handledetail = async (data: any) => { - let res = await apiProjectalarmDetail({ id: data.id }) - showDtail.value = true +// 详情 +const handleDetail = async (id: any) => { + let res = await apiProjectalarmDetail({ id }) + showDetail.value = true await nextTick() detailRef.value?.open() detailRef.value?.setFormData(res) } - getLists() diff --git a/src/views/project_cost_temp_set/detail.vue b/src/views/project_cost_temp_set/detail.vue deleted file mode 100644 index 44147b0..0000000 --- a/src/views/project_cost_temp_set/detail.vue +++ /dev/null @@ -1,141 +0,0 @@ - - - - - diff --git a/src/views/project_cost_temp_set/index.vue b/src/views/project_cost_temp_set/index.vue index 3badd78..02cdf0b 100644 --- a/src/views/project_cost_temp_set/index.vue +++ b/src/views/project_cost_temp_set/index.vue @@ -12,7 +12,8 @@ - + @@ -23,7 +24,8 @@ - + @@ -39,7 +41,8 @@ 新增 - + 删除 @@ -64,10 +67,11 @@ 编辑 - + 删除 - + 详情 @@ -80,7 +84,8 @@ - + @@ -93,12 +98,14 @@ import { getAllProjectTypes } from '@/api/projecttype' const protype = reactive([]) import feedback from '@/utils/feedback' import EditPopup from './edit.vue' -import DetailPopup from './detail.vue' -const detailRef = shallowRef>() +import detailConfig from './detail' + const editRef = shallowRef>() +const detailRef = ref('') // 是否显示编辑框 const showEdit = ref(false) -const showDtail = ref(false) +const showDetail = ref(false) + const list1 = ref([{ name: '是', id: 1 @@ -160,9 +167,10 @@ const handleDelete = async (id: number | any[]) => { await apiProjectcostDelete({ id }) getLists() } -const handledetail = async (data: any) => { - let res = await apiProjectcostDetail({ id: data.id }) - showDtail.value = true +// 详情 +const handleDetail = async (id: any) => { + let res = await apiProjectcostDetail({ id }) + showDetail.value = true await nextTick() detailRef.value?.open() detailRef.value?.setFormData(res) diff --git a/src/views/project_profit_set/detail.vue b/src/views/project_profit_set/detail.vue index c67231a..d528feb 100644 --- a/src/views/project_profit_set/detail.vue +++ b/src/views/project_profit_set/detail.vue @@ -21,11 +21,6 @@ }} - - - - - diff --git a/src/views/project_profit_set/edit.vue b/src/views/project_profit_set/edit.vue index f1fa559..e6c318b 100644 --- a/src/views/project_profit_set/edit.vue +++ b/src/views/project_profit_set/edit.vue @@ -1,33 +1,21 @@