Bladeren bron

no message

aXin-0810 9 maanden geleden
bovenliggende
commit
1887c049f8
3 gewijzigde bestanden met toevoegingen van 27 en 3 verwijderingen
  1. 8 0
      src/api/setting.js
  2. 4 1
      src/views/setting/account/index.vue
  3. 15 2
      src/views/setting/departmentManage/index.vue

+ 8 - 0
src/api/setting.js

@@ -12,6 +12,14 @@ export function carouselMapListPageV2(data) {
   })
 }
 
+export function adminWebsitExport(data, name) {
+  return postBlob({
+    url: '/admin/websit/export',
+    data,
+    name
+  })
+}
+
 export function carouselMapPageExport(data, name) {
   return postBlob({
     url: '/carouselMap/pageExport',

+ 4 - 1
src/views/setting/account/index.vue

@@ -188,7 +188,10 @@
                   clearable
                 >
                   <template slot-scope="{ node, data }">
-                    <span>{{ data.isWebsit ? '网点' : '部门' }}-{{ data.deptName }}</span>
+                    <span
+                      >{{ data.pid == '0' ? '' : data.pid == '1' ? '商户-' : data.isWebsit ? '网点-' : '部门-'
+                      }}{{ data.deptName }}</span
+                    >
                   </template>
                 </el-cascader>
               </el-form-item>

+ 15 - 2
src/views/setting/departmentManage/index.vue

@@ -16,7 +16,7 @@
                 <el-button type="primary">导入</el-button>
               </el-upload>
             </span>
-            <el-button type="primary">导出</el-button>
+            <el-button type="primary" @click="daochuqu">导出</el-button>
           </div>
 
           <div class="table">
@@ -292,7 +292,8 @@ import {
   deleteDepartment,
   adminWebsitSavePayConfig,
   adminWebsitDeletePayConfig,
-  adminWebsitImport
+  adminWebsitImport,
+  adminWebsitExport
 } from '@/api/setting'
 import geographicalPosi from '@/components/geographicalPosi/index.vue'
 import { adminCompanyPayConfigList } from '@/api/paymentMerchantManagement'
@@ -383,6 +384,18 @@ export default {
     }
   },
   methods: {
+    daochuqu() {
+      adminWebsitExport({}, `网点管理.xlsx`)
+        .then(res => {
+          this.$message({
+            message: '导出成功',
+            type: 'success'
+          })
+        })
+        .catch(err => {
+          this.$message.error('导出失败')
+        })
+    },
     adminWebsitImportFun(data) {
       const loading = this.$loading({
         lock: true,