From 6f7e4ec2d21fec45b44d7903bd51fe4d066aec55 Mon Sep 17 00:00:00 2001 From: anthonywj Date: Tue, 8 Mar 2022 13:35:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E5=8A=A0?= =?UTF-8?q?=E5=A4=B4=E9=83=A8=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 16 +- src/store/modules/app.js | 17 +- src/views/basic/BussinessType.vue | 688 +++++++++++++------------ src/views/thrsys/ThrCorpsImport.vue | 546 ++++++++++---------- src/views/thrsys/ThrProductsImport.vue | 7 + 5 files changed, 649 insertions(+), 625 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index b996d4c..b7cc36e 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -503,14 +503,14 @@ export const asyncRouterMap = [ authRule: ["thrsys/thrCorpsImport"] } }, - { - path: "thrCorpsExport", - name: "往来单位导出", - component: thrCorpsExport, - meta: { - authRule: ["thrsys/thrCorpsExport"] - } - } + // { + // path: "thrCorpsExport", + // name: "往来单位导出", + // component: thrCorpsExport, + // meta: { + // authRule: ["thrsys/thrCorpsExport"] + // } + // } ], }, diff --git a/src/store/modules/app.js b/src/store/modules/app.js index 3f4f368..c92fb98 100644 --- a/src/store/modules/app.js +++ b/src/store/modules/app.js @@ -1,5 +1,6 @@ -import { getStore, setStore } from "../../utils/store"; +import {getStore, setStore} from "../../utils/store"; import * as types from "../mutation-types"; +import store from "@/store"; const state = { sidebar: { @@ -16,16 +17,16 @@ const getters = { // actions const actions = { - ToggleSideBar({ commit }) { + ToggleSideBar({commit}) { commit(types.TOGGLE_SIDEBAR); }, - ShowSideBar({ commit }) { + ShowSideBar({commit}) { commit(types.SHOW_SIDEBAR); }, - addVisitedViews({ commit }, view) { + addVisitedViews({commit}, view) { commit(types.ADD_VISITED_VIEWS, view); }, - delVisitedViews({ commit, state }, view) { + delVisitedViews({commit, state}, view) { return new Promise(resolve => { commit(types.DEL_VISITED_VIEWS, view); resolve([...state.visitedViews]); @@ -51,7 +52,7 @@ const mutations = { }, [types.ADD_VISITED_VIEWS](state, view) { if (state.visitedViews.some(v => v.path === view.path)) return; - state.visitedViews.push({ name: view.name, path: view.path }); + state.visitedViews.push({name: view.name, path: view.path}); }, [types.DEL_VISITED_VIEWS](state, view) { let index; @@ -65,9 +66,11 @@ const mutations = { } }; + + export default { state, getters, actions, - mutations + mutations, }; diff --git a/src/views/basic/BussinessType.vue b/src/views/basic/BussinessType.vue index 8c0e395..624df4d 100644 --- a/src/views/basic/BussinessType.vue +++ b/src/views/basic/BussinessType.vue @@ -1,374 +1,382 @@ diff --git a/src/views/thrsys/ThrCorpsImport.vue b/src/views/thrsys/ThrCorpsImport.vue index 2c36e48..d1050a1 100644 --- a/src/views/thrsys/ThrCorpsImport.vue +++ b/src/views/thrsys/ThrCorpsImport.vue @@ -36,17 +36,17 @@ :action="uploadFileUrl" multiple :limit="3" + :headers="headers" :data="uploadData" :show-file-list="false" :on-success="handleChange" - :file-list="fileList" > 导入往来单位 - - - + + + 下载往来单位 @@ -151,297 +151,303 @@ diff --git a/src/views/thrsys/ThrProductsImport.vue b/src/views/thrsys/ThrProductsImport.vue index 843fbdf..e88aa02 100644 --- a/src/views/thrsys/ThrProductsImport.vue +++ b/src/views/thrsys/ThrProductsImport.vue @@ -37,6 +37,7 @@ multiple :limit="3" :data="uploadData" + :headers="headers" :show-file-list="false" :on-success="handleChange" :file-list="fileList" @@ -159,6 +160,7 @@ import thrProductsImportDetail from "./ThrProductsImportDetail"; import thrProductsSelect from "./ThrProductsSelect"; import axios from "axios"; + import store from "@/store"; export default { data() { @@ -171,6 +173,7 @@ limit: 20, thirdSysFk: null, }, + headers:{}, udiImportDetailVisible: false, thrProductsSelectVisible: false, checked: false, @@ -396,6 +399,10 @@ }, components: {thrProductsImportDetail,thrProductsSelect}, created() { + this.headers = { + ADMIN_ID: store.getters.adminId, + ADMIN_TOKEN: store.getters.token, + }; this.getBasicThirdSys(); // this.getList(); },