qushaowei
2024-07-12 336dcb70c156c947530eab0f0a96ee17de477929
设备管理修改
已添加12个文件
已修改36个文件
6382 ■■■■ 文件已修改
src/views/eam/EquipmentListOfAll.vue 131 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfCrane.vue 87 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfEnvProEquipment.vue 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfFilesCarousel.vue 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfMetrological.vue 65 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfPressureVessel.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfProduct.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfRide.vue 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfTester.vue 85 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfTruck.vue 70 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfWeldingMachine.vue 81 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/FaultCauseChart.vue 188 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/MTBF.vue 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/MalfunctionRepair.vue 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/OperationCertificateApplyList.vue 132 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/OperationCertificateList.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/RepairOrderList.vue 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/RepairStandardList.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyInspectionStandard/AuditApprovalModal.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard/AuditApprovalModal.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/equipment/EquipmentModel.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/equipmentNew/EquipmentModal.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/malfunctionRepair/EquipmentList.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/operationCertificate/OperationCertificateDetailList.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/operationCertificate/OperationCertificateDetailModal.vue 264 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/operationCertificate/OperationCertificateForm.vue 172 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/operationCertificate/OperationCertificateModal.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue 183 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/repairStandard/RepairStandardCategoryLeft.vue 449 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/repairStandard/RepairStandardCategoryModel.vue 316 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/repairStandard/RepairStandardModel.vue 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/repairStandard/RepairStandardRight.vue 388 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue 242 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/spare/SpartPartRequirement.vue 505 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/spare/modules/spartPartRequirement/AuditApprovalModal.vue 218 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/spare/modules/spartPartRequirement/EquipmentList.vue 314 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/spare/modules/spartPartRequirement/SpartPartRequirementDetail.vue 178 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/spare/modules/spartPartRequirement/SpartPartRequirementModal.vue 511 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/DictList.vue 358 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/eam/EquipmentListOfAll.vue
@@ -115,12 +115,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -131,12 +136,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -326,6 +336,11 @@
        icon="calendar"
        v-has="'equipmentAccount:add&delete&import&Edit'"
      >设置关键设备标识</a-button>
      <a-button
        type="primary"
        @click="handleDownload"
        icon="download"
      >模版下载</a-button>
    </div>
    <!-- table区域-begin -->
    <div>
@@ -354,14 +369,15 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
<!-- ç‚¹å‡»æŠ€æœ¯çŠ¶æ€åˆ—ï¼Œè·³è½¬åˆ°æŠ€æœ¯çŠ¶æ€é‰´å®šé¡µé¢ -->
        <!-- ç‚¹å‡»æŠ€æœ¯çŠ¶æ€åˆ—ï¼Œè·³è½¬åˆ°æŠ€æœ¯çŠ¶æ€é‰´å®šé¡µé¢ -->
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -491,6 +507,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -655,8 +691,9 @@
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { mixinDevice } from '@/utils/mixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
import EquipmentModal from './modules/equipmentNew/EquipmentModal'
import { getAction } from '@/api/manage'
import { getAction, downFile } from '@/api/manage'
import EquipmentProcessParametersList from './modules/equipmentNew/EquipmentProcessParametersList'
import EquipmentDocumentList from './modules/equipmentNew/EquipmentDocumentList'
import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList'
@@ -702,6 +739,7 @@
    SecondMaintenanceList,
    ThirdMaintenanceList,
    KeyEquipmentUpdateModel,
    JEllipsis,
  },
  data() {
    return {
@@ -730,14 +768,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -759,26 +804,22 @@
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        {
          title: '维修班组',
          align: "center",
          dataIndex: 'teamId_dictText',
        },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        // {
        //   title: '维修班组',
        //   align: "center",
        //   dataIndex: 'teamId_dictText',
        // },
        {
          title: 'ABC标识',
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '技术状态',
          align: "center",
@@ -790,7 +831,11 @@
          align: "center",
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
@@ -817,11 +862,7 @@
        //   dataIndex: 'fireExtinguisher',
        // },
        // {
        //   title: '灭火器有效期',
        //   align: "center",
        //   dataIndex: 'fireExtinguisherValidityPeriod',
        // },
        // {
        //   title: '操作系统',
        //   align: "center",
@@ -948,6 +989,8 @@
        exportXlsUrl: '/eam/equipment/exportXls',
        importExcelUrl: "/eam/equipment/importExcel",
        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
        uploadList: '/sys/upload/list',
        download: '/sys/upload/downloadFile',
      },
      dictOptions: {
      },
@@ -1149,6 +1192,40 @@
        }
      })
    },
    handleDownload() {
      var params = {}//查询条件
      params.type = "equipment"
      params.pageNo = 1
      params.pageSize = 10
      getAction(this.url.uploadList, params).then((res2) => {
        if (res2.success) {
          if (res2.result.records.length > 0) {
            downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => {
              if (!res) {
                this.$message.warning('文件下载失败')
                return
              } else {
                let fileName = res2.result.records[0].name
                if (typeof window.navigator.msSaveBlob !== 'undefined') {
                  window.navigator.msSaveBlob(new Blob([res]), fileName)
                } else {
                  let url = window.URL.createObjectURL(new Blob([res]))
                  let link = document.createElement('a')
                  link.style.display = 'none'
                  link.href = url
                  link.setAttribute('download', fileName)
                  document.body.appendChild(link)
                  link.click()
                  document.body.removeChild(link) //下载完成移除元素
                  window.URL.revokeObjectURL(url) //释放掉blob对象
                }
              }
            })
          }
        }
      })
    },
  }
}
</script>
src/views/eam/EquipmentListOfCrane.vue
@@ -82,12 +82,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -98,12 +103,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -314,14 +324,15 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
<!-- ç‚¹å‡»æŠ€æœ¯çŠ¶æ€åˆ—ï¼Œè·³è½¬åˆ°æŠ€æœ¯çŠ¶æ€é‰´å®šé¡µé¢ -->
<template
        <!-- ç‚¹å‡»æŠ€æœ¯çŠ¶æ€åˆ—ï¼Œè·³è½¬åˆ°æŠ€æœ¯çŠ¶æ€é‰´å®šé¡µé¢ -->
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -451,6 +462,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -631,6 +662,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -654,6 +686,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -682,14 +715,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -706,16 +746,16 @@
          align: "center",
          dataIndex: 'gpo',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        // {
        //   title: '使用部门',
        //   align: "center",
        //   dataIndex: 'useId_dictText',
        // },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        {
          title: '维修班组',
          align: "center",
@@ -726,11 +766,11 @@
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        // {
        //   title: '关键设备标识',
        //   align: "center",
        //   dataIndex: 'specificEquipment_dictText',
        // },
        {
          title: '技术状态',
          align: "center",
@@ -743,6 +783,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/EquipmentListOfEnvProEquipment.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -465,6 +476,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -652,6 +683,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -675,6 +707,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -703,14 +736,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -727,16 +767,16 @@
          align: "center",
          dataIndex: 'gpo',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        // {
        //   title: '使用部门',
        //   align: "center",
        //   dataIndex: 'useId_dictText',
        // },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        {
          title: '维修班组',
          align: "center",
@@ -764,6 +804,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/EquipmentListOfFilesCarousel.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -465,6 +476,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -645,6 +676,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -668,6 +700,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -696,14 +729,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -720,16 +760,16 @@
          align: "center",
          dataIndex: 'gpo',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        // {
        //   title: '使用部门',
        //   align: "center",
        //   dataIndex: 'useId_dictText',
        // },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        {
          title: '维修班组',
          align: "center",
@@ -757,6 +797,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/EquipmentListOfMetrological.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -465,6 +476,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -645,6 +676,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -668,6 +700,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -696,14 +729,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -740,11 +780,11 @@
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        // {
        //   title: '关键设备标识',
        //   align: "center",
        //   dataIndex: 'specificEquipment_dictText',
        // },
        {
          title: '技术状态',
          align: "center",
@@ -757,6 +797,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/EquipmentListOfPressureVessel.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -465,6 +476,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -645,6 +676,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -668,6 +700,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -696,14 +729,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -720,16 +760,16 @@
          align: "center",
          dataIndex: 'gpo',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        // {
        //   title: '使用部门',
        //   align: "center",
        //   dataIndex: 'useId_dictText',
        // },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        {
          title: '维修班组',
          align: "center",
@@ -740,11 +780,7 @@
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '技术状态',
          align: "center",
@@ -757,6 +793,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/EquipmentListOfProduct.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -465,6 +476,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -645,6 +676,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -668,6 +700,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis,
  },
  data() {
    return {
@@ -696,14 +729,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -725,26 +765,22 @@
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        {
          title: '维修班组',
          align: "center",
          dataIndex: 'teamId_dictText',
        },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        // {
        //   title: '维修班组',
        //   align: "center",
        //   dataIndex: 'teamId_dictText',
        // },
        {
          title: 'ABC标识',
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '技术状态',
          align: "center",
@@ -757,6 +793,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/EquipmentListOfRide.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
@@ -466,6 +477,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -646,6 +677,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -669,6 +701,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -697,14 +730,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -721,16 +761,16 @@
          align: "center",
          dataIndex: 'gpo',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        // {
        //   title: '使用部门',
        //   align: "center",
        //   dataIndex: 'useId_dictText',
        // },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        {
          title: '维修班组',
          align: "center",
@@ -741,11 +781,11 @@
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        // {
        //   title: '关键设备标识',
        //   align: "center",
        //   dataIndex: 'specificEquipment_dictText',
        // },
        {
          title: '技术状态',
          align: "center",
@@ -758,6 +798,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/EquipmentListOfTester.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -465,6 +476,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -645,6 +676,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -668,6 +700,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -696,14 +729,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -725,26 +765,26 @@
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        {
          title: '维修班组',
          align: "center",
          dataIndex: 'teamId_dictText',
        },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        // {
        //   title: '维修班组',
        //   align: "center",
        //   dataIndex: 'teamId_dictText',
        // },
        {
          title: 'ABC标识',
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        // {
        //   title: '关键设备标识',
        //   align: "center",
        //   dataIndex: 'specificEquipment_dictText',
        // },
        {
          title: '技术状态',
          align: "center",
@@ -757,6 +797,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/EquipmentListOfTruck.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -465,6 +476,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -645,6 +676,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -668,6 +700,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -696,14 +729,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -720,16 +760,16 @@
          align: "center",
          dataIndex: 'gpo',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        // {
        //   title: '使用部门',
        //   align: "center",
        //   dataIndex: 'useId_dictText',
        // },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        {
          title: '维修班组',
          align: "center",
src/views/eam/EquipmentListOfWeldingMachine.vue
@@ -97,12 +97,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择维护部门"
                tree-default-expand-all
                v-model="queryParam.manageId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.manageId"
              />
            </a-form-item>
@@ -113,12 +118,17 @@
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
              <!-- <a-tree-select
                style="width: 100%"
                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                :tree-data="treeData"
                placeholder="请选择使用部门"
                tree-default-expand-all
                v-model="queryParam.useId"
              /> -->
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择使用部门"
                v-model="queryParam.useId"
              />
            </a-form-item>
@@ -329,13 +339,14 @@
        :customRow="clickThenSelect"
        @change="handleTableChange"
      >
      <template
        <template
          slot="technologyStatus"
          slot-scope="text,record"
          >
        >
          <a
            href="javascript:eam/EquipmentCalibrationOrder;"
            @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a>
            @click="handleTechnologyStatus(record)"
          >{{record.technologyStatus_dictText}}</a>
        </template>
        <template
          slot="htmlSlot"
@@ -465,6 +476,26 @@
            class="error"
          >否</span>
        </span>
        <span
          slot="name"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="8"
          />
        </span>
        <template
          slot="num"
          slot-scope="text,record"
        >
          <a
            href="javascript:;"
            @click="handleDetail(record)"
          >{{record.num}}</a>
        </template>
        <span
          slot="action"
@@ -645,6 +676,7 @@
import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin, mixinDevice],
@@ -668,6 +700,7 @@
    DailyMaintenanceList,
    SecondMaintenanceList,
    ThirdMaintenanceList,
    JEllipsis
  },
  data() {
    return {
@@ -696,14 +729,21 @@
          dataIndex: 'isLineEquip_dictText',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'num',
          scopedSlots: { customRender: 'num' },
        },
        {
          title: '设备名称',
          align: "center",
          dataIndex: 'name',
          scopedSlots: { customRender: 'name' },
        },
        {
          title: '型号',
@@ -720,16 +760,16 @@
          align: "center",
          dataIndex: 'gpo',
        },
        {
          title: '使用部门',
          align: "center",
          dataIndex: 'useId_dictText',
        },
        {
          title: '维护部门',
          align: "center",
          dataIndex: 'manageId_dictText',
        },
        // {
        //   title: '使用部门',
        //   align: "center",
        //   dataIndex: 'useId_dictText',
        // },
        // {
        //   title: '维护部门',
        //   align: "center",
        //   dataIndex: 'manageId_dictText',
        // },
        {
          title: '维修班组',
          align: "center",
@@ -740,11 +780,7 @@
          align: "center",
          dataIndex: 'equipmentImportanceId',
        },
        {
          title: '关键设备标识',
          align: "center",
          dataIndex: 'specificEquipment_dictText',
        },
        {
          title: '技术状态',
          align: "center",
@@ -757,6 +793,11 @@
          dataIndex: 'technologyStatusVerificationType_dictText',
        },
        {
          title: '下次技术状态鉴定时间',
          align: "center",
          dataIndex: 'nextTechnologyStatusQualificationTime',
        },
        {
          title: '生产线编号',
          align: "center",
          dataIndex: 'lineId_dictText',
src/views/eam/FaultCauseChart.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,188 @@
<template>
  <a-card
    title="设备故障原因"
    :bordered="true"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="统一编码">
              <a-input
                placeholder="请输入统一编码"
                v-model="queryParam.equipmentNum"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="维修时间">
              <a-range-picker
                style="width: 100%;"
                format="YYYY-MM-DD HH:mm:ss"
                v-model="faultTime"
                @change="timeChange"
              />
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="8"
          >
            <span
              style="float: left;overflow: hidden;"
              class="table-page-search-submitButtons"
            >
              <a-button
                type="primary"
                @click="searchQuery"
                icon="search"
              >查询</a-button>
              <a-button
                type="primary"
                @click="searchReset"
                icon="reload"
                style="margin-left: 8px"
              >重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <a-row>
      <a-col
        :sm="24"
        :md="24"
        :xl="12"
        :style="{ marginBottom: '15px' }"
      >
        <a-card
          :loading="loading"
          :bordered="true"
          title=""
        >
          <pie :dataSource="defectInfo"></pie>
        </a-card>
      </a-col>
      <a-col
        :sm="24"
        :md="24"
        :xl="12"
        :style="{ marginBottom: '15px' }"
      >
        <a-card
          :loading="loading"
          :bordered="true"
          title=""
        >
          <bar
            title=""
            :dataSource="barData"
          />
        </a-card>
      </a-col>
    </a-row>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, deleteAction, postAction } from '@/api/manage'
import Pie from '@/components/chart/Pie'
import Bar from '@/components/chart/Bar'
import moment from 'moment'
export default {
  name: 'TeamList',
  mixins: [JeecgListMixin, mixinDevice],
  components: {
    Pie,
    Bar
  },
  data() {
    return {
      description: 'FaultCauseChart',
      // barData: [{ x: '设备故障', y: 5 }, { x: '其他', y: 8 }],
      barData: [],
      defectInfo: [],
      url: {
        list: "/eam/repairOrder/getFaultCausePie",
        list2: "/eam/repairOrder/getFaultCauseBar",
      },
      // è¡¨å¤´
      faultTime: [],
      dictOptions: {},
      superFieldList: [],
      queryParam: {}
    }
  },
  created() {
    this.loadData2(1);
  },
  methods: {
    timeChange() {
      this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
    },
    searchQuery() {
      this.loadData(1);
      this.loadData2(1);
    },
    searchReset() {
      this.faultTime = []
      this.queryParam = {}
      this.loadData(1);
      this.loadData2(1);
    },
    loadData(arg) {
      this.loading = true;
      getAction(this.url.list, this.queryParam).then((res) => {
        if (res.success) {
          this.barData = res.result.records || res.result;
        } else {
          this.$message.warning(res.message)
        }
      }).finally(() => {
        this.loading = false
      })
    },
    loadData2(arg) {
      this.loading = true;
      getAction(this.url.list2, this.queryParam).then((res) => {
        if (res.success) {
          this.defectInfo = res.result.records || res.result;
        } else {
          this.$message.warning(res.message)
        }
      }).finally(() => {
        this.loading = false
      })
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/eam/MTBF.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,163 @@
<template>
  <a-card
    :bordered="false"
    title="MTBF"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="统一标码">
              <a-input
                placeholder="请输入统一标码"
                v-model="queryParam.equipmentNum"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="8"
          >
            <a-form-item label="维修时间">
              <a-range-picker
                style="width: 100%;"
                format="YYYY-MM-DD HH:mm:ss"
                v-model="faultTime"
                @change="timeChange"
              />
            </a-form-item>
          </a-col>
          <a-col
            :md="6"
            :sm="8"
          >
            <span
              style="float: left;overflow: hidden;"
              class="table-page-search-submitButtons"
            >
              <a-button
                type="primary"
                @click="searchQuery"
                icon="search"
              >查询</a-button>
              <a-button
                type="primary"
                @click="searchReset"
                icon="reload"
                style="margin-left: 8px"
              >重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- æŸ¥è¯¢åŒºåŸŸ-END -->
    <div>
      <div
        class="ant-alert ant-alert-info"
        style="margin-bottom: 16px;"
      >
        <i class="anticon anticon-info-circle ant-alert-icon"></i> å·²é€‰æ‹© <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a
          style="margin-left: 24px"
          @click="onClearSelected"
        >清空</a>
      </div>
      <a-table
        ref="table"
        size="middle"
        :scroll="{x:true}"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        class="j-table-force-nowrap"
        @change="handleTableChange"
      >
        <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
      </a-table>
    </div>
  </a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import moment from 'moment'
export default {
  name: 'MTBF',
  mixins: [JeecgListMixin, mixinDevice],
  components: {},
  data() {
    return {
      description: 'MTBF',
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '故障原因',
          align: "center",
          dataIndex: 'item'
        },
        {
          title: '发生次数',
          align: "center",
          dataIndex: 'count'
        },
      ],
      url: {
        list: "/eam/repairOrder/getMTPF",
      },
      // è¡¨å¤´
      faultTime: [],
      queryParam: {}
    }
  },
  created() { },
  methods: {
    timeChange() {
      this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
    },
    searchQuery() {
      this.loadData(1);
    },
    searchReset() {
      this.faultTime = []
      this.queryParam = {}
      this.loadData(1);
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/eam/MalfunctionRepair.vue
@@ -234,23 +234,27 @@
        @change="handleTableChange"
        :customRow="clickThenSelect"
      >
      <!-- ç‚¹å‡»åˆ—跳转到事故登记页 -->
        <!-- ç‚¹å‡»åˆ—跳转到事故登记页 -->
        <template
          slot="accidentRegistrationProgress"
          slot-scope="text, record">
          slot-scope="text, record"
        >
          <a
            v-if="text!==''&&text!==null"
            @click="handleAccidentRegistration(record)">
            @click="handleAccidentRegistration(record)"
          >
            {{text=='yes'? '已确认':'未确认'}}
          </a>
        </template>
        <!-- ç‚¹å‡»åˆ—跳转到质量隐患页 -->
        <template
          slot="qualityHiddenDangerProgress"
          slot-scope="text, record">
          slot-scope="text, record"
        >
          <a
            v-if="text!==''&&text!==null"
            @click="handleQualityHiddenDanger(record)">
            @click="handleQualityHiddenDanger(record)"
          >
            {{text=='yes'? '已确认':'未确认'}}
          </a>
        </template>
@@ -431,7 +435,13 @@
        {
          title: '单据号',
          align: "center",
          dataIndex: 'num'
          dataIndex: 'num',
          width: 150
        },
        {
          title: '统一编号',
          align: "center",
          dataIndex: 'equipmentNum'
        },
        {
          title: '状态',
@@ -446,7 +456,7 @@
            if (text == '1') {
              return "被动报修";
            } else if (text == '2') {
              return "主动报修";
              return "车间报修";
            } else if (text == '3') {
              return "主动维修";
            }
@@ -470,11 +480,7 @@
          dataIndex: 'specificEquipment',
          scopedSlots: { customRender: 'specificEquipment' }
        },
        {
          title: '统一编号',
          align: "center",
          dataIndex: 'equipmentNum'
        },
        {
          title: '设备名称',
          align: "center",
@@ -554,8 +560,8 @@
          align: "center",
          dataIndex: 'remark'
        },
         //质量隐患确认进度
         {
        //质量隐患确认进度
        {
          title: '质量隐患',
          align: "center",
          dataIndex: 'isConfirm1',
@@ -576,7 +582,7 @@
          width: 100,
          scopedSlots: { customRender: 'action' }
        },
      ],
      url: {
        list: "/eam/equipmentReportRepair/getReportRepairList",
src/views/eam/OperationCertificateApplyList.vue
@@ -37,22 +37,22 @@
              />
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
            <a-col
              :xl="6"
              :lg="7"
              :md="8"
              :sm="24"
            >
              <a-form-item label="审核状态">
                <j-dict-select-tag
                  placeholder="请选择审核状态"
                  v-model="queryParam.auditStatus"
                  dictCode="certificate_apply_status"
                />
              </a-form-item>
            </a-col>
          </template>
          <!-- <template v-if="toggleSearchStatus"> -->
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="审核状态">
              <j-dict-select-tag
                placeholder="请选择审核状态"
                v-model="queryParam.auditStatus"
                dictCode="certificate_apply_status"
              />
            </a-form-item>
          </a-col>
          <!-- </template> -->
          <a-col
            :xl="6"
            :lg="7"
@@ -74,13 +74,13 @@
                icon="reload"
                style="margin-left: 8px"
              >重置</a-button>
              <a
              <!-- <a
                @click="handleToggleSearch"
                style="margin-left: 8px"
              >
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
              </a>
              </a> -->
            </span>
          </a-col>
        </a-row>
@@ -100,7 +100,7 @@
        icon="download"
        @click="handleExportXls('操作证申请表')"
      >导出</a-button>
      <a-upload
      <!-- <a-upload
        name="file"
        :showUploadList="false"
        :multiple="false"
@@ -112,7 +112,7 @@
          type="primary"
          icon="import"
        >导入</a-button>
      </a-upload>
      </a-upload> -->
      <a-button
        @click="handleAchievement"
        type="primary"
@@ -159,50 +159,6 @@
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange"
      >
        <template
          slot="htmlSlot"
          slot-scope="text"
        >
          <div v-html="text"></div>
        </template>
        <template
          slot="imgSlot"
          slot-scope="text,record"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无图片</span>
          <img
            v-else
            :src="getImgView(text)"
            :preview="record.id"
            height="25px"
            alt=""
            style="max-width:80px;font-size: 12px;font-style: italic;"
          />
        </template>
        <template
          slot="fileSlot"
          slot-scope="text"
        >
          <span
            v-if="!text"
            style="font-size: 12px;font-style: italic;"
          >无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)"
          >
            ä¸‹è½½
          </a-button>
        </template>
        <span
          slot="action"
          slot-scope="text, record"
@@ -251,20 +207,6 @@
            @click="handleFinish(record)"
            v-has="'OperationCertificateApply:equipmentAdmin'"
          >审核</a>
          <!-- <a-popconfirm
            v-if="record.auditStatus == 'submitted'"
            title="确认通过审批吗?"
            @confirm="() =>handleCommit(record, 'approved')"
          >
            <a>审批</a>
          </a-popconfirm>
          <a-popconfirm
            v-if="record.auditStatus == 'approved'"
            title="确认通过审核吗?"
            @confirm="() =>handleCommit(record, 'audited')"
          >
            <a>审核</a>
          </a-popconfirm> -->
          <a-divider
            type="vertical"
            v-if="record.auditStatus == 'created' || record.auditStatus == 'submitted' || record.auditStatus == 'approved'"
@@ -387,9 +329,9 @@
          dataIndex: 'handlePerson_dictText'
        },
        {
          title: '备注',
          title: '办理时间',
          align: "center",
          dataIndex: 'remark'
          dataIndex: 'createTime'
        },
        {
          title: '操作',
@@ -409,11 +351,11 @@
        approve: "/eam/operationCertificateApply/approve"
      },
      dictOptions: {},
      superFieldList: [],
      // superFieldList: [],
    }
  },
  created() {
    this.getSuperFieldList();
    // this.getSuperFieldList();
  },
  computed: {
    importExcelUrl: function () {
@@ -421,19 +363,19 @@
    }
  },
  methods: {
    initDictConfig() {
    },
    getSuperFieldList() {
      let fieldList = [];
      fieldList.push({ type: 'string', value: 'num', text: '申请单编号', dictCode: '' })
      fieldList.push({ type: 'string', value: 'type', text: '类型', dictCode: 'apply_type' })
      fieldList.push({ type: 'sel_depart', value: 'departId', text: '所在单位' })
      fieldList.push({ type: 'string', value: 'contactNumber', text: '申请单位联系电话', dictCode: '' })
      fieldList.push({ type: 'string', value: 'applicant', text: '申请人', dictCode: "sys_user,realname,id" })
      fieldList.push({ type: 'string', value: 'auditStatus', text: '审核状态', dictCode: 'certificate_apply_status' })
      fieldList.push({ type: 'string', value: 'remark', text: '备注', dictCode: '' })
      this.superFieldList = fieldList
    },
    // initDictConfig() {
    // },
    // getSuperFieldList() {
    //   let fieldList = [];
    //   fieldList.push({ type: 'string', value: 'num', text: '申请单编号', dictCode: '' })
    //   fieldList.push({ type: 'string', value: 'type', text: '类型', dictCode: 'apply_type' })
    //   fieldList.push({ type: 'sel_depart', value: 'departId', text: '所在单位' })
    //   fieldList.push({ type: 'string', value: 'contactNumber', text: '申请单位联系电话', dictCode: '' })
    //   fieldList.push({ type: 'string', value: 'applicant', text: '申请人', dictCode: "sys_user,realname,id" })
    //   fieldList.push({ type: 'string', value: 'auditStatus', text: '审核状态', dictCode: 'certificate_apply_status' })
    //   fieldList.push({ type: 'string', value: 'remark', text: '备注', dictCode: '' })
    //   this.superFieldList = fieldList
    // },
    handleCommit(record, type) {
      if (type == 'commit') {
        record.auditStatus = 'submitted'
src/views/eam/OperationCertificateList.vue
@@ -113,7 +113,7 @@
        icon='download'
        @click="handleExportXls('操作证书管理')"
      >导出</a-button>
      <a-upload
      <!-- <a-upload
        name='file'
        :showUploadList='false'
        :multiple='false'
@@ -125,7 +125,7 @@
          type='primary'
          icon='import'
        >导入</a-button>
      </a-upload>
      </a-upload> -->
      <!-- é«˜çº§æŸ¥è¯¢åŒºåŸŸ -->
      <!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
      <!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
@@ -165,49 +165,6 @@
        @change='handleTableChange'
        :rowClassName="tableRowClass"
      >
        <template
          slot='htmlSlot'
          slot-scope='text'
        >
          <div v-html='text'></div>
        </template>
        <template
          slot='imgSlot'
          slot-scope='text,record'
        >
          <span
            v-if='!text'
            style='font-size: 12px;font-style: italic;'
          >无图片</span>
          <img
            v-else
            :src='getImgView(text)'
            :preview='record.id'
            height='25px'
            alt=''
            style='max-width:80px;font-size: 12px;font-style: italic;'
          />
        </template>
        <template
          slot='fileSlot'
          slot-scope='text'
        >
          <span
            v-if='!text'
            style='font-size: 12px;font-style: italic;'
          >无文件</span>
          <a-button
            v-else
            :ghost='true'
            type='primary'
            icon='download'
            size='small'
            @click='downloadFile(text)'
          >
            ä¸‹è½½
          </a-button>
        </template>
      </a-table>
    </div>
src/views/eam/RepairOrderList.vue
@@ -163,15 +163,13 @@
          </a-col>
        </a-row>
        <a-row :gutter="24">
            <a-col
                :xl="6"
                :lg="7"
                :md="8"
                :sm="24"
            >
            <a-form-item
              label="ABC标识"
            >
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="ABC标识">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择ABC标识"
@@ -182,10 +180,26 @@
            </a-form-item>
          </a-col>
          <a-col
                :xl="6"
                :lg="7"
                :md="8"
                :sm="24"
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="故障原因">
              <j-dict-select-tag
                allow-clear
                placeholder="请选择故障原因"
                :triggerChange="true"
                dictCode="repair_order_fault_cause"
                v-model="queryParam.faultCause"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="报修时间">
              <a-range-picker
@@ -197,10 +211,10 @@
            </a-form-item>
          </a-col>
          <a-col
                :xl="6"
                :lg="7"
                :md="8"
                :sm="24"
            :xl="6"
            :lg="7"
            :md="8"
            :sm="24"
          >
            <a-form-item label="创建时间">
              <a-range-picker
@@ -419,6 +433,44 @@
          </a-dropdown>
        </span>
        <template
          slot="equipmentNum"
          slot-scope="text, record"
        >
          <a-popover title="故障原因统计">
            <template slot="content">
              <p
                v-for="(faultCauseMap, index) in record.equipmentFaultCause"
                :key="index"
              >
                <span class="fontweight">{{ faultCauseMap.faultCause }}:{{ faultCauseMap.total }}</span>
              </p>
            </template>
            <span>
              {{ record.equipmentNum }}
            </span>
          </a-popover>
        </template>
        <template
          slot="faultCauseCount"
          slot-scope="text, record"
        >
          <a-popover title="故障原因统计">
            <template slot="content">
              <p
                v-for="(faultCauseMap, index) in record.allFaultCause"
                :key="index"
              >
                <span class="fontweight">{{ faultCauseMap.faultCause }}:{{ faultCauseMap.total }}</span>
              </p>
            </template>
            <span>
              {{ record.faultCauseCount }}
            </span>
          </a-popover>
        </template>
      </a-table>
    </div>
@@ -574,7 +626,7 @@
      description: '维修工单管理页面',
      // è¡¨å¤´
      faultTime: [],
      createTimes:[],
      createTimes: [],
      columns: [
        {
          title: '#',
@@ -625,7 +677,8 @@
        {
          title: '统一编码',
          align: "center",
          dataIndex: 'equipmentNum'
          dataIndex: 'equipmentNum',
          scopedSlots: { customRender: 'equipmentNum' }
        },
        {
          title: '设备名称',
@@ -685,11 +738,11 @@
          align: "center",
          dataIndex: 'faultTime'
        },
        {
          title: '报修人',
          align: "center",
          dataIndex: 'errUda2'
        },
        // {
        //   title: '报修人',
        //   align: "center",
        //   dataIndex: 'errUda2',
        // },
        {
          title: '故障描述',
          align: "center",
@@ -698,11 +751,12 @@
            customRender: 'jell'
          }
        },
        // {
        //   title: '故障原因',
        //   align: "center",
        //   dataIndex: 'faultReason'
        // },
        {
          title: '故障原因',
          align: "center",
          dataIndex: 'faultCauseCount',
          scopedSlots: { customRender: 'faultCauseCount' }
        },
        // {
        //   title: '故障现象',
        //   align: "center",
@@ -848,7 +902,7 @@
      this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
    },
    timeChangeCreate(){
    timeChangeCreate() {
      this.queryParam.createStartTime = moment(this.createTimes[0]).format("YYYY-MM-DD HH:mm:ss")
      this.queryParam.createEndTime = moment(this.createTimes[1]).format("YYYY-MM-DD HH:mm:ss")
    },
@@ -1017,7 +1071,7 @@
      this.onClearSelected()
      this.$refs.FaultDescriptionList.faultId = '-1'
      this.faultTime = []
      this.createTimes=[]
      this.createTimes = []
    },
    getReports() {
      this.$refs.FaultReportRepair.title = '故障报修单';
src/views/eam/RepairStandardList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,46 @@
<template>
  <a-row
    type="flex"
    :gutter="16"
  >
    <a-col
      :md="4"
      :sm="24"
    >
      <repair-standard-category-left @clickTreeNode="getSelectNode" />
    </a-col>
    <a-col
      :md="24-4"
      :sm="24"
    >
      <repair-standard-right :recordSelect="currentNodeSelect" />
    </a-col>
  </a-row>
</template>
<script>
import RepairStandardCategoryLeft from './modules/repairStandard/RepairStandardCategoryLeft'
import RepairStandardRight from './modules/repairStandard/RepairStandardRight'
export default {
  name: 'RepairStandardList',
  components: {
    RepairStandardCategoryLeft,
    RepairStandardRight,
  },
  data() {
    return {
      description: '维修标准分类',
      currentNodeSelect: '',
    }
  },
  methods: {
    getSelectNode(val) {
      this.currentNodeSelect = val;
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/eam/modules/dailyInspectionStandard/AuditApprovalModal.vue
@@ -157,7 +157,9 @@
      this.model = Object.assign({}, record);
      this.visible = true;
      this.$nextTick(() => {
        this.form.setFieldsValue(pick(this.model, 'num', 'auditFeedback', 'approvalFeedback'));
        this.form.setFieldsValue(pick(this.model, 'num'));
        this.form.setFieldsValue({ auditFeedback: "" });
        this.form.setFieldsValue({ approvalFeedback: "" });
      }, 200);
    },
src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue
@@ -442,13 +442,13 @@
    this.$bus.$on('selectionRows', (data) => {
      for (let i = 0; i < data.length; i++) {
        this.dataSource.push({
          id: data[i].id,
          inspectionProjectId: data[i].id,
          name: data[i].name,
          detectionStandard: data[i].detectionStandard,
          acceptabilityLimit: data[i].acceptabilityLimit,
          inspectionMethodName: data[i].inspectionMethod_dictText,
          inspectionTool: data[i].inspectionTool,
          id: data[i][0].id,
          inspectionProjectId: data[i][0].id,
          name: data[i][0].name,
          detectionStandard: data[i][0].detectionStandard,
          acceptabilityLimit: data[i][0].acceptabilityLimit,
          inspectionMethodName: data[i][0].inspectionMethod_dictText,
          inspectionTool: data[i][0].inspectionTool,
          inspectionCycles: this.inspectionCycles,
        })
      }
src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue
@@ -57,9 +57,9 @@
        :columns='columns'
        :dataSource='dataSource'
        :pagination='ipagination'
        :rowSelection='rowSelection'
        :loading='loading'
        @change='handleTableChange'
        :rowSelection='rowSelection'
      >
      </a-table>
@@ -129,6 +129,7 @@
      ],
      selectedRowKeys: [],
      selectionRowsNotClear: [],
      oldSelectRows: [],
      scrollTrigger: {},
      dataSource: [],
@@ -162,14 +163,16 @@
        type: 'checkbox',
        onChange: (selectedRowKeys, selectedRows) => {
          this.selectedRowKeys = selectedRowKeys
          this.onSelectChange(selectedRows)
          this.selectionRows = selectedRows
          this.selectionRowsNotClear.push(selectedRows)
        },
        getCheckboxProps: record => ({
          props: {
            disabled: record.distable
          }
        }),
        selectedRowKeys: this.selectedRowKeys
        selectedRowKeys: this.selectedRowKeys,
        selectedRows: this.selectionRows
      }
    }
  },
@@ -204,6 +207,8 @@
    showModals(oldSelectRows) {
      this.selectionRows = []
      this.selectedRowKeys = []
      this.selectionRowsNotClear = []
      this.oldSelectRows = oldSelectRows
      this.visible = true
      this.loadData(1)
@@ -238,16 +243,16 @@
    },
    handleTableChange(pagination, filters, sorter) {
      //TODO ç­›é€‰
      if (Object.keys(sorter).length > 0) {
        this.isorter.column = sorter.field
        this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc'
      }
      this.ipagination = pagination
      this.loadData()
    },
    handleSubmit() {
      this.$bus.$emit('selectionRows', this.selectionRows)
      this.$bus.$emit('selectionRows', this.selectionRowsNotClear)
      this.searchReset(0)
      this.close()
    },
src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue
@@ -78,7 +78,7 @@
              :wrapperCol="wrapperCol"
            >
              <j-date
                v-model="model.maintenanceDate"
                v-model="model.actualEndTime"
                placeholder="请选择保养日期"
                :showTime="true"
                dateFormat="YYYY-MM-DD"
src/views/eam/modules/dailyMaintenanceStandard/AuditApprovalModal.vue
@@ -151,7 +151,9 @@
      this.model = Object.assign({}, record);
      this.visible = true;
      this.$nextTick(() => {
        this.form.setFieldsValue(pick(this.model, 'num', 'auditFeedback', 'approvalFeedback'));
        this.form.setFieldsValue(pick(this.model, 'num'));
        this.form.setFieldsValue({ auditFeedback: "" });
        this.form.setFieldsValue({ approvalFeedback: "" });
      }, 200);
    },
src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue
@@ -595,15 +595,15 @@
        let id = this.getUuiD(15);
        this.dataSource.push({
          id: id,
          maintenanceProjectId: data[i].id,
          name: data[i].name,
          standard: data[i].standard,
          maintenanceMethodName: data[i].maintenanceMethod_dictText,
          maintenanceTool: data[i].maintenanceTool,
          location: data[i].location,
          maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText,
          maintenanceRequire: data[i].maintenanceRequire,
          workingHourQuota: data[i].workingHourQuota,
          maintenanceProjectId: data[i][0].id,
          name: data[i][0].name,
          standard: data[i][0].standard,
          maintenanceMethodName: data[i][0].maintenanceMethod_dictText,
          maintenanceTool: data[i][0].maintenanceTool,
          location: data[i][0].location,
          maintenanceSpecialtyName: data[i][0].maintenanceSpecialtyId_dictText,
          maintenanceRequire: data[i][0].maintenanceRequire,
          workingHourQuota: data[i][0].workingHourQuota,
          // upload: this.upload,
          // maintenanceCycles: this.maintenanceCycles,
        })
src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue
@@ -138,6 +138,7 @@
      scrollTrigger: {},
      dataSource: [],
      selectionRows: [],
      selectionRowsNotClear: [],
      title: '根据查询结果选择保养项目',
      ipagination: {
        current: 1,
@@ -167,6 +168,7 @@
        type: 'checkbox',
        onChange: (selectedRowKeys, selectedRows) => {
          this.selectedRowKeys = selectedRowKeys
          this.selectionRowsNotClear.push(selectedRows)
          this.onSelectChange(selectedRows)
        },
        getCheckboxProps: record => ({
@@ -209,6 +211,7 @@
    showModals(oldSelectRows) {
      this.selectionRows = []
      this.selectionRowsNotClear = []
      this.oldSelectRows = oldSelectRows
      this.visible = true
      this.loadData(1)
@@ -252,7 +255,7 @@
      this.loadData()
    },
    handleSubmit() {
      this.$bus.$emit('selectionRows', this.selectionRows)
      this.$bus.$emit('selectionRows', this.selectionRowsNotClear)
      // this.searchReset(0)
      this.close()
    },
src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue
@@ -595,15 +595,15 @@
        let id = this.getUuiD(15);
        this.dataSource.push({
          id: id,
          maintenanceProjectId: data[i].id,
          name: data[i].name,
          standard: data[i].standard,
          maintenanceMethodName: data[i].maintenanceMethod_dictText,
          maintenanceTool: data[i].maintenanceTool,
          location: data[i].location,
          maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText,
          maintenanceRequire: data[i].maintenanceRequire,
          workingHourQuota: data[i].workingHourQuota,
          maintenanceProjectId: data[i][0].id,
          name: data[i][0].name,
          standard: data[i][0].standard,
          maintenanceMethodName: data[i][0].maintenanceMethod_dictText,
          maintenanceTool: data[i][0].maintenanceTool,
          location: data[i][0].location,
          maintenanceSpecialtyName: data[i][0].maintenanceSpecialtyId_dictText,
          maintenanceRequire: data[i][0].maintenanceRequire,
          workingHourQuota: data[i][0].workingHourQuota,
          // upload: this.upload,
          // maintenanceCycles: this.maintenanceCycles,
        })
src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue
@@ -138,6 +138,7 @@
      scrollTrigger: {},
      dataSource: [],
      selectionRows: [],
      selectionRowsNotClear: [],
      title: '根据查询结果选择保养项目',
      ipagination: {
        current: 1,
@@ -167,6 +168,7 @@
        type: 'checkbox',
        onChange: (selectedRowKeys, selectedRows) => {
          this.selectedRowKeys = selectedRowKeys
          this.selectionRowsNotClear.push(selectedRows)
          this.onSelectChange(selectedRows)
        },
        getCheckboxProps: record => ({
@@ -209,6 +211,7 @@
    showModals(oldSelectRows) {
      this.selectionRows = []
      this.selectionRowsNotClear = []
      this.oldSelectRows = oldSelectRows
      this.visible = true
      this.loadData(1)
@@ -252,7 +255,7 @@
      this.loadData()
    },
    handleSubmit() {
      this.$bus.$emit('selectionRows', this.selectionRows)
      this.$bus.$emit('selectionRows', this.selectionRowsNotClear)
      // this.searchReset(0)
      this.close()
    },
src/views/eam/modules/equipment/EquipmentModel.vue
@@ -642,14 +642,14 @@
          rules: [
            { required: true, message: '请输入设备分类编号!' },
            { min: 2, max: 30, message: '长度在 2 åˆ° 30 ä¸ªå­—符', trigger: 'blur' },
            { validator: this.validateNum },
            // { validator: this.validateNum },
          ]
        },
        name: {
          rules: [
            { required: true, message: '请输入设备分类名称!' },
            { min: 2, max: 30, message: '长度在 2 åˆ° 30 ä¸ªå­—符', trigger: 'blur' },
            { validator: this.validateName },
            // { validator: this.validateName },
          ]
        },
        teamId: {
src/views/eam/modules/equipmentNew/EquipmentModal.vue
@@ -150,7 +150,10 @@
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='6'  v-show='isLineEquipShow'>
          <a-col
            :span='6'
            v-show='isLineEquipShow'
          >
            <a-form-model-item
              label='是否生产线主设备'
              :labelCol='labelCol'
@@ -1028,7 +1031,7 @@
        num: [
          { required: true, message: '请输入设备编号!' },
          // { min: 2, max: 30, message: '长度在 2 åˆ° 30 ä¸ªå­—符', trigger: 'blur' },
          { validator: this.validateNum }
          // { validator: this.validateNum }
        ],
        name: [
          { required: true, message: '请输入设备名称!' }
src/views/eam/modules/malfunctionRepair/EquipmentList.vue
@@ -190,6 +190,7 @@
    onSelectChange(selectedRowKeys, selectedRows) {
      this.selectedRowKeys = selectedRowKeys;
      this.selectedRowRecord = selectedRows[0];
      this.handleOk()
    },
    close() {
      this.queryParam = {};
@@ -291,7 +292,7 @@
  height: 90% !important;
  overflow-y: hidden;
}
 .notshow {
.notshow {
  display: none;
}
@@ -310,7 +311,7 @@
.dataUnKnow {
  color: #1890ff;
}
 .frozenRowClass {
.frozenRowClass {
  color: #c9c9c9;
}
</style>
src/views/eam/modules/operationCertificate/OperationCertificateDetailList.vue
@@ -140,7 +140,7 @@
  props: {
    mainId: {
      type: String,
      default: '',
      default: '-1',
      required: false
    }
  },
src/views/eam/modules/operationCertificate/OperationCertificateDetailModal.vue
@@ -7,38 +7,92 @@
    switchFullscreen
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭">
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form-model ref="form" :model="model" :rules="validatorRules">
      <a-form-model
        ref="form"
        :model="model"
        :rules="validatorRules"
      >
        <a-row>
          <a-col :span="24">
            <a-form-model-item label="证书ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationCertificateId">
              <a-input v-model="model.operationCertificateId"placeholder="请输入证书ID" ></a-input>
            <a-form-model-item
              label="证书ID"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="operationCertificateId"
            >
              <a-input
                v-model="model.operationCertificateId"
                placeholder="请输入证书ID"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="发生时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="happenDate">
              <j-date placeholder="请选择发生时间" v-model="model.happenDate" style="width: 100%" />
            <a-form-model-item
              label="发生时间"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="happenDate"
            >
              <j-date
                placeholder="请选择发生时间"
                v-model="model.happenDate"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type">
              <a-input v-model="model.type"placeholder="请输入类型" ></a-input>
            <a-form-model-item
              label="类型"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="type"
            >
              <a-input
                v-model="model.type"
                placeholder="请输入类型"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="设备id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId">
              <a-input v-model="model.equipmentId"placeholder="请输入设备id" ></a-input>
            <a-form-model-item
              label="设备id"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="equipmentId"
            >
              <a-input
                v-model="model.equipmentId"
                placeholder="请输入设备id"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="扣分项" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deductionItem">
              <a-input v-model="model.deductionItem"placeholder="请输入扣分项" ></a-input>
            <a-form-model-item
              label="扣分项"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="deductionItem"
            >
              <a-input
                v-model="model.deductionItem"
                placeholder="请输入扣分项"
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="扣分周期" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="period">
              <a-input v-model="model.period"placeholder="请输入扣分周期" ></a-input>
            <a-form-model-item
              label="扣分周期"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
              prop="period"
            >
              <a-input
                v-model="model.period"
                placeholder="请输入扣分周期"
              ></a-input>
            </a-form-model-item>
          </a-col>
        </a-row>
@@ -49,100 +103,100 @@
<script>
  import { httpAction } from '@/api/manage'
  import { validateDuplicateValue } from '@/utils/util'
import { httpAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
  export default {
    name: "OperationCertificateDetailModal",
    components: {
    },
    props:{
      mainId:{
        type:String,
        required:false,
        default:''
export default {
  name: "OperationCertificateDetailModal",
  components: {
  },
  props: {
    mainId: {
      type: String,
      required: false,
      default: ''
    }
  },
  data() {
    return {
      title: "操作",
      width: 800,
      visible: false,
      model: {
      },
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 },
      },
      confirmLoading: false,
      validatorRules: {
      },
      url: {
        add: "/eam/operationCertificate/addOperationCertificateDetail",
        edit: "/eam/operationCertificate/editOperationCertificateDetail",
      }
    },
    data () {
      return {
        title:"操作",
        width:800,
        visible: false,
        model:{
        },
        labelCol: {
          xs: { span: 24 },
          sm: { span: 5 },
        },
        wrapperCol: {
          xs: { span: 24 },
          sm: { span: 16 },
        },
        confirmLoading: false,
        validatorRules: {
        },
        url: {
          add: "/eam/operationCertificate/addOperationCertificateDetail",
          edit: "/eam/operationCertificate/editOperationCertificateDetail",
        }
      }
    },
    created () {
    //备份model原始值
      this.modelDefault = JSON.parse(JSON.stringify(this.model));
    },
    methods: {
      add () {
        this.edit(this.modelDefault);
      },
      edit (record) {
        this.model = Object.assign({}, record);
        this.visible = true;
      },
      close () {
        this.$emit('close');
        this.visible = false;
        this.$refs.form.clearValidate();
      },
      handleOk () {
        const that = this;
        // è§¦å‘表单验证
        this.$refs.form.validate(valid => {
          if (valid) {
            that.confirmLoading = true;
            let httpurl = '';
            let method = '';
            if(!this.model.id){
              httpurl+=this.url.add;
              method = 'post';
            }else{
              httpurl+=this.url.edit;
               method = 'put';
            }
            this.model['operationCertificateId'] = this.mainId
            httpAction(httpurl,this.model,method).then((res)=>{
              if(res.success){
                that.$message.success(res.message);
                that.$emit('ok');
              }else{
                that.$message.warning(res.message);
              }
            }).finally(() => {
              that.confirmLoading = false;
              that.close();
            })
          }else{
             return false
          }
        })
      },
      handleCancel () {
        this.close()
      },
    }
  },
  created() {
    //备份model原始值
    this.modelDefault = JSON.parse(JSON.stringify(this.model));
  },
  methods: {
    add() {
      this.edit(this.modelDefault);
    },
    edit(record) {
      this.model = Object.assign({}, record);
      this.visible = true;
    },
    close() {
      this.$emit('close');
      this.visible = false;
      this.$refs.form.clearValidate();
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      this.$refs.form.validate(valid => {
        if (valid) {
          that.confirmLoading = true;
          let httpurl = '';
          let method = '';
          if (!this.model.id) {
            httpurl += this.url.add;
            method = 'post';
          } else {
            httpurl += this.url.edit;
            method = 'put';
          }
          this.model['operationCertificateId'] = this.mainId
          httpAction(httpurl, this.model, method).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        } else {
          return false
        }
      })
    },
    handleCancel() {
      this.close()
    },
  }
}
</script>
src/views/eam/modules/operationCertificate/OperationCertificateForm.vue
@@ -2,63 +2,167 @@
  <a-spin :spinning='confirmLoading'>
    <j-form-container :disabled='formDisabled'>
      <!-- ä¸»è¡¨å•区域 -->
      <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'>
      <a-form-model
        ref='form'
        :model='model'
        :rules='validatorRules'
        slot='detail'
      >
        <a-row>
          <a-col :span='12'>
            <a-form-model-item label='操作证编号' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'>
              <a-input v-model='model.num' placeholder='请输入操作证编号' disabled></a-input>
            <a-form-model-item
              label='操作证编号'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='num'
            >
              <a-input
                v-model='model.num'
                placeholder='请输入操作证编号'
                disabled
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='姓名' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='userId'>
              <j-select-user-by-dep v-model='model.userId' :multi='false' />
            <a-form-model-item
              label='姓名'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='userId'
            >
              <!-- <j-select-user-by-dep
                v-model='model.userId'
                :multi='false'
              /> -->
              <j-dict-select-tag
                type='list'
                v-model='model.userId'
                dictCode='sys_user,realname,id'
                placeholder='请选择申请人'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='发证日期' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='issueDate'>
              <j-date placeholder='请选择发证日期' v-model='model.issueDate' style='width: 100%' />
            <a-form-model-item
              label='发证日期'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='issueDate'
            >
              <j-date
                placeholder='请选择发证日期'
                v-model='model.issueDate'
                style='width: 100%'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='开始时间' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='startTime'>
              <j-date placeholder='请选择开始时间' v-model='model.startTime' style='width: 100%' />
            <a-form-model-item
              label='开始时间'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='startTime'
            >
              <j-date
                placeholder='请选择开始时间'
                v-model='model.startTime'
                style='width: 100%'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='结束时间' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='endTime'>
              <j-date placeholder='请选择结束时间' v-model='model.endTime' style='width: 100%' />
            <a-form-model-item
              label='结束时间'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='endTime'
            >
              <j-date
                placeholder='请选择结束时间'
                v-model='model.endTime'
                style='width: 100%'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='当前周期分数' :labelCol='labelCol' :wrapperCol='wrapperCol'
                               prop='currentCycleScore'>
              <a-input-number v-model='model.currentCycleScore' placeholder='请输入当前周期分数' style='width: 100%' />
            <a-form-model-item
              label='当前周期分数'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='currentCycleScore'
            >
              <a-input-number
                v-model='model.currentCycleScore'
                placeholder='请输入当前周期分数'
                style='width: 100%'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='设备统一编码' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='equipmentIds'>
              <j-multi-select-tag type='list_multi' v-model='model.equipmentIds' dictCode='mom_eam_equipment,num,id'
                                  placeholder='请选择设备统一编码' />
            <a-form-model-item
              label='设备统一编码'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='equipmentIds'
            >
              <j-multi-select-tag
                type='list_multi'
                v-model='model.equipmentIds'
                dictCode='mom_eam_equipment,num,id'
                placeholder='请选择设备统一编码'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='状态' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='status'>
              <j-dict-select-tag type='list' v-model='model.status' dictCode='certificate_status'
                                 placeholder='请选择状态' disabled />
            <a-form-model-item
              label='状态'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='status'
            >
              <j-dict-select-tag
                type='list'
                v-model='model.status'
                dictCode='certificate_status'
                placeholder='请选择状态'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='24'>
            <a-form-model-item label='备注' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'>
              <a-textarea v-model='model.remark' placeholder='请输入备注'></a-textarea>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-model-item
              label='备注'
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              prop='remark'
            >
              <a-textarea
                v-model='model.remark'
                placeholder='请输入备注'
              ></a-textarea>
            </a-form-model-item>
          </a-col>
        </a-row>
      </a-form-model>
    </j-form-container>
    <!-- å­è¡¨å•区域 -->
    <a-tabs v-model='activeKey' @change='handleChangeTabs'>
      <a-tab-pane tab='操作证管理明细' :key='refKeys[0]' :forceRender='true'>
    <a-tabs
      v-model='activeKey'
      @change='handleChangeTabs'
    >
      <a-tab-pane
        tab='操作证管理明细'
        :key='refKeys[0]'
        :forceRender='true'
      >
        <j-vxe-table
          keep-source
          :ref='refKeys[0]'
@@ -70,6 +174,8 @@
          :rowNumber='true'
          :rowSelection='true'
          :toolbar='true'
          :bordered='true'
          :alwaysEdit='true'
        />
      </a-tab-pane>
    </a-tabs>
@@ -95,11 +201,11 @@
    return {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
        sm: { span: 18 },
      },
      model: {},
      // æ–°å¢žæ—¶å­è¡¨é»˜è®¤æ·»åŠ å‡ è¡Œç©ºæ•°æ®
@@ -126,7 +232,6 @@
            title: '证书ID',
            key: 'operationCertificateId',
            type: JVXETypes.hidden,
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: ''
          },
@@ -134,8 +239,8 @@
            title: '日期',
            key: 'happenDate',
            type: JVXETypes.date,
            width: '120px',
            placeholder: '请输入${title}',
            width: '300px',
            defaultValue: ''
          },
          {
@@ -143,16 +248,17 @@
            key: 'type',
            type: JVXETypes.select,
            dictCode: 'certificate_change_type',
            width: '100px',
            placeholder: '请输入${title}',
            width: '200px',
            defaultValue: ''
          },
          {
            title: '设备统一编码',
            key: 'equipmentId',
            type: JVXETypes.selectSearch,
            dictCode: 'mom_eam_equipment,num,id ',
            width: '200px',
            width: '250px',
            placeholder: '请输入${title}',
            defaultValue: '',
            validateRules: [{ required: true, message: '${title}不能为空' }]
@@ -222,7 +328,7 @@
    editAfter() {
      this.$nextTick(() => {
      })
      console.log( "this.loadSubTableDataMode:"+this.loadSubTableDataMode)
      console.log("this.loadSubTableDataMode:" + this.loadSubTableDataMode)
      // åŠ è½½å­è¡¨æ•°æ®
      if (this.model.id && this.loadSubTableDataMode) {
        let params = { id: this.model.id }
src/views/eam/modules/operationCertificate/OperationCertificateModal.vue
@@ -1,14 +1,20 @@
<template>
  <j-modal
    :title='title'
    :width='1200'
    :width='1400'
    :visible='visible'
    :maskClosable='false'
    switchFullscreen
    @ok='handleOk'
    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
    @cancel='handleCancel'>
    <operation-certificate-form ref='realForm' @ok='submitCallback' :disabled='disableSubmit'  :loadSubTableData='loadSubTableDataFlag' />
    @cancel='handleCancel'
  >
    <operation-certificate-form
      ref='realForm'
      @ok='submitCallback'
      :disabled='disableSubmit'
      :loadSubTableData='loadSubTableDataFlag'
    />
  </j-modal>
</template>
src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue
@@ -2,69 +2,162 @@
  <a-spin :spinning='confirmLoading'>
    <j-form-container :disabled='formDisabled'>
      <!-- ä¸»è¡¨å•区域 -->
      <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'>
      <a-form-model
        ref='form'
        :model='model'
        :rules='validatorRules'
        slot='detail'
      >
        <a-row>
          <a-col :span='12'>
            <a-form-model-item label='申请单编号' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'>
              <a-input v-model='model.num' placeholder="将由系统生成" disabled></a-input>
            <a-form-model-item
              label='申请单编号'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='num'
            >
              <a-input
                v-model='model.num'
                placeholder="将由系统生成"
                disabled
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='类型' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='type'>
              <j-dict-select-tag type='radio' v-model='model.type' dictCode='apply_type' placeholder='请选择类型' />
            <a-form-model-item
              label='类型'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='type'
            >
              <j-dict-select-tag
                type='radio'
                v-model='model.type'
                dictCode='apply_type'
                placeholder='请选择类型'
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='所在单位' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='departId'>
              <j-select-depart v-model='model.departId' :multi='true' />
            <a-form-model-item
              label='所在单位'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='departId'
            >
              <!-- <j-select-depart
                v-model='model.departId'
                :multi='true'
              /> -->
              <j-dict-select-tag
                type='list'
                v-model='model.departId'
                dictCode="sys_depart,depart_name,id"
                placeholder='请选择所在单位'
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='联系电话' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='contactNumber'>
              <a-input v-model='model.contactNumber' placeholder='请输入联系电话'></a-input>
            <a-form-model-item
              label='联系电话'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='contactNumber'
            >
              <a-input
                v-model='model.contactNumber'
                placeholder='请输入联系电话'
              ></a-input>
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='申请人' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='applicant'>
              <j-dict-select-tag type='list' v-model='model.applicant' dictCode='sys_user,realname,id'
                                 placeholder='请选择申请人' disabled />
            <a-form-model-item
              label='申请人'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='applicant'
            >
              <j-dict-select-tag
                type='list'
                v-model='model.applicant'
                dictCode='sys_user,realname,id'
                placeholder='请选择申请人'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='办理人' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='handlePerson'>
              <j-dict-select-tag type='list' v-model='model.handlePerson' dictCode='sys_user,realname,id'
                                 placeholder='请选择办理人'  />
            <a-form-model-item
              label='办理人'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='handlePerson'
            >
              <j-dict-select-tag
                type='list'
                v-model='model.handlePerson'
                dictCode="sys_user,realname,id , del_flag!='1'"
                placeholder='请选择办理人'
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='12'>
            <a-form-model-item label='审核状态' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='auditStatus'>
              <j-dict-select-tag type='list' v-model='model.auditStatus' dictCode='certificate_apply_status'
                                 placeholder='请选择审核状态' disabled />
            <a-form-model-item
              label='审核状态'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='auditStatus'
            >
              <j-dict-select-tag
                type='list'
                v-model='model.auditStatus'
                dictCode='certificate_apply_status'
                placeholder='请选择审核状态'
                disabled
              />
            </a-form-model-item>
          </a-col>
          <a-col :span='24'>
            <a-form-model-item label='备注' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'>
              <a-input v-model='model.remark' placeholder='请输入备注'></a-input>
          <!-- <a-col :span='24'>
            <a-form-model-item
              label='备注'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
              prop='remark'
            >
              <a-input
                v-model='model.remark'
                placeholder='请输入备注'
              ></a-input>
            </a-form-model-item>
          </a-col>
          </a-col> -->
        </a-row>
      </a-form-model>
    </j-form-container>
    <!-- å­è¡¨å•区域 -->
    <a-tabs v-model='activeKey' @change='handleChangeTabs'>
      <a-tab-pane tab='操作证申请明细表' :key='refKeys[0]' :forceRender='true'>
    <a-tabs
      v-model='activeKey'
      @change='handleChangeTabs'
    >
      <a-tab-pane
        tab='操作证申请明细表'
        :key='refKeys[0]'
        :forceRender='true'
      >
        <j-vxe-table
          keep-source
          :ref='refKeys[0]'
          :bordered='true'
          :alwaysEdit='true'
          :loading='operationCertificateApplyDetailTable.loading'
          :columns='operationCertificateApplyDetailTable.columns'
          :dataSource='operationCertificateApplyDetailTable.dataSource'
          :maxHeight='300'
          :maxHeight='600'
          :disabled='formDisabled'
          :rowNumber='true'
          rowNumber='2'
          :rowSelection='true'
          :toolbar='true'
        />
        <!-- :toolbarConfig='toolbarConfig' -->
      </a-tab-pane>
    </a-tabs>
  </a-spin>
@@ -72,7 +165,7 @@
<script>
import { getAction,httpAction } from '@/api/manage'
import { getAction, httpAction } from '@/api/manage'
import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
import { JVXETypes } from '@/components/jeecg/JVxeTable'
import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js'
@@ -117,6 +210,7 @@
      // æ“ä½œè¯ç”³è¯·æ˜Žç»†è¡¨
      operationCertificateApplyDetailTable: {
        loading: false,
        bordered: true,
        dataSource: [],
        columns: [
          {
@@ -143,12 +237,13 @@
            title: '设备统一编码',
            key: 'equipmentIds',
            type: JVXETypes.selectMultiple,
            dictCode: 'mom_eam_equipment,num,id ',
            width: '200px',
            width: '270px',
            placeholder: '请输入${title}',
            defaultValue: '',
            dictCode: 'mom_eam_equipment,num,id, del_flag!=\'1\'',
            validateRules: [{ required: true, message: '${title}不能为空' }]
          },
          // dictCode: 'mom_eam_equipment,num,id',
          {
            title: '上岗证号',
            key: 'appointmentCardNum',
@@ -181,7 +276,7 @@
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: '',
            disabled:'achievementDisabled'
            disabled: 'achievementDisabled'
          },
          {
            title: '实操成绩',
@@ -190,17 +285,17 @@
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: '',
            disabled:'achievementDisabled'
            disabled: 'achievementDisabled'
          },
          {
            title: '考试结论',
            key: 'examinationConclusion',
            type: JVXETypes.select,
            dictCode:'examination_conclusion',
            dictCode: 'examination_conclusion',
            width: '200px',
            placeholder: '请输入${title}',
            defaultValue: '',
            disabled:'achievementDisabled'
            disabled: 'achievementDisabled'
          },
          // {
          //   title: '状态',
@@ -215,7 +310,7 @@
      url: {
        add: '/eam/operationCertificateApply/add',
        edit: '/eam/operationCertificateApply/edit',
        addOperationCertificate:'/eam/operationCertificate/addOperationCertificate',
        addOperationCertificate: '/eam/operationCertificate/addOperationCertificate',
        queryById: '/eam/operationCertificateApply/queryById',
        operationCertificateApplyDetail: {
          list: '/eam/operationCertificateApply/queryOperationCertificateApplyDetailByMainId'
@@ -264,12 +359,12 @@
      if (this.model.id) {
        let params = { id: this.model.id }
        this.requestSubTableData(this.url.operationCertificateApplyDetail.list, params, this.operationCertificateApplyDetailTable)
      }else{
      } else {
        getAction(this.url.getNum, { type: 'OperationCertificateApply', length: '4' }).then((res) => {
            if (res.success) {
              this.model.num = res.message
            }
          })
          if (res.success) {
            this.model.num = res.message
          }
        })
      }
    },
    //校验所有一对一子表表单
@@ -305,19 +400,19 @@
        method = 'put'
      }
      this.confirmLoading = true
      console.log("formData===>",formData);
      console.log("formData===>", formData);
      httpAction(url, formData, method).then((res) => {
        if (res.success) {
          if(this.achievementDisabled){
          if (this.achievementDisabled) {
            httpAction(this.url.addOperationCertificate, formData.operationCertificateApplyDetailList, 'post').then((res) => {
              if (res.success) {
                this.$message.success(res.message)
              }else {
                // this.$message.success(res.message)
              } else {
                this.$message.warning(res.message)
              }
            })
          }
          this.$message.success(res.message)
          // this.$message.success(res.message)
          this.$emit('ok')
          this.close()
        } else {
src/views/eam/modules/repairStandard/RepairStandardCategoryLeft.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,449 @@
<template>
  <a-card
    :loading="cardLoading"
    :bordered="false"
    title="维修标准分类"
    style="height: 100%;"
  >
    <a-spin :spinning="loading">
      <a-alert
        type="info"
        :showIcon="true"
        style="margin-right: 54px;"
      >
        <div slot="message">
          å½“前:<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span>
          <a
            v-if="this.currSelected.title"
            style="margin-left: 10px"
            @click="onClearSelected"
          >取消</a>
        </div>
      </a-alert>
      <div class="drawer-bootom-button">
        <a-dropdown
          :trigger="['click']"
          placement="bottomCenter"
        >
          <a-menu slot="overlay">
            <a-menu-item
              key="1"
              @click="expandAll"
            >展开所有</a-menu-item>
            <a-menu-item
              key="2"
              @click="closeAll"
            >合并所有</a-menu-item>
            <a-menu-item
              key="3"
              @click="refreshTree"
            >刷新</a-menu-item>
          </a-menu>
          <a-button>
            <a-icon type="bars" />
          </a-button>
        </a-dropdown>
      </div>
      <a-input-search
        @search="handleSearch"
        style="width:100%;margin-top: 10px"
        placeholder="检索 ç»´ä¿®æ ‡å‡†ç¼–号/名称"
        allowClear
        v-model="searchInput"
        @change="handleChange"
      />
      <!-- showLine -->
      <a-tree
        showLine
        ref="tree"
        :checkStrictly="checkStrictly"
        :expandedKeys.sync="expandedKeys"
        :selectedKeys="selectedKeys"
        :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
        :treeData="treeDataSource"
        :autoExpandParent="autoExpandParent"
        @select="onSelect"
        @expand="onExpand"
        slots="{}"
      >
        <template
          slot="title"
          slot-scope="{ title, parentId, entity, key}"
        >
          <span v-if="title.indexOf(searchValue) > -1">
            {{ title.substr(0, title.indexOf(searchValue)) }}
            <span class="replaceSearch">{{ searchValue }}</span>
            {{ title.substr(title.indexOf(searchValue) + searchValue.length) }}
          </span>
          <span v-else>{{ title }}</span>
          <a-dropdown
            v-if="entity"
            :trigger="['click']"
            placement="bottomCenter"
          >
            <a-menu slot="overlay">
              <a-menu-item v-if="key!=-1">
                <a
                  href="javascript:;"
                  @click="handleEdit(entity)"
                >编辑</a>
              </a-menu-item>
              <a-menu-item>
                <a
                  href="javascript:;"
                  @click="handleAdd(entity)"
                >
                  æ·»åŠ 
                  <span v-if="key!=-1">
                    å­
                  </span>
                  ç±»åˆ«
                </a>
              </a-menu-item>
              <a-menu-item v-if="key!=-1">
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(entity.id)"
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
              <!-- <a-menu-item v-if="entity.status==1 && key!=-1">
                <a-popconfirm
                  title="确定禁用吗?"
                  @confirm="() => handleActive(entity.id)"
                >
                  <a>禁用</a>
                </a-popconfirm>
              </a-menu-item>
              <a-menu-item v-if="entity.status==0">
                <a-popconfirm
                  title="确定启用吗?"
                  @confirm="() => handleActive(entity.id)"
                >
                  <a>启用</a>
                </a-popconfirm>
              </a-menu-item> -->
            </a-menu>
            <span :style="{position: 'absolute',right: 0}">
              <a-icon type="down" />
            </span>
          </a-dropdown>
        </template>
      </a-tree>
    </a-spin>
    <repair-standard-category-model
      ref="modalForm"
      @ok="modalFormOk"
      :nodeSelected="currSelected"
    ></repair-standard-category-model>
  </a-card>
</template>
<script>
import { getAction, postAction, deleteAction, requestPut } from '@/api/manage'
import RepairStandardCategoryModel from './RepairStandardCategoryModel'
import Tooltip from 'ant-design-vue/es/tooltip'
export default {
  name: 'RepairStandardCategoryLeft',
  props: ['value'],
  components: {
    RepairStandardCategoryModel,
    Tooltip,
  },
  data() {
    return {
      searchInput: '',
      cardLoading: false,
      loading: false,
      treeDataSource: [],
      selectedKeys: [],
      expandedKeys: [],
      url: {
        loadRepairStandardCategoryTree: '/eam/repairStandardCategory/loadTree',
        delete: '/eam/repairStandardCategory/delete',
        list: '/eam/repairStandardCategory/list'
      },
      searchValue: '',
      dataList: [],
      autoExpandParent: true,
      checkStrictly: true,
      allTreeKeys: [],
      currSelected: {},
      hiding: false,
    }
  },
  created() {
    this.queryTreeData();
    this.closeAll();
  },
  methods: {
    getCurrSelectedTitle() {
      return !this.currSelected.title ? '' : this.currSelected.title;
    },
    onClearSelected() {
      this.hiding = true;
      this.currSelected = {};
      this.selectedKeys = [];
    },
    onSelect(selectedKeys, e) {
      this.hiding = false;
      let record = e.node.dataRef;
      this.currSelected = Object.assign({}, record);
      this.selectedKeys = [record.key];
      this.$emit('clickTreeNode', this.currSelected);
    },
    onExpand(expandedKeys) {
      this.expandedKeys = expandedKeys;
      this.autoExpandParent = false;
    },
    queryTreeData() {
      this.loading = true;
      this.cardLoading = true;
      getAction(this.url.loadRepairStandardCategoryTree).then((res) => {
        if (res.success) {
          this.dataList = [];
          this.allTreeKeys = [];
          this.currSelected = {};
          this.treeDataSource = res.result;
          this.generateList(res.result);
        } else {
          this.$message.warn(res.message);
        }
      }).finally(() => {
        this.loading = false;
        this.cardLoading = false;
      })
    },
    handleChange() {
      let search = this.searchInput;
      let expandedKeys = this.dataList
        .map(item => {
          if (item.title.indexOf(search) > -1) {
            return this.getParentKey(item.key, this.treeDataSource);
          }
          return null;
        })
        .filter((item, i, self) => item && self.indexOf(item) === i);
      Object.assign(this, {
        expandedKeys,
        searchValue: search,
        autoExpandParent: true,
      });
    },
    handleSearch(value) {
      let search = value;
      let expandedKeys = this.dataList
        .map(item => {
          if (item.title.indexOf(search) > -1) {
            return this.getParentKey(item.key, this.treeDataSource);
          }
          return null;
        })
        .filter((item, i, self) => item && self.indexOf(item) === i);
      Object.assign(this, {
        expandedKeys,
        searchValue: search,
        autoExpandParent: true,
      });
    },
    getParentKey(key, tree) {
      let parentKey;
      for (let i = 0; i < tree.length; i++) {
        const node = tree[i];
        if (node.children) {
          if (node.children.some(item => item.key === key)) {
            parentKey = node.key;
          } else if (
            this.getParentKey(key, node.children)) {
            parentKey = this.getParentKey(key, node.children);
          }
        }
      }
      return parentKey;
    },
    generateList(data) {
      for (let i = 0; i < data.length; i++) {
        const node = data[i];
        const key = node.key;
        const title = node.title;
        this.dataList.push({ key, title: title });
        this.allTreeKeys.push(key);
        if (node.children) {
          this.generateList(node.children);
        }
      }
    },
    expandAll() {
      this.expandedKeys = this.allTreeKeys;
    },
    closeAll() {
      this.expandedKeys = ['-1'];
    },
    refreshTree() {
      this.queryTreeData();
    },
    handleAdd(entity) {
      if (entity.id) {
        this.$refs.modalForm.add(entity.id);
      } else {
        this.$refs.modalForm.add('-1');
      }
      this.$refs.modalForm.title = "新增维修标准分类";
      this.$refs.modalForm.disableSubmit = false;
    },
    handleEdit(entity) {
      this.$refs.modalForm.edit(entity);
      this.$refs.modalForm.title = "编辑维修标准分类";
      this.$refs.modalForm.disableSubmit = false;
    },
    handleDelete(id) {
      let that = this;
      getAction(that.url.list, { parentId: id }).then((res) => {
        if (res.success) {
          if (res.result.records.length == 0) {
            deleteAction(that.url.delete, { id: id }).then((res) => {
              if (res.success) {
                that.$message.success(res.message);
                that.currSelected.title = '';
                that.queryTreeData();
              } else {
                that.$message.warning("当前维修标准分类被" + res.message + "条维修标准引用,无法执行删除操作!");
              }
            });
          } else {
            that.$message.warning("当前维修标准分类有" + res.result.records.length + "条子类别信息,无法执行删除操作!");
          }
        } else {
          that.$message.warning("系统错误!");
        }
      })
    },
    handleActive(id) {
      if (!this.url.active) {
        this.$message.error('请设置url.active属性!')
        return;
      }
      let that = this;
      requestPut(that.url.active, {}, { id: id }).then((res) => {
        if (res.success) {
          that.$message.success(res.message);
          that.queryTreeData();
        } else {
          that.$message.warning(res.message);
        }
      })
    },
    modalFormOk(val) {
      // æ–°å¢ž/修改 æˆåŠŸæ—¶ï¼Œé‡è½½åˆ—è¡¨
      this.queryTreeData();
    },
  },
  //监听
  watch: {
    // currSelected(val) {//监听currSelected å˜åŒ–,将变化后的数值传递给 getCurrSelected äº‹ä»¶
    //   this.$bus.$emit('getCurrSelected', val)
    // },
  },
  mounted() {
  }
}
</script>
<style>
.replaceSearch {
  color: #00090f;
  font-weight: bold;
  background-color: rgb(204, 204, 204);
}
/* .ant-select-disabled {
  color: rgba(241, 16, 16, 0.25);
}
.ant-select-disabled .ant-select-selection {
  background: #a76b6b;
} */
/*隐藏树的默认icon*/
.ant-tree-switcher-noop {
  display: none !important;
}
/*隐藏树的默认竖线*/
.ant-tree.ant-tree-show-line li:not(:last-child):before {
  border-left: 0px;
}
.ant-card-body .table-operator {
  margin: 15px;
}
.anty-form-btn {
  width: 100%;
  text-align: center;
}
.anty-form-btn button {
  margin: 0 5px;
}
.anty-node-layout .ant-layout-header {
  padding-right: 0;
}
.header {
  padding: 0 8px;
}
.header button {
  margin: 0 3px;
}
.ant-modal-cust-warp {
  height: 100%;
}
.ant-modal-cust-warp .ant-modal-body {
  height: calc(100% - 110px) !important;
  overflow-y: auto;
}
.ant-modal-cust-warp .ant-modal-content {
  height: 90% !important;
  overflow-y: hidden;
}
/** Button按钮间距 */
.ant-btn {
  margin-left: 3px;
}
.ant-alert {
  padding: 5px 15px 5px 37px;
}
.drawer-bootom-button {
  position: absolute;
  top: 1px;
  /* padding: 10px 16px; */
  text-align: left;
  right: 0;
  background: #fff;
  border-radius: 0 0 2px 2px;
}
</style>
src/views/eam/modules/repairStandard/RepairStandardCategoryModel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,316 @@
<template>
  <a-modal
    :title="title"
    :width="950"
    :visible="visible"
    :maskClosable="false"
    :confirmLoading="confirmLoading"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="上级类别:"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-tree-select
                tree-default-expand-all
                :disabled="true"
                show-search
                allow-clear
                :dropdown-style="{ maxHeight: '500px', overflow: 'auto' }"
                :tree-data="repairStandardCategoryTree"
                placeholder="请选择上级类别"
                treeNodeFilterProp="title"
                v-decorator="[ 'parentId', validatorRules.parentId]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :lg="12">
            <a-form-item
              label="维修标准编号:"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                placeholder="请输入维修标准编号"
                v-decorator="['num', validatorRules.num ]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item
              label="维修标准名称:"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                placeholder="请输入维修标准名称"
                v-decorator="['name', validatorRules.name ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              label="备注:"
            >
              <a-textarea
                placeholder="请输入备注"
                allow-clear
                v-decorator="['remark', validatorRules.remark]"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
    <template slot="footer">
      <a-button
        :style="{marginRight: '8px'}"
        @click="handleCancel"
      >
        å…³é—­
      </a-button>
      <a-button
        :disabled="confirmLoading"
        :loading="confirmLoading"
        @click="handleOk"
        type="primary"
      >确定</a-button>
    </template>
  </a-modal>
</template>
<script>
import pick from 'lodash.pick'
import { getAction, postAction, requestPut } from '@/api/manage'
import { duplicateCheck } from '@/api/api'
export default {
  name: 'ProcessParametersCategoryModel',
  props: {
    nodeSelected: {
      type: Object,
      default: {}
    }
  },
  data() {
    return {
      title: "操作",
      visible: false,
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        parentId: {
          rules: [
            { required: true, message: '请输入上级类别!' },
          ]
        },
        num: {
          rules: [
            { required: true, message: '请输入分类编号!' },
            { min: 0, max: 30, message: '长度不超过 30 ä¸ªå­—符', trigger: 'blur' },
            // { validator: this.validateNum },
          ]
        },
        name: {
          rules: [
            { required: true, message: '请输入分类名称!' },
            { min: 0, max: 30, message: '长度不超过 30 ä¸ªå­—符', trigger: 'blur' },
            // { validator: this.validateName },
          ]
        },
        description: {
          rules: [
            { min: 0, max: 100, message: '长度不超过 100 ä¸ªå­—符', trigger: 'blur' }
          ]
        }
      },
      url: {
        add: "/eam/repairStandardCategory/add",
        edit: "/eam/repairStandardCategory/edit",
        loadRepairStandardCategoryTree: '/eam/repairStandardCategory/loadTree',
        getNum: '/eam/sysIdentity/getNumNew',
      },
      repairStandardCategoryTree: [],
    }
  },
  created() {
  },
  methods: {
    loadRepairStandardCategoryTree() {
      this.loading = true;
      this.cardLoading = true;
      getAction(this.url.loadRepairStandardCategoryTree, {}).then((res) => {
        if (res.success) {
          let array = res.result;
          this.repairStandardCategoryTree = array;
        } else {
          this.$message.warn(res.message);
        }
      }).finally(() => {
        this.loading = false;
        this.cardLoading = false;
      })
    },
    add(parentId) {
      this.edit({ 'parentId': parentId });
    },
    edit(record) {
      console.log("record==", record)
      this.loadRepairStandardCategoryTree();
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.visible = true;
      this.$nextTick(() => {
        this.form.setFieldsValue(pick(this.model, 'parentId', 'num', 'name', 'remark'));
      });
      // if (!record.id) {
      //   this.$nextTick(() => {
      //     getAction(this.url.getNum, { type: 'ProcessParametersCategory', length: '4' }).then((res) => {
      //       if (res.success) {
      //         this.form.setFieldsValue({ num: res.message });
      //       }
      //     })
      //   });
      // }
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      that.form.validateFields((err, values) => {
        if (!err) {
          let formData = Object.assign(this.model, values);
          if (formData.parentId == formData.id) {
            that.$message.warning("请不要选择当前操作数据为上级类别!");
          } else {
            that.confirmLoading = true;
            let obj;
            if (!that.model.id) {
              obj = postAction(that.url.add, formData);
            } else {
              obj = requestPut(that.url.edit, formData, { id: that.model.id });
            }
            obj.then((res) => {
              if (res.success) {
                that.$message.success(res.message);
                that.$emit('ok', new Date());
              } else {
                that.$message.warning(res.message);
              }
            }).finally(() => {
              that.confirmLoading = false;
              that.close();
            })
          }
        }
      })
    },
    handleCancel() {
      this.close();
    },
    close() {
      this.$emit('close');
      this.visible = false;
    },
    //验证 ç¼–号
    validateNum(rule, value, callback) {
      var params = {
        tableName: 'mom_eam_process_parameters_category',
        fieldName: 'num',
        fieldVal: value,
        dataId: this.model.id,
        //数据库中存在字段del_flag并使用该字段作为未删除策略,真删除:false å‡åˆ é™¤ï¼štrue
        delFlag: '0',
      };
      duplicateCheck(params).then((res) => {
        if (res.success) {
          callback();
        } else {
          callback("工艺参数分类编号已存在!");
        }
      })
    },
    //验证 åç§°
    validateName(rule, value, callback) {
      var params = {
        tableName: 'mom_eam_process_parameters_category',
        fieldName: 'name',
        fieldVal: value,
        dataId: this.model.id,
        //数据库中存在字段del_flag并使用该字段作为未删除策略,真删除:false å‡åˆ é™¤ï¼štrue
        delFlag: '0',
      };
      duplicateCheck(params).then((res) => {
        if (res.success) {
          callback();
        } else {
          callback("工艺参数分类名称已存在!");
        }
      })
    },
  }
}
</script>
<style scoped>
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
</style>
src/views/eam/modules/repairStandard/RepairStandardModel.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,322 @@
<template>
  <a-modal
    :title="title"
    :width="1050"
    :visible="visible"
    :maskClosable="false"
    :confirmLoading="confirmLoading"
    :okButtonProps="{ props: {disabled: disableSubmit} }"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="维修标准分类"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入上级维修标准编号'"
                v-decorator="['repairStandardCategoryNumName', validatorRules.repairStandardCategoryNumName ]"
              />
            </a-form-item>
          </a-col>
          <!-- <a-col :span="12">
            <a-form-item
              label="计量单位"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请选择计量单位'"
                :triggerChange="true"
                dictCode="mom_base_unit,name,id,status!='0' and del_flag!='1'"
                v-decorator="['unitId', validatorRules.unitId]"
              />
            </a-form-item>
          </a-col> -->
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="维修标准编号"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请输入维修标准编码!'"
                v-decorator="['num', validatorRules.num ]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item
              label="维修标准名称"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请输入维修标准名称'"
                v-decorator="['name', validatorRules.name ]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
              label="备注"
            >
              <a-textarea
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请输入备注'"
                v-decorator="['remark', validatorRules.remark]"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
    <template slot="footer">
      <a-button
        :style="{marginRight: '8px'}"
        @click="handleCancel"
      >
        å…³é—­
      </a-button>
      <!--      <a-button
        v-if="!this.model.id"
        :disabled="disableSubmit || confirmLoading"
        :loading="confirmLoading"
        @click="handleOk"
        type="primary"
      >保存并继续新增</a-button>-->
      <a-button
        :disabled="disableSubmit || confirmLoading"
        :loading="confirmLoading"
        @click="handleOk"
        type="primary"
      >确定</a-button>
      <!-- icon="save" -->
    </template>
  </a-modal>
</template>
<script>
import pick from 'lodash.pick'
import { getAction, postAction, requestPut } from '@/api/manage'
import { duplicateCheck } from '@/api/api'
export default {
  name: 'RepairStandardModel',
  data() {
    return {
      title: "操作",
      visible: false,
      codeDisable: true,
      disableSubmit: false,
      repairStandardCategoryId: '',
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        num: {
          rules: [
            { required: true, message: '请输入维修标准编号!' },
            // { min: 2, max: 30, message: '长度在 2 åˆ° 30 ä¸ªå­—符', trigger: 'blur' },
            // { validator: this.validateNum },
          ]
        },
        name: {
          rules: [
            { required: true, message: '请输入维修标准名称!' },
            // { min: 2, max: 30, message: '长度在 2 åˆ° 30 ä¸ªå­—符', trigger: 'blur' },
            // { validator: this.validateName },
          ]
        },
        // unitId: {
        //   rules: [
        //     { required: true, message: '请选择计量单位!' },
        //   ]
        // },
        remark: {
          rules: [
            { min: 0, max: 100, message: '长度不超过 100 ä¸ªå­—符', trigger: 'blur' },
          ]
        }
      },
      url: {
        add: "/eam/repairStandard/add",
        edit: "/eam/repairStandard/edit",
        getNum: '/eam/sysIdentity/getNumNew',
      },
      //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性
      alterFlag: ""
    }
  },
  created() {
  },
  methods: {
    add(record) {
      this.edit(record);
    },
    edit(record) {
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.visible = true;
      this.disableSubmit = false;
      this.$nextTick(() => {
        this.form.setFieldsValue(pick(this.model, 'repairStandardCategoryNumName', 'num', 'name', 'remark'))
      });
      if (record.id) {
        this.codeDisable = true;
      } else {
        this.codeDisable = false;
        this.$nextTick(() => {
          // getAction(this.url.getNum, { type: 'ProcessParameters', length: '4' }).then((res) => {
          //   if (res.success) {
          //     this.form.setFieldsValue({ num: res.message });
          //   }
          // })
        });
      }
    },
    close() {
      this.$emit('close');
      this.visible = false;
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let formData = Object.assign(this.model, values);
          let obj;
          if (!this.model.id) {
            formData.repairStandardCategoryId = this.repairStandardCategoryId
            obj = postAction(this.url.add, formData);
          } else {
            obj = requestPut(this.url.edit, formData, { id: this.model.id });
          }
          obj.then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
              that.alterFlag = new Date();
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        }
      })
    },
    handleCancel() {
      this.close()
    },
    //验证 ç¼–号
    validateNum(rule, value, callback) {
      var params = {
        tableName: 'mom_eam_process_parameters',
        fieldName: 'num',
        fieldVal: value,
        dataId: this.model.id,
        //数据库中存在字段del_flag并使用该字段作为未删除策略,真删除:false å‡åˆ é™¤ï¼štrue
        delFlag: '0',
      };
      duplicateCheck(params).then((res) => {
        if (res.success) {
          callback();
        } else {
          callback("编号已存在!");
        }
      })
    },
    //验证 åç§°
    validateName(rule, value, callback) {
      var params = {
        tableName: 'mom_eam_process_parameters',
        fieldName: 'name',
        fieldVal: value,
        dataId: this.model.id,
        //数据库中存在字段del_flag并使用该字段作为未删除策略,真删除:false å‡åˆ é™¤ï¼štrue
        delFlag: '0',
      };
      duplicateCheck(params).then((res) => {
        if (res.success) {
          callback();
        } else {
          callback("名称已存在!");
        }
      })
    },
  },
  watch: {
    alterFlag() {
      this.$bus.$emit('queryTreeData');
    },
  }
}
</script>
<style scoped>
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
</style>
src/views/eam/modules/repairStandard/RepairStandardRight.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,388 @@
<template>
  <a-card
    :bordered="false"
    title="维修标准"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
          <a-col
            :md="8"
            :sm="8"
          >
            <a-form-item label="维修标准编码">
              <j-input
                placeholder="请输入维修标准编码"
                v-model="queryParam.num"
              ></j-input>
            </a-form-item>
          </a-col>
          <a-col
            :md="8"
            :sm="8"
          >
            <a-form-item label="维修标准名称">
              <j-input
                placeholder="请输入维修标准名称"
                v-model="queryParam.name"
              ></j-input>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- æ“ä½œæŒ‰é’®åŒºåŸŸ -->
    <div
      class="table-operator"
      style="margin-top: 5px"
    >
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        @click="searchReset"
        icon="reload"
      >重置</a-button>
      <a-button
        @click="handleAdd"
        type="primary"
        icon="plus"
        :hidden="disabled"
      >新增</a-button>
      <a-button
        type="primary"
        icon="download"
        @click="handleExportXls('原因')"
      >导出</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-button style="margin-left: 8px">
          æ‰¹é‡æ“ä½œ
          <a-icon type="down" />
        </a-button>
        <a-menu slot="overlay">
          <a-menu-item @click="batchDel">
            <a-icon type="delete" />删除
          </a-menu-item>
        </a-menu>
      </a-dropdown>
    </div>
    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        bordered
        size="middle"
        rowKey="id"
        :columns="columns"
        :rowClassName="tableRowClass"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        @change="handleTableChange"
        :scroll="{ x: true}"
      >
        <!--字符串超长截取省略号显示-->
        <span
          slot="num"
          slot-scope="text"
          style="font-weight: bold"
        >
          <j-ellipsis
            :value="text"
            :length="15"
          />
        </span>
        <span
          slot="name"
          slot-scope="text"
          style="font-weight: bold"
        >
          <j-ellipsis
            :value="text"
            :length="15"
          />
        </span>
        <span
          slot="model"
          slot-scope="text"
        >
          <j-ellipsis
            :value="text"
            :length="15"
          />
        </span>
        <!-- <span
          slot="status"
          slot-scope="text,record"
        >
          <a-badge
            v-if="record.status==1"
            status="success"
          />
          <span
            v-if="record.status==1"
            class="success"
          >启用</span>
          <a-badge
            v-if="record.status==0"
            status="error"
          />
          <span
            v-if="record.status==0"
            class="error"
          >禁用</span>
        </span> -->
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a @click="handleEdit(record)">编辑</a>
          <a-divider type="vertical" />
          <a-dropdown>
            <a class="ant-dropdown-link">
              æ›´å¤š
              <a-icon type="down" />
            </a>
            <a-menu slot="overlay">
              <a-menu-item>
                <a
                  href="javascript:;"
                  @click="handleDetail(record)"
                >详情</a>
              </a-menu-item>
              <a-menu-item>
                <a-popconfirm
                  title="确定删除吗?"
                  @confirm="() => handleDelete(record.id)"
                >
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>
              <!-- <a-menu-item v-else>
              <a-popconfirm title="当前信息已被引用,请先删除关联信息后再执行删除操作">
                <a class="frozenRowClass">删除</a>
              </a-popconfirm>
            </a-menu-item> -->
              <!-- <a-menu-item v-if="record.status==1">
              <a-popconfirm
                title="确定禁用吗?"
                @confirm="() => handleActive(record.id)"
              >
                <a>禁用</a>
              </a-popconfirm>
            </a-menu-item> -->
              <!-- <a-menu-item v-if="record.status==0">
              <a-popconfirm
                title="确定启用吗?"
                @confirm="() => handleActive(record.id)"
              >
                <a>启用</a>
              </a-popconfirm>
            </a-menu-item> -->
            </a-menu>
          </a-dropdown>
        </span>
      </a-table>
    </div>
    <!-- table区域-end -->
    <repair-standard-model
      ref="modalForm"
      @ok="modalFormOk"
      :nodeSelected="nodeSelected"
    ></repair-standard-model>
  </a-card>
</template>
<script>
import JDictSelectTag from '@/components/dict/JDictSelectTag'
import { requestPut } from '@/api/manage'
import RepairStandardModel from './RepairStandardModel'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JInput from '@/components/jeecg/JInput'
import JEllipsis from "@/components/jeecg/JEllipsis";
import Tooltip from 'ant-design-vue/es/tooltip'
export default {
  name: 'ProcessParametersRight',
  mixins: [JeecgListMixin],
  components: {
    Tooltip,
    RepairStandardModel,
    JDictSelectTag,
    JInput,
    JEllipsis,
  },
  props: {
    recordSelect: {},
  },
  data() {
    return {
      disabled: true,
      nodeSelected: {},
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
          width: 50,
        },
        {
          title: '维修标准编码',
          align: 'center',
          dataIndex: 'num',
          scopedSlots: {
            customRender: 'num'
          },
          // sorter: true,
        },
        {
          title: '维修标准名称',
          align: 'center',
          dataIndex: 'name',
          scopedSlots: {
            customRender: 'name'
          },
          // sorter: true,
        },
        {
          title: '维修标准分类',
          align: 'center',
          dataIndex: 'repairStandardCategoryNumName',
          scopedSlots: {
            customRender: 'repairStandardCategoryNumName'
          },
          // sorter: true,
        },
        // {
        //   title: '计量单位',
        //   align: 'center',
        //   dataIndex: 'unitId_dictText',
        //   scopedSlots: {
        //     customRender: 'unitId_dictText'
        //   },
        //   // sorter: true,
        // },
        {
          title: '创建人',
          align: "center",
          dataIndex: 'createBy',
        },
        {
          title: '创建时间',
          align: "center",
          dataIndex: 'createTime',
        },
        // {
        //   title: '修改人',
        //   align: "center",
        //   dataIndex: 'updateBy',
        // },
        // {
        //   title: '修改时间',
        //   align: "center",
        //   dataIndex: 'updateTime',
        // },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          scopedSlots: {
            customRender: 'action'
          },
          width: 150,
          fixed: 'right',
        },
      ],
      url: {
        list: '/eam/repairStandard/list',
        delete: "/eam/repairStandard/delete",
        deleteBatch: "/eam/repairStandard/deleteBatch",
        exportXlsUrl: "/eam/repairStandard/exportXls",
        importExcelUrl: "eam/repairStandard/importExcel",
      },
    }
  },
  methods: {
    handleAdd: function () {
      this.$refs.modalForm.add({ repairStandardCategoryNumName: this.repairStandardCategoryNumName });
      this.$refs.modalForm.title = "新增";
      this.$refs.modalForm.disableSubmit = false;
      this.$refs.modalForm.repairStandardCategoryId = this.nodeSelected.key;
    },
    //禁用状态样式
    tableRowClass(record, index) {
      // if (record.status != "1") {
      //   return "frozenRowClass";
      // }
      return "";
    },
    searchReset() {
      if ('-1' != this.nodeSelected.key) {
        this.disabled = false;
        this.queryParam = [];
        this.queryParam.repairStandardCategoryId = this.nodeSelected.key;
      } else {
        this.disabled = true;
        this.queryParam = [];
      }
      this.loadData(1);
    },
  },
  watch: {
    recordSelect(val) {
      this.nodeSelected = val;
      this.repairStandardCategoryNumName = this.nodeSelected.rfield1 + "/" + this.nodeSelected.rfield2;
      if ('-1' != this.nodeSelected.key) {
        this.disabled = false;
        this.queryParam = [];
        this.queryParam.repairStandardCategoryId = this.nodeSelected.key;
      } else {
        this.disabled = true;
        this.queryParam = [];
      }
      this.loadData(1);
    }
  },
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
/deep/ .frozenRowClass {
  color: #c9c9c9;
}
/deep/ .success {
  color: green;
}
/deep/ .error {
  color: red;
}
/deep/ .notShow {
  display: none;
}
.fontweight {
  font-weight: bold;
}
</style>
src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue
@@ -35,15 +35,25 @@
          <!--          <a-switch @change='(e)=>onChange(e, record.key, col, index)' :value='text' :disabled="repairOrderStatus=='4'"-->
          <!--                    v-if="col.dataIndex == 'principalContractor'" />-->
          <a-select default-value='0' :value='text' :disabled="repairOrderStatus=='4'"
                    v-if="col.dataIndex == 'principalContractor'"
                    style="width: 100%;"
                    @change='(e)=>handleChange(e, record.key, col, index)'>
          <a-select
            default-value='0'
            :value='text'
            :disabled="repairOrderStatus=='4'"
            v-if="col.dataIndex == 'principalContractor'"
            style="width: 100%;"
            @change='(e)=>handleChange(e, record.key, col, index)'
          >
            <a-select-opt-group>
              <a-select-option value='1' style="width: 100%;">
              <a-select-option
                value='1'
                style="width: 100%;"
              >
                æ˜¯
              </a-select-option>
              <a-select-option value='0' style="width: 100%;">
              <a-select-option
                value='0'
                style="width: 100%;"
              >
                å¦
              </a-select-option>
            </a-select-opt-group>
@@ -61,14 +71,16 @@
            :value='text'
            format='YYYY-MM-DD HH:mm'
            :show-time="{ defaultValue: moment('00:00', 'HH:mm') }"
            v-if="col.dataIndex == 'startTime'" @change='(e)=>handleChange(e, record.key, col, index)'
            v-if="col.dataIndex == 'startTime'"
            @change='(e)=>handleChange(e, record.key, col, index)'
          />
          <!--          :disabled="repairOrderStatus=='4'"-->
          <a-date-picker
            :value='text'
            format='YYYY-MM-DD HH:mm'
            :show-time="{ defaultValue: moment('00:00', 'HH:mm') }"
            v-if="col.dataIndex == 'endTime'" @change='(e)=>handleChange(e, record.key, col, index)'
            v-if="col.dataIndex == 'endTime'"
            @change='(e)=>handleChange(e, record.key, col, index)'
          />
          <!--          <a-input-number-->
@@ -225,7 +237,7 @@
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function(t, r, index) {
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
@@ -297,7 +309,7 @@
    repairOrderId: {
      immediate: true,
      handler(val) {
        if(this.repairOrderId){
        if (this.repairOrderId) {
          this.clearList()
          this.queryParam['repairOrderId'] = val
          this.loadData(1)
@@ -310,7 +322,7 @@
    onChange(checked) {
      console.log(`a-switch to ${checked}`)
    },
//时间选择修改
    //时间选择修改
    onStartTimeChange() {
      console.log()
@@ -395,26 +407,26 @@
        }
        if ('principalContractor' == column.dataIndex) {
          target['principalContractor'] = value
          if(value==='1'){
            for(var i = 0;i<temp.length;i++){
                if(i!==index){
                  temp[i]['principalContractor']='0';
                }
          if (value === '1') {
            for (var i = 0; i < temp.length; i++) {
              if (i !== index) {
                temp[i]['principalContractor'] = '0';
              }
            }
          }
        }
        if ('actualHour' == column.dataIndex) {
          if(target['theoreticalTime']!==null&&target['theoreticalTime']<value){
          if (target['theoreticalTime'] !== null && target['theoreticalTime'] < value) {
            that.$message.error('请检查第' + (index + 1) + '行实际工时不能小于理论工时,请重新填写')
            target['actualHour']=null;
          }else if(target['theoreticalTime']===null||target['theoreticalTime']===undefined){
            target['actualHour'] = null;
          } else if (target['theoreticalTime'] === null || target['theoreticalTime'] === undefined) {
            that.$message.error('请检查第' + (index + 1) + '请先填写开始时间与结束时间')
            target['actualHour']=null;
          }else{
            target['actualHour'] = null;
          } else {
            target['actualHour'] = value
          }
        }
        // if ('theoreticalTime' == column.dataIndex) {
        //   target['theoreticalTime'] = value
@@ -423,28 +435,28 @@
          if (target['endTime'] == null) {
            target['startTime'] = value
          } else  {
          } else {
            const diffInHours = this.getTimeDiff(value, target['endTime'])
            if (diffInHours < 0) {
              target['startTime'] = ''
              target['theoreticalTime'] = ''
              that.$message.error('开始时间不能小于结束时间,请重新选择')
            } else {
              if(target['actualHour']!==null){
                  if(diffInHours<target['actualHour']){
                    target['startTime'] = ''
                    target['theoreticalTime'] = ''
                    that.$message.error('实际工时不能小于理论工时,请重新填写')
                  }else{
                    target['startTime'] = value
                    target['theoreticalTime'] = diffInHours
                  }
              }else{
              if (target['actualHour'] !== null) {
                if (diffInHours < target['actualHour']) {
                  target['startTime'] = ''
                  target['theoreticalTime'] = ''
                  that.$message.error('实际工时不能小于理论工时,请重新填写')
                } else {
                  target['startTime'] = value
                  target['theoreticalTime'] = diffInHours
                }
              } else {
                target['startTime'] = value
                target['theoreticalTime'] = diffInHours
              }
            }
          }
          }
        }
        if ('endTime' == column.dataIndex) {
@@ -457,16 +469,16 @@
              target['theoreticalTime'] = ''
              that.$message.error('开始时间不能小于结束时间,请重新选择')
            } else {
              if(target['actualHour']!==null){
                  if(diffInHours<target['actualHour']){
                    target['endTime'] = ''
                    target['theoreticalTime'] = ''
                    that.$message.error('实际工时不能小于理论工时,请重新填写')
                  }else{
                    target['endTime'] = value
                    target['theoreticalTime'] = diffInHours
                  }
              }else{
              if (target['actualHour'] !== null) {
                if (diffInHours < target['actualHour']) {
                  target['endTime'] = ''
                  target['theoreticalTime'] = ''
                  that.$message.error('实际工时不能小于理论工时,请重新填写')
                } else {
                  target['endTime'] = value
                  target['theoreticalTime'] = diffInHours
                }
              } else {
                target['endTime'] = value
                target['theoreticalTime'] = diffInHours
              }
src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue
@@ -20,28 +20,29 @@
      >
        <div :key="col.dataIndex">
          <a-input
               :value="text"
               v-if="col.dataIndex == 'sparePartId'"
               auto-size
               placeholder="请输入物料名称"
               @change="(e)=>handleChange(e, record.key, col, index)"
               :disabled="record.disabled"
            :value="text"
            v-if="col.dataIndex == 'sparePartId'"
            auto-size
            placeholder="请输入物料名称"
            @change="(e)=>handleChange(e, record.key, col, index)"
            :disabled="record.disabled"
          />
          <a-input
               :value="text"
               v-if="col.dataIndex == 'repairOrderAmUda1'"
               auto-size
               placeholder="请输入单位"
               @change="(e)=>handleChange(e, record.key, col, index)"
               :disabled="record.disabled"
            :value="text"
            v-if="col.dataIndex == 'repairOrderAmUda1'"
            auto-size
            placeholder="请输入单位"
            @change="(e)=>handleChange(e, record.key, col, index)"
            :disabled="record.disabled"
          />
          <j-dict-select-tag
                :value='text'
                v-if="col.dataIndex == 'outboundOrderId'"
                dictCode="material_type"
                :disabled="true"
                style="width: 100%;"
                @change='(e)=>handleChange(e, record.key, col, index)'/>
          <j-dict-select-tag
            :value='text'
            v-if="col.dataIndex == 'outboundOrderId'"
            dictCode="material_type"
            :disabled="false"
            style="width: 100%;"
            @change='(e)=>handleChange(e, record.key, col, index)'
          />
          <a-input-number
            :value="text"
            v-if="col.dataIndex == 'actualQuantity'"
@@ -95,8 +96,9 @@
      type="dashed"
      icon="plus"
      @click="addMaterial"
      :disabled="mainId.status!='3'||( mainId.repairOrderUda1!='needPart'&&mainId.repairOrderUda1!='needSpare')"
      :disabled="mainId.status!='3'"
    >添加实际用料</a-button>
    <!-- :disabled="mainId.status!='3'||( mainId.repairOrderUda1!='needPart'&&mainId.repairOrderUda1!='needSpare')" -->
    <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}">
      <a-row :style="{textAlign:'right'}">
        <a-button
@@ -201,74 +203,39 @@
            return parseInt(index) + 1;
          }
        },
        // {
        //   title: '领料出库单',
        //   dataIndex: 'num',
        //   align: "center",
        //   width: 150,
        // },
        // {
        //   title: '备件编码',
        //   dataIndex: 'sparePartNum',
        //   align: "center",
        // },
        {
          title: '物料名称',
          dataIndex: 'sparePartId',
          scopedSlots: { customRender: 'sparePartId' },
          align: "center",
           className: 'red',
          width: 250,
          className: 'red',
          // width: 250,
        },
        {
          title: '物料种类',
          dataIndex: 'outboundOrderId',
          scopedSlots: { customRender: 'outboundOrderId' },
          align: "center",
          width: 250,
          // width: 250,
        },
        // {
        //   title: '型号',
        //   dataIndex: 'sparePartModel',
        //   align: "center",
        // },
        // {
        //   title: '制造商',
        //   dataIndex: 'constructorName',
        //   align: "center",
        // },
        {
          title: '单位',
          dataIndex: 'repairOrderAmUda1',
          scopedSlots: { customRender: 'repairOrderAmUda1' },
          align: "center",
          className: 'red',
          width: 250,
        },
        // {
        //   title: '主数量',
        //   align: 'center',
        //   dataIndex: 'mainQuantity'
        // },
        // {
        //   title: '可用数量',
        //   align: 'center',
        //   dataIndex: 'availableQuantity'
        // },
        {
          title: '使用数量',
          dataIndex: 'actualQuantity',
          align: "center",
          scopedSlots: { customRender: 'actualQuantity' },
          className: 'red',
          width: 250,
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          width: 250,
          scopedSlots: { customRender: 'action' }
        }
      ],
@@ -286,7 +253,7 @@
  watch: {
    mainId: {
      immediate: true,
      deep:true,
      deep: true,
      handler(val) {
        console.log(val)
        if (!this.mainId.id) {
@@ -314,7 +281,8 @@
      // this.$refs.JSelectSparePartModal.showModals(ids);
      // this.$refs.JSelectSparePartModal.title = '选择备件信息'
      // this.$refs.JSelectSparePartModal.disableSubmit = false
      this.dataSource.push({ sparePartId: '', outboundOrderId: this.mainId.repairOrderUda1,repairOrderAmUda1: '', actualQuantity:'',repairOrderId:this.mainId.id })
      // this.dataSource.push({ sparePartId: '', outboundOrderId: this.mainId.repairOrderUda1, repairOrderAmUda1: '', actualQuantity: '', repairOrderId: this.mainId.id })
      this.dataSource.push({ sparePartId: '', outboundOrderId: '', repairOrderAmUda1: '', actualQuantity: '', repairOrderId: this.mainId.id })
    },
    handleCancel() {
      this.$bus.$emit('closeDrawer')
@@ -342,14 +310,17 @@
      //   this.dataSource = temp
      // }
      if ('sparePartId' == column.dataIndex) {
          target['sparePartId'] = value.target.value
        target['sparePartId'] = value.target.value
      }
      if ('repairOrderAmUda1' == column.dataIndex) {
          target['repairOrderAmUda1'] = value.target.value
      }
        target['repairOrderAmUda1'] = value.target.value
      }
      if ('actualQuantity' == column.dataIndex) {
        target['actualQuantity'] = value
      }
      }
      if ('outboundOrderId' == column.dataIndex) {
        target['outboundOrderId'] = value
      }
    },
    clearList() {
      this.dataSource = [];
@@ -448,6 +419,10 @@
            that.$message.warning('请填写第' + (i + 1) + '行使用数量!')
            return false
          }
          if (workHoursDataSource[i].outboundOrderId == undefined || workHoursDataSource[i].outboundOrderId == null || workHoursDataSource[i].outboundOrderId == '') {
            that.$message.warning('请填写第' + (i + 1) + '行物料种类!')
            return false
          }
        }
      }
      if (that.dataSource.length === 0) {
src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue
@@ -1,15 +1,9 @@
<template>
  <a-card
    :bordered=true
  >
  <a-spin :spinning='confirmLoading'>
      <a-form
        :form="form"
      >
  <a-card :bordered=true>
    <a-spin :spinning='confirmLoading'>
      <a-form :form="form">
        <a-row>
          <a-col
            :span='12'
          >
          <a-col :span='12'>
            <a-form-item
              label='故障现象'
              :labelCol='labelCol'
@@ -65,24 +59,97 @@
            </a-form-item>
          </a-col>
        </a-row>
      <a-button
        :style="{marginRight: '8px'}"
        @click='handleEdit2()'
        :disabled="disabledButton||!disabledEdit"
        :loading='confirmLoading'
      >
       ç¼–辑
      </a-button>
        <a-row>
          <a-col :span='12'>
            <a-form-item
              label='故障原因'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
            >
              <!-- <a-textarea
                placeholder='请输入故障原因'
                v-decorator="['repairOrderFaultAnalysisUda2', validatorRules.repairOrderFaultAnalysisUda2]"
                :disabled="disabledEdit"
              ></a-textarea> -->
              <j-dict-select-tag
                allow-clear
                :disabled="disabledEdit"
                :placeholder="'请选择故障原因'"
                :triggerChange="true"
                dictCode="repair_order_fault_cause"
                v-decorator="['repairOrderFaultAnalysisUda2',validatorRules.repairOrderFaultAnalysisUda2]"
              />
            </a-form-item>
          </a-col>
          <a-col :span='12'>
            <a-form-item
              label='安全措施'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
            >
              <a-textarea
                allow-clear
                placeholder='请输入安全措施'
                v-decorator="['repairOrderFaultAnalysisUda3', validatorRules.repairOrderFaultAnalysisUda3]"
                :disabled="disabledEdit"
              ></a-textarea>
            </a-form-item>
          </a-col>
      <a-button
        @click='handleOk()'
        type='primary'
        :loading='confirmLoading'
        :disabled="disabledButton||disabledEdit"
      >保存
      </a-button>
        </a-row>
        <a-row>
          <a-col
            v-if=" '99' == this.form.getFieldsValue(['repairOrderFaultAnalysisUda2']).repairOrderFaultAnalysisUda2"
            :span='12'
          >
            <a-form-item
              label='故障原因描述'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
            >
              <a-textarea
                allow-clear
                placeholder='请输入故障原因描述'
                v-decorator="['repairOrderFaultAnalysisUda4', validatorRules.repairOrderFaultAnalysisUda4]"
                :disabled="disabledEdit"
              ></a-textarea>
            </a-form-item>
          </a-col>
          <a-col :span='12'>
            <a-form-item
              label='维修标准'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
            >
              <j-dict-select-tag
                allow-clear
                :disabled="disabledEdit"
                :placeholder="'请选择维修标准'"
                :triggerChange="true"
                dictCode="mom_eam_repair_standard,name,id, del_flag!='1'"
                v-decorator="['repairOrderFaultAnalysisUda5',validatorRules.repairOrderFaultAnalysisUda5]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-button
          :style="{marginRight: '8px'}"
          @click='handleEdit2()'
          :disabled="disabledButton||!disabledEdit"
          :loading='confirmLoading'
        >
          ç¼–辑
        </a-button>
        <a-button
          @click='handleOk()'
          type='primary'
          :loading='confirmLoading'
          :disabled="disabledButton||disabledEdit"
        >保存
        </a-button>
      </a-form>
  </a-spin>
    </a-spin>
  </a-card>
</template>
<script>
@@ -92,53 +159,53 @@
import { getAction } from '../../../../../api/manage'
export default {
  name: 'RepairOrderFaultAnalysisList',
  components: { },
  components: {},
  props: {
    repairOrder:{
    repairOrder: {
      type: Object,
      default:{},
      default: {},
    }
  },
  watch:{
      'repairOrder.id':{
        immediate: true,
        handler(val) {
          this.loadData(val);
          if(this.repairOrder.id!==undefined&&this.repairOrder.id!==null&&this.repairOrder.id!==''){
            if(this.repairOrder.status!=='3'){
              this.disabledButton = true;
            }else{
              this.disabledButton = false;
            }
          }else{
  watch: {
    'repairOrder.id': {
      immediate: true,
      handler(val) {
        this.loadData(val);
        if (this.repairOrder.id !== undefined && this.repairOrder.id !== null && this.repairOrder.id !== '') {
          if (this.repairOrder.status !== '3') {
            this.disabledButton = true;
          } else {
            this.disabledButton = false;
          }
        }
      },
      'repairOrder.status':{
        immediate: true,
        handler(val) {
            if(val!=='3'){
              this.disabledButton = true;
            }else{
              this.disabledButton = false;
            }
        } else {
          this.disabledButton = true;
        }
      }
    },
    'repairOrder.status': {
      immediate: true,
      handler(val) {
        if (val !== '3') {
          this.disabledButton = true;
        } else {
          this.disabledButton = false;
        }
      }
    }
  },
  data() {
    return {
      description: '维修工单管理页面',
      confirmLoading:false,
      model:{},
      confirmLoading: false,
      model: {},
      form: this.$form.createForm(this),
      url: {
        add:'/eam/repairOrderFaultAnalysis/add',
        add: '/eam/repairOrderFaultAnalysis/add',
        edit: '/eam/repairOrderFaultAnalysis/edit',
        getInfo:'/eam/repairOrderFaultAnalysis/list',
        getInfo: '/eam/repairOrderFaultAnalysis/list',
      },
      dictOptions: {},
      disabledEdit:false,
      disabledEdit: false,
      validatorRules: {
        faultCause: {
          rules: [
@@ -151,13 +218,28 @@
            { required: true, message: '请输入故障现象!' },
          ]
        },
        suggestion:{
        repairOrderFaultAnalysisUda2: {
          rules: [
            { required: true, message: '请选择故障原因!' },
          ]
        },
        repairOrderFaultAnalysisUda3: {
          rules: [
            { required: true, message: '请输入安全措施!' },
          ]
        },
        repairOrderFaultAnalysisUda4: {
          rules: [
            { required: true, message: '请输入故障原因描述!' },
          ]
        },
        suggestion: {
          rules: [
            { required: true, message: '请输入故障预防!' },
            { min: 2, max: 1000, message: '长度在 2 åˆ° 1000 ä¸ªå­—符', trigger: 'blur' },
          ]
        },
        maintenanceMeasures:{
        maintenanceMeasures: {
          rules: [
            { required: true, message: '请输入故障维修!' },
            { min: 2, max: 1000, message: '长度在 2 åˆ° 1000 ä¸ªå­—符', trigger: 'blur' },
@@ -172,7 +254,7 @@
        xs: { span: 24 },
        sm: { span: 16 }
      },
      disabledButton:false
      disabledButton: false
    }
  },
  methods: {
@@ -197,31 +279,35 @@
              that.$message.warning(res.message);
            }
          }).finally(() => {
             that.loadData(that.repairOrder.id);
             that.confirmLoading = false;
            that.loadData(that.repairOrder.id);
            that.confirmLoading = false;
          })
        }
      })
    },
    loadData(repairOrderId){
      let that = this;
      getAction(that.url.getInfo,{repairOrderId:repairOrderId}).then(res=>{
                if(res.success&&res.result.records.length!==0){
                      that.disabledEdit=true;
                      that.form.setFieldsValue(pick(res.result.records[0], 'faultCause','repairOrderFaultAnalysisUda1', 'faultTypeId', 'suggestion', 'maintenanceMeasures','id'))
                      that.model = Object.assign({}, res.result.records[0]);
                }else{
                  if(that.repairOrder.status==='3'){
                    that.disabledEdit=false;
                  }else{
                    that.disabledEdit=true;
                  }
                  that.form.resetFields();
                }
    loadData(repairOrderId) {
      let that = this;
      getAction(that.url.getInfo, { repairOrderId: repairOrderId }).then(res => {
        if (res.success && res.result.records.length !== 0) {
          that.disabledEdit = true;
          that.form.setFieldsValue(pick(res.result.records[0], 'faultCause', 'repairOrderFaultAnalysisUda1', 'repairOrderFaultAnalysisUda2', 'repairOrderFaultAnalysisUda3', 'repairOrderFaultAnalysisUda5', 'faultTypeId', 'suggestion', 'maintenanceMeasures', 'id'))
          that.$nextTick(() => {
            that.form.setFieldsValue({ "repairOrderFaultAnalysisUda4": res.result.records[0].repairOrderFaultAnalysisUda4 });
          }, 300);
          that.model = Object.assign({}, res.result.records[0]);
        } else {
          if (that.repairOrder.status === '3') {
            that.disabledEdit = false;
          } else {
            that.disabledEdit = true;
          }
          that.form.resetFields();
        }
      })
    },
    handleEdit2(){
    this.disabledEdit=false;
    handleEdit2() {
      this.disabledEdit = false;
    }
  },
src/views/spare/SpartPartRequirement.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,505 @@
<template>
  <a-card
    title="备件请购"
    :bordered='false'
  >
    <div class='table-page-search-wrapper'>
      <a-form
        layout='inline'
        @keyup.enter.native='searchQuery'
      >
        <a-row :gutter='24'>
          <a-col
            :xl='6'
            :lg='7'
            :md='8'
            :sm='24'
          >
            <a-form-item label='请购编码'>
              <j-input
                placeholder='请输入请购编码'
                v-model='queryParam.num'
              ></j-input>
            </a-form-item>
          </a-col>
          <a-col
            :xl='6'
            :lg='7'
            :md='8'
            :sm='24'
          >
            <a-form-item
              label="部门"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                dictCode="sys_depart,depart_name,id"
                placeholder="请选择维护部门"
                v-model="queryParam.departId"
              />
            </a-form-item>
          </a-col>
          <a-col
            :xl='6'
            :lg='7'
            :md='8'
            :sm='24'
          >
            <a-form-item label='设备名称'>
              <!-- <a-input
                placeholder='请输入设备名称'
                v-model='queryParam.name'
              ></a-input> -->
              <j-dict-select-tag
                :dictCode="'mom_eam_equipment,num,id ,del_flag!=\'1\' and use_id = ' +'\''+ queryParam.departId+'\''"
                placeholder="请选择设备"
                v-model="queryParam.equipmentId"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <div class="table-operator">
      <a-button
        @click='handleAdd'
        type='primary'
        icon='plus'
        v-has="'spartPartRequirement:add'"
      >新增</a-button>
      <a-button
        type="primary"
        @click="searchQuery"
        icon="search"
      >查询</a-button>
      <a-button
        type="primary"
        @click="searchReset"
        icon="reload"
        style="margin-left: 8px"
      >重置</a-button>
      <a-button
        v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'"
        type="primary"
        @click="batchHandleOK"
        icon="reload"
        style="margin-left: 8px"
      >批量通过</a-button>
      <a-button
        v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'"
        type="primary"
        @click="batchHandleReject"
        icon="reload"
        style="margin-left: 8px"
      >批量驳回</a-button>
    </div>
    <!-- table区域-begin -->
    <div>
      <div
        class='ant-alert ant-alert-info'
        style='margin-bottom: 16px;'
      >
        <i class='anticon anticon-info-circle ant-alert-icon'></i> å·²é€‰æ‹© <a style='font-weight: 600'>{{ selectedRowKeys.length }}</a>项
        <a
          style='margin-left: 24px'
          @click='onClearSelected'
        >清空</a>
      </div>
      <a-table
        ref='table'
        size='middle'
        bordered
        rowKey='id'
        :scroll="{ x: 'calc(1300px + 50%)', y: 700 }"
        :columns='columns'
        :dataSource='dataSource'
        :pagination='ipagination'
        :loading='loading'
        :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
        :customRow='clickThenSelect'
        @change='handleTableChange'
      >
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a
            @click="handleAuditApproval(record)"
            v-show="record.auditStatus == '1' "
            v-has="'spartPartRequirement:audit'"
          >审核</a>
          <a-divider type="vertical" />
          <a-popconfirm
            v-show="record.auditStatus == '0' || record.auditStatus == '3'"
            title="确定提交吗?"
            @confirm="() => handleSubmit(record)"
            v-has="'spartPartRequirement:subit'"
          >
            <a>提交</a>
          </a-popconfirm>
          <a-divider type="vertical" />
          <a
            v-show="record.auditStatus == '0' || record.auditStatus == '3'"
            @click="handleEdit(record)"
            v-has="'spartPartRequirement:edit'"
          >编辑</a>
          <a-divider type="vertical" />
          <a-popconfirm
            v-show="record.auditStatus == '0' || record.auditStatus == '3'"
            title="确定删除吗?"
            @confirm="() => handleDelete(record.id)"
            v-has="'spartPartRequirement:delete'"
          >
            <a>删除</a>
          </a-popconfirm>
        </span>
      </a-table>
      <a-tabs defaultActiveKey="1">
        <a-tab-pane
          tab='备件请购明细'
          key="1"
        >
          <div
            class="table-operator"
            style="margin:-16px"
          >
            <spart-part-requirement-detail :sparePartRequirementId='sparePartRequirementId' />
          </div>
        </a-tab-pane>
      </a-tabs>
    </div>
    <spart-part-requirement-modal
      ref='modalForm'
      @ok='modalFormOk'
    ></spart-part-requirement-modal>
    <audit-approval-modal
      ref='auditApprovalModal'
      @ok='modalFormOk'
    ></audit-approval-modal>
  </a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction, requestPut, downFile, postAction } from '@/api/manage'
import SpartPartRequirementDetail from './modules/spartPartRequirement/SpartPartRequirementDetail'
import SpartPartRequirementModal from './modules/spartPartRequirement/SpartPartRequirementModal'
import AuditApprovalModal from './modules/spartPartRequirement/AuditApprovalModal'
import '@/assets/less/TableExpand.less'
import JEllipsis from "@/components/jeecg/JEllipsis";
export default {
  name: 'SpartPartRequirement',
  mixins: [JeecgListMixin],
  components: {
    JEllipsis,
    SpartPartRequirementDetail,
    SpartPartRequirementModal,
    AuditApprovalModal
  },
  data() {
    return {
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '请购单号',
          align: 'center',
          dataIndex: 'num',
        },
        {
          title: '状态',
          align: 'center',
          dataIndex: 'auditStatus_dictText',
        },
        {
          title: '设备信息',
          align: 'center',
          dataIndex: 'equipmentNumNameModel',
        },
        {
          title: '部门',
          align: 'center',
          dataIndex: 'departId_dictText',
        },
        {
          title: '请购人',
          align: 'center',
          dataIndex: 'person',
        },
        {
          title: '请购时间',
          align: 'center',
          dataIndex: 'createBy',
        },
        {
          title: '审核人',
          align: 'center',
          dataIndex: 'auditPerson',
        },
        {
          title: '审核意见',
          align: 'center',
          dataIndex: 'approvalOpinions',
        },
        {
          title: '审核时间',
          align: 'center',
          dataIndex: 'auditTime',
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: 'center',
          fixed: 'right',
          scopedSlots: { customRender: 'action' },
          width: 180,
        }
      ],
      url: {
        list: '/spare/sparePartRequirement/list',
        delete: '/spare/sparePartRequirement/deleteNew',
        deleteBatch: '/eam/inspectionStandard/deleteBatch',
        importExcelUrl: "/eam/inspectionStandard/importExcel",
        passBatch: '/eam/inspectionStandard/auditApprovalBatch',
        submit: '/spare/sparePartRequirement/submit',
      },
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['5', '10', '20', '50'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' å…±' + total + '条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      sparePartRequirementId: '-1'
    }
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
  methods: {
    clickThenSelect(record) {
      return {
        on: {
          click: () => {
            this.onSelectChange(record.id.split(','), [record])
          }
        }
      }
    },
    onClearSelected() {
      this.selectedRowKeys = []
      this.selectionRows = []
      this.sparePartRequirementId = '-1'
    },
    onSelectChange(selectedRowKeys, selectionRows) {
      if (selectedRowKeys.length == 1) {
        this.sparePartRequirementId = selectionRows[0]['id']
      } else {
        this.sparePartRequirementId = '-1'
      }
      this.selectedRowKeys = selectedRowKeys
      this.selectionRows = selectionRows
    },
    handleEdit: function (record) {
      this.$refs.modalForm.edit(record)
      this.$refs.modalForm.title = '编辑'
      this.$refs.modalForm.disableSubmit = false
    },
    handleAdd: function () {
      this.$refs.modalForm.add()
      this.$refs.modalForm.title = '新增'
      this.$refs.modalForm.disableSubmit = false
    },
    //审核审批
    handleAuditApproval: function (record) {
      this.$refs.auditApprovalModal.showModals(record);
      this.$refs.auditApprovalModal.title = "审核";
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error('请设置url.list属性!')
        return
      }
      //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1
      }
      this.onClearSelected()
      var params = this.getQueryParams()//查询条件
      this.loading = true
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records
          this.ipagination.total = res.result.total
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false
      })
    },
    searchReset() {
      this.queryParam = {}
      this.sparePartRequirementId = '-1'
      this.loadData(1);
    },
    handleSubmit(record) {
      const that = this;
      that.confirmLoading = true;
      postAction(that.url.submit, record).then((res) => {
        if (res.success) {
          that.$message.success("提交成功!")
          that.loadData(1)
        } else {
          that.$message.warning("提交失败!")
        }
      }).finally(() => {
        that.confirmLoading = false;
      })
    },
    modalFormOk() {
      // æ–°å¢ž/修改 æˆåŠŸæ—¶ï¼Œé‡è½½åˆ—è¡¨
      this.loadData();
      //清空列表选中
      // this.onClearSelected()
    },
    batchHandleReject: function () {
      if (this.selectedRowKeys.length <= 0) {
        // this.$message.warning('请选择一条记录!');
        this.$notification.warning({
          message: '消息',
          description: "请选择一条记录"
        });
        return;
      } else {
        var that = this;
        this.$confirm({
          title: "确认批量驳回",
          content: "是否批量驳回选中数据?",
          onOk: function () {
            that.loading = true;
            that.confirmLoading = true;
            let formData = {};
            let dailyInspectionStandardlist = that.selectionRows
            for (var i = 0; i < dailyInspectionStandardlist.length; i++) {
              let record = dailyInspectionStandardlist[i]
              if (record.approvalStatus == '1') {
                record.approvalStatus = '2'
              } else if (record.approvalStatus == '3') {
                record.approvalStatus = '4'
              } else if (record.approvalStatus == '4') {
                record.approvalStatus = '2'
              }
            }
            formData.dailyInspectionStandardlist = dailyInspectionStandardlist
            requestPut(that.url.passBatch, formData).then((res) => {
              if (res.success) {
                that.$message.success("批量驳回成功!")
                that.loadData(1)
              } else {
                that.$message.warning("批量通过失败!")
              }
            }).finally(() => {
              that.confirmLoading = false;
              that.loading = false;
            })
          }
        });
      }
    },
    batchHandleOK: function () {
      if (this.selectedRowKeys.length <= 0) {
        // this.$message.warning('请选择一条记录!');
        this.$notification.warning({
          message: '消息',
          description: "请选择一条记录"
        });
        return;
      } else {
        var that = this;
        this.$confirm({
          title: "确认批量通过",
          content: "是否批量通过选中数据?",
          onOk: function () {
            that.loading = true;
            that.confirmLoading = true;
            let formData = {};
            let dailyInspectionStandardlist = that.selectionRows
            for (var i = 0; i < dailyInspectionStandardlist.length; i++) {
              let record = dailyInspectionStandardlist[i]
              if (record.approvalStatus == '1') {
                record.approvalStatus = '3'
              } else if (record.approvalStatus == '2') {
                record.approvalStatus = '3'
              } else if (record.approvalStatus == '3') {
                record.approvalStatus = '5'
              } else if (record.approvalStatus == '4') {
                record.approvalStatus = '3'
              }
            }
            formData.dailyInspectionStandardlist = dailyInspectionStandardlist
            requestPut(that.url.passBatch, formData).then((res) => {
              if (res.success) {
                that.$message.success("批量通过成功!")
                that.loadData(1)
              } else {
                that.$message.warning("批量通过失败!")
              }
            }).finally(() => {
              that.confirmLoading = false;
              that.loading = false;
            })
          }
        });
      }
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
.table-operator .ant-btn {
  margin: 10px 8px 8px 10px;
}
</style>
src/views/spare/modules/spartPartRequirement/AuditApprovalModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,218 @@
<template>
  <a-modal
    :title='title'
    :width="650"
    :visible='visible'
    :maskClosable='false'
    cancelText='关闭'
    @cancel='handleCancel'
    :confirmLoading='confirmLoading'
  >
    <!-- @ok='handleOk' -->
    <a-spin :spinning='confirmLoading'>
      <a-form :form="form">
        <a-row>
          <a-col :span='24'>
            <a-form-item
              label='请购单号'
              :labelCol='labelCol'
              :wrapperCol='wrapperCol'
            >
              <a-input
                allow-clear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入请购单号'"
                v-decorator="['num', validatorRules.num ]"
              />
            </a-form-item>
          </a-col>
          <a-col :span='24'>
            <a-form-item
              label="审核意见"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-textarea
                rows='3'
                placeholder='请输入审核意见'
                v-decorator="['approvalOpinions', validatorRules.approvalOpinions ]"
              ></a-textarea>
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
    <template slot='footer'>
      <a-popconfirm
        @confirm="() => handleReject()"
        title="确认将当前备件请购单驳回?"
      >
        <a-button
          :loading='confirmLoading'
          :style="{marginRight: '8px'}"
        >
          é©³å›ž
        </a-button>
      </a-popconfirm>
      <a-popconfirm
        @confirm="() => handleOk()"
        title="确认将当前备件请购单审核通过?"
      >
        <a-button
          type='primary'
          :loading='confirmLoading'
          :style="{marginRight: '8px'}"
        >
          é€šè¿‡
        </a-button>
      </a-popconfirm>
    </template>
  </a-modal>
</template>
<script>
import { httpAction, requestPut, postAction } from '@/api/manage'
import Tooltip from 'ant-design-vue/es/tooltip'
import pick from 'lodash.pick'
export default {
  name: 'AuditApprovalModal',
  components: {
    Tooltip
  },
  data() {
    return {
      title: '操作',
      visible: false,
      disableSubmit: false,
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 5 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 16 }
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        approvalOpinions: {
          rules: [
            { required: true, message: '请输入审核意见!' },
          ]
        },
      },
      url: {
        auditApproval: "/spare/sparePartRequirement/auditApproval",
      },
    }
  },
  methods: {
    close() {
      this.$emit('close')
      this.visible = false
    },
    handleCancel() {
      this.close()
    },
    showModals(record) {
      this.form.resetFields();
      this.model = Object.assign({}, record);
      this.visible = true;
      this.$nextTick(() => {
        this.form.setFieldsValue(pick(this.model, 'num'));
        this.form.setFieldsValue({ approvalOpinions: "" });
      }, 200);
    },
    handleReject() {
      const that = this;
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let formData = Object.assign(this.model, values);
          if (this.model.auditStatus == '1') {
            formData.auditStatus = '3'
          }
          requestPut(this.url.auditApproval, formData, { id: this.model.id }).then((res) => {
            if (res.success) {
              that.$message.success("驳回成功!");
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        }
      })
    },
    handleOk() {
      const that = this;
      that.form.validateFields((err, values) => {
        if (!err) {
          this.confirmLoading = true;
          let formData = Object.assign(this.model, values);
          if (this.model.auditStatus == '1') {
            formData.auditStatus = '4'
          }
          requestPut(this.url.auditApproval, formData, { id: this.model.id }).then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        }
      })
    },
  }
}
</script>
<style lang='less' scoped>
/deep/ .frozenRowClass {
  color: #c9c9c9;
}
.fontweight {
  font-weight: bold;
}
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
/deep/ .ant-modal-title {
  text-align: center;
}
</style>
src/views/spare/modules/spartPartRequirement/EquipmentList.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,314 @@
<template>
  <a-modal
    :title="title"
    :width="1250"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :okButtonProps="{ props: {disabled: disableSubmit} }"
    @ok="handleOk"
    @cancel="handleCancel"
    cancelText="关闭"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <div class="table-page-search-wrapper">
          <a-form
            layout="inline"
            @keyup.enter.native="searchQuery"
          >
            <a-row :gutter="24">
              <a-col
                :md="6"
                :sm="8"
              >
                <a-form-item label="统一编码">
                  <a-input
                    placeholder="请输入统一编码检索"
                    v-model="queryParam.num"
                  ></a-input>
                </a-form-item>
              </a-col>
              <a-col
                :md="6"
                :sm="8"
              >
                <a-form-item label="设备名称">
                  <a-input
                    placeholder="请输入设备名称检索"
                    v-model="queryParam.name"
                  ></a-input>
                </a-form-item>
              </a-col>
              <a-col
                :md="6"
                :sm="8"
              >
                <a-button
                  type="primary"
                  @click="searchQuery"
                  icon="search"
                >查询</a-button>
                <a-button
                  @click="searchReset"
                  icon="reload"
                  style="margin-left:8px;"
                >重置</a-button>
              </a-col>
            </a-row>
            <a-row :gutter="24">
              <a-col :span="24">
              </a-col>
            </a-row>
          </a-form>
        </div>
        <div style="margin-top:8px;">
          <a-table
            ref="table"
            size="middle"
            bordered
            rowKey="id"
            :columns="columns"
            :dataSource="dataSource"
            :pagination="ipagination"
            :loading="loading"
            @change="handleTableChange"
            :customRow="clickThenCheck"
            :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}"
          >
          </a-table>
        </div>
      </a-form>
    </a-spin>
  </a-modal>
</template>
<script>
import { postAction, getAction } from '@/api/manage'
import JDate from '@/components/jeecg/JDate'
import Tooltip from 'ant-design-vue/es/tooltip'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'//引入过长裁剪
import store from '@/store'
export default {
  name: "EquipmentList",
  mixins: [JeecgListMixin],
  components: {
    JDate,
    Tooltip,
    JEllipsis,
  },
  data() {
    return {
      title: "设备信息",
      visible: false,
      model: {},
      dataSource: [],
      disableSubmit: false,
      type: "radio",
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
        pageSize: 10,
        pageSizeOptions: ['10', '20', '30'],
        showTotal: (total, range) => {
          return range[0] + "-" + range[1] + " å…±" + total + "条"
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          }
        },
        {
          title: '统一编码',
          align: 'center',
          dataIndex: 'num',
        },
        {
          title: '设备名称',
          align: 'center',
          dataIndex: 'name',
        },
        {
          title: '设备型号',
          align: "center",
          dataIndex: 'model'
        },
        {
          title: '设备规格',
          align: "center",
          dataIndex: 'specification'
        },
        {
          title: '设备状态',
          align: "center",
          dataIndex: 'equipmentStatus_dictText'
        },
      ],
      url: {
        list: "/eam/equipment/queryEquipmentList",
      },
    }
  },
  methods: {
    searchQuery() {
      this.loadData(1);
    },
    searchReset() {
      // this.queryParam = { equipmentStatus: '1' };
      this.loadData(1)
    },
    list(params) {
      this.selectedRowKeys = [];
      this.selectedRowRecord = [];
      this.visible = true;
      if (params == null || params == "") {
        this.queryParam.useId = ""
      } else {
        this.queryParam.useId = params
      }
      // this.queryParam.equipmentStatus = '1'
      this.loadData(1);
    },
    clickThenCheck(record) {
      return {
        on: {
          click: (e) => {
            this.selectedRowRecord = record;
            this.onSelectChange(record.id.split(","), [record]);
          }
        }
      };
    },
    onSelectChange(selectedRowKeys, selectedRows) {
      this.selectedRowKeys = selectedRowKeys;
      this.selectedRowRecord = selectedRows[0];
    },
    close() {
      this.queryParam = {};
      this.$emit('close');
      this.visible = false;
    },
    handleOk() {
      const that = this;
      // è§¦å‘表单验证
      if (that.selectedRowKeys.length > 0) {
        if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") {
          that.$emit('sendEquipmentRecord', { record: that.selectedRowRecord });
          that.close();
        } else {
          that.$message.error("请选择设备信息!")
        }
      } else {
        that.$message.error("请选择设备信息!")
      }
    },
    handleCancel() {
      this.close();
    },
  },
}
</script>
<style scoped>
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
.fontweight {
  font-weight: bold;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
.ant-table-tbody .ant-table-row td {
  padding-top: 10px;
  padding-bottom: 10px;
}
.anty-row-operator button {
  margin: 0 5px;
}
.ant-btn-danger {
  background-color: #ffffff;
}
.ant-modal-cust-warp {
  height: 100%;
}
.ant-modal-cust-warp .ant-modal-body {
  height: calc(100% - 110px) !important;
  overflow-y: auto;
}
.ant-modal-cust-warp .ant-modal-content {
  height: 90% !important;
  overflow-y: hidden;
}
/deep/ .notshow {
  display: none;
}
.frozenRowClass {
  color: #c9c9c9;
}
.hight {
  color: #f5222d;
}
.middle {
  color: #fa8c16;
}
.low {
  color: #52c41a;
}
.dataUnKnow {
  color: #1890ff;
}
/deep/ .frozenRowClass {
  color: #c9c9c9;
}
</style>
src/views/spare/modules/spartPartRequirement/SpartPartRequirementDetail.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,178 @@
<template>
  <a-card
    :bordered="false"
    :class="'cust-erp-sub-tab'"
  >
    <!-- æŸ¥è¯¢åŒºåŸŸ -->
    <div class="table-page-search-wrapper">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="24">
        </a-row>
      </a-form>
    </div>
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :scroll="{x:true}"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange"
      >
      </a-table>
    </div>
  </a-card>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '@/api/manage'
import Tooltip from 'ant-design-vue/es/tooltip'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
import { getFileAccessHttpUrl } from '@/api/manage';
export default {
  name: "SpartPartRequirementDetail",
  mixins: [JeecgListMixin],
  components: {
    Tooltip,
  },
  props: {
    sparePartRequirementId: {
      type: String,
      default: '-1',
      required: false
    }
  },
  watch: {
    sparePartRequirementId: {
      immediate: true,
      handler(val) {
        if (!this.sparePartRequirementId) {
          this.clearList()
        } else {
          this.queryParam['sparePartRequirementId'] = val;
          this.queryParam['delFlag'] = 0;
          this.loadData(1);
        }
      }
    }
  },
  data() {
    return {
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 100,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '备件编号',
          align: 'center',
          dataIndex: 'spartPartNum',
          scopedSlots: { customRender: 'spartPartNum' },
        },
        {
          title: '备件名称',
          align: 'center',
          dataIndex: 'spartPartName',
          scopedSlots: { customRender: 'spartPartName' },
        },
        {
          title: '型号',
          align: 'center',
          dataIndex: 'spartPartModel',
        },
        {
          title: '数量',
          align: 'center',
          dataIndex: 'quantity',
        },
        {
          title: '单位',
          align: 'center',
          dataIndex: 'unitName',
        },
      ],
      url: {
        list: "/spare/sparePartRequirement/getSparePartRequirementDetails",
      },
      /* åˆ†é¡µå‚æ•° */
      ipagination: {
        current: 1,
        pageSize: 20,
        pageSizeOptions: ['5', '10', '20', '50'],
        showTotal: (total, range) => {
          return range[0] + '-' + range[1] + ' å…±' + total + '条'
        },
        showQuickJumper: true,
        showSizeChanger: true,
        total: 0
      },
    }
  },
  created() {
  },
  computed: {
  },
  methods: {
    clearList() {
      this.dataSource = []
      this.selectedRowKeys = []
      this.ipagination.current = 1
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error("请设置url.list属性!")
        return
      }
      //加载数据 è‹¥ä¼ å…¥å‚æ•°1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1;
      }
      var params = this.getQueryParams();//查询条件
      this.loading = true;
      // this.originTargetKeys = [];
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records || res.result;
          if (res.result.total) {
            this.ipagination.total = res.result.total;
          } else {
            this.ipagination.total = 0;
          }
          //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
        } else {
          this.$message.warning(res.message)
        }
      }).finally(() => {
        this.loading = false
      })
    },
    view(record) {
      this.$refs.pdfview.showPdf(record.src);
    },
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
src/views/spare/modules/spartPartRequirement/SpartPartRequirementModal.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,511 @@
<template>
  <a-modal
    :title="title"
    :width="1250"
    :visible="visible"
    :maskClosable="false"
    @ok="handleOk"
    cancelText="关闭"
    @cancel="handleCancel"
    :confirmLoading="confirmLoading"
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <!-- title="工艺路径基本信息" -->
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="请购单号"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="codeDisable"
                :placeholder="disableSubmit?'':'请输入请购单号'"
                v-decorator="['num', validatorRules.num ]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item
              label="使用部门"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <j-dict-select-tag
                allow-clear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请选择使用部门'"
                :triggerChange="true"
                dictCode="sys_depart,depart_name,id,del_flag!='1'"
                v-decorator="['departId',validatorRules.departId]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="设备名称"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input-search
                :disabled="disableSubmit"
                placeholder="请选择设备"
                enter-button
                @search="onEquipmentList()"
                :read-only="true"
                v-decorator="['equipmentNumNameModel', validatorRules.equipmentNumNameModel]"
              />
            </a-form-item>
          </a-col>
        </a-row>
        <a-row
          hidden
          :gutter="24"
        >
          <a-col :span="12">
            <a-form-item
              label="设备Id"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入统一编码/名称/型号'"
                v-decorator="['equipmentId', validatorRules.equipmentId ]"
              />
            </a-form-item>
          </a-col>
          <!-- <a-col :span="12">
            <a-form-item
              label="使用部门Id"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入使用部门id'"
                v-decorator="['useId', validatorRules.useId ]"
              />
            </a-form-item>
          </a-col> -->
        </a-row>
        <!-- <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item
              label="管理制度"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allow-clear
                :disabled="false"
                :placeholder="disableSubmit?'':'请输入管理制度'"
                v-decorator="['disUda1', validatorRules.disUda1 ]"
              />
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item
              label="版本"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allowClear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入版本号'"
                v-decorator="[ 'version', validatorRules.version]"
              />
            </a-form-item>
          </a-col>
        </a-row> -->
        <!-- <a-row :gutter="24">
          <a-col
            v-if="this.isRevise == true"
            :span="12"
          >
            <a-form-item
              label="历史版本"
              :labelCol="labelCol"
              :wrapperCol="wrapperCol"
            >
              <a-input
                allowClear
                :disabled="true"
                :placeholder="disableSubmit?'':'请输入历史版本号'"
                v-decorator="[ 'historyVersion', validatorRules.historyVersion]"
              />
            </a-form-item>
          </a-col>
        </a-row> -->
        <a-row :gutter="24">
          <a-col :span="24">
            <a-form-item
              label="备注"
              :labelCol="{span:3}"
              :wrapperCol="{span:21}"
            >
              <a-textarea
                allowClear
                :disabled="disableSubmit"
                :placeholder="disableSubmit?'':'请输入备注'"
                v-decorator="[ 'remark', validatorRules.remark]"
              />
            </a-form-item>
          </a-col>
        </a-row>
      </a-form>
    </a-spin>
    <!-- <a-button
      type="primary"
      :style="{ marginRight: '8px',marginBottom:'8px' }"
      :loading="confirmLoading"
      @click="selectInspectionProjects()"
    >点检项目</a-button> -->
    <a-table
      ref="table"
      bordered
      size="middle"
      rowKey='id'
      :columns="columns"
      :dataSource="dataSource"
      :pagination="false"
    >
      <template
        v-for='col in columns'
        :slot='col.dataIndex'
        slot-scope='text, record, index'
      >
        <div :key='col.dataIndex'>
          <a-input
            v-if="col.dataIndex == 'spartPartNum'"
            :value='text'
            @change='(e) => handleChange(e, record.key, col, index)'
          />
          <a-input
            v-if="col.dataIndex == 'spartPartName'"
            :value='text'
            @change='(e) => handleChange(e, record.key, col, index)'
          />
          <a-input
            v-if="col.dataIndex == 'spartPartModel'"
            :value='text'
            @change='(e) => handleChange(e, record.key, col, index)'
          />
          <a-input-number
            :value='text'
            v-if="col.dataIndex == 'quantity'"
            :min='0'
            :max='99999'
            @change='(e)=>handleChange(e, record.key, col, index)'
          />
          <a-input
            v-if="col.dataIndex == 'unitName'"
            :value='text'
            @change='(e) => handleChange(e, record.key, col, index)'
          />
        </div>
      </template>
      <span
        slot="action"
        slot-scope="text, record, index"
      >
        <a-popconfirm
          title="确定删除吗?"
          @confirm="() => handleDelete(text,record, index)"
        >
          <a>删除</a>
        </a-popconfirm>
      </span>
    </a-table>
    <a-button
      style='width: 100%; margin-top: 16px; margin-bottom: 8px'
      type='dashed'
      icon='plus'
      @click='addSpart'
    >增加备件
    </a-button>
    <template slot="footer">
      <a-button
        :style="{marginRight: '8px'}"
        @click="handleCancel()"
      >
        å…³é—­
      </a-button>
      <a-button
        @click="handleOk()"
        type="primary"
        :loading="confirmLoading"
      >确定</a-button>
    </template>
    <equipment-list
      ref="EquipmentList"
      @sendEquipmentRecord='sendEquipmentRecord'
    ></equipment-list>
  </a-modal>
</template>
<script>
import { getAction, postAction, requestPut } from '@/api/manage'
import pick from 'lodash.pick'
import JMultiSelectTag from '@/components/dict/JMultiSelectTag'
import { duplicateCheck } from '@/api/api'
import Tooltip from 'ant-design-vue/es/tooltip'
import EquipmentList from './EquipmentList'
export default {
  name: "SpartPartRequirementModal",
  components: {
    JMultiSelectTag,
    Tooltip,
    EquipmentList,
  },
  data() {
    return {
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          align: 'center',
          customRender: function (t, r, index) {
            return parseInt(index) + 1
          },
          width: 50,
        },
        {
          title: '备件编号',
          align: 'center',
          dataIndex: 'spartPartNum',
          scopedSlots: { customRender: 'spartPartNum' },
        },
        {
          title: '备件名称',
          align: 'center',
          dataIndex: 'spartPartName',
          scopedSlots: { customRender: 'spartPartName' },
        },
        {
          title: '型号',
          align: 'center',
          dataIndex: 'spartPartModel',
          scopedSlots: { customRender: 'spartPartModel' },
        },
        {
          title: '数量',
          align: 'center',
          dataIndex: 'quantity',
          scopedSlots: { customRender: 'quantity' },
        },
        {
          title: '单位',
          align: 'center',
          dataIndex: 'unitName',
          scopedSlots: { customRender: 'unitName' },
        },
        {
          title: '操作',
          align: 'center',
          dataIndex: 'action',
          scopedSlots: {
            customRender: 'action'
          },
        }
      ],
      title: "操作",
      visible: false,
      disableSubmit: false,
      codeDisable: true,
      // isRevise: false,
      model: {},
      labelCol: {
        xs: { span: 24 },
        sm: { span: 6 },
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 18 },
      },
      confirmLoading: false,
      form: this.$form.createForm(this),
      validatorRules: {
        num: {
          rules: [
            { required: true, message: '请输入请购单号!' },
          ]
        },
        equipmentNumNameModel: {
          rules: [
            { required: true, message: '请选择设备!' },
          ]
        },
        departId: {
          rules: [
            { required: true, message: '请选择部门!' },
          ]
        },
      },
      url: {
        add: "/spare/sparePartRequirement/addNew",
        edit: "/spare/sparePartRequirement/editNew",
        getNum: '/eam/sysIdentity/getNumNew'
      },
      dataSource: [],
    }
  },
  methods: {
    add() {
      this.edit({ sparePartRequirementDeatilList: [] })
      this.getSeq()
    },
    edit(record) {
      let that = this;
      that.dataSource = [];
      that.form.resetFields();
      that.model = Object.assign({}, record);
      that.visible = true;
      if (record.sparePartRequirementDeatilList != undefined) {
        const temp = [...record.sparePartRequirementDeatilList];
        that.dataSource = temp;
      }
      that.$nextTick(() => {
        that.form.setFieldsValue(pick(that.model, 'num', 'equipmentId', 'equipmentNumNameModel', 'departId', 'remark'));
      });
    },
    getSeq() {
      getAction(this.url.getNum, { type: 'SpartPartRequirement', length: 4 }).then(res => {
        if (res.success) {
          this.form.setFieldsValue({ "num": res.result })
        }
      })
    },
    onEquipmentList() {
      let data = this.form.getFieldsValue(['departId']);
      this.$refs.EquipmentList.list(data.departId);
      this.$refs.EquipmentList.title = "选择设备信息";
    },
    sendEquipmentRecord(data) {
      this.dataSource = [];
      let record = data.record;
      this.form.setFieldsValue({ equipmentId: record.id, equipmentNumNameModel: record.num + "/" + record.name + "/" + record.model });
    },
    close() {
      this.$emit('close');
      this.visible = false;
    },
    handleCancel() {
      this.close();
    },
    handleOk() {
      const that = this;
      this.form.validateFields((err, values) => {
        if (!err) {
          that.confirmLoading = true;
          let formData = Object.assign(this.model, values);
          formData.sparePartRequirementDeatilList = that.dataSource;
          let obj;
          if (!this.model.id) {
            formData.auditStatus = '0'
            obj = postAction(this.url.add, formData);
          } else {
            obj = requestPut(this.url.edit, formData, { id: this.model.id });
          }
          obj.then((res) => {
            if (res.success) {
              that.$message.success(res.message);
              that.$emit('ok');
            } else {
              that.$message.warning(res.message);
            }
          }).finally(() => {
            that.confirmLoading = false;
            that.close();
          })
        }
      })
    },
    handleDelete(text, record, index) {
      this.dataSource.splice(index, 1);
    },
    addSpart() {
      this.dataSource.push({})
    },
    handleChange(value, key, column, index) {
      let that = this;
      const temp = [...that.dataSource];
      const target = temp.filter(item => key === item.key)[index];
      if (target) {
        if (column.dataIndex == 'spartPartNum') {
          target[column.dataIndex] = value.target.value;
        }
        if ('spartPartName' == column.dataIndex) {
          target['spartPartName'] = value.target.value;
        }
        if ('spartPartModel' == column.dataIndex) {
          target['spartPartModel'] = value.target.value;
        }
        if ('quantity' == column.dataIndex) {
          target['quantity'] = value;
        }
        if ('unitName' == column.dataIndex) {
          target['unitName'] = value.target.value;
        }
        //显示带过来的数据
        that.dataSource = temp;
      }
    },
  },
}
</script>
<style lang="less" scoped>
/deep/ .frozenRowClass {
  color: #c9c9c9;
}
.fontweight {
  font-weight: bold;
}
.ant-btn {
  padding: 0 10px;
  margin-left: 3px;
}
.ant-form-item-control {
  line-height: 0px;
}
/** ä¸»è¡¨å•行间距 */
.ant-form .ant-form-item {
  margin-bottom: 10px;
}
/** Tab页面行间距 */
.ant-tabs-content .ant-form-item {
  margin-bottom: 0px;
}
</style>
src/views/system/DictList.vue
@@ -3,30 +3,79 @@
    <!-- å·¦ä¾§é¢æ¿ -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
      <a-form
        layout="inline"
        @keyup.enter.native="searchQuery"
      >
        <a-row :gutter="12">
          <a-col :md="7" :sm="8">
            <a-form-item label="字典名称" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
              <a-input placeholder="请输入字典名称" v-model="queryParam.dictName"></a-input>
          <a-col
            :md="7"
            :sm="8"
          >
            <a-form-item
              label="字典名称"
              :labelCol="{span: 6}"
              :wrapperCol="{span: 14, offset: 1}"
            >
              <a-input
                placeholder="请输入字典名称"
                v-model="queryParam.dictName"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="7" :sm="8">
            <a-form-item label="字典编号" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
              <a-input placeholder="请输入字典编号" v-model="queryParam.dictCode"></a-input>
          <a-col
            :md="7"
            :sm="8"
          >
            <a-form-item
              label="字典编号"
              :labelCol="{span: 6}"
              :wrapperCol="{span: 14, offset: 1}"
            >
              <a-input
                placeholder="请输入字典编号"
                v-model="queryParam.dictCode"
              ></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="7" :sm="8">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
          <a-col
            :md="7"
            :sm="8"
          >
            <span
              style="float: left;overflow: hidden;"
              class="table-page-search-submitButtons"
            >
              <a-button
                type="primary"
                @click="searchQuery"
                icon="search"
              >查询</a-button>
              <a-button
                type="primary"
                @click="searchReset"
                icon="reload"
                style="margin-left: 8px"
              >重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
      <div class="table-operator" style="border-top: 5px">
        <a-button @click="handleAdd" type="primary" icon="plus">添加</a-button>
      <div
        class="table-operator"
        style="border-top: 5px"
      >
        <a-button
          @click="handleAdd"
          type="primary"
          icon="plus"
        >添加</a-button>
        <a-button
          type="primary"
          icon="sync"
          @click="refleshCache()"
        >刷新缓存</a-button>
      </div>
      <a-table
@@ -37,166 +86,179 @@
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">
        <span slot="action" slot-scope="text, record">
        @change="handleTableChange"
      >
        <span
          slot="action"
          slot-scope="text, record"
        >
          <a @click="handleEdit(record)">
            <a-icon type="edit"/>
            <a-icon type="edit" />
            ç¼–辑
          </a>
          <a-divider type="vertical"/>
          <a @click="editDictItem(record)"><a-icon type="setting"/> å­—典配置</a>
          <a-divider type="vertical"/>
          <a-popconfirm title="确定删除吗?" @confirm="() =>handleDelete(record.id)">
          <a-divider type="vertical" />
          <a @click="editDictItem(record)"><a-icon type="setting" /> å­—典配置</a>
          <a-divider type="vertical" />
          <a-popconfirm
            title="确定删除吗?"
            @confirm="() =>handleDelete(record.id)"
          >
            <a>删除</a>
          </a-popconfirm>
        </span>
      </a-table>
    </div>
    <dict-modal ref="modalForm" @ok="modalFormOk"></dict-modal>  <!-- å­—典类型 -->
    <dict-modal
      ref="modalForm"
      @ok="modalFormOk"
    ></dict-modal> <!-- å­—典类型 -->
    <dict-item-list ref="dictItemList"></dict-item-list>
    <dict-delete-list ref="dictDeleteList" @refresh="() =>loadData()"></dict-delete-list>
    <dict-delete-list
      ref="dictDeleteList"
      @refresh="() =>loadData()"
    ></dict-delete-list>
  </a-card>
</template>
<script>
  import { filterObj } from '@/utils/util';
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import DictModal from './modules/DictModal'
  import DictItemList from './DictItemList'
  import DictDeleteList from './DictDeleteList'
  import { getAction } from '@/api/manage'
  import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
  import Vue from 'vue'
import { filterObj } from '@/utils/util';
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import DictModal from './modules/DictModal'
import DictItemList from './DictItemList'
import DictDeleteList from './DictDeleteList'
import { getAction } from '@/api/manage'
import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
import Vue from 'vue'
  export default {
    name: "DictList",
    mixins:[JeecgListMixin],
    components: {DictModal, DictItemList,DictDeleteList},
    data() {
      return {
        description: '这是数据字典页面',
        visible: false,
        // æŸ¥è¯¢æ¡ä»¶
        queryParam: {
          dictCode: "",
          dictName: "",
        },
        // è¡¨å¤´
        columns: [
          {
            title: '#',
            dataIndex: '',
            key: 'rowIndex',
            width: 120,
            align: "center",
            customRender: function (t, r, index) {
              return parseInt(index) + 1;
            }
          },
          {
            title: '字典名称',
            align: "left",
            dataIndex: 'dictName',
          },
          {
            title: '字典编号',
            align: "left",
            dataIndex: 'dictCode',
          },
          {
            title: '描述',
            align: "left",
            dataIndex: 'description',
          },
          {
            title: '操作',
            dataIndex: 'action',
            align: "center",
            scopedSlots: {customRender: 'action'},
export default {
  name: "DictList",
  mixins: [JeecgListMixin],
  components: { DictModal, DictItemList, DictDeleteList },
  data() {
    return {
      description: '这是数据字典页面',
      visible: false,
      // æŸ¥è¯¢æ¡ä»¶
      queryParam: {
        dictCode: "",
        dictName: "",
      },
      // è¡¨å¤´
      columns: [
        {
          title: '#',
          dataIndex: '',
          key: 'rowIndex',
          width: 120,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        ],
        dict: "",
        labelCol: {
          xs: {span: 8},
          sm: {span: 5},
        },
        wrapperCol: {
          xs: {span: 16},
          sm: {span: 19},
        {
          title: '字典名称',
          align: "left",
          dataIndex: 'dictName',
        },
        url: {
          list: "/sys/dict/list",
          delete: "/sys/dict/delete",
          exportXlsUrl: "sys/dict/exportXls",
          importExcelUrl: "sys/dict/importExcel",
          refleshCache: "sys/dict/refleshCache",
          queryAllDictItems: "sys/dict/queryAllDictItems",
        {
          title: '字典编号',
          align: "left",
          dataIndex: 'dictCode',
        },
      }
    },
    computed: {
      importExcelUrl: function () {
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      }
    },
    methods: {
      getQueryParams() {
        var param = Object.assign({}, this.queryParam, this.isorter);
        param.field = this.getQueryField();
        param.pageNo = this.ipagination.current;
        param.pageSize = this.ipagination.pageSize;
        if (this.superQueryParams) {
          param['superQueryParams'] = encodeURI(this.superQueryParams)
          param['superQueryMatchType'] = this.superQueryMatchType
        {
          title: '描述',
          align: "left",
          dataIndex: 'description',
        },
        {
          title: '操作',
          dataIndex: 'action',
          align: "center",
          scopedSlots: { customRender: 'action' },
        }
        return filterObj(param);
      ],
      dict: "",
      labelCol: {
        xs: { span: 8 },
        sm: { span: 5 },
      },
      //取消选择
      cancelDict() {
        this.dict = "";
        this.visible = false;
        this.loadData();
      wrapperCol: {
        xs: { span: 16 },
        sm: { span: 19 },
      },
      //编辑字典数据
      editDictItem(record) {
        this.$refs.dictItemList.edit(record);
      url: {
        list: "/sys/dict/list",
        delete: "/sys/dict/delete",
        exportXlsUrl: "sys/dict/exportXls",
        importExcelUrl: "sys/dict/importExcel",
        refleshCache: "sys/dict/refleshCache",
        queryAllDictItems: "sys/dict/queryAllDictItems",
      },
      // é‡ç½®å­—典类型搜索框的内容
      searchReset() {
        var that = this;
        that.queryParam.dictName = "";
        that.queryParam.dictCode = "";
        that.loadData(this.ipagination.current);
      },
      openDeleteList(){
        this.$refs.dictDeleteList.show()
      },
      refleshCache(){
        getAction(this.url.refleshCache).then((res) => {
          if (res.success) {
            //重新加载缓存
            getAction(this.url.queryAllDictItems).then((res) => {
              if (res.success) {
                Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
                Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
              }
            })
            this.$message.success("刷新缓存完成!");
          }
        }).catch(e=>{
          this.$message.warn("刷新缓存失败!");
          console.log("刷新失败",e)
        })
    }
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
  methods: {
    getQueryParams() {
      var param = Object.assign({}, this.queryParam, this.isorter);
      param.field = this.getQueryField();
      param.pageNo = this.ipagination.current;
      param.pageSize = this.ipagination.pageSize;
      if (this.superQueryParams) {
        param['superQueryParams'] = encodeURI(this.superQueryParams)
        param['superQueryMatchType'] = this.superQueryMatchType
      }
      return filterObj(param);
    },
    watch: {
      openKeys(val) {
        console.log('openKeys', val)
      },
    //取消选择
    cancelDict() {
      this.dict = "";
      this.visible = false;
      this.loadData();
    },
  }
    //编辑字典数据
    editDictItem(record) {
      this.$refs.dictItemList.edit(record);
    },
    // é‡ç½®å­—典类型搜索框的内容
    searchReset() {
      var that = this;
      that.queryParam.dictName = "";
      that.queryParam.dictCode = "";
      that.loadData(this.ipagination.current);
    },
    openDeleteList() {
      this.$refs.dictDeleteList.show()
    },
    refleshCache() {
      getAction(this.url.refleshCache).then((res) => {
        if (res.success) {
          //重新加载缓存
          getAction(this.url.queryAllDictItems).then((res) => {
            if (res.success) {
              Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
              Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
            }
          })
          this.$message.success("刷新缓存完成!");
        }
      }).catch(e => {
        this.$message.warn("刷新缓存失败!");
        console.log("刷新失败", e)
      })
    }
  },
  watch: {
    openKeys(val) {
      console.log('openKeys', val)
    },
  },
}
</script>
<style scoped>
  @import '~@assets/less/common.less'
@import '~@assets/less/common.less';
</style>