吴羡
8 小时以前 9862248787934f4242ac9636e0c4d5b8ee0870b8
src/views/CNAS/process/method/methodVerification/component/formDIa.vue
@@ -1,11 +1,11 @@
<template>
  <div>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false"
               :title="operationType === 'edit' ? '编辑' : operationType === 'view' ? '详情' : '新增'"
               :title="dialogTitle"
               v-model="formDia"
               width="90%" @close="closeDia">
      <div v-if="operationType === 'edit'" style="text-align: right">
        <el-button :disabled="form.confirmDate" size="small" type="primary" @click="validation">验证确认</el-button>
        <el-button :disabled="form.confirmDate" size="small" type="primary" @click="validation">{{ verifyType === 0 ? '变更确认' : '验证确认' }}</el-button>
      </div>
      <fieldset :disabled="operationType === 'view'" class="view-fieldset">
      <table border="1" cellspacing="10" class="tables">
@@ -14,7 +14,7 @@
            <p>标准方法</p>
          </td>
          <td>
            <p>验证原因</p>
            <p>{{ verifyType === 0 ? '变更原因' : '验证原因' }}</p>
          </td>
          <td>
            <p>主要技术变化</p>
@@ -221,7 +221,7 @@
          </td>
        </tr>
        <tr>
          <td>验证结论</td>
          <td>{{ verifyType === 0 ? '变更结论' : '验证结论' }}</td>
          <td colspan="7">
            <el-input v-model="form.verificationConclusion" :rows="2" placeholder="请输入内容" size="small" type="textarea"></el-input>
          </td>
@@ -291,12 +291,12 @@
      </table>
      </fieldset>
      <template #footer><span  class="dialog-footer">
        <el-button @click="closeDia">取 消</el-button>
        <el-button @click="closeDia">{{ operationType === 'view' ? '关闭' : '取 消' }}</el-button>
        <el-button v-if="operationType !== 'view'" :loading="editLoad" type="primary" @click="handleEdit">提 交</el-button>
      </span></template>
    </el-dialog>
    <ViewDeviceDialog v-if="viewDeviceDialog" ref="viewDeviceDialog" @closDeviceDia="closDeviceDia" @handleDeviceInfo="handleDeviceInfo"></ViewDeviceDialog>
    <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog"></ViewTestRecord>
    <ViewDeviceDialog v-if="viewDeviceDialog" ref="viewDeviceDialog" :read-only="operationType === 'view'" @closDeviceDia="closDeviceDia" @handleDeviceInfo="handleDeviceInfo"></ViewDeviceDialog>
    <ViewTestRecord v-if="viewTestRecordDialog" ref="viewTestRecordDialog" :read-only="operationType === 'view'"></ViewTestRecord>
    <ViewWorkPermitDia v-if="viewWorkPermitDia" ref="viewWorkPermitDia"></ViewWorkPermitDia>
    <calibrations-file-dia v-if="calibrationsFileDia" ref="calibrationsFileDia"></calibrations-file-dia>
  </div>
@@ -323,6 +323,20 @@
    operationType: {
      type: String,
      default: () => ''
    },
    // 0 标准方法变更,1 方法验证
    verifyType: {
      type: Number,
      default: 1
    }
  },
  computed: {
    typeLabel() {
      return this.verifyType === 0 ? '标准方法变更' : '方法验证'
    },
    dialogTitle() {
      if (this.operationType === 'view') return `查看${this.typeLabel}`
      return this.operationType === 'edit' ? `编辑${this.typeLabel}` : `新增${this.typeLabel}`
    }
  },
  data() {
@@ -410,10 +424,11 @@
    },
    // 提交
    handleEdit() {
      if (this.operationType === 'view') return
      this.editLoad = true
      const processMethodSearchNews = this.HaveJson(this.form)
      processMethodSearchNews.confirmUser = processMethodSearchNews.confirmUser && processMethodSearchNews.confirmUser.join(',')
      processMethodSearchNews.operationType = 1
      processMethodSearchNews.operationType = this.verifyType
      if (this.operationType === 'edit') {
        this.editInfo(processMethodSearchNews)
      } else {
@@ -422,10 +437,12 @@
    },
    // 评审意见勾选(三选一,再点一次取消)
    toggleReview (value, checked) {
      if (this.operationType === 'view') return
      this.form.reviewResult = checked ? value : ''
    },
    // 审批意见勾选(三选一,再点一次取消)
    toggleApproval (value, checked) {
      if (this.operationType === 'view') return
      this.form.approvalResult = checked ? value : ''
    },
    // 查看上岗证
@@ -455,6 +472,7 @@
    },
    // 提交设备信息
    handleDeviceInfo (machineAttachmentList) {
      if (this.operationType === 'view') return
      this.viewDeviceDialog = false
      this.form.machineAttachmentList = machineAttachmentList
    },