forked from xxhjsb/hbt-prevention-ui
feat:页面优化
parent
254fe212e1
commit
51d6a8e172
|
@ -2,11 +2,11 @@
|
|||
<div v-if="visible">
|
||||
<div class="sub-title">基本信息</div>
|
||||
<FormComponent :options="subBasicOptions" labelWidth="110px" labelAlign="right" :data.sync="analysisUpdateParams"
|
||||
@actionCallback="callback" :isReadonly="analyIsReadonly" @change="handleChange">
|
||||
@actionCallback="callback" :isReadonly="analyIsReadonly" @change="handleChange" ref="basicForm">
|
||||
</FormComponent>
|
||||
<div class="sub-title">风险评估</div>
|
||||
<FormComponent :options="subRiskOptions" labelWidth="110px" labelAlign="right" :data.sync="analysisUpdateParams"
|
||||
@actionCallback="callback" @change="handleRiskChange" :isReadonly="analyIsReadonly">
|
||||
@actionCallback="callback" @change="handleRiskChange" :isReadonly="analyIsReadonly" ref="riskForm">
|
||||
</FormComponent>
|
||||
<div class="sub-title">管控措施</div>
|
||||
<FormComponent labelWidth="110px" labelAlign="right" :data.sync="analysisUpdateParams"
|
||||
|
@ -40,8 +40,8 @@
|
|||
</FormComponent>
|
||||
<div class="sub-title">残余风险评估</div>
|
||||
<FormComponent :options="subRemnantsOptions" labelWidth="110px" labelAlign="right" :data.sync="analysisUpdateParams"
|
||||
@actionCallback="analyCallback" :actions="analyIsReadonly ? [] : triActions" :full-btn="true"
|
||||
btnPosition="center" @change="handleSubRiskChange" :isReadonly="analyIsReadonly">
|
||||
@actionCallback="analyCallback" :actions="analyIsReadonly ? [] : measureActions" :full-btn="true"
|
||||
btnPosition="center" @change="handleSubRiskChange" :isReadonly="analyIsReadonly" ref="remantRiskForm">
|
||||
</FormComponent>
|
||||
|
||||
<!-- 风险评估方法 -->
|
||||
|
@ -213,7 +213,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
|
||||
@Prop()
|
||||
//评估方法
|
||||
public checkRiskType :any;
|
||||
public checkRiskType: any;
|
||||
|
||||
//基本信息
|
||||
public subBasicOptions: FormOption<BtnOption>[] = [];
|
||||
|
@ -226,6 +226,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
}, {
|
||||
name: "作业地点",
|
||||
key: "location",
|
||||
|
@ -233,6 +234,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "责任人",
|
||||
|
@ -241,6 +243,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
}, {
|
||||
name: "作业人",
|
||||
key: "workerName",
|
||||
|
@ -248,6 +251,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "作业步骤描述",
|
||||
|
@ -256,13 +260,15 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(100% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "风险源",
|
||||
key: "riskSource",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)"
|
||||
width: "calc(50% - 20px)",
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "最严重后果",
|
||||
|
@ -274,13 +280,15 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
datas: this.$store.state.prevention_serious_result,
|
||||
filterable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "危害分析",
|
||||
key: "hazardAnalysis",
|
||||
type: "textarea",
|
||||
require: true,
|
||||
width: "calc(100% - 20px)"
|
||||
width: "calc(100% - 20px)",
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "安全警示标识",
|
||||
|
@ -292,6 +300,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
datas: this.$store.state.prevention_security_identifier,
|
||||
filterable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "设置复评时间",
|
||||
|
@ -301,7 +310,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
format: "yyyy-MM-dd"
|
||||
format: "yyyy-MM-dd",
|
||||
},
|
||||
];
|
||||
} else {
|
||||
|
@ -312,6 +321,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
}, {
|
||||
name: "设备类型",
|
||||
key: "deviceType",
|
||||
|
@ -320,7 +330,8 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
datas: this.$store.state.prevention_device_type
|
||||
datas: this.$store.state.prevention_device_type,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "责任人",
|
||||
|
@ -329,6 +340,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "检查项目",
|
||||
|
@ -337,6 +349,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "检查标准",
|
||||
|
@ -345,13 +358,15 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "风险源",
|
||||
key: "riskSource",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)"
|
||||
width: "calc(50% - 20px)",
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "最严重后果",
|
||||
|
@ -363,13 +378,15 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
datas: this.$store.state.prevention_serious_result,
|
||||
filterable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "危害分析",
|
||||
key: "hazardAnalysis",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(100% - 20px)"
|
||||
width: "calc(100% - 20px)",
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "安全警示标识",
|
||||
|
@ -381,6 +398,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
datas: this.$store.state.prevention_security_identifier,
|
||||
filterable: true,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "设置复评时间",
|
||||
|
@ -390,7 +408,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
format: "yyyy-MM-dd"
|
||||
format: "yyyy-MM-dd",
|
||||
},
|
||||
];
|
||||
}
|
||||
|
@ -405,6 +423,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
type: "checkbox",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
datas: [{
|
||||
name: "LS法",
|
||||
value: 'LS',
|
||||
|
@ -422,7 +441,8 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
datas: this.$store.state.prevention_risk_level
|
||||
datas: this.$store.state.prevention_risk_level,
|
||||
showError: false,
|
||||
}, {
|
||||
name: "管控层级",
|
||||
key: "riskControlLevel",
|
||||
|
@ -431,6 +451,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
datas: this.$store.state.prevention_control_level,
|
||||
showError: false,
|
||||
}];
|
||||
}
|
||||
public triTableActions = [{
|
||||
|
@ -447,6 +468,16 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
public measureActions = [
|
||||
{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "store",
|
||||
type: "primary"
|
||||
}
|
||||
];
|
||||
//残余风险评估
|
||||
public subRemnantsOptions: FormOption<BtnOption>[] = [];
|
||||
public remainUpdateForm() {
|
||||
|
@ -456,6 +487,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
type: "checkbox",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError: false,
|
||||
datas: [{
|
||||
name: "LS法",
|
||||
value: 'LS'
|
||||
|
@ -469,6 +501,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
format: "remainLevelName",
|
||||
type: "select",
|
||||
require: true,
|
||||
showError: false,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
datas: this.$store.state.prevention_risk_level
|
||||
|
@ -602,7 +635,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
}
|
||||
|
||||
public buildTable() {
|
||||
this.triTableColumn.push({ name: '序号', key: "index",width:"80px" });
|
||||
this.triTableColumn.push({ name: '序号', key: "index", width: "80px" });
|
||||
this.triTableColumn.push({
|
||||
name: '管控方法', key: "controlWayName", render: (data) => {
|
||||
if (data.controlWay) {
|
||||
|
@ -1076,55 +1109,75 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
//Emit false
|
||||
if (data.value === "cancel") {
|
||||
this.visible = false;
|
||||
} else if (data.value === "save") {
|
||||
|
||||
const tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams))
|
||||
// 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
|
||||
} else if (data.value === "store") {
|
||||
let vaildParams = true
|
||||
if ((this.$refs.basicForm as any).vaildParams() === false) {
|
||||
//基本信息
|
||||
vaildParams = false
|
||||
}
|
||||
if (this.analysisUpdateParams.riskChoose.indexOf('LS') === -1) {
|
||||
this.analysisUpdateParams.riskLsValue = null
|
||||
if ((this.$refs.riskForm as any).vaildParams() === false) {
|
||||
//风险
|
||||
vaildParams = false
|
||||
}
|
||||
|
||||
if (this.analysisUpdateParams.riskChoose.indexOf('LEC') === -1) {
|
||||
this.analysisUpdateParams.riskLecValue = null
|
||||
if ((this.$refs.remantRiskForm as any).vaildParams() === false) {
|
||||
//残余风险
|
||||
vaildParams = false
|
||||
}
|
||||
if (vaildParams === true) {
|
||||
const tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams))
|
||||
// this.analysisUpdateParams.measures = this.currentMeasureData.datas
|
||||
//整理数据
|
||||
this.collationAnalysisDataMethod();
|
||||
|
||||
if (this.analysisUpdateParams.remainChoose.indexOf('LS') === -1) {
|
||||
this.analysisUpdateParams.remainLsValue = null
|
||||
}
|
||||
tmpUpdateParams.steps.splice(tmpUpdateParams.steps.findIndex((item: any) => item.id === this.analysisUpdateParams.id), 1, this.analysisUpdateParams)
|
||||
|
||||
if (this.analysisUpdateParams.remainChoose.indexOf('LEC') === -1) {
|
||||
this.analysisUpdateParams.remainLecValue = null
|
||||
}
|
||||
const riskLevel = tmpUpdateParams.steps.map((item) => item.riskLevel ? item.riskLevel : 0);
|
||||
const maxRiskLevel = Math.max(...riskLevel);
|
||||
const remainRiskLevel = tmpUpdateParams.steps.map((item) => item.remainLevel ? item.remainLevel : 0);
|
||||
const maxRemainRiskLevel = Math.max(...remainRiskLevel);
|
||||
|
||||
tmpUpdateParams.steps.splice(tmpUpdateParams.steps.findIndex(item => item.id === this.analysisUpdateParams.id), 1, this.analysisUpdateParams)
|
||||
|
||||
const riskLevel = tmpUpdateParams.steps.map((item) => item.riskLevel ? item.riskLevel : 0);
|
||||
const maxRiskLevel = Math.max(...riskLevel);
|
||||
const remainRiskLevel = tmpUpdateParams.steps.map((item) => item.remainLevel ? item.remainLevel : 0);
|
||||
const maxRemainRiskLevel = Math.max(...remainRiskLevel);
|
||||
|
||||
if (!tmpUpdateParams.analRiskLevel) {
|
||||
const areaData = this.areaList.find((itm: any) => itm.value === tmpUpdateParams.areaId) as any;
|
||||
tmpUpdateParams.analRiskLevel = areaData.analRiskLevel
|
||||
}
|
||||
tmpUpdateParams.riskLevel = maxRiskLevel > tmpUpdateParams.analRiskLevel ? maxRiskLevel : tmpUpdateParams.analRiskLevel
|
||||
tmpUpdateParams.remainRiskLevel = maxRemainRiskLevel
|
||||
if (this.type === "device") {
|
||||
if (tmpUpdateParams.items) {
|
||||
tmpUpdateParams.items = tmpUpdateParams.steps
|
||||
if (!tmpUpdateParams.analRiskLevel) {
|
||||
const areaData = this.areaList.find((itm: any) => itm.value === tmpUpdateParams.areaId) as any;
|
||||
tmpUpdateParams.analRiskLevel = areaData.analRiskLevel
|
||||
}
|
||||
tmpUpdateParams.riskLevel = maxRiskLevel > tmpUpdateParams.analRiskLevel ? maxRiskLevel : tmpUpdateParams.analRiskLevel
|
||||
tmpUpdateParams.remainRiskLevel = maxRemainRiskLevel
|
||||
if (this.type === "device") {
|
||||
if (tmpUpdateParams.items) {
|
||||
tmpUpdateParams.items = tmpUpdateParams.steps
|
||||
}
|
||||
}
|
||||
this.updateParams = tmpUpdateParams
|
||||
this.visible = false;
|
||||
}
|
||||
this.updateParams = tmpUpdateParams
|
||||
this.visible = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public collationAnalysisDataMethod() {
|
||||
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;
|
||||
}
|
||||
|
||||
if (this.analysisUpdateParams.riskChoose.indexOf('LEC') === -1) {
|
||||
this.analysisUpdateParams.riskLecValue = null;
|
||||
}
|
||||
|
||||
if (this.analysisUpdateParams.remainChoose.indexOf('LS') === -1) {
|
||||
this.analysisUpdateParams.remainLsValue = null;
|
||||
}
|
||||
|
||||
if (this.analysisUpdateParams.remainChoose.indexOf('LEC') === -1) {
|
||||
this.analysisUpdateParams.remainLecValue = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -164,6 +164,7 @@ export default class MeasureComponent extends Vue {
|
|||
width: "100%",
|
||||
labelWidth: '210px',
|
||||
require: true,
|
||||
showError:false,
|
||||
datas: [
|
||||
{
|
||||
name: "否",
|
||||
|
@ -184,6 +185,7 @@ export default class MeasureComponent extends Vue {
|
|||
datas: this.taskType,
|
||||
expandLevel: Infinity,
|
||||
disable: !(this.taskUpdataParams.insuranceDutyFlag === 1),
|
||||
showError:false,
|
||||
}, {
|
||||
name: "包保任务对应项",
|
||||
key: "taskItem",
|
||||
|
@ -194,13 +196,14 @@ export default class MeasureComponent extends Vue {
|
|||
expandLevel: Infinity,
|
||||
showError: false,
|
||||
hide: !(this.taskUpdataParams.insuranceDutyFlag === 1),
|
||||
datas: this.taskItem
|
||||
datas: this.taskItem,
|
||||
}, {
|
||||
name: "隐患排查任务",
|
||||
key: "name",
|
||||
type: "textarea",
|
||||
width: "100%",
|
||||
require: true,
|
||||
showError:false,
|
||||
}, {
|
||||
name: "执行岗位",
|
||||
key: "executePostCode",
|
||||
|
@ -209,6 +212,7 @@ export default class MeasureComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
datas: this.$store.state.postList,
|
||||
showError:false,
|
||||
},
|
||||
{
|
||||
name: "责任人",
|
||||
|
@ -218,12 +222,14 @@ export default class MeasureComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
datas: this.$store.state.userList,
|
||||
showError:false,
|
||||
}, {
|
||||
name: "排查周期 每隔",
|
||||
key: "reviewCycleValue",
|
||||
type: "number",
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError:false,
|
||||
// labelWidth:"130px"
|
||||
}, {
|
||||
key: "reviewCycleUnit",
|
||||
|
@ -232,12 +238,14 @@ export default class MeasureComponent extends Vue {
|
|||
format: 'reviewCycleValueName',
|
||||
datas: this.$store.state.prevention_cycle_unit,
|
||||
width: "calc(30% - 20px)",
|
||||
showError:false,
|
||||
}, {
|
||||
name: "1次",
|
||||
key: "times",
|
||||
type: 'null',
|
||||
width: "30px",
|
||||
labelWidth: "50px"
|
||||
labelWidth: "50px",
|
||||
showError:false,
|
||||
}, {
|
||||
name: "工作开始时间",
|
||||
key: "startTime",
|
||||
|
@ -245,6 +253,7 @@ export default class MeasureComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
hide: !(this.taskUpdataParams.reviewCycleUnit === 7),
|
||||
showError:false,
|
||||
}, {
|
||||
name: "工作结束时间",
|
||||
key: "endTime",
|
||||
|
@ -252,6 +261,7 @@ export default class MeasureComponent extends Vue {
|
|||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
hide: !(this.taskUpdataParams.reviewCycleUnit === 7),
|
||||
showError:false,
|
||||
},{
|
||||
name: "开始执行时间",
|
||||
key: "executeStartTime",
|
||||
|
@ -260,6 +270,7 @@ export default class MeasureComponent extends Vue {
|
|||
subType:'datetime',
|
||||
width: "calc(50% - 20px)",
|
||||
require: true,
|
||||
showError:false,
|
||||
},]
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,8 @@
|
|||
@click="changeState(scope.row)">启用</el-button>
|
||||
<el-button type="text" v-if="isPlan && scope.row.planType===2 && scope.row.state"
|
||||
@click="changeState(scope.row)">停用</el-button>
|
||||
<el-button type="text" v-if="isPlan" @click="openRecordModel(scope.row)">检查情况</el-button>
|
||||
<el-button type="text" v-if="isPlan && scope.row.planType===1" @click="openRecordModel(scope.row)">检查情况</el-button>
|
||||
<el-button type="text" v-if="isPlan && scope.row.planType===2 " @click="openRecordModel(scope.row)">最新检查情况</el-button>
|
||||
<el-button type="text" v-if="isAction && scope.row.status !==4&& (scope.row.status !==2 &&(nowDate > scope.row.taskStartTime ? true :
|
||||
false) ) && scope.row.tag===0 " @click="openRecordModel(scope.row)">检查</el-button>
|
||||
<!-- <el-button type="text" v-if="isManager" @click="showUpdateModel(0)">抄送</el-button>
|
||||
|
|
|
@ -428,7 +428,7 @@ export default class DeviceAnalManagerComponent extends BaseRecordComponent<any>
|
|||
this.tableColumn.push({
|
||||
name: '设备类别', key: "type", render: (data) => {
|
||||
if (data.riskLevel) {
|
||||
return this.$store.getters.prevention_risk_level_map[data.riskLevel]
|
||||
return this.$store.getters.prevention_device_type_map[data.type]
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -22,18 +22,19 @@
|
|||
</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" :sortable="item.sortable">
|
||||
<el-table-column v-if="item.render" :label="item.name" :width="item.width" :key="item.key"
|
||||
:sortable="item.sortable">
|
||||
<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" :sortable="item.sortable"
|
||||
:filters="item.filters" :filter-method="item.filterMethod"
|
||||
<el-table-column v-else :prop="item.key" :label="item.name" :width="item.width" :key="item.key"
|
||||
:sortable="item.sortable" :filters="item.filters" :filter-method="item.filterMethod"
|
||||
:show-overflow-tooltip="item.showTip">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="scope.row.status===2" type="text"
|
||||
<el-button v-if="scope.row.status===2 && (scope.row.taskStartTime < nowDate)" type="text"
|
||||
@click="showSubModal(scope.row)">排查</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
|
|
@ -88,6 +88,8 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
|
||||
public account = JSON.parse(localStorage.getItem("account") as any);
|
||||
|
||||
public nowDate = moment().format('YYYY-MM-DD HH:mm:ss')
|
||||
|
||||
public userListName = {} as any;
|
||||
|
||||
public subUpdateOptions = [] as any;
|
||||
|
@ -268,7 +270,12 @@ export default class DutyManagerComponent extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({
|
||||
name: '任务状态', width: "110px", key: "status", render: (data) => {
|
||||
if (data.status == 2) {
|
||||
return "<span class='color_2'>待排查</span>"
|
||||
if (this.nowDate < data.taskStartTime) {
|
||||
return '即将开始'
|
||||
} else {
|
||||
return "<span class='color_2'>待排查</span>"
|
||||
}
|
||||
|
||||
} else if (data.status == 1) {
|
||||
return "<span class='color_1'>已排查</span>"
|
||||
} else if (data.status == 3) {
|
||||
|
|
|
@ -293,7 +293,7 @@ export default class LeadershipStructure extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({ name: '机构主要职责', key: "duty", width: "200px", showTip: true, });
|
||||
this.tableColumn.push({ name: '单位名称', key: "orgName", width: "150px", });
|
||||
this.tableColumn.push({
|
||||
name: '附件', width: "100px", key: "resourceName", showTip: true, render: (data) => {
|
||||
name: '附件', width: "300px", key: "resourceName", showTip: true, render: (data) => {
|
||||
if (data.resourceName) {
|
||||
return `<span class="link resourceName">${data.resourceName}</span>`
|
||||
}
|
||||
|
|
|
@ -265,7 +265,7 @@ export default class ManagementSystem extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({ name: '发布部门', key: "publishDeptName", width: "200px", });
|
||||
this.tableColumn.push({ name: '发布时间', key: "publishTime", width: "150px", });
|
||||
this.tableColumn.push({
|
||||
name: '附件', width: "100px", key: "resourceName", showTip: true, render: (data) => {
|
||||
name: '附件', width: "300px", key: "resourceName", showTip: true, render: (data) => {
|
||||
if (data.resourceName) {
|
||||
return `<span class="link">${data.resourceName}</span>`
|
||||
}
|
||||
|
|
|
@ -278,7 +278,7 @@ export default class Programme extends BaseRecordComponent<any> {
|
|||
this.tableColumn.push({ name: '发布部门', key: "publishDeptName", width: "200px", });
|
||||
this.tableColumn.push({ name: '发布时间', key: "publishTime", width: "150px", });
|
||||
this.tableColumn.push({
|
||||
name: '附件', width: "100px", key: "resourceName", showTip: true, render: (data) => {
|
||||
name: '附件', width: "300px", key: "resourceName", showTip: true, render: (data) => {
|
||||
if (data.resourceName) {
|
||||
return `<span class="link">${data.resourceName}</span>`
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue