From baca47e4cfba8539f43be64f0a194c5330ab625e Mon Sep 17 00:00:00 2001 From: zhangqihang <zhangqihang> Date: Sat, 3 Feb 2024 17:56:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E7=82=B9=E5=B7=A5=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/asyncRouter.js | 26 +-- src/request/keyprojects.js | 4 + src/views/keyprojects/aiwarning/index.vue | 106 ------------ src/views/keyprojects/hidden/index.vue | 9 +- src/views/keyprojects/hidden/record_list.vue | 14 +- src/views/keyprojects/hidden/record_view.vue | 40 ++++- .../keyprojects/inspection/hidden_view.vue | 71 ++++++++ src/views/keyprojects/inspection/index.vue | 9 +- .../keyprojects/inspection/record_list.vue | 13 +- .../keyprojects/inspection/record_view.vue | 17 +- src/views/keyprojects/outsourced/add.vue | 161 +++++++++++++----- src/views/keyprojects/outsourced/index.vue | 50 +++++- src/views/keyprojects/outsourced/view.vue | 11 +- .../personnelmanagement/components/edit.vue | 58 +++++-- .../keyprojects/personnelmanagement/index.vue | 13 +- src/views/keyprojects/punish/index.vue | 9 +- src/views/keyprojects/punish/record_list.vue | 4 +- src/views/keyprojects/punish/record_view.vue | 9 +- .../videomanager/components/bobile_camer | 0 src/views/keyprojects/videomanager/index.vue | 106 ------------ 20 files changed, 414 insertions(+), 316 deletions(-) delete mode 100644 src/views/keyprojects/aiwarning/index.vue create mode 100644 src/views/keyprojects/inspection/hidden_view.vue create mode 100644 src/views/keyprojects/videomanager/components/bobile_camer delete mode 100644 src/views/keyprojects/videomanager/index.vue diff --git a/src/assets/js/asyncRouter.js b/src/assets/js/asyncRouter.js index bf3b140..8397bcb 100644 --- a/src/assets/js/asyncRouter.js +++ b/src/assets/js/asyncRouter.js @@ -861,7 +861,21 @@ export default [ title: "查看详情", activeMenu: "/keyprojects/inspection", }, - component: "keyprojects/inspection/record_view", + component: "children", + children: [ + { + path: "", + component: "keyprojects/inspection/record_view", + }, + { + path: "/keyprojects/inspection/hidden_view", + meta: { + title: "隐患信息", + activeMenu: "/keyprojects/inspection", + }, + component: "keyprojects/inspection/hidden_view", + }, + ], }, ], }, @@ -933,16 +947,6 @@ export default [ }, ], }, - { - path: "/keyprojects/aiwarning", - meta: { title: "AI报警", isSubMenu: false }, - component: "keyprojects/aiwarning/index", - }, - { - path: "/keyprojects/videomanager", - meta: { title: "视频监控", isSubMenu: false }, - component: "keyprojects/videomanager/index", - }, ], }, { diff --git a/src/request/keyprojects.js b/src/request/keyprojects.js index 6e22f3a..a26cbf6 100644 --- a/src/request/keyprojects.js +++ b/src/request/keyprojects.js @@ -36,6 +36,8 @@ export const setOutsourcedGoEdit = (params) => post("/outsourced/goEdit", params); // 重点工程修改获取 export const setOutsourcedDelete = (params) => post("/outsourced/delete", params); // 重点工程修改获取 +export const getOutsourcedJie = (params) => post("/outsourced/jie", params); // 结束工程 +export const getOutsourcedStart = (params) => post("/outsourced/start", params); // 结束工程 export const getKeyprojectcheckList = (params) => post("/keyprojectcheck/list", params); // 安全环保检查列表 @@ -49,3 +51,5 @@ export const getKeyprojectpunishList = (params) => post("/keyprojectpunish/list", params); // 处罚列表 export const getKeyprojectpunishGoEdit = (params) => post("/keyprojectpunish/goEdit", params); // 处罚列表详情 + +export const getCorpinfoListAll = (params) => post("/corpinfo/listAll", params); // 监理单位名称 diff --git a/src/views/keyprojects/aiwarning/index.vue b/src/views/keyprojects/aiwarning/index.vue deleted file mode 100644 index 09bae83..0000000 --- a/src/views/keyprojects/aiwarning/index.vue +++ /dev/null @@ -1,106 +0,0 @@ -<template> - <div> - <el-card> - <el-form - :model="searchForm" - label-width="100px" - @submit.prevent="fnResetPagination" - > - <el-row> - <el-col :span="4"> - <el-form-item label="关键字搜索" prop="KEYWORDS"> - <el-input v-model="searchForm.KEYWORDS" /> - </el-form-item> - </el-col> - <el-col :span="6"> - <el-form-item label-width="10px"> - <el-button type="primary" native-type="submit">搜索</el-button> - <el-button native-type="reset" @click="fnResetPaginationTransfer"> - 重置 - </el-button> - </el-form-item> - </el-col> - </el-row> - </el-form> - </el-card> - <layout-card> - <layout-table - ref="tableRef" - :data="list" - @get-data="fnGetData" - v-model:pagination="pagination" - row-key="UNITS_ID" - > - <el-table-column reserve-selection type="selection" width="55" /> - <el-table-column label="序号" width="60"> - <template #default="{ $index }"> - {{ serialNumber(pagination, $index) }} - </template> - </el-table-column> - <el-table-column prop="CREATOR_CORP_NAME" label="添加单位" /> - <el-table-column prop="CREATOR_NAME" label="添加人" width="200" /> - <el-table-column prop="UNITS_NAME" label="单位名称" width="150" /> - <el-table-column prop="JOBTYPE" label="作业类别" width="100" /> - <el-table-column prop="OPERATIONITEM" label="操作项目" /> - <el-table-column prop="NAME" label="姓名" /> - <el-table-column prop="SEX" label="性别" /> - <el-table-column prop="CERTIFICATE_NUM" label="作业证书编号" /> - <el-table-column prop="REVIEWTIME" label="复审时间" /> - <el-table-column label="操作" align="center" width="120"> - <template v-slot="{ row }"> - <el-button - type="primary" - text - link - @click="fnView(row.PERSONNELMANAGEMENT_ID)" - > - 查看 - </el-button> - </template> - </el-table-column> - </layout-table> - </layout-card> - </div> -</template> - -<script setup> -import useListData from "@/assets/js/useListData"; -import { serialNumber } from "@/assets/js/utils"; -import { - getPersonnelmanagementList, - setPersonnelmanagementGoEdit, -} from "@/request/keyprojects.js"; -import { reactive } from "vue"; - -const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } = - useListData(getPersonnelmanagementList); -const data = reactive({ - type: "", - title: "", - editDialog: { - visible: false, - form: {}, - }, -}); - -const fnGoEdit = async (id) => { - const resData = await setPersonnelmanagementGoEdit({ - PERSONNELMANAGEMENT_ID: id, - }); - data.editDialog.form = resData.pd; -}; - -const fnResetPaginationTransfer = () => { - fnGetData(searchForm); -}; - -const fnView = async (id) => { - data.editDialog.form = {}; - data.editDialog.visible = true; - data.editDialog.type = "view"; - data.editDialog.title = "查看"; - fnGoEdit(id); -}; -</script> - -<style scoped></style> diff --git a/src/views/keyprojects/hidden/index.vue b/src/views/keyprojects/hidden/index.vue index 6b586f4..36fdcd2 100644 --- a/src/views/keyprojects/hidden/index.vue +++ b/src/views/keyprojects/hidden/index.vue @@ -38,7 +38,14 @@ </template> </el-table-column> <el-table-column prop="OUTSOURCED_NAME" label="重点工程名称" /> - <el-table-column prop="DEPARTMENT_NAME" label="监管部门" width="250" /> + <el-table-column prop="DEPARTMENT_NAME" label="监管部门"> + <template v-slot="{ row }"> + <span v-if="row.Q_DEPARTMENT_NAME"> + {{ row.Q_DEPARTMENT_NAME }} + </span> + <span v-else>{{ row.DEPARTMENT_NAME }}</span> + </template> + </el-table-column> <el-table-column prop="MANAGE_CORPS_NAME" label="监理单位" diff --git a/src/views/keyprojects/hidden/record_list.vue b/src/views/keyprojects/hidden/record_list.vue index 5408007..c7cd8a5 100644 --- a/src/views/keyprojects/hidden/record_list.vue +++ b/src/views/keyprojects/hidden/record_list.vue @@ -54,10 +54,10 @@ </el-table-column> <el-table-column label="隐患来源" width="200"> <template v-slot="{ row }"> - <span v-if="row.SOURCE === 1">AI报警</span> - <span v-if="row.SOURCE === 2">AI报警</span> - <span v-if="row.SOURCE === 3">安全环保检查(监管端)</span> - <span v-if="row.SOURCE === 4">安全环保检查(企业端)</span> + <span v-if="row.SOURCE === '1'">AI报警</span> + <span v-if="row.SOURCE === '2'">AI报警</span> + <span v-if="row.SOURCE === '3'">安全环保检查(监管端)</span> + <span v-if="row.SOURCE === '5'">安全环保检查(企业端)</span> </template> </el-table-column> <el-table-column label="隐患发现人" width="150"> @@ -72,9 +72,9 @@ <el-table-column prop="CHECKTIME" label="验收时间" width="100" /> <el-table-column label="隐患状态" width="100"> <template v-slot="{ row }"> - <span v-if="row.SOURCE === 1">未整改</span> - <span v-if="row.SOURCE === 2">已整改</span> - <span v-if="row.SOURCE === 4">已验收</span> + <span v-if="row.STATE === '1'">未整改</span> + <span v-if="row.STATE === '2'">已整改</span> + <span v-if="row.STATE === '4'">已验收</span> </template> </el-table-column> <el-table-column label="是否处罚" width="100"> diff --git a/src/views/keyprojects/hidden/record_view.vue b/src/views/keyprojects/hidden/record_view.vue index caf2584..488a0fc 100644 --- a/src/views/keyprojects/hidden/record_view.vue +++ b/src/views/keyprojects/hidden/record_view.vue @@ -5,7 +5,15 @@ <el-divider content-position="left">检查信息</el-divider> <el-descriptions border> <el-descriptions-item label="隐患照片 "> - {{ data.info.INSPECTION_CATEGORY }} + <img + v-viewer + v-for="item in data.hiddenImgs" + :key="item.FILEPATH" + :src="item.url" + width="100" + height="100" + class="ml" + /> </el-descriptions-item> <el-descriptions-item label="隐患描述"> {{ data.info.HIDDENDESCR }} @@ -32,16 +40,32 @@ {{ data.info.RECTIFICATIONTIME }} </el-descriptions-item> <el-descriptions-item label="整改照片"> - {{ data.info.RECTIFICATIONTIME }} + <img + v-viewer + v-for="item in data.zgImgs" + :key="item.FILEPATH" + :src="item.url" + width="100" + height="100" + class="ml" + /> </el-descriptions-item> <el-descriptions-item label="验收时间"> {{ data.info.CHECKTIME }} </el-descriptions-item> <el-descriptions-item label="验收图片"> - {{ data.info.CHECKTIME }} + <img + v-viewer + v-for="item in data.ysImgs" + :key="item.FILEPATH" + :src="item.url" + width="100" + height="100" + class="ml" + /> </el-descriptions-item> <el-descriptions-item label="是否进行罚款"> - {{ pd.ISPUNISH === "1" ? "是" : "否" }} + {{ data.info.ISPUNISH === "1" ? "是" : "否" }} </el-descriptions-item> </el-descriptions> </div> @@ -50,6 +74,7 @@ </template> <script setup> +import { addingPrefixToFile } from "@/assets/js/utils"; import { getKeyprojectcheckFindHidden } from "@/request/keyprojects"; import { reactive } from "vue"; import { useRoute } from "vue-router"; @@ -57,6 +82,9 @@ import { useRoute } from "vue-router"; const route = useRoute(); const data = reactive({ info: {}, + hiddenImgs: [], + ysImgs: [], + zgImgs: [], }); const fnGetData = async () => { @@ -64,6 +92,10 @@ const fnGetData = async () => { HIDDEN_ID: route.query.HIDDEN_ID, }); data.info = resData.pd; + data.hiddenImgs = addingPrefixToFile(resData.pd.hiddenImgs); + data.ysImgs = addingPrefixToFile(resData.pd.ysImgs); + data.zgImgs = addingPrefixToFile(resData.pd.zgImgs); + }; fnGetData(); </script> diff --git a/src/views/keyprojects/inspection/hidden_view.vue b/src/views/keyprojects/inspection/hidden_view.vue new file mode 100644 index 0000000..d386e55 --- /dev/null +++ b/src/views/keyprojects/inspection/hidden_view.vue @@ -0,0 +1,71 @@ +<template> + <div> + <layout-card> + <div id="printContent"> + <el-divider content-position="left">检查信息</el-divider> + <el-descriptions border> + <el-descriptions-item label="隐患照片 "> + {{ data.info.INSPECTION_CATEGORY }} + </el-descriptions-item> + <el-descriptions-item label="隐患描述"> + {{ data.info.HIDDENDESCR }} + </el-descriptions-item> + <el-descriptions-item label="隐患部位 "> + {{ data.info.HIDDENPART }} + </el-descriptions-item> + <el-descriptions-item label="隐患级别"> + {{ data.info.HIDDENLEVEL_NAME }} + </el-descriptions-item> + <el-descriptions-item label="隐患类型 "> + 限期整改 + </el-descriptions-item> + <el-descriptions-item label="整改期限"> + {{ data.info.RECTIFICATIONDEADLINE }} + </el-descriptions-item> + <el-descriptions-item label="整改部门 "> + {{ data.info.RECTIFICATIONDEPT_NAME }} + </el-descriptions-item> + <el-descriptions-item label="整改人"> + {{ data.info.RECTIFICATIONOR_NAME }} + </el-descriptions-item> + <el-descriptions-item label="整改时间"> + {{ data.info.RECTIFICATIONTIME }} + </el-descriptions-item> + <el-descriptions-item label="整改照片"> + {{ data.info.RECTIFICATIONTIME }} + </el-descriptions-item> + <el-descriptions-item label="验收时间"> + {{ data.info.CHECKTIME }} + </el-descriptions-item> + <el-descriptions-item label="验收图片"> + {{ data.info.CHECKTIME }} + </el-descriptions-item> + <el-descriptions-item label="是否进行罚款"> + {{ data.info.ISPUNISH === "1" ? "是" : "否" }} + </el-descriptions-item> + </el-descriptions> + </div> + </layout-card> + </div> +</template> + +<script setup> +import { getKeyprojectcheckFindHidden } from "@/request/keyprojects"; +import { reactive } from "vue"; +import { useRoute } from "vue-router"; + +const route = useRoute(); +const data = reactive({ + info: {}, +}); + +const fnGetData = async () => { + const resData = await getKeyprojectcheckFindHidden({ + HIDDEN_ID: route.query.HIDDEN_ID, + }); + data.info = resData.pd; +}; +fnGetData(); +</script> + +<style scoped lang="scss"></style> diff --git a/src/views/keyprojects/inspection/index.vue b/src/views/keyprojects/inspection/index.vue index 4e4754a..3204217 100644 --- a/src/views/keyprojects/inspection/index.vue +++ b/src/views/keyprojects/inspection/index.vue @@ -38,7 +38,14 @@ </template> </el-table-column> <el-table-column prop="OUTSOURCED_NAME" label="重点工程名称" /> - <el-table-column prop="DEPARTMENT_NAME" label="监管部门" width="200" /> + <el-table-column prop="DEPARTMENT_NAME" label="监管部门"> + <template v-slot="{ row }"> + <span v-if="row.Q_DEPARTMENT_NAME"> + {{ row.Q_DEPARTMENT_NAME }} + </span> + <span v-else>{{ row.DEPARTMENT_NAME }}</span> + </template> + </el-table-column> <el-table-column prop="MANAGE_CORPS_NAME" label="监理单位" diff --git a/src/views/keyprojects/inspection/record_list.vue b/src/views/keyprojects/inspection/record_list.vue index 85261de..cdc9bce 100644 --- a/src/views/keyprojects/inspection/record_list.vue +++ b/src/views/keyprojects/inspection/record_list.vue @@ -38,11 +38,14 @@ </template> </el-table-column> <el-table-column prop="INSPECTION_PLACE" label="检查场所" /> - <el-table-column - prop="INSPECTION_STATUS" - label="检查状态" - width="200" - /> + <el-table-column label="检查状态" width="200"> + <template v-slot="{ row }"> + <span v-if="row.INSPECTION_STATUS === '-1'">检查人驳回</span> + <span v-if="row.INSPECTION_STATUS === '0'">待被检查人确认</span> + <span v-if="row.INSPECTION_STATUS === '1'">被检查人已确认</span> + <span v-if="row.INSPECTION_STATUS === '2'">已归档</span> + </template> + </el-table-column> <el-table-column prop="INSPECTION_TYPE_NAME" label="检查类型" diff --git a/src/views/keyprojects/inspection/record_view.vue b/src/views/keyprojects/inspection/record_view.vue index 11baa5f..c85096e 100644 --- a/src/views/keyprojects/inspection/record_view.vue +++ b/src/views/keyprojects/inspection/record_view.vue @@ -2,7 +2,7 @@ <div> <layout-card> <div id="printContent"> - <el-divider content-position="left">检查信息</el-divider> + <el-divider content-position="left">隐患信息</el-divider> <el-descriptions border :column="2"> <el-descriptions-item label="检查题目 "> {{ data.info.INSPECTION_CATEGORY }} @@ -47,7 +47,19 @@ <el-table-column prop="HIDDENDESCR" label="隐患描述" /> <el-table-column label="状态" width="100"> <template v-slot="{ row }"> - <el-button type="primary" text link @click="row"> + <el-button + type="primary" + text + link + @click=" + router.push({ + path: '/keyprojects/inspection/hidden_view', + query: { + HIDDEN_ID: row.HIDDEN_ID, + }, + }) + " + > 查看 </el-button> </template> @@ -62,6 +74,7 @@ import { getKeyprojectcheckGoEdit } from "@/request/keyprojects"; import { reactive } from "vue"; import { useRoute } from "vue-router"; +import router from "@/router"; const route = useRoute(); const data = reactive({ diff --git a/src/views/keyprojects/outsourced/add.vue b/src/views/keyprojects/outsourced/add.vue index 5b2ecea..c04af9f 100644 --- a/src/views/keyprojects/outsourced/add.vue +++ b/src/views/keyprojects/outsourced/add.vue @@ -66,7 +66,7 @@ v-model="data.form.UNITS_ID" clearable placeholder="请选择相关方" - @change="fnGetUnitUser" + @change="fnGetUnitUser('', '')" > <el-option v-for="item in data.unitsList" @@ -105,10 +105,18 @@ </el-col> <el-col :span="8"> <el-form-item label="监理单位名称"> - <el-input + <el-select v-model="data.form.MANAGE_NAME" - placeholder="请输入内容" - /> + clearable + placeholder="请选择" + > + <el-option + v-for="item in data.mangeList" + :key="item.CORPINFO_ID" + :label="item.CORP_NAME" + :value="item.CORPINFO_ID" + /> + </el-select> </el-form-item> </el-col> <el-col :span="8"> @@ -126,12 +134,24 @@ </el-col> <el-col :span="8"> <el-form-item label="集团单位"> - <el-input v-model="data.form.GROUP_UNIT" placeholder="请输入内容" /> + <el-select + v-model="data.form.GROUP_UNIT" + clearable + placeholder="请选择" + > + <el-option + v-for="item in data.groupCorpList" + :key="item.CORPINFO_ID" + :label="item.CORP_NAME" + :value="item.CORPINFO_ID" + /> + </el-select> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="状态" prop="STATE"> - <el-select v-model="data.form.STATE" placeholder="请选择状态"> + <el-select v-model="data.form.STATE" placeholder="请选择"> + <el-option label="待开始" value="0" /> <el-option label="进行中" value="1" /> <el-option label="已结束" value="2" /> </el-select> @@ -139,59 +159,63 @@ </el-col> <el-col :span="8"> <el-form-item label="是否发送短信"> - <el-input v-model="data.form.IS_SMS" placeholder="请输入内容" /> + <el-select v-model="data.form.IS_SMS" placeholder="请选择"> + <el-option label="是" value="0" /> + <el-option label="否" value="1" /> + </el-select> </el-form-item> </el-col> - <el-col :span="8"> - <el-form-item label="安全管理协议(附件)" prop="CONTACTS"> - <el-input v-model="data.form.CONTACTS" placeholder="请输入内容" /> + <el-col :span="24"> + <el-form-item label="安全管理协议(附件)" prop="fileList"> + <layout-upload + v-model:file-list="data.fileList" + accept=".jpg,.jpeg,.png" + delete-to-server + :limit="9" + /> </el-form-item> </el-col> </el-row> - </el-form> - <el-divider content-position="left"> - 处罚相关 - <el-button size="small" @click="addInspector"> 添加 </el-button> - </el-divider> - <template> - <template> + + <el-divider content-position="left"> 处罚相关 </el-divider> + <el-row> <template v-for="(item, index) in data.form.acceptanceList" :key="item.id" > - <el-col :span="11"> + <el-col :span="8"> <el-form-item - label="验收部门" - :prop="'acceptanceList.' + index + '.DEPARTMENT_ID'" + label="主管部门" + :prop="'acceptanceList.' + index + '.INSPECTION_DEPARTMENT_ID'" :rules="{ required: true, - message: '请选择验收部门', + message: '请选择主管部门', trigger: 'change', }" > <layout-department - v-model="item.DEPARTMENT_ID" + v-model="item.INSPECTION_DEPARTMENT_ID" @update:model-value="fnInspectDepartmentChange($event, index)" /> </el-form-item> </el-col> - <el-col :span="11"> + <el-col :span="8"> <el-form-item - label="验收人" - :prop="'acceptanceList.' + index + '.USER_ID'" + label="处罚人员" + :prop="'acceptanceList.' + index + '.INSPECTION_USER_ID'" :rules="{ required: true, - message: '请选择验收人', + message: '请选择处罚人员', trigger: 'change', }" > <el-select - :model-value="item.USER_ID" + :model-value="item.INSPECTION_USER_ID" @change=" verifyDuplicateSelection( data.form.acceptanceList, index, - 'USER_ID', + 'INSPECTION_USER_ID', $event ) " @@ -224,8 +248,8 @@ </el-form-item> </el-col> </template> - </template> - </template> + </el-row> + </el-form> <div class="tc mt-10"> <el-button type="primary" @click="fnSubmit"> 确定 </el-button> </div> @@ -240,6 +264,7 @@ import { setOutsourcedEdit, setOutsourcedGoEdit, setPersonnelmanagementListAll, + getCorpinfoListAll, } from "@/request/keyprojects"; import { ElMessage } from "element-plus"; import { debounce } from "throttle-debounce"; @@ -247,6 +272,8 @@ import { reactive, ref } from "vue"; import { useRoute, useRouter } from "vue-router"; import LayoutDepartment from "@/components/department/index.vue"; import { getUserListAll } from "@/request/data_dictionary"; +import { verifyDuplicateSelection } from "@/assets/js/utils.js"; +import LayoutUpload from "@/components/upload/index.vue"; const router = useRouter(); const route = useRoute(); @@ -279,26 +306,26 @@ const data = reactive({ acceptanceList: [ { id: Math.random(), - DEPARTMENT_ID: "", - USER_ID: "", + INSPECTION_DEPARTMENT_ID: "", + INSPECTION_USER_ID: "", userList: [], }, ], }, - inspectorList: [ - { INSPECTION_DEPARTMENT_ID: "", INSPECTION_USER_ID: "", USER_SIDE: "" }, - ], + fileList: [], INSPECTOR_List: [], unitsList: [], + groupCorpList: [], + mangeList: [], }); -const addInspector = () => { - data.inspectorList.push({ +const fnAddInspectedList = () => { + data.form.acceptanceList.push({ + id: Math.random(), INSPECTION_DEPARTMENT_ID: "", INSPECTION_USER_ID: "", - USER_SIDE: "", + userList: [], }); - data.INSPECTOR_List.push([]); }; const fnGetData = async () => { @@ -307,21 +334,52 @@ const fnGetData = async () => { }); data.form = resData.pd; data.form.acceptanceList = resData.punishThePerson; + data.form.STARTTIME_TIMES = [resData.pd.STARTTIME, resData.pd.ENDTIME]; + data.form.DEPARTMENT_ID = data.form.DEPARTMENT_ID.split(","); + data.form.INVOLVING_CORPS_DEPART_ID = + data.form.INVOLVING_CORPS_DEPART_ID.split(","); + + fnGetUnitUser(resData.pd.UNITS_PIC, resData.pd.UNITS_PHONE); + for (let index = 0; index < data.form.acceptanceList.length; index++) { + const item = data.form.acceptanceList[index]; + fnInspectDepartmentChange(item.INSPECTION_DEPARTMENT_ID, index); + } + + for (let index = 0; index < resData.file9.length; index++) { + resData.file9[index].name = resData.file9[index].FILE_NAME; + } + data.fileList = resData.file9; }; if (route.query.type === "edit") fnGetData(); +const fnGetCorpList = async () => { + const resData2 = await getCorpinfoListAll({}); + data.mangeList = resData2.varList; + resData2.varList.forEach((item) => { + if ( + item.CORPINFO_ID === "1e6dbbe16004402f8d2c0e52afd9a676" || + item.CORPINFO_ID === "3a854eefa7894e06aaa1a2611bca80f6" || + item.CORPINFO_ID === "020578a4c1f04bc692ee25145c2efbe5" || + item.CORPINFO_ID === "90966974de3c4b83aca6f8fd6432d5c2" + ) { + data.groupCorpList.push(item); + } + }); +}; +fnGetCorpList(); + const fnGetUnitsList = async () => { const resData = await getUnitsListAll({}); data.unitsList = resData.varList; }; fnGetUnitsList(); -const fnGetUnitUser = async () => { +const fnGetUnitUser = async (UNITS_PIC, UNITS_PHONE) => { const resData = await setPersonnelmanagementListAll({ UNITS_ID: data.form.UNITS_ID, }); - data.form.UNITS_PIC = ""; - data.form.UNITS_PHONE = ""; + data.form.UNITS_PIC = UNITS_PIC; + data.form.UNITS_PHONE = UNITS_PHONE; data.unitsUserList = resData.varList; }; @@ -345,6 +403,7 @@ const fnSubmit = debounce( 1000, async () => { await useFormValidate(formRef); + const formData = new FormData(); Object.keys(data.form).forEach((key) => { formData.append(key, data.form[key]); @@ -353,6 +412,24 @@ const fnSubmit = debounce( formData.append("STARTTIME", data.form.STARTTIME_TIMES[0]); formData.append("ENDTIME", data.form.STARTTIME_TIMES[1]); } + + let PUNISH_THE_PERSON = ""; + data.form.acceptanceList.forEach((item) => { + PUNISH_THE_PERSON = item.INSPECTION_USER_ID + "," + PUNISH_THE_PERSON; + }); + if (PUNISH_THE_PERSON.length > 0) { + PUNISH_THE_PERSON = PUNISH_THE_PERSON.substr( + 0, + PUNISH_THE_PERSON.length - 1 + ); + } + formData.set("PUNISH_THE_PERSON", PUNISH_THE_PERSON); + + for (let index = 0; index < data.fileList.length; index++) { + const item = data.fileList[index]; + formData.append("file9", item.raw); + } + route.query.type === "edit" ? await setOutsourcedEdit(formData) : await setOutsourcedAdd(formData); diff --git a/src/views/keyprojects/outsourced/index.vue b/src/views/keyprojects/outsourced/index.vue index 7b24f0f..1db5ae3 100644 --- a/src/views/keyprojects/outsourced/index.vue +++ b/src/views/keyprojects/outsourced/index.vue @@ -62,7 +62,7 @@ /> <el-table-column prop="OUTSOURCED_NAME" label="重点工程名称" /> <el-table-column prop="UNITS_NAME" label="施工相关方" /> - <el-table-column prop="UNITS_NAME" label="辖区单位"> + <el-table-column label="辖区单位"> <template v-slot="{ row }"> <span v-if="row.JURISDICTION_UNIT_NAME"> {{ row.JURISDICTION_UNIT_NAME }} @@ -89,11 +89,12 @@ <el-table-column prop="MANAGE_CORPS_NAME" label="监理单位" /> <el-table-column prop="STATE" label="状态"> <template v-slot="{ row }"> + <span v-if="row.STATE === '0'">未开始</span> <span v-if="row.STATE === '1'">进行中</span> <span v-if="row.STATE === '2'">已结束</span> </template> </el-table-column> - <el-table-column prop="OUTSOURCED_CREATOR_NAME" label="创建人" /> + <el-table-column prop="CREATOR" label="创建人" /> <el-table-column label="操作" align="center" width="200"> <template v-slot="{ row }"> <el-button @@ -111,9 +112,24 @@ > 查看 </el-button> - <el-button type="primary" text link v-if="row.STATE === '1'"> + <el-button + type="primary" + text + link + v-if="row.STATE === '1'" + @click="fnHandleJie(row.OUTSOURCED_ID)" + > 结束 </el-button> + <el-button + type="primary" + text + link + v-if="row.STATE === '0'" + @click="fnHandleStart(row.OUTSOURCED_ID)" + > + 审批 + </el-button> <el-button type="primary" text @@ -167,10 +183,12 @@ import { getOutsourcedList, getUnitsListAll, setOutsourcedDelete, + getOutsourcedJie, + getOutsourcedStart, } from "@/request/keyprojects.js"; import { reactive } from "vue"; import router from "@/router"; -import { ElMessageBox } from "element-plus"; +import { ElMessage, ElMessageBox } from "element-plus"; const { list, pagination, searchForm, fnGetData, fnResetPagination } = useListData(getOutsourcedList); @@ -194,6 +212,30 @@ const fnHandleDelete = async (OUTSOURCED_ID) => { type: "warning", }); await setOutsourcedDelete({ OUTSOURCED_ID }); + ElMessage.success("删除成功"); + fnGetData(); +}; + +const fnHandleJie = async (OUTSOURCED_ID) => { + await ElMessageBox.confirm("确定要结束吗?", { + type: "warning", + }); + const resData = await getOutsourcedJie({ OUTSOURCED_ID }); + if (resData.code === "0") { + ElMessage.success("操作成功"); + } else { + ElMessage.warning(resData.message); + } + fnGetData(); +}; + +const fnHandleStart = async (OUTSOURCED_ID) => { + const resData = await getOutsourcedStart({ OUTSOURCED_ID }); + if (resData.code === "0") { + ElMessage.success("审批成功"); + } else { + ElMessage.warning(resData.message); + } fnGetData(); }; </script> diff --git a/src/views/keyprojects/outsourced/view.vue b/src/views/keyprojects/outsourced/view.vue index 3e2f3cd..b649080 100644 --- a/src/views/keyprojects/outsourced/view.vue +++ b/src/views/keyprojects/outsourced/view.vue @@ -27,7 +27,10 @@ {{ data.info.JURISDICTION_UNIT_NAME }} </el-descriptions-item> <el-descriptions-item label="企业监督部门"> - {{ data.info.DEPARTMENT_NAME }} + <span v-if="data.info.Q_COMPETENT_DEPT_NAME"> + {{ data.info.Q_COMPETENT_DEPT_NAME }} + </span> + <span v-else>{{ data.info.MANAGER_DEPARTMENT_NAME }}</span> </el-descriptions-item> <el-descriptions-item label="企业辖区部门" :span="2"> {{ data.info.INVOLVING_CORPS_DEPART_NAME }} @@ -63,12 +66,14 @@ {{ data.info.IS_SMS === "0" ? "是" : "否" }} </el-descriptions-item> <el-descriptions-item label="状态"> - {{ data.info.STATE === "1" ? "进行中" : "已结束" }} + <span v-if="data.info.STATE === '0'">未开始</span> + <span v-if="data.info.STATE === '1'">进行中</span> + <span v-if="data.info.STATE === '2'">已结束</span> </el-descriptions-item> </el-descriptions> <el-divider content-position="left">处罚相关</el-divider> <el-descriptions border :column="2"> - <div v-for="(item, index) in punishThePerson" :key="index"> + <div v-for="(item, index) in data.punishThePerson" :key="index"> <el-descriptions-item label="处罚人员部门"> {{ item.punishname }} </el-descriptions-item> diff --git a/src/views/keyprojects/personnelmanagement/components/edit.vue b/src/views/keyprojects/personnelmanagement/components/edit.vue index ab70df1..84034a1 100644 --- a/src/views/keyprojects/personnelmanagement/components/edit.vue +++ b/src/views/keyprojects/personnelmanagement/components/edit.vue @@ -1,12 +1,14 @@ <template> <el-dialog v-model="visible" :title="title" width="600" :on-close="fnClose"> - <el-form ref="formRef" :rules="rules" :model="form" label-width="110px"> + <el-form + ref="formRef" + :rules="rules" + :model="form" + label-width="110px" + :disabled="type === 'view'" + > <el-form-item label="单位名称" prop="UNITS_ID"> - <el-select - :disabled="type === 'view'" - v-model="form.UNITS_ID" - placeholder="请选择状态" - > + <el-select v-model="form.UNITS_ID" placeholder="请选择状态"> <el-option v-for="item in data.unitsnameList" :key="item.UNITS_ID" @@ -16,11 +18,7 @@ </el-select> </el-form-item> <el-form-item label="作业类别"> - <el-select - :disabled="type === 'view'" - v-model="form.JOB_TYPE" - placeholder="请选择状态" - > + <el-select v-model="form.JOB_TYPE" placeholder="请选择状态"> <el-option v-for="item in jobtypeList" :key="item.DICTIONARIES_ID" @@ -30,7 +28,14 @@ </el-select> </el-form-item> <el-form-item label="操作项目"> - <el-input v-model="form.OPERATIONITEM" :disabled="type === 'view'" /> + <el-select v-model="form.OPERATIONITEM" placeholder="请选择状态"> + <el-option + v-for="item in data.operationitemList" + :key="item.DICTIONARIES_ID" + :label="item.NAME" + :value="item.DICTIONARIES_ID" + /> + </el-select> </el-form-item> <el-form-item label="手机号码" prop="PHONENUM"> <el-input v-model="form.PHONENUM" :disabled="type === 'view'" /> @@ -52,7 +57,12 @@ <el-input v-model="form.CERTIFICATE_NUM" :disabled="type === 'view'" /> </el-form-item> <el-form-item label="复审时间"> - <el-input v-model="form.REVIEWTIME" :disabled="type === 'view'" /> + <el-date-picker + v-model="form.REVIEWTIME" + format="YYYY-MM-DD" + value-format="YYYY-MM-DD" + type="date" + /> </el-form-item> <el-form-item label="身份证号码"> <el-input v-model="form.IDENTITYCARD" :disabled="type === 'view'" /> @@ -82,7 +92,7 @@ <script setup> import { useVModels } from "@vueuse/core"; -import { reactive, ref } from "vue"; +import { reactive, ref, watchEffect } from "vue"; import { debounce } from "throttle-debounce"; import useFormValidate from "@/assets/js/useFormValidate.js"; import { ElMessage } from "element-plus"; @@ -92,6 +102,7 @@ import { setPersonnelmanagementAdd, setPersonnelmanagementEdit, } from "@/request/keyprojects"; +import { getLevels } from "@/request/data_dictionary.js"; const props = defineProps({ visible: { @@ -132,28 +143,30 @@ const rules = { ], }; +const formRef = ref(null); const data = reactive({ unitsnameList: [], + operationitemList: [], }); -const formRef = ref(null); - const fnClose = () => { formRef.value.resetFields(); visible.value = false; + data.operationitemList = []; }; const fnSubmit = debounce( 1000, async () => { await useFormValidate(formRef); + const form = props.form; if (form.VALID_TIME && form.VALID_TIME.length !== 0) { form.VALID_STIME = form.VALID_TIME[0]; form.VALID_ETIME = form.VALID_TIME[1]; } props.type === "add" - ? await setPersonnelmanagementAdd(props.form) - : await setPersonnelmanagementEdit(props.form); + ? await setPersonnelmanagementAdd(form) + : await setPersonnelmanagementEdit(form); ElMessage.success("提交成功"); fnClose(); emits("get-data"); @@ -167,6 +180,15 @@ const fnUnitsListAll = async () => { data.unitsnameList = resData.varList; }; fnUnitsListAll(); + +const fnChangeType = async (DICTIONARIES_ID) => { + const resData = await getLevels({ DICTIONARIES_ID }); + data.operationitemList = resData.list; +}; + +watchEffect(() => { + if (form.value.JOB_TYPE) fnChangeType(form.value.JOB_TYPE); +}); </script> <style scoped lang="scss"></style> diff --git a/src/views/keyprojects/personnelmanagement/index.vue b/src/views/keyprojects/personnelmanagement/index.vue index 8a81c95..d8c485a 100644 --- a/src/views/keyprojects/personnelmanagement/index.vue +++ b/src/views/keyprojects/personnelmanagement/index.vue @@ -57,9 +57,14 @@ <el-table-column prop="CREATOR_NAME" label="添加人" width="200" /> <el-table-column prop="UNITS_NAME" label="单位名称" width="150" /> <el-table-column prop="JOBTYPE" label="作业类别" width="100" /> - <el-table-column prop="OPERATIONITEM" label="操作项目" /> + <el-table-column prop="OPERATIONITEM_NAME" label="操作项目" /> <el-table-column prop="NAME" label="姓名" /> - <el-table-column prop="SEX" label="性别" /> + <el-table-column prop="SEX" label="性别"> + <template v-slot="{ row }"> + <span v-if="row.SEX === '0'">男</span> + <span v-if="row.SEX === '1'">女</span> + </template> + </el-table-column> <el-table-column prop="CERTIFICATE_NUM" label="作业证书编号" /> <el-table-column prop="REVIEWTIME" label="复审时间" /> <el-table-column label="操作" align="center" width="240"> @@ -183,6 +188,10 @@ const fnGoEdit = async (id) => { PERSONNELMANAGEMENT_ID: id, }); data.editDialog.form = resData.pd; + data.editDialog.form.VALID_TIME = [ + resData.pd.VALID_STIME, + resData.pd.VALID_ETIME, + ]; }; const fnResetPaginationTransfer = () => { diff --git a/src/views/keyprojects/punish/index.vue b/src/views/keyprojects/punish/index.vue index f04ab8b..a61d1f4 100644 --- a/src/views/keyprojects/punish/index.vue +++ b/src/views/keyprojects/punish/index.vue @@ -38,7 +38,14 @@ </template> </el-table-column> <el-table-column prop="OUTSOURCED_NAME" label="重点工程名称" /> - <el-table-column prop="DEPARTMENT_NAME" label="监管部门" width="200" /> + <el-table-column prop="DEPARTMENT_NAME" label="监管部门"> + <template v-slot="{ row }"> + <span v-if="row.Q_DEPARTMENT_NAME"> + {{ row.Q_DEPARTMENT_NAME }} + </span> + <span v-else>{{ row.DEPARTMENT_NAME }}</span> + </template> + </el-table-column> <el-table-column prop="MANAGE_CORPS_NAME" label="监理单位" diff --git a/src/views/keyprojects/punish/record_list.vue b/src/views/keyprojects/punish/record_list.vue index 883f7fd..13199e2 100644 --- a/src/views/keyprojects/punish/record_list.vue +++ b/src/views/keyprojects/punish/record_list.vue @@ -47,7 +47,7 @@ </el-table-column> <el-table-column prop="OUTSOURCED_NAME" label="重点工程名称" /> <el-table-column prop="REASON" label="处罚原因" width="200" /> - <el-table-column prop="CREATOR_NAME" label="下发人" width="150" /> + <el-table-column prop="CREATOR_NAMES" label="下发人" width="150" /> <el-table-column prop="OUTSOURCED_NAME" label="被处罚单位" @@ -67,7 +67,7 @@ link @click=" router.push({ - path: '/keyprojects/inspection/record_view', + path: '/keyprojects/punish/record_view', query: { KEYPROJECTPUNISH_ID: row.KEYPROJECTPUNISH_ID, }, diff --git a/src/views/keyprojects/punish/record_view.vue b/src/views/keyprojects/punish/record_view.vue index 888cc3b..f51efb1 100644 --- a/src/views/keyprojects/punish/record_view.vue +++ b/src/views/keyprojects/punish/record_view.vue @@ -23,7 +23,13 @@ {{ data.info.DATE }} </el-descriptions-item> <el-descriptions-item label="罚款缴纳单 "> - {{ data.info.INSPECTION_TIME_START }} + <img + v-viewer + :src="FILE_URL + data.info.HANDLE_IMG" + width="100" + height="100" + class="ml" + /> </el-descriptions-item> <el-descriptions-item label="处罚处理人"> {{ data.info.PERSON_NAME }} @@ -42,6 +48,7 @@ import { getKeyprojectpunishGoEdit } from "@/request/keyprojects"; import { reactive } from "vue"; import { useRoute } from "vue-router"; +const FILE_URL = import.meta.env.VITE_FILE_URL; const route = useRoute(); const data = reactive({ info: {}, diff --git a/src/views/keyprojects/videomanager/components/bobile_camer b/src/views/keyprojects/videomanager/components/bobile_camer new file mode 100644 index 0000000..e69de29 diff --git a/src/views/keyprojects/videomanager/index.vue b/src/views/keyprojects/videomanager/index.vue deleted file mode 100644 index 09bae83..0000000 --- a/src/views/keyprojects/videomanager/index.vue +++ /dev/null @@ -1,106 +0,0 @@ -<template> - <div> - <el-card> - <el-form - :model="searchForm" - label-width="100px" - @submit.prevent="fnResetPagination" - > - <el-row> - <el-col :span="4"> - <el-form-item label="关键字搜索" prop="KEYWORDS"> - <el-input v-model="searchForm.KEYWORDS" /> - </el-form-item> - </el-col> - <el-col :span="6"> - <el-form-item label-width="10px"> - <el-button type="primary" native-type="submit">搜索</el-button> - <el-button native-type="reset" @click="fnResetPaginationTransfer"> - 重置 - </el-button> - </el-form-item> - </el-col> - </el-row> - </el-form> - </el-card> - <layout-card> - <layout-table - ref="tableRef" - :data="list" - @get-data="fnGetData" - v-model:pagination="pagination" - row-key="UNITS_ID" - > - <el-table-column reserve-selection type="selection" width="55" /> - <el-table-column label="序号" width="60"> - <template #default="{ $index }"> - {{ serialNumber(pagination, $index) }} - </template> - </el-table-column> - <el-table-column prop="CREATOR_CORP_NAME" label="添加单位" /> - <el-table-column prop="CREATOR_NAME" label="添加人" width="200" /> - <el-table-column prop="UNITS_NAME" label="单位名称" width="150" /> - <el-table-column prop="JOBTYPE" label="作业类别" width="100" /> - <el-table-column prop="OPERATIONITEM" label="操作项目" /> - <el-table-column prop="NAME" label="姓名" /> - <el-table-column prop="SEX" label="性别" /> - <el-table-column prop="CERTIFICATE_NUM" label="作业证书编号" /> - <el-table-column prop="REVIEWTIME" label="复审时间" /> - <el-table-column label="操作" align="center" width="120"> - <template v-slot="{ row }"> - <el-button - type="primary" - text - link - @click="fnView(row.PERSONNELMANAGEMENT_ID)" - > - 查看 - </el-button> - </template> - </el-table-column> - </layout-table> - </layout-card> - </div> -</template> - -<script setup> -import useListData from "@/assets/js/useListData"; -import { serialNumber } from "@/assets/js/utils"; -import { - getPersonnelmanagementList, - setPersonnelmanagementGoEdit, -} from "@/request/keyprojects.js"; -import { reactive } from "vue"; - -const { list, pagination, searchForm, fnGetData, fnResetPagination, tableRef } = - useListData(getPersonnelmanagementList); -const data = reactive({ - type: "", - title: "", - editDialog: { - visible: false, - form: {}, - }, -}); - -const fnGoEdit = async (id) => { - const resData = await setPersonnelmanagementGoEdit({ - PERSONNELMANAGEMENT_ID: id, - }); - data.editDialog.form = resData.pd; -}; - -const fnResetPaginationTransfer = () => { - fnGetData(searchForm); -}; - -const fnView = async (id) => { - data.editDialog.form = {}; - data.editDialog.visible = true; - data.editDialog.type = "view"; - data.editDialog.title = "查看"; - fnGoEdit(id); -}; -</script> - -<style scoped></style>