From fbd24a3445d78142fa1792bf0d1428651a5e7b38 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Fri, 8 Mar 2024 16:24:16 +0800 Subject: [PATCH] add --- src/api/manage_info_report.ts | 26 +++ .../dialogTable/dialogTableConfig.ts | 154 ++++++++++++- src/components/dialogTable/index.vue | 28 ++- .../supervision_check_item/index.vue | 108 --------- .../supervision_check_item_detail/index.vue | 77 ------- .../index.vue | 71 ------ .../supervision_material_entry/index.vue | 77 ------- .../index.vue | 78 ------- .../index.vue | 74 ------ src/views/manage_info_report/edit.vue | 212 ++++++++++++++++++ src/views/manage_info_report/index.vue | 122 ++++++++++ src/views/supervision_accept/edit.vue | 5 +- src/views/supervision_check_item/edit.vue | 5 +- .../edit.vue | 6 +- .../edit.vue | 6 +- .../edit.vue | 6 +- .../edit.vue | 7 +- src/views/supervision_device_entry/edit.vue | 7 +- .../edit.vue | 9 +- src/views/supervision_inspection/edit.vue | 10 +- .../supervision_large_equipment/edit.vue | 15 +- src/views/supervision_material_entry/edit.vue | 6 +- .../edit.vue | 5 +- src/views/supervision_side_station/edit.vue | 29 +-- .../supervision_witness_sampling/edit.vue | 5 +- 25 files changed, 581 insertions(+), 567 deletions(-) create mode 100644 src/api/manage_info_report.ts delete mode 100644 src/components/supervision_check_item/index.vue delete mode 100644 src/components/supervision_check_item_detail/index.vue delete mode 100644 src/components/supervision_dangerous_engineering_monitoring/index.vue delete mode 100644 src/components/supervision_material_entry/index.vue delete mode 100644 src/components/supervision_material_equipment_info/index.vue delete mode 100644 src/components/supervision_participating_units_qualifications/index.vue create mode 100644 src/views/manage_info_report/edit.vue create mode 100644 src/views/manage_info_report/index.vue diff --git a/src/api/manage_info_report.ts b/src/api/manage_info_report.ts new file mode 100644 index 0000000..13243e1 --- /dev/null +++ b/src/api/manage_info_report.ts @@ -0,0 +1,26 @@ +import request from '@/utils/request' + +// 项目管理--项目信息上报列表 +export function apiManageInfoReportLists(params: any) { + return request.get({ url: '/manage_communication.manage_info_report/lists', params }) +} + +// 添加项目管理--项目信息上报 +export function apiManageInfoReportAdd(params: any) { + return request.post({ url: '/manage_communication.manage_info_report/add', params }) +} + +// 编辑项目管理--项目信息上报 +export function apiManageInfoReportEdit(params: any) { + return request.post({ url: '/manage_communication.manage_info_report/edit', params }) +} + +// 删除项目管理--项目信息上报 +export function apiManageInfoReportDelete(params: any) { + return request.post({ url: '/manage_communication.manage_info_report/delete', params }) +} + +// 项目管理--项目信息上报详情 +export function apiManageInfoReportDetail(params: any) { + return request.get({ url: '/manage_communication.manage_info_report/detail', params }) +} \ No newline at end of file diff --git a/src/components/dialogTable/dialogTableConfig.ts b/src/components/dialogTable/dialogTableConfig.ts index e75d26d..c766fc9 100644 --- a/src/components/dialogTable/dialogTableConfig.ts +++ b/src/components/dialogTable/dialogTableConfig.ts @@ -2,18 +2,23 @@ interface Iconfig{ /** 请求列表的接口*/ fetchFn:Function, - /**用户可搜索的内容,select为下拉列表 */ + /**用户可搜索的内容,select为下拉列表,select为数组时为自定义option,w为string时表示获取字典里的值 */ serchList:Array<{label:String,value:String,select?:Array<{name:string,value:string|Number}>|String }>, + /**需要的字典数据,以,隔开的string */ + dictData?:String, + /**table配置 */ tableList:Array, } -import { useDictData } from '@/hooks/useDictOptions' import { apiSupervisionProjectLists } from '@/api/supervision_project' import { apiSupervisionParticipatingUnitsLists, } from '@/api/supervision_participating_units' import { apiSupervisionCheckItemLists } from '@/api/supervision_check_item' import { apiManageProjectLists} from '@/api/manage_project' +import { apiSupervisionDangerousEngineeringMonitoringLists, } from '@/api/supervision_dangerous_engineering_monitoring' +import { apiSupervisionMaterialEntryLists } from '@/api/supervision_material_entry' +import { apiSupervisionParticipatingUnitsQualificationsLists } from '@/api/supervision_participating_units_qualifications' export const supervision_project:Iconfig = { @@ -27,14 +32,6 @@ export const supervision_project:Iconfig = { label: '项目编号', value: "project_code" }, - // { - // label: '项目分类', - // value: "project_type", - // select: [ - // { label: "是", value: 0 }, - // { label: "否", value: 1 }, - // ] - // } ], tableList: [ { project_name: "项目名称" }, @@ -61,7 +58,6 @@ export const supervision_project:Iconfig = { ] } - export const supervision_participating_units:Iconfig = { fetchFn: apiSupervisionParticipatingUnitsLists, serchList: [ @@ -85,6 +81,7 @@ export const supervision_participating_units:Iconfig = { export const supervision_check_item:Iconfig = { fetchFn: apiSupervisionCheckItemLists, + dictData:'check_item_node_type', serchList: [ { label: '节点名称', @@ -106,6 +103,7 @@ export const supervision_check_item:Iconfig = { export const manage_project:Iconfig = { fetchFn: apiManageProjectLists, + dictData:'cost_consultation_industry_nature,industry,engineering_status', serchList: [ { label: '项目名称', @@ -115,6 +113,21 @@ export const manage_project:Iconfig = { label: '项目编号', value: "project_code", }, + { + label:"性质", + value:'nature', + select:'cost_consultation_industry_nature' + }, + { + label:"行业", + value:'industry', + select:"industry" + }, + { + label:"工程状态", + value:'engineering_status', + select:"engineering_status" + } ], tableList: [ @@ -132,3 +145,122 @@ export const manage_project:Iconfig = { ] } +export const supervision_dangerous_engineering_monitoring:Iconfig = { + fetchFn: apiSupervisionDangerousEngineeringMonitoringLists, + dictData:'partial_project', + serchList: [ + { + label: '危大工程类型', + value: "type" + }, + { + label:"分部分项工程", + value:'partial_project', + select:"partial_project" + }, + { + label:"施工部位", + value:'position', + } + + ], + tableList: [ + { project_name: "项目名称" }, + { type_text: "危大工程类型" }, + { partial_project_text: "分部分项工程" }, + { planned_construction_time: "计划施工时间" }, + { position: "施工部位" }, + ] +} + +export const supervision_material_entry:Iconfig = { + fetchFn: apiSupervisionMaterialEntryLists, + serchList: [ + { + label: '进场主题', + value: "theme" + }, + { + label:"编号", + value:'code', + }, + ], + tableList: [ + { project_name: "项目名称" }, + { company_name: "采购单位" }, + { theme: "进场主题" }, + { code: "编号" }, + { enter_time: "进场时间" }, + { enter_result_text: "进场结果" }, + { parallel_test_text: "是否平行检验" }, + ] +} + +export const supervision_material_equipment_info:Iconfig = { + fetchFn: apiSupervisionMaterialEntryLists, + serchList: [ + { + label: '材料/设备名称', + value: "name" + }, + { + label:"材料/设备品牌", + value:'brand', + }, + { + label:"合同约定品牌", + value:'brand', + select:[ + { + name:"否", + value:"0" + }, + { + name:"是", + value:"1" + }, + + ] + }, + ], + tableList: [ + { project_name: "项目名称" }, + { name: "材料/设备名称" }, + { brand: "材料/设备品牌" }, + { model: "型号" }, + { unit: "计数单位" }, + { number: "计划数量" }, + { contract_brand_text: "合同约定品牌" }, + { type_text: "类型" }, + { remark: "备注" }, + ] +} + +export const supervision_participating_units_qualifications:Iconfig = { + fetchFn: apiSupervisionParticipatingUnitsQualificationsLists, + serchList: [ + { + label: '资质名称', + value: "qualification_name" + }, + { + label:"资质编号", + value:'qualification_number', + }, + ], + tableList: [ + { project_name: "项目名称" }, + { company_id: "所属单位" }, + { qualification_name: "资质名称" }, + { qualification_number: "资质编号" }, + { get_date: "发证日期" }, + { effective_date: "有效日期" }, + { qualification_status_text: "资质状态" }, + { remark: "备注" }, + ] +} + + + + + diff --git a/src/components/dialogTable/index.vue b/src/components/dialogTable/index.vue index 92048cb..03e3ff6 100644 --- a/src/components/dialogTable/index.vue +++ b/src/components/dialogTable/index.vue @@ -4,8 +4,7 @@ - - + -
@@ -59,12 +57,32 @@ const props = defineProps({ }) +/**根据传入的config生成queryParmas */ +const getParmasFn = () => { + const arr = props.config.serchList.map((item: any) => (item.value)) + const result = arr.reduce((acc: any, curr: any) => { + acc[curr] = ''; + return acc; + }, {}); + const mergedObj = Object.assign({}, result, props.query); + + return mergedObj +} + + +/**判断是否需要disabled的搜索框*/ +const isDisabled = (key: String) => { + if (!props.query) return + return Object.keys(props.query).includes(key) +} + + // 查询条件 const queryParams = reactive({ - ...props.query + ...getParmasFn() }); -// const { dictData } = useDictData(props.config.serchList.map(item => (item.select)) 'check_item_node_type') +const { dictData } = useDictData(props.config.dictData) // 选中数据 const emits = defineEmits(["customEvent"]); diff --git a/src/components/supervision_check_item/index.vue b/src/components/supervision_check_item/index.vue deleted file mode 100644 index 7feb53e..0000000 --- a/src/components/supervision_check_item/index.vue +++ /dev/null @@ -1,108 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/supervision_check_item_detail/index.vue b/src/components/supervision_check_item_detail/index.vue deleted file mode 100644 index 0bbb373..0000000 --- a/src/components/supervision_check_item_detail/index.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/supervision_dangerous_engineering_monitoring/index.vue b/src/components/supervision_dangerous_engineering_monitoring/index.vue deleted file mode 100644 index 21cb590..0000000 --- a/src/components/supervision_dangerous_engineering_monitoring/index.vue +++ /dev/null @@ -1,71 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/supervision_material_entry/index.vue b/src/components/supervision_material_entry/index.vue deleted file mode 100644 index 4041731..0000000 --- a/src/components/supervision_material_entry/index.vue +++ /dev/null @@ -1,77 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/supervision_material_equipment_info/index.vue b/src/components/supervision_material_equipment_info/index.vue deleted file mode 100644 index 86d143f..0000000 --- a/src/components/supervision_material_equipment_info/index.vue +++ /dev/null @@ -1,78 +0,0 @@ - - - \ No newline at end of file diff --git a/src/components/supervision_participating_units_qualifications/index.vue b/src/components/supervision_participating_units_qualifications/index.vue deleted file mode 100644 index 22f4141..0000000 --- a/src/components/supervision_participating_units_qualifications/index.vue +++ /dev/null @@ -1,74 +0,0 @@ - - - \ No newline at end of file diff --git a/src/views/manage_info_report/edit.vue b/src/views/manage_info_report/edit.vue new file mode 100644 index 0000000..c1901d5 --- /dev/null +++ b/src/views/manage_info_report/edit.vue @@ -0,0 +1,212 @@ + + + diff --git a/src/views/manage_info_report/index.vue b/src/views/manage_info_report/index.vue new file mode 100644 index 0000000..9cd4dfb --- /dev/null +++ b/src/views/manage_info_report/index.vue @@ -0,0 +1,122 @@ + + + diff --git a/src/views/supervision_accept/edit.vue b/src/views/supervision_accept/edit.vue index 987c481..d51d49d 100644 --- a/src/views/supervision_accept/edit.vue +++ b/src/views/supervision_accept/edit.vue @@ -92,7 +92,6 @@ -
@@ -195,9 +194,9 @@