diff --git a/src/api/model/system.js b/src/api/model/system.js index d444c81d..5accd698 100644 --- a/src/api/model/system.js +++ b/src/api/model/system.js @@ -406,10 +406,9 @@ export default { }, config: { base: { - url: `${config.API_URL}/system/base_config/`, name: "账户信息", - req: async function(){ - return await http.get(this.url); + req: async function(project){ + return await http.get(`${config.API_URL}/system/base_config/${project}`); } }, getInfo: { diff --git a/src/views/home/widgets/index_photon.vue b/src/views/home/widgets/index_photon.vue index 4c85a50d..69dff711 100644 --- a/src/views/home/widgets/index_photon.vue +++ b/src/views/home/widgets/index_photon.vue @@ -402,7 +402,7 @@ export default { let that = this; let date = that.yesterday; let obj6 ={ - query: {start_date:date,end_date:date}, + query: {start_date:date,end_date:date,mio_type: 'sale_out'}, }; let obj7 ={ query: {start_date:date,end_date:date,dept_name: "7车间"}, @@ -413,7 +413,7 @@ export default { let date0 = that.yesterdayBefore; let obj06 ={ - query: {start_date:date0,end_date:date0}, + query: {start_date:date0,end_date:date0,mio_type: 'sale_out'}, }; let obj07 ={ query: {start_date:date0,end_date:date0,dept_name: "7车间"}, @@ -472,7 +472,7 @@ export default { let start_date = that.year_s+'-'+that.month_s+'-01'; let end_date = that.year_s+'-'+that.month_s+'-'+that.day_s; let obj6 ={ - query: {start_date:start_date,end_date:end_date}, + query: {start_date:start_date,end_date:end_date,mio_type: 'sale_out'}, }; let obj7 ={ query: {start_date:start_date,end_date:end_date,dept_name: "7车间"}, diff --git a/src/views/login/index.vue b/src/views/login/index.vue index b0a30949..2e29ac75 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -147,16 +147,22 @@ //console.log('%c SCUI %c Gitee: https://gitee.com/lolicode/scui', 'background:#666;color:#fff;border-radius:3px;', '') }, mounted(){ + let url1 = window.location.origin; + this.project_code = url1.split('/')[3]; this.getDept(); }, methods: { getDept(){ let that = this; - that.$API.system.config.base.req().then((res) => { + let project = ''; + if(that.project_code==undefined){}else{ + project = '?project='+that.project_code; + } + that.$API.system.config.base.req(project).then((res) => { that.baseConfig = res.base; - this.$store.commit("SET_baseName", res.base.base_name); - this.$store.commit("SET_baseLogo", res.base.base_logo); - this.$TOOL.data.set("BASE_INFO", res) + that.$store.commit("SET_baseName", res.base.base_name); + that.$store.commit("SET_baseLogo", res.base.base_logo); + that.$TOOL.data.set("BASE_INFO", res) }) }, appDown() {