zhaowei
2 天以前 1451e36b1767a4d7883e80078b371b6273e9eb41
三保变更
已添加2个文件
已修改1个文件
已删除1个文件
774 ■■■■ 文件已修改
src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue 74 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/modules/EamThirdMaintenanceChangeModal.vue 168 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/flowable/workflow/thirdMaintenance/ThirdMaintenanceOrderChangeApprovalModal.vue 376 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/maintenance/EamThirdMaintenanceChangeList.vue
@@ -41,7 +41,7 @@
             :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}"
             @change="handleTableChange">
        <span slot="action" slot-scope="text, record">
          <tamplate v-if="record.changeStatus=='WAIT_SUBMIT'">
          <template v-if="record.changeStatus=='WAIT_SUBMIT'">
            <a @click="handleEdit(record)">编辑</a>
            <a-divider type="vertical"/>
@@ -55,41 +55,38 @@
            <a-popconfirm title="确定作废吗?" @confirm="handleAbolish(record.id)">
              <a>作废</a>
            </a-popconfirm>
          </tamplate>
          </template>
          <a @click="handleDetail(record)" v-if="record.changeStatus!='WAIT_SUBMIT'&&record.changeStatus!='ABOLISH'">详情</a>
          <a @click="handleDetail(record)"
             v-if="record.changeStatus!='WAIT_SUBMIT'&&record.changeStatus!='ABOLISH'">详情</a>
        </span>
    </a-table>
    <!-- table区域-end -->
    <!-- è¡¨å•区域 -->
    <eam-third-maintenance-change-modal ref="orderChangeModal" @ok="modalFormOk"/>
    <eam-third-maintenance-change-modal ref="modalForm" @ok="modalFormOk"/>
    <!--变更流程表单-->
<!--    <third-maintenance-approval-modal ref="thirdMaintenanceApprovalModal"-->
<!--                                      :selectShenpiData="selectThirdMaintenanceData"/>-->
    <!--审批窗口-->
    <third-maintenance-order-change-approval-modal ref="thirdMaintenanceOrderChangeApprovalModal"
                                                   :selectShenpiData="selectedRowData"/>
  </a-card>
</template>
<script>
  // import EamThirdMaintenanceOrderModal from './modules/EamThirdMaintenanceOrderModal'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue'
  import { deleteAction, getAction } from '@api/manage'
  // import ThirdMaintenanceApprovalModal
  //   from '@views/flowable/workflow/thirdMaintenance/ThirdMaintenanceApprovalModal.vue'
  import EamThirdMaintenanceChangeModal
    from '@views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue'
  import EamThirdMaintenanceChangeModal from './modules/EamThirdMaintenanceChangeModal.vue'
  import ThirdMaintenanceOrderChangeApprovalModal
    from '../../flowable/workflow/thirdMaintenance/ThirdMaintenanceOrderChangeApprovalModal'
  export default {
    name: 'EamThirdMaintenanceChangeList',
    mixins: [JeecgListMixin],
    components: {
      ThirdMaintenanceOrderChangeApprovalModal,
      EamThirdMaintenanceChangeModal,
      LxSearchEquipmentSelect,
      // EamThirdMaintenanceOrderModal,
      // ThirdMaintenanceApprovalModal
      LxSearchEquipmentSelect
    },
    props: {
      isDisplayOperation: {
@@ -101,7 +98,7 @@
      return {
        description: '设备三级保养变更页面',
        disableMixinCreated: true,
        selectThirdMaintenanceData: {},
        selectedRowData: {},
        // è¡¨å¤´
        columns: [
          {
@@ -134,9 +131,15 @@
            fixed: 'left'
          },
          {
            title: '变更状态',
            align: 'center',
            dataIndex: 'changeStatus_dictText',
            fixed: 'left'
          },
          {
            title: '工单号',
            align: 'center',
            dataIndex: 'orderNum_dictText'
            dataIndex: 'orderId_dictText'
          },
          {
            title: '变更单号',
@@ -162,11 +165,6 @@
            title: '申请类型',
            align: 'center',
            dataIndex: 'applyCategory_dictText'
          },
          {
            title: '变更状态',
            align: 'center',
            dataIndex: 'changeStatus_dictText'
          },
          {
            title: '变更原因类型',
@@ -221,8 +219,8 @@
        ],
        url: {
          list: '/eam/eamThirdMaintenanceChange/list',
          abolish: '/eam/eamThirdMaintenanceChange/abolish',
          collect: '/eam/eamThirdMaintenanceChange/collect'
          submit: '/eam/eamThirdMaintenanceChange/submit',
          abolish: '/eam/eamThirdMaintenanceChange/abolish'
        }
      }
    },
@@ -234,13 +232,13 @@
        title: '操作',
        dataIndex: 'action',
        align: 'center',
        width: 200,
        fixed: 'right',
        scopedSlots: { customRender: 'action' }
      }
      this.columns = [...this.columns, operationColumn]
      this.loadData(1)
    },
    computed: {},
    methods: {
      /**
       * æäº¤æ—¶è§¦å‘
@@ -257,12 +255,12 @@
                description: res.message
              })
              that.loadData()
              that.loading = false
            } else {
              that.$notification.warning({
                message: '消息',
                description: res.message
              })
              that.loading = false
            }
          })
      },
@@ -292,17 +290,17 @@
          })
      },
      // /**
      //  * ç‚¹å‡»è¯¦æƒ…时触发
      //  * @param record
      //  */
      // handleDetail(record) {
      //   this.selectThirdMaintenanceData = Object.assign({}, record)
      //   this.$refs.thirdMaintenanceApprovalModal.title = '详情'
      //   this.$refs.thirdMaintenanceApprovalModal.visible = true
      //   this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true
      //   this.$refs.thirdMaintenanceApprovalModal.recordDetail(record)
      // },
      /**
       * ç‚¹å‡»è¯¦æƒ…时触发
       * @param record
       */
      handleDetail(record) {
        this.selectedRowData = Object.assign({}, record)
        this.$refs.thirdMaintenanceOrderChangeApprovalModal.title = '详情'
        this.$refs.thirdMaintenanceOrderChangeApprovalModal.visible = true
        this.$refs.thirdMaintenanceOrderChangeApprovalModal.disableSubmit = true
        this.$refs.thirdMaintenanceOrderChangeApprovalModal.handleDetail(record)
      },
      /**
       * ç”³è¯·æ—¶é—´å‘生改变时触发
src/views/eam/maintenance/modules/EamThirdMaintenanceChangeModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,168 @@
<template>
  <j-modal :title="title" :width="1300" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen
           @ok="handleOk" @cancel="handleCancel" cancelText="关闭">
    <a-spin :spinning="confirmLoading">
      <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
        <a-row>
          <a-col :span="8">
            <a-form-model-item label="工单号">
              <a-input readOnly v-model="model.orderNum"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="变更单号">
              <a-input placeholder="系统自动生成" disabled v-model="model.changeOrderNum"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="equipmentId" label="统一编码">
              <maintenance-equipment-select placeholder="请输入统一编码或名称搜索" v-model="model.equipmentId" disabled
                                            maintenanceCategory="THIRD_MAINTENANCE"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="applyCategory" label="申请类型">
              <j-dict-select-tag v-model="model.applyCategory" placeholder="请选择申请类型" @change="handleApplyCategoryChange"
                                 dict-code="third_maintenance_change_category"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item prop="applyReasonType" label="变更原因类型">
              <j-dict-select-tag v-model="model.applyReasonType" placeholder="请选择变更原因类型"
                                 :disabled="model.applyCategory==='SCRAPPED'"
                                 dict-code="third_maintenance_change_reason"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="8" v-if="model.applyCategory==='DELAYED'">
            <a-form-model-item prop="deferredMaintenanceDate" label="延迟保养日期">
              <a-date-picker v-model="model.deferredMaintenanceDate" value-format="YYYY-MM-DD" style="width: 100%"
                             :allow-clear="false"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="变更原因" :labelCol="{span:2}" :wrapperCol="{span:21}">
              <a-textarea v-model="model.applyReason" placeholder="请输入变更原因"/>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="备注" :labelCol="{span:2}" :wrapperCol="{span:21}">
              <a-textarea v-model="model.remark" placeholder="请输入备注"/>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </a-spin>
  </j-modal>
</template>
<script>
  import { postAction } from '@/api/manage'
  import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue'
  export default {
    name: 'EamThirdMaintenanceChangeModal',
    components: {
      MaintenanceEquipmentSelect
    },
    data() {
      return {
        title: '操作',
        visible: false,
        model: {},
        labelCol: {
          xs: { span: 24 },
          sm: { span: 6 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 15 }
        },
        confirmLoading: false,
        validatorRules: {
          deferredMaintenanceDate: [{ required: true, message: '请选择日期', trigger: 'change' }],
          applyCategory: [{ required: true, message: '请选择申请类型', trigger: 'change' }],
          applyReasonType: [{ required: true, message: '请选择变更原因', trigger: 'change' }]
        },
        url: {
          add: '/eam/eamThirdMaintenanceChange/add',
          edit: '/eam/eamThirdMaintenanceChange/edit'
        }
      }
    },
    methods: {
      add({ id, equipmentId, orderNum }) {
        this.model = Object.assign({ orderId: id, equipmentId, orderNum })
        this.visible = true
      },
      edit(record) {
        this.model = Object.assign({ orderNum: record.orderId_dictText }, record)
        this.visible = true
      },
      /**
       * ç”³è¯·ç±»åž‹å‘生改变时触发
       * @param value
       */
      handleApplyCategoryChange(value) {
        if (value === 'SCRAPPED') this.model.applyReasonType = 'EQUIPMENT_SCRAPPED'
        else delete this.model.applyReasonType
        delete this.model.deferredMaintenanceDate
      },
      handleOk() {
        const that = this
        // è§¦å‘表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = true
            let httpUrl
            if (!that.model.id) {
              httpUrl = that.url.add
            } else {
              httpUrl = that.url.edit
            }
            postAction(httpUrl, that.model)
              .then((res) => {
                if (res.success) {
                  that.$notification.success({
                    message: '消息',
                    description: res.message
                  })
                  if (!that.model.id) {
                    that.$router.push('/eam/maintenance/EamThirdMaintenanceChangeList')
                    return
                  }
                  that.close()
                  that.$emit('ok')
                } else {
                  that.$notification.warning({
                    message: '消息',
                    description: res.message
                  })
                }
              })
              .finally(() => {
                that.confirmLoading = false
              })
          } else {
            return false
          }
        })
      },
      handleCancel() {
        this.close()
      },
      close() {
        this.$emit('close')
        this.visible = false
        this.$refs.form.clearValidate()
      }
    }
  }
</script>
src/views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue
ÎļþÒÑɾ³ý
src/views/flowable/workflow/thirdMaintenance/ThirdMaintenanceOrderChangeApprovalModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,376 @@
<template>
  <j-modal :title="title" :width="1300" :fullscreen="fullScreen" :visible="visible" :confirmLoading="confirmLoading"
           :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk"
           @cancel="handleCancel" cancelText="关闭">
    <a-spin :spinning="spinning">
      <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
        <a-row id="outer-row" :gutter="24">
          <!--左侧基础信息列-->
          <a-col :span="!disableSubmit?8:14" class="scroll-col">
            <a-tabs>
              <a-tab-pane tab="基础信息">
                <a-row>
                  <a-col :span="12">
                    <a-form-model-item label="工单号">
                      <a-input v-model="model.orderId_dictText" readOnly/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span="12">
                    <a-form-model-item label="变更单号">
                      <a-input v-model="model.changeOrderNum" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span="12">
                    <a-form-model-item label="统一编码">
                      <maintenance-equipment-select v-model="model.equipmentId" maintenance-category="THIRD_MAINTENANCE"
                                                    @autocompleteForm="autocompleteForm" disabled/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span="12">
                    <a-form-model-item label="申请人">
                      <a-input v-model="model.applicant_dictText" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span="12">
                    <a-form-model-item label="申请部门">
                      <a-input v-model="model.factoryOrgCode_dictText" readOnly/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span="12">
                    <a-form-model-item label="变更原因类型">
                      <a-input v-model="model.applyReasonType_dictText" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row v-if="model.apapplyReasonType==='DELAYED'">
                  <a-col :span="12">
                    <a-form-model-item label="延迟保养日期">
                      <a-input v-model="model.deferredMaintenanceDate" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span="24">
                    <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="变更原因">
                      <a-textarea v-model="model.applyReason" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
                <a-row>
                  <a-col :span="24">
                    <a-form-model-item :labelCol="labelColLong" :wrapperCol="wrapperColLong" label="备注">
                      <a-textarea v-model="model.remark" readOnly/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
              </a-tab-pane>
            </a-tabs>
          </a-col>
          <!-- ä¸­é—´æ˜Žç»†é¡¹åˆ—-->
          <a-col v-if="selectShenpiData.procInstId" :span="10" class="scroll-col">
            <a-tabs>
              <a-tab-pane key='1' tab='流程图'>
                <img :src="imageSrc" alt="Fetched Image" style="width: 100%" v-if="imageSrc"/>
              </a-tab-pane>
            </a-tabs>
          </a-col>
          <!--右侧审批列-->
          <a-col :span="!disableSubmit?6:10" class="scroll-col">
            <a-tabs v-if="displayEquipmentManagerFlag">
              <a-tab-pane tab="使用单位室级领导确认">
                <a-row>
                  <a-col :span="24">
                    <a-form-model-item prop="equipmentManagerSignatureResult" label="确认类型" :labelCol="rightColLabelCol"
                                       :wrapperCol="rightColWrapperCol">
                      <j-dict-select-tag type='radio' v-model='model.equipmentManagerSignatureResult'
                                         dictCode='approve_reject'
                                         :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='EQUIPMENT_MANAGER_SIGNING')"/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span="24">
                    <a-form-model-item label="确认意见" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol">
                      <a-textarea placeholder="请输入意见" v-model="model.equipmentManagerComment"
                                  :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='EQUIPMENT_MANAGER_SIGNING')"/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
              </a-tab-pane>
            </a-tabs>
            <a-tabs v-if="displayDepartManagerFlag">
              <a-tab-pane tab="部门领导确认">
                <a-row>
                  <a-col :span="24">
                    <a-form-model-item prop="departManagerSignatureResult" label="确认类型" :labelCol="rightColLabelCol"
                                       :wrapperCol="rightColWrapperCol">
                      <j-dict-select-tag type='radio' v-model='model.departManagerSignatureResult'
                                         dictCode='approve_reject'
                                         :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='DEPART_MANAGER_SIGNING')"/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span="24">
                    <a-form-model-item label="确认意见" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol">
                      <a-textarea placeholder="请输入意见" v-model="model.departManagerComment"
                                  :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='DEPART_MANAGER_SIGNING')"/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
              </a-tab-pane>
            </a-tabs>
            <a-tabs v-if="displayProductionSupportFlag">
              <a-tab-pane tab="生产保障部领导确认">
                <a-row>
                  <a-col :span="24">
                    <a-form-model-item prop="productionSupportSignatureResult" label="确认类型"
                                       :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol">
                      <j-dict-select-tag type='radio' v-model='model.productionSupportSignatureResult'
                                         dictCode='approve_reject'
                                         :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='PRODUCTION_SUPPORT_SIGNING')"/>
                    </a-form-model-item>
                  </a-col>
                  <a-col :span="24">
                    <a-form-model-item label="确认意见" :labelCol="rightColLabelCol" :wrapperCol="rightColWrapperCol">
                      <a-textarea placeholder="请输入意见" v-model="model.productionSupportComment"
                                  :disabled="disableSubmit||(model.changeStatus&&model.changeStatus!='PRODUCTION_SUPPORT_SIGNING')"/>
                    </a-form-model-item>
                  </a-col>
                </a-row>
              </a-tab-pane>
            </a-tabs>
          </a-col>
        </a-row>
      </a-form-model>
    </a-spin>
  </j-modal>
</template>
<script>
  import { downFile, getAction, postAction } from '@/api/manage'
  import MaintenanceEquipmentSelect from '../../../eam/equipment/modules/MaintenanceEquipmentSelect'
  export default {
    name: 'ThirdMaintenanceOrderChangeApprovalModal',
    components: {
      MaintenanceEquipmentSelect
    },
    props: {
      selectShenpiData: {
        type: Object
      }
    },
    data() {
      return {
        title: '操作',
        visible: false,
        model: {},
        labelCol: {
          xs: { span: 24 },
          sm: { span: 8 }
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 }
        },
        labelColLong: {
          xs: { span: 24 },
          sm: { span: 4 }
        },
        wrapperColLong: {
          xs: { span: 24 },
          sm: { span: 20 }
        },
        rightColLabelCol: {
          xs: { span: 24 },
          sm: { span: 6 }
        },
        rightColWrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 }
        },
        confirmLoading: false,
        spinning: false,
        imageSrc: null,
        fullScreen: true,
        validatorRules: {
          equipmentManagerSignatureResult: [{ required: true, message: '请选择确认类型' }],
          departManagerSignatureResult: [{ required: true, message: '请选择确认类型' }],
          productionSupportSignatureResult: [{ required: true, message: '请选择确认类型' }]
        },
        url: {
          queryById: '/eam/eamThirdMaintenanceChange/queryById',
          approval: '/eam/eamThirdMaintenanceChange/approval',
          diagramView: '/assign/flow/diagramView'
        },
        disableSubmit: false,
        selectedRowKeys: []
      }
    },
    computed: {
      displayEquipmentManagerFlag() {
        return this.model.changeStatus && ['EQUIPMENT_MANAGER_SIGNING', 'DEPART_MANAGER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus)
      },
      displayDepartManagerFlag() {
        return this.model.changeStatus && ['DEPART_MANAGER_SIGNING', 'PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus) && this.model.equipmentManagerSignatureResult === '1'
      },
      displayProductionSupportFlag() {
        return this.model.changeStatus && ['PRODUCTION_SUPPORT_SIGNING', 'COMPLETED', 'REJECTED'].includes(this.model.changeStatus) && this.model.departManagerSignatureResult === '1'
      }
    },
    methods: {
      /**
       * ä¸»é¡µé¢ç‚¹å‡»æ‰§è¡Œå®¡æ‰¹æ—¶è§¦å‘
       * @param record ä¸»é¡µé¢åˆ—表行记录
       */
      handleApprove(record) {
        this.fullScreen = true
        this.model = {}
        this.getBasicInformationByApi(record)
        this.getFlowChartImageByApi(record)
      },
      /**
       * ä¸»é¡µé¢ç‚¹å‡»è¯¦æƒ…时触发
       * @param record ä¸»é¡µé¢åˆ—表行记录
       */
      handleDetail(record) {
        this.fullScreen = false
        this.model = Object.assign({}, record)
      },
      /**
       * èŽ·å–åŸºç¡€ä¿¡æ¯
       * @param record ä¸»é¡µé¢åˆ—表行记录
       */
      getBasicInformationByApi(record) {
        this.spinning = true
        const that = this
        getAction(this.url.queryById, { id: record.dataId })
          .then(res => {
            if (res.success) {
              that.model = Object.assign({}, res.result)
              that.model.dataId = record.dataId
              that.model.taskId = record.id
              that.model.userId = record.assignee
              that.model.instanceId = record.procInstId
            }
            else {
              that.$notification.warning({
                message: '消息',
                description: res.message
              })
            }
          })
          .finally(() => {
            that.spinning = false
          })
      },
      /**
       * èŽ·å–æµç¨‹å›¾
       * @param record ä¸»é¡µé¢åˆ—表行记录
       */
      getFlowChartImageByApi(record) {
        const { processDefinitionId, processInstanceId, processDefinitionKey } = record
        this.imageSrc = null
        downFile(this.url.diagramView, {
          processDefinitionId,
          processInstanceId,
          TaskDefinitionKey: processDefinitionKey
        }, 'get')
          .then((res => {
            this.imageSrc = window.URL.createObjectURL(new Blob([res]))
          }))
          .catch(err => {
            this.$notification.error({
              message: '消息',
              description: err.message
            })
          })
      },
      async handleOk() {
        const that = this
        // è§¦å‘表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = that.spinning = true
            postAction(this.url.approval, this.model)
              .then((res) => {
                if (res.success) {
                  that.$notification.success({
                    message: '消息',
                    description: res.message
                  })
                  that.$emit('modalFormOk')
                  that.close()
                } else {
                  that.$notification.warning({
                    message: '消息',
                    description: res.message
                  })
                }
              })
              .finally(() => {
                that.confirmLoading = that.spinning = false
              })
          } else {
            return false
          }
        })
      },
      autocompleteForm(selectObj) {
        this.$set(this.model, 'equipmentId', selectObj.equipmentId)
        this.spinning = false
      },
      handleCancel() {
        this.close()
      },
      close() {
        this.$emit('close')
        this.visible = false
        this.$refs.form.clearValidate()
      }
    }
  }
</script>
<style scoped lang="less">
  /deep/ .ant-spin-nested-loading {
    height: 100%;
    .ant-spin-container {
      height: 100%;
      .ant-form {
        height: 100%;
        #outer-row {
          height: 100%;
          .scroll-col {
            height: 100%;
            overflow: auto;
          }
        }
      }
    }
  }
</style>