lyh
6 小时以前 2f5227a8f37b5c9be090a20253555411cfa9548c
src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -1,15 +1,8 @@
<template>
  <j-modal
    :title="title"
    fullscreen
    :visible="visible"
    centered
    :confirmLoading="confirmLoading"
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    <a-tabs tab-position="left">
  <j-modal :title="title" fullscreen :visible="visible" centered :confirmLoading="confirmLoading"
           :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" @ok="handleOk" @cancel="handleCancel"
           cancelText="关闭">
    <a-tabs tab-position="left" @change="handleTabChange">
      <a-tab-pane tab="基础信息" :key="1">
        <a-spin :spinning="confirmLoading">
          <j-form-container :disabled="disableSubmit">
@@ -43,7 +36,7 @@
                <a-col :span="customSpan">
                  <a-form-model-item prop="factoryOrgCode" label="使用部门">
                    <a-tree-select v-model="model.factoryOrgCode" style="width: 100%" show-search
                                   :tree-data="productionTreeData" :disabled="!editable"
                                   :tree-data="productionTreeData"
                                   :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                                   placeholder="请选择使用部门" allow-clear treeNodeFilterProp="title"
                                   :replaceFields="{key:'orgCode',value:'orgCode'}"
@@ -277,22 +270,58 @@
      </a-tab-pane>
      <template v-if="disableSubmit">
        <a-tab-pane tab="设备文档" :key="2">
        <a-tab-pane tab="点检工单" :key="2" forceRender>
          <div style="text-align: right; ">
            <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamInspectionOrderList')"
                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">跳转
            </a-button>
        </div>
          <eam-inspection-order-list ref="tabPane2" :isDisplayOperation="false"/>
        </a-tab-pane>
        <a-tab-pane tab="点检工单" :key="3">
        <a-tab-pane tab="二保工单" :key="3" forceRender>
          <div style="text-align: right; ">
            <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamSecondMaintenanceOrderList')"
                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">跳转
            </a-button>
          </div>
          <eam-second-maintenance-order-list ref="tabPane3" :isDisplayOperation="false"/>
        </a-tab-pane>
        <a-tab-pane tab="二保工单" :key="4">
        <a-tab-pane tab="三保工单" :key="4" forceRender>
          <div style="text-align: right; ">
            <a-button type="primary" @click="navigateToPage('/eam/maintenance/EamThirdMaintenanceOrderList')"
                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">跳转
            </a-button>
          </div>
          <eam-third-maintenance-order-list ref="tabPane4" :isDisplayOperation="false"/>
        </a-tab-pane>
        <a-tab-pane tab="三保工单" :key="5">
        <a-tab-pane tab="维修工单" :key="5" forceRender>
          <div style="text-align: right; ">
            <a-button type="primary" @click="navigateToPage('/eam/repair/EamRepairOrderList')"
                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">跳转
            </a-button>
          </div>
          <eam-repair-order-list ref="tabPane5" :isDisplayOperation="false"/>
        </a-tab-pane>
        <a-tab-pane tab="维修工单" :key="6">
        <a-tab-pane tab="保养规范" :key="6" forceRender>
          <div style="text-align: right; ">
            <a-button type="primary" @click="navigateToPage('/eam/base/EamMaintenanceStandardList')"
                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">跳转
            </a-button>
          </div>
          <eam-maintenance-standard-list ref="tabPane6" :isDisplayOperation="false"/>
        </a-tab-pane>
        <a-tab-pane tab="保养标准" :key="7">
        <a-tab-pane tab="技术状态鉴定工单" :key="7" forceRender>
          <div style="text-align: right;">
            <a-button type="primary" @click="navigateToPage('/eam/technical/order')"
                      style="margin-left: 24px ; background-color: #ffffff; color: #000000;">跳转
            </a-button>
          </div>
          <eam-technical-status-evaluation-order-list ref="tabPane7" :isDisplayOperation="false"/>
        </a-tab-pane>
      </template>
    </a-tabs>
@@ -302,9 +331,23 @@
<script>
  import { getAction, httpAction } from '@/api/manage'
  import { validateDuplicateValueInDelFlag } from '@/utils/util'
  import EamInspectionOrderList from '../../maintenance/EamInspectionOrderList'
  import EamSecondMaintenanceOrderList from '../../maintenance/EamSecondMaintenanceOrderList'
  import EamThirdMaintenanceOrderList from '../../maintenance/EamThirdMaintenanceOrderList'
  import EamRepairOrderList from '../../repair/EamRepairOrderList'
  import EamMaintenanceStandardList from '../../base/EamMaintenanceStandardList'
  import EamTechnicalStatusEvaluationOrderList from '../../technical/EamTechnicalStatusEvaluationOrderList'
  export default {
    name: 'EamEquipmentModal',
    components: {
      EamTechnicalStatusEvaluationOrderList,
      EamMaintenanceStandardList,
      EamRepairOrderList,
      EamThirdMaintenanceOrderList,
      EamSecondMaintenanceOrderList,
      EamInspectionOrderList
    },
    props: {
      productionTreeData: {
        type: Array
@@ -388,7 +431,18 @@
       * @param key 单选框关联字段
       */
      handleRadioChange(value, key) {
        if (value == '0') delete this.model[key]
        if (value === '0') delete this.model[key]
      },
      /**
       * 标签栏发生改变时触发
       * @param tabKey 切换后的tabKey
       */
      handleTabChange(tabKey) {
        if (tabKey !== 1 && this.$refs['tabPane' + tabKey]) {
          this.$refs['tabPane' + tabKey].queryParam.equipmentId = this.model.id
          this.$refs['tabPane' + tabKey].loadData(1)
        }
      },
      handleOk() {
@@ -431,6 +485,10 @@
        })
      },
      navigateToPage(href) {
        this.$router.push(href)
      },
      handleCancel() {
        this.close()
      },