From f573d9a3ae00c22fb382051aa4b648088b04db9a Mon Sep 17 00:00:00 2001 From: kongyeqing <2697454777@qq.com> Date: Thu, 14 Sep 2023 14:22:09 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E4=BF=AE=E5=A4=8D=E9=9A=90=E6=82=A3?= =?UTF-8?q?=E7=A7=AF=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/analEvaluation.component.vue | 9 +++ src/components/measure.component.vue | 11 +++ src/service/area.service.ts | 2 +- src/service/areaanal.service.ts | 43 ++++++++++ src/views/common.component.scss | 9 +++ src/views/hiddenDanger/files.component.vue | 64 ++++++++------- src/views/hiddenDanger/manager.component.vue | 8 +- .../rules/rulesManager.component.vue | 13 ++- .../hiddenDanger/safe/action.component.vue | 2 +- .../hiddenDanger/safe/plan.component.vue | 78 +++++++++++++----- .../hiddenDanger/safe/safe.component.html | 25 +++--- src/views/integral/center.component.vue | 1 + src/views/integral/common.component.html | 2 +- src/views/integral/event.component.vue | 10 ++- .../exchangeFlow/exchange.component.vue | 81 +++++++++++-------- src/views/integral/mall.component.vue | 7 +- src/views/risk/areaUnit.component.html | 2 +- .../areaAnal/areaAnal.component.vue | 4 +- .../assessment/device/device.component.vue | 19 +++-- .../device/deviceAnal.component.vue | 12 +-- .../risk/assessment/work/work.component.vue | 4 +- .../assessment/work/workAnal.component.html | 2 +- .../risk/identify/identify.component.vue | 3 + .../measuresReport.component.vue | 2 +- src/views/risk/unit/unit.component.vue | 18 +++++ src/views/threecards/riskCard.component.vue | 1 + src/views/threecards/safeCard.component.vue | 1 + src/views/workprogress/common.component.html | 2 +- src/views/workprogress/leader.component.vue | 2 +- .../managementSystem.component.vue | 2 +- 30 files changed, 307 insertions(+), 132 deletions(-) create mode 100644 src/service/areaanal.service.ts diff --git a/src/components/analEvaluation.component.vue b/src/components/analEvaluation.component.vue index 0ff30e4..a977371 100644 --- a/src/components/analEvaluation.component.vue +++ b/src/components/analEvaluation.component.vue @@ -284,6 +284,7 @@ export default class AnalEvaluationComponent extends Vue { datas: this.$store.state.prevention_serious_result, filterable: true, showError: false, + clearable:true, }, { name: "危害分析", @@ -304,6 +305,7 @@ export default class AnalEvaluationComponent extends Vue { datas: this.$store.state.prevention_security_identifier, filterable: true, showError: false, + clearable:true, }, { name: "设置复评时间", @@ -314,6 +316,11 @@ export default class AnalEvaluationComponent extends Vue { require: true, showError: false, format: "yyyy-MM-dd", + pickerOptions: { + disabledDate(time) { + return time.getTime() < moment(new Date()).add(1, 'month').subtract(1, 'day').toDate().getTime(); + } + } }, ]; } else { @@ -382,6 +389,7 @@ export default class AnalEvaluationComponent extends Vue { datas: this.$store.state.prevention_serious_result, filterable: true, showError: false, + clearable:true, }, { name: "危害分析", @@ -402,6 +410,7 @@ export default class AnalEvaluationComponent extends Vue { datas: this.$store.state.prevention_security_identifier, filterable: true, showError: false, + clearable:true, }, { name: "设置复评时间", diff --git a/src/components/measure.component.vue b/src/components/measure.component.vue index d67fa82..250c959 100644 --- a/src/components/measure.component.vue +++ b/src/components/measure.component.vue @@ -599,6 +599,17 @@ export default class MeasureComponent extends Vue { }) this.taskUpdataParams.taskItemName = map[data] } + //排查周期 + if (item && item.key === 'reviewCycleUnit') { + const option = this.taskUpdateOptions.find(item => item.key === "startTime") as any; + option.hide = data === 7 ? false : true; + const optionEnd = this.taskUpdateOptions.find(item => item.key === "endTime") as any; + optionEnd.hide = data === 7 ? false : true + if (data !== 7) { + this.taskUpdataParams.startTime = ''; + this.taskUpdataParams.endTime = '' + } + } //开始执行时间 if (item && item.key === 'executeStartTime') { const now = moment().format("YYYY-MM-DD HH:mm:ss"); diff --git a/src/service/area.service.ts b/src/service/area.service.ts index 3ed21b0..f112dd6 100644 --- a/src/service/area.service.ts +++ b/src/service/area.service.ts @@ -7,7 +7,7 @@ export default class AreaService extends BaseService{ } // 查询列表 public selectByPage(params: any):Promise>>{ - const url = this.prefix.prevention+'/risk/area/analList'; + const url = this.prefix.prevention+'/risk/area/list'; return this.get(url,params,true) } // 批量删除 diff --git a/src/service/areaanal.service.ts b/src/service/areaanal.service.ts new file mode 100644 index 0000000..6454ee2 --- /dev/null +++ b/src/service/areaanal.service.ts @@ -0,0 +1,43 @@ +import BaseService from "hbt-common/service/base.service" +import type { AxiosResponse } from 'axios' +import { ActionResult } from "hbt-common/models/actionResult"; +export default class AreaAnalService extends BaseService{ + constructor(){ + super() + } + // 查询列表 + public selectByPage(params: any):Promise>>{ + const url = this.prefix.prevention+'/risk/area/analList'; + return this.get(url,params,true) + } + // 批量删除 + public deleteByIds(params):Promise>>{ + const url = this.prefix.prevention+'/risk/area'; + return this.deleteBatch(url,params,{},true) + } + + public getAreaNumber():Promise>>{ + const url = this.prefix.prevention+'/risk/area/number'; + return this.get(url,null) + } + + public getQrCode(params){ + const url = this.prefix.file+'/qrCode/createQrCode'; + return this.post(url,params) + } + + // 新增或更新 + public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise>>{ + const url = this.prefix.prevention+'/risk/area'; + if(add){ + return this.post(url,params,{},showLoading) + }else{ + return this.put(url,params,{},showLoading) + } + } + + public getAnalControls():Promise>>{ + const url = this.prefix.prevention+'/risk/identifyinventory/getAnalControls'; + return this.get(url,null,false) + } +} \ No newline at end of file diff --git a/src/views/common.component.scss b/src/views/common.component.scss index 39b6de2..6561fb5 100644 --- a/src/views/common.component.scss +++ b/src/views/common.component.scss @@ -84,6 +84,15 @@ height: 39px; } + .el-dialog__headerbtn .el-dialog__close { + color: rgb(0 0 0 / 60%); + font-size: 28px; + } + + .el-dialog__headerbtn { + right: 34px; + } + .el-tree-node__content:hover, .el-upload-list__item:hover { background: #e4e8f1; diff --git a/src/views/hiddenDanger/files.component.vue b/src/views/hiddenDanger/files.component.vue index 89d0bf5..2a08fb9 100644 --- a/src/views/hiddenDanger/files.component.vue +++ b/src/views/hiddenDanger/files.component.vue @@ -145,34 +145,42 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent public getTableCallback() { - this.formOptions = [{ - name: "隐患等级", - key: "level", - type: "select", - datas: [{ - name: "一般隐患", - value: 1 + this.formOptions = [ + { + name: "隐患分类", + key: "classify", + type: "select", + datas: this.$store.state.prevention_dangrous_type }, { - name: "重大隐患", - value: 2 - }] - }, { - name: "隐患分类", - key: "classify", - type: "select", - datas: this.$store.state.prevention_dangrous_type - }, { - name: "整改方式", - key: "reformMode", - type: "select", - datas: [{ - name: "即查即改", - value: 1 + name: "隐患来源", + key: "source", + type: "select", + datas: this.$store.state.prevention_danger_resource }, { - name: "限期整改", - value: 2 - }] - }] + name: "隐患等级", + key: "level", + type: "select", + datas: [{ + name: "一般隐患", + value: 1 + }, { + name: "重大隐患", + value: 2 + }] + }, + // { + // name: "整改方式", + // key: "reformMode", + // type: "select", + // datas: [{ + // name: "即查即改", + // value: 1 + // }, { + // name: "限期整改", + // value: 2 + // }] + // } + ] this.updateOptions = [{ name: "隐患编号", @@ -630,7 +638,7 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent public callback(data, type?) { if (type) { - if (type === 'pageSize' || type === 'pageNum') { + if (type === 'pageSize' || type === 'pageNum') { this.params[type] = data; } this.getTableData(); @@ -697,7 +705,7 @@ export default class HiddenDangerFilesComponent extends BaseRecordComponent reformModeName: this.reformModeMap[row.reformMode], }, row); this.updateParams.majorHazard = +this.updateParams.majorHazard - this.updateParams.majorHazardName = !this.updateParams.majorHazard? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard] + this.updateParams.majorHazardName = !this.updateParams.majorHazard ? '不涉及' : this.$store.getters.prevention_risk_source_map[this.updateParams.majorHazard] this.getTableCallback() // 获取url if (row.resourceId) { diff --git a/src/views/hiddenDanger/manager.component.vue b/src/views/hiddenDanger/manager.component.vue index b74aeac..1c7c77d 100644 --- a/src/views/hiddenDanger/manager.component.vue +++ b/src/views/hiddenDanger/manager.component.vue @@ -266,7 +266,7 @@ export default class HiddenDangerManagerComponent extends BaseRecordComponent item.id).join(",") this.updateParams.verifyResourceName = this.photoList2.map(item => item.name).join(",") this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id).then(res => { - this.$message.success(!this.updateParams.id ? "新增成功" : "提交成功"); + this.$message.success(!this.updateParams.id ? (isSubmit ? "提交成功" : '保存草稿成功') : "提交成功"); if (!preStatus) { if (isSubmit) { this.startWorkFlow(this.updateParams.id || res.data, [this.updateParams.reformUserId]) diff --git a/src/views/hiddenDanger/rules/rulesManager.component.vue b/src/views/hiddenDanger/rules/rulesManager.component.vue index d8998e3..5c76de2 100644 --- a/src/views/hiddenDanger/rules/rulesManager.component.vue +++ b/src/views/hiddenDanger/rules/rulesManager.component.vue @@ -182,7 +182,8 @@ export default class RulesManagerComponent extends BaseRecordComponent { width: "calc(50% - 20px)", require: true, showError: false, - datas: this.areaList + datas: this.areaList, + clearable:true, }, { name: "适用单元", key: "units", @@ -191,7 +192,8 @@ export default class RulesManagerComponent extends BaseRecordComponent { width: "calc(50% - 20px)", require: true, showError: false, - datas: this.unitList + datas: this.unitList, + clearable:true, }, { name: "适用对象", key: "targets", @@ -201,6 +203,7 @@ export default class RulesManagerComponent extends BaseRecordComponent { require: true, showError: false, datas: this.$store.state.analControlList, + clearable:true, }, { name: "适用部门", key: "depts", @@ -209,7 +212,8 @@ export default class RulesManagerComponent extends BaseRecordComponent { width: "calc(50% - 20px)", require: true, showError: false, - datas: this.$store.state.deptList + datas: this.$store.state.deptList, + clearable:true, }, { name: "适用类型", key: "types", @@ -218,7 +222,8 @@ export default class RulesManagerComponent extends BaseRecordComponent { require: true, multiple: true, showError: false, - datas: this.$store.state.prevention_dangrous_type + datas: this.$store.state.prevention_dangrous_type, + clearable:true, }] this.updateActions = [{ name: "取消", diff --git a/src/views/hiddenDanger/safe/action.component.vue b/src/views/hiddenDanger/safe/action.component.vue index 9894d16..7de332a 100644 --- a/src/views/hiddenDanger/safe/action.component.vue +++ b/src/views/hiddenDanger/safe/action.component.vue @@ -192,7 +192,7 @@ export default class RulesManagerComponent extends BaseRecordComponent { key: "planName", type: "text", }, { - name: "检查项目", + name: "检查类型", key: "inspectType", type: "select", datas: this.$store.state.prevention_danger_check_type diff --git a/src/views/hiddenDanger/safe/plan.component.vue b/src/views/hiddenDanger/safe/plan.component.vue index 77564c0..0fe33fd 100644 --- a/src/views/hiddenDanger/safe/plan.component.vue +++ b/src/views/hiddenDanger/safe/plan.component.vue @@ -120,7 +120,7 @@ export default class PlanComponent extends BaseRecordComponent { type: "primary" }, { name: "保存并继续添加", - hide:false, + hide: false, value: "saveAndContinue", type: "primary" }]; @@ -239,7 +239,8 @@ export default class PlanComponent extends BaseRecordComponent { width: "calc(50% - 20px)", require: true, showError: false, - datas: this.areaList + datas: this.areaList, + clearable: true, }, { name: "检查单元", key: "unitIds", @@ -249,7 +250,8 @@ export default class PlanComponent extends BaseRecordComponent { require: true, multiple: true, showError: false, - datas: this.unitList + datas: this.unitList, + clearable: true, }, { name: "检查对象", key: "analControlIds", @@ -259,6 +261,7 @@ export default class PlanComponent extends BaseRecordComponent { require: true, multiple: true, showError: false, + clearable: true, datas: this.$store.state.analControlList, }, { name: "计划检查时间", @@ -270,6 +273,11 @@ export default class PlanComponent extends BaseRecordComponent { width: "calc(50% - 20px)", require: true, showError: false, + pickerOptions: { + disabledDate(time) { + return time.getTime() < moment(new Date()).subtract(1, 'day').toDate().getTime(); + } + } }, { name: "计划检查时间", key: "time", @@ -280,6 +288,11 @@ export default class PlanComponent extends BaseRecordComponent { width: "calc(50% - 20px)", require: true, showError: false, + pickerOptions: { + disabledDate(time) { + return time.getTime() < moment(new Date()).subtract(1, 'day').toDate().getTime(); + } + } }, { name: "检查负责人", key: "chargeUserId", @@ -321,6 +334,7 @@ export default class PlanComponent extends BaseRecordComponent { width: "600px", multiple: true, showError: false, + clearable: true, datas: res.data.datas.map(item => { return { name: item.name, @@ -389,7 +403,7 @@ export default class PlanComponent extends BaseRecordComponent { this.tableColumn.push({ name: '状态', filters: this.filters, filterMethod: (data, row) => { return row.state === data && row.planType == 2 - }, render: (data) => { + }, render: (data) => { return data.planType == 1 ? "--" : `${this.stateMap[data.state]}` } }); @@ -450,13 +464,29 @@ export default class PlanComponent extends BaseRecordComponent { this.updateParams.chargeUserName = this.$store.getters.user_map[data] } if (item && item.key === "inspectCycleValue") { - console.log(data) this.updateParams.inspectCycleValue = data; setTimeout(() => { this.updateParams.inspectCycleValue = Math.floor(data) }) } + + if (item && item.key === "startTime") { + const now = moment().format("YYYY-MM-DD HH:mm:ss") + if (data < now) { + this.$message.error("计划检查时间不能早于当前时间,请先修改数据"); + this.updateParams.startTime = null; + return + } + } if (item && item.key === "time") { + const now = moment().format("YYYY-MM-DD HH:mm:ss") + if (data[0] < now || data[1] < now) { + this.$message.error("计划检查时间不能早于当前时间,请先修改数据"); + this.updateParams.time = null + this.updateParams.startTime = null + this.updateParams.endTime = null + return + } if (data && data.length) { this.updateParams.startTime = data[0] this.updateParams.endTime = data[1] @@ -469,7 +499,7 @@ export default class PlanComponent extends BaseRecordComponent { public callback(data, type) { if (type) { - if (type === 'pageSize' || type === 'pageNum') { + if (type === 'pageSize' || type === 'pageNum') { this.params[type] = data; } this.getTableData(); @@ -491,8 +521,8 @@ export default class PlanComponent extends BaseRecordComponent { this.showUpdateModel() } else if (data && data.value === "delete") { this.deleteData(this.selectData.map((item: any) => item.id)) - } else if (data && data.value.indexOf("save")>=0 ) { - this.doSave(data.value==="save") + } else if (data && data.value.indexOf("save") >= 0) { + this.doSave(data.value === "save") } else if (data && data.value === "cancel") { this.handleClose() } @@ -562,7 +592,7 @@ export default class PlanComponent extends BaseRecordComponent { this.updateParams.startTime = row.startTime } } else { - this.updateParams = { planType: 1 , time :[]} as any; + this.updateParams = { planType: 1, time: [] } as any; } this.buildUpdateForm(); this.showUpdate = true @@ -570,7 +600,7 @@ export default class PlanComponent extends BaseRecordComponent { // 打开下发弹窗 public openSendModel(row) { - const now = moment().format("YYYY-MM-DD HH:mm") + const now = moment().format("YYYY-MM-DD HH:mm:ss") if (row.startTime < now) { this.$message.error("检查开始时间不能早于当前时间,请先修改数据"); return @@ -662,7 +692,7 @@ export default class PlanComponent extends BaseRecordComponent { name: this.$store.getters.prevention_anal_control_map[itm] } }) - const now = moment().format("YYYY-MM-DD HH:mm") + const now = moment().format("YYYY-MM-DD HH:mm:ss") if (this.updateParams.startTime < now) { this.$message.error("检查开始时间不能早于当前时间"); return @@ -679,14 +709,22 @@ export default class PlanComponent extends BaseRecordComponent { } public changeState(row) { - this.tableService.addOrUpdate({ - id: row.id, - state: +!row.state, - oldState: row.state - }, false).then(res => { - this.$message.success(row.state ? "停用成功" : "启用成功!") - this.getTableData(); + this.$confirm(`确认${row.state ? '停用' : '启用'}此安全检查计划`, "确认数据", { + type: 'warning' + }).then(() => { + this.tableService.addOrUpdate({ + id: row.id, + state: +!row.state, + oldState: row.state + }, false).then(res => { + this.$message.success(row.state ? "停用成功" : "启用成功!") + this.getTableData(); + }) + }).catch(() => { + // }) + + } @@ -695,8 +733,8 @@ export default class PlanComponent extends BaseRecordComponent { this.tableData.datas.forEach((item, index) => { if ((item.planType === 1 && !item.status) || (item.planType === 2 && !item.state)) { (this.$refs.multipleTable as any).toggleRowSelection(item); - - } + + } }) } public selectAll() { diff --git a/src/views/hiddenDanger/safe/safe.component.html b/src/views/hiddenDanger/safe/safe.component.html index 0ee350e..15361ad 100644 --- a/src/views/hiddenDanger/safe/safe.component.html +++ b/src/views/hiddenDanger/safe/safe.component.html @@ -11,8 +11,8 @@ - +
{{scope.$index+1}}
@@ -31,22 +31,24 @@ @@ -58,8 +60,8 @@ - +
隐患登记情况
-
+
添加 批量删除
@@ -171,8 +173,7 @@ - diff --git a/src/views/integral/center.component.vue b/src/views/integral/center.component.vue index e62f34b..b8283b6 100644 --- a/src/views/integral/center.component.vue +++ b/src/views/integral/center.component.vue @@ -158,6 +158,7 @@ export default class IntegralCenter extends BaseRecordComponent { pageNum: 1, pageSize: 20, } as any; + this.getTableData() } public handleClose() { diff --git a/src/views/integral/common.component.html b/src/views/integral/common.component.html index 909f423..b2d9bff 100644 --- a/src/views/integral/common.component.html +++ b/src/views/integral/common.component.html @@ -2,7 +2,7 @@
{ name: "时间", key: "createTime", type: "date", - format: 'yyyy-MM-dd' + subType: "datetimerange", + format: 'yyyy-MM-dd HH:mm:ss' }]; public subActions = [{ @@ -111,6 +112,7 @@ export default class IntegralEvent extends BaseRecordComponent { created() { + // } @@ -129,10 +131,12 @@ export default class IntegralEvent extends BaseRecordComponent { } public callback(data, type) { - if (type) { - if (type === 'pageSize' || type === 'pageNum') { + if (type === 'pageSize' || type === 'pageNum') { this.params[type] = data; + } else if (type.key === "createTime") { + this.params.startTime = data ? data[0] : null; + this.params.endTime = data ? data[1] : null; } this.getTableData(); return diff --git a/src/views/integral/exchange/exchangeFlow/exchange.component.vue b/src/views/integral/exchange/exchangeFlow/exchange.component.vue index 04ba39d..7ac98ca 100644 --- a/src/views/integral/exchange/exchangeFlow/exchange.component.vue +++ b/src/views/integral/exchange/exchangeFlow/exchange.component.vue @@ -206,7 +206,7 @@ export default class IntegralExchange extends BaseRecordComponent { key: "applyTime", require: true, width: "calc(50% - 20px)", - format: "yyyy-MM-dd", + format: "yyyy-MM-dd HH:mm:ss", disable: true, }, { @@ -276,7 +276,7 @@ export default class IntegralExchange extends BaseRecordComponent { require: true, width: "calc(50% - 20px)", disable: true, - format: 'yyyy-MM-dd', + format: 'yyyy-MM-dd HH:mm:ss', showError: false, }, ] @@ -302,7 +302,7 @@ export default class IntegralExchange extends BaseRecordComponent { width: "calc(50% - 20px)", disable: true, showError: false, - hide:this.subIsReadonly, + hide: this.subIsReadonly, }, { name: "单价/积分", type: "number", @@ -410,7 +410,7 @@ export default class IntegralExchange extends BaseRecordComponent { public callback(data, type) { if (type) { - if (type === 'pageSize' || type === 'pageNum') { + if (type === 'pageSize' || type === 'pageNum') { this.params[type] = data; } this.getTableData(); @@ -443,11 +443,10 @@ export default class IntegralExchange extends BaseRecordComponent { //判断是否有未完成的积分兑换流程 public getJudgeIsIntegral() { this.tableService.judgeIsIntegral().then((res: any) => { - if (res.data === true) { - + if (res.data === 1) { this.getUserIntegral() } else { - this.$message.error("您有未完成的积分兑换"); + this.$message.error(res.data === 2 ? "您有未完成的积分兑换" : '您的积分不足,无法进行兑换'); return } }) @@ -469,7 +468,7 @@ export default class IntegralExchange extends BaseRecordComponent { this.updateParams.originalPoints = datas.totalPoints ? datas.totalPoints : 0; this.updateParams.consumePoints = 0; this.updateParams.residuePoints = datas.totalPoints ? datas.totalPoints : 0; - this.updateParams.applyTime = moment().format('YYYY-MM-DD') + this.updateParams.applyTime = moment().format('YYYY-MM-DD HH:mm:ss') this.isReadonly = false; this.buildUpdateForm(); this.showUpdate = true; @@ -646,10 +645,12 @@ export default class IntegralExchange extends BaseRecordComponent { if (this.subUpdateParams.exchangeNumber > res.data.stockNumber) { this.$message.error("您的兑换数量不能超出库存"); this.subUpdateParams.exchangeNumber = null; + this.subUpdateParams.remainStock = null; } this.countStockAndIntegral(res.data.stockNumber, res.data.goodsPrice, this.subUpdateParams.exchangeNumber) + } else { + this.subUpdateParams.remainStock = null; } - this.buildSubUpdateForm() }) } @@ -669,7 +670,6 @@ export default class IntegralExchange extends BaseRecordComponent { //计算商品库存和积分 //总库存量,单价,数量 public countStockAndIntegral(totalNumber, price, number) { - let consumePoint = price * number; if (consumePoint > this.updateParams.residuePoints) { this.$message.error("您的兑换积分不足"); @@ -686,7 +686,6 @@ export default class IntegralExchange extends BaseRecordComponent { } public doSubSave(goOn) { - // 如果是新增步骤 if (this.subShowUpdate) { if (!this.subUpdateParams.exchangeNumber) { @@ -786,7 +785,7 @@ export default class IntegralExchange extends BaseRecordComponent { this.updateParams.approvalUserId = this.account.userId; this.updateParams.approvalUserName = this.account.nickName; - this.updateParams.approvalTime = moment().format('YYYY-MM-DD'); + this.updateParams.approvalTime = moment().format('YYYY-MM-DD HH:mm:ss'); this.buildApplyForm() } @@ -797,7 +796,6 @@ export default class IntegralExchange extends BaseRecordComponent { this.updateParams.approvalResultName = this.updateParams.approvalResult === 1 ? '同意' : '不同意' this.buildApplyForm() } - this.buildUpdateForm() this.showUpdate = true } @@ -822,34 +820,47 @@ export default class IntegralExchange extends BaseRecordComponent { if (!type) { this.tableService.getListDetail({ id: data.id }).then((res: any) => { if (res.code === 200) { - this.updateParams = res.data + this.updateParams = JSON.parse(JSON.stringify(res.data)) this.updateParams.approvalResultName = this.updateParams.approvalResult === 1 ? '同意' : '不同意' - this.updateParams.pointExchangeDetails.forEach((item, index) => { - item.index = index + 1 - if (data.status === 1) { + if (this.updateParams.pointExchangeDetails.length !== 0) { + this.updateParams.pointExchangeDetails.forEach((item, index) => { + item.index = index + 1 + }) + } + if (data.status === 1) { + this.operate = true; + this.isApplyReadonly = true; + this.isReadonly = true; + this.buildApplyForm() + } else if (data.status === 2) { + this.isReadonly = true; + if (this.updateParams.approvalResult || this.updateParams.approvalResult === 0) { this.operate = true; this.isApplyReadonly = true; - this.isReadonly = true; this.buildApplyForm() - } else if (data.status === 2) { - this.isReadonly = true; - if (this.updateParams.approvalResult || this.updateParams.approvalResult === 0) { - this.operate = true; - this.isApplyReadonly = true; - this.buildApplyForm() - } else { - this.operate = false; - this.isApplyReadonly = false; - } } else { - this.operate = true; - this.isApplyReadonly = true; - this.isReadonly = true; - this.buildApplyForm() + this.operate = false; + this.isApplyReadonly = false; } - this.showUpdate = true - this.buildUpdateForm() - }) + } else if (data.status === 4) { + this.operate = false; + this.isApplyReadonly = true; + this.isReadonly = true; + this.buildApplyForm() + } else { + // if (this.updateParams.approvalResult === null || this.updateParams.approvalResult === undefined) { + // this.operate = false; + // } else { + // this.operate = true; + // } + this.operate = true; + this.isApplyReadonly = true; + this.isReadonly = true; + this.buildApplyForm() + } + this.showUpdate = true + this.buildUpdateForm() + } }) } else { diff --git a/src/views/integral/mall.component.vue b/src/views/integral/mall.component.vue index 9b95a07..b976beb 100644 --- a/src/views/integral/mall.component.vue +++ b/src/views/integral/mall.component.vue @@ -119,6 +119,11 @@ export default class IntegralMall extends BaseRecordComponent { key: "stockNumber", require: true, width: "calc(50% - 20px)", + // rules: [ + // { pattern: /^1[3|5|7|8|9]\d{9}$/, message: '请输入正确的号码格式', } + // ], + max: 99999, + min: 1 }, { name: "单位", @@ -222,7 +227,7 @@ export default class IntegralMall extends BaseRecordComponent { public callback(data, type) { if (type) { - if (type === 'pageSize' || type === 'pageNum') { + if (type === 'pageSize' || type === 'pageNum') { this.params[type] = data; } this.getTableData(); diff --git a/src/views/risk/areaUnit.component.html b/src/views/risk/areaUnit.component.html index afab524..d9290cf 100644 --- a/src/views/risk/areaUnit.component.html +++ b/src/views/risk/areaUnit.component.html @@ -69,7 +69,7 @@ + @actionCallback="doTurnOffAction" :actions="turnOffAction" btn-position="center" @change="change">
\ No newline at end of file diff --git a/src/views/risk/assessment/areaAnal/areaAnal.component.vue b/src/views/risk/assessment/areaAnal/areaAnal.component.vue index 01e31d7..df28866 100644 --- a/src/views/risk/assessment/areaAnal/areaAnal.component.vue +++ b/src/views/risk/assessment/areaAnal/areaAnal.component.vue @@ -5,7 +5,7 @@ import template from "./areaAnal.component.html" import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue" import FormComponent from "hbt-common/components/common/form.component.vue" import TableComponent from "hbt-common/components/common/table.component.vue" -import AreaService from "@/service/area.service" +import AreaAnalService from "@/service/areaanal.service" import FormOption from "hbt-common/models/formOptions" import BtnOption from "hbt-common/models/btnOptions" import DrawComponent from '@/components/draw.component.vue'; @@ -23,7 +23,7 @@ import riskLevel from '@/mock/riskLevel' }, }) export default class AreaAnalComponent extends BaseRecordComponent { - public tableService = new AreaService(); + public tableService = new AreaAnalService(); public params = {} as any; diff --git a/src/views/risk/assessment/device/device.component.vue b/src/views/risk/assessment/device/device.component.vue index edf89a1..da13238 100644 --- a/src/views/risk/assessment/device/device.component.vue +++ b/src/views/risk/assessment/device/device.component.vue @@ -96,14 +96,16 @@ export default class DeviceManagerComponent extends BaseRecordComponent { value: "reverse" }]; public formOptions: FormOption[] = [{ - name: "区域名称", - key: "areaName", + name: "设备名称", + key: "name", type: "text", }, { - name: "单元名称", - key: "unitName", - type: "text", - }]; + name: "设备类别", + key: "type", + type: "select", + datas: this.$store.state.prevention_device_type, + clearable: true, + },]; public updateOptions: FormOption[] = [] as any; @@ -170,6 +172,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent { showError: false, type: "select", width: "100%", + clearable: true, datas: this.$store.state.postList }, { name: "安全因素", @@ -178,6 +181,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent { require: true, type: "select", multiple: true, + clearable: true, width: "calc(50% - 20px)", showError: false, datas: this.$store.state.prevention_safe_reason @@ -386,7 +390,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent { public callback(data, type) { if (type) { - if (type === 'pageSize' || type === 'pageNum') { + if (type === 'pageSize' || type === 'pageNum') { this.params[type] = data; } this.getTableData(); @@ -428,6 +432,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent { pageNum: 1, pageSize: 20, } as any; + this.getTableData() } // 分页数据 diff --git a/src/views/risk/assessment/device/deviceAnal.component.vue b/src/views/risk/assessment/device/deviceAnal.component.vue index 84f4502..69c85ff 100644 --- a/src/views/risk/assessment/device/deviceAnal.component.vue +++ b/src/views/risk/assessment/device/deviceAnal.component.vue @@ -126,13 +126,15 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent }]; public formOptions: FormOption[] = [{ - name: "区域名称", - key: "areaName", + name: "设备名称", + key: "name", type: "text", }, { - name: "单元名称", - key: "unitName", - type: "text", + name: "设备类别", + key: "type", + type: "select", + datas:this.$store.state.prevention_device_type, + clearable:true, },]; public showUpdate = false; diff --git a/src/views/risk/assessment/work/work.component.vue b/src/views/risk/assessment/work/work.component.vue index f5e4995..01847b6 100644 --- a/src/views/risk/assessment/work/work.component.vue +++ b/src/views/risk/assessment/work/work.component.vue @@ -222,6 +222,7 @@ export default class WorkManagerComponent extends BaseRecordComponent { multiple: true, width: "calc(50% - 20px)", require: true, + clearable:true, datas: this.$store.state.postList }, { name: "安全因素", @@ -229,6 +230,7 @@ export default class WorkManagerComponent extends BaseRecordComponent { format: "safetyFactorName", type: "select", multiple: true, + clearable:true, width: "calc(50% - 20px)", require: true, showError: false, @@ -689,8 +691,6 @@ export default class WorkManagerComponent extends BaseRecordComponent { opacity: 0.3; } - .end-step {} - .description { diff --git a/src/views/risk/assessment/work/workAnal.component.html b/src/views/risk/assessment/work/workAnal.component.html index ed63005..dedbaf3 100644 --- a/src/views/risk/assessment/work/workAnal.component.html +++ b/src/views/risk/assessment/work/workAnal.component.html @@ -5,7 +5,7 @@
{ require: true, multiple: true, width: "calc(50% - 20px)", + clearable:true, datas: this.$store.state.prevention_serious_result, }, { @@ -134,6 +135,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent { require: true, multiple: true, width: "calc(50% - 20px)", + clearable:true, datas: this.$store.state.prevention_security_identifier, }, { @@ -386,6 +388,7 @@ export default class IdentifyManagerComponent extends BaseRecordComponent { pageNum: 1, pageSize: 20, } as any; + this.getTableData() } // 分页数据 diff --git a/src/views/risk/measuresReport/measuresReport.component.vue b/src/views/risk/measuresReport/measuresReport.component.vue index d7d5c28..6e3dc86 100644 --- a/src/views/risk/measuresReport/measuresReport.component.vue +++ b/src/views/risk/measuresReport/measuresReport.component.vue @@ -158,7 +158,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent< } }); this.tableColumn.push({ - name: '来源', key: "type", render: (data) => { + name: '数据来源', key: "type", render: (data) => { return this.sourceType[data.type] } }); diff --git a/src/views/risk/unit/unit.component.vue b/src/views/risk/unit/unit.component.vue index 647d696..f6feb11 100644 --- a/src/views/risk/unit/unit.component.vue +++ b/src/views/risk/unit/unit.component.vue @@ -420,6 +420,8 @@ export default class UnitManagerComponent extends BaseRecordComponent { } public change(data, item) { + console.log('data'); + // 新增编辑选择部门 if (item && item.key === "chargeDeptId") { this.updateParams.chargeDeptName = this.$store.getters.dept_map[data]; @@ -433,6 +435,21 @@ export default class UnitManagerComponent extends BaseRecordComponent { this.updateParams.areaNo = this.areaNoMap[data]; this.getCreateNumber({ areaNo: this.updateParams.areaNo }) } + //停用开始时间 + if (item && item.key === 'startTime') { + if (this.turnOffParams.endTime) { + if (data > this.turnOffParams.endTime) { + this.turnOffParams.endTime = null + } + } + } + //停用结束时间 + if (item && item.key === 'endTime') { + if (data < this.turnOffParams.startTime) { + this.$message.warning('停用结束时间应大于停用开始时间'); + this.turnOffParams.endTime = null + } + } } public callback(data, type) { if (type) { @@ -481,6 +498,7 @@ export default class UnitManagerComponent extends BaseRecordComponent { pageNum: 1, pageSize: 20, } as any; + this.getTableData() } diff --git a/src/views/threecards/riskCard.component.vue b/src/views/threecards/riskCard.component.vue index 025bf66..cc22867 100644 --- a/src/views/threecards/riskCard.component.vue +++ b/src/views/threecards/riskCard.component.vue @@ -208,6 +208,7 @@ export default class RiskCard extends BaseRecordComponent { datas: this.$store.state.prevention_security_identifier, filterable: true, multiple: true, + clearable:true, }, { name: "风险管控措施", diff --git a/src/views/threecards/safeCard.component.vue b/src/views/threecards/safeCard.component.vue index b24ffb2..8bf6b8d 100644 --- a/src/views/threecards/safeCard.component.vue +++ b/src/views/threecards/safeCard.component.vue @@ -336,6 +336,7 @@ export default class SafeCard extends BaseRecordComponent { pageNum: 1, pageSize: 20, } as any; + this.getTableData() } public showUpdateModel(id) { diff --git a/src/views/workprogress/common.component.html b/src/views/workprogress/common.component.html index d156872..897686e 100644 --- a/src/views/workprogress/common.component.html +++ b/src/views/workprogress/common.component.html @@ -44,7 +44,7 @@ + :visible.sync="showUpdate" width="1000px" :before-close="handleClose" destroy-on-close> diff --git a/src/views/workprogress/leader.component.vue b/src/views/workprogress/leader.component.vue index a71a2dd..23b3a1c 100644 --- a/src/views/workprogress/leader.component.vue +++ b/src/views/workprogress/leader.component.vue @@ -323,7 +323,7 @@ export default class LeadershipStructure extends BaseRecordComponent { this.subTableColumn.push({ name: '姓名', key: "userName", }); this.subTableColumn.push({ name: '单位', key: "deptName", }); this.subTableColumn.push({ name: '职务', key: "duty", }); - this.subTableColumn.push({ name: '联系方式', key: "phone" }); + this.subTableColumn.push({ name: '联系方式', key: "phone",width:"130px" }); this.subTableColumn.push({ name: '职责描述', key: "description", width: "250px", showTip: true, }); } diff --git a/src/views/workprogress/managementSystem.component.vue b/src/views/workprogress/managementSystem.component.vue index ac65171..c6cb2c2 100644 --- a/src/views/workprogress/managementSystem.component.vue +++ b/src/views/workprogress/managementSystem.component.vue @@ -283,7 +283,7 @@ export default class ManagementSystem extends BaseRecordComponent { } }); this.tableColumn.push({ name: '编制人', key: "compileUserName" }); - this.tableColumn.push({ name: '编制时间', key: "compileTime" }); + this.tableColumn.push({ name: '编制时间', key: "compileTime",width:"110px" }); } public callback(data, type) {