Sfoglia il codice sorgente

前端:资质配置导出-服务类-更换接口

baichengfei 4 anni fa
parent
commit
577d6c5be2

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/technologyservice.js

@@ -52,6 +52,13 @@ export default {
       params: params
     })
   },
+  exportTechApExcelByJava (params, myAxios) {
+    return myAxios({
+      url: '/technologyservice/export-new',
+      method: 'get',
+      params: params
+    })
+  },
   delTmpSupplierCertSub (params, myAxios) {
     return myAxios({
       url: '/technologyservice/deltmpsuppliercertsub',

+ 102 - 103
src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/index.vue

@@ -457,7 +457,7 @@
       tmpClassCheck
     },
     name: 'oiltechnologyservice',
-    data() {
+    data () {
       return {
         Excelurl: '',
         textarea: '',
@@ -573,74 +573,74 @@
         },
         dynamicTableColumns: [],
         tableColumns: [{
-            prop: 'Code',
-            label: '编码',
-            width: 120,
-            sort: true
-          },
+          prop: 'Code',
+          label: '编码',
+          width: 120,
+          sort: true
+        },
 
-          {
-            prop: 'Name',
-            label: '名称',
-            width: 260,
-            sort: true
-          },
+        {
+          prop: 'Name',
+          label: '名称',
+          width: 260,
+          sort: true
+        },
 
-          {
-            prop: 'Code1',
-            label: '一级编码',
-            width: 120,
-            sort: true
-          },
+        {
+          prop: 'Code1',
+          label: '一级编码',
+          width: 120,
+          sort: true
+        },
 
-          {
-            prop: 'Name1',
-            label: '一级名称',
-            width: 150,
-            sort: true
-          },
+        {
+          prop: 'Name1',
+          label: '一级名称',
+          width: 150,
+          sort: true
+        },
 
-          {
-            prop: 'Code2',
-            label: '二级编码',
-            width: 120,
-            sort: true
-          },
+        {
+          prop: 'Code2',
+          label: '二级编码',
+          width: 120,
+          sort: true
+        },
 
-          {
-            prop: 'Name2',
-            label: '二级名称',
-            width: 150,
-            sort: true
-          },
+        {
+          prop: 'Name2',
+          label: '二级名称',
+          width: 150,
+          sort: true
+        },
 
-          {
-            prop: 'Code3',
-            label: '三级编码',
-            width: 120,
-            sort: true
-          },
+        {
+          prop: 'Code3',
+          label: '三级编码',
+          width: 120,
+          sort: true
+        },
 
-          {
-            prop: 'Name3',
-            label: '三级名称',
-            width: 150,
-            sort: true
-          },
+        {
+          prop: 'Name3',
+          label: '三级名称',
+          width: 150,
+          sort: true
+        },
 
-          {
-            prop: 'Code4',
-            label: '四级编码',
-            width: 120,
-            sort: true
-          },
+        {
+          prop: 'Code4',
+          label: '四级编码',
+          width: 120,
+          sort: true
+        },
 
-          {
-            prop: 'Name4',
-            label: '四级名称',
-            width: 150,
-            sort: true
-          },
+        {
+          prop: 'Name4',
+          label: '四级名称',
+          width: 150,
+          sort: true
+        },
 
           /* {
             prop: "OrgId",
@@ -649,12 +649,12 @@
             sort: true
           }, */
 
-          {
-            prop: 'OrgName',
-            label: '部门名称',
-            width: 150,
-            sort: true
-          }
+        {
+          prop: 'OrgName',
+          label: '部门名称',
+          width: 150,
+          sort: true
+        }
         ],
         organizeProps: {
           value: 'id',
@@ -892,9 +892,9 @@
       beforeAvatarUpload (file) {
         if (file.name.indexOf('.xlsx') < 0) {
           this.$message.error({
-                duration: 10000,
-                message: '文件格式必须为.xlsx'
-              })
+            duration: 10000,
+            message: '文件格式必须为.xlsx'
+          })
           return false
         }
         return true
@@ -915,16 +915,16 @@
                 _this.Excelurl = option.action
               } else {
                 _this.$message({
-                    duration: 10000,
-                    type: 'warning',
+                  duration: 10000,
+                  type: 'warning',
                   message: '未上传成功!请刷新界面重新上传!'
                 })
               }
             })
             .catch(res => {
               _this.$message({
-                    duration: 10000,
-                    type: 'warning',
+                duration: 10000,
+                type: 'warning',
                 message: '未上传成功!请重新上传!'
               })
             })
@@ -941,8 +941,8 @@
         api.importExcel(params, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.$message({
-                    duration: 10000,
-                    type: 'success',
+              duration: 10000,
+              type: 'success',
               message: res.data.message + ' 即将生成对比列表'
             })
             this.importloading = false
@@ -953,10 +953,10 @@
             this.textarea = res.data.message
           } else if (res.data.code === -2) {
             this.$message({
-                duration: 10000,
-                type: 'warning',
-                message: res.data.message
-              })
+              duration: 10000,
+              type: 'warning',
+              message: res.data.message
+            })
           }
         })
       },
@@ -1019,7 +1019,7 @@
           showcolumnarr: showcolumnarr + '',
           showcolumnnamearr: showcolumnnamearr + ''
         }
-        api.exportExcelAll(params, this.$axios).then(res => {
+        api.exportTechApExcelByJava(params, this.$axios).then(res => {
           this.loading = false
           let docurl = res.data
           // 内网服务器专用
@@ -1053,17 +1053,17 @@
         setapi.addOrganize(this.selecteclassid, organizeids, this.setForm, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.$message({
-                duration: 10000,
-                type: 'success',
-                message: res.data.message
-              })
+              duration: 10000,
+              type: 'success',
+              message: res.data.message
+            })
             this.deptsetVisible = false
           } else {
             this.$message({
-                duration: 10000,
-                type: 'warning',
-                message: res.data.message
-              })
+              duration: 10000,
+              type: 'warning',
+              message: res.data.message
+            })
           }
           console.log(res.data)
         }).catch(err => {
@@ -1160,16 +1160,16 @@
             this.codeeditshow = false
             this.initDatas()
             this.$message({
-                duration: 10000,
-                type: 'success',
-                message: res.data.message
-              })
+              duration: 10000,
+              type: 'success',
+              message: res.data.message
+            })
           } else {
             this.$message({
-                duration: 10000,
-                type: 'warning',
-                message: res.data.message
-              })
+              duration: 10000,
+              type: 'warning',
+              message: res.data.message
+            })
           }
         }).catch(err => {
           console.error(err)
@@ -1216,16 +1216,16 @@
         this.dialogVisible = false
         this.initDatas(event)
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.initDatas()
       },
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.initDatas()
       },
-      deleteEntity(row) {
+      deleteEntity (row) {
         this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -1253,7 +1253,7 @@
           console.error(err)
         })
       },
-      transferStr(val) {
+      transferStr (val) {
         if (val === '1') {
           return '是'
         }
@@ -1264,7 +1264,7 @@
         }
       },
 
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -1277,7 +1277,7 @@
         }
       },
 
-      formatDateTime(date) {
+      formatDateTime (date) {
         var y = date.getFullYear()
         var m = date.getMonth() + 1
         m = m < 10 ? ('0' + m) : m
@@ -1290,5 +1290,4 @@
       }
     }
   }
-
 </script>