From 12f60de079fefef9bbf15faabbe6675d023555d4 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期三, 31 一月 2024 16:21:16 +0800
Subject: [PATCH] 增加报表

---
 src/views/eam/EquipmentListAllStandard.vue |  576 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 576 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/EquipmentListAllStandard.vue b/src/views/eam/EquipmentListAllStandard.vue
new file mode 100644
index 0000000..da5ad14
--- /dev/null
+++ b/src/views/eam/EquipmentListAllStandard.vue
@@ -0,0 +1,576 @@
+<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 :span="6">
+            <a-form-item
+              label="璁惧鎵�灞炲垎绫�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                dictCode="mom_eam_equipment_category,name,id"
+                placeholder="璇疯緭鍏ユ悳绱㈡潯浠跺苟閫夋嫨"
+                v-model="queryParam.equipmentCategoryId"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="缁熶竴缂栫爜"
+            >
+              <a-input
+                placeholder="璇疯緭鍏ヨ澶囩粺涓�缂栫爜鏌ヨ"
+                v-model="queryParam.num"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              label="璁惧鍚嶇О"
+            >
+              <a-input
+                placeholder="璇疯緭鍏ヨ澶囧悕绉版煡璇�"
+                v-model="queryParam.name"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item
+              label="鍨嬪彿"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-input
+                v-model="queryParam.model"
+                placeholder="璇疯緭鍏ュ瀷鍙�"
+              ></a-input>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item
+              label="宸ュ尯"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨宸ュ尯"
+                :triggerChange="true"
+                dictCode="mom_base_area,name,id,del_flag!='1'"
+                v-model="queryParam.factoryModelId"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item
+              label="浣跨敤閮ㄩ棬"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <a-tree-select
+                style="width: 100%"
+                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                :tree-data="treeData"
+                placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬"
+                tree-default-expand-all
+                v-model="queryParam.useId"
+              />
+            </a-form-item>
+          </a-col>
+
+          <a-col :span="6">
+            <a-form-item
+              label="ABC鏍囪瘑"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨ABC鏍囪瘑"
+                :triggerChange="true"
+                dictCode="ABC-standard-result"
+                v-model="queryParam.equipmentImportanceId"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item
+              label="鎶�鏈姸鎬�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鎶�鏈姸鎬�"
+                :triggerChange="true"
+                dictCode="technology_status"
+                v-model="queryParam.technologyStatus"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="6">
+            <a-form-item
+              label="璁惧鐘舵��"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨璁惧鐘舵��"
+                :triggerChange="true"
+                dictCode="equipment_status"
+                v-model="queryParam.equipmentStatus"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-item
+              label="鍏抽敭璁惧鏍囪瘑"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :triggerChange="true"
+                placeholder="璇烽�夋嫨鍏抽敭璁惧鏍囪瘑"
+                dictCode="specific_equipment"
+                v-model="queryParam.specificEquipment"
+              />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </div>
+    <div class="table-operator">
+      <a-button
+        type="primary"
+        @click="searchQuery"
+        icon="search"
+      >鏌ヨ</a-button>
+      <a-button
+        @click="searchReset"
+        icon="reload"
+      >閲嶇疆</a-button>
+    </div>
+    <div>
+      <a-table
+        ref="table"
+        size="small"
+        bordered
+        rowKey="id"
+        :scroll="{x:true}"
+        :columns="columns"
+        :dataSource="dataSource"
+        :pagination="ipagination"
+        :loading="loading"
+        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type:'checkbox'}"
+        :customRow="clickThenSelect"
+        @change="handleTableChange"
+      >
+        <span
+          slot="yseNoPrecisionParameters"
+          slot-scope="text"
+        >
+          <a-icon
+            type="check"
+            style="color: chartreuse;"
+            v-if="text==='0'"
+          />
+          <a-icon
+            type="close"
+            v-else
+            style="color:red;"
+          />
+        </span>
+        <span
+          slot="yseNoInspectionStandard"
+          slot-scope="text"
+        >
+          <a-icon
+            type="check"
+            style="color: chartreuse;"
+            v-if="text==='0'"
+          />
+          <a-icon
+            type="close"
+            v-else
+            style="color:red;"
+          />
+        </span>
+        <span
+          slot="yseNoMaintenance2Standard"
+          slot-scope="text"
+        >
+          <a-icon
+            type="check"
+            style="color: chartreuse;"
+            v-if="text==='0'"
+          />
+          <a-icon
+            type="close"
+            v-else
+            style="color:red;"
+          />
+        </span>
+        <span
+          slot="yseNoMaintenance3Standard"
+          slot-scope="text"
+        >
+          <a-icon
+            type="check"
+            style="color: chartreuse;"
+            v-if="text==='0'"
+          />
+          <a-icon
+            type="close"
+            v-else
+            style="color:red;"
+          />
+        </span>
+      </a-table>
+    </div>
+    <a-tabs defaultActiveKey="1">
+      <a-tab-pane
+        tab="璁惧绮惧害"
+        key="2"
+        forceRender
+      >
+        <EquipmentPrecisionParametersList
+          :isOpen="isOpenPrecision"
+          :mainId="precisionParametersTemplateId"
+        />
+      </a-tab-pane>
+      <a-tab-pane
+        tab="鏃ヤ繚鏍囧噯"
+        key="7"
+        forceRender
+      >
+        <daily-maintenance-list :mainId="selectedMainId"></daily-maintenance-list>
+      </a-tab-pane>
+      <a-tab-pane
+        tab="浜屼繚鏍囧噯"
+        key="8"
+        forceRender
+      >
+        <second-maintenance-list :mainId="selectedMainId"></second-maintenance-list>
+      </a-tab-pane>
+      <a-tab-pane
+        tab="涓変繚鏍囧噯"
+        key="9"
+        forceRender
+      >
+        <third-maintenance-list :mainId="selectedMainId"></third-maintenance-list>
+      </a-tab-pane>
+    </a-tabs>
+  </a-card>
+</template>
+
+<script>
+
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { mixinDevice } from '@/utils/mixin'
+import { getAction } from '@/api/manage'
+import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList'
+import '@/assets/less/TableExpand.less'
+import JSearchSelectTag from '../../components/dict/JSearchSelectTag.vue'
+import StandardOfInspection from './modules/equipmentNew/StandardOfInspection.vue'
+import StandardOfMaintenance from './modules/equipmentNew/StandardOfMaintenance.vue'
+import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue'
+import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue'
+import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue'
+
+export default {
+  name: "EquipmentList",
+  mixins: [JeecgListMixin, mixinDevice],
+  components: {
+    EquipmentPrecisionParametersList,
+    JSearchSelectTag,
+    StandardOfInspection,
+    StandardOfMaintenance,
+    DailyMaintenanceList,
+    SecondMaintenanceList,
+    ThirdMaintenanceList,
+  },
+  data() {
+    return {
+      description: '璁惧鍙拌处-淇濆吇鏍囧噯',
+      caytegoryParam: 'all',
+      // 琛ㄥご
+      columns: [
+        {
+          title: '#',
+          dataIndex: '',
+          key: 'rowIndex',
+          align: 'center',
+          customRender: function (t, r, index) {
+            return parseInt(index) + 1
+          },
+          width: 50,
+        },
+        {
+          title: '璁惧绫诲瀷',
+          align: "center",
+          dataIndex: 'categoryName',
+        },
+        {
+          title: '缁熶竴缂栫爜',
+          align: "center",
+          dataIndex: 'equipmentNum',
+        },
+        {
+          title: '璁惧鍚嶇О',
+          align: "center",
+          dataIndex: 'equipmentName',
+        },
+        {
+          title: '鍨嬪彿',
+          align: "center",
+          dataIndex: 'equipmentModel',
+        },
+        {
+          title: '浣跨敤閮ㄩ棬',
+          align: "center",
+          dataIndex: 'departName',
+        },
+        {
+          title: 'ABC鏍囪瘑',
+          align: "center",
+          dataIndex: 'abc',
+        },
+        {
+          title: '鍏抽敭璁惧鏍囪瘑',
+          align: "center",
+          dataIndex: 'specificEquipment',
+        },
+        {
+          title: '鎶�鏈姸鎬�',
+          align: "center",
+          dataIndex: 'technologyStatus',
+        },
+        {
+          title: '鏈夋棤绮惧害',
+          align: "center",
+          dataIndex: 'yseNoPrecisionParameters',
+          scopedSlots: { customRender: 'yseNoPrecisionParameters' }
+        },
+        {
+          title: '鏈夋棤鏃ヤ繚鏍囧噯',
+          align: "center",
+          dataIndex: 'yseNoInspectionStandard',
+          scopedSlots: { customRender: 'yseNoInspectionStandard' }
+        },
+        {
+          title: '鏈夋棤浜屼繚鏍囧噯',
+          align: "center",
+          dataIndex: 'yseNoMaintenance2Standard',
+          scopedSlots: { customRender: 'yseNoMaintenance2Standard' }
+        },
+        {
+          title: '鏈夋棤涓変繚鏍囧噯',
+          align: "center",
+          dataIndex: 'yseNoMaintenance3Standard',
+          scopedSlots: { customRender: 'yseNoMaintenance3Standard' }
+        },
+        // {
+        //   title: '鎿嶄綔',
+        //   align: "center",
+        //   dataIndex: 'action',
+        //   scopedSlots: {
+        //     customRender: 'action',
+        //   },
+        //   width: 147,
+        //   fixed: 'right',
+        // },
+      ],
+      url: {
+        list: "/eam/equipment/getEquipmentListAllStandard",
+        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
+      },
+      dictOptions: {
+      },
+      /* 鍒嗛〉鍙傛暟 */
+      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
+      },
+      selectedMainId: '',
+      // superFieldList: [],
+      equipmentProcessParametersMainId: '',
+      equipmentDocumentMainId: '',
+      equipmentPrecisionParametersMainId: '',
+      precisionParametersTemplateId: '',
+      isOpenPrecision: true,
+      isOpenProcess: true,
+      treeData: [],
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      mainId: '',
+    }
+  },
+  created() {
+    // this.getSuperFieldList();
+    this.initOptions();
+  },
+  computed: {
+    importExcelUrl: function () {
+      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
+    }
+  },
+  methods: {
+    initDictConfig() {
+    },
+    clickThenSelect(record) {
+      return {
+        on: {
+          click: () => {
+            this.onSelectChange(record.id.split(","), [record]);
+          }
+        }
+      }
+    },
+    onClearSelected() {
+      this.selectedRowKeys = [];
+      this.selectionRows = [];
+      this.selectedMainId = ''
+    },
+    onSelectChange(selectedRowKeys, selectionRows) {
+      if (selectedRowKeys.length == 1) {
+        this.selectedMainId = selectedRowKeys[0]
+        this.precisionParametersTemplateId = selectionRows[0].precisionParametersTemplateId;
+        // this.isOpenProcess = selectionRows[0].processParameters == 1;
+        this.isOpenPrecision = selectionRows[0].precisionParameters == 1;
+      } else {
+        this.selectedMainId = ''
+        this.precisionParametersTemplateId = ''
+      }
+      this.selectedRowKeys = selectedRowKeys;
+      this.selectionRows = selectionRows;
+    },
+    loadData(arg) {
+      if (!this.url.list) {
+        this.$message.error("璇疯缃畊rl.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;
+      })
+    },
+    // getSuperFieldList() {
+    //   let fieldList = [];
+    //   fieldList.push({ type: 'string', value: 'num', text: '缁熶竴缂栫爜', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'name', text: '璁惧鍚嶇О', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'model', text: '鍨嬪彿', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'specification', text: '瑙勬牸', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentStatus', text: '璁惧鐘舵��', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'technologyStatus', text: 'technologyStatus', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'assetNumber', text: 'assetNumber', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentCategoryId', text: 'equipmentCategoryId', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'specificEquipment', text: 'specificEquipment', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentPhoto', text: 'equipmentPhoto', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'constructorId', text: '璧勪骇鍒堕�犲晢', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'supplierId', text: 'supplierId', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'factoryNumber', text: 'factoryNumber', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'leaveFactoryDate', text: '鍑哄巶鏃ユ湡', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'acceptanceCheckDate', text: '楠屾敹鏃ユ湡', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'affiliationId', text: 'affiliationId', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'manageId', text: '缁存姢閮ㄩ棬ID', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'manager', text: 'manager', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'useId', text: '浣跨敤閮ㄩ棬ID', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'functionary', text: 'functionary', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'location', text: 'location', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentImportanceId', text: 'ABC鏍囪瘑ID', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'processParameters', text: 'processParameters', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'processParametersTemplateId', text: 'processParametersTemplateId', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'precisionParameters', text: 'precisionParameters', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'precisionParametersTemplateId', text: 'precisionParametersTemplateId', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'verification', text: 'verification', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'verificationPeriod', text: 'verificationPeriod', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'lastVerificationDate', text: 'lastVerificationDate', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'nextVerificationDate', text: 'nextVerificationDate', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'status', text: 'status', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'remark', text: 'remark', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentUda1', text: '宸ュ尯', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentUda2', text: '瀹夎浣嶇疆', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentUda3', text: '閲嶉噺', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentUda4', text: '閲嶉噺璁¢噺鍗曚綅ID', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'equipmentUda5', text: '鍔熻兘浣嶇疆', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'tenantId', text: 'tenantId', dictCode: '' })
+    //   fieldList.push({ type: 'int', value: 'delFlag', text: 'delFlag', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'teamId', text: '缁翠慨鐝粍ID', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'sourceId', text: 'sourceId', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'fundSource', text: '璧勯噾鏉ユ簮', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'factoryNo', text: '鍑哄巶缂栧彿', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'mfr', text: '鍒堕�犲晢', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'sourceCountry', text: '璧勪骇鏉ユ簮鍥藉', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'gpo', text: '鎬诲姛鐜�', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'keyEquipmentIdentification', text: '鍏抽敭璁惧鏍囪瘑', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'securityConfiguration', text: '瀹夊叏閰嶇疆', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'coolingSystem', text: '鍐峰嵈绯荤粺', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'fireExtinguisher', text: '鐏伀鍣�', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'fireExtinguisherValidityPeriod', text: '鐏伀鍣ㄦ湁鏁堟湡', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'operatingSystem', text: '鎿嶄綔绯荤粺', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'system', text: '绯荤粺', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'port', text: '绔彛', dictCode: '' })
+    //   fieldList.push({ type: 'BigDecimal', value: 'coordinateNum', text: '鍧愭爣鏁伴噺', dictCode: '' })
+    //   fieldList.push({ type: 'string', value: 'projectApprovalNo', text: '绔嬮」鍗″彿', dictCode: '' })
+    //   this.superFieldList = fieldList
+    // },
+    initOptions() {
+      getAction(this.url.loadOptions).then(res => {
+        if (res.success) {
+          this.treeData = res.result
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+    },
+  }
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>
\ No newline at end of file

--
Gitblit v1.9.3