zhangherong
2025-03-26 ccd5b8d5eebece61106ab8d36389d69357371ac5
src/views/eam/equipment/EamEquipmentList.vue
@@ -82,6 +82,7 @@
                @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
      <a-button type="primary" icon="download" @click="handleTemplateXlsDownload">导入模板下载</a-button>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel">
@@ -167,8 +168,9 @@
import '@/assets/less/TableExpand.less'
import EamEquipmentModal from './modules/EamEquipmentModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { getAction } from '@api/manage'
import { getAction, templateXlsDownload } from '@api/manage'
import NameplateModal from '@views/eam/equipment/modules/NameplateModal.vue'
import { getSystemConfigValue } from '@api/api'
export default {
  name: 'EamEquipmentList',
@@ -390,6 +392,26 @@
          dataIndex: 'coordinateNum'
        },
        {
          title: '创建人',
          align: "center",
          dataIndex: 'createBy_dictText'
        },
        {
          title: '创建时间',
          align: "center",
          dataIndex: 'createTime',
        },
        {
          title: '更新人',
          align: "center",
          dataIndex: 'updateBy_dictText'
        },
        {
          title: '更新时间',
          align: "center",
          dataIndex: 'updateTime',
        },
        {
          title: '备注',
          align: 'center',
          width: 100,
@@ -410,9 +432,11 @@
        deleteBatch: '/eam/equipment/deleteBatch',
        exportXlsUrl: 'eam/equipment/exportXls',
        importExcelUrl: 'eam/equipment/importExcel',
        loadProductionOptions: '/mdc/mdcProduction/loadProductionTreeOptions'
        loadProductionOptions: '/mdc/mdcProduction/loadProductionTreeOptions',
        templateXlsDownloadUrl: '导入模板/设备台账导入模板_v1.0.xlsx',
      },
      treeData: []
      treeData: [],
      appHomeUrl: '',
    }
  },
  computed: {
@@ -421,7 +445,8 @@
    }
  },
  created() {
    this.loadAllProductionTree()
    this.loadAllProductionTree();
    this.loadAppHomeUrlConfigValue();
  },
  methods: {
    loadAllProductionTree() {
@@ -441,10 +466,21 @@
     */
    handleOpenNameplateModal(record) {
      this.$refs.nameplateModalRef.model = Object.assign({}, record)
      this.$refs.nameplateModalRef.httpUrl = 'http://www.baidu.com'
      this.$refs.nameplateModalRef.httpUrl = this.appHomeUrl + record.equipmentCode;
      this.$refs.nameplateModalRef.visible = true
    }
    },
    handleTemplateXlsDownload(){
      templateXlsDownload(this.url.templateXlsDownloadUrl);
    },
    loadAppHomeUrlConfigValue() {
      let params = {settingKey: 'app_home_url'};
      getSystemConfigValue(params).then(res => {
        if (res.success) {
          this.appHomeUrl = res.result.settingValue;
        }
      })
    },
  }
}
</script>