diff --git a/src/views/check/checkrecord/components/checkdstart.vue b/src/views/check/checkrecord/components/checkdstart.vue index 7aff043..ad2c7a1 100644 --- a/src/views/check/checkrecord/components/checkdstart.vue +++ b/src/views/check/checkrecord/components/checkdstart.vue @@ -406,50 +406,56 @@ - - - - - - - - - - - - - 添加 - - - - - - + + - - - 删除 - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -679,7 +685,8 @@ export default { } }, editVector: '添加隐患', - addLoading: false + addLoading: false, + modelKey: 0 } }, watch: { @@ -1511,7 +1518,8 @@ export default { LISTMANAGER_ID: this.LISTMANAGER_ID, HAVESCHEME: 0, hiddenPartType: this.hiddenPartType, - findCreator: findCreator + findCreator: findCreator, + hiddenFindCreator: this.myUserInfo.USER_ID // DISCOVERYTIME: this.hiddenForm.DISCOVERYTIME, // 隐患发现时间 // CONFIRM_USER: this.hiddenForm.CONFIRM_USER // 隐患确认人 } @@ -1730,11 +1738,17 @@ export default { requestFN( '/user/goEditMyInfo', {} - ).then((data) => { + ).then(async(data) => { // var o = { 'DEPARTMENT_ID': data.pd.DEPARTMENT_ID, 'USER_ID': data.pd.USER_ID } - this.myUserInfo.DEPARTMENT_ID = data.depname + // this.myUserInfo.DEPARTMENT_ID = data.depname + this.myUserInfo.DEPARTMENT_ID = data.pd.DEPARTMENT_ID this.myUserInfo.DEPARTMENTName = data.pd.deptName + if (data.pd.DEPARTMENT_ID) { + await this.getFindUserListByDepId(data.pd.DEPARTMENT_ID) + } + this.modelKey++ // 为了重新渲染级联选择器 this.myUserInfo.USERNAME = data.pd.NAME + this.myUserInfo.USER_ID = data.pd.USER_ID this.$forceUpdate() }).catch((e) => { this.addLoading = false @@ -1747,24 +1761,46 @@ export default { remoFindOther(index) { // 删除隐患发现人员 this.findCreatorList.splice(index, 1) }, - updateFindOtherDep(DEPARTMENT_ID, i) { // 点击发现部门 - this.findCreatorList[i].USER_ID = '' - this.getFindUserList(DEPARTMENT_ID, i) + updateFindDep(DEPARTMENT_ID) { + this.myUserInfo.USER_ID = '' + this.getFindUserListByDepId(DEPARTMENT_ID) }, - getFindUserList(DEPARTMENT_ID, index) { // 获取发现发现部门的人员信息 - this.listLoading = true - requestFN( - '/user/listAll', - { - DEPARTMENT_ID: DEPARTMENT_ID, - tm: new Date().getTime() - } - ).then((data) => { - this.$set(this.findUserList, index, data.userList) - }).catch((e) => { - this.listLoading = false + // updateFindOtherDep(DEPARTMENT_ID, i) { // 点击发现部门 + // this.findCreatorList[i].USER_ID = '' + // this.getFindUserList(DEPARTMENT_ID, i) + // }, + getFindUserListByDepId(DEPARTMENT_ID) { + return new Promise((resolve) => { + this.listLoading = true + requestFN( + '/user/listAll', + { + DEPARTMENT_ID: DEPARTMENT_ID, + tm: new Date().getTime() + } + ).then((data) => { + this.findUserList = data.userList + this.$forceUpdate() + resolve() + }).catch((e) => { + this.listLoading = false + }) }) }, + // getFindUserList(DEPARTMENT_ID, index) { // 获取发现发现部门的人员信息 + // this.listLoading = true + // requestFN( + // '/user/listAll', + // { + // DEPARTMENT_ID: DEPARTMENT_ID, + // tm: new Date().getTime() + // } + // ).then((data) => { + // this.$set(this.findUserList, index, data.userList) + // }).catch((e) => { + // this.listLoading = false + // }) + // }, updateConfirmDept() { // 根据选择的隐患确认部门显示隐患确认人 this.listLoading = true requestFN( diff --git a/src/views/hidden/confirm/components/detail.vue b/src/views/hidden/confirm/components/detail.vue index ada18b1..dc96c83 100644 --- a/src/views/hidden/confirm/components/detail.vue +++ b/src/views/hidden/confirm/components/detail.vue @@ -65,7 +65,7 @@
- 提 交 + 提 交 打 回 返 回
diff --git a/src/views/hidden/ignore/components/detail.vue b/src/views/hidden/ignore/components/detail.vue index 33ad799..f447939 100644 --- a/src/views/hidden/ignore/components/detail.vue +++ b/src/views/hidden/ignore/components/detail.vue @@ -47,8 +47,9 @@ 隐患级别 - {{ pd.editLevelName }} - {{ pd.HIDDENLEVELNAME }} + + + {{ pd.HIDDENLEVELNAME }} 隐患类型 diff --git a/src/views/hidden/list/components/edit.vue b/src/views/hidden/list/components/edit.vue index e253af6..bafe935 100644 --- a/src/views/hidden/list/components/edit.vue +++ b/src/views/hidden/list/components/edit.vue @@ -163,46 +163,28 @@ - - - - - - - - - - - - 添加 - - - - - + + - - 删除 - - @@ -360,7 +342,8 @@ export default { confirmUserList: [], // 隐患确认人 isClearRectificationor: true, // 是否清空整改人 iframeSrc: '', - dialogMap: false + dialogMap: false, + modelKey: 0 } }, watch: { @@ -506,9 +489,13 @@ export default { requestFN( '/user/goEditMyInfo', {} - ).then((data) => { - this.myUserInfo.DEPARTMENT_ID = data.deptname - this.myUserInfo.USERNAME = data.pd.NAME + ).then(async(data) => { + this.myUserInfo.DEPARTMENT_ID = data.pd.DEPARTMENT_ID + this.modelKey++ // 为了触发级联选择器重新渲染 + if (data.pd.DEPARTMENT_ID) { + await this.getFindUserListByDepId(data.pd.DEPARTMENT_ID) + } + this.myUserInfo.USER_ID = data.pd.USER_ID this.$forceUpdate() }).catch((e) => { @@ -555,6 +542,7 @@ export default { } this.pd.findCreator = findCreator this.pd.hiddenPartType = this.hiddenPartType + this.pd.hiddenFindCreator = this.myUserInfo.USER_ID this.$refs.form.validate(valid => { if (this.pd.HIDDEN_ID) { if (valid) { @@ -810,24 +798,46 @@ export default { remoFindOther(index) { // 删除隐患发现人员 this.findCreatorList.splice(index, 1) }, - updateFindOtherDep(DEPARTMENT_ID, i) { // 点击发现部门 - this.findCreatorList[i].USER_ID = '' - this.getFindUserList(DEPARTMENT_ID, i) + // updateFindOtherDep(DEPARTMENT_ID, i) { // 点击发现部门 + // this.findCreatorList[i].USER_ID = '' + // this.getFindUserList(DEPARTMENT_ID, i) + // }, + updateFindDep(DEPARTMENT_ID) { + this.myUserInfo.USER_ID = '' + this.getFindUserListByDepId(DEPARTMENT_ID) }, - getFindUserList(DEPARTMENT_ID, index) { // 获取发现发现部门的人员信息 - this.listLoading = true - requestFN( - '/user/listAll', - { - DEPARTMENT_ID: DEPARTMENT_ID, - tm: new Date().getTime() - } - ).then((data) => { - this.$set(this.findUserList, index, data.userList) - }).catch((e) => { - this.listLoading = false + getFindUserListByDepId(DEPARTMENT_ID) { + return new Promise((resolve) => { + this.listLoading = true + requestFN( + '/user/listAll', + { + DEPARTMENT_ID: DEPARTMENT_ID, + tm: new Date().getTime() + } + ).then((data) => { + this.findUserList = data.userList + this.$forceUpdate() + resolve() + }).catch((e) => { + this.listLoading = false + }) }) }, + // getFindUserList(DEPARTMENT_ID, index) { // 获取发现发现部门的人员信息 + // this.listLoading = true + // requestFN( + // '/user/listAll', + // { + // DEPARTMENT_ID: DEPARTMENT_ID, + // tm: new Date().getTime() + // } + // ).then((data) => { + // this.$set(this.findUserList, index, data.userList) + // }).catch((e) => { + // this.listLoading = false + // }) + // }, updateConfirmDept() { // 根据选择的隐患确认部门显示隐患确认人 this.pd.CONFIRM_USER = '' this.listLoading = true diff --git a/src/views/hiddenApi/publicMethod/detail.vue b/src/views/hiddenApi/publicMethod/detail.vue index b6b5f86..e214305 100644 --- a/src/views/hiddenApi/publicMethod/detail.vue +++ b/src/views/hiddenApi/publicMethod/detail.vue @@ -393,6 +393,27 @@
+ +
@@ -488,7 +509,8 @@ export default { }, dialogVideoVisible: false, dialogViewPdf: false, - hiddenExamineList: [] + hiddenExamineList: [], + returnInformation: '' } }, @@ -510,6 +532,17 @@ export default { var vm = this vm.pd = data.hidden// 隐患信息 this.hiddenExamineList = data.hiddenExa // 特殊处置审核信息 隐患记录 + // 找出hiddenExamineList中验收打回日期最新的一条 + if (this.hiddenExamineList.length > 0) { + for (let i = 0; i < this.hiddenExamineList.length; i++) { + if (this.hiddenExamineList[i].TYPE === 3) { + this.returnInformation = this.hiddenExamineList[i] + if (this.returnInformation != '' && new Date(this.hiddenExamineList[i].CREATTIME).getTime() > new Date(this.returnInformation.CREATTIME).getTime()) { + this.returnInformation = this.hiddenExamineList[i] + } + } + } + } vm.hs = data.hs // 查询整改方案 vm.checkList = data.checkList // 验收信息 this.hImgs = data.hImgs // 图片 diff --git a/src/views/keyprojects/inspection/components/record-list.vue b/src/views/keyprojects/inspection/components/record-list.vue index 4157125..fec821b 100644 --- a/src/views/keyprojects/inspection/components/record-list.vue +++ b/src/views/keyprojects/inspection/components/record-list.vue @@ -54,9 +54,10 @@ - + @@ -78,6 +79,7 @@ export default { directives: { waves }, data() { return { + loginUserId: JSON.parse(sessionStorage.getItem('user')).USER_ID, listLoading: true, listQuery: { page: 1, @@ -132,6 +134,36 @@ export default { this.$parent.KEYPROJECTCHECK_ID = ID this.$parent.activeName = 'Info' }, + goDelete(ID) { + this.$confirm('是否删除该安全环保检查及以下隐患?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + this.listLoading = true + requestFN( + '/keyprojectcheck/goDelete', + { + KEYPROJECTCHECK_ID: ID + } + ).then((data) => { + this.$message({ + type: 'success', + message: '删除成功!' + }) + this.listLoading = false + this.getList() + }).catch((e) => { + this.$message({ + type: 'info', + message: '删除失败!' + }) + this.listLoading = false + }) + }).catch(() => { + console.log('取消删除') + }) + }, back() { this.$parent.activeName = 'List' this.$parent.OUTSOURCED_ID = '' diff --git a/src/views/safetyenvironmental/archive/components/info.vue b/src/views/safetyenvironmental/archive/components/info.vue index 8bed751..172cb8c 100644 --- a/src/views/safetyenvironmental/archive/components/info.vue +++ b/src/views/safetyenvironmental/archive/components/info.vue @@ -75,9 +75,10 @@ {{ item.HIDDENDESCR }} 隐患部位 {{ item.HIDDENPART_NAME?item.HIDDENPART_NAME:item.HIDDENPART }} - + 查看 流程图 + 删除 @@ -308,6 +309,34 @@ export default { checkFlow(item) { this.$refs.flowChart.init(item) }, + goDelete(item) { + this.$confirm('确定要删除此隐患吗?', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + requestFN( + '/hiddenApi/deleteHiddenForSafetyenvironmental', + { + HIDDEN_ID: item.HIDDEN_ID, + tm: new Date().getTime() + } + ).then((res) => { + if (res.result === 'success') { + this.$message({ + message: '删除成功', + type: 'success' + }) + } else { + this.$message({ + message: res.codeMsg, + type: 'error' + }) + } + this.getData() + }).catch((e) => {}) + }).catch(() => {}) + }, goBack() { this.$parent.INSPECTION_ID = '' this.$parent.activeName = 'List' diff --git a/src/views/security_commitment/promise/components/list.vue b/src/views/security_commitment/promise/components/list.vue index 9e51cb6..626fa8e 100644 --- a/src/views/security_commitment/promise/components/list.vue +++ b/src/views/security_commitment/promise/components/list.vue @@ -45,7 +45,7 @@ 查看 启用 禁用 - 删除 + 删除 编辑 diff --git a/static/bi/index.html b/static/bi/index.html index e718d18..f4f6f37 100644 --- a/static/bi/index.html +++ b/static/bi/index.html @@ -13,6 +13,8 @@ + + @@ -140,32 +142,38 @@ 本年隐患
-
-
- 待处理 + +
+
+ 待处理 +
+
+ {{hdCount.yearUncheck}} +
-
- {{hdCount.yearUncheck}} + + +
+
+ 已处理 +
+
+ {{hdCount.yearChecked}} +
-
-
-
- 已处理 -
-
- {{hdCount.yearChecked}} -
-
-
-
- 隐患整改率 -
-
+ + +
+
+ 隐患整改率 +
+
{{hdCount.yearTotal==0?0:((hdCount.yearChecked/hdCount.yearTotal*100).toFixed(2))}} - % + % +
-
+
@@ -176,32 +184,38 @@ 本季隐患
-
-
- 待处理 + +
+
+ 待处理 +
+
+ {{hdCount.quarterUncheck}} +
-
- {{hdCount.quarterUncheck}} + + +
+
+ 已处理 +
+
+ {{hdCount.quarterChecked}} +
-
-
-
- 已处理 + + +
+
+ 隐患整改率 +
+
+ {{hdCount.quarterTotal==0?0:((hdCount.quarterChecked/hdCount.quarterTotal*100).toFixed(2))}} + % +
-
- {{hdCount.quarterChecked}} -
-
-
-
- 隐患整改率 -
-
- {{hdCount.quarterTotal==0?0:((hdCount.quarterChecked/hdCount.quarterTotal*100).toFixed(2))}} - % -
-
+
@@ -212,32 +226,38 @@ 本月隐患
-
-
- 待处理 + +
+
+ 待处理 +
+
+ {{hdCount.monthUncheck}} +
-
- {{hdCount.monthUncheck}} + + +
+
+ 已处理 +
+
+ {{hdCount.monthChecked}} +
-
-
-
- 已处理 + + +
+
+ 隐患整改率 +
+
+ {{hdCount.monthTotal==0?0:((hdCount.monthChecked/hdCount.monthTotal*100).toFixed(2))}} + % +
-
- {{hdCount.monthChecked}} -
-
-
-
- 隐患整改率 -
-
- {{hdCount.monthTotal==0?0:((hdCount.monthChecked/hdCount.monthTotal*100).toFixed(2))}} - % -
-
+
@@ -250,32 +270,38 @@ 本旬隐患
-
-
- 待处理 + +
+
+ 待处理 +
+
+ {{hdCount.xunUncheck}} +
-
- {{hdCount.xunUncheck}} + + +
+
+ 已处理 +
+
+ {{hdCount.xunChecked}} +
-
-
-
- 已处理 + + +
+
+ 隐患整改率 +
+
+ {{hdCount.xunTotal==0?0:((hdCount.xunChecked/hdCount.xunTotal*100).toFixed(2))}} + % +
-
- {{hdCount.xunChecked}} -
-
-
-
- 隐患整改率 -
-
- {{hdCount.xunTotal==0?0:((hdCount.xunChecked/hdCount.xunTotal*100).toFixed(2))}} - % -
-
+
@@ -286,32 +312,38 @@ 本周隐患
-
-
- 待处理 + +
+
+ 待处理 +
+
+ {{hdCount.weekUncheck}} +
-
- {{hdCount.weekUncheck}} + + +
+
+ 已处理 +
+
+ {{hdCount.weekChecked}} +
-
-
-
- 已处理 + + +
+
+ 隐患整改率 +
+
+ {{hdCount.weekTotal==0?0:((hdCount.weekChecked/hdCount.weekTotal*100).toFixed(2))}} + % +
-
- {{hdCount.weekChecked}} -
-
-
-
- 隐患整改率 -
-
- {{hdCount.weekTotal==0?0:((hdCount.weekChecked/hdCount.weekTotal*100).toFixed(2))}} - % -
-
+
@@ -322,32 +354,38 @@ 本日隐患
-
-
- 待处理 + +
+
+ 待处理 +
+
+ {{hdCount.dayUncheck}} +
-
- {{hdCount.dayUncheck}} + + +
+
+ 已处理 +
+
+ {{hdCount.dayChecked}} +
-
-
-
- 已处理 + + +
+
+ 隐患整改率 +
+
+ {{hdCount.dayTotal==0?0:((hdCount.dayChecked/hdCount.dayTotal*100).toFixed(2))}} + % +
-
- {{hdCount.dayChecked}} -
-
-
-
- 隐患整改率 -
-
- {{hdCount.dayTotal==0?0:((hdCount.dayChecked/hdCount.dayTotal*100).toFixed(2))}} - % -
-
+