forked from xxhjsb/hbt-prevention-ui
feat:定时任务,JHA,SCL bug修复
parent
b42a97172f
commit
1462d94ea8
|
|
@ -11,11 +11,11 @@
|
|||
<div class="sub-title">管控措施</div>
|
||||
<FormComponent labelWidth="110px" labelAlign="right" :data.sync="analysisUpdateParams"
|
||||
@actionCallback="measureCallback" :isReadonly="analyIsReadonly">
|
||||
<TableComponent :tableData="currentMeasureData.datas" :tableColumn="triTableColumn"
|
||||
<TableComponent :tableData="analysisUpdateParams.measures" :tableColumn="triTableColumn"
|
||||
@actionCallback="measureCallback($event)" :actions="analyIsReadonly ? [] : triTableActions"
|
||||
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
|
||||
<el-table ref="multipleTable" :data="currentMeasureData.datas" tooltip-effect="dark" height="250" border
|
||||
row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table ref="multipleTable" :data="analysisUpdateParams.measures" tooltip-effect="dark" height="500"
|
||||
border row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" label="全选" width="40">
|
||||
</el-table-column>
|
||||
<template v-for="item in triTableColumn">
|
||||
|
|
@ -30,12 +30,12 @@
|
|||
<el-table-column label="操作" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showMeasureModel(scope.row, true)">查看</el-button>
|
||||
<el-button type="text" @click="showMeasureModel(scope.row)">编辑</el-button>
|
||||
<el-button type="text" @click="deleteMeasure(scope.row)">删除</el-button>
|
||||
<el-button v-if="!analyIsReadonly" type="text"
|
||||
@click="showMeasureModel(scope.row)">编辑</el-button>
|
||||
<el-button v-if="!analyIsReadonly" type="text" @click="deleteMeasure(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</TableComponent>
|
||||
</FormComponent>
|
||||
<div class="sub-title">残余风险评估</div>
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;"
|
||||
:data.sync="methodUpdateParams">
|
||||
<el-table ref="singleTable" :data="riskTableData" tooltip-effect="dark" border row-key="checked"
|
||||
highlight-current-row @current-change="handleCurrentChange" style="width: 100%">
|
||||
@current-change="handleCurrentChange" style="width: 100%" highlight-current-row>
|
||||
<template v-for="item in riskTableColumn">
|
||||
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
|
||||
<div slot-scope="scope" style="pointer-events: none;" v-html="item.render(scope.row)"></div>
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
<el-dialog :close-on-click-modal="false" :title="'管控措施制定'" :visible.sync="subUpdate" width="750px"
|
||||
:before-close="handleMeasureClose">
|
||||
<MeasureComponent @actionCallback="dataCallback" :data.sync="measuresData" :show.sync="subUpdate"
|
||||
:tabledata.sync="currentMeasureData" :isReadonly="measureIsReadonly">
|
||||
:tabledata.sync="analysisUpdateParams" :isReadonly="measureIsReadonly">
|
||||
</MeasureComponent>
|
||||
</el-dialog>
|
||||
|
||||
|
|
@ -108,6 +108,7 @@ import ButtonListComponent from "hbt-common/components/common/buttonList.compone
|
|||
import { L_COLUMN, L_VALUE, S_COLUMN, S_VALUE } from '@/mock/lsRisk';
|
||||
import { L_LECCOLUMN, L_LECVALUE, E_COLUMN, E_VALUE, C_COLUMN, C_VALUE } from '@/mock/lecRisk';
|
||||
import MeasureComponent from '@/components/measure.component.vue'
|
||||
import moment from 'moment';
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
|
|
@ -128,12 +129,10 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
// datas: []
|
||||
// } as any;
|
||||
|
||||
public currentMeasureData = {
|
||||
datas: [],
|
||||
deleteIds: [],
|
||||
} as any;//实施措施
|
||||
|
||||
|
||||
public measuresData = {} as any;
|
||||
|
||||
public dictData = {
|
||||
riskControlLevel: [],
|
||||
identifier: [],
|
||||
|
|
@ -164,12 +163,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
|
||||
public selectedArrData = [];
|
||||
|
||||
//评估方法
|
||||
public checkRiskType = {
|
||||
risk: [],
|
||||
remain: [],
|
||||
type: null,
|
||||
} as any;
|
||||
|
||||
//评估方法
|
||||
public methodUpdateParams = {
|
||||
lslvalue: null,
|
||||
|
|
@ -190,8 +184,10 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
|
||||
@Prop()
|
||||
public isReadonly: boolean;
|
||||
|
||||
@Prop()
|
||||
public type: any;
|
||||
|
||||
@Watch("isReadonly", { immediate: true, deep: true })
|
||||
onCountValueChange() {
|
||||
this.analyIsReadonly = this.isReadonly
|
||||
|
|
@ -212,11 +208,12 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
})
|
||||
public updateParams: any;
|
||||
|
||||
|
||||
|
||||
@Prop()
|
||||
public areaList: any;
|
||||
|
||||
@Prop()
|
||||
//评估方法
|
||||
public checkRiskType = {} as any;
|
||||
|
||||
//基本信息
|
||||
public subBasicOptions: FormOption<BtnOption>[] = [];
|
||||
|
|
@ -579,22 +576,13 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
},];
|
||||
|
||||
created() {
|
||||
|
||||
|
||||
if (this.analysisUpdateParams.measures && this.analysisUpdateParams.measures.length > 0) {
|
||||
this.currentMeasureData.datas = this.analysisUpdateParams.measures
|
||||
this.currentMeasureData.datas.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
return item
|
||||
})
|
||||
}
|
||||
this.$store.state.prevention_measures_sort.map((item) => {
|
||||
this.measuresSelectData[item.value] = this.treeSelectData(item.children)
|
||||
})
|
||||
|
||||
this.subBasicForm()
|
||||
this.riskUpdateForm()
|
||||
this.remainUpdateForm()
|
||||
this.triTableColumn = []
|
||||
this.buildTable()
|
||||
}
|
||||
|
||||
|
|
@ -603,6 +591,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
this.showSubUpdate = false;
|
||||
this.analyIsReadonly = true;
|
||||
}
|
||||
|
||||
public callback(data) {
|
||||
//
|
||||
|
||||
|
|
@ -638,7 +627,9 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
this.triTableColumn.push({ name: '管控措施', key: "description" });
|
||||
this.triTableColumn.push({
|
||||
name: '排查任务', key: "tasksNum", render: (data) => {
|
||||
if (data.tasks && data.tasks.length > 0) {
|
||||
if (data.tasksNum) {
|
||||
return data.tasksNum
|
||||
} else if (data.tasks && data.tasks.length > 0) {
|
||||
return data.tasks.length
|
||||
}
|
||||
}
|
||||
|
|
@ -657,7 +648,6 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
}
|
||||
|
||||
public selectName(selectGroup, data) {
|
||||
|
||||
if (selectGroup && selectGroup.length > 0) {
|
||||
const map = {};
|
||||
selectGroup.forEach((item: any) => {
|
||||
|
|
@ -676,7 +666,9 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
if (data && data.value === "triSubAdd") {
|
||||
this.subUpdate = true;
|
||||
this.measureIsReadonly = false;
|
||||
this.measuresData = {};
|
||||
this.measuresData = {
|
||||
tasks: []
|
||||
};
|
||||
} else if (data && data.value === 'cancel') {
|
||||
this.visible = false;
|
||||
} else if (data && data.value.indexOf("save") >= 0) {
|
||||
|
|
@ -714,11 +706,35 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
this.methodUpdateParams = JSON.parse(this.analysisUpdateParams.riskLecValue)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let filterdata = this.checkRiskType.risk.filter(subItem => !data.includes(subItem))
|
||||
if (filterdata.includes('LS')) {
|
||||
this.riskType = 'ls'
|
||||
if (this.analysisUpdateParams.riskLsValue) {
|
||||
this.analysisUpdateParams.riskLsValue = null
|
||||
this.analysisUpdateParams.riskLsLevel = null
|
||||
}
|
||||
if (this.analysisUpdateParams.riskLecValue) {
|
||||
this.analysisUpdateParams.riskLevel = JSON.parse(this.analysisUpdateParams.riskLecValue).lecgrade
|
||||
}
|
||||
|
||||
} else if (filterdata.includes('LEC')) {
|
||||
this.riskType = 'lec'
|
||||
if (this.analysisUpdateParams.riskLecValue) {
|
||||
this.analysisUpdateParams.riskLecValue = null
|
||||
this.analysisUpdateParams.riskLecLevel = null
|
||||
}
|
||||
|
||||
if (this.analysisUpdateParams.riskLsValue) {
|
||||
this.analysisUpdateParams.riskLevel = JSON.parse(this.analysisUpdateParams.riskLsValue).lsgrade
|
||||
}
|
||||
}
|
||||
this.compareRiskLevel()
|
||||
|
||||
}
|
||||
this.checkRiskType.risk = data
|
||||
this.checkRiskType.type = 'risk'
|
||||
this.analysisUpdateParams.riskLevel = null
|
||||
this.compareRiskLevel()
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -740,29 +756,72 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
this.methodUpdateParams = JSON.parse(this.analysisUpdateParams.remainLecValue)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let filterdata = this.checkRiskType.remain.filter(subItem => !data.includes(subItem))
|
||||
if (filterdata.includes('LS')) {
|
||||
this.riskType = 'ls'
|
||||
if (this.analysisUpdateParams.remainLsValue) {
|
||||
this.analysisUpdateParams.remainLsValue = null
|
||||
this.analysisUpdateParams.remainLsLevel = null
|
||||
}
|
||||
if (this.analysisUpdateParams.remainLecValue) {
|
||||
this.analysisUpdateParams.remainLevel = JSON.parse(this.analysisUpdateParams.remainLecValue).lecgrade
|
||||
}
|
||||
|
||||
} else if (filterdata.includes('LEC')) {
|
||||
this.riskType = 'lec'
|
||||
if (this.analysisUpdateParams.riskLecValue) {
|
||||
this.analysisUpdateParams.riskLecValue = null
|
||||
this.analysisUpdateParams.riskLecLevel = null
|
||||
}
|
||||
|
||||
if (this.analysisUpdateParams.remainLsValue) {
|
||||
this.analysisUpdateParams.remainLevel = JSON.parse(this.analysisUpdateParams.remainLsValue).lsgrade
|
||||
}
|
||||
}
|
||||
this.compareRiskLevel()
|
||||
}
|
||||
this.checkRiskType.remain = data
|
||||
this.checkRiskType.type = 'subRisk'
|
||||
this.analysisUpdateParams.remainLevel = null
|
||||
this.compareRiskLevel()
|
||||
}
|
||||
|
||||
//评估方法 -- 风险等级确定
|
||||
public compareRiskLevel() {
|
||||
const riskChoose = this.analysisUpdateParams.riskChoose
|
||||
const remainChoose = this.analysisUpdateParams.remainChoose
|
||||
const tmpUpdateParams = JSON.parse(JSON.stringify(this.analysisUpdateParams))
|
||||
const riskChoose = tmpUpdateParams.riskChoose
|
||||
const remainChoose = tmpUpdateParams.remainChoose
|
||||
if (riskChoose.length === 0) {
|
||||
this.analysisUpdateParams.riskLevel = null
|
||||
} else {
|
||||
if (riskChoose.includes('LS')) {
|
||||
this.analysisUpdateParams.riskLevel = this.analysisUpdateParams.riskLevel > this.analysisUpdateParams.riskLsLevel ? this.analysisUpdateParams.riskLevel : this.analysisUpdateParams.riskLsLevel
|
||||
if (tmpUpdateParams.riskLsLevel) {
|
||||
this.analysisUpdateParams.riskLevel = tmpUpdateParams.riskLevel > tmpUpdateParams.riskLsLevel ? tmpUpdateParams.riskLevel : tmpUpdateParams.riskLsLevel
|
||||
}
|
||||
|
||||
}
|
||||
if (riskChoose.includes('LEC')) {
|
||||
this.analysisUpdateParams.riskLevel = this.analysisUpdateParams.riskLevel > this.analysisUpdateParams.riskLecLevel ? this.analysisUpdateParams.riskLevel : this.analysisUpdateParams.riskLecLevel
|
||||
if (tmpUpdateParams.riskLecLevel) {
|
||||
this.analysisUpdateParams.riskLevel = tmpUpdateParams.riskLevel > tmpUpdateParams.riskLecLevel ? tmpUpdateParams.riskLevel : tmpUpdateParams.riskLecLevel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (remainChoose.length === 0) {
|
||||
this.analysisUpdateParams.remainLevel = null
|
||||
} else {
|
||||
if (remainChoose.includes('LS')) {
|
||||
this.analysisUpdateParams.remainLevel = this.analysisUpdateParams.remainLevel > this.analysisUpdateParams.remainLsLevel ? this.analysisUpdateParams.remainLevel : this.analysisUpdateParams.remainLsLevel
|
||||
if (tmpUpdateParams.remainLsLevel) {
|
||||
this.analysisUpdateParams.remainLevel = tmpUpdateParams.remainLevel > tmpUpdateParams.remainLsLevel ? tmpUpdateParams.remainLevel : tmpUpdateParams.remainLsLevel
|
||||
}
|
||||
|
||||
}
|
||||
if (remainChoose.includes('LEC')) {
|
||||
this.analysisUpdateParams.remainLevel = this.analysisUpdateParams.remainLevel > this.analysisUpdateParams.remainLecLevel ? this.analysisUpdateParams.remainLevel : this.analysisUpdateParams.remainLecLevel
|
||||
if (tmpUpdateParams.remainLecLevel) {
|
||||
this.analysisUpdateParams.remainLevel = tmpUpdateParams.remainLevel > tmpUpdateParams.remainLecLevel ? tmpUpdateParams.remainLevel : tmpUpdateParams.remainLecLevel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.riskUpdateForm()
|
||||
this.remainUpdateForm()
|
||||
}
|
||||
|
|
@ -781,22 +840,34 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
this.measuresData.secondTypeName = this.selectName(secondTypeItem, row.secondType)
|
||||
} else if (!isReadonly) {
|
||||
this.measureIsReadonly = false
|
||||
this.measuresData = row
|
||||
this.measuresData = Object.assign({ tasks: [] }, row)
|
||||
this.measuresData.tasks.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
return item
|
||||
})
|
||||
}
|
||||
this.subUpdate = true
|
||||
}
|
||||
//删除
|
||||
public deleteMeasure(row) {
|
||||
this.currentMeasureData.datas.splice(this.currentMeasureData.datas.findIndex(item => item.index === this.analysisUpdateParams.index), 1)
|
||||
this.$confirm('确认删除所选数据', '确认数据', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.analysisUpdateParams.measures.splice(this.analysisUpdateParams.measures.findIndex(item => item.index === row.index), 1)
|
||||
if (row.id) {
|
||||
if (!this.currentMeasureData.deleteIds) {
|
||||
this.currentMeasureData.deleteIds = []
|
||||
if (!this.analysisUpdateParams.deleteIds) {
|
||||
this.analysisUpdateParams.deleteIds = []
|
||||
}
|
||||
this.currentMeasureData.deleteIds.push(row.id)
|
||||
this.analysisUpdateParams.deleteIds.push(row.id)
|
||||
}
|
||||
this.currentMeasureData.datas.forEach((item, i) => {
|
||||
this.analysisUpdateParams.datas.forEach((item, i) => {
|
||||
item.index = i + 1
|
||||
})
|
||||
}).catch(() => {
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
//评估方法 -- btn
|
||||
|
|
@ -813,6 +884,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
|
||||
} as any;//评估方法
|
||||
this.showRiskUpdate = false
|
||||
|
||||
if (this.riskType === 'ls') {
|
||||
if (this.checkRiskType.type === 'subRisk') {
|
||||
this.analysisUpdateParams.remainChoose.splice(this.analysisUpdateParams.remainChoose.findIndex(item => item === 'LS'), 1)
|
||||
|
|
@ -826,6 +898,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
this.analysisUpdateParams.riskChoose.splice(this.analysisUpdateParams.riskChoose.findIndex(item => item === 'LEC'), 1)
|
||||
}
|
||||
}
|
||||
|
||||
this.compareRiskLevel()
|
||||
} else if (data.value === 'lslvalue') {
|
||||
this.showRiskValueModal = 'lslvalue'
|
||||
|
|
@ -937,9 +1010,18 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
// this.isModifyonly = false;
|
||||
}
|
||||
|
||||
public handleChange(data) {
|
||||
public handleChange(data, item) {
|
||||
this.subBasicForm()
|
||||
if (item.key === "reviewStartTime") {
|
||||
let diff = moment(data).diff(moment().subtract(1, 'day'), "months")
|
||||
if (diff < 1) {
|
||||
this.$message.error("请选择 " + moment().add(1, 'month').format('YYYY-MM-DD') + ' 之后的日期');
|
||||
this.analysisUpdateParams.reviewStartTime = null
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 单选评估值
|
||||
public handleCurrentChange(data) {
|
||||
|
|
@ -988,12 +1070,16 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
} else if (data.value === "save") {
|
||||
|
||||
const tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams))
|
||||
this.analysisUpdateParams.measures = this.currentMeasureData.datas
|
||||
this.analysisUpdateParams.measuresNum = this.currentMeasureData.datas.length
|
||||
// this.analysisUpdateParams.measures = this.currentMeasureData.datas
|
||||
this.analysisUpdateParams.measuresNum = this.analysisUpdateParams.measures.length
|
||||
this.analysisUpdateParams.seriousResult = this.analysisUpdateParams.seriousResult.join(";")
|
||||
this.analysisUpdateParams.safetySign = this.analysisUpdateParams.safetySign.join(";")
|
||||
this.analysisUpdateParams.riskChoose = this.analysisUpdateParams.riskChoose.join(";")
|
||||
this.analysisUpdateParams.remainChoose = this.analysisUpdateParams.remainChoose.join(";")
|
||||
let diff = moment(this.analysisUpdateParams.reviewStartTime).diff(moment().subtract(1, 'day'), "months")
|
||||
if (diff > 0) {
|
||||
this.analysisUpdateParams.status = 2
|
||||
}
|
||||
if (this.analysisUpdateParams.riskChoose.indexOf('LS') === -1) {
|
||||
this.analysisUpdateParams.riskLsValue = null
|
||||
}
|
||||
|
|
@ -1042,3 +1128,30 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
|
||||
</script>
|
||||
<style lang="scss" scoped src="../views/common.component.scss"></style>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep {
|
||||
.el-table__body {
|
||||
tr {
|
||||
&.current-row {
|
||||
&>td {
|
||||
background-color: #68C23A !important;
|
||||
color: #fff;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.el-table--enable-row-hover {
|
||||
.el-table__body {
|
||||
tr {
|
||||
&:hover {
|
||||
&>td {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
<TableComponent :tableData="updataParams.tasks" :tableColumn="tableColumn" @actionCallback="taskAdd($event)"
|
||||
:actions="!isReadonly ? tableActions : []" actionPosition="flex-start" :showFooter="false"
|
||||
style="margin-bottom: 20px;">
|
||||
<el-table ref="multipleTable" :data="updataParams.tasks" tooltip-effect="dark" height="250" border
|
||||
<el-table ref="multipleTable" :data="updataParams.tasks" tooltip-effect="dark" height="500" border
|
||||
row-key="checked" @selection-change="handleSelectionChange" style="width: 100%">
|
||||
<template v-for="item in tableColumn">
|
||||
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
|
||||
|
|
@ -22,8 +22,8 @@
|
|||
<el-table-column label="操作" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showTaskModel(scope.row, true)">查看</el-button>
|
||||
<el-button :v-if="!isReadonly" type="text" @click="showTaskModel(scope.row)">编辑</el-button>
|
||||
<el-button :v-if="!isReadonly" type="text" @click="deleteTask(scope.row)">删除</el-button>
|
||||
<el-button v-if="!isReadonly" type="text" @click="showTaskModel(scope.row)">编辑</el-button>
|
||||
<el-button v-if="!isReadonly" type="text" @click="deleteTask(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -193,7 +193,7 @@ export default class MeasureComponent extends Vue {
|
|||
key: "taskItem",
|
||||
format: "taskItemName",
|
||||
type: "treeSelect",
|
||||
width: "calc(50% - 20px)",
|
||||
width: "100%",
|
||||
require: true,
|
||||
expandLevel: Infinity,
|
||||
showError: false,
|
||||
|
|
@ -223,9 +223,9 @@ export default class MeasureComponent extends Vue {
|
|||
require: true,
|
||||
datas: this.$store.state.userList,
|
||||
}, {
|
||||
name: "排查周期",
|
||||
name: "排查周期 每隔",
|
||||
key: "reviewCycleValue",
|
||||
type: "text",
|
||||
type: "number",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
}, {
|
||||
|
|
@ -233,7 +233,14 @@ export default class MeasureComponent extends Vue {
|
|||
type: "select",
|
||||
require: true,
|
||||
format: 'reviewCycleValueName',
|
||||
datas: this.$store.state.prevention_cycle_unit
|
||||
datas: this.$store.state.prevention_cycle_unit,
|
||||
width: "calc(30% - 20px)",
|
||||
}, {
|
||||
name: "1次",
|
||||
key: "times",
|
||||
type: 'null',
|
||||
width: "30px",
|
||||
labelWidth: "10px"
|
||||
}, {
|
||||
name: "工作开始时间",
|
||||
key: "startTime",
|
||||
|
|
@ -272,21 +279,19 @@ export default class MeasureComponent extends Vue {
|
|||
|
||||
@Prop()
|
||||
public isReadonly: boolean;
|
||||
|
||||
@PropSync("show", {
|
||||
required: true,
|
||||
default: true
|
||||
})
|
||||
public visible: boolean;
|
||||
|
||||
@PropSync("data", {
|
||||
required: true,
|
||||
})
|
||||
public updataParams!: any;
|
||||
@PropSync("tabledata", {
|
||||
required: true,
|
||||
})
|
||||
public measureData!: any;
|
||||
|
||||
created() {
|
||||
@Watch("data", { immediate: true, deep: true })
|
||||
onParamsValueChange() {
|
||||
this.dictData.measuresSort = this.$store.state.prevention_measures_sort.map((item) => {
|
||||
this.measuresSelectData[item.value] = this.treeSelectData(item.children)
|
||||
return {
|
||||
|
|
@ -295,14 +300,23 @@ export default class MeasureComponent extends Vue {
|
|||
}
|
||||
})
|
||||
this.secondTypeItem = this.measuresSelectData[this.updataParams.firstType]
|
||||
if (this.updataParams.tasks && this.updataParams.tasks.length > 0) {
|
||||
this.updataParams.tasks.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
return item
|
||||
})
|
||||
}
|
||||
// if (this.updataParams.tasks && this.updataParams.tasks.length > 0) {
|
||||
// this.updataParams.tasks.forEach((item, index) => {
|
||||
// item.index = index + 1
|
||||
// return item
|
||||
// })
|
||||
// }
|
||||
this.measuresUpdateForm()
|
||||
this.taskUpdateForm()
|
||||
}
|
||||
|
||||
@PropSync("tabledata", {
|
||||
required: true,
|
||||
})
|
||||
public measureData!: any;
|
||||
|
||||
created() {
|
||||
|
||||
this.buildTable()
|
||||
}
|
||||
|
||||
|
|
@ -451,6 +465,11 @@ export default class MeasureComponent extends Vue {
|
|||
}
|
||||
|
||||
public deleteTask(row) {
|
||||
this.$confirm('确认删除所选数据', '确认数据', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.updataParams.tasks.splice(this.updataParams.tasks.findIndex(item => item.index === row.index), 1)
|
||||
if (row.id) {
|
||||
if (!this.updataParams.deleteIds) {
|
||||
|
|
@ -461,6 +480,9 @@ export default class MeasureComponent extends Vue {
|
|||
this.updataParams.tasks.forEach((item, i) => {
|
||||
item.index = i + 1
|
||||
})
|
||||
}).catch(() => {
|
||||
//
|
||||
});
|
||||
}
|
||||
|
||||
//排查任务 -- 下拉选择
|
||||
|
|
@ -525,19 +547,14 @@ export default class MeasureComponent extends Vue {
|
|||
this.updataParams.tasks = []
|
||||
}
|
||||
if (!this.updataParams.index) {
|
||||
this.updataParams.index = this.currentMeasureData.datas.length + 1;
|
||||
this.updataParams.index = this.measureData.measures.length + 1;
|
||||
this.updataParams.tasksNum = this.updataParams.tasks.length
|
||||
this.currentMeasureData.datas.push(this.updataParams);
|
||||
this.measureData.measures.push(this.updataParams);
|
||||
} else {
|
||||
this.updataParams.tasksNum = this.updataParams.tasks.length
|
||||
this.currentMeasureData.datas.splice(this.currentMeasureData.datas.findIndex(item => item.index === this.updataParams.index), 1, this.updataParams)
|
||||
this.measureData.measures.splice(this.measureData.measures.findIndex(item => item.index === this.updataParams.index), 1, this.updataParams)
|
||||
}
|
||||
|
||||
this.currentMeasureData.datas.forEach((item, i) => {
|
||||
item.index = i + 1
|
||||
})
|
||||
this.updataParams = {} as any;
|
||||
this.measureData = this.currentMeasureData;
|
||||
this.visible = !!goOn;
|
||||
}
|
||||
//分析法
|
||||
|
|
@ -549,3 +566,8 @@ export default class MeasureComponent extends Vue {
|
|||
}
|
||||
</script>
|
||||
<style lang="scss" scoped src="../views/common.component.scss"></style>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .vue-treeselect__label {
|
||||
white-space: break-spaces;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -36,4 +36,10 @@ export default class DeviceService extends BaseService<any>{
|
|||
const url = this.prefix.prevention+'/device/anal/addDraft';
|
||||
return this.post(url,params,{},showLoading)
|
||||
}
|
||||
|
||||
//查询设备
|
||||
public selectDeviceByUnit(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/device/inventory/filter/list';
|
||||
return this.post(url,params,{},true)
|
||||
}
|
||||
}
|
||||
|
|
@ -6,11 +6,22 @@ export default class DutyService extends BaseService<any>{
|
|||
super()
|
||||
}
|
||||
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.system+'/user/list';
|
||||
const url = this.prefix.prevention+'/risk/task/list';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
public deleteByIds(params):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.system+'/user/list';
|
||||
return this.deleteBatch(url,params,{},true)
|
||||
}
|
||||
|
||||
// 更新
|
||||
public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/risk/task';
|
||||
return this.put(url,params,{},showLoading)
|
||||
}
|
||||
|
||||
public getFileUrls(params):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.file+'/getSysFiles';
|
||||
return this.get(url,params,false)
|
||||
}
|
||||
}
|
||||
|
|
@ -38,4 +38,10 @@ export default class JobHazardService extends BaseService<any>{
|
|||
const url = this.prefix.prevention+'/job/anal/addDraft';
|
||||
return this.post(url,params,{},showLoading)
|
||||
}
|
||||
|
||||
//查询作业活动
|
||||
public selectWorkByUnit(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/job/inventory/filter/list';
|
||||
return this.post(url,params,{},true)
|
||||
}
|
||||
}
|
||||
|
|
@ -18,4 +18,10 @@ export default class MeasuresReportService extends BaseService<any>{
|
|||
const url = this.prefix.prevention+'/risk/task/list';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
|
||||
// 更新
|
||||
public addOrUpdate(params: any,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/risk/control/batch';
|
||||
return this.put(url,params,{},showLoading)
|
||||
}
|
||||
}
|
||||
|
|
@ -29,7 +29,9 @@ export default new Vuex.Store({
|
|||
prevention_measure_type:[],
|
||||
prevention_measures_sort:[],
|
||||
prevention_task_type:[],
|
||||
prevention_evaluate_status:[]
|
||||
prevention_evaluate_status:[],
|
||||
prevention_task_status:[],
|
||||
prevention_hazard_category:[]
|
||||
},
|
||||
getters: {
|
||||
dept_map:(state)=>{
|
||||
|
|
@ -200,7 +202,20 @@ export default new Vuex.Store({
|
|||
})
|
||||
return map
|
||||
},
|
||||
|
||||
prevention_task_status_map:(state)=>{
|
||||
const map = {};
|
||||
state.prevention_task_status.forEach((item:any)=>{
|
||||
map[item.value] = item.name
|
||||
})
|
||||
return map
|
||||
},
|
||||
prevention_hazard_category_map:(state)=>{
|
||||
const map = {};
|
||||
state.prevention_hazard_category.forEach((item:any)=>{
|
||||
map[item.value] = item.name
|
||||
})
|
||||
return map
|
||||
},
|
||||
},
|
||||
mutations: {
|
||||
setAnalCntrol(state,data){
|
||||
|
|
@ -279,6 +294,12 @@ export default new Vuex.Store({
|
|||
set_prevention_evaluate_status(state,data){
|
||||
state.prevention_evaluate_status = data
|
||||
},
|
||||
set_prevention_task_status(state,data){
|
||||
state.prevention_task_status = data
|
||||
},
|
||||
set_prevention_hazard_category(state,data){
|
||||
state.prevention_hazard_category = data
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
},
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ export default class BlankComponent extends Vue {
|
|||
this.systemService.getDictData("prevention_task_type"),
|
||||
this.systemService.getDictData("prevention_evaluate_status"),
|
||||
this.areaService.getAnalControls(),
|
||||
this.systemService.getDictData("prevention_task_status"),
|
||||
this.systemService.getDictData("prevention_hazard_category"),
|
||||
]).then(((results: any) => {
|
||||
this.$store.commit("setDeptTreeList", results[0].data);
|
||||
this.$store.commit("setUserList", results[2].data.datas.map((item) => {
|
||||
|
|
@ -185,7 +187,24 @@ export default class BlankComponent extends Vue {
|
|||
value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue,
|
||||
}
|
||||
}))
|
||||
this.$store.commit("setAnalCntrol",results[24].data)
|
||||
this.$store.commit("setAnalCntrol", results[24].data)
|
||||
|
||||
|
||||
this.$store.commit("set_prevention_task_status", results[25].data.map(item => {
|
||||
return {
|
||||
name: item.dictLabel,
|
||||
value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue,
|
||||
}
|
||||
}))
|
||||
console.log('results[26]',results[26]);
|
||||
|
||||
this.$store.commit("set_prevention_hazard_category", results[26].data.map(item => {
|
||||
return {
|
||||
name: item.dictLabel,
|
||||
value: isNaN(+item.dictValue) ? item.dictValue : +item.dictValue,
|
||||
}
|
||||
}))
|
||||
|
||||
|
||||
this.$store.commit("setDeptList", results[1].data.map((item) => {
|
||||
return {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
:label="item.name" :width="item.width" :key="item.key">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" width="100" v-if="!isReadonly">
|
||||
<el-table-column label="操作" width="200" v-if="!isReadonly">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showSubmodal(scope.row,true)">查看</el-button>
|
||||
<el-button type="text" @click="showSubmodal(scope.row)">修改</el-button>
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import UnitTreeComponent from '@/components/tree.component.vue';
|
|||
import DeviceService from '@/service/device.service';
|
||||
import UnitService from '@/service/unit.service';
|
||||
import AreaService from '@/service/area.service';
|
||||
import moment from "moment";
|
||||
|
||||
@Component({
|
||||
template,
|
||||
|
|
@ -43,12 +44,27 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
public subTableColumn = [] as any;
|
||||
//检查项目
|
||||
public showProject = false;
|
||||
|
||||
public account = JSON.parse(localStorage.getItem("account") as any);
|
||||
|
||||
public updateProParams = {} as any;
|
||||
public proIsReadonly = false;
|
||||
public showProtable = false;
|
||||
public currentProTableData = {
|
||||
datas: []
|
||||
} as any;
|
||||
|
||||
|
||||
public showUpdate = false;
|
||||
|
||||
public updateParams = {
|
||||
items: [],
|
||||
identifyUserId: this.account.userId,
|
||||
identifyTime: moment().format('YYYY-MM-DD'),
|
||||
} as any;
|
||||
|
||||
public selectData = [];
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
|
@ -88,18 +104,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
key: "unitName",
|
||||
type: "text",
|
||||
}];
|
||||
public updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
|
||||
|
||||
public updateOptions: FormOption<BtnOption>[] = [] as any;
|
||||
public buildUpdateForm() {
|
||||
|
|
@ -196,6 +201,23 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
]
|
||||
}
|
||||
|
||||
public updateActions = [] as any;
|
||||
public buildActionsForm(){
|
||||
this.updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary",
|
||||
hide:this.updateParams.id
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
}
|
||||
|
||||
public projectOptions: FormOption<BtnOption>[] = [
|
||||
{
|
||||
name: "检查项目",
|
||||
|
|
@ -214,11 +236,6 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
];
|
||||
|
||||
|
||||
public showUpdate = false;
|
||||
public updateParams = {
|
||||
items: [],
|
||||
} as any;
|
||||
public selectData = [];
|
||||
|
||||
@Watch("$store.state.deptList", { immediate: true, deep: true })
|
||||
onChanges() {
|
||||
|
|
@ -248,7 +265,11 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
this.unitList = res.data.datas.map(item => {
|
||||
return {
|
||||
name: item.name,
|
||||
value: item.id
|
||||
value: item.id,
|
||||
deptId: item.chargeDeptId,
|
||||
userId: item.chargeUserId,
|
||||
deptName: item.chargeDeptName,
|
||||
userName: item.chargeUserName,
|
||||
}
|
||||
});
|
||||
this.buildUpdateForm()
|
||||
|
|
@ -262,7 +283,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
if (data.areaId) {
|
||||
this.params.unitName = data.name
|
||||
} else {
|
||||
this.params.areaName = data.name==="全部"?"":data.name
|
||||
this.params.areaName = data.name === "全部" ? "" : data.name
|
||||
}
|
||||
this.getTableData()
|
||||
}
|
||||
|
|
@ -309,6 +330,15 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
|
||||
public changes(data, item) {
|
||||
//单元
|
||||
if (item && item.key === 'unitId') {
|
||||
const unitData = this.unitList.find((itm: any) => itm.value === data) as any;
|
||||
this.updateParams.chargeDeptName = unitData.deptName;
|
||||
this.updateParams.chargeUserId = unitData.userId;
|
||||
this.updateParams.chargeUserName = unitData.userName;
|
||||
this.updateParams.chargeDeptId = unitData.deptId;
|
||||
}
|
||||
|
||||
// 部门
|
||||
if (item && item.key === "chargeDeptId") {
|
||||
this.updateParams.chargeDeptName = this.$store.getters.dept_map[data];
|
||||
|
|
@ -348,7 +378,11 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
} else if (data.value === "add") {
|
||||
this.isReadonly = false;
|
||||
this.currentId = -1;
|
||||
this.updateParams = { items: [], } as any;
|
||||
this.updateParams = {
|
||||
items: [], identifyUserId: this.account.userId,
|
||||
identifyTime: moment().format('YYYY-MM-DD'),
|
||||
} as any;
|
||||
this.buildActionsForm()
|
||||
this.showUpdate = true
|
||||
} else if (data && data.value.indexOf("save") >= 0) {
|
||||
this.doSave(data.value !== "save")
|
||||
|
|
@ -388,6 +422,7 @@ export default class DeviceManagerComponent extends BaseRecordComponent<any> {
|
|||
item.index = i + 1
|
||||
})
|
||||
this.buildUpdateForm()
|
||||
this.buildActionsForm()
|
||||
this.showUpdate = true;
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
<TableComponent :tableData="currentStepTableData" :tableColumn="subTableColumn"
|
||||
@actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start"
|
||||
:showFooter="false" style="margin-bottom: 20px;">
|
||||
<el-table ref="multipleTable" :data="updateParams.items" tooltip-effect="dark" height="250" border
|
||||
<el-table ref="multipleTable" :data="updateParams.items" tooltip-effect="dark" height="500" border
|
||||
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" label="全选" width="40">
|
||||
</el-table-column>
|
||||
|
|
@ -84,15 +84,15 @@
|
|||
</FormComponent>
|
||||
</el-dialog>
|
||||
<!-- 评估矩阵 -->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="showMatrixModal" :title="'区域风险等级判定准则'">
|
||||
<img style="width:100%" src="../../../../assets/images/5.png" alt="">
|
||||
<el-dialog :close-on-click-modal="false" width="600px" :visible.sync="showMatrixModal" :title="'区域风险等级判定准则'">
|
||||
<img style="width:90%" src="../../../../assets/images/5.png" alt="">
|
||||
</el-dialog>
|
||||
<!-- 评价 -->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="880px"
|
||||
:before-close="handleAnalyClose">
|
||||
<AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams"
|
||||
:show.sync="showSubUpdate" @actionCallback="analyCallback" :tabledata.sync="updateParams"
|
||||
:areaList="areaList" :type="'device'"></AnalEvaluationComponent>
|
||||
:areaList="areaList" :type="'device'" :checkRiskType="checkRiskType" ></AnalEvaluationComponent>
|
||||
</el-dialog>
|
||||
<!-- 检查项目 -->
|
||||
<el-dialog :close-on-click-modal="false" title="检查项目" :show-close="false" :visible.sync="showProtable"
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
|
||||
public treeData = [] as any;
|
||||
|
||||
public areaList = [];
|
||||
public areaList = [] as any;
|
||||
public unitList = [];
|
||||
public diviceList = [];
|
||||
public isReadonly = false;
|
||||
|
|
@ -99,6 +99,14 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
datas: []
|
||||
|
||||
} as any;
|
||||
|
||||
//评估方法
|
||||
public checkRiskType = {
|
||||
risk: [],
|
||||
remain: [],
|
||||
type: null,
|
||||
} as any;
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
|
@ -129,22 +137,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
name: "反向选择",
|
||||
value: "reverse"
|
||||
}];
|
||||
public updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: '存草稿',
|
||||
value: 'addDraft',
|
||||
type: "primay"
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
|
||||
public formOptions: FormOption<BtnOption>[] = [{
|
||||
name: "区域名称",
|
||||
key: "areaName",
|
||||
|
|
@ -254,6 +247,16 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
require: true,
|
||||
showError: false,
|
||||
format: "yyyy-MM-dd"
|
||||
}, {
|
||||
name: "区域固有风险等级",
|
||||
key: "analRiskLevel",
|
||||
format: "analRiskLevelName",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
type: "select",
|
||||
showError: false,
|
||||
disable: true,
|
||||
datas: this.$store.state.prevention_risk_level
|
||||
}, {
|
||||
name: "是否为两大一重",
|
||||
key: "majorSign",
|
||||
|
|
@ -265,7 +268,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
}, {
|
||||
name: "重大危险源",
|
||||
key: "majorHazard",
|
||||
hide: !this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0),
|
||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || (!this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0)),
|
||||
type: "select",
|
||||
format: "majorHazardName",
|
||||
width: "calc(50% - 20px)",
|
||||
|
|
@ -277,7 +280,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
name: "重点监管工艺",
|
||||
key: "regulatoryProcess",
|
||||
format: "regulatoryProcessName",
|
||||
hide: !this.updateParams.majorSign.includes(2) || this.updateParams.majorSign.includes(0),
|
||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(2) || this.updateParams.majorSign.includes(0),
|
||||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
|
|
@ -287,7 +290,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
name: "重点监管化学品",
|
||||
key: "regulatoryChemical",
|
||||
format: "regulatoryChemicalName",
|
||||
hide: !this.updateParams.majorSign.includes(3) || this.updateParams.majorSign.includes(0),
|
||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(3) || this.updateParams.majorSign.includes(0),
|
||||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
|
|
@ -327,6 +330,29 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
}]
|
||||
}
|
||||
|
||||
public updateActions = [] as any;
|
||||
public buildActionsForm() {
|
||||
this.updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: '存草稿',
|
||||
value: 'addDraft',
|
||||
type: "primay",
|
||||
hide: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary",
|
||||
hide: this.updateParams.id ? true : false
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
@Watch("$store.state.deptList", { immediate: true, deep: true })
|
||||
onChanges() {
|
||||
this.loadAreaData()
|
||||
|
|
@ -378,7 +404,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
return {
|
||||
name: item.name,
|
||||
value: item.id,
|
||||
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : 0,
|
||||
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : null,
|
||||
}
|
||||
});
|
||||
this.buildUpdateForm()
|
||||
|
|
@ -407,10 +433,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
if (data.areaId) {
|
||||
this.params.unitName = data.name
|
||||
} else {
|
||||
this.params.areaName = data.name==="全部"?"":data.name
|
||||
this.params.areaName = data.name === "全部" ? "" : data.name
|
||||
}
|
||||
this.getTableData()
|
||||
|
||||
}
|
||||
|
||||
public buildTable() {
|
||||
|
|
@ -451,21 +476,48 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
});
|
||||
this.tableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
if (data.status) {
|
||||
return "<span class='color_" + data.status + "'>" + (data.status ? (this.$store.getters.prevention_evaluate_status_map[data.status]) : '') + "</span>"
|
||||
let tmpstatus: any = data.status
|
||||
if (data.status === 1) {
|
||||
tmpstatus = 2
|
||||
} else if (data.status === 2) {
|
||||
tmpstatus = 1
|
||||
}
|
||||
if (data.status) {
|
||||
return "<span class='color_" + tmpstatus + "'>" + (data.status ? (this.$store.getters.prevention_evaluate_status_map[data.status]) : '') + "</span>"
|
||||
}
|
||||
},
|
||||
filters: this.$store.state.prevention_evaluate_status.map(item => {
|
||||
return {
|
||||
text: item.name,
|
||||
value: item.value,
|
||||
}
|
||||
}), filterMethod: (data, row) => {
|
||||
return row.status === data;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//分析评价
|
||||
this.subTableColumn.push({ name: '序号', key: "index" });
|
||||
this.subTableColumn.push({ name: '序号', key: "index", with: "50px" });
|
||||
this.subTableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
if (data.status && data.status !== 1) {
|
||||
let tmpstatus: any = data.status
|
||||
if (data.status === 2) {
|
||||
tmpstatus = 1
|
||||
}
|
||||
if (data.status) {
|
||||
return "<span class='color_" + tmpstatus + "'>" + (data.status ? (this.$store.getters.prevention_evaluate_status_map[data.status]) : '') + "</span>"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
this.subTableColumn.push({ name: '检查项目', key: "itemName" });
|
||||
this.subTableColumn.push({ name: '检查标准', key: "itemStandard", showTip: true, width: "200px" });
|
||||
this.subTableColumn.push({ name: '检查标准', key: "itemStandard", showTip: true, width: "100px" });
|
||||
this.subTableColumn.push({ name: '风险源', key: "riskSource" });
|
||||
this.subTableColumn.push({ name: '危害分析', key: "hazardAnalysis" });
|
||||
this.subTableColumn.push({
|
||||
name: '最严重后果', key: "seriousResult", width: "200px", render: (data) => {
|
||||
name: '最严重后果', key: "seriousResult", width: "100px", render: (data) => {
|
||||
if (data.seriousResult) {
|
||||
return data.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
}
|
||||
|
|
@ -480,7 +532,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
});
|
||||
this.subTableColumn.push({ name: '评估方法', key: "riskChoose", });
|
||||
this.subTableColumn.push({
|
||||
name: '残余风险等级', key: "remainLevel", width: "200px", render: (data) => {
|
||||
name: '残余风险等级', key: "remainLevel", width: "120px", render: (data) => {
|
||||
if (data.remainLevel) {
|
||||
return this.$store.getters.prevention_risk_level_map[data.remainLevel]
|
||||
}
|
||||
|
|
@ -545,7 +597,10 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.deleteData(this.selectData.map((item: any) => item.id))
|
||||
} else if (data.value === "add") {
|
||||
this.isReadonly = false;
|
||||
this.isModifyonly = false;
|
||||
this.showUpdate = true
|
||||
this.diviceList = []
|
||||
this.unitList = []
|
||||
this.updateParams = {
|
||||
majorSign: [],
|
||||
items: [],
|
||||
|
|
@ -553,6 +608,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
evaluateUserId: this.account.userId,
|
||||
evaluateUserName: this.account.nickName,
|
||||
} as any
|
||||
this.buildActionsForm()
|
||||
} else if (data.value === "cancel") {
|
||||
this.handleClose()
|
||||
} else if (data.value === "estimateMatrix") {
|
||||
|
|
@ -565,6 +621,12 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.isReadonly = false;
|
||||
} else if (data && data.value === "subDelete") {
|
||||
if (this.subSelectData.length > 0) {
|
||||
|
||||
this.$confirm('确认删除所选数据', '确认数据', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (!this.updateParams.deleteIds) {
|
||||
this.updateParams.deleteIds = []
|
||||
}
|
||||
|
|
@ -577,6 +639,9 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
return item
|
||||
})
|
||||
this.updateParams.itemNum = this.updateParams.items.length
|
||||
}).catch(() => {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -598,7 +663,6 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
const areaData = this.areaList.find((itm: any) => itm.value === data) as any;
|
||||
this.updateParams.analRiskLevel = areaData.analRiskLevel
|
||||
|
||||
this.updateParams.analRiskLevel = areaData.analRiskLevel
|
||||
this.updateParams.chargeDeptName = null;
|
||||
this.updateParams.chargeUserId = null;
|
||||
this.updateParams.chargeUserName = null;
|
||||
|
|
@ -652,17 +716,23 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
}
|
||||
//是否为两大一重
|
||||
if (item && item.key === 'majorSign') {
|
||||
if (!data) {
|
||||
data = []
|
||||
}
|
||||
if (data.includes(0)) {
|
||||
if (data.length.length > 0) {
|
||||
data.splice(0, data.length)
|
||||
}
|
||||
|
||||
data.push(0)
|
||||
}
|
||||
this.buildUpdateForm()
|
||||
}
|
||||
}
|
||||
//加载设备设施清单列表
|
||||
public loadJobData(id?) {
|
||||
this.diviceService.selectByPage({ pageSize: 1000, unitId: id }).then((res: any) => {
|
||||
this.diviceList = res.data.datas.map(item => {
|
||||
public loadJobData(unitId) {
|
||||
this.tableService.selectDeviceByUnit({ unitId: unitId, id: this.updateParams.id ? this.updateParams.id : null }).then((res: any) => {
|
||||
this.diviceList = res.data.map(item => {
|
||||
return {
|
||||
name: item.name,
|
||||
value: item.id,
|
||||
|
|
@ -695,6 +765,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
//评价信息
|
||||
public showUpdateModel(row, isReadonly, isModifyonly) {
|
||||
this.updateParams = { number: null, tableItems: [] } as any;
|
||||
|
||||
if (!row) {
|
||||
this.currentId = -1;
|
||||
this.showUpdate = true;
|
||||
|
|
@ -702,6 +773,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.currentId = row.id;
|
||||
this.tableService.selectById(this.currentId).then((res: any) => {
|
||||
if (isReadonly) {
|
||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||
this.updateParams = Object.assign({
|
||||
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(";").map(item => this.sourceMap[item]).join(";"),
|
||||
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(";").map(item => this.craftMap[item]).join(";"),
|
||||
|
|
@ -709,9 +781,10 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(";").map(item => this.$store.getters.prevention_majorsign_map[item]).join(";"),
|
||||
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
|
||||
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
|
||||
typeName: this.$store.getters.prevention_device_type_map[res.data.type]
|
||||
typeName: this.$store.getters.prevention_device_type_map[res.data.type],
|
||||
analRiskLevelName: this.$store.getters.prevention_risk_level_map[areaAnalRiskLevel]
|
||||
}, res.data)
|
||||
this.updateParams.majorSign = this.stringChangeArray(res.data.majorSign)
|
||||
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : null
|
||||
this.updateParams.majorHazard = this.stringChangeArray(res.data.majorHazard)
|
||||
this.updateParams.regulatoryProcess = this.stringChangeArray(res.data.regulatoryProcess)
|
||||
this.updateParams.regulatoryChemical = this.stringChangeArray(res.data.regulatoryChemical)
|
||||
|
|
@ -724,11 +797,13 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.isReadonly = false
|
||||
this.isModifyonly = true
|
||||
this.updateParams = res.data;
|
||||
this.updateParams.majorSign = this.stringChangeArray(res.data.majorSign)
|
||||
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : []
|
||||
this.updateParams.majorHazard = this.stringChangeArray(res.data.majorHazard)
|
||||
this.updateParams.regulatoryProcess = this.stringChangeArray(res.data.regulatoryProcess)
|
||||
this.updateParams.regulatoryChemical = this.stringChangeArray(res.data.regulatoryChemical)
|
||||
this.loadUnitData(res.data.areas)
|
||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||
this.updateParams.analRiskLevel = areaAnalRiskLevel
|
||||
this.loadUnitData(res.data.areaId)
|
||||
this.loadJobData(res.data.unitId)
|
||||
this.updateParams.items.forEach((item, i) => {
|
||||
item.index = i + 1
|
||||
|
|
@ -736,6 +811,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
}
|
||||
|
||||
this.buildUpdateForm()
|
||||
this.buildActionsForm()
|
||||
this.showUpdate = true;
|
||||
})
|
||||
}
|
||||
|
|
@ -761,7 +837,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.updateParams.itemNum = this.updateParams.items.length
|
||||
}
|
||||
}
|
||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id ? true : false).then((res) => {
|
||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
|
||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||
this.showUpdate = !!goOn;
|
||||
this.getTableData();
|
||||
|
|
@ -816,20 +892,25 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.analysisUpdateParams = {
|
||||
riskChoose: [],
|
||||
remainChoose: [],
|
||||
measures: [],
|
||||
} as any;
|
||||
if (row) {
|
||||
if (isReadonly) {
|
||||
this.analyIsReadonly = true;
|
||||
this.analysisUpdateParams = Object.assign({
|
||||
seriousResultName: row.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";"),
|
||||
safetySignName: row.safetySign.split(";").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(";"),
|
||||
seriousResultName: !row.seriousResult ? null : row.seriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";"),
|
||||
safetySignName: !row.safetySign ? null : row.safetySign.split(";").map(item => this.$store.getters.prevention_security_identifier_map[item]).join(";"),
|
||||
riskLevelName: this.$store.getters.prevention_risk_level_map[row.riskLevel],
|
||||
remainLevelName: this.$store.getters.prevention_risk_level_map[row.remainLevel],
|
||||
riskControlLevelName: this.$store.getters.prevention_control_level_map[row.riskControlLevel],
|
||||
typeName: this.$store.getters.prevention_device_type_map[row.deviceType]
|
||||
}, row)
|
||||
this.analysisUpdateParams = { ...this.analysisUpdateParams, ...JSON.parse(JSON.stringify(row)) };
|
||||
|
||||
console.log('this.analysisUpdateParams', this.analysisUpdateParams);
|
||||
this.analysisUpdateParams.measures.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
return item
|
||||
})
|
||||
} else {
|
||||
this.analyIsReadonly = false
|
||||
// 暂存数据 用于取消修改
|
||||
|
|
@ -841,6 +922,14 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.analysisUpdateParams.chargeUserName = this.updateParams.chargeUserName
|
||||
this.analysisUpdateParams.deviceName = this.updateParams.name
|
||||
this.analysisUpdateParams.deviceType = this.updateParams.type
|
||||
this.checkRiskType.risk = this.analysisUpdateParams.riskChoose
|
||||
this.checkRiskType.remain = this.analysisUpdateParams.remainChoose
|
||||
|
||||
this.analysisUpdateParams.measures.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
return item
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
this.showSubUpdate = true
|
||||
|
|
|
|||
|
|
@ -12,9 +12,11 @@ import UnitTreeComponent from '@/components/tree.component.vue';
|
|||
import WorkService from '@/service/work.service';
|
||||
import UnitService from '@/service/unit.service';
|
||||
import AreaService from '@/service/area.service';
|
||||
import moment from "moment";
|
||||
|
||||
@Component({
|
||||
template,
|
||||
components:{
|
||||
components: {
|
||||
FormComponent,
|
||||
TableComponent,
|
||||
DrawComponent,
|
||||
|
|
@ -27,16 +29,16 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
public areaService = new AreaService()
|
||||
|
||||
public params = {
|
||||
areaName:"",
|
||||
unitName:"",
|
||||
name:""
|
||||
areaName: "",
|
||||
unitName: "",
|
||||
name: ""
|
||||
} as any;
|
||||
|
||||
public subTableColumn = [] as any;
|
||||
|
||||
|
||||
public currentStepTableData = {
|
||||
datas:[]
|
||||
datas: []
|
||||
} as any;
|
||||
|
||||
public stepUpdateParams = {} as any;
|
||||
|
|
@ -46,52 +48,59 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
public treeData = [] as any;
|
||||
|
||||
public formActions = [{
|
||||
name:"查询",
|
||||
value:"search",
|
||||
icon:"el-icon-search",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"清空",
|
||||
icon:"el-icon-tickets",
|
||||
value:"reset"
|
||||
name: "查询",
|
||||
value: "search",
|
||||
icon: "el-icon-search",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "清空",
|
||||
icon: "el-icon-tickets",
|
||||
value: "reset"
|
||||
}];
|
||||
public tableActions = [{
|
||||
name:"添加",
|
||||
value:"add",
|
||||
icon:"el-icon-plus",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"批量删除",
|
||||
value:"delete",
|
||||
plain:true,
|
||||
icon:"el-icon-delete",
|
||||
type:"danger"
|
||||
name: "添加",
|
||||
value: "add",
|
||||
icon: "el-icon-plus",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "批量删除",
|
||||
value: "delete",
|
||||
plain: true,
|
||||
icon: "el-icon-delete",
|
||||
type: "danger"
|
||||
}];
|
||||
public subTableActions:BtnOption[] = [];
|
||||
public subTableActions: BtnOption[] = [];
|
||||
public footerActions = [{
|
||||
name:"选择全部",
|
||||
value:"selectAll",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"反向选择",
|
||||
value:"reverse"
|
||||
name: "选择全部",
|
||||
value: "selectAll",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "反向选择",
|
||||
value: "reverse"
|
||||
}];
|
||||
public formOptions:FormOption<BtnOption>[] = [{
|
||||
name:"区域名称",
|
||||
key:"areaName",
|
||||
type:"text",
|
||||
},{
|
||||
name:"单元名称",
|
||||
key:"unitName",
|
||||
type:"text",
|
||||
},{
|
||||
name:"作业活动",
|
||||
key:"name",
|
||||
type:"text",
|
||||
public formOptions: FormOption<BtnOption>[] = [{
|
||||
name: "区域名称",
|
||||
key: "areaName",
|
||||
type: "text",
|
||||
}, {
|
||||
name: "单元名称",
|
||||
key: "unitName",
|
||||
type: "text",
|
||||
}, {
|
||||
name: "作业活动",
|
||||
key: "name",
|
||||
type: "text",
|
||||
}];
|
||||
|
||||
public showUpdate = false;
|
||||
public updateParams = {} as any;
|
||||
|
||||
public account = JSON.parse(localStorage.getItem("account") as any);
|
||||
|
||||
public updateParams = {
|
||||
identifyTime: moment().format('YYYY-MM-DD'),
|
||||
identifyUserId: this.account.userId,
|
||||
} as any;
|
||||
|
||||
public selectData = [];
|
||||
|
||||
public areaList = [];
|
||||
|
|
@ -100,402 +109,419 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
public isReadonly = false;
|
||||
|
||||
|
||||
public updateOptions:FormOption<BtnOption>[] = [];
|
||||
public updateOptions: FormOption<BtnOption>[] = [];
|
||||
|
||||
|
||||
|
||||
public updateActions = [{
|
||||
name:"取消",
|
||||
value:"cancel"
|
||||
},{
|
||||
name:"保存并继续添加",
|
||||
value:"saveAndContinue",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"保存",
|
||||
value:"save",
|
||||
type:"primary"
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
|
||||
public showSubUpdate = false;
|
||||
|
||||
public showSteptable = false;
|
||||
|
||||
public subUpdateOptions:FormOption<BtnOption>[] = [];
|
||||
@Watch("$store.state.deptList",{immediate:true,deep:true})
|
||||
onChanges(){
|
||||
public subUpdateOptions: FormOption<BtnOption>[] = [];
|
||||
@Watch("$store.state.deptList", { immediate: true, deep: true })
|
||||
onChanges() {
|
||||
this.loadAreaData()
|
||||
}
|
||||
|
||||
created(){
|
||||
created() {
|
||||
}
|
||||
|
||||
public buildUpdateForm(){
|
||||
this.updateOptions=[{
|
||||
name:"选择区域",
|
||||
key:"areaId",
|
||||
type:"select",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
format:"areaName",
|
||||
showError:false,
|
||||
datas:this.areaList
|
||||
},{
|
||||
name:"选择单元",
|
||||
key:"unitId",
|
||||
type:"select",
|
||||
format:"unitName",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
datas:this.unitList
|
||||
},{
|
||||
name:"责任部门",
|
||||
key:"chargeDeptId",
|
||||
format:"chargeDeptName",
|
||||
type:"treeSelect",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
expandLevel:Infinity,
|
||||
showError:false,
|
||||
datas:this.$store.state.deptTreeList
|
||||
},{
|
||||
name:"责任人",
|
||||
key:"chargeUserId",
|
||||
format:"chargeUserName",
|
||||
type:"select",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
datas:this.$store.state.userList
|
||||
},{
|
||||
name:"作业名称",
|
||||
key:"name",
|
||||
type:"text",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
},{
|
||||
name:"作业地点",
|
||||
key:"location",
|
||||
type:"text",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
},{
|
||||
showError:false,
|
||||
name:"涉及岗位",
|
||||
key:"postCode",
|
||||
format:"postName",
|
||||
type:"select",
|
||||
multiple:true,
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
datas:this.$store.state.postList
|
||||
},{
|
||||
name:"安全因素",
|
||||
key:"safetyFactor",
|
||||
format:"safetyFactorName",
|
||||
type:"select",
|
||||
multiple:true,
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
datas:this.$store.state.prevention_safe_reason
|
||||
},{
|
||||
name:"辨识人",
|
||||
key:"identifyUserId",
|
||||
format:"identifyUserName",
|
||||
type:"select",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
datas:this.$store.state.userList
|
||||
},{
|
||||
name:"辨识时间",
|
||||
key:"identifyTime",
|
||||
type:"date",
|
||||
subType:"date",
|
||||
width:"calc(50% - 20px)",
|
||||
require:true,
|
||||
showError:false,
|
||||
format:"yyyy-MM-dd"
|
||||
public buildUpdateForm() {
|
||||
this.updateOptions = [{
|
||||
name: "选择区域",
|
||||
key: "areaId",
|
||||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
format: "areaName",
|
||||
showError: false,
|
||||
datas: this.areaList
|
||||
}, {
|
||||
name: "选择单元",
|
||||
key: "unitId",
|
||||
type: "select",
|
||||
format: "unitName",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
datas: this.unitList
|
||||
}, {
|
||||
name: "责任部门",
|
||||
key: "chargeDeptId",
|
||||
format: "chargeDeptName",
|
||||
type: "treeSelect",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
expandLevel: Infinity,
|
||||
showError: false,
|
||||
datas: this.$store.state.deptTreeList
|
||||
}, {
|
||||
name: "责任人",
|
||||
key: "chargeUserId",
|
||||
format: "chargeUserName",
|
||||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
datas: this.$store.state.userList
|
||||
}, {
|
||||
name: "作业名称",
|
||||
key: "name",
|
||||
type: "text",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
}, {
|
||||
name: "作业地点",
|
||||
key: "location",
|
||||
type: "text",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
}, {
|
||||
showError: false,
|
||||
name: "涉及岗位",
|
||||
key: "postCode",
|
||||
format: "postName",
|
||||
type: "select",
|
||||
multiple: true,
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
datas: this.$store.state.postList
|
||||
}, {
|
||||
name: "安全因素",
|
||||
key: "safetyFactor",
|
||||
format: "safetyFactorName",
|
||||
type: "select",
|
||||
multiple: true,
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
datas: this.$store.state.prevention_safe_reason
|
||||
}, {
|
||||
name: "辨识人",
|
||||
key: "identifyUserId",
|
||||
format: "identifyUserName",
|
||||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
datas: this.$store.state.userList
|
||||
}, {
|
||||
name: "辨识时间",
|
||||
key: "identifyTime",
|
||||
type: "date",
|
||||
subType: "date",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
format: "yyyy-MM-dd"
|
||||
}];
|
||||
|
||||
this.subTableActions = [{
|
||||
name:"添加",
|
||||
value:"subAdd",
|
||||
icon:"el-icon-plus",
|
||||
hide:this.isReadonly,
|
||||
type:"primary"
|
||||
},{
|
||||
name:"批量删除",
|
||||
value:"subDelete",
|
||||
plain:true,
|
||||
hide:this.isReadonly,
|
||||
icon:"el-icon-delete",
|
||||
type:"danger"
|
||||
name: "添加",
|
||||
value: "subAdd",
|
||||
icon: "el-icon-plus",
|
||||
hide: this.isReadonly,
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "批量删除",
|
||||
value: "subDelete",
|
||||
plain: true,
|
||||
hide: this.isReadonly,
|
||||
icon: "el-icon-delete",
|
||||
type: "danger"
|
||||
}];
|
||||
this.subUpdateOptions=[{
|
||||
name:"步骤名称",
|
||||
key:"name",
|
||||
type:"text",
|
||||
width:"100%",
|
||||
require:true,
|
||||
showError:false,
|
||||
},{
|
||||
name:"作业步骤描述",
|
||||
key:"description",
|
||||
type:"textarea",
|
||||
width:"100%",
|
||||
require:true,
|
||||
showError:false,
|
||||
},{
|
||||
name:"作业地点",
|
||||
key:"location",
|
||||
type:"text",
|
||||
width:"100%",
|
||||
require:true,
|
||||
showError:false,
|
||||
},{
|
||||
name:"责任人",
|
||||
key:"chargeUserId",
|
||||
type:"select",
|
||||
width:"100%",
|
||||
require:true,
|
||||
showError:false,
|
||||
datas:this.$store.state.userList
|
||||
},{
|
||||
name:"作业人",
|
||||
key:"workerId",
|
||||
type:"select",
|
||||
width:"100%",
|
||||
require:true,
|
||||
showError:false,
|
||||
datas:this.$store.state.userList
|
||||
this.subUpdateOptions = [{
|
||||
name: "步骤名称",
|
||||
key: "name",
|
||||
type: "text",
|
||||
width: "100%",
|
||||
require: true,
|
||||
showError: false,
|
||||
}, {
|
||||
name: "作业步骤描述",
|
||||
key: "description",
|
||||
type: "textarea",
|
||||
width: "100%",
|
||||
require: true,
|
||||
showError: false,
|
||||
}, {
|
||||
name: "作业地点",
|
||||
key: "location",
|
||||
type: "text",
|
||||
width: "100%",
|
||||
require: true,
|
||||
showError: false,
|
||||
}, {
|
||||
name: "责任人",
|
||||
key: "chargeUserId",
|
||||
type: "select",
|
||||
width: "100%",
|
||||
require: true,
|
||||
showError: false,
|
||||
datas: this.$store.state.userList
|
||||
}, {
|
||||
name: "作业人",
|
||||
key: "workerId",
|
||||
type: "select",
|
||||
width: "100%",
|
||||
require: true,
|
||||
showError: false,
|
||||
datas: this.$store.state.userList
|
||||
}]
|
||||
}
|
||||
|
||||
// 加载区域列表
|
||||
public loadAreaData(){
|
||||
this.areaService.selectByPage({pageSize:1000}).then((res:any)=>{
|
||||
this.areaList = res.data.datas.map(item=>{
|
||||
public loadAreaData() {
|
||||
this.areaService.selectByPage({ pageSize: 1000 }).then((res: any) => {
|
||||
this.areaList = res.data.datas.map(item => {
|
||||
return {
|
||||
name:item.name,
|
||||
value:item.id
|
||||
name: item.name,
|
||||
value: item.id
|
||||
}
|
||||
});
|
||||
this.buildUpdateForm()
|
||||
})
|
||||
}
|
||||
// 加载单元列表
|
||||
public loadUnitData(id?){
|
||||
this.unitService.selectByPage({pageSize:1000,areaId:id},false).then((res:any)=>{
|
||||
this.unitList = res.data.datas.map(item=>{
|
||||
public loadUnitData(id?) {
|
||||
this.unitService.selectByPage({ pageSize: 1000, areaId: id }, false).then((res: any) => {
|
||||
this.unitList = res.data.datas.map(item => {
|
||||
return {
|
||||
name:item.name,
|
||||
value:item.id
|
||||
name: item.name,
|
||||
value: item.id,
|
||||
deptId: item.chargeDeptId,
|
||||
userId: item.chargeUserId,
|
||||
deptName: item.chargeDeptName,
|
||||
userName: item.chargeUserName,
|
||||
}
|
||||
});
|
||||
this.buildUpdateForm()
|
||||
})
|
||||
}
|
||||
// 树点击
|
||||
public handleNodeClick(data){
|
||||
this.params.unitName="";
|
||||
this.params.areaName="";
|
||||
if(data.areaId){
|
||||
public handleNodeClick(data) {
|
||||
this.params.unitName = "";
|
||||
this.params.areaName = "";
|
||||
if (data.areaId) {
|
||||
this.params.unitName = data.name
|
||||
}else{
|
||||
this.params.areaName = data.name==="全部"?"":data.name
|
||||
} else {
|
||||
this.params.areaName = data.name === "全部" ? "" : data.name
|
||||
}
|
||||
this.getTableData()
|
||||
}
|
||||
|
||||
public buildTable(){
|
||||
this.tableColumn.push({name:'区域名称',key:"areaName",width:"200px"});
|
||||
this.tableColumn.push({name:'风险分析单元',key:"unitName",width:"200px"});
|
||||
this.tableColumn.push({name:'作业活动',key:"name",showTip:true});
|
||||
this.tableColumn.push({name:'作业步骤',key:"stepNum",render:(data)=>{
|
||||
return "<span class='link'>"+(data.stepNum?data.stepNum:0)+"</span>"
|
||||
}});
|
||||
this.tableColumn.push({name:'责任部门',key:"chargeDeptName"});
|
||||
this.tableColumn.push({name:'责任人',key:"chargeUserName"});
|
||||
this.tableColumn.push({name:'作业地点',key:"location",showTip:true});
|
||||
this.tableColumn.push({name:'涉及岗位',key:"postName",width:"200px",showTip:true});
|
||||
public buildTable() {
|
||||
this.tableColumn.push({ name: '区域名称', key: "areaName", width: "200px" });
|
||||
this.tableColumn.push({ name: '风险分析单元', key: "unitName", width: "200px" });
|
||||
this.tableColumn.push({ name: '作业活动', key: "name", showTip: true });
|
||||
this.tableColumn.push({
|
||||
name: '作业步骤', key: "stepNum", render: (data) => {
|
||||
return "<span class='link'>" + (data.stepNum ? data.stepNum : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '责任部门', key: "chargeDeptName" });
|
||||
this.tableColumn.push({ name: '责任人', key: "chargeUserName" });
|
||||
this.tableColumn.push({ name: '作业地点', key: "location", showTip: true });
|
||||
this.tableColumn.push({ name: '涉及岗位', key: "postName", width: "200px", showTip: true });
|
||||
|
||||
|
||||
this.subTableColumn.push({name:'序号',key:"index",width:"60"});
|
||||
this.subTableColumn.push({name:'步骤名称',key:"name"});
|
||||
this.subTableColumn.push({name:'作业步骤描述',key:"description",showTip:true,});
|
||||
this.subTableColumn.push({name:'作业地点',key:"location",showTip:true});
|
||||
this.subTableColumn.push({name:'责任人',key:"chargeUserName"});
|
||||
this.subTableColumn.push({name:'作业人',key:"workerName"});
|
||||
this.subTableColumn.push({ name: '序号', key: "index", width: "60" });
|
||||
this.subTableColumn.push({ name: '步骤名称', key: "name" });
|
||||
this.subTableColumn.push({ name: '作业步骤描述', key: "description", showTip: true, });
|
||||
this.subTableColumn.push({ name: '作业地点', key: "location", showTip: true });
|
||||
this.subTableColumn.push({ name: '责任人', key: "chargeUserName" });
|
||||
this.subTableColumn.push({ name: '作业人', key: "workerName" });
|
||||
}
|
||||
|
||||
public showSteps(el,data){
|
||||
public showSteps(el, data) {
|
||||
const isTarget = el.target.classList.contains("link");
|
||||
if(isTarget){
|
||||
if (isTarget) {
|
||||
this.showSteptable = true;
|
||||
this.currentStepTableData.datas = data.steps.map((item,index)=>{
|
||||
item.index=index+1;
|
||||
this.currentStepTableData.datas = data.steps.map((item, index) => {
|
||||
item.index = index + 1;
|
||||
return item
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public changes(data,item){
|
||||
public changes(data, item) {
|
||||
//单元
|
||||
if (item && item.key === 'unitId') {
|
||||
const unitData = this.unitList.find((itm: any) => itm.value === data) as any;
|
||||
this.updateParams.chargeDeptName = unitData.deptName;
|
||||
this.updateParams.chargeUserId = unitData.userId;
|
||||
this.updateParams.chargeUserName = unitData.userName;
|
||||
this.updateParams.chargeDeptId = unitData.deptId;
|
||||
}
|
||||
// 部门
|
||||
if(item && item.key === "chargeDeptId"){
|
||||
if (item && item.key === "chargeDeptId") {
|
||||
this.updateParams.chargeDeptName = this.$store.getters.dept_map[data];
|
||||
}
|
||||
// 新增编辑选择人员
|
||||
if(item && item.key === "chargeUserId"){
|
||||
if(this.showSubUpdate){
|
||||
if (item && item.key === "chargeUserId") {
|
||||
if (this.showSubUpdate) {
|
||||
this.stepUpdateParams.chargeUserName = this.$store.getters.user_map[data];
|
||||
return
|
||||
}
|
||||
this.updateParams.chargeUserName = this.$store.getters.user_map[data];
|
||||
}
|
||||
// 新增编辑选择人员
|
||||
if(item && item.key === "workerId"){
|
||||
if (item && item.key === "workerId") {
|
||||
this.stepUpdateParams.workerName = this.$store.getters.user_map[data];
|
||||
}
|
||||
// 辨识人
|
||||
if(item && item.key === "identifyUserId"){
|
||||
if (item && item.key === "identifyUserId") {
|
||||
this.updateParams.identifyUserName = this.$store.getters.user_map[data];
|
||||
}
|
||||
// 区域
|
||||
if(item && item.key==="areaId"){
|
||||
if(this.updateParams.unitId){
|
||||
if (item && item.key === "areaId") {
|
||||
if (this.updateParams.unitId) {
|
||||
this.updateParams.unitId = null;
|
||||
}
|
||||
this.loadUnitData(data)
|
||||
}
|
||||
// 岗位
|
||||
if(item && item.key==="postCode"){
|
||||
this.updateParams.postName = data.map(itm=>this.$store.getters.post_map[itm]).join(";");
|
||||
if (item && item.key === "postCode") {
|
||||
this.updateParams.postName = data.map(itm => this.$store.getters.post_map[itm]).join(";");
|
||||
}
|
||||
}
|
||||
|
||||
public callback(data,type?){
|
||||
if(type){
|
||||
public callback(data, type?) {
|
||||
if (type) {
|
||||
this.params[type] = data;
|
||||
this.getTableData();
|
||||
return
|
||||
}
|
||||
// 查询
|
||||
if(data && data.value==="search"){
|
||||
if (data && data.value === "search") {
|
||||
this.getTableData()
|
||||
// 重置
|
||||
}else if(data && data.value === "reset"){
|
||||
} else if (data && data.value === "reset") {
|
||||
this.reset()
|
||||
// 反选
|
||||
}else if(data && data.value === "reverse"){
|
||||
} else if (data && data.value === "reverse") {
|
||||
this.toggleAll()
|
||||
// 全选
|
||||
}else if(data && data.value === "selectAll"){
|
||||
} else if (data && data.value === "selectAll") {
|
||||
this.selectAll()
|
||||
}else if(data && data.value === "add"){
|
||||
} else if (data && data.value === "add") {
|
||||
this.showUpdateModel();
|
||||
}else if(data && data.value === "delete"){
|
||||
this.deleteData(this.selectData.map((itm:any)=>itm.id))
|
||||
}else if(data && data.value === "subAdd"){
|
||||
} else if (data && data.value === "delete") {
|
||||
this.deleteData(this.selectData.map((itm: any) => itm.id))
|
||||
} else if (data && data.value === "subAdd") {
|
||||
this.showSubUpdateModel()
|
||||
}else if(data && data.value === "subDelete"){
|
||||
} else if (data && data.value === "subDelete") {
|
||||
// 批量删除步骤
|
||||
this.doSubDelete(this.selectData.map((itm:any)=>itm.index - 1))
|
||||
}else if(data && data.value.indexOf("save")>=0){
|
||||
this.doSave(data.value!=="save")
|
||||
}else if(data && data.value === "cancel"){
|
||||
this.doSubDelete(this.selectData.map((itm: any) => itm.index - 1))
|
||||
} else if (data && data.value.indexOf("save") >= 0) {
|
||||
this.doSave(data.value !== "save")
|
||||
} else if (data && data.value === "cancel") {
|
||||
this.handleClose()
|
||||
}
|
||||
}
|
||||
|
||||
public showSubUpdateModel(row?){
|
||||
public showSubUpdateModel(row?) {
|
||||
this.stepUpdateParams = {} as any;
|
||||
if(row){
|
||||
if (row) {
|
||||
this.stepUpdateParams = JSON.parse(JSON.stringify(row));
|
||||
}
|
||||
this.showSubUpdate = true;
|
||||
}
|
||||
|
||||
public doSubDelete(indexs){
|
||||
for(let i = this.updateParams.steps.length-1;i>=0;i--){
|
||||
if(indexs.includes(i)){
|
||||
this.updateParams.steps.splice(i,1)
|
||||
public doSubDelete(indexs) {
|
||||
for (let i = this.updateParams.steps.length - 1; i >= 0; i--) {
|
||||
if (indexs.includes(i)) {
|
||||
this.updateParams.steps.splice(i, 1)
|
||||
}
|
||||
}
|
||||
this.updateParams.steps.forEach((item,index)=>{
|
||||
item.index = index+1;
|
||||
this.updateParams.steps.forEach((item, index) => {
|
||||
item.index = index + 1;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
public doSave(goOn?){
|
||||
public doSave(goOn?) {
|
||||
// 如果是新增步骤
|
||||
if(this.showSubUpdate){
|
||||
if (this.showSubUpdate) {
|
||||
// 新增
|
||||
if(!this.stepUpdateParams.index){
|
||||
this.stepUpdateParams.index = this.updateParams.steps.length+1;
|
||||
if (!this.stepUpdateParams.index) {
|
||||
this.stepUpdateParams.index = this.updateParams.steps.length + 1;
|
||||
this.updateParams.steps.push(this.stepUpdateParams);
|
||||
}else{
|
||||
this.updateParams.steps.splice(this.updateParams.steps.findIndex(item=>item.index ===this.stepUpdateParams.index),1,this.stepUpdateParams)
|
||||
} else {
|
||||
this.updateParams.steps.splice(this.updateParams.steps.findIndex(item => item.index === this.stepUpdateParams.index), 1, this.stepUpdateParams)
|
||||
}
|
||||
this.stepUpdateParams = {} as any;
|
||||
this.showSubUpdate=!!goOn;
|
||||
this.showSubUpdate = !!goOn;
|
||||
return
|
||||
}
|
||||
// 新增清单
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.join(",");
|
||||
this.updateParams.stepNum = this.updateParams.steps.length;
|
||||
this.updateParams.postCode = this.updateParams.postCode.join(";")
|
||||
this.tableService.addOrUpdate(this.updateParams,this.currentId===-1).then((res)=>{
|
||||
this.$message.success(this.currentId===-1?"新增成功!":"编辑成功!");
|
||||
this.tableService.addOrUpdate(this.updateParams, this.currentId === -1).then((res) => {
|
||||
this.$message.success(this.currentId === -1 ? "新增成功!" : "编辑成功!");
|
||||
this.updateParams = {
|
||||
postCode:[],
|
||||
safetyFactor:[]
|
||||
postCode: [],
|
||||
safetyFactor: []
|
||||
} as any
|
||||
this.showUpdate = !!goOn;
|
||||
this.getTableData();
|
||||
})
|
||||
}
|
||||
// 重置数据
|
||||
public reset(){
|
||||
public reset() {
|
||||
this.params = {
|
||||
areaName:"",
|
||||
unitName:"",
|
||||
name:"",
|
||||
pageNum:1,
|
||||
pageSize:20,
|
||||
areaName: "",
|
||||
unitName: "",
|
||||
name: "",
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
} as any;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public showUpdateModel(row?,isRead?){
|
||||
public showUpdateModel(row?, isRead?) {
|
||||
this.isReadonly = !!isRead;
|
||||
if(!row){
|
||||
if (!row) {
|
||||
this.currentId = -1;
|
||||
this.updateParams = {steps:[]} as any;
|
||||
}else{
|
||||
this.updateParams = {
|
||||
steps: [], identifyTime: moment().format('YYYY-MM-DD'),
|
||||
identifyUserId: this.account.userId,
|
||||
} as any;
|
||||
} else {
|
||||
this.currentId = row.id;
|
||||
this.updateParams = JSON.parse(JSON.stringify(row));
|
||||
|
||||
if(!this.updateParams.steps){
|
||||
if (!this.updateParams.steps) {
|
||||
this.updateParams.steps = [];
|
||||
}
|
||||
this.updateParams.steps.forEach((item,index)=>{
|
||||
item.index = index+1;
|
||||
this.updateParams.steps.forEach((item, index) => {
|
||||
item.index = index + 1;
|
||||
});
|
||||
this.currentStepTableData.datas = this.updateParams.steps;
|
||||
if(!isRead){
|
||||
this.updateParams.postCode = this.updateParams.postCode.split(";").map(item=>+item);
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item=>+item);
|
||||
}else{
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item=>+item);
|
||||
this.updateParams.safetyFactorName = this.updateParams.safetyFactor.map(item=>this.$store.getters.prevention_safe_reason_map[item]).join(",")
|
||||
if (!isRead) {
|
||||
this.updateParams.postCode = this.updateParams.postCode.split(";").map(item => +item);
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item => +item);
|
||||
} else {
|
||||
this.updateParams.safetyFactor = this.updateParams.safetyFactor.split(",").map(item => +item);
|
||||
this.updateParams.safetyFactorName = this.updateParams.safetyFactor.map(item => this.$store.getters.prevention_safe_reason_map[item]).join(",")
|
||||
this.buildUpdateForm()
|
||||
}
|
||||
}
|
||||
|
|
@ -504,8 +530,8 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
this.showUpdate = true
|
||||
}
|
||||
|
||||
public handleClose(){
|
||||
if(this.showSubUpdate){
|
||||
public handleClose() {
|
||||
if (this.showSubUpdate) {
|
||||
this.showSubUpdate = false;
|
||||
this.stepUpdateParams = {} as any;
|
||||
return
|
||||
|
|
@ -519,27 +545,27 @@ export default class WorkManagerComponent extends BaseRecordComponent<any> {
|
|||
public toggleAll() {
|
||||
(this.$refs.multipleTable as any).toggleAllSelection();
|
||||
}
|
||||
public selectAll(){
|
||||
if(!this.selectData.length){
|
||||
public selectAll() {
|
||||
if (!this.selectData.length) {
|
||||
this.toggleAll()
|
||||
}else{
|
||||
this.tableData.datas.forEach((item,index)=>{
|
||||
const find = this.selectData.find((data:any)=>data.userId === item.userId);
|
||||
if(!find){
|
||||
} else {
|
||||
this.tableData.datas.forEach((item, index) => {
|
||||
const find = this.selectData.find((data: any) => data.userId === item.userId);
|
||||
if (!find) {
|
||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public handleSelectionChange(data){
|
||||
public handleSelectionChange(data) {
|
||||
this.selectData = data;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped src="../../../common.component.scss">
|
||||
::v-deep{
|
||||
.el-dialog__body .common-btn-box{
|
||||
::v-deep {
|
||||
.el-dialog__body .common-btn-box {
|
||||
justify-content: flex-start !important;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@
|
|||
@actionCallback="callback($event)" :actions="isReadonly? []:subTableActions" actionPosition="flex-start"
|
||||
:showFooter="false" style="margin-bottom: 20px;">
|
||||
|
||||
<el-table ref="multipleTable" :data="updateParams.steps" tooltip-effect="dark" height="250" border
|
||||
<el-table ref="multipleTable" :data="updateParams.steps" tooltip-effect="dark" height="500" border
|
||||
row-key="checked" @selection-change="handleSubSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" label="全选" width="40">
|
||||
</el-table-column>
|
||||
|
|
@ -70,10 +70,10 @@
|
|||
</template>
|
||||
<el-table-column label="操作" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="isReadonly" type="text"
|
||||
<el-button v-if="isReadonly || isModifyonly" type="text"
|
||||
@click="showSubModel(scope.row,isReadonly)">查看</el-button>
|
||||
<el-button v-if="isModifyonly" type="text" @click="showSubModel(scope.row)">修改</el-button>
|
||||
<el-button v-if="!isReadonly" type="text" @click="showSubModel(scope.row)">评价</el-button>
|
||||
<el-button v-if="!isReadonly && !isModifyonly" type="text" @click="showSubModel(scope.row)">评价</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -86,18 +86,18 @@
|
|||
|
||||
</el-dialog>
|
||||
<!-- 评估矩阵 -->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="showMatrixModal" width="500px" :title="'区域风险等级判定准则'">
|
||||
<img style="width:100%" src="../../../../assets/images/5.png" alt="">
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="showMatrixModal" width="600px" :title="'区域风险等级判定准则'">
|
||||
<img style="width:90%" src="../../../../assets/images/5.png" alt="">
|
||||
</el-dialog>
|
||||
<!-- 危害分析评价 -->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="showSubUpdate" width="880px"
|
||||
:before-close="handleAnalyClose">
|
||||
<AnalEvaluationComponent :isReadonly="analyIsReadonly" :data.sync="analysisUpdateParams"
|
||||
:show.sync="showSubUpdate" @actionCallback="analyCallback" :tabledata.sync="updateParams"
|
||||
:areaList="areaList" :type="'work'"></AnalEvaluationComponent>
|
||||
:areaList="areaList" :type="'work'" :checkRiskType="checkRiskType"></AnalEvaluationComponent>
|
||||
</el-dialog>
|
||||
<!-- 检查项目 -->
|
||||
<el-dialog :close-on-click-modal="false" title="检查项目" :show-close="false" :visible.sync="showProtable"
|
||||
<el-dialog :close-on-click-modal="false" title="作业步骤" :show-close="false" :visible.sync="showProtable"
|
||||
width="940px">
|
||||
<FormComponent labelWidth="110px" labelAlign="right" :actions="proActions" @actionCallback="proCallback"
|
||||
:full-btn="true" btnPosition="center">
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import AreaService from '@/service/area.service';
|
|||
import SystemService from "hbt-common/service/system.service"
|
||||
import JobHazardService from '@/service/jobHazard.service';
|
||||
import ButtonListComponent from "hbt-common/components/common/buttonList.component.vue";
|
||||
import moment from "moment"
|
||||
import moment from "moment";
|
||||
|
||||
@Component({
|
||||
template,
|
||||
|
|
@ -44,7 +44,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public treeData = [] as any;
|
||||
|
||||
public areaList = [];
|
||||
public areaList = [] as any;
|
||||
public unitList = [];
|
||||
public jobList = [];
|
||||
public isReadonly = false;
|
||||
|
|
@ -100,6 +100,14 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
datas: []
|
||||
|
||||
} as any;
|
||||
|
||||
//评估方法
|
||||
public checkRiskType = {
|
||||
risk: [],
|
||||
remain: [],
|
||||
type: null,
|
||||
} as any;
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
|
@ -130,22 +138,6 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
name: "反向选择",
|
||||
value: "reverse"
|
||||
}];
|
||||
public updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: '存草稿',
|
||||
value: 'addDraft',
|
||||
type: "primay"
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
public formOptions: FormOption<BtnOption>[] = [{
|
||||
name: "区域名称",
|
||||
key: "areaName",
|
||||
|
|
@ -253,6 +245,16 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
require: true,
|
||||
showError: false,
|
||||
format: "yyyy-MM-dd"
|
||||
}, {
|
||||
name: "区域固有风险等级",
|
||||
key: "analRiskLevel",
|
||||
format: "analRiskLevelName",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
type: "select",
|
||||
showError: false,
|
||||
disable: true,
|
||||
datas: this.$store.state.prevention_risk_level
|
||||
}, {
|
||||
name: "是否为两大一重",
|
||||
key: "majorSign",
|
||||
|
|
@ -264,7 +266,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
}, {
|
||||
name: "重大危险源",
|
||||
key: "majorHazard",
|
||||
hide: !this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0),
|
||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(1) || this.updateParams.majorSign.includes(0),
|
||||
type: "select",
|
||||
format: "majorHazardName",
|
||||
width: "calc(50% - 20px)",
|
||||
|
|
@ -276,7 +278,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
name: "重点监管工艺",
|
||||
key: "regulatoryProcess",
|
||||
format: "regulatoryProcessName",
|
||||
hide: !this.updateParams.majorSign.includes(2) || this.updateParams.majorSign.includes(0),
|
||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(2) || this.updateParams.majorSign.includes(0),
|
||||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
|
|
@ -286,7 +288,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
name: "重点监管化学品",
|
||||
key: "regulatoryChemical",
|
||||
format: "regulatoryChemicalName",
|
||||
hide: !this.updateParams.majorSign.includes(3) || this.updateParams.majorSign.includes(0),
|
||||
hide: !this.updateParams.majorSign || this.updateParams.majorSign.length === 0 || !this.updateParams.majorSign.includes(3) || this.updateParams.majorSign.includes(0),
|
||||
type: "select",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
|
|
@ -326,6 +328,29 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
}]
|
||||
}
|
||||
|
||||
|
||||
public updateActions = [] as any;
|
||||
public buildActionsForm() {
|
||||
this.updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: '存草稿',
|
||||
value: 'addDraft',
|
||||
type: "primay",
|
||||
hide: !this.updateParams.status || this.updateParams.status === 1 ? false : true
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary",
|
||||
hide: this.updateParams.id ? true : false
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
}
|
||||
|
||||
@Watch("$store.state.deptList", { immediate: true, deep: true })
|
||||
onChanges() {
|
||||
this.loadAreaData()
|
||||
|
|
@ -377,7 +402,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
return {
|
||||
name: item.name,
|
||||
value: item.id,
|
||||
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : 0,
|
||||
analRiskLevel: item.analRiskLevel ? item.analRiskLevel : null,
|
||||
}
|
||||
});
|
||||
this.buildUpdateForm()
|
||||
|
|
@ -406,7 +431,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
if (data.areaId) {
|
||||
this.params.unitName = data.name
|
||||
} else {
|
||||
this.params.areaName = data.name==="全部"?"":data.name
|
||||
this.params.areaName = data.name === "全部" ? "" : data.name
|
||||
}
|
||||
this.getTableData()
|
||||
|
||||
|
|
@ -444,14 +469,41 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
if (data.status) {
|
||||
return "<span class='color_" + data.status + "'>" + (data.status ? (this.$store.getters.prevention_evaluate_status_map[data.status]) : '') + "</span>"
|
||||
let tmpstatus: any = data.status
|
||||
if (data.status === 1) {
|
||||
tmpstatus = 2
|
||||
} else if (data.status === 2) {
|
||||
tmpstatus = 1
|
||||
}
|
||||
return "<span class='color_" + tmpstatus + "'>" + (data.status ? (this.$store.getters.prevention_evaluate_status_map[data.status]) : '') + "</span>"
|
||||
}
|
||||
},
|
||||
filters: this.$store.state.prevention_evaluate_status.map(item => {
|
||||
return {
|
||||
text: item.name,
|
||||
value: item.value,
|
||||
}
|
||||
}), filterMethod: (data, row) => {
|
||||
return row.status === data;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//分析评价
|
||||
this.subTableColumn.push({ name: '序号', key: "index" });
|
||||
this.subTableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
if (data.status && data.status !== 1) {
|
||||
let tmpstatus: any = data.status
|
||||
if (data.status === 2) {
|
||||
tmpstatus = 1
|
||||
}
|
||||
if (data.status) {
|
||||
return "<span class='color_" + tmpstatus + "'>" + (data.status ? (this.$store.getters.prevention_evaluate_status_map[data.status]) : '') + "</span>"
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
this.subTableColumn.push({ name: '步骤名称', key: "name" });
|
||||
this.subTableColumn.push({ name: '作业步骤描述', key: "description", showTip: true, width: "200px" });
|
||||
this.subTableColumn.push({ name: '作业地点', key: "location" }); this.subTableColumn.push({ name: '风险源', key: "riskSource" });
|
||||
|
|
@ -474,7 +526,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.subTableColumn.push({
|
||||
name: '残余风险等级', key: "remainLevel", width: "200px", render: (data) => {
|
||||
if (data.remainLevel) {
|
||||
return this.$store.getters.prevention_risk_level_map[data.remainRiskLevel]
|
||||
return this.$store.getters.prevention_risk_level_map[data.remainLevel]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -538,7 +590,10 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.deleteData(this.selectData.map((item: any) => item.id))
|
||||
} else if (data.value === "add") {
|
||||
this.isReadonly = false;
|
||||
this.isModifyonly = false;
|
||||
this.showUpdate = true
|
||||
this.jobList = []
|
||||
this.unitList = []
|
||||
this.updateParams = {
|
||||
majorSign: [],
|
||||
items: [],
|
||||
|
|
@ -546,6 +601,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
evaluateUserId: this.account.userId,
|
||||
evaluateUserName: this.account.nickName,
|
||||
} as any
|
||||
this.buildActionsForm()
|
||||
} else if (data.value === "cancel") {
|
||||
this.handleClose()
|
||||
} else if (data.value === "estimateMatrix") {
|
||||
|
|
@ -558,6 +614,11 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.isReadonly = false;
|
||||
} else if (data && data.value === "subDelete") {
|
||||
if (this.subSelectData.length > 0) {
|
||||
this.$confirm('确认删除所选数据', '确认数据', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
if (!this.updateParams.deleteIds) {
|
||||
this.updateParams.deleteIds = []
|
||||
}
|
||||
|
|
@ -570,6 +631,9 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
return item
|
||||
})
|
||||
this.updateParams.stepNum = this.updateParams.steps.length
|
||||
}).catch(() => {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -591,7 +655,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
const areaData = this.areaList.find((itm: any) => itm.value === data) as any;
|
||||
this.updateParams.analRiskLevel = areaData.analRiskLevel
|
||||
|
||||
this.updateParams.analRiskLevel = areaData.analRiskLevel
|
||||
// this.updateParams.analRiskLevel = areaData.analRiskLevel
|
||||
this.updateParams.chargeDeptName = null;
|
||||
this.updateParams.chargeUserId = null;
|
||||
this.updateParams.chargeUserName = null;
|
||||
|
|
@ -643,8 +707,14 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
//是否为两大一重
|
||||
if (item && item.key === 'majorSign') {
|
||||
if (!data) {
|
||||
data = []
|
||||
}
|
||||
if (data.includes(0)) {
|
||||
if (data.length.length > 0) {
|
||||
data.splice(0, data.length)
|
||||
}
|
||||
|
||||
data.push(0)
|
||||
}
|
||||
this.buildUpdateForm()
|
||||
|
|
@ -652,8 +722,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
}
|
||||
//加载作业清单列表
|
||||
public loadJobData(id?) {
|
||||
this.workService.selectByPage({ pageSize: 1000, unitId: id }).then((res: any) => {
|
||||
this.jobList = res.data.datas.map(item => {
|
||||
this.tableService.selectWorkByUnit({ unitId: id }).then((res: any) => {
|
||||
this.jobList = res.data.map(item => {
|
||||
return {
|
||||
name: item.name,
|
||||
value: item.id,
|
||||
|
|
@ -693,6 +763,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.currentId = row.id;
|
||||
this.tableService.selectById(this.currentId).then((res: any) => {
|
||||
if (isReadonly) {
|
||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||
this.updateParams = Object.assign({
|
||||
majorHazardName: !res.data.majorHazard ? null : res.data.majorHazard.split(";").map(item => this.sourceMap[item]).join(";"),
|
||||
regulatoryProcessName: !res.data.regulatoryProcess ? null : res.data.regulatoryProcess.split(";").map(item => this.craftMap[item]).join(";"),
|
||||
|
|
@ -700,7 +771,8 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
majorSignName: !res.data.majorSign ? null : res.data.majorSign.split(";").map(item => this.$store.getters.prevention_majorsign_map[item]).join(";"),
|
||||
riskLevelName: this.$store.getters.prevention_risk_level_map[res.data.riskLevel],
|
||||
remainRiskLevelName: this.$store.getters.prevention_risk_level_map[res.data.remainRiskLevel],
|
||||
typeName: this.$store.getters.prevention_device_type_map[res.data.type]
|
||||
typeName: this.$store.getters.prevention_device_type_map[res.data.type],
|
||||
analRiskLevelName: this.$store.getters.prevention_risk_level_map[areaAnalRiskLevel]
|
||||
}, res.data)
|
||||
this.updateParams.majorSign = this.stringChangeArray(res.data.majorSign)
|
||||
this.updateParams.majorHazard = this.stringChangeArray(res.data.majorHazard)
|
||||
|
|
@ -710,23 +782,27 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
item.index = index + 1;
|
||||
return item
|
||||
})
|
||||
this.isReadonly = true
|
||||
this.isReadonly = true;
|
||||
this.isModifyonly = false
|
||||
} else {
|
||||
this.isReadonly = false
|
||||
this.isModifyonly = true
|
||||
this.updateParams = res.data;
|
||||
this.updateParams.majorSign = this.stringChangeArray(res.data.majorSign)
|
||||
this.updateParams.majorSign = res.data.majorSign ? this.stringChangeArray(res.data.majorSign) : []
|
||||
this.updateParams.majorHazard = this.stringChangeArray(res.data.majorHazard)
|
||||
this.updateParams.regulatoryProcess = this.stringChangeArray(res.data.regulatoryProcess)
|
||||
this.updateParams.regulatoryChemical = this.stringChangeArray(res.data.regulatoryChemical)
|
||||
this.loadUnitData(res.data.areas)
|
||||
const areaAnalRiskLevel = this.areaList.filter((item) => item.value === res.data.areaId)[0]['analRiskLevel']
|
||||
this.updateParams.analRiskLevel = areaAnalRiskLevel
|
||||
this.loadUnitData(res.data.areaId)
|
||||
this.loadJobData(res.data.unitId)
|
||||
this.updateParams.steps.forEach((item, i) => {
|
||||
item.index = i + 1
|
||||
})
|
||||
}
|
||||
|
||||
this.buildUpdateForm()
|
||||
this.buildUpdateForm();
|
||||
this.buildActionsForm();
|
||||
this.showUpdate = true;
|
||||
})
|
||||
}
|
||||
|
|
@ -744,7 +820,7 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.updateParams.regulatoryChemical = this.arrayChangeString(this.updateParams.regulatoryChemical)
|
||||
this.updateParams.majorHazard = this.arrayChangeString(this.updateParams.majorHazard)
|
||||
this.updateParams.safetyFactor = this.arrayChangeString(this.updateParams.safetyFactor)
|
||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id ? true : false).then((res) => {
|
||||
this.tableService.addOrUpdate(this.updateParams, !this.updateParams.id || this.updateParams.status === 1 ? true : false).then((res) => {
|
||||
this.$message.success(!this.updateParams.id ? "新增成功!" : "编辑成功!");
|
||||
this.showUpdate = !!goOn;
|
||||
this.getTableData();
|
||||
|
|
@ -804,7 +880,13 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
riskControlLevelName: this.$store.getters.prevention_control_level_map[row.riskControlLevel],
|
||||
}, row)
|
||||
this.analysisUpdateParams = { ...this.analysisUpdateParams, ...JSON.parse(JSON.stringify(row)) };
|
||||
|
||||
if (!this.analysisUpdateParams.measures) {
|
||||
this.analysisUpdateParams.measures = []
|
||||
}
|
||||
this.analysisUpdateParams.measures.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
return item
|
||||
})
|
||||
} else {
|
||||
this.analyIsReadonly = false
|
||||
// 暂存数据 用于取消修改
|
||||
|
|
@ -814,6 +896,16 @@ export default class WorkAnalManagerComponent extends BaseRecordComponent<any> {
|
|||
this.analysisUpdateParams.riskChoose = row.riskChoose ? row.riskChoose.split(";") : []
|
||||
this.analysisUpdateParams.remainChoose = row.remainChoose ? row.remainChoose.split(";") : []
|
||||
this.analysisUpdateParams.chargeUserName = this.updateParams.chargeUserName
|
||||
this.checkRiskType.risk = this.analysisUpdateParams.riskChoose
|
||||
this.checkRiskType.remain = this.analysisUpdateParams.remainChoose
|
||||
if (!this.analysisUpdateParams.measures) {
|
||||
this.analysisUpdateParams.measures = []
|
||||
}
|
||||
this.analysisUpdateParams.measures.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
return item
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
this.showSubUpdate = true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<div class="common-box dis-flex " >
|
||||
<div class="common-tree-box" v-if="treeData">
|
||||
<el-tree :data="treeData" :expand-on-click-node="false" default-expand-all highlight-current @node-click="handleNodeClick">
|
||||
</el-tree>
|
||||
<div class="common-box dis-flex ">
|
||||
<div class="common-tree-box">
|
||||
<UnitTreeComponent @callback="handleNodeClick"></UnitTreeComponent>
|
||||
</div>
|
||||
<div class="common-content-box dis-flex flex-col flex-1">
|
||||
<div class="search-box">
|
||||
|
|
@ -10,23 +9,32 @@
|
|||
</div>
|
||||
<div class="table-box flex-1">
|
||||
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
||||
@actionCallback="callback($event)" @pageNumberChange="callback($event)" @pageSizeChange="callback($event)"
|
||||
:footerActions="footerActions" :actions="tableActions">
|
||||
@actionCallback="callback($event)" @pageNumberChange="callback($event)"
|
||||
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
|
||||
|
||||
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" label="全选" width="60">
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template v-for="item in tableColumn">
|
||||
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
|
||||
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
|
||||
<div slot-scope="scope" v-html="item.render(scope.row)" :filters="item.filters"
|
||||
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip"></div>
|
||||
</el-table-column>
|
||||
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key">
|
||||
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key"
|
||||
:filters="item.filters" :filter-method="item.filterMethod"
|
||||
:show-overflow-tooltip="item.showTip">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="deleteData([scope.row])">排查</el-button>
|
||||
<el-button v-if="scope.row.status===2" type="text"
|
||||
@click="showSubModal(scope.row)">排查</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -35,8 +43,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'" :visible.sync="showUpdate" width="952px"
|
||||
<el-dialog :close-on-click-modal="false" :title="'排查信息'" :visible.sync="showUpdate" width="800px"
|
||||
:before-close="handleClose">
|
||||
<FormComponent :options="updateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right" :data.sync="updateParams"></FormComponent>
|
||||
<FormComponent :options="subUpdateOptions" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||
:actions="subActions" @actionCallback="subActionCallback" @change="changes" :full-btn="true" btnPosition="center">
|
||||
</FormComponent>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
|
@ -9,12 +9,16 @@ import DutyService from "@/service/duty.service"
|
|||
import FormOption from "hbt-common/models/formOptions"
|
||||
import BtnOption from "hbt-common/models/btnOptions"
|
||||
import DrawComponent from '@/components/draw.component.vue';
|
||||
import UnitTreeComponent from '@/components/tree.component.vue';
|
||||
import moment from 'moment';
|
||||
|
||||
@Component({
|
||||
template,
|
||||
components:{
|
||||
components: {
|
||||
FormComponent,
|
||||
TableComponent,
|
||||
DrawComponent,
|
||||
UnitTreeComponent,
|
||||
},
|
||||
})
|
||||
export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
||||
|
|
@ -22,140 +26,322 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public params = {} as any;
|
||||
|
||||
public treeData = [{
|
||||
label: '一级 1',
|
||||
children: [{
|
||||
label: '二级 1-1',
|
||||
children: [{
|
||||
label: '三级 1-1-1'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
label: '一级 2',
|
||||
children: [{
|
||||
label: '二级 2-1',
|
||||
children: [{
|
||||
label: '三级 2-1-1'
|
||||
}]
|
||||
}, {
|
||||
label: '二级 2-2',
|
||||
children: [{
|
||||
label: '三级 2-2-1'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
label: '一级 3',
|
||||
children: [{
|
||||
label: '二级 3-1',
|
||||
children: [{
|
||||
label: '三级 3-1-1'
|
||||
}]
|
||||
}, {
|
||||
label: '二级 3-2',
|
||||
children: [{
|
||||
label: '三级 3-2-1'
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
|
||||
public formActions = [{
|
||||
name:"查询",
|
||||
value:"search",
|
||||
icon:"el-icon-search",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"清空",
|
||||
icon:"el-icon-tickets",
|
||||
value:"reset"
|
||||
name: "查询",
|
||||
value: "search",
|
||||
icon: "el-icon-search",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "清空",
|
||||
icon: "el-icon-tickets",
|
||||
value: "reset"
|
||||
}];
|
||||
public tableActions = [{
|
||||
name:"批量删除",
|
||||
value:"delete",
|
||||
plain:true,
|
||||
icon:"el-icon-delete",
|
||||
type:"danger"
|
||||
name: "批量删除",
|
||||
value: "delete",
|
||||
plain: true,
|
||||
icon: "el-icon-delete",
|
||||
type: "danger"
|
||||
}];
|
||||
public footerActions = [{
|
||||
name:"选择全部",
|
||||
value:"selectAll",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"反向选择",
|
||||
value:"reverse"
|
||||
name: "选择全部",
|
||||
value: "selectAll",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "反向选择",
|
||||
value: "reverse"
|
||||
}];
|
||||
public formOptions:FormOption<BtnOption>[] = [{
|
||||
name:"区域名称",
|
||||
key:"areaId",
|
||||
type:"text",
|
||||
},{
|
||||
name:"单元名称",
|
||||
key:"unitId",
|
||||
type:"text",
|
||||
public formOptions: FormOption<BtnOption>[] = [{
|
||||
name: "管控对象",
|
||||
key: "analControlName",
|
||||
type: "text",
|
||||
}, {
|
||||
name: "分析对象",
|
||||
key: "itemName",
|
||||
type: "text",
|
||||
}];
|
||||
|
||||
public showUpdate = false;
|
||||
public updateParams = {} as any;
|
||||
public selectData = [];
|
||||
|
||||
created(){
|
||||
public fileList = [] as any;
|
||||
public photoList = [] as any;
|
||||
|
||||
public showFile = false;
|
||||
|
||||
public currentUrl = null;
|
||||
|
||||
public account = JSON.parse(localStorage.getItem("account") as any);
|
||||
|
||||
public userListName = {} as any;
|
||||
|
||||
public subUpdateOptions = [] as any;
|
||||
public subUpdateForm() {
|
||||
this.subUpdateOptions = [{
|
||||
name: "是否包保责任人任务",
|
||||
key: "insuranceDutyFlag",
|
||||
format: "insuranceDutyFlagName",
|
||||
type: "radio",
|
||||
width: "100%",
|
||||
labelWidth: 'auto',
|
||||
require: true,
|
||||
disable: true,
|
||||
datas: [
|
||||
{
|
||||
name: "否",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: "是",
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: "隐患排查任务",
|
||||
key: "taskName",
|
||||
type: "text",
|
||||
width: "100%",
|
||||
require: true,
|
||||
disable: true,
|
||||
}, {
|
||||
name: "排查结果",
|
||||
key: "result",
|
||||
type: "radio",
|
||||
width: "100%",
|
||||
require: true,
|
||||
datas: [
|
||||
{
|
||||
name: "正常",
|
||||
value: 1
|
||||
},
|
||||
{
|
||||
name: "异常",
|
||||
value: 2
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: "是否为隐患",
|
||||
key: "dangerFlag",
|
||||
format: "dangerFlagName",
|
||||
type: "radio",
|
||||
width: "100%",
|
||||
labelWidth: 'auto',
|
||||
require: true,
|
||||
disable: this.updateParams.result === 2,
|
||||
datas: [
|
||||
{
|
||||
name: "否",
|
||||
value: 0
|
||||
},
|
||||
{
|
||||
name: "是",
|
||||
value: 1
|
||||
}
|
||||
]
|
||||
}, {
|
||||
name: "问题描述",
|
||||
key: "taskName",
|
||||
type: "textarea",
|
||||
width: "100%",
|
||||
require: true,
|
||||
}, {
|
||||
name: "隐患类别",
|
||||
key: "taskType",
|
||||
format: "taskTypeName",
|
||||
type: "select",
|
||||
width: "100%",
|
||||
require: true,
|
||||
datas: this.$store.state.prevention_hazard_category,
|
||||
}, {
|
||||
name: "隐患归属人",
|
||||
key: "ownerId",
|
||||
type: "select",
|
||||
width: "100%",
|
||||
require: true,
|
||||
datas: this.$store.state.userList,
|
||||
},
|
||||
{
|
||||
name: "IMEI码",
|
||||
key: "imeiCode",
|
||||
type: "text",
|
||||
width: "100%",
|
||||
require: true,
|
||||
disable: true,
|
||||
},
|
||||
{
|
||||
name: " 排查人",
|
||||
key: "checkUserId",
|
||||
type: "select",
|
||||
width: "100%",
|
||||
require: true,
|
||||
disable: true,
|
||||
datas: this.$store.state.userList,
|
||||
},
|
||||
{
|
||||
name: " 排查时间",
|
||||
key: "checkTime",
|
||||
type: "text",
|
||||
width: "100%",
|
||||
require: true,
|
||||
disable: true,
|
||||
}, {
|
||||
|
||||
name: "附件",
|
||||
key: "resourceId",
|
||||
ref: "file",
|
||||
type: "upload",
|
||||
width: "calc(50% - 20px)",
|
||||
showError: false,
|
||||
onSucess: this.onSuccess2,
|
||||
onMove: this.onRemove2,
|
||||
onPreview: this.onPreview,
|
||||
autoUpload: true,
|
||||
accept: "image/png, image/jpeg,.doc,.docx,.xls,.xlsx,.pdf",
|
||||
listType: "text",
|
||||
tip: "请上传.pdf,.png,.jpg,.doc.docx,.xls,.xlsx格式文件",
|
||||
fileList: this.fileList,
|
||||
btn: [{
|
||||
name: "点击上传",
|
||||
value: "upload",
|
||||
size: "small",
|
||||
type: "primary"
|
||||
}]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
public subActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存并提交",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}]
|
||||
|
||||
|
||||
|
||||
created() {
|
||||
this.subUpdateForm()
|
||||
}
|
||||
// 树点击
|
||||
public handleNodeClick(data){
|
||||
console.log(data)
|
||||
public handleNodeClick(data) {
|
||||
this.params.unitName = "";
|
||||
this.params.areaName = "";
|
||||
if (data.areaId) {
|
||||
this.params.unitName = data.name
|
||||
} else {
|
||||
this.params.areaName = data.name === "全部" ? "" : data.name
|
||||
}
|
||||
this.getTableData()
|
||||
}
|
||||
|
||||
public buildTable(){
|
||||
this.tableColumn.push({name:'序号',key:"index"});
|
||||
this.tableColumn.push({name:'管控对象',key:"deptName"});
|
||||
this.tableColumn.push({name:'分析对象',key:"deptName"});
|
||||
this.tableColumn.push({name:'管控措施',key:"deptName"});
|
||||
this.tableColumn.push({name:'隐患排查任务',key:"person"});
|
||||
this.tableColumn.push({name:'结束时间',key:"person"});
|
||||
this.tableColumn.push({name:'责任人',key:"person"});
|
||||
this.tableColumn.push({name:'生成时间',key:"person"});
|
||||
this.tableColumn.push({name:'任务状态', width:"110px",key:"status",render:(data)=>{
|
||||
if(data.status==0){
|
||||
return "<span class='noDraw'>未绘制</span>"
|
||||
}else{
|
||||
return "<span>已绘制</span>"
|
||||
public buildTable() {
|
||||
this.tableColumn.push({ name: '管控对象', key: "analControlName" });
|
||||
this.tableColumn.push({ name: '分析对象', key: "itemName" });
|
||||
this.tableColumn.push({ name: '管控措施', key: "measureDescription" });
|
||||
this.tableColumn.push({ name: '隐患排查任务', key: "taskName" });
|
||||
this.tableColumn.push({ name: '结束时间', key: "endTime" });
|
||||
this.tableColumn.push({ name: '责任人', key: "taskChargeUserName" });
|
||||
this.tableColumn.push({ name: '生成时间', key: "generateTime" });
|
||||
this.tableColumn.push({
|
||||
name: '任务状态', width: "110px", key: "status", render: (data) => {
|
||||
if (data.status == 2) {
|
||||
return "<span class='noDraw'>待排查</span>"
|
||||
} else if (data.status == 1) {
|
||||
return "<span>已排查</span>"
|
||||
} else if (data.status == 3) {
|
||||
return "<span class='noDraw'>超期未排查</span>"
|
||||
}
|
||||
}});
|
||||
},
|
||||
filters: this.$store.state.prevention_task_status.map(item => {
|
||||
return {
|
||||
text: item.name,
|
||||
value: item.value,
|
||||
}
|
||||
}), filterMethod: (data, row) => {
|
||||
return row.status === data;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public callback(data){
|
||||
public callback(data) {
|
||||
// 查询
|
||||
if(data.value==="search"){
|
||||
if (data.value === "search") {
|
||||
this.getTableData()
|
||||
// 重置
|
||||
}else if(data.value === "reset"){
|
||||
} else if (data.value === "reset") {
|
||||
this.reset()
|
||||
// 反选
|
||||
}else if(data.value === "reverse"){
|
||||
} else if (data.value === "reverse") {
|
||||
this.toggleAll()
|
||||
// 全选
|
||||
}else if(data.value === "selectAll"){
|
||||
} else if (data.value === "selectAll") {
|
||||
this.selectAll()
|
||||
}else if(data.value === "delete"){
|
||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
||||
} else if (data.value === "delete") {
|
||||
this.deleteData(this.selectData.map((item: any) => item.id))
|
||||
}
|
||||
}
|
||||
|
||||
public subActionCallback(data) {
|
||||
if (data.value === "cancel") {
|
||||
this.showUpdate = false
|
||||
this.updateParams = {} as any;
|
||||
} else if (data.value === "save") {
|
||||
this.doSave()
|
||||
}
|
||||
}
|
||||
|
||||
public doSave() {
|
||||
if (this.fileList.length > 0) {
|
||||
let resourceId = this.fileList.map((item) => {
|
||||
return item.id
|
||||
})
|
||||
this.updateParams.resourceId = resourceId.join(";")
|
||||
}
|
||||
|
||||
this.$store.state.userList.map((item) => {
|
||||
this.userListName[item.value] = item.name
|
||||
})
|
||||
|
||||
|
||||
this.updateParams.taskChargeUserName = this.userListName[this.updateParams.checkUserId]
|
||||
this.updateParams.ownerName = this.userListName[this.updateParams.ownerId]
|
||||
this.tableService.addOrUpdate(this.updateParams, this.updateParams.id).then((res) => {
|
||||
this.$message.success("编辑成功!");
|
||||
this.showUpdate = false
|
||||
this.getTableData();
|
||||
})
|
||||
}
|
||||
|
||||
public changes(data, item) {
|
||||
if (item && item.key === "result") {
|
||||
if (data === 2) {
|
||||
this.updateParams.dangerFlag = 1
|
||||
}
|
||||
this.subUpdateForm()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 重置数据
|
||||
public reset(){
|
||||
public reset() {
|
||||
this.params = {
|
||||
pageNum:1,
|
||||
pageSize:20,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
} as any;
|
||||
}
|
||||
// 删除数据
|
||||
|
||||
|
||||
|
||||
public showUpdateModel(id){
|
||||
public showUpdateModel(id) {
|
||||
this.showUpdate = true
|
||||
}
|
||||
|
||||
public handleClose(){
|
||||
public handleClose() {
|
||||
this.showUpdate = false;
|
||||
}
|
||||
|
||||
|
|
@ -163,22 +349,76 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
public toggleAll() {
|
||||
(this.$refs.multipleTable as any).toggleAllSelection();
|
||||
}
|
||||
public selectAll(){
|
||||
if(!this.selectData.length){
|
||||
public selectAll() {
|
||||
if (!this.selectData.length) {
|
||||
this.toggleAll()
|
||||
}else{
|
||||
this.tableData.datas.forEach((item,index)=>{
|
||||
const find = this.selectData.find((data:any)=>data.userId === item.userId);
|
||||
if(!find){
|
||||
} else {
|
||||
this.tableData.datas.forEach((item, index) => {
|
||||
const find = this.selectData.find((data: any) => data.userId === item.userId);
|
||||
if (!find) {
|
||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public handleSelectionChange(data){
|
||||
public handleSelectionChange(data) {
|
||||
this.selectData = data;
|
||||
}
|
||||
|
||||
|
||||
public onSuccess(res, file, fileList) {
|
||||
if (res.code === 200) {
|
||||
this.photoList.push({
|
||||
name: res.data.originalName,
|
||||
url: res.data.url,
|
||||
type: res.data.type,
|
||||
id: res.data.id
|
||||
});
|
||||
this.updateParams.photo = this.photoList.length || null
|
||||
}
|
||||
}
|
||||
public onSuccess2(res, file, fileList) {
|
||||
if (res.code === 200) {
|
||||
this.fileList.push({
|
||||
name: res.data.originalName,
|
||||
url: res.data.url,
|
||||
type: res.data.type,
|
||||
id: res.data.id
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public onRemove(file, fileList) {
|
||||
this.photoList.splice(this.photoList.findIndex(item => item.id === file.response.data.id), 1)
|
||||
this.updateParams.photo = this.photoList.length || null
|
||||
}
|
||||
public onRemove2(file, fileList) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.id === file.response.data.id), 1)
|
||||
}
|
||||
|
||||
public onPreview(file) {
|
||||
if (file.type.indexOf("png") >= 0 || file.type.indexOf("jp") >= 0) {
|
||||
this.currentUrl = file.url;
|
||||
this.showFile = true;
|
||||
} else {
|
||||
window.open(file.url, "_blank")
|
||||
}
|
||||
}
|
||||
//排查任务
|
||||
public showSubModal(row) {
|
||||
const mathData = Math.floor(Math.random() * 1000);
|
||||
this.updateParams = Object.assign({
|
||||
checkUserId: this.account.userId,
|
||||
checkTime: moment().format('YYYY-MM-DD HH:mm'),
|
||||
imeiCode: moment().format('DDHHmm') + mathData,
|
||||
}, row)
|
||||
this.updateParams.status = 1
|
||||
this.updateParams.endTime = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
this.subUpdateForm()
|
||||
this.showUpdate = true
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped src="../../common.component.scss"></style>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<div class="common-box dis-flex " >
|
||||
<div class="common-tree-box" v-if="treeData">
|
||||
<el-tree :data="treeData" :expand-on-click-node="false" default-expand-all highlight-current @node-click="handleNodeClick">
|
||||
</el-tree>
|
||||
<div class="common-tree-box">
|
||||
<UnitTreeComponent @callback="handleNodeClick"></UnitTreeComponent>
|
||||
</div>
|
||||
<div class="common-content-box dis-flex flex-col flex-1">
|
||||
<div class="search-box">
|
||||
|
|
@ -17,6 +16,11 @@
|
|||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
<el-table-column type="selection" label="全选" width="60">
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template v-for="item in tableColumn">
|
||||
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key">
|
||||
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
|
||||
|
|
@ -26,7 +30,7 @@
|
|||
</template>
|
||||
<el-table-column label="操作" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="deleteData([scope.row])">查看</el-button>
|
||||
<el-button type="text" @click="showSubModal(scope.row)">查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -35,8 +39,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog :close-on-click-modal="false" :title="currentId>0?'详情':currentId===-1?'新增':'编辑'" :visible.sync="showUpdate" width="952px"
|
||||
<el-dialog :close-on-click-modal="false" :title="'排查信息'" :visible.sync="showUpdate" width="800px"
|
||||
:before-close="handleClose">
|
||||
<FormComponent :options="updateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right" :data.sync="updateParams"></FormComponent>
|
||||
<FormComponent :options="subUpdateOptions" :isReadonly="true" labelWidth="110px" labelAlign="right" :data.sync="updateParams"
|
||||
:actions="subActions" @actionCallback="subActionCallback" @change="changes" :full-btn="true" btnPosition="center">
|
||||
</FormComponent>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
|
@ -9,166 +9,254 @@ import DutyService from "@/service/duty.service"
|
|||
import FormOption from "hbt-common/models/formOptions"
|
||||
import BtnOption from "hbt-common/models/btnOptions"
|
||||
import DrawComponent from '@/components/draw.component.vue';
|
||||
import UnitTreeComponent from '@/components/tree.component.vue';
|
||||
|
||||
|
||||
@Component({
|
||||
template,
|
||||
components:{
|
||||
components: {
|
||||
FormComponent,
|
||||
TableComponent,
|
||||
DrawComponent,
|
||||
UnitTreeComponent,
|
||||
},
|
||||
})
|
||||
|
||||
export default class DutyRecordsManagerComponent extends BaseRecordComponent<any> {
|
||||
public tableService = new DutyService();
|
||||
|
||||
public params = {} as any;
|
||||
|
||||
public treeData = [{
|
||||
label: '一级 1',
|
||||
children: [{
|
||||
label: '二级 1-1',
|
||||
children: [{
|
||||
label: '三级 1-1-1'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
label: '一级 2',
|
||||
children: [{
|
||||
label: '二级 2-1',
|
||||
children: [{
|
||||
label: '三级 2-1-1'
|
||||
}]
|
||||
}, {
|
||||
label: '二级 2-2',
|
||||
children: [{
|
||||
label: '三级 2-2-1'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
label: '一级 3',
|
||||
children: [{
|
||||
label: '二级 3-1',
|
||||
children: [{
|
||||
label: '三级 3-1-1'
|
||||
}]
|
||||
}, {
|
||||
label: '二级 3-2',
|
||||
children: [{
|
||||
label: '三级 3-2-1'
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
|
||||
public formActions = [{
|
||||
name:"查询",
|
||||
value:"search",
|
||||
icon:"el-icon-search",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"清空",
|
||||
icon:"el-icon-tickets",
|
||||
value:"reset"
|
||||
name: "查询",
|
||||
value: "search",
|
||||
icon: "el-icon-search",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "清空",
|
||||
icon: "el-icon-tickets",
|
||||
value: "reset"
|
||||
}];
|
||||
public tableActions = [{
|
||||
name:"批量删除",
|
||||
value:"delete",
|
||||
plain:true,
|
||||
icon:"el-icon-delete",
|
||||
type:"danger"
|
||||
name: "批量删除",
|
||||
value: "delete",
|
||||
plain: true,
|
||||
icon: "el-icon-delete",
|
||||
type: "danger"
|
||||
}];
|
||||
public footerActions = [{
|
||||
name:"选择全部",
|
||||
value:"selectAll",
|
||||
type:"primary"
|
||||
},{
|
||||
name:"反向选择",
|
||||
value:"reverse"
|
||||
name: "选择全部",
|
||||
value: "selectAll",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "反向选择",
|
||||
value: "reverse"
|
||||
}];
|
||||
public formOptions:FormOption<BtnOption>[] = [{
|
||||
name:"排查结果",
|
||||
key:"areaId",
|
||||
type:"select",
|
||||
datas:[{
|
||||
name:"部门1",
|
||||
value:0
|
||||
},{
|
||||
name:"部门2",
|
||||
value:1
|
||||
public formOptions: FormOption<BtnOption>[] = [{
|
||||
name: "排查结果",
|
||||
key: "result",
|
||||
type: "select",
|
||||
datas: [{
|
||||
name: "正常",
|
||||
value: 1
|
||||
}, {
|
||||
name: "异常",
|
||||
value: 2
|
||||
}]
|
||||
},{
|
||||
name:"是否为隐患",
|
||||
key:"unitId",
|
||||
type:"select",
|
||||
datas:[{
|
||||
name:"单元1",
|
||||
value:0
|
||||
},{
|
||||
name:"单元2",
|
||||
value:1
|
||||
}, {
|
||||
name: "是否为隐患",
|
||||
key: "dangerFlag",
|
||||
type: "select",
|
||||
datas: [{
|
||||
name: "否",
|
||||
value: 0
|
||||
}, {
|
||||
name: "是",
|
||||
value: 1
|
||||
}]
|
||||
}];
|
||||
|
||||
public showUpdate = false;
|
||||
|
||||
public updateParams = {} as any;
|
||||
|
||||
public selectData = [];
|
||||
|
||||
created(){
|
||||
public fileList = [] as any;
|
||||
public photoList = [] as any;
|
||||
|
||||
public showFile = false;
|
||||
|
||||
public currentUrl = null;
|
||||
|
||||
public subUpdateOptions = [] as any;
|
||||
public subUpdateForm() {
|
||||
this.subUpdateOptions = [{
|
||||
name: "是否包保责任人任务",
|
||||
key: "insuranceDutyFlag",
|
||||
format: "insuranceDutyFlagName",
|
||||
type: "text",
|
||||
labelWidth: 'auto',
|
||||
require: true,
|
||||
with: "100%"
|
||||
}, {
|
||||
name: "隐患排查任务",
|
||||
key: "taskName",
|
||||
type: "text",
|
||||
require: true,
|
||||
with: "calc(50% - 20px)"
|
||||
}, {
|
||||
name: "排查结果",
|
||||
key: "result",
|
||||
format: "resultName",
|
||||
type: "radio",
|
||||
require: true,
|
||||
with: "calc(50% - 20px)"
|
||||
}, {
|
||||
name: "是否为隐患",
|
||||
key: "dangerFlag",
|
||||
format: "dangerFlagName",
|
||||
type: "radio",
|
||||
labelWidth: 'auto',
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
}, {
|
||||
name: "问题描述",
|
||||
key: "taskName",
|
||||
type: "textarea",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
}, {
|
||||
name: "隐患类别",
|
||||
key: "dangerType",
|
||||
format: "taskTypeName",
|
||||
type: "select",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
}, {
|
||||
name: "隐患归属人",
|
||||
key: "ownerId",
|
||||
format: "ownerName",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
},
|
||||
{
|
||||
name: "IMEI码",
|
||||
key: "imeiCode",
|
||||
type: "text",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
},
|
||||
{
|
||||
name: " 排查人",
|
||||
key: "checkUserId",
|
||||
type: "text",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
},
|
||||
{
|
||||
name: " 排查时间",
|
||||
key: "checkTime",
|
||||
type: "text",
|
||||
width: "100%",
|
||||
require: true,
|
||||
}, {
|
||||
|
||||
name: "附件",
|
||||
key: "resourceId",
|
||||
ref: "file",
|
||||
format: "resourceIdName",
|
||||
type: "upload",
|
||||
width: "calc(50% - 20px)",
|
||||
showError: false,
|
||||
onSucess: this.onSuccess2,
|
||||
onMove: this.onRemove2,
|
||||
onPreview: this.onPreview,
|
||||
autoUpload: true,
|
||||
accept: "image/png, image/jpeg",
|
||||
listType: "picture-card",
|
||||
fileList: this.photoList,
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
created() {
|
||||
|
||||
}
|
||||
// 树点击
|
||||
public handleNodeClick(data){
|
||||
console.log(data)
|
||||
public handleNodeClick(data) {
|
||||
this.params.unitId = "";
|
||||
this.params.areaId = "";
|
||||
if (data.areaId) {
|
||||
this.params.unitId = data.id
|
||||
} else {
|
||||
this.params.areaId = data.id
|
||||
}
|
||||
this.getTableData()
|
||||
}
|
||||
|
||||
public buildTable(){
|
||||
this.tableColumn.push({name:'序号',key:"index"});
|
||||
this.tableColumn.push({name:'隐患排查任务',key:"deptName"});
|
||||
this.tableColumn.push({name:'排查结果', width:"110px",key:"status",render:(data)=>{
|
||||
if(data.status==0){
|
||||
return "<span class='noDraw'>未绘制</span>"
|
||||
}else{
|
||||
return "<span>已绘制</span>"
|
||||
public buildTable() {
|
||||
this.tableColumn.push({ name: '隐患排查任务', key: "taskName", with: "250px" });
|
||||
this.tableColumn.push({
|
||||
name: '排查结果', width: "110px", key: "result", render: (data) => {
|
||||
if (data.status == 0) {
|
||||
return "<span class='noDraw'>异常</span>"
|
||||
} else if (data.status == 1) {
|
||||
return "<span>正常</span>"
|
||||
}
|
||||
}});
|
||||
this.tableColumn.push({name:'问题描述',key:"deptName"});
|
||||
this.tableColumn.push({name:'排查人',key:"deptName"});
|
||||
this.tableColumn.push({name:'排查时间',key:"person"});
|
||||
this.tableColumn.push({name:'是否为隐患',key:"person"});
|
||||
this.tableColumn.push({name:'隐患归属人',key:"person"});
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '问题描述', key: "description" });
|
||||
this.tableColumn.push({ name: '排查人', key: "checkUserId" });
|
||||
this.tableColumn.push({ name: '排查时间', key: "checkTime" });
|
||||
this.tableColumn.push({
|
||||
name: '是否为隐患', key: "dangerFlag", render: (data) => {
|
||||
if (data.status == 1) {
|
||||
return "<span class='noDraw'>是</span>"
|
||||
} else if (data.status == 0) {
|
||||
return "<span>否</span>"
|
||||
}
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '隐患归属人', key: "ownerName" });
|
||||
|
||||
}
|
||||
|
||||
public callback(data){
|
||||
public callback(data) {
|
||||
// 查询
|
||||
if(data.value==="search"){
|
||||
if (data.value === "search") {
|
||||
this.getTableData()
|
||||
// 重置
|
||||
}else if(data.value === "reset"){
|
||||
} else if (data.value === "reset") {
|
||||
this.reset()
|
||||
// 反选
|
||||
}else if(data.value === "reverse"){
|
||||
} else if (data.value === "reverse") {
|
||||
this.toggleAll()
|
||||
// 全选
|
||||
}else if(data.value === "selectAll"){
|
||||
} else if (data.value === "selectAll") {
|
||||
this.selectAll()
|
||||
}else if(data.value === "delete"){
|
||||
this.deleteData(this.selectData.map((item:any)=>item.id))
|
||||
} else if (data.value === "delete") {
|
||||
this.deleteData(this.selectData.map((item: any) => item.id))
|
||||
}
|
||||
}
|
||||
// 重置数据
|
||||
public reset(){
|
||||
public reset() {
|
||||
this.params = {
|
||||
pageNum:1,
|
||||
pageSize:20,
|
||||
pageNum: 1,
|
||||
pageSize: 20,
|
||||
} as any;
|
||||
}
|
||||
// 删除数据
|
||||
|
||||
|
||||
|
||||
public showUpdateModel(id){
|
||||
public showUpdateModel(id) {
|
||||
this.showUpdate = true
|
||||
}
|
||||
|
||||
public handleClose(){
|
||||
public handleClose() {
|
||||
this.showUpdate = false;
|
||||
}
|
||||
|
||||
|
|
@ -176,22 +264,91 @@ export default class DutyRecordsManagerComponent extends BaseRecordComponent<any
|
|||
public toggleAll() {
|
||||
(this.$refs.multipleTable as any).toggleAllSelection();
|
||||
}
|
||||
public selectAll(){
|
||||
if(!this.selectData.length){
|
||||
public selectAll() {
|
||||
if (!this.selectData.length) {
|
||||
this.toggleAll()
|
||||
}else{
|
||||
this.tableData.datas.forEach((item,index)=>{
|
||||
const find = this.selectData.find((data:any)=>data.userId === item.userId);
|
||||
if(!find){
|
||||
} else {
|
||||
this.tableData.datas.forEach((item, index) => {
|
||||
const find = this.selectData.find((data: any) => data.userId === item.userId);
|
||||
if (!find) {
|
||||
(this.$refs.multipleTable as any).toggleRowSelection(item);
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
public handleSelectionChange(data){
|
||||
public handleSelectionChange(data) {
|
||||
this.selectData = data;
|
||||
}
|
||||
|
||||
|
||||
public onSuccess(res, file, fileList) {
|
||||
if (res.code === 200) {
|
||||
this.photoList.push({
|
||||
name: res.data.originalName,
|
||||
url: res.data.url,
|
||||
type: res.data.type,
|
||||
id: res.data.id
|
||||
});
|
||||
this.updateParams.photo = this.photoList.length || null
|
||||
}
|
||||
}
|
||||
public onSuccess2(res, file, fileList) {
|
||||
if (res.code === 200) {
|
||||
this.fileList.push({
|
||||
name: res.data.originalName,
|
||||
url: res.data.url,
|
||||
type: res.data.type,
|
||||
id: res.data.id
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public onRemove(file, fileList) {
|
||||
this.photoList.splice(this.photoList.findIndex(item => item.id === file.response.data.id), 1)
|
||||
this.updateParams.photo = this.photoList.length || null
|
||||
}
|
||||
public onRemove2(file, fileList) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.id === file.response.data.id), 1)
|
||||
}
|
||||
|
||||
public onPreview(file) {
|
||||
if (file.type.indexOf("png") >= 0 || file.type.indexOf("jp") >= 0) {
|
||||
this.currentUrl = file.url;
|
||||
this.showFile = true;
|
||||
} else {
|
||||
window.open(file.url, "_blank")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public showSubModal(row) {
|
||||
this.photoList = []
|
||||
if (row.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: row.resourceId.split(";") }).then((photos: any) => {
|
||||
this.photoList = photos.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
url: item.url,
|
||||
type: item.type,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
this.subUpdateForm()
|
||||
})
|
||||
}
|
||||
|
||||
this.updateParams = Object.assign({
|
||||
insuranceDutyFlagName: row.insuranceDutyFlag === 0 ? '否' : '是',
|
||||
resultName: row.result === 1 ? '正常' : '异常',
|
||||
dangerFlagName: row.dangerFlag === 0 ? '否' : '是',
|
||||
taskTypeName: this.$store.getters.prevention_hazard_category_map[row.dangerType]
|
||||
}, row)
|
||||
this.showUpdate = true
|
||||
this.updateParams.resourceId= null
|
||||
this.subUpdateForm()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped src="../../common.component.scss"></style>
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ export default class MeasuresManagerComponent extends BaseRecordComponent<any> {
|
|||
return "<span class='link'>" + (data.details ? data.details.length : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '涉及岗位', key: "postName", width: "200px" });
|
||||
this.tableColumn.push({ name: '涉及岗位', key: "postName" });
|
||||
|
||||
|
||||
//管控措施详情
|
||||
|
|
|
|||
|
|
@ -13,24 +13,24 @@
|
|||
@pageSizeChange="callback($event)" :footerActions="footerActions" :actions="tableActions">
|
||||
|
||||
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
|
||||
@selection-change="handleSelectionChange" style="width: 100%">
|
||||
@selection-change="handleSelectionChange" style="width: 100%" highlight-current-row>
|
||||
<el-table-column type="selection" label="全选" width="60">
|
||||
</el-table-column>
|
||||
<template v-for="item in tableColumn">
|
||||
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key"
|
||||
:filters="item.filters" :filter-method="item.filterMethod"
|
||||
:show-overflow-tooltip="item.showTip">
|
||||
<el-table-column class="cursor td-content" v-if="item.render" :label="item.name"
|
||||
:width="item.width" :key="item.key" :filters="item.filters" :filter-multiple="false"
|
||||
:filter-method="item.filterMethod" :show-overflow-tooltip="item.showTip">
|
||||
<div slot-scope="scope" v-html="item.render(scope.row)"></div>
|
||||
</el-table-column>
|
||||
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key"
|
||||
:filters="item.filters" :filter-method="item.filterMethod"
|
||||
:show-overflow-tooltip="item.showTip">
|
||||
:filters="item.filters" :filter-method="item.filterMethod" :filter-multiple="false"
|
||||
:show-overflow-tooltip="item.showTip" class="cursor td-content">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="deleteData([scope.row])">删除</el-button>
|
||||
<el-button type="text" @click="showSubModal(scope.row.id)">查看执行纪律</el-button>
|
||||
<el-button type="text" @click="showSubModal(scope.row.id)">查看执行纪录</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
|
@ -58,4 +58,5 @@
|
|||
<ButtonListComponent :actions="subActions" @callback="subCallback" btn-position="center" :full-btn="true">
|
||||
</ButtonListComponent>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
|
@ -49,11 +49,21 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
|
||||
public currentProTableData = { datas: [] } as any;
|
||||
|
||||
public filterStatusData: any;
|
||||
|
||||
public subActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}];
|
||||
|
||||
public filters = [{
|
||||
text: "已发布",
|
||||
value: 0
|
||||
}, {
|
||||
text: "未发布",
|
||||
value: 1
|
||||
}]
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
|
@ -95,7 +105,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
|
||||
public showUpdate = false;
|
||||
public updateParams = {} as any;
|
||||
public selectData = [];
|
||||
public selectData = [] as any;
|
||||
|
||||
created() {
|
||||
this.$store.state.prevention_measures_sort.map((item) => {
|
||||
|
|
@ -119,25 +129,34 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
|
||||
public buildTable() {
|
||||
this.tableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
if (data.status == 1) {
|
||||
name: '状态', key: "status", width: "80px", render: (data) => {
|
||||
if (data.status == 0) {
|
||||
return "<span class='noDraw'>未发布</span>"
|
||||
} else {
|
||||
} else if (data.status == 1) {
|
||||
return "<span>已发布</span>"
|
||||
}
|
||||
},
|
||||
filters: this.filters.map(item => {
|
||||
return {
|
||||
text: item.text,
|
||||
value: item.value,
|
||||
}
|
||||
}), filterMethod: (data, row) => {
|
||||
this.filterStatusData = data
|
||||
return row.status === data;
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '区域名称', key: "areaName", width: "200px",
|
||||
name: '区域名称', key: "areaName", width: "130px",
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '单元名称', key: "unitName", width: "200px",
|
||||
name: '单元名称', key: "unitName", width: "130px",
|
||||
});
|
||||
this.tableColumn.push({ name: '管控对象', key: "analControlName", width: "200px" });
|
||||
this.tableColumn.push({ name: '分析对象', key: "itemName", width: "200px" });
|
||||
this.tableColumn.push({ name: '风险源', key: "itemRiskSource", width: "200px" });
|
||||
this.tableColumn.push({ name: '分析对象', key: "itemName", width: "100px" });
|
||||
this.tableColumn.push({ name: '风险源', key: "itemRiskSource", width: "120px" });
|
||||
this.tableColumn.push({
|
||||
name: '事故后果', key: "itemSeriousResult", width: "250px",
|
||||
name: '事故后果', key: "itemSeriousResult", width: "100px",
|
||||
render: (data) => {
|
||||
if (data.itemSeriousResult) {
|
||||
return data.itemSeriousResult.split(";").map(item => this.$store.getters.prevention_serious_result_map[item]).join(";")
|
||||
|
|
@ -145,7 +164,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '风险等级', key: "itemRiskLevel",width:"150px", render: (data) => {
|
||||
name: '风险等级', key: "itemRiskLevel", width: "100px", render: (data) => {
|
||||
return "<span class='color_" + data.itemRiskLevel + "'>" + (data.itemRiskLevel ? (this.$store.getters.prevention_risk_level_map[data.itemRiskLevel]) : '') + "</span>"
|
||||
},
|
||||
filters: this.$store.state.prevention_risk_level.map(item => {
|
||||
|
|
@ -158,14 +177,14 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '管控措施分类', key: "measureFirstType", width: "200px", render: (data) => {
|
||||
name: '管控措施分类', key: "measureFirstType", width: "120px", render: (data) => {
|
||||
if (data.measureFirstType) {
|
||||
return this.$store.getters.prevention_measures_sort_map[data.measureFirstType]
|
||||
}
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '管控措施分类',width:"200px", key: "measureSecondType",
|
||||
name: '管控措施分类', width: "120px", key: "measureSecondType",
|
||||
render: (data) => {
|
||||
if (data.measureFirstType) {
|
||||
const secondTypeItem = this.measuresSelectData[data.measureFirstType]
|
||||
|
|
@ -173,11 +192,11 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
}
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '管控措施分类',width:"200px", key: "measureThirdType" });
|
||||
this.tableColumn.push({ name: '管控措施', key: "measureDescription" });
|
||||
this.tableColumn.push({ name: '管控措施分类', width: "120px", key: "measureThirdType" });
|
||||
this.tableColumn.push({ name: '管控措施', key: "measureDescription", width: "250px" });
|
||||
|
||||
this.tableColumn.push({
|
||||
name: '是否包保责任人任务',width:"200px", key: "insuranceDutyFlag", render: (data) => {
|
||||
name: '是否包保责任人任务', width: "150px", key: "insuranceDutyFlag", render: (data) => {
|
||||
if (data.taskItem) {
|
||||
return '是'
|
||||
} else {
|
||||
|
|
@ -186,14 +205,22 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '任务类型', key: "taskType", render: (data) => {
|
||||
name: '任务类型', key: "taskType", width: "130px", render: (data) => {
|
||||
if (data.taskType || data.taskType === 0) {
|
||||
return this.$store.getters.prevention_task_type_map[data.taskType]
|
||||
}
|
||||
},
|
||||
filters: this.$store.state.prevention_task_type.map(item => {
|
||||
return {
|
||||
text: item.name,
|
||||
value: item.value,
|
||||
}
|
||||
}), filterMethod: (data, row) => {
|
||||
return row.taskType === data;
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '包保任务对应项', key: "taskItem", width: "200px", render: (data) => {
|
||||
name: '包保任务对应项', key: "taskItem", width: "250px", render: (data) => {
|
||||
if (data.taskItem) {
|
||||
if (!this.tasksSelectData[data.taskType] || this.tasksSelectData[data.taskType].length === 0) {
|
||||
this.$store.state.prevention_task_type.map((item) => {
|
||||
|
|
@ -208,8 +235,8 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
}
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '隐患排查任务', key: "taskName", width: "150px" });
|
||||
this.tableColumn.push({ name: '隐患责任人', key: "taskChargeUserName" ,width:"200px"});
|
||||
this.tableColumn.push({ name: '隐患排查任务', key: "taskName", width: "250px" });
|
||||
this.tableColumn.push({ name: '隐患责任人', key: "taskChargeUserName", width: "100px" });
|
||||
this.tableColumn.push({ name: '岗位', key: "taskExecutePostName" });
|
||||
this.tableColumn.push({ name: '排查周期', key: "taskReviewCycleValue" });
|
||||
this.tableColumn.push({
|
||||
|
|
@ -261,8 +288,39 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
this.selectAll()
|
||||
} else if (data.value === "delete") {
|
||||
this.deleteData(this.selectData.map((item: any) => item.id))
|
||||
} else if (data.value === "doUpdate") {
|
||||
//发布--终止
|
||||
this.doUpdate()
|
||||
}
|
||||
}
|
||||
//发布--终止
|
||||
public doUpdate() {
|
||||
if (this.selectData && this.selectData.length > 0) {
|
||||
this.filterStatusData = this.selectData[0]['status']
|
||||
const tmpSelectData = this.selectData.filter((item) => item.status !== this.filterStatusData)
|
||||
if (tmpSelectData.length === 0) {
|
||||
const statusName = this.filterStatusData === 1 ? '终止' : '发布'
|
||||
this.$confirm('确认' + statusName + '所选数据', '确认数据', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const updateParams = JSON.parse(JSON.stringify(this.selectData))
|
||||
updateParams.map((item) => {
|
||||
item.status = this.filterStatusData === 0 ? 1 : 0
|
||||
return item
|
||||
})
|
||||
this.tableService.addOrUpdate(updateParams).then((res) => {
|
||||
this.$message.success(statusName + "成功!");
|
||||
this.getTableData();
|
||||
})
|
||||
}).catch(() => {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 重置数据
|
||||
public reset() {
|
||||
this.params = {
|
||||
|
|
|
|||
Loading…
Reference in New Issue