Browse Source

Merge remote-tracking branch 'origin/master'

LLL 1 year ago
parent
commit
d3f34c136e

+ 4 - 1
itdmWeb/src/api/api.js

@@ -122,6 +122,8 @@ const getNextZrr = (params)=>getAction("/flowpath/itdmRunFlowPathStep/selectNext
 const getNextTF = (params)=>getAction("/flowpath/itdmFlowPathStep/getSortByFlowPathId",params);
 const getNextTF = (params)=>getAction("/flowpath/itdmFlowPathStep/getSortByFlowPathId",params);
 // 绩效导出
 // 绩效导出
 const getExportJx = (params)=>downFile("/jixiaoPersonPrice/jixiaoPersonPrice/exportXlsByTime",params);
 const getExportJx = (params)=>downFile("/jixiaoPersonPrice/jixiaoPersonPrice/exportXlsByTime",params);
+// 获取设备表模板地址
+const getDz = (params)=>getAction("/itdmDevice/itdmDevice/downloadmuban",params);
 
 
 
 
 //日志管理
 //日志管理
@@ -314,7 +316,8 @@ export {
   getFirNextZrr,
   getFirNextZrr,
   getNextZrr,
   getNextZrr,
   getNextTF,
   getNextTF,
-  getExportJx
+  getExportJx,
+  getDz
 }
 }
 
 
 
 

+ 11 - 1
itdmWeb/src/views/module-iTDM/itdmDevice/ItdmDeviceList.vue

@@ -48,6 +48,7 @@
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
       <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
         <a-button type="primary" icon="import">导入</a-button>
         <a-button type="primary" icon="import">导入</a-button>
       </a-upload>
       </a-upload>
+      <a-button type="primary" icon="download" @click="handleDownload()">模板下载</a-button>
       <!-- 高级查询区域 -->
       <!-- 高级查询区域 -->
 <!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
 <!--      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
 <!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
 <!--      <a-dropdown v-if="selectedRowKeys.length > 0">-->
@@ -142,7 +143,8 @@
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import ItdmDeviceModal from './modules/ItdmDeviceModal'
   import ItdmDeviceModal from './modules/ItdmDeviceModal'
   import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
   import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
-  import {checkGuzhang} from '@/api/api'
+  import {checkGuzhang, getDz} from '@/api/api'
+  import { getFileAccessHttpUrl,downloadFile } from '@/api/manage'
 
 
   export default {
   export default {
     name: 'ItdmDeviceList',
     name: 'ItdmDeviceList',
@@ -338,6 +340,14 @@
         })
         })
         }
         }
       },
       },
+      // 模板下载
+      handleDownload() {
+        getDz().then((res) => {
+          console.log(res)
+          let url = getFileAccessHttpUrl(res);
+          downloadFile(url,'设备表.xls')
+        })
+      }
     }
     }
   }
   }
 </script>
 </script>