|
@@ -11,74 +11,89 @@
|
|
|
<h4>申请详情</h4>
|
|
|
<el-descriptions title="" :column="3" border>
|
|
|
<el-descriptions-item label="登记人部门">
|
|
|
- <el-select
|
|
|
- v-model="dataForm.applicantDept"
|
|
|
- placeholder="请选择部门">
|
|
|
- <el-option
|
|
|
- v-for="dict in applicantDeptOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item prop="applicantDept">
|
|
|
+ <el-select
|
|
|
+ v-model="dataForm.applicantDept"
|
|
|
+ placeholder="请选择部门">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in applicantDeptOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="登记人班组">
|
|
|
- <el-select
|
|
|
- v-model="dataForm.applicantTeam"
|
|
|
- placeholder="请选择班组">
|
|
|
- <el-option
|
|
|
- v-for="dict in applicantTeamOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item prop="applicantTeam">
|
|
|
+ <el-select
|
|
|
+ v-model="dataForm.applicantTeam"
|
|
|
+ placeholder="请选择班组">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in applicantTeamOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="登记人">
|
|
|
- <el-select
|
|
|
- v-model="dataForm.applicant"
|
|
|
- placeholder="请选择登记人">
|
|
|
- <el-option
|
|
|
- v-for="dict in applicantOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item prop="applicant">
|
|
|
+ <el-select
|
|
|
+ v-model="dataForm.applicant"
|
|
|
+ placeholder="请选择登记人">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in applicantOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="问题描述" :span="3">
|
|
|
- <el-input v-model="dataForm.description" placeholder="请输入问题描述" type="textarea" autosize/>
|
|
|
- </el-descriptions-item>
|
|
|
- <el-descriptions-item label="附件" :span="3">
|
|
|
-
|
|
|
+ <el-form-item prop="description">
|
|
|
+ <el-input v-model="dataForm.description" placeholder="请输入问题描述" type="textarea" :rows="3"/>
|
|
|
+ </el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="附件" :span="3"></el-descriptions-item>
|
|
|
<el-descriptions-item label="隐患" :span="3">
|
|
|
<el-radio v-model="unsafeChoice" label="1" style="margin-right: 10px;">不安全状态</el-radio>
|
|
|
- <el-select v-model="dataForm.unsafeStatus" placeholder="请选择不安全状态" style="margin-right: 20px;">
|
|
|
- <el-option
|
|
|
- v-for="dict in unsafeStatusOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item prop="unsafeStatus" style="display: inline-block;">
|
|
|
+ <el-select v-model="dataForm.unsafeStatus" placeholder="请选择不安全状态" style="margin-right: 20px;" :disabled="unsafeStatusDisabled">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in unsafeStatusOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-radio v-model="unsafeChoice" label="2" style="margin-right: 10px;">不安全行为</el-radio>
|
|
|
- <el-select v-model="dataForm.unsafeAction" placeholder="请选择不安全行为">
|
|
|
- <el-option
|
|
|
- v-for="dict in unsafeActionOptions"
|
|
|
- :key="dict.dictValue"
|
|
|
- :label="dict.dictLabel"
|
|
|
- :value="dict.dictValue"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-form-item prop="unsafeAction" style="display: inline-block;">
|
|
|
+ <el-select v-model="dataForm.unsafeAction" placeholder="请选择不安全行为" :disabled="unsafeActionDisabled">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in unsafeActionOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="记录日期">
|
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
- v-model="dataForm.applyDate"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择记录日期">
|
|
|
- </el-date-picker>
|
|
|
+ <el-descriptions-item label="登记时间">
|
|
|
+ <el-form-item prop="applyDate">
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 200px"
|
|
|
+ v-model="dataForm.applyDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择登记时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</div>
|
|
@@ -86,51 +101,97 @@
|
|
|
<h4>评估详情</h4>
|
|
|
<el-descriptions title="" :column="3" border>
|
|
|
<el-descriptions-item label="预计完成时间" :span="3">
|
|
|
- <el-form-item label="" prop="estimateFinishDate">
|
|
|
- <el-date-picker clearable size="small" style="width: 200px"
|
|
|
- v-model="dataForm.estimateFinishDate"
|
|
|
- type="date"
|
|
|
- value-format="yyyy-MM-dd"
|
|
|
- placeholder="选择预计完成时间">
|
|
|
+ <el-form-item prop="estimateFinishDate">
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 200px"
|
|
|
+ v-model="dataForm.estimateFinishDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择预计完成时间">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="是否录入开项系统">
|
|
|
- <el-form-item label="" prop="isRecorded">
|
|
|
- <el-input v-model="dataForm.isRecorded" placeholder="请输入是否录入开项系统" />
|
|
|
+ <el-form-item prop="isRecorded">
|
|
|
+ <el-radio v-model="dataForm.isRecorded" label="1" @change="handleIsRecordedChange">是</el-radio>
|
|
|
+ <el-radio v-model="dataForm.isRecorded" label="0" @change="handleIsRecordedChange">否</el-radio>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="开项编号" :span="2">
|
|
|
- <el-form-item label="" prop="recordNo">
|
|
|
- <el-input v-model="dataForm.recordNo" placeholder="请输入开项编号" />
|
|
|
+ <el-form-item prop="recordNo">
|
|
|
+ <el-input v-model="dataForm.recordNo" placeholder="请输入开项编号" :disabled="recordNoDisabled" style="width: 200px;"/>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="采取的措施" :span="3">
|
|
|
- <el-form-item label="" prop="reaction">
|
|
|
- <el-input v-model="dataForm.reaction" placeholder="请输入采取的措施" />
|
|
|
+ <el-form-item prop="reaction">
|
|
|
+ <el-input v-model="dataForm.reaction" placeholder="请输入采取的措施" type="textarea" :rows="3"/>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="整改负责人" :span="3">
|
|
|
- <el-form-item label="" prop="executor">
|
|
|
- <el-input v-model="dataForm.executor" placeholder="请输入整改负责人" />
|
|
|
+ <el-descriptions-item label="整改负责人">
|
|
|
+ <el-form-item prop="executor">
|
|
|
+ <el-select
|
|
|
+ clearable
|
|
|
+ v-model="dataForm.executor"
|
|
|
+ placeholder="请选择整改负责人">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in executorOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="验证人" :span="3">
|
|
|
- <el-form-item label="" prop="inspectors">
|
|
|
- <el-input v-model="dataForm.inspectors" placeholder="请输入验证人" />
|
|
|
+ <el-descriptions-item label="验证人" :span="2">
|
|
|
+ <el-form-item prop="inspector1" style="display: inline-block;">
|
|
|
+ <el-select
|
|
|
+ clearable
|
|
|
+ v-model="inspector1"
|
|
|
+ placeholder="请选择验证人"
|
|
|
+ style="margin-right: 10px;">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in inspectorOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="inspector2" style="display: inline-block;">
|
|
|
+ <el-select
|
|
|
+ clearable
|
|
|
+ v-model="inspector2"
|
|
|
+ placeholder="请选择验证人">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in inspectorOptions"
|
|
|
+ :key="dict.dictValue"
|
|
|
+ :label="dict.dictLabel"
|
|
|
+ :value="dict.dictValue"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="是否需要VE验证" :span="3">
|
|
|
- <el-form-item label="" prop="needVe">
|
|
|
- <el-input v-model="dataForm.needVe" placeholder="请输入是否需要VE验证" />
|
|
|
+ <el-form-item prop="needVe">
|
|
|
+ <el-radio v-model="dataForm.needVe" label="1" @change="handleNeedVeChange">是</el-radio>
|
|
|
+ <el-radio v-model="dataForm.needVe" label="0" @change="handleNeedVeChange">否</el-radio>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="VE验证条款" :span="3">
|
|
|
- <el-form-item label="" prop="veItems">
|
|
|
- <el-input v-model="dataForm.veItems" placeholder="请输入VE验证条款" />
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="" prop="veItemOther">
|
|
|
- <el-input v-model="dataForm.veItemOther" placeholder="请输入VE验证条款" />
|
|
|
+ <el-form-item prop="veItemsList">
|
|
|
+ <el-checkbox-group v-model="veItemsList" :disabled="veItemsDisabled">
|
|
|
+ <el-checkbox label="Level3、Level4的时间纠正措施"></el-checkbox>
|
|
|
+ <el-checkbox label="HIRA的补充措施"></el-checkbox>
|
|
|
+ <el-checkbox label="整改措施为程序的制定、更新"></el-checkbox>
|
|
|
+ <el-checkbox label="整改措施有关培训"></el-checkbox>
|
|
|
+ <el-checkbox label="整改措施为增加新设备、设施、部件,或对设备、设施进行改造"></el-checkbox><br/>
|
|
|
+ <el-checkbox label="其它" @change="handleVeItemOtherVeChange"></el-checkbox>
|
|
|
+ <el-form-item prop="veItemOther" style="display: inline-block;">
|
|
|
+ <el-input v-model="dataForm.veItemOther" placeholder="请输入" :disabled="veItemOtherDisabled" style="display: inline-block; width: 200px; margin-left: 10px;"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-checkbox-group>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
</el-descriptions>
|
|
@@ -138,27 +199,24 @@
|
|
|
<div id="execute-div" v-if="showExecute">
|
|
|
<h4>执行详情</h4>
|
|
|
<el-descriptions title="" :column="3" border>
|
|
|
- <el-descriptions-item label="附件">
|
|
|
-
|
|
|
- </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="附件" :span="3"></el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</div>
|
|
|
<div id="inspect-div" v-if="showInspect">
|
|
|
<h4>验收详情</h4>
|
|
|
<el-descriptions title="" :column="3" border>
|
|
|
<el-descriptions-item label="VC/VE验证成果" :span="3">
|
|
|
- <el-form-item label="" prop="applicantDept">
|
|
|
- <el-input v-model="dataForm.veResult" placeholder="请输入VC/VE验证成果" />
|
|
|
+ <el-form-item prop="veResult">
|
|
|
+ <el-radio v-model="dataForm.veResult" label="1">合格</el-radio>
|
|
|
+ <el-radio v-model="dataForm.veResult" label="0">不合格</el-radio>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
<el-descriptions-item label="备注" :span="3">
|
|
|
- <el-form-item label="" prop="remarks">
|
|
|
- <el-input v-model="dataForm.remarks" placeholder="请输入备注" />
|
|
|
+ <el-form-item prop="remarks">
|
|
|
+ <el-input v-model="dataForm.remarks" placeholder="请输入备注" type="textarea" :rows="3"/>
|
|
|
</el-form-item>
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="附件" :span="3">
|
|
|
-
|
|
|
- </el-descriptions-item>
|
|
|
+ <el-descriptions-item label="附件" :span="3"></el-descriptions-item>
|
|
|
</el-descriptions>
|
|
|
</div>
|
|
|
</el-form>
|
|
@@ -179,8 +237,8 @@
|
|
|
</div>
|
|
|
<!-- 流程操作 -->
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="success" v-if="taskName != null"@click="dataFormSubmit(1)">{{ $t('通过') }}</el-button>
|
|
|
- <el-button type="danger" v-if="taskName == '验收'" @click="dataFormSubmit(2)">{{ $t('驳回') }}</el-button>
|
|
|
+ <el-button type="success" v-if="taskName != null && dataForm.veResult != '0'"@click="dataFormSubmit(1)">{{ $t('通过') }}</el-button>
|
|
|
+ <el-button type="danger" v-if="taskName == '验收' && dataForm.veResult == '0'" @click="dataFormSubmit(2)">{{ $t('驳回') }}</el-button>
|
|
|
<el-button type="info" v-if="taskName == '评估'" @click="dataFormSubmit(0)">{{ $t('中止') }}</el-button>
|
|
|
<el-button @click="visible = false">{{ $t('返回') }}</el-button>
|
|
|
</div>
|
|
@@ -192,18 +250,94 @@ import { getApply, handleApply } from "@/api/production/apply";
|
|
|
import { getHistorylist } from "@/api/ehs/approvedanger";
|
|
|
import { listUserPost } from "@/api/system/user";
|
|
|
import { treeselect, listDept } from "@/api/system/dept";
|
|
|
-import { listStaffmgrByDeptAndTeam, getLoginStaffInfo } from "@/api/plant/staffmgr";
|
|
|
+import { listSaiInspectors, listSaiExecutors, listStaffmgrByDeptAndTeam, getLoginStaffInfo } from "@/api/plant/staffmgr";
|
|
|
|
|
|
export default {
|
|
|
name: "sai-apply-detail",
|
|
|
data() {
|
|
|
+ var validateInspector1 = (rule, value, callback) => {
|
|
|
+ if (this.inspector1 == null) {
|
|
|
+ return callback(new Error('验证人不能为空'));
|
|
|
+ } else {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ var validateInspector2 = (rule, value, callback) => {
|
|
|
+ if (this.inspector2 == null) {
|
|
|
+ return callback(new Error('验证人不能为空'));
|
|
|
+ } else {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ var validateVeItemsList = (rule, value, callback) => {
|
|
|
+ if (this.dataForm.needVe == '1') {
|
|
|
+ if (this.veItemsList.length == 0) {
|
|
|
+ return callback(new Error('VE验证条款不能为空'));
|
|
|
+ } else {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ var validateRecordNo = (rule, value, callback) => {
|
|
|
+ if (this.dataForm.isRecorded == '1') {
|
|
|
+ if (this.dataForm.recordNo == null) {
|
|
|
+ return callback(new Error('开项编号不能为空'));
|
|
|
+ } else {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
return {
|
|
|
visible: false,
|
|
|
//流转列表
|
|
|
historyList: [],
|
|
|
historyLoading: true,
|
|
|
taskName: '',
|
|
|
- rules: {},
|
|
|
+ rules: {
|
|
|
+ estimateFinishDate: [
|
|
|
+ { required: true, message: this.$t('预计完成时间') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ isRecorded: [
|
|
|
+ { required: true, message: this.$t('是否录入开项系统') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ reaction: [
|
|
|
+ { required: true, message: this.$t('采取的措施') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ executor: [
|
|
|
+ { required: true, message: this.$t('整改负责人') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ inspector1: [
|
|
|
+ { required: true, message: this.$t('验证人1') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ inspector2: [
|
|
|
+ { required: true, message: this.$t('验证人2') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ needVe: [
|
|
|
+ { required: true, message: this.$t('是否需要VE验证') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ recordNo: [
|
|
|
+ { validator: validateRecordNo, trigger: 'change' }
|
|
|
+ ],
|
|
|
+ veItemsList: [
|
|
|
+ { validator: validateVeItemsList, trigger: 'change' }
|
|
|
+ ],
|
|
|
+ inspector1: [
|
|
|
+ { validator: validateInspector1, trigger: 'change' }
|
|
|
+ ],
|
|
|
+ inspector2: [
|
|
|
+ { validator: validateInspector2, trigger: 'change' }
|
|
|
+ ],
|
|
|
+ veResult: [
|
|
|
+ { required: true, message: this.$t('VC/VE验证成果') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ remarks: [
|
|
|
+ { required: true, message: this.$t('备注') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ },
|
|
|
// SAI开项管理对象
|
|
|
dataForm: {
|
|
|
saiApplyId: null,
|
|
@@ -250,12 +384,30 @@ export default {
|
|
|
applicantDeptOptions: [],
|
|
|
// 登记人列表
|
|
|
applicantOptions: [],
|
|
|
+ inspectorOptions: [],
|
|
|
+ executorOptions: [],
|
|
|
// 不安全状态字典
|
|
|
unsafeStatusOptions: [],
|
|
|
// 不安全行为字典
|
|
|
unsafeActionOptions: [],
|
|
|
// 不安全状态/行为选项
|
|
|
unsafeChoice: null,
|
|
|
+ // 是否禁用开项编号输入框
|
|
|
+ recordNoDisabled: true,
|
|
|
+ // 是否禁用VE验证条款
|
|
|
+ veItemsDisabled: true,
|
|
|
+ // 是否禁用VE验证条款(其它)
|
|
|
+ veItemOtherDisabled: true,
|
|
|
+ // 是否禁用VE验证条款数组
|
|
|
+ veItemsList: [],
|
|
|
+ // 验证人1
|
|
|
+ inspector1: null,
|
|
|
+ // 验证人2
|
|
|
+ inspector2: null,
|
|
|
+ // 是否禁用不安全状态下拉框
|
|
|
+ unsafeStatusDisabled: false,
|
|
|
+ // 是否禁用不安全行为下拉框
|
|
|
+ unsafeActionDisabled: true,
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -263,6 +415,9 @@ export default {
|
|
|
init(id, taskId, processId, taskName) {
|
|
|
// 表单重置
|
|
|
this.reset();
|
|
|
+ this.inspector1 = null;
|
|
|
+ this.inspector2 = null;
|
|
|
+ this.veItemsList = [];
|
|
|
this.dataForm = {};
|
|
|
this.historyList = [];
|
|
|
this.dataForm.saiApplyId = id || 0;
|
|
@@ -276,6 +431,28 @@ export default {
|
|
|
getApply(id).then(response => {
|
|
|
this.dataForm = response.data;
|
|
|
this.dataForm.applicantDept = Number(this.dataForm.applicantDept);
|
|
|
+ this.inspector1 = this.dataForm.applicant;
|
|
|
+ if (this.dataForm.inspectors != null) {
|
|
|
+ let inspectors = this.dataForm.inspectors.split(",");
|
|
|
+ this.inspector1 = inspectors[0];
|
|
|
+ this.inspector2 = inspectors[1];
|
|
|
+ }
|
|
|
+ if (this.dataForm.veItems != null) {
|
|
|
+ let veItems = this.dataForm.veItems.split(",");
|
|
|
+ for (let i = 0; i < veItems.length; i++) {
|
|
|
+ this.veItemsList.push(veItems[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.dataForm.isRecorded != null) {
|
|
|
+ this.dataForm.isRecorded = this.dataForm.isRecorded.toString();
|
|
|
+ }
|
|
|
+ if (this.dataForm.needVe != null) {
|
|
|
+ this.dataForm.needVe = this.dataForm.needVe.toString();
|
|
|
+ }
|
|
|
+ this.handleIsRecordedChange();
|
|
|
+ this.handleNeedVeChange();
|
|
|
+ this.handleVeItemOtherVeChange();
|
|
|
+ this.handleUnsafeChoiceChange();
|
|
|
if (this.dataForm.unsafeStatus != null && this.dataForm.unsafeStatus != "") {
|
|
|
this.unsafeChoice = '1';
|
|
|
this.dataForm.unsafeStatus = this.dataForm.unsafeStatus.toString();
|
|
@@ -297,6 +474,7 @@ export default {
|
|
|
this.showAssess = true;
|
|
|
this.showExecute = true;
|
|
|
this.showInspect = true;
|
|
|
+ this.dataForm.veResult = '1';
|
|
|
break;
|
|
|
case 4:
|
|
|
this.showAssess = true;
|
|
@@ -321,6 +499,10 @@ export default {
|
|
|
this.getApplicantDeptOptions();
|
|
|
// 加载登记人列表
|
|
|
this.listStaffmgrByDeptAndTeam(null, null);
|
|
|
+ // 加载整改负责人列表
|
|
|
+ this.listSaiInspectors();
|
|
|
+ // 加载执行人列表
|
|
|
+ this.listSaiExecutors();
|
|
|
// 加载不安全状态字典
|
|
|
this.getDicts("SAI_UNSAFE_STATUS").then(response => {
|
|
|
this.unsafeStatusOptions = response.data;
|
|
@@ -330,6 +512,53 @@ export default {
|
|
|
this.unsafeActionOptions = response.data;
|
|
|
});
|
|
|
},
|
|
|
+ /** 不安全行为/状态单选按钮值改变事件 */
|
|
|
+ handleUnsafeChoiceChange() {
|
|
|
+ if (this.unsafeChoice == '1') {
|
|
|
+ this.form.unsafeAction = null;
|
|
|
+ this.unsafeStatusDisabled = false;
|
|
|
+ this.unsafeActionDisabled = true;
|
|
|
+ } else if (this.unsafeChoice == '2') {
|
|
|
+ this.form.unsafeStatus = null;
|
|
|
+ this.unsafeStatusDisabled = true;
|
|
|
+ this.unsafeActionDisabled = false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** VE验证条款(其它)单选按钮值改变事件 */
|
|
|
+ handleVeItemOtherVeChange() {
|
|
|
+ let veItemsList = this.veItemsList;
|
|
|
+ let flag = false;
|
|
|
+ for (let i = 0; i < veItemsList.length; i++) {
|
|
|
+ if (veItemsList[i] == '其它') {
|
|
|
+ flag = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (flag) {
|
|
|
+ this.veItemOtherDisabled = false;
|
|
|
+ } else {
|
|
|
+ this.veItemOtherDisabled = true;
|
|
|
+ this.dataForm.veItemOther = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 是否需要VE验证单选按钮值改变事件 */
|
|
|
+ handleNeedVeChange() {
|
|
|
+ if (this.dataForm.needVe == '1') {
|
|
|
+ this.veItemsDisabled = false;
|
|
|
+ } else if (this.dataForm.needVe == '0') {
|
|
|
+ this.veItemsDisabled = true;
|
|
|
+ this.veItemsList = [];
|
|
|
+ this.handleVeItemOtherVeChange();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /** 是否录入开项系统单选按钮值改变事件 */
|
|
|
+ handleIsRecordedChange() {
|
|
|
+ if (this.dataForm.isRecorded == '1') {
|
|
|
+ this.recordNoDisabled = false;
|
|
|
+ } else if (this.dataForm.isRecorded == '0') {
|
|
|
+ this.recordNoDisabled = true;
|
|
|
+ this.dataForm.recordNo = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 加载登记人部门列表 */
|
|
|
getApplicantDeptOptions() {
|
|
|
listDept(null).then(response => {
|
|
@@ -356,12 +585,55 @@ export default {
|
|
|
for (let i = 0; i < staffList.length; i++) {
|
|
|
let staffOption = {
|
|
|
dictLabel: staffList[i].name,
|
|
|
- dictValue: staffList[i].staffid
|
|
|
+ dictValue: staffList[i].userId
|
|
|
}
|
|
|
this.applicantOptions.push(staffOption);
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ /** 加载验证人列表 */
|
|
|
+ listSaiInspectors(applicantDept, applicantTeam) {
|
|
|
+ listSaiInspectors({
|
|
|
+ deptId: applicantDept,
|
|
|
+ team: applicantTeam
|
|
|
+ }).then(response => {
|
|
|
+ let staffList = response.data;
|
|
|
+ this.inspectorOptions = [];
|
|
|
+ for (let i = 0; i < staffList.length; i++) {
|
|
|
+ let staffOption = {
|
|
|
+ dictLabel: staffList[i].name,
|
|
|
+ dictValue: staffList[i].userId
|
|
|
+ }
|
|
|
+ this.inspectorOptions.push(staffOption);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 加载整改负责人列表 */
|
|
|
+ listSaiExecutors(applicantDept, applicantTeam) {
|
|
|
+ listSaiExecutors({
|
|
|
+ deptId: applicantDept,
|
|
|
+ team: applicantTeam
|
|
|
+ }).then(response => {
|
|
|
+ let staffList = response.data;
|
|
|
+ this.executorOptions = [];
|
|
|
+ for (let i = 0; i < staffList.length; i++) {
|
|
|
+ let staffOption = {
|
|
|
+ dictLabel: staffList[i].name,
|
|
|
+ dictValue: staffList[i].userId
|
|
|
+ }
|
|
|
+ let isRepeated = false;
|
|
|
+ for (let j = 0; j < this.executorOptions.length; j++) {
|
|
|
+ if (this.executorOptions[j].dictValue == staffList[i].userId) {
|
|
|
+ isRepeated = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isRepeated == false) {
|
|
|
+ this.executorOptions.push(staffOption);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
// 重置
|
|
|
reset() {
|
|
|
this.showAssess = false;
|
|
@@ -415,8 +687,20 @@ export default {
|
|
|
* 处理流程操作按钮点击事件
|
|
|
*/
|
|
|
dataFormSubmit(condition) {
|
|
|
- // this.$refs["form"].validate(valid => {
|
|
|
- // if (valid) {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ // 验证人字符串拼接
|
|
|
+ this.dataForm.inspectors = this.inspector1 + "," + this.inspector2;
|
|
|
+ // VE验证条款字符串拼接
|
|
|
+ if (this.veItemsList.length != 0) {
|
|
|
+ this.dataForm.veItems = "";
|
|
|
+ for (let i = 0; i < this.veItemsList.length; i++) {
|
|
|
+ this.dataForm.veItems += this.veItemsList[i];
|
|
|
+ if (i != this.veItemsList.length - 1) {
|
|
|
+ this.dataForm.veItems += ",";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
this.taskForm.saiApply = this.dataForm;
|
|
|
this.taskForm.condition = condition;
|
|
|
handleApply(this.taskForm).then(response =>{
|
|
@@ -425,8 +709,8 @@ export default {
|
|
|
// refreshDataList事件:调用父组件getList方法刷新页面
|
|
|
this.$emit('refreshDataList');
|
|
|
});
|
|
|
- // }
|
|
|
- // })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -436,4 +720,8 @@ export default {
|
|
|
h4{
|
|
|
margin: 20px 0px 10px 0px;
|
|
|
}
|
|
|
+ .el-checkbox {
|
|
|
+ color: #606266;
|
|
|
+ padding: 5px 0px;
|
|
|
+ }
|
|
|
</style>
|