forked from xxhjsb/hbt-prevention-ui
feat:安全研判和公告承诺
parent
4c5955cbcb
commit
c1fc3b3b9c
|
@ -1153,7 +1153,7 @@ export default class AnalEvaluationComponent extends Vue {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
//整理数据
|
||||
public collationAnalysisDataMethod() {
|
||||
this.analysisUpdateParams.measuresNum = this.analysisUpdateParams.measures.length;
|
||||
this.analysisUpdateParams.seriousResult = this.analysisUpdateParams.seriousResult.join(",");
|
||||
|
|
|
@ -17,6 +17,13 @@ export default class CompanyTreeComponent extends Vue {
|
|||
}
|
||||
|
||||
created() {
|
||||
this.getCompanyTreeList()
|
||||
}
|
||||
beforeDestory() {
|
||||
//
|
||||
}
|
||||
|
||||
public getCompanyTreeList(){
|
||||
this.MaintenanceInfoService.getCompanyTree().then(res => {
|
||||
console.log('res', res);
|
||||
|
||||
|
@ -26,9 +33,6 @@ export default class CompanyTreeComponent extends Vue {
|
|||
}];
|
||||
})
|
||||
}
|
||||
beforeDestory() {
|
||||
//
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
|
@ -3,21 +3,31 @@
|
|||
<!-- 安全状态 -->
|
||||
<div class="status">
|
||||
<div class="title">{{ noticeDataList.state.description }}</div>
|
||||
<el-form ref="form" :model="basicForm" label-width="80px" class="form">
|
||||
<el-form ref="basicForm" :model="basicForm" :rules="rules" label-width="80px" class="form">
|
||||
<div v-for="(items, index) in noticeDataList.state.content" :key="index" class="line-content">
|
||||
<div class="content-items" v-if="!items.children" :style="{ width: items.width }">
|
||||
<span class="content-children-item-title">
|
||||
<p v-if="items.required" style="color: #f56c6c;padding-right: 5px;"> * </p> {{ items.name }}
|
||||
</span>
|
||||
<el-form-item :prop="items.key"
|
||||
<span class="isreadonly" v-if="isReadonly && items.type === 'number'">
|
||||
{{ basicForm[items.key] }}
|
||||
</span>
|
||||
<span class="isreadonly" v-if="isReadonly && items.type === 'radio'">
|
||||
{{ basicForm[items.key] === 1 ?
|
||||
'是' : '否' }}
|
||||
</span>
|
||||
<el-form-item v-if="!isReadonly && items.type === 'number'" :prop="items.key"
|
||||
:rules="{ required: items.required, message: `${items.name}不能为空`, trigger: 'blur' }">
|
||||
<!-- 数字框-number -->
|
||||
<el-input-number v-if="items.type === 'number'" :disabled="items.disable"
|
||||
:controls="items.controls" v-model="items[items.key]"
|
||||
:min="items.min !== undefined ? items.min : 0" :max="items.max"
|
||||
:placeholder="items.placeholder || '请输入'"></el-input-number>
|
||||
<el-input-number :disabled="items.disable" :controls="items.controls"
|
||||
v-model="basicForm[items.key]" :min="items.min !== undefined ? items.min : 0"
|
||||
:max="items.max" :placeholder="items.placeholder || '请输入'"></el-input-number>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!isReadonly && items.type === 'radio'" :prop="items.key"
|
||||
:rules="{ required: items.required, message: `${items.name}不能为空`, trigger: 'blur' }">
|
||||
<!-- 单选-radio -->
|
||||
<el-radio-group v-model="items.key" :disabled="items.disable" v-if="items.type === 'radio'">
|
||||
<el-radio-group v-model="basicForm[items.key]" :disabled="items.disable">
|
||||
<el-radio v-for="data in items.datas" :key="data.value" :disabled="data.disable"
|
||||
:label="data.value">{{ data.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
|
@ -33,22 +43,27 @@
|
|||
<p v-if="item.required" style="color: #f56c6c;padding-right: 5px;"> * </p>
|
||||
{{ item.name }}
|
||||
</span>
|
||||
<div>
|
||||
<el-form-item :prop="item.key"
|
||||
:rules="{ required: item.required, message: `${items.name}不能为空`, trigger: 'blur' }">
|
||||
<!-- 数字框-number -->
|
||||
<el-input-number v-if="item.type === 'number'" :disabled="item.disable"
|
||||
:controls="item.controls" v-model="item[items.key]"
|
||||
:min="items.min !== undefined ? item.min : 0" :max="item.max"
|
||||
:placeholder="item.placeholder || '请输入'"></el-input-number>
|
||||
<!-- 单选-radio -->
|
||||
<el-radio-group v-model="item.key" :disabled="item.disable"
|
||||
v-if="item.type === 'radio'">
|
||||
<el-radio v-for="data in item.datas" :key="data.value" :disabled="data.disable"
|
||||
:label="data.value">{{ data.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<span class="isreadonly" v-if="isReadonly && item.type === 'number'">
|
||||
{{ basicForm[item.key] }}
|
||||
</span>
|
||||
<span class="isreadonly" v-if="isReadonly && item.type === 'radio'">
|
||||
{{ basicForm[item.key] === 1 ? '是' : '否' }}
|
||||
</span>
|
||||
<el-form-item v-if="!isReadonly && item.type === 'number'" :prop="item.key"
|
||||
:rules="{ required: item.required, message: `${item.name}不能为空`, trigger: 'blur' }">
|
||||
<!-- 数字框-number -->
|
||||
<el-input-number :disabled="item.disable" :controls="item.controls"
|
||||
v-model="basicForm[item.key]" :min="item.min !== undefined ? item.min : 0"
|
||||
:max="item.max" :placeholder="item.placeholder || '请输入'"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!isReadonly && item.type === 'radio'" :prop="item.key"
|
||||
:rules="{ required: item.required, message: `${item.name}不能为空`, trigger: 'blur' }">
|
||||
<!-- 单选-radio -->
|
||||
<el-radio-group v-model="basicForm[item.key]" :disabled="item.disable">
|
||||
<el-radio v-for="data in item.datas" :key="data.value" :disabled="data.disable"
|
||||
:label="data.value">{{ data.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -65,15 +80,21 @@
|
|||
<span class="content-children-item-title">
|
||||
<p v-if="items.required" style="color: #f56c6c;padding-right: 5px;"> * </p> {{ items.name }}
|
||||
</span>
|
||||
<el-form-item :prop="items.key"
|
||||
:rules="{ required: items.required, message: `${items.name}不能为空`, trigger: 'blur' }">
|
||||
<span class="isreadonly" v-if="isReadonly && items.type === 'number'">
|
||||
{{ judgmentForm[items.key] }}
|
||||
</span>
|
||||
<span class="isreadonly" v-if="isReadonly && items.type === 'radio'">
|
||||
{{ judgmentForm[items.key] === 1 ? '是' : '否' }}
|
||||
</span>
|
||||
<el-form-item :rules="{ required: items.required, message: `${items.name}不能为空`, trigger: 'blur' }">
|
||||
<!-- 数字框-number -->
|
||||
<el-input-number v-if="items.type === 'number'" :disabled="items.disable"
|
||||
:controls="items.controls" v-model="items[items.key]"
|
||||
<el-input-number v-if="!isReadonly && items.type === 'number'" :disabled="items.disable"
|
||||
:controls="items.controls" v-model="judgmentForm[items.key]"
|
||||
:min="items.min !== undefined ? items.min : 0" :max="items.max"
|
||||
:placeholder="items.placeholder || '请输入'"></el-input-number>
|
||||
<!-- 单选-radio -->
|
||||
<el-radio-group v-model="items.key" :disabled="items.disable" v-if="items.type === 'radio'">
|
||||
<el-radio-group v-model="judgmentForm[items.key]" :disabled="items.disable"
|
||||
v-if="!isReadonly && items.type === 'radio'">
|
||||
<el-radio v-for="data in items.datas" :key="data.value" :disabled="data.disable"
|
||||
:label="data.value">{{ data.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
|
@ -89,22 +110,26 @@
|
|||
<p v-if="item.required" style="color: #f56c6c;padding-right: 5px;"> * </p>
|
||||
{{ item.name }}
|
||||
</span>
|
||||
<div>
|
||||
<el-form-item :prop="item.key"
|
||||
:rules="{ required: item.required, message: `${items.name}不能为空`, trigger: 'blur' }">
|
||||
<!-- 数字框-number -->
|
||||
<el-input-number v-if="item.type === 'number'" :disabled="item.disable"
|
||||
:controls="item.controls" v-model="item[items.key]"
|
||||
:min="items.min !== undefined ? item.min : 0" :max="item.max"
|
||||
:placeholder="item.placeholder || '请输入'"></el-input-number>
|
||||
<!-- 单选-radio -->
|
||||
<el-radio-group v-model="item.key" :disabled="item.disable"
|
||||
v-if="item.type === 'radio'">
|
||||
<el-radio v-for="data in item.datas" :key="data.value" :disabled="data.disable"
|
||||
:label="data.value">{{ data.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<span class="isreadonly" v-if="isReadonly && item.type === 'number'">
|
||||
{{ judgmentForm[item.key] }}
|
||||
</span>
|
||||
<span class="isreadonly" v-if="isReadonly && item.type === 'radio'">
|
||||
{{ judgmentForm[item.key] === 1 ? '是' : '否' }}
|
||||
</span>
|
||||
<el-form-item
|
||||
:rules="{ required: item.required, message: `${items.name}不能为空`, trigger: 'blur' }">
|
||||
<!-- 数字框-number -->
|
||||
<el-input-number v-if="!isReadonly && item.type === 'number'" :disabled="item.disable"
|
||||
:controls="item.controls" v-model="judgmentForm[item.key]"
|
||||
:min="items.min !== undefined ? item.min : 0" :max="item.max"
|
||||
:placeholder="item.placeholder || '请输入'"></el-input-number>
|
||||
<!-- 单选-radio -->
|
||||
<el-radio-group v-model="judgmentForm[item.key]" :disabled="item.disable"
|
||||
v-if="!isReadonly && item.type === 'radio'">
|
||||
<el-radio v-for="data in item.datas" :key="data.value" :disabled="data.disable"
|
||||
:label="data.value">{{ data.name }}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -116,11 +141,15 @@
|
|||
<div class="promise">
|
||||
<div class="title">{{ noticeDataList.promise.description }}</div>
|
||||
<div class="promise-content">
|
||||
<el-input type="textarea" :rows="3" v-model="promise"></el-input>
|
||||
<span class="isReadonly-promise" v-if="isReadonly">{{ updateParams.promise }}</span>
|
||||
<el-input v-else type="textarea" :rows="3" v-model="updateParams.promise"></el-input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="btnStyle" v-if="!isReadonly">
|
||||
<el-button @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="onSubmit">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -139,14 +168,68 @@ export default class NoticeComponent extends Vue {
|
|||
public basicForm = {} as any;
|
||||
|
||||
public judgmentForm = {} as any;
|
||||
|
||||
public promise = '今天我班组已根据岗位风险辨识管控相关内容以及安全风险评估表进行安全风险研判,各项安全风险防控措施已落实到位,我承诺本岗位处于安全运行状态,涉及罐区、仓库等重大危险源安全风险的到有效管控。' as any;
|
||||
|
||||
//传参
|
||||
@PropSync("data", {
|
||||
required: true,
|
||||
})
|
||||
public updateParams!: any;
|
||||
@Watch("data", { immediate: true, deep: true })
|
||||
handleData() {
|
||||
//处理数据
|
||||
this.basicForm = this.updateParams;
|
||||
this.judgmentForm = this.updateParams.researchContent ? JSON.parse(this.updateParams.researchContent) : {};
|
||||
}
|
||||
// 操作按钮
|
||||
@Prop({
|
||||
required: false,
|
||||
default: () => {
|
||||
return []
|
||||
}
|
||||
})
|
||||
actions?: any;
|
||||
// 按钮回调
|
||||
@Emit("actionCallback")
|
||||
actionCallback(action: any) {
|
||||
//
|
||||
}
|
||||
|
||||
@Prop()
|
||||
public isReadonly: boolean;
|
||||
|
||||
//定义规则
|
||||
public rules = {
|
||||
riskNumber: [
|
||||
{ required: true, message: '请输入活动名称', trigger: 'blur' },
|
||||
],
|
||||
measureFlag: [
|
||||
{ required: true, message: '请选择活动区域', trigger: 'change' }
|
||||
],
|
||||
basicwork: [
|
||||
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
|
||||
],
|
||||
};
|
||||
|
||||
created() {
|
||||
//
|
||||
}
|
||||
|
||||
//提交
|
||||
public onSubmit() {
|
||||
(this.$refs.basicForm as any).validate((valid: any) => {
|
||||
if (valid) {
|
||||
this.updateParams = Object.assign(this.updateParams, this.basicForm);
|
||||
this.updateParams.researchContent = JSON.stringify(this.judgmentForm)
|
||||
this.actionCallback('save')
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//取消
|
||||
public cancel() {
|
||||
this.actionCallback('cancel')
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
|
@ -158,7 +241,7 @@ export default class NoticeComponent extends Vue {
|
|||
}
|
||||
|
||||
.el-form-item__content {
|
||||
margin-left: 40px !important;
|
||||
margin-left: 10px !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -180,12 +263,14 @@ export default class NoticeComponent extends Vue {
|
|||
display: flex;
|
||||
flex-direction: row;
|
||||
border-bottom: 1px solid #D1DBE5;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.promise-content {
|
||||
width: 90%;
|
||||
padding: 5px 10px;
|
||||
border-top: 1px solid #D1DBE5;
|
||||
min-height: 90px;
|
||||
}
|
||||
|
||||
.form {
|
||||
|
@ -218,6 +303,7 @@ export default class NoticeComponent extends Vue {
|
|||
align-items: center;
|
||||
padding: 5px 10px;
|
||||
border-top: 1px solid #D1DBE5;
|
||||
min-height: 55px;
|
||||
}
|
||||
|
||||
.children-title {
|
||||
|
@ -265,9 +351,20 @@ export default class NoticeComponent extends Vue {
|
|||
align-items: center;
|
||||
border-bottom: 1px solid #D1DBE5;
|
||||
padding: 5px 10px;
|
||||
min-height: 55px;
|
||||
|
||||
&:last-child {
|
||||
border-bottom: 0px solid #D1DBE5;
|
||||
}
|
||||
}
|
||||
|
||||
.btnStyle {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.isreadonly {
|
||||
padding-left: 40px;
|
||||
}
|
||||
</style>
|
|
@ -4,16 +4,16 @@ export default {
|
|||
content: [
|
||||
{
|
||||
name: "研判风险点 /处",
|
||||
key: "department",
|
||||
key: "riskNumber",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "100%",
|
||||
},
|
||||
{
|
||||
name: "各风险点已落实管控措施",
|
||||
key: "department",
|
||||
key: "measureFlag",
|
||||
type: "radio",
|
||||
required: true,
|
||||
required: false,
|
||||
width: "100%",
|
||||
datas: [
|
||||
{
|
||||
|
@ -29,11 +29,11 @@ export default {
|
|||
{
|
||||
name: "作业基本情况",
|
||||
key: "basicwork",
|
||||
width:"100%",
|
||||
width: "100%",
|
||||
children: [
|
||||
{
|
||||
name: "已落实特殊作业的风险辨识、作业许可及管控措施",
|
||||
key: "department",
|
||||
key: "workFlag",
|
||||
type: "radio",
|
||||
required: true,
|
||||
width: "100%",
|
||||
|
@ -50,95 +50,95 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "特级动火作业 /处",
|
||||
key: "department",
|
||||
key: "specialHotWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "一级动火作业 /处",
|
||||
key: "department",
|
||||
key: "oneHotWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "二级动火作业 /处",
|
||||
key: "department",
|
||||
key: "twoHotWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "受限空间作业 /处",
|
||||
key: "department",
|
||||
key: "confinedSpaceWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "高处作业 /处",
|
||||
key: "department",
|
||||
key: "heightWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "起重吊装作业 /处",
|
||||
key: "department",
|
||||
key: "liftingWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "断路作业 /处",
|
||||
key: "department",
|
||||
key: "roadBreakWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "临电作业 /处",
|
||||
key: "department",
|
||||
key: "electricalWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "动土作业 /处",
|
||||
key: "department",
|
||||
key: "soilMoveWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "盲板抽堵作业 /处",
|
||||
key: "department",
|
||||
key: "platePluggingWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "变更作业 /处",
|
||||
key: "department",
|
||||
key: "changeWork",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "100%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "130px",
|
||||
},
|
||||
{
|
||||
name: "是否已落实变更审批以及安全管理措施 /处",
|
||||
key: "department",
|
||||
key: "changeFlag",
|
||||
type: "radio",
|
||||
required: true,
|
||||
width: "100%",
|
||||
|
@ -161,39 +161,39 @@ export default {
|
|||
children: [
|
||||
{
|
||||
name: "生产装置 /套",
|
||||
key: "department",
|
||||
key: "equipmentNum",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "120px",
|
||||
},
|
||||
{
|
||||
name: "运行 /套",
|
||||
key: "department",
|
||||
key: "equipmentRunNum",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "120px",
|
||||
},
|
||||
{
|
||||
name: "停产 /套",
|
||||
key: "department",
|
||||
key: "equipmentStopNum",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "120px",
|
||||
},
|
||||
{
|
||||
name: "检修 /套",
|
||||
key: "department",
|
||||
key: "equipmentOverhaulNum",
|
||||
type: "number",
|
||||
required: true,
|
||||
width: "50%",
|
||||
labelWidth:"120px"
|
||||
labelWidth: "120px",
|
||||
},
|
||||
{
|
||||
name: "是否处于试生产阶段",
|
||||
key: "department",
|
||||
key: "trialFlag",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "50%",
|
||||
|
@ -210,7 +210,7 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "是否处于开停车阶段",
|
||||
key: "department",
|
||||
key: "parkFlag",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "50%",
|
||||
|
@ -227,7 +227,7 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "是否开展中(扩)试",
|
||||
key: "department",
|
||||
key: "startFlag",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
|
@ -244,7 +244,7 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "罐区、仓库等重大危险源是否处于安全状态",
|
||||
key: "department",
|
||||
key: "safetyFlag",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
|
@ -263,7 +263,7 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "是否存在重大隐患",
|
||||
key: "department",
|
||||
key: "dangerFlag",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
|
@ -289,11 +289,11 @@ export default {
|
|||
children: [
|
||||
{
|
||||
name: "1.生产装置的温度、压力、组分、液位、流量等主要工艺参数是否处于指标范围",
|
||||
key: "department",
|
||||
key: "safeProductionOne",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -307,11 +307,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "2.压力容器、压力管道等特种设备是否处于安全运行状态",
|
||||
key: "department",
|
||||
key: "safeProductionTwo",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -325,11 +325,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "3.各类设备设施的静动密封是否完好无泄漏",
|
||||
key: "department",
|
||||
key: "safeProductionThree",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -343,11 +343,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "4.超限报警、紧急切断、联锁等各类安全设施配备是否完好投用,并可靠运行",
|
||||
key: "department",
|
||||
key: "safeProductionFour",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -367,11 +367,11 @@ export default {
|
|||
children: [
|
||||
{
|
||||
name: "5.储罐、管道、机泵、阀门及仪表系统是否完好无泄漏",
|
||||
key: "department",
|
||||
key: "safeProductionFive",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -385,11 +385,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "6.储罐的液位、温度、压力是否超限运行",
|
||||
key: "department",
|
||||
key: "safeProductionSix",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -403,11 +403,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "7.内浮顶储罐运行中浮盘是否可能落底",
|
||||
key: "department",
|
||||
key: "safeProductionSeven",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -421,11 +421,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "8.油气储罐手动切水、切罐、装卸车时是否确保人员在岗",
|
||||
key: "department",
|
||||
key: "safeProductionEight",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -439,11 +439,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "9.可燃及有毒气体报警和联锁是否处于可靠运行状态",
|
||||
key: "department",
|
||||
key: "safeProductionNine",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -457,11 +457,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "10.仓库是否按照国家标准分区分类储存危险化学品,是否超量、超品种储存,相互禁配物质是否混放混存",
|
||||
key: "department",
|
||||
key: "safeProductionTen",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -481,11 +481,11 @@ export default {
|
|||
children: [
|
||||
{
|
||||
name: "11.装置开停车是否制定开停车方案,试生产是否制定试生产方案并经专家论证",
|
||||
key: "department",
|
||||
key: "safeProductionEleven",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -499,11 +499,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "12.各项特殊作业、检维修作业、承包商作业是否健全和完善相关管理制度,作业过程是否进行安全风险辨识,严格程序确认和作业许可审批,加强现场监督,危险化学品罐区动火作业是否做到升级管理等",
|
||||
key: "department",
|
||||
key: "safeProductionTwelve",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -517,11 +517,11 @@ export default {
|
|||
},
|
||||
{
|
||||
name: "13.各项变更的审批程序是否符合规定",
|
||||
key: "department",
|
||||
key: "safeProductionThirteen",
|
||||
type: "radio",
|
||||
required: false,
|
||||
width: "100%",
|
||||
labelWidth:"600px",
|
||||
labelWidth: "600px",
|
||||
datas: [
|
||||
{
|
||||
name: "是",
|
||||
|
@ -537,8 +537,8 @@ export default {
|
|||
},
|
||||
],
|
||||
},
|
||||
promise:{
|
||||
promise: {
|
||||
description: "班组安全承诺",
|
||||
key:'promise'
|
||||
}
|
||||
key: "promise",
|
||||
},
|
||||
};
|
||||
|
|
|
@ -15,4 +15,11 @@ export default class HiddendangerResumptionService extends BaseService<any>{
|
|||
const url = this.prefix.prevention+'/worktask/cycle';
|
||||
return this.get(url,params)
|
||||
}
|
||||
|
||||
// 批量删除
|
||||
public deleteByIds(params:any,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/execute';
|
||||
return this.deleteBatch(url,params,{},showLoading)
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
import BaseService from "hbt-common/service/base.service"
|
||||
import type { AxiosResponse } from 'axios'
|
||||
import { ActionResult } from "hbt-common/models/actionResult";
|
||||
export default class RiskJudgmentService extends BaseService<any>{
|
||||
constructor(){
|
||||
super()
|
||||
}
|
||||
// 查询列表
|
||||
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/research/task/list';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
// 获取详细信息
|
||||
public selectByDetail(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/research/task';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
// 批量删除
|
||||
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/research/task';
|
||||
return this.deleteBatch(url,params,{},showLoading)
|
||||
}
|
||||
|
||||
// 新增或更新
|
||||
public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
||||
if(add){
|
||||
const url = this.prefix.prevention+'/safety/research/task';
|
||||
return this.post(url,params,{},showLoading)
|
||||
}else{
|
||||
const url = this.prefix.prevention+'/safety/research/task';
|
||||
return this.put(url,params,{},showLoading)
|
||||
}
|
||||
}
|
||||
|
||||
//获取风险点信息
|
||||
public selectRiskGroup(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/research/task/riskdetail';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
|
||||
//获取下级研判信息
|
||||
public selectResearchDetail(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/research/task/researchdetail';
|
||||
return this.post(url,params,{})
|
||||
}
|
||||
|
||||
//获取下级风险点信息
|
||||
public selectRiskList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/research/risk/list';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
|
||||
//企业获取车间风险点信息
|
||||
public getWorkshopRiskList(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/risk/byworkshop';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
|
||||
|
||||
public getFileUrls(params):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.file+'/getSysFiles';
|
||||
return this.get(url,params,false)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
import BaseService from "hbt-common/service/base.service"
|
||||
import type { AxiosResponse } from 'axios'
|
||||
import { ActionResult } from "hbt-common/models/actionResult";
|
||||
export default class SafetyNoticeService extends BaseService<any>{
|
||||
constructor(){
|
||||
super()
|
||||
}
|
||||
// 查询列表
|
||||
public selectByPage(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/promise/task/list';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
// 获取详细信息
|
||||
public selectByDetail(params: any):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/promise/task';
|
||||
return this.get(url,params,true)
|
||||
}
|
||||
// 批量删除
|
||||
public deleteByIds(params,showLoading?):Promise<AxiosResponse<ActionResult<any>>>{
|
||||
const url = this.prefix.prevention+'/safety/promise/task';
|
||||
return this.deleteBatch(url,params,{},showLoading)
|
||||
}
|
||||
|
||||
// 新增或更新
|
||||
public addOrUpdate(params: any, add: boolean,showLoading?:boolean): Promise<AxiosResponse<ActionResult<any>>>{
|
||||
if(add){
|
||||
const url = this.prefix.prevention+'/safety/promise/task';
|
||||
return this.post(url,params,{},showLoading)
|
||||
}else{
|
||||
const url = this.prefix.prevention+'/safety/promise/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)
|
||||
}
|
||||
}
|
|
@ -115,7 +115,7 @@ export default class checkResumption extends BaseRecordComponent<any> {
|
|||
key: "cycle",
|
||||
type: "select",
|
||||
datas: this.cycleList,
|
||||
hide: this.type === 2
|
||||
hide: this.type === 2,
|
||||
},
|
||||
{
|
||||
name: "周期",
|
||||
|
@ -124,9 +124,9 @@ export default class checkResumption extends BaseRecordComponent<any> {
|
|||
subType: "week",
|
||||
format: "yyyy 第 WW 周",
|
||||
valueFormat: "yyyy-MM-dd",
|
||||
hide: this.type === 1
|
||||
hide: this.type === 1,
|
||||
pickerOptions: { "firstDayOfWeek": 1 }
|
||||
},
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -204,12 +204,17 @@ export default class checkResumption extends BaseRecordComponent<any> {
|
|||
});
|
||||
this.tableColumn.push({ name: '排查任务数', key: "taskNumber", });
|
||||
this.tableColumn.push({ name: '完成任务数', key: "completeNumber", });
|
||||
this.tableColumn.push({ name: '完成率', key: "completeRate", });
|
||||
this.tableColumn.push({
|
||||
name: '完成率 /%', key: "completeRate", render: (data) => {
|
||||
return (data.completeRate * 100).toFixed(2) + '%'
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public callback(data, type) {
|
||||
if (type) {
|
||||
if (this.type === 1) {
|
||||
this.params[type] = data;
|
||||
this.getTableData()
|
||||
} else {
|
||||
this.getReportTableData()
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
: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" :selectable="selectable" fixed label="全选" width="40">
|
||||
<el-table-column type="selection" fixed label="全选" width="60">
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" width="60">
|
||||
<div slot-scope="scope">{{scope.$index+1}}</div>
|
||||
|
@ -41,14 +41,14 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</TableComponent>
|
||||
<div class="reportTable" v-if="type === 2">
|
||||
<div class="reportTable" v-if="type === 2 && reportTable.detail">
|
||||
<el-table :data="reportTable.detail" border style="width: 100%;" height="90%" show-summary
|
||||
:summary-method="summaryMethod" :row-class-name="rowClass">
|
||||
<el-table-column label="序号" width="60">
|
||||
<div slot-scope="scope">{{scope.$index+1}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="重大危险源名称">
|
||||
<div slot-scope="scope">{{riskSourceMap[scope.row.majorHazardValue]}}</div>
|
||||
<div slot-scope="scope">{{scope.row.majorHazardLabel}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="总排查任务">
|
||||
<el-table-column label="完成任务数">
|
||||
|
@ -103,58 +103,6 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="publicReportTable" v-if="isPublicity">
|
||||
<el-table :data="reportTable.detail" border style="width: 100%" height="90%" show-summary
|
||||
:summary-method="publicSummaryMethod" :row-class-name="rowClass">
|
||||
<el-table-column label="序号" width="60">
|
||||
<div slot-scope="scope">{{scope.$index+1}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="重大危险源名称">
|
||||
<div slot-scope="scope">{{riskSourceMap[scope.row.majorHazardValue]}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="总排查任务">
|
||||
<el-table-column label="完成任务数">
|
||||
<div slot-scope="scope">{{scope.row.totalCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率 /%">
|
||||
<div slot-scope="scope">{{scope.row.totalCompletionRate}}</div>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="主要负责人">
|
||||
<el-table-column label="完成任务数">
|
||||
<div slot-scope="scope">{{scope.row.mainCompleted? scope.row.mainCompleted : '--'}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率 /%">
|
||||
<div slot-scope="scope">{{scope.row.mainCompletionRate ? scope.row.mainCompletionRate:'--'}}
|
||||
</div>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="技术负责人">
|
||||
<el-table-column label="完成任务数">
|
||||
<div slot-scope="scope">{{scope.row.technologyCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率 /%">
|
||||
<div slot-scope="scope">{{scope.row.technologyCompletionRate}}</div>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作负责人">
|
||||
<el-table-column label="完成任务数">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率 /%">
|
||||
<div slot-scope="scope">{{scope.row.operateCompletionRate}}</div>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患数量">
|
||||
<el-table-column label="发现隐患数量">
|
||||
<div slot-scope="scope">{{scope.row.dangerDiscovery}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成整改数量">
|
||||
<div slot-scope="scope">{{scope.row.dangerRemoval}}</div>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -5,8 +5,9 @@
|
|||
:full-btn="false" @change="change" btn-position="end"></FormComponent>
|
||||
</div>
|
||||
<div class="publicReportTable">
|
||||
<el-table v-if="reportTable.detail.length" :data="reportTable.detail" border style="width: 100%" height="90%" show-summary
|
||||
:summary-method="publicSummaryMethod" :row-class-name="rowClass" ref="publicReportTable">
|
||||
<el-table v-if="reportTable.detail.length" :data="reportTable.detail" border style="width: 100%"
|
||||
height="90%" show-summary :summary-method="publicSummaryMethod" :row-class-name="rowClass"
|
||||
ref="publicReportTable">
|
||||
<el-table-column label="序号" width="60">
|
||||
<div slot-scope="scope">{{scope.$index+1}}</div>
|
||||
</el-table-column>
|
||||
|
@ -18,7 +19,8 @@
|
|||
<div slot-scope="scope">{{scope.row.totalCompleted? scope.row.totalCompleted :'--'}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率 /%">
|
||||
<div slot-scope="scope">{{scope.row.totalCompletionRate ? scope.row.totalCompletionRate :'--'}}</div>
|
||||
<div slot-scope="scope">{{scope.row.totalCompletionRate ? scope.row.totalCompletionRate :'--'}}
|
||||
</div>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="主要负责人">
|
||||
|
@ -32,10 +34,12 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="技术负责人">
|
||||
<el-table-column label="完成任务数">
|
||||
<div slot-scope="scope">{{scope.row.technologyCompleted? scope.row.technologyCompleted :'--'}}</div>
|
||||
<div slot-scope="scope">{{scope.row.technologyCompleted? scope.row.technologyCompleted :'--'}}
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率 /%">
|
||||
<div slot-scope="scope">{{scope.row.technologyCompletionRate? scope.row.technologyCompletionRate :'--'}}</div>
|
||||
<div slot-scope="scope">{{scope.row.technologyCompletionRate? scope.row.technologyCompletionRate
|
||||
:'--'}}</div>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作负责人">
|
||||
|
@ -43,7 +47,8 @@
|
|||
<div slot-scope="scope">{{scope.row.operateCompleted? scope.row.operateCompleted :'--'}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成率 /%">
|
||||
<div slot-scope="scope">{{scope.row.operateCompletionRate? scope.row.operateCompletionRate :'--'}}</div>
|
||||
<div slot-scope="scope">{{scope.row.operateCompletionRate? scope.row.operateCompletionRate
|
||||
:'--'}}</div>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="隐患数量">
|
||||
|
|
|
@ -139,16 +139,6 @@ export default class PublicityResumption extends BaseRecordComponent<any> {
|
|||
//
|
||||
}
|
||||
|
||||
updated() {
|
||||
|
||||
// this.$nextTick(() => {
|
||||
|
||||
// this.$refs.publicReportTable.doLayout();
|
||||
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
public tabTableChange(type) {
|
||||
this.params.pageNum = 1;
|
||||
this.getTableData()
|
||||
|
@ -305,7 +295,6 @@ export default class PublicityResumption extends BaseRecordComponent<any> {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
return sums;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
<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-badge is-dot class="item">{{item.name}}</el-badge> -->
|
||||
<div><span class="showTip" v-if="item.syncFlag && item.tipIcon"></span>{{item.name}}</div>
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" width="150">
|
||||
|
|
|
@ -9,6 +9,8 @@ import checkTasksService from "@/service/checkTasks.service";
|
|||
import FormOption from "hbt-common/models/formOptions";
|
||||
import BtnOption from "hbt-common/models/btnOptions";
|
||||
import ButtonListComponent from "hbt-common/components/common/buttonList.component.vue";
|
||||
import maintenanceInfoService from "@/service/maintenanceInfo.service";
|
||||
|
||||
|
||||
@Component({
|
||||
template,
|
||||
|
@ -21,6 +23,9 @@ import ButtonListComponent from "hbt-common/components/common/buttonList.compone
|
|||
export default class MajorHazard extends BaseRecordComponent<any> {
|
||||
public tableService = new checkTasksService();
|
||||
|
||||
public MaintenanceInfoService = new maintenanceInfoService()
|
||||
|
||||
|
||||
public params = {
|
||||
majorHazard: null,
|
||||
} as any;
|
||||
|
@ -64,6 +69,10 @@ export default class MajorHazard extends BaseRecordComponent<any> {
|
|||
|
||||
public showProtable = false;
|
||||
|
||||
public companyList = [] as any;
|
||||
|
||||
public companyListMap = {} as any;
|
||||
|
||||
public formActions = [{
|
||||
name: "查询",
|
||||
value: "search",
|
||||
|
@ -121,13 +130,13 @@ export default class MajorHazard extends BaseRecordComponent<any> {
|
|||
public buildUpdateForm() {
|
||||
this.updateOptions = [{
|
||||
name: "企业名称",
|
||||
type: "text",
|
||||
key: "companyName",
|
||||
type: "select",
|
||||
key: "companyId",
|
||||
format: "companyName",
|
||||
require: true,
|
||||
width: "100%",
|
||||
showError: false,
|
||||
datas: [],
|
||||
datas: this.companyList,
|
||||
},
|
||||
{
|
||||
name: "重大危险源名称",
|
||||
|
@ -246,8 +255,21 @@ export default class MajorHazard extends BaseRecordComponent<any> {
|
|||
//
|
||||
//包保责任制
|
||||
this.initSelectList()
|
||||
//获取企业信息
|
||||
this.getCompanyList()
|
||||
}
|
||||
|
||||
public getCompanyList() {
|
||||
this.MaintenanceInfoService.selectCompany({}).then((res: any) => {
|
||||
res.data.forEach((item) => {
|
||||
this.companyListMap[item.id] = item.name
|
||||
let tmpData = {} as any;
|
||||
tmpData.name = item.name;
|
||||
tmpData.value = item.id;
|
||||
this.companyList.push(tmpData)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
public changes(data, item) {
|
||||
//
|
||||
|
@ -275,7 +297,8 @@ export default class MajorHazard extends BaseRecordComponent<any> {
|
|||
}
|
||||
|
||||
public buildTable() {
|
||||
this.tableColumn.push({ name: '企业名称', key: "companyName", tipIcon: true });
|
||||
|
||||
this.tableColumn.push({ name: '企业名称', key: "companyName", });
|
||||
this.tableColumn.push({
|
||||
name: '重大危险源名称', key: "majorHazard", render: (data) => {
|
||||
let majorHazard = parseInt(data.majorHazard)
|
||||
|
@ -461,7 +484,7 @@ export default class MajorHazard extends BaseRecordComponent<any> {
|
|||
this.updateParams.resourceId = resourceId.join(",");
|
||||
this.updateParams.resourceName = resourceName.join(",");
|
||||
}
|
||||
|
||||
this.updateParams.companyName = this.companyListMap[this.updateParams.companyId]
|
||||
this.updateParams.techUserName = this.$store.getters.user_map[this.updateParams.techUserId];
|
||||
this.updateParams.operateUserName = this.$store.getters.user_map[this.updateParams.operateUserId];
|
||||
this.updateParams.mainUserName = this.$store.getters.user_map[this.updateParams.mainUserId];
|
||||
|
@ -547,21 +570,21 @@ export default class MajorHazard extends BaseRecordComponent<any> {
|
|||
}
|
||||
this.tableService.selectDutyDetailList({ taskId: row.id }).then((res: any) => {
|
||||
if (res.code === 200) {
|
||||
this.mainDuty = res.data[1]
|
||||
this.mainDuty = res.data[1] ? res.data[1] :[]
|
||||
this.mainDuty.forEach((item: any) => {
|
||||
item.type = 1;
|
||||
if (!isReadonly) {
|
||||
item.dutyContent = item.dutyContent.toString();
|
||||
}
|
||||
})
|
||||
this.techDuty = res.data[2]
|
||||
this.techDuty = res.data[2] ? res.data[2] :[]
|
||||
this.techDuty.forEach((item: any) => {
|
||||
item.type = 2;
|
||||
if (!isReadonly) {
|
||||
item.dutyContent = item.dutyContent.toString();
|
||||
}
|
||||
})
|
||||
this.operateDuty = res.data[3]
|
||||
this.operateDuty = res.data[3] ? res.data[3] :[]
|
||||
this.operateDuty.forEach((item: any) => {
|
||||
item.type = 3;
|
||||
if (!isReadonly) {
|
||||
|
|
|
@ -165,6 +165,7 @@ export default class MajorHazard extends BaseRecordComponent<any> {
|
|||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
showError: false,
|
||||
controls:false,
|
||||
},
|
||||
{
|
||||
name: "主要负责人",
|
||||
|
@ -275,7 +276,6 @@ export default class MajorHazard extends BaseRecordComponent<any> {
|
|||
|
||||
public getCompanyList() {
|
||||
this.MaintenanceInfoService.selectCompany({}).then((res: any) => {
|
||||
console.log('res', res);
|
||||
res.data.forEach((item) => {
|
||||
this.companyListMap[item.id] = item.name
|
||||
let tmpData = {} as any;
|
||||
|
|
|
@ -52,7 +52,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
public filterStatusData: any;
|
||||
|
||||
//来源类型
|
||||
public sourceType = ["","JHA","SCL","线下评估","巡检"]
|
||||
public sourceType = ["", "JHA", "SCL", "线下评估", "巡检"]
|
||||
|
||||
public subActions = [{
|
||||
name: "取消",
|
||||
|
@ -158,7 +158,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '来源', key: "type", render:(data)=>{
|
||||
name: '来源', key: "type", render: (data) => {
|
||||
return this.sourceType[data.type]
|
||||
}
|
||||
});
|
||||
|
@ -170,6 +170,12 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
});
|
||||
this.tableColumn.push({ name: '管控对象', key: "analControlName", width: "200px" });
|
||||
this.tableColumn.push({ name: '分析对象', key: "itemName", width: "100px" });
|
||||
this.tableColumn.push({
|
||||
name: '重大危险源', key: "majorHazard", width: "120px", render: (data) => {
|
||||
data.majorHazard = parseInt(data.majorHazard)
|
||||
return this.$store.getters.prevention_risk_source_map[data.majorHazard]
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '风险源', key: "itemRiskSource", width: "120px" });
|
||||
this.tableColumn.push({
|
||||
name: '事故后果', key: "itemSeriousResult", width: "100px",
|
||||
|
@ -249,7 +255,7 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
})
|
||||
return taskItemName[data.taskItem]
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '隐患排查任务', key: "taskName", width: "250px" });
|
||||
this.tableColumn.push({ name: '责任人', key: "taskChargeUserName", width: "100px" });
|
||||
|
@ -350,8 +356,8 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
}
|
||||
//发布--终止
|
||||
public doUpdate() {
|
||||
console.log('selectData',this.selectData);
|
||||
|
||||
console.log('selectData', this.selectData);
|
||||
|
||||
if (this.selectData && this.selectData.length > 0) {
|
||||
this.filterStatusData = this.selectData[0]['status']
|
||||
const tmpSelectData = this.selectData.filter((item) => item.status !== this.filterStatusData)
|
||||
|
@ -418,8 +424,8 @@ export default class MeasuresReportManagerComponent extends BaseRecordComponent<
|
|||
}
|
||||
|
||||
public handleSelectionChange(data) {
|
||||
console.log('data',data);
|
||||
|
||||
console.log('data', data);
|
||||
|
||||
this.selectData = data;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<div class="common-box dis-flex ">
|
||||
<div class="common-tree-box">
|
||||
<CompanyTreeComponent @callback="handleNodeClick"></CompanyTreeComponent>
|
||||
<CompanyTreeComponent ref="companyTree" @callback="handleNodeClick"></CompanyTreeComponent>
|
||||
</div>
|
||||
<div class="common-content-box dis-flex flex-col flex-1">
|
||||
<div class="search-box">
|
||||
|
@ -116,8 +116,8 @@
|
|||
<!-- 风险点展示 -->
|
||||
<el-checkbox-group v-model="updateParams.teams[selected]['risks']">
|
||||
<el-checkbox v-for="(item,index) in bindRiskGroup"
|
||||
:disabled="isReadonly ? isReadonly: filterSelectedData(item,selected)" :label="item"
|
||||
:key="index">{{item}}</el-checkbox>
|
||||
:disabled="isReadonly ? isReadonly: filterSelectedData(item,selected)" :label="JSON.stringify(item)"
|
||||
:key="index">{{item.riskName}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -127,8 +127,7 @@
|
|||
</el-dialog>
|
||||
|
||||
<!-- 显示风险点信息 -->
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="showProtable" width="940px"
|
||||
destroy-on-close>
|
||||
<el-dialog :close-on-click-modal="false" :visible.sync="showProtable" width="940px" destroy-on-close>
|
||||
<el-table ref="multipleTable" :data="proTableData" height="100%" border row-key="checked" style="width: 100%">
|
||||
</el-table-column>
|
||||
<el-table-column label="序号" width="100">
|
||||
|
|
|
@ -275,11 +275,13 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
this.buildUpdateForm()
|
||||
//获取风险点
|
||||
this.getRiskGroupList()
|
||||
|
||||
|
||||
}
|
||||
|
||||
//获取企业
|
||||
public getCompanyList() {
|
||||
this.tableService.selectCompany({}).then((res: any) => {
|
||||
console.log('res', res);
|
||||
res.data.forEach((item) => {
|
||||
this.companyListMap[item.id] = item.name
|
||||
let tmpData = {} as any;
|
||||
|
@ -292,8 +294,6 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
//获取风险点
|
||||
public getRiskGroupList() {
|
||||
this.tableService.selectRiskGroup({}).then((res: any) => {
|
||||
console.log('res', res);
|
||||
// let tmpBindRiskGroup = [] as any;
|
||||
res.data.forEach((item) => {
|
||||
if (item) {
|
||||
return item
|
||||
|
@ -302,16 +302,11 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
|
||||
this.storageBindRiskGroup = JSON.parse(JSON.stringify(res.data.filter((item) => item)));
|
||||
this.bindRiskGroup = JSON.parse(JSON.stringify(res.data.filter((item) => item)));
|
||||
console.log(' this.bindRiskGroup ', this.bindRiskGroup);
|
||||
|
||||
// this.showBindRisk = true
|
||||
})
|
||||
}
|
||||
|
||||
// 树点击
|
||||
public handleNodeClick(data) {
|
||||
console.log('data', data);
|
||||
|
||||
this.params.companyId = "";
|
||||
this.params.workshopName = "";
|
||||
this.params.teamName = "";
|
||||
|
@ -360,8 +355,6 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
|
||||
|
||||
public callback(data, type) {
|
||||
console.log('data', data);
|
||||
|
||||
if (type) {
|
||||
this.params[type] = data;
|
||||
this.getTableData();
|
||||
|
@ -380,7 +373,9 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
} else if (data.value === "selectAll") {
|
||||
this.selectAll()
|
||||
} else if (data.value === "delete") {
|
||||
this.deleteData(this.selectData.map((item: any) => item.id))
|
||||
this.deleteData(this.selectData.map((item: any) => item.id));
|
||||
//更新企业树数据
|
||||
(this.$refs.companyTree as any).getCompanyTreeList()
|
||||
} else if (data.value === 'add') {
|
||||
// this.buildUpdateForm()
|
||||
this.isReadonly = false
|
||||
|
@ -421,11 +416,11 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
this.updateParams.companyName = this.companyListMap[this.updateParams.companyId]
|
||||
this.updateParams.teams.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
let tmpRisks = [] as any;
|
||||
item.risks.forEach((items: any) => {
|
||||
tmpRisks.push(items.riskName)
|
||||
// let tmpRisks = [] as any;
|
||||
item.risks.forEach((items: any,index,oldArr) => {
|
||||
oldArr[index] = JSON.stringify({ riskName: items.riskName, riskLevel: items.riskLevel })
|
||||
})
|
||||
item.risks = tmpRisks
|
||||
// item.risks = tmpRisks
|
||||
})
|
||||
|
||||
this.buildUpdateForm();
|
||||
|
@ -478,8 +473,6 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
}
|
||||
//班组信息
|
||||
public subCallback(data) {
|
||||
console.log('data', data);
|
||||
|
||||
if (data.value === "add") {
|
||||
this.subUpdateParams = {
|
||||
risks: []
|
||||
|
@ -494,7 +487,6 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
// 批量删除班组信息
|
||||
this.deleteSubData(this.subSelectData.map((itm: any) => itm.index - 1))
|
||||
} else if (data.value === "bindRisk") {
|
||||
console.log(this.updateParams);
|
||||
//初始化班组风险点数据
|
||||
this.tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams))
|
||||
if (this.updateParams.teams.length === 0) {
|
||||
|
@ -523,13 +515,12 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
this.updateParams.teams.forEach((item, index) => {
|
||||
riskNumber = item.riskNumber + riskNumber;
|
||||
//处理风险点数据
|
||||
let tmpRisks = [] as any;
|
||||
item.risks.forEach((element) => {
|
||||
let tmpRisksItem = {} as any;
|
||||
tmpRisksItem.riskName = element
|
||||
tmpRisks.push(tmpRisksItem)
|
||||
// let tmpRisks = [] as any;
|
||||
item.risks.forEach((element: any,index,oldArr) => {
|
||||
oldArr[index] = JSON.parse(element)
|
||||
});
|
||||
item.risks = tmpRisks
|
||||
return item
|
||||
// item.risks = tmpRisks
|
||||
})
|
||||
this.updateParams.riskNumber = riskNumber;
|
||||
//处理风险点数据
|
||||
|
@ -539,13 +530,14 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
teams: [],
|
||||
} as any
|
||||
this.showUpdate = !!goOn;
|
||||
//更新企业树数据
|
||||
(this.$refs.companyTree as any).getCompanyTreeList()
|
||||
this.getTableData();
|
||||
})
|
||||
}
|
||||
|
||||
//班组 -- 风险信息 -- 添加
|
||||
public triCallback(data) {
|
||||
console.log('data', data);
|
||||
if (data.value === "cancel") {
|
||||
this.subShowUpdate = false;
|
||||
this.subIsReadonly = false;
|
||||
|
@ -596,7 +588,6 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
|
||||
//保存风险
|
||||
public doSaveRisks(goOn?) {
|
||||
console.log(this.subUpdateParams);
|
||||
this.subUpdateParams.chargeUserName = this.$store.getters.user_map[this.subUpdateParams.chargeUserId];
|
||||
this.subUpdateParams.riskNumber = this.subUpdateParams.risks.length
|
||||
if (this.subUpdateParams.index) {
|
||||
|
@ -635,7 +626,7 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
//匹配已选择数据
|
||||
public filterSelectedData(item, selected) {
|
||||
const selectedRistList = this.selectedRistList;
|
||||
if (selectedRistList.indexOf(item) !== -1) {
|
||||
if (selectedRistList.filter((items: any) => items === JSON.stringify(item)).length > 0) {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
|
@ -644,7 +635,6 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
|
||||
//绑定风险点操作
|
||||
public bindRiskCallback(data) {
|
||||
console.log('datadata', data);
|
||||
if (data.value === "cancel") {
|
||||
//恢复原有数据
|
||||
this.updateParams = this.tmpUpdateParams;
|
||||
|
@ -656,8 +646,7 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
})
|
||||
this.tmpUpdateParams = JSON.parse(JSON.stringify(this.updateParams));
|
||||
this.updateParams = this.tmpUpdateParams;
|
||||
this.showBindRisk = false
|
||||
console.log(this.updateParams);
|
||||
this.showBindRisk = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -667,8 +656,7 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
if (data) {
|
||||
let tmpBindRiskGroup = [] as any;
|
||||
this.storageBindRiskGroup.forEach((item) => {
|
||||
console.log('item', item);
|
||||
if (item.includes(data)) {
|
||||
if (item.riskName.includes(data)) {
|
||||
tmpBindRiskGroup.push(item)
|
||||
}
|
||||
})
|
||||
|
@ -684,13 +672,10 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
//风险点
|
||||
if (el.target.classList.contains("riskNumber")) {
|
||||
this.tableService.selectByDetail({ id: data.id }).then((res: any) => {
|
||||
console.log('res', res);
|
||||
this.proTableData = [] as any;
|
||||
res.data.teams.forEach((item: any) => {
|
||||
this.proTableData = this.proTableData.concat(item.risks)
|
||||
})
|
||||
// console.log('this.proTableData', this.proTableData);
|
||||
|
||||
this.proTableColumn.push({ name: '风险点', key: "riskName", });
|
||||
this.showProtable = true
|
||||
})
|
||||
|
@ -698,13 +683,10 @@ export default class MaintenanceInfo extends BaseRecordComponent<any> {
|
|||
//班组
|
||||
if (el.target.classList.contains("teamNum")) {
|
||||
this.tableService.selectByDetail({ id: data.id }).then((res: any) => {
|
||||
console.log('res', res);
|
||||
this.proTableData = [] as any;
|
||||
res.data.teams.forEach((item: any) => {
|
||||
this.proTableData = this.proTableData.concat(item)
|
||||
})
|
||||
// console.log('this.proTableData', this.proTableData);
|
||||
|
||||
this.proTableColumn.push({ name: '班组名称', key: "teamName", });
|
||||
this.proTableColumn.push({ name: '班组负责人', key: "chargeUserName", });
|
||||
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
<div class="common-box dis-flex ">
|
||||
<div class="common-content-box dis-flex flex-col flex-1">
|
||||
<div class="search-box">
|
||||
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
||||
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
|
||||
</div>
|
||||
<div class="table-box flex-1">
|
||||
|
||||
<div class="full">
|
||||
<el-radio-group text-color="#409EFF" fill="transparent" size="medium" v-model="params.type"
|
||||
@change="tabTableChange">
|
||||
|
@ -16,7 +11,7 @@
|
|||
|
||||
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
||||
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
|
||||
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="[]">
|
||||
@pageSizeChange="callback($event,'pageSize')" :footerActions="[]" :actions="[]">
|
||||
<!-- 班组风险研判 -->
|
||||
<el-table v-if="params.type === 1" ref="multipleTable" :data="tableData.datas" height="100%" border
|
||||
row-key="checked" style="width: 100%">
|
||||
|
@ -25,31 +20,23 @@
|
|||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="班组名称">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="班组负责人">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="已研判风险点">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="未研判风险点">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否已落实管控措施">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="研判时间">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<template v-for="item in teamsTableColumn">
|
||||
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
|
||||
:width="item.width" :key="item.key">
|
||||
<div :class="item.showTip ?'column-cell-render' :''" slot-scope="scope"
|
||||
v-html="item.render(scope.row)" :filters="item.filters"
|
||||
:filter-method="item.filterMethod" @click="showDetails($event,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">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||
<el-button type="text" @click="showUpdateModel(scope.row)">研判</el-button>
|
||||
<el-button v-if="scope.row.status !== 3" type="text"
|
||||
@click="showUpdateModel(scope.row)">研判</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -62,34 +49,23 @@
|
|||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="车间名称">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="车间负责人">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="已研判班组">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="未研判班组">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="风险点">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否已落实管控措施">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="研判时间">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<template v-for="item in workshopTableColumn">
|
||||
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
|
||||
:width="item.width" :key="item.key">
|
||||
<div :class="item.showTip ?'column-cell-render' :''" slot-scope="scope"
|
||||
v-html="item.render(scope.row)" :filters="item.filters"
|
||||
:filter-method="item.filterMethod" @click="showDetails($event,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">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showUpdateModel(scope.row)">查看</el-button>
|
||||
<el-button type="text" @click="showUpdateModel(scope.row)">研判</el-button>
|
||||
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||
<el-button v-if="scope.row.doFlag === 1" type="text"
|
||||
@click="showUpdateModel(scope.row)">研判</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -102,58 +78,49 @@
|
|||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="企业名称">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="企业负责人">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="已研判车间">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="未研判车间">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="风险点">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否已落实管控措施">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="研判时间">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<template v-for="item in companyTableColumn">
|
||||
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
|
||||
:width="item.width" :key="item.key">
|
||||
<div :class="item.showTip ?'column-cell-render' :''" slot-scope="scope"
|
||||
v-html="item.render(scope.row)" :filters="item.filters"
|
||||
:filter-method="item.filterMethod" @click="showDetails($event,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">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showUpdateModel(scope.row)">查看</el-button>
|
||||
<el-button type="text" @click="showUpdateModel(scope.row)">研判</el-button>
|
||||
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||
<el-button v-if="scope.row.doFlag === 1" type="text"
|
||||
@click="showUpdateModel(scope.row)">研判</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</TableComponent>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 研判 -->
|
||||
<el-dialog :close-on-click-modal="false" :title="isReadonly?'详情':updateParams.id?'编辑': '新增'"
|
||||
:visible.sync="showUpdate" width="952px" :before-close="handleClose" destroy-on-close>
|
||||
<el-dialog :close-on-click-modal="false" :title="isReadonly?'详情':'研判'" :visible.sync="showUpdate" width="952px"
|
||||
:before-close="handleClose" destroy-on-close>
|
||||
<FormComponent :options="updateOptions" labelWidth="140px" labelAlign="right" :data.sync="subUpdateParams"
|
||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes" :actions="updateActions"
|
||||
:full-btn="true" btnPosition="center">
|
||||
<div class="sub-title">{{subTableTitle}}</div>
|
||||
<TableComponent :tableData="subUpdateParams.risk" :tableColumn="subTableColumn"
|
||||
@actionCallback="callback($event)" :actions="(isReadonly || params.type !== 1) ? []:subTableActions"
|
||||
actionPosition="flex-start" :showFooter="false" style="margin-bottom: 20px;">
|
||||
<el-table ref="multipleTable" :data="subUpdateParams.risk" tooltip-effect="dark" max-height="300" border
|
||||
row-key="checked" style="width: 100%">
|
||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes"
|
||||
:actions="params.type !==1 ? []: updateActions" :full-btn="true" btnPosition="center" ref="basicForm">
|
||||
<div class="sub-title">{{subTableTitle[params.type]}}</div>
|
||||
<TableComponent :tableData="params.type === 1? subUpdateParams.risks:subUpdateParams.subordinates"
|
||||
:tableColumn="subTableColumn" @actionCallback="callback($event)"
|
||||
:actions="(isReadonly || params.type !== 1) ? []:subTableActions" actionPosition="flex-start"
|
||||
:showFooter="false" style="margin-bottom: 20px;">
|
||||
<el-table ref="multipleTable"
|
||||
:data="params.type === 1? subUpdateParams.risks:subUpdateParams.subordinates" tooltip-effect="dark"
|
||||
max-height="300" border row-key="checked" style="width: 100%">
|
||||
<template v-for="item in subTableColumn">
|
||||
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
|
||||
:width="item.width" :key="item.key">
|
||||
<div slot-scope="scope" v-html="item.render(scope.row)">
|
||||
<div slot-scope="scope" v-html="item.render(scope.row)"
|
||||
@click="showDetails($event,scope.row,subUpdateParams)">
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column v-else :prop="item.key" :show-overflow-tooltip="item.showTip"
|
||||
|
@ -163,19 +130,21 @@
|
|||
<el-table-column v-if="params.type === 1" label="操作" fixed="right" width="120">
|
||||
<div slot-scope="scope">
|
||||
<el-button type="text" @click="showJudgmentModal(scope.row,true)">查看</el-button>
|
||||
<el-button type="text" @click="showJudgmentModal(scope.row)">研判</el-button>
|
||||
<el-button v-if="!isReadonly" type="text"
|
||||
@click="showJudgmentModal(scope.row)">研判</el-button>
|
||||
</div>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</TableComponent>
|
||||
</FormComponent>
|
||||
<FormComponent v-if="params.type !==1" :options="resultOptions" labelWidth="140px" labelAlign="right"
|
||||
:data.sync="subUpdateParams" res="riskContentForm" :isReadonly="isReadonly" @actionCallback="callback"
|
||||
@change="changes" :actions="updateActions" :full-btn="true" btnPosition="center">
|
||||
</FormComponent>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 研判表 -->
|
||||
<el-dialog :close-on-click-modal="false" :title="'风险点名称'" :visible.sync="subShowUpdate" width="952px"
|
||||
<el-dialog :close-on-click-modal="false" :title="triTableTitle" :visible.sync="subShowUpdate" width="952px"
|
||||
destroy-on-close>
|
||||
<el-table ref="multipleTable" :data="judgmentData" tooltip-effect="dark" max-height="600" border
|
||||
row-key="checked" style="width: 100%" :span-method="objectSpanMethod">
|
||||
|
@ -193,22 +162,48 @@
|
|||
</el-table-column>
|
||||
<el-table-column prop="result" label="风险研判结果">
|
||||
<div slot-scope="scope">
|
||||
<span v-if="isReadonly">{{scope.row.result}}</span>
|
||||
<span v-if="subIsReadonly">{{scope.row.result}}</span>
|
||||
<el-input v-else type="textarea" v-model="scope.row.result"></el-input>
|
||||
<!-- <span >{{scope.row.result}}</span> -->
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="measure" label="管控措施">
|
||||
<div slot-scope="scope">
|
||||
<span v-if="isReadonly">{{scope.row.measure}}</span>
|
||||
<span v-if="subIsReadonly">{{scope.row.measure}}</span>
|
||||
<el-input v-else type="textarea" v-model="scope.row.measure"></el-input>
|
||||
<!-- <span >{{scope.row.measure}}</span> -->
|
||||
</div>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<FormComponent :options="resultOptions" labelWidth="140px" labelAlign="right" :data.sync="subUpdateParams"
|
||||
:isReadonly="isReadonly" @actionCallback="triCallback" @change="changes" :actions="judgmentFooterActions"
|
||||
:full-btn="true" btnPosition="center">
|
||||
<FormComponent :options="resultOptions" labelWidth="140px" labelAlign="right" :data.sync="riskUpdateParams"
|
||||
res="riskContentForm" :isReadonly="subIsReadonly" @actionCallback="triCallback" @change="changes"
|
||||
:actions="judgmentFooterActions" :full-btn="true" btnPosition="center">
|
||||
</FormComponent>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog v-if="showFile" :close-on-click-modal="false" title="查看图片" :visible.sync="showFile" destroy-on-close
|
||||
width="680px">
|
||||
<img :src="currentUrl" style="width: 100%;" alt="">
|
||||
</el-dialog>
|
||||
|
||||
<!-- 信息弹框 -->
|
||||
<el-dialog v-if="showDetailModal" :close-on-click-modal="false" :visible.sync="showDetailModal" destroy-on-close
|
||||
width="952px">
|
||||
<el-table :data="detailTableData.datas" max-height="600px" border row-key="checked" style="width: 100%">
|
||||
<el-table-column label="序号" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<template v-for="item in detailTableColumn">
|
||||
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
|
||||
:width="item.width" :key="item.key" :filters="item.filters" :filter-method="item.filterMethod">
|
||||
<div :class="item.showTip ?'column-cell-render' :''" slot-scope="scope"
|
||||
v-html="item.render(scope.row)" :filters="item.filters" :filter-method="item.filterMethod">
|
||||
</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">
|
||||
</el-table-column>
|
||||
</template>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
</div>
|
|
@ -4,13 +4,15 @@ import template from "./riskJudgment.component.html"
|
|||
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue"
|
||||
import FormComponent from "hbt-common/components/common/form.component.vue"
|
||||
import TableComponent from "hbt-common/components/common/table.component.vue"
|
||||
import MaintenanceInfoService from "@/service/maintenanceInfo.service"
|
||||
import RiskJudgmentService from "@/service/riskJudgment.service"
|
||||
import FormOption from "hbt-common/models/formOptions"
|
||||
import BtnOption from "hbt-common/models/btnOptions"
|
||||
import DrawComponent from '@/components/draw.component.vue';
|
||||
import ButtonListComponent from "hbt-common/components/common/buttonList.component.vue";
|
||||
import UnitTreeComponent from '@/components/tree.component.vue';
|
||||
import judgment from "@/mock/judgment";
|
||||
import moment from 'moment';
|
||||
import { Row } from 'element-ui';
|
||||
|
||||
@Component({
|
||||
template,
|
||||
|
@ -23,7 +25,7 @@ import judgment from "@/mock/judgment";
|
|||
},
|
||||
})
|
||||
export default class RiskJudgment extends BaseRecordComponent<any> {
|
||||
public tableService = new MaintenanceInfoService();
|
||||
public tableService = new RiskJudgmentService();
|
||||
|
||||
public params = {
|
||||
type: 1
|
||||
|
@ -35,16 +37,45 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
|
||||
public fileList = [] as any;
|
||||
|
||||
public teamsTableColumn = [] as any;
|
||||
|
||||
public workshopTableColumn = [] as any;
|
||||
|
||||
public companyTableColumn = [] as any;
|
||||
|
||||
public subTableColumn = [] as any;
|
||||
|
||||
public subUpdateParams = {
|
||||
risk: [{ index: 0, key: 0, }]
|
||||
risks: []
|
||||
} as any;
|
||||
|
||||
public riskUpdateParams = {} as any;
|
||||
|
||||
public subShowUpdate = false;
|
||||
|
||||
public judgmentData = judgment;
|
||||
public judgmentData = JSON.parse(JSON.stringify(judgment));
|
||||
|
||||
public subTableTitle = '风险研判';
|
||||
public subTableTitle = ['', '风险研判', '班组研判信息', '车间研判信息'];
|
||||
|
||||
public triTableTitle = '';
|
||||
|
||||
public hideNextBtn = false;
|
||||
|
||||
public tableState = { 1: '待研判', 2: '已研判', 3: '未研判' };
|
||||
|
||||
public tableStateColor = ['', '#E6A23C', "#68C23A", "#F56C6C"];
|
||||
|
||||
public subTableState = { 0: '未研判', 1: "已研判" };
|
||||
|
||||
public currentUrl = '';
|
||||
|
||||
public detailTableData = {} as any;
|
||||
|
||||
public showDetailModal = false;
|
||||
|
||||
public detailTableColumn = [] as any;
|
||||
|
||||
public showFile = false;
|
||||
|
||||
public tabs = [{
|
||||
name: "班组风险研判",
|
||||
|
@ -99,18 +130,6 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
name: "取消",
|
||||
value: "cancel"
|
||||
}];
|
||||
public judgmentFooterActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "下一条",
|
||||
value: "next",
|
||||
type: "primary"
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}] as any;
|
||||
|
||||
public updateParams = {} as any;
|
||||
public selectData = [];
|
||||
|
@ -122,68 +141,75 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
public buildUpdateForm() {
|
||||
this.updateOptions = [{
|
||||
name: "班组名称",
|
||||
key: "controlName",
|
||||
type: "select",
|
||||
key: "name",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
hide: this.params.type !== 1
|
||||
hide: this.params.type !== 1,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "班组负责人",
|
||||
key: "analName",
|
||||
key: "chargeUserName",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
hide: this.params.type !== 1
|
||||
hide: this.params.type !== 1,
|
||||
showError: false,
|
||||
disable: true
|
||||
},
|
||||
{
|
||||
name: "车间名称",
|
||||
key: "controlName",
|
||||
type: "select",
|
||||
key: "name",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
hide: this.params.type !== 2
|
||||
hide: this.params.type !== 2,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "车间负责人",
|
||||
key: "analName",
|
||||
key: "chargeUserName",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
hide: this.params.type !== 2
|
||||
hide: this.params.type !== 2,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "企业名称",
|
||||
key: "controlName",
|
||||
key: "name",
|
||||
type: "select",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
hide: this.params.type !== 3
|
||||
hide: this.params.type !== 3,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "企业负责人",
|
||||
key: "analName",
|
||||
key: "chargeUserName",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
hide: this.params.type !== 3
|
||||
hide: this.params.type !== 3,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "研判时间",
|
||||
key: "seriousResult",
|
||||
format: "seriousResultName",
|
||||
type: "select",
|
||||
key: "researchTime",
|
||||
type: "date",
|
||||
subType: "datetime",
|
||||
require: true,
|
||||
multiple: true,
|
||||
width: "calc(50% - 20px)",
|
||||
datas: this.$store.state.userList,
|
||||
showError: false,
|
||||
format: "yyyy-MM-dd HH:mm:ss"
|
||||
},
|
||||
{
|
||||
name: "负责人签名",
|
||||
key: "file1",
|
||||
key: "file",
|
||||
ref: "file",
|
||||
type: "upload",
|
||||
width: "calc(50% - 20px)",
|
||||
|
@ -206,12 +232,13 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
}]
|
||||
}, {
|
||||
name: "是否已落实管控措施",
|
||||
key: "seriousResult",
|
||||
format: "seriousResultName",
|
||||
key: "workableFlag",
|
||||
format: "workableFlagName",
|
||||
type: "radio",
|
||||
require: true,
|
||||
labelWidth: "140px",
|
||||
width: "calc(50% - 20px)",
|
||||
showError: false,
|
||||
datas: [{
|
||||
name: "是",
|
||||
value: 1,
|
||||
|
@ -231,33 +258,124 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
}];
|
||||
}
|
||||
|
||||
public resultOptions: FormOption<BtnOption>[] = [
|
||||
{
|
||||
name: "研判状态",
|
||||
key: "controlName",
|
||||
type: "radio",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
datas: [{
|
||||
name: "已研判",
|
||||
value: 1
|
||||
},]
|
||||
},
|
||||
] as any;
|
||||
public resultOptions: FormOption<BtnOption>[] = [] as any;
|
||||
public judgmentFooterActions = [] as any;
|
||||
public buildJudgmentForm() {
|
||||
this.resultOptions = [
|
||||
{
|
||||
name: "研判状态",
|
||||
key: "status",
|
||||
format: 'statusName',
|
||||
type: "radio",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
showError: false,
|
||||
disable: this.params.type !== 1,
|
||||
datas: [{
|
||||
name: "已研判",
|
||||
value: 1
|
||||
},]
|
||||
},
|
||||
];
|
||||
this.judgmentFooterActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "下一条",
|
||||
value: "next",
|
||||
type: "primary",
|
||||
hide: this.hideNextBtn,
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}] as any;
|
||||
}
|
||||
|
||||
|
||||
created() {
|
||||
//
|
||||
this.buildSubTable()
|
||||
|
||||
|
||||
}
|
||||
|
||||
public buildTable() {
|
||||
this.tableColumn.push({ name: '车间名称', key: "controlName", });
|
||||
this.tableColumn.push({ name: '车间负责人', key: "analName", });
|
||||
this.tableColumn.push({ name: '企业名称', key: "riskSource", });
|
||||
this.tableColumn.push({ name: '下属班组', key: "seriousResult", });
|
||||
this.tableColumn.push({ name: '风险点合计', key: "riskLevel", });
|
||||
this.tableColumn.push({ name: '录入人', key: "appraiser" });
|
||||
this.tableColumn.push({ name: '录入时间', key: "appraiseTime", });
|
||||
//班组
|
||||
this.teamsTableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
return `<span style="color:${this.tableStateColor[data.status]}">${this.tableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
this.teamsTableColumn.push({ name: '班组名称', key: "name", });
|
||||
this.teamsTableColumn.push({ name: '班组负责人', key: "chargeUserName", });
|
||||
this.teamsTableColumn.push({ name: '已研判风险点', key: "completeNum", });
|
||||
this.teamsTableColumn.push({ name: '未研判风险点', key: "noCompleteNum", });
|
||||
this.teamsTableColumn.push({
|
||||
name: '是否已落实管控措施', key: "workableFlag", render: (data) => {
|
||||
return data.workableFlag === 1 ? '是' : '否'
|
||||
}
|
||||
});
|
||||
this.teamsTableColumn.push({ name: '研判时间', key: "researchTime", });
|
||||
//车间
|
||||
this.workshopTableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
return `<span style="color:${this.tableStateColor[data.status]}">${this.tableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
this.workshopTableColumn.push({ name: '车间名称', key: "name", });
|
||||
this.workshopTableColumn.push({ name: '车间负责人', key: "chargeUserName", });
|
||||
this.workshopTableColumn.push({
|
||||
name: '已研判班组', key: "completeNum", render: (data) => {
|
||||
return "<span class='link completeNum'>" + (data.completeNum ? data.completeNum : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.workshopTableColumn.push({
|
||||
name: '未研判班组', key: "noCompleteNum", render: (data) => {
|
||||
return "<span class='link nocompleteNum'>" + (data.noCompleteNum ? data.noCompleteNum : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.workshopTableColumn.push({
|
||||
name: '风险点', key: "riskNumber", render: (data) => {
|
||||
return "<span class='link riskNumber'>" + (data.riskNumber ? data.riskNumber : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.workshopTableColumn.push({
|
||||
name: '是否已落实管控措施', key: "workableFlag", render: (data) => {
|
||||
return data.workableFlag === 1 ? '是' : '否'
|
||||
}
|
||||
});
|
||||
this.workshopTableColumn.push({ name: '研判时间', key: "researchTime", });
|
||||
//企业
|
||||
this.companyTableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
return `<span style="color:${this.tableStateColor[data.status]}">${this.tableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
this.companyTableColumn.push({ name: '企业名称', key: "name", });
|
||||
this.companyTableColumn.push({ name: '企业负责人', key: "chargeUserName", });
|
||||
this.companyTableColumn.push({
|
||||
name: '已研判车间', key: "completeNum", render: (data) => {
|
||||
return "<span class='link completeNum'>" + (data.completeNum ? data.completeNum : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.companyTableColumn.push({
|
||||
name: '未研判车间', key: "noCompleteNum", render: (data) => {
|
||||
return "<span class='link nocompleteNum'>" + (data.noCompleteNum ? data.noCompleteNum : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.companyTableColumn.push({
|
||||
name: '风险点', key: "riskNumber", render: (data) => {
|
||||
return "<span class='link riskNumber'>" + (data.riskNumber ? data.riskNumber : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.companyTableColumn.push({
|
||||
name: '是否已落实管控措施', key: "workableFlag", render: (data) => {
|
||||
return data.workableFlag === 1 ? '是' : '否'
|
||||
}
|
||||
});
|
||||
this.companyTableColumn.push({ name: '研判时间', key: "researchTime", });
|
||||
|
||||
}
|
||||
|
||||
//子表 -- table
|
||||
|
@ -265,29 +383,55 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
this.subTableColumn = [] as any;
|
||||
if (this.params.type === 1) {
|
||||
this.subTableColumn.push({ name: "序号", key: "index" });
|
||||
this.subTableColumn.push({ name: "风险点名称", key: "index" });
|
||||
this.subTableColumn.push({ name: "风险等级", key: "index" });
|
||||
this.subTableColumn.push({ name: "研判状态", key: "index" });
|
||||
this.subTableColumn.push({ name: "风险点名称", key: "riskName" });
|
||||
this.subTableColumn.push({
|
||||
name: "风险等级", key: "riskLevel", render: (data) => {
|
||||
if (data.riskLevel) {
|
||||
return "<span class='color_level_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
||||
}
|
||||
}
|
||||
});
|
||||
this.subTableColumn.push({
|
||||
name: "研判状态", key: "status", render: (data) => {
|
||||
return `<span class="color_${data.status}">${this.subTableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
} else if (this.params.type === 2) {
|
||||
this.subTableColumn.push({ name: "序号", key: "index" });
|
||||
this.subTableColumn.push({ name: "班组名称", key: "index" });
|
||||
this.subTableColumn.push({ name: "班组负责人", key: "index" });
|
||||
this.subTableColumn.push({ name: "风险点", key: "index" });
|
||||
this.subTableColumn.push({ name: "重大风险", key: "index" });
|
||||
this.subTableColumn.push({ name: "较大风险", key: "index" });
|
||||
this.subTableColumn.push({ name: "一般风险", key: "index" });
|
||||
this.subTableColumn.push({ name: "低风险", key: "index" });
|
||||
this.subTableColumn.push({ name: "研判状态", key: "index" });
|
||||
this.subTableColumn.push({ name: "班组名称", key: "subordinateName" });
|
||||
this.subTableColumn.push({ name: "班组负责人", key: "chargeUserName" });
|
||||
this.subTableColumn.push({
|
||||
name: "风险点", key: "total", render: (data) => {
|
||||
return "<span class='link total'>" + (data.total ? data.total : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.subTableColumn.push({ name: "重大风险", key: "greater" });
|
||||
this.subTableColumn.push({ name: "较大风险", key: "significant" });
|
||||
this.subTableColumn.push({ name: "一般风险", key: "general" });
|
||||
this.subTableColumn.push({ name: "低风险", key: "low" });
|
||||
this.subTableColumn.push({
|
||||
name: "研判状态", key: "status", render: (data) => {
|
||||
return `<span style="color:${this.tableStateColor[data.status]}">${this.tableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
} else if (this.params.type === 3) {
|
||||
this.subTableColumn.push({ name: "序号", key: "index" });
|
||||
this.subTableColumn.push({ name: "车间名称", key: "index" });
|
||||
this.subTableColumn.push({ name: "车间负责人", key: "index" });
|
||||
this.subTableColumn.push({ name: "风险点", key: "index" });
|
||||
this.subTableColumn.push({ name: "重大风险", key: "index" });
|
||||
this.subTableColumn.push({ name: "较大风险", key: "index" });
|
||||
this.subTableColumn.push({ name: "一般风险", key: "index" });
|
||||
this.subTableColumn.push({ name: "低风险", key: "index" });
|
||||
this.subTableColumn.push({ name: "研判状态", key: "index" });
|
||||
this.subTableColumn.push({ name: "车间名称", key: "subordinateName" });
|
||||
this.subTableColumn.push({ name: "车间负责人", key: "chargeUserName" });
|
||||
this.subTableColumn.push({
|
||||
name: "风险点", key: "total", render: (data) => {
|
||||
return "<span class='link total'>" + (data.total ? data.total : 0) + "</span>"
|
||||
}
|
||||
});
|
||||
this.subTableColumn.push({ name: "重大风险", key: "significant" });
|
||||
this.subTableColumn.push({ name: "较大风险", key: "greater" });
|
||||
this.subTableColumn.push({ name: "一般风险", key: "general" });
|
||||
this.subTableColumn.push({ name: "低风险", key: "low" });
|
||||
this.subTableColumn.push({
|
||||
name: "研判状态", key: "status", render: (data) => {
|
||||
return `<span style="color:${this.tableStateColor[data.status]}">${this.tableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -296,7 +440,6 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
//
|
||||
}
|
||||
|
||||
|
||||
public callback(data, type) {
|
||||
if (type) {
|
||||
this.params[type] = data;
|
||||
|
@ -310,20 +453,28 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
} else if (data.value === "cancel") {
|
||||
this.showUpdate = false
|
||||
} else if (data.value === 'batchAdd') {
|
||||
// this.buildUpdateForm()
|
||||
console.log('1111');
|
||||
this.$confirm('批量研判会统一修改研判状态为“已研判”,并写入默认数据。请在此确认是否操作?', '确认数据', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
//批量处理
|
||||
}).catch(() => {
|
||||
//
|
||||
});
|
||||
|
||||
//批量研判
|
||||
this.batchAddMethod();
|
||||
} else if (data.value === 'save') {
|
||||
this.doSave()
|
||||
}
|
||||
}
|
||||
//批量研判
|
||||
public batchAddMethod() {
|
||||
this.$confirm('批量研判会统一修改研判状态为“已研判”,并写入默认数据。请在此确认是否操作?', '确认数据', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
//批量处理
|
||||
const judgmentdata = JSON.parse(JSON.stringify(judgment));
|
||||
this.subUpdateParams.risks.forEach((item: any) => {
|
||||
item.content = JSON.stringify(judgmentdata);
|
||||
item.status = 1;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// 重置数据
|
||||
public reset() {
|
||||
this.params = {
|
||||
|
@ -344,77 +495,179 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
this.buildUpdateForm()
|
||||
}
|
||||
|
||||
|
||||
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 onPreview(file: any) {
|
||||
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 onSuccess(res, file, fileList) {
|
||||
public onSuccess(res: any) {
|
||||
if (res.code === 200) {
|
||||
this.fileList = [];
|
||||
this.fileList.push({
|
||||
name: res.data.originalName,
|
||||
url: res.data.url,
|
||||
type: res.data.type,
|
||||
id: res.data.id
|
||||
})
|
||||
this.subUpdateParams.file = this.fileList.length || null;
|
||||
this.buildUpdateForm()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public onRemove(file, fileList) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.id === file.response.data.id), 1)
|
||||
public onRemove(file: any) {
|
||||
this.fileList.splice(this.fileList.findIndex((item: any) => item.id === file.uid), 1)
|
||||
this.subUpdateParams.file = this.fileList.length || null;
|
||||
}
|
||||
|
||||
//标签页切换
|
||||
public tabTableChange(type) {
|
||||
console.log('type', type);
|
||||
console.log('1111111111');
|
||||
|
||||
this.params.pageNum = 1;
|
||||
this.buildSubTable()
|
||||
if (type === 1) {
|
||||
// this.buildFormOptions()
|
||||
// this.getTableData()
|
||||
this.subTableTitle = '风险研判'
|
||||
} else if (type === 2) {
|
||||
// this.buildFormOptions()
|
||||
// this.getReportTableData()
|
||||
this.subTableTitle = '班组研判信息'
|
||||
} else if (type === 3) {
|
||||
//
|
||||
this.subTableTitle = '企业研判信息'
|
||||
}
|
||||
console.log(this.params);
|
||||
|
||||
this.getTableData()
|
||||
}
|
||||
|
||||
//保存
|
||||
public doSave() {
|
||||
if ((this.$refs.basicForm as any).vaildParams()) {
|
||||
//车间或者企业判断
|
||||
if (this.params.type !== 1) {
|
||||
if (this.subUpdateParams.subordinates.filter((item: any) => item.status !== 2).length > 0) {
|
||||
this.$message.error("请先确定风险点已研判完成!");
|
||||
return
|
||||
}
|
||||
}
|
||||
this.subUpdateParams.resourceId = this.fileList.map((item: any) => item.id).join(",");
|
||||
this.subUpdateParams.resourceName = this.fileList.map((item: any) => item.name).join(",");
|
||||
this.subUpdateParams.status = 2;
|
||||
this.tableService.addOrUpdate(this.subUpdateParams, false).then((res: any) => {
|
||||
this.$message.success("研判成功!");
|
||||
this.subUpdateParams = { risks: [] } as any
|
||||
this.showUpdate = false;
|
||||
this.getTableData();
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
//风险点研判信息
|
||||
public triCallback(data) {
|
||||
console.log('data', data);
|
||||
if (data && data.value === "cancel") {
|
||||
this.subShowUpdate = false
|
||||
} else if (data.value === 'save') {
|
||||
//保存研判表数据
|
||||
this.doSaveJudgmentContent()
|
||||
this.subShowUpdate = false;
|
||||
} else if (data.value === 'next') {
|
||||
//下一步研判
|
||||
if (this.riskUpdateParams.status !== 1) {
|
||||
this.$message.error("当前风险未研判!");
|
||||
return
|
||||
}
|
||||
//下一条研判
|
||||
//先保存当前数据
|
||||
this.doSaveJudgmentContent();
|
||||
//处理下一条数据
|
||||
this.handleNextMethod();
|
||||
this.buildJudgmentForm()
|
||||
}
|
||||
}
|
||||
|
||||
public handleNextMethod() {
|
||||
let currentRiskIdx = this.subUpdateParams.risks.findIndex((item) => item.id === this.riskUpdateParams.id);
|
||||
this.riskUpdateParams = this.subUpdateParams.risks[currentRiskIdx + 1];
|
||||
//判断是否是最后一条
|
||||
if ((currentRiskIdx + 2) === this.subUpdateParams.risks.length) {
|
||||
this.hideNextBtn = true;
|
||||
} else {
|
||||
this.hideNextBtn = false;
|
||||
}
|
||||
this.riskUpdateParams.status = null
|
||||
this.triTableTitle = this.riskUpdateParams.riskName;
|
||||
this.judgmentData = this.riskUpdateParams.content ? JSON.parse(this.riskUpdateParams.content) : JSON.parse(JSON.stringify(judgment));
|
||||
}
|
||||
|
||||
//研判 -- 查看
|
||||
public showUpdateModel(row, isreadonly) {
|
||||
this.showUpdate = true;
|
||||
this.buildUpdateForm()
|
||||
public showUpdateModel(row: any, isreadonly: any) {
|
||||
this.subUpdateParams = { risks: [] } as any;
|
||||
this.fileList = [];
|
||||
this.subUpdateParams.file = null;
|
||||
if (isreadonly) {
|
||||
this.isReadonly = true;
|
||||
} else {
|
||||
this.isReadonly = false;
|
||||
}
|
||||
this.tableService.selectByDetail({ id: row.id, type: this.params.type }).then((res: any) => {
|
||||
this.subUpdateParams = res.data;
|
||||
this.subUpdateParams.name = row.name;
|
||||
this.subUpdateParams.chargeUserName = row.chargeUserName;
|
||||
this.subUpdateParams.researchTime = moment().format('YYYY-MM-DD HH:mm:ss');
|
||||
this.subUpdateParams.workableFlagName = this.subUpdateParams.workableFlag === 1 ? '是' : '否';
|
||||
if (this.params.type === 1) {
|
||||
this.subUpdateParams.risks.forEach((item, index) => {
|
||||
item.index = index + 1
|
||||
})
|
||||
} else {
|
||||
if (this.subUpdateParams.subordinates.filter((item) => item.status !== 2).length > 0) {
|
||||
this.subUpdateParams.status = 0
|
||||
this.subUpdateParams.statusName = '未研判'
|
||||
} else {
|
||||
this.subUpdateParams.status = 1
|
||||
this.subUpdateParams.statusName = '已研判'
|
||||
}
|
||||
this.subUpdateParams.subordinates.forEach((item, index) => {
|
||||
item.index = index + 1;
|
||||
})
|
||||
this.buildJudgmentForm()
|
||||
}
|
||||
// 获取url
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId }).then((file: any) => {
|
||||
this.fileList = file.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
url: item.url,
|
||||
type: item.type,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
if (!isreadonly) {
|
||||
this.subUpdateParams.file = this.fileList.length || null;
|
||||
}
|
||||
this.buildUpdateForm();
|
||||
})
|
||||
}
|
||||
this.buildUpdateForm();
|
||||
this.showUpdate = true;
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
//研判操作
|
||||
public showJudgmentModal(row, isreadonly) {
|
||||
this.subShowUpdate = true
|
||||
public showJudgmentModal(row: any, isreadonly: any) {
|
||||
this.triTableTitle = row.riskName;
|
||||
this.riskUpdateParams = JSON.parse(JSON.stringify(row));
|
||||
if (isreadonly) {
|
||||
this.subIsReadonly = true;
|
||||
this.riskUpdateParams.statusName = this.riskUpdateParams.status === 1 ? '已研判' : '未研判'
|
||||
} else {
|
||||
this.subIsReadonly = false;
|
||||
if (this.riskUpdateParams.status !== 1) {
|
||||
this.riskUpdateParams.status = null
|
||||
}
|
||||
}
|
||||
this.judgmentData = row.content ? JSON.parse(row.content) : JSON.parse(JSON.stringify(judgment));
|
||||
if (row.index === this.subUpdateParams.risks.length) {
|
||||
this.hideNextBtn = true;
|
||||
} else {
|
||||
this.hideNextBtn = false;
|
||||
}
|
||||
this.buildJudgmentForm()
|
||||
this.subShowUpdate = true;
|
||||
}
|
||||
|
||||
//合并研判表的单元格
|
||||
|
@ -445,7 +698,110 @@ export default class RiskJudgment extends BaseRecordComponent<any> {
|
|||
}
|
||||
}
|
||||
|
||||
//保存研判内容
|
||||
public doSaveJudgmentContent() {
|
||||
this.riskUpdateParams.content = JSON.stringify(this.judgmentData);
|
||||
this.subUpdateParams.risks.splice(this.subUpdateParams.risks.findIndex(item => item.id === this.riskUpdateParams.id), 1, this.riskUpdateParams);
|
||||
}
|
||||
//查看信息
|
||||
public showDetails(el, data, rowparams) {
|
||||
//初始化参数
|
||||
let params = {} as any;
|
||||
params.taskId = data.taskId;
|
||||
params.type = this.params.type
|
||||
if (this.params.type === 2) {
|
||||
params.workshopId = data.workshopId
|
||||
} else if (this.params.type === 3) {
|
||||
params.companyId = data.companyId
|
||||
}
|
||||
//已判班组车间
|
||||
if (el.target.classList.contains("completeNum")) {
|
||||
params.status = 2
|
||||
this.judgmentMethod(params);
|
||||
}
|
||||
//未判班组车间
|
||||
if (el.target.classList.contains("nocompleteNum")) {
|
||||
this.judgmentMethod(params);
|
||||
}
|
||||
//风险点
|
||||
if (el.target.classList.contains("riskNumber")) {
|
||||
this.tableService.selectRiskGroup({ id: data.workshopId ? data.workshopId : data.companyId, type: this.params.type }).then((res) => {
|
||||
this.addTeamsColumnMethod('risk');
|
||||
this.detailTableData.datas = res.data
|
||||
this.showDetailModal = true
|
||||
})
|
||||
}
|
||||
//班组 车间风险点详情
|
||||
if (el.target.classList.contains("total")) {
|
||||
this.riskDetailMethod(rowparams, data);
|
||||
}
|
||||
}
|
||||
//班组 车间风险点详情
|
||||
public riskDetailMethod(rowparams: any, data: any) {
|
||||
if (this.params.type === 3) {
|
||||
this.tableService.getWorkshopRiskList({ workshopId: data.subordinateId }).then((res: any) => {
|
||||
this.detailTableData.datas = res.data;
|
||||
this.addTeamsColumnMethod('totalrisk');
|
||||
this.showDetailModal = true;
|
||||
})
|
||||
return
|
||||
}
|
||||
let params = {} as any;
|
||||
params.taskId = rowparams.taskId;
|
||||
params.teamId = data.subordinateId;
|
||||
this.tableService.selectRiskList(params).then((res: any) => {
|
||||
this.detailTableData.datas = res.data.datas;
|
||||
this.addTeamsColumnMethod('totalrisk');
|
||||
this.showDetailModal = true;
|
||||
});
|
||||
}
|
||||
|
||||
//已研判、未研判信息
|
||||
public judgmentMethod(params: any) {
|
||||
this.tableService.selectResearchDetail(params).then((res: any) => {
|
||||
this.detailTableData.datas = res.data;
|
||||
//班组、车间 定义column
|
||||
this.addTeamsColumnMethod(null);
|
||||
this.showDetailModal = true;
|
||||
});
|
||||
}
|
||||
|
||||
//已研判 未研判
|
||||
public addTeamsColumnMethod(type) {
|
||||
this.detailTableColumn = [];
|
||||
if (type && type.indexOf('risk') !== -1) {
|
||||
if (type === 'risk') {
|
||||
if (this.params.type === 2) {
|
||||
this.detailTableColumn.push({ name: "班组名称", key: "name" });
|
||||
}
|
||||
if (this.params.type === 3) {
|
||||
this.detailTableColumn.push({ name: "车间名称", key: "name" });
|
||||
}
|
||||
}
|
||||
this.detailTableColumn.push({ name: "风险点", key: "riskName" });
|
||||
this.detailTableColumn.push({
|
||||
name: "风险等级", key: "riskLevel", render: (data) => {
|
||||
return "<span class='color_level_" + data.riskLevel + "'>" + (data.riskLevel ? (this.$store.getters.prevention_risk_level_map[data.riskLevel]) : '') + "</span>"
|
||||
},
|
||||
filters: this.$store.state.prevention_risk_level.map(item => {
|
||||
return {
|
||||
text: item.name,
|
||||
value: item.value,
|
||||
}
|
||||
}), filterMethod: (data, row) => {
|
||||
return row.riskLevel === data;
|
||||
}
|
||||
});
|
||||
return
|
||||
}
|
||||
if (this.params.type === 2) {
|
||||
this.detailTableColumn.push({ name: "班组名称", key: "subordinateName" });
|
||||
}
|
||||
if (this.params.type === 3) {
|
||||
this.detailTableColumn.push({ name: "车间名称", key: "subordinateName" });
|
||||
}
|
||||
this.detailTableColumn.push({ name: "班组负责人", key: "chargeUserName" });
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div class="common-box dis-flex ">
|
||||
<div class="common-content-box dis-flex flex-col flex-1">
|
||||
<div class="search-box">
|
||||
<!-- <div class="search-box">
|
||||
<FormComponent :options="formOptions" :data.sync="params" @actionCallback="callback" :actions="formActions"
|
||||
:full-btn="false" @change="callback" btn-position="end"></FormComponent>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="table-box flex-1">
|
||||
<div class="full">
|
||||
<el-radio-group text-color="#409EFF" fill="transparent" size="medium" v-model="params.type"
|
||||
|
@ -14,114 +14,50 @@
|
|||
</div>
|
||||
<TableComponent :tableData="tableData" :tableColumn="tableColumn" @tabCallback="callback($event)"
|
||||
@actionCallback="callback($event)" @pageNumberChange="callback($event,'pageNum')"
|
||||
@pageSizeChange="callback($event,'pageSize')" :footerActions="footerActions" :actions="[]">
|
||||
@pageSizeChange="callback($event,'pageSize')" :footerActions="[]" :actions="[]">
|
||||
<!-- 班组风险研判 -->
|
||||
<el-table v-if="params.type === 1" ref="multipleTable" :data="tableData.datas" height="100%" border
|
||||
row-key="checked" style="width: 100%">
|
||||
<el-table ref="multipleTable" :data="tableData.datas" height="100%" border row-key="checked"
|
||||
style="width: 100%">
|
||||
<el-table-column label="序号" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="班组名称">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="班组负责人">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="公告时间">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="风险点个数">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<template v-for="item in tableColumn">
|
||||
<el-table-column v-if="item.render" :show-overflow-tooltip="item.showTip" :label="item.name"
|
||||
:width="item.width" :key="item.key">
|
||||
<div :class="item.showTip ?'column-cell-render' :''" slot-scope="scope"
|
||||
v-html="item.render(scope.row)" :filters="item.filters"
|
||||
:filter-method="item.filterMethod">
|
||||
</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">
|
||||
</el-table-column>
|
||||
</template>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||
<el-button type="text" @click="showUpdateModel(scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
v-if="(params.type === 1 && scope.row.status === 1)|| (params.type !== 1 &&scope.row.doFlag === 1)"
|
||||
type="text" @click="showUpdateModel(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 车间风险研判 -->
|
||||
<el-table v-else-if="params.type === 2" ref="multipleTable" :data="tableData.datas" height="100%" border
|
||||
row-key="checked" style="width: 100%">
|
||||
<el-table-column label="序号" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="车间名称">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="车间负责人">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="班组公告情况">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="公告时间">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="风险点个数">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||
<el-button type="text" @click="showUpdateModel(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 企业风险研判 -->
|
||||
<el-table v-else-if="params.type === 3" ref="multipleTable" :data="tableData.datas" height="100%" border
|
||||
row-key="checked" style="width: 100%">
|
||||
<el-table-column label="序号" width="60">
|
||||
<template slot-scope="scope">
|
||||
{{scope.$index+1}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="企业名称">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="企业负责人">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="车间公告情况">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="公告时间">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="风险点个数">
|
||||
<div slot-scope="scope">{{scope.row.operateCompleted}}</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="showUpdateModel(scope.row,true)">查看</el-button>
|
||||
<el-button type="text" @click="showUpdateModel(scope.row)">编辑</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
</TableComponent>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 承诺书 -->
|
||||
<el-dialog :close-on-click-modal="false" :title="'风险点名称'" :visible.sync="showUpdate" width="1080px"
|
||||
<el-dialog :close-on-click-modal="false" :title="subTitle" :visible.sync="showUpdate" width="1080px"
|
||||
destroy-on-close>
|
||||
<NoticeComponent></NoticeComponent>
|
||||
<FormComponent :options="updateOptions" labelWidth="140px" labelAlign="right" :data.sync="updateParams"
|
||||
:isReadonly="isReadonly" @actionCallback="callback" @change="changes" :actions="[]" :full-btn="true"
|
||||
btnPosition="center" ref="basicForm">
|
||||
<NoticeComponent :data.sync="updateParams" :isReadonly="isReadonly" ref="noticeComponentForm"
|
||||
:actions="updateActions" :full-btn="true" btnPosition="center" @actionCallback="promiseCallback">
|
||||
</NoticeComponent>
|
||||
</FormComponent>
|
||||
</el-dialog>
|
||||
</div>
|
|
@ -4,13 +4,14 @@ import template from "./safetyNotice.component.html"
|
|||
import BaseRecordComponent from "hbt-common/components/common/baseRecord.component.vue"
|
||||
import FormComponent from "hbt-common/components/common/form.component.vue"
|
||||
import TableComponent from "hbt-common/components/common/table.component.vue"
|
||||
import MaintenanceInfoService from "@/service/maintenanceInfo.service"
|
||||
import SafetyNoticeService from "@/service/safetyNotice.service"
|
||||
import FormOption from "hbt-common/models/formOptions"
|
||||
import BtnOption from "hbt-common/models/btnOptions"
|
||||
import DrawComponent from '@/components/draw.component.vue';
|
||||
import ButtonListComponent from "hbt-common/components/common/buttonList.component.vue";
|
||||
import UnitTreeComponent from '@/components/tree.component.vue';
|
||||
import NoticeComponent from '@/components/notice.component.vue'
|
||||
import moment from 'moment';
|
||||
|
||||
@Component({
|
||||
template,
|
||||
|
@ -24,10 +25,10 @@ import NoticeComponent from '@/components/notice.component.vue'
|
|||
},
|
||||
})
|
||||
export default class SafetyNotice extends BaseRecordComponent<any> {
|
||||
public tableService = new MaintenanceInfoService();
|
||||
public tableService = new SafetyNoticeService();
|
||||
|
||||
public params = {
|
||||
type: 1
|
||||
type: 1,
|
||||
} as any;
|
||||
|
||||
public isReadonly = false;
|
||||
|
@ -38,10 +39,18 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
|
|||
|
||||
public subTableColumn = [] as any;
|
||||
|
||||
public subUpdateParams = {
|
||||
risk: [{ index: 0, key: 0, }]
|
||||
} as any;
|
||||
public subShowUpdate = false;
|
||||
public tableState = { 1: '待承诺', 2: '已承诺', 3: '未承诺' };
|
||||
|
||||
public tableStateColor = ['', '#E6A23C', "#68C23A", "#F56C6C"];
|
||||
|
||||
public subTitle = '班组安全承诺';
|
||||
|
||||
public defaultPromise = [
|
||||
'',
|
||||
'今天我班组已根据岗位风险辨识管控相关内容以及安全风险评估表进行安全风险研判,各项安全风险防控措施已落实到位,我承诺本岗位处于安全运行状态,涉及罐区、仓库等重大危险源安全风险的到有效管控。',
|
||||
'今天我车间已根据风险辨识管控相关内容以及安全风险评估表进行安全风险研判,各项安全风险防控措施已落实到位,我承诺本车间处于安全运行状态,涉及罐区、仓库等重大危险源安全风险的到有效管控。',
|
||||
'今天我企业已根据风险辨识管控相关内容以及安全风险评估表进行安全风险研判,各项安全风险防控措施已落实到位,我承诺本企业处于安全运行状态,涉及罐区、仓库等重大危险源安全风险的到有效管控。'
|
||||
] as any;
|
||||
|
||||
public tabs = [{
|
||||
name: "班组风险研判",
|
||||
|
@ -55,7 +64,7 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
|
|||
},]
|
||||
|
||||
|
||||
public showUpdate = true;
|
||||
public showUpdate = false;
|
||||
|
||||
|
||||
public formActions = [{
|
||||
|
@ -112,39 +121,89 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
|
|||
public updateParams = {} as any;
|
||||
public selectData = [];
|
||||
|
||||
public updateActions = [] as any;
|
||||
public updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}] as any;
|
||||
|
||||
public updateOptions: FormOption<BtnOption>[] = [] as any;
|
||||
|
||||
public buildUpdateForm() {
|
||||
this.updateOptions = [{
|
||||
name: "班组名称",
|
||||
key: "name",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
hide: this.params.type !== 1,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "班组负责人",
|
||||
key: "chargeUserName",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
hide: this.params.type !== 1,
|
||||
showError: false,
|
||||
disable: true
|
||||
},
|
||||
{
|
||||
name: "车间名称",
|
||||
key: "name",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
hide: this.params.type !== 2,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "车间负责人",
|
||||
key: "chargeUserName",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
hide: this.params.type !== 2,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "企业名称",
|
||||
key: "controlName",
|
||||
type: "select",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
disable: true,
|
||||
hide: this.params.type !== 3,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "班组负责人",
|
||||
name: "企业负责人",
|
||||
key: "analName",
|
||||
type: "text",
|
||||
require: true,
|
||||
width: "calc(50% - 20px)",
|
||||
hide: this.params.type !== 3,
|
||||
showError: false,
|
||||
},
|
||||
{
|
||||
name: "研判时间",
|
||||
key: "seriousResult",
|
||||
format: "seriousResultName",
|
||||
type: "select",
|
||||
key: "researchTime",
|
||||
type: "date",
|
||||
subType: "datetime",
|
||||
require: true,
|
||||
multiple: true,
|
||||
width: "calc(50% - 20px)",
|
||||
datas: this.$store.state.userList,
|
||||
showError: false,
|
||||
format: "yyyy-MM-dd HH:mm:ss"
|
||||
},
|
||||
{
|
||||
name: "负责人签名",
|
||||
key: "file1",
|
||||
key: "file",
|
||||
ref: "file",
|
||||
type: "upload",
|
||||
width: "calc(50% - 20px)",
|
||||
|
@ -153,6 +212,7 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
|
|||
onMove: this.onRemove,
|
||||
onPreview: this.onPreview,
|
||||
autoUpload: true,
|
||||
require: true,
|
||||
accept: "image/png, image/jpeg,.doc,.docx,.xls,.xlsx,.pdf",
|
||||
listType: "text",
|
||||
tip: this.isReadonly ? "" : "请上传.pdf,.png,.jpg,.doc.docx,.xls,.xlsx格式文件",
|
||||
|
@ -164,36 +224,7 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
|
|||
size: "small",
|
||||
type: "primary"
|
||||
}]
|
||||
}, {
|
||||
name: "是否已落实管控措施",
|
||||
key: "seriousResult",
|
||||
format: "seriousResultName",
|
||||
type: "radio",
|
||||
require: true,
|
||||
labelWidth: "140px",
|
||||
width: "calc(50% - 20px)",
|
||||
datas: [{
|
||||
name: "是",
|
||||
value: 1,
|
||||
}, {
|
||||
name: "否",
|
||||
value: 0,
|
||||
}],
|
||||
},];
|
||||
|
||||
this.updateActions = [{
|
||||
name: "取消",
|
||||
value: "cancel"
|
||||
}, {
|
||||
name: "保存并继续添加",
|
||||
value: "saveAndContinue",
|
||||
type: "primary",
|
||||
hide: this.updateParams.id
|
||||
}, {
|
||||
name: "保存",
|
||||
value: "save",
|
||||
type: "primary"
|
||||
}];
|
||||
}
|
||||
|
||||
created() {
|
||||
|
@ -201,12 +232,62 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
|
|||
}
|
||||
|
||||
public buildTable() {
|
||||
this.tableColumn.push({ name: '状态', key: "controlName", });
|
||||
this.tableColumn.push({ name: '班组名称', key: "analName", });
|
||||
this.tableColumn.push({ name: '班组负责人', key: "riskSource", });
|
||||
this.tableColumn.push({ name: '公告时间', key: "seriousResult", });
|
||||
this.tableColumn.push({ name: '风险点个数', key: "riskLevel", });
|
||||
|
||||
if (this.params.type === 1) {
|
||||
this.tableColumn = []
|
||||
this.tableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
return `<span style="color:${this.tableStateColor[data.status]}">${this.tableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '班组名称', key: "name", });
|
||||
this.tableColumn.push({ name: '班组负责人', key: "chargeUserName", });
|
||||
this.tableColumn.push({
|
||||
name: '公告时间', key: "publishTime", render: (data) => {
|
||||
return data.publishTime ? data.publishTime : '--'
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '风险点个数', key: "riskNumber", });
|
||||
} else if (this.params.type === 2) {
|
||||
this.tableColumn = [];
|
||||
this.tableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
return `<span style="color:${this.tableStateColor[data.status]}">${this.tableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '车间名称', key: "name", });
|
||||
this.tableColumn.push({ name: '车间负责人', key: "chargeUserName", });
|
||||
this.tableColumn.push({
|
||||
name: '班组公告情况', key: "situation", render: (data) => {
|
||||
return "<span class='link noCompleteNum'>" + ((data.promised ? data.promised : 0) + '/' + (data.total ? data.total : 0)) + "</span>"
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '公告时间', key: "publishTime", render: (data) => {
|
||||
return data.publishTime ? data.publishTime : '--'
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '风险点个数', key: "riskNumber", });
|
||||
} else if (this.params.type === 3) {
|
||||
this.tableColumn = [];
|
||||
this.tableColumn.push({
|
||||
name: '状态', key: "status", render: (data) => {
|
||||
return `<span style="color:${this.tableStateColor[data.status]}">${this.tableState[data.status]}</span>`
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '车间名称', key: "name", });
|
||||
this.tableColumn.push({ name: '车间负责人', key: "chargeUserName", });
|
||||
this.tableColumn.push({
|
||||
name: '车间公告情况', key: "situation", render: (data) => {
|
||||
return "<span class='link noCompleteNum'>" + ((data.promised ? data.promised : 0) + '/' + (data.total ? data.total : 0)) + "</span>"
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({
|
||||
name: '公告时间', key: "publishTime", render: (data) => {
|
||||
return data.publishTime ? data.publishTime : '--'
|
||||
}
|
||||
});
|
||||
this.tableColumn.push({ name: '风险点个数', key: "riskNumber", });
|
||||
}
|
||||
}
|
||||
|
||||
public changes(data, item) {
|
||||
|
@ -297,38 +378,41 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
|
|||
// }
|
||||
}
|
||||
|
||||
public onSuccess(res, file, fileList) {
|
||||
public onSuccess(res: any) {
|
||||
if (res.code === 200) {
|
||||
this.fileList = []
|
||||
this.fileList.push({
|
||||
name: res.data.originalName,
|
||||
url: res.data.url,
|
||||
type: res.data.type,
|
||||
id: res.data.id
|
||||
})
|
||||
this.updateParams.file = this.fileList.length || null;
|
||||
this.buildUpdateForm()
|
||||
} else {
|
||||
this.$message.error(res.msg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public onRemove(file, fileList) {
|
||||
this.fileList.splice(this.fileList.findIndex(item => item.id === file.response.data.id), 1)
|
||||
public onRemove(file: any) {
|
||||
this.fileList.splice(this.fileList.findIndex((item: any) => item.id === file.uid), 1)
|
||||
this.updateParams.file = this.fileList.length || null;
|
||||
}
|
||||
|
||||
//标签页切换
|
||||
public tabTableChange(type) {
|
||||
this.params.pageNum = 1;
|
||||
console.log('type',type);
|
||||
|
||||
if (type === 1) {
|
||||
// this.buildFormOptions()
|
||||
this.subTitle = '班组安全承诺';
|
||||
// this.getTableData()
|
||||
} else if (type === 2) {
|
||||
// this.buildFormOptions()
|
||||
// this.getReportTableData()
|
||||
this.subTitle = '车间安全承诺';
|
||||
} else if (type === 3) {
|
||||
//
|
||||
this.subTitle = '企业安全承诺';
|
||||
}
|
||||
this.buildTable()
|
||||
this.getTableData()
|
||||
}
|
||||
|
||||
public triCallback() {
|
||||
|
@ -336,11 +420,77 @@ export default class SafetyNotice extends BaseRecordComponent<any> {
|
|||
}
|
||||
|
||||
|
||||
public showUpdateModel(row,isReadonly){
|
||||
public showUpdateModel(row: any, isReadonly: any) {
|
||||
console.log('row', row);
|
||||
this.updateParams = {} as any;
|
||||
this.fileList = []
|
||||
// this.
|
||||
if (isReadonly) {
|
||||
this.isReadonly = true
|
||||
} else {
|
||||
this.isReadonly = false
|
||||
}
|
||||
this.tableService.selectByDetail({ id: row.id, type: this.params.type }).then((res: any) => {
|
||||
console.log('res', res);
|
||||
this.updateParams = Object.assign(res.data, row);
|
||||
if (!this.updateParams.promise) {
|
||||
this.updateParams.promise = this.defaultPromise[this.params.type]
|
||||
}
|
||||
if (!isReadonly) {
|
||||
this.updateParams.researchTime = moment().format('YYYY-MM-DD HH:mm:ss');
|
||||
} else {
|
||||
this.updateParams.researchTime = this.updateParams.updateTime
|
||||
}
|
||||
// 获取url
|
||||
if (res.data.resourceId) {
|
||||
this.tableService.getFileUrls({ ids: res.data.resourceId }).then((file: any) => {
|
||||
this.fileList = file.data.map(item => {
|
||||
return {
|
||||
name: item.originalName,
|
||||
url: item.url,
|
||||
type: item.type,
|
||||
id: item.id
|
||||
}
|
||||
})
|
||||
if (!isReadonly) {
|
||||
this.updateParams.file = this.fileList.length || null;
|
||||
}
|
||||
this.buildUpdateForm();
|
||||
})
|
||||
}
|
||||
this.buildUpdateForm();
|
||||
this.showUpdate = true;
|
||||
})
|
||||
this.buildUpdateForm();
|
||||
this.showUpdate = true;
|
||||
}
|
||||
|
||||
|
||||
public promiseCallback(data: any) {
|
||||
console.log('updateParams', this.updateParams);
|
||||
console.log('data', data);
|
||||
if (data === 'save') {
|
||||
this.doSave()
|
||||
} else {
|
||||
this.showUpdate = false;
|
||||
this.updateParams = {} as any;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public doSave() {
|
||||
if ((this.$refs.basicForm as any).vaildParams()) {
|
||||
this.updateParams.resourceId = this.fileList.map((item: any) => item.id).join(",");
|
||||
this.updateParams.resourceName = this.fileList.map((item: any) => item.name).join(",");
|
||||
this.updateParams.status = 2
|
||||
this.tableService.addOrUpdate(this.updateParams, false).then((res: any) => {
|
||||
this.$message.success("研判成功!");
|
||||
this.updateParams = {} as any
|
||||
this.showUpdate = false;
|
||||
this.getTableData();
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped src="../../common.component.scss"></style>
|
||||
|
|
Loading…
Reference in New Issue