Browse Source

1

fix_bug_pro20231227
zhangsiyu 2 years ago
parent
commit
c40337df75
  1. 16
      src/page/index/top/index.vue
  2. 2
      src/views/distribution/reservation/atlas.vue
  3. 4
      vite.config.js

16
src/page/index/top/index.vue

@ -29,6 +29,9 @@
<div class="top-bar__item" v-if="setting.debug">
<top-logs></top-logs>
</div>
<div class="top-bar__item">
<view>{{ datalist[checkwarehousevalue]?.name||'' }}</view>
</div>
<div class="top-user">
<img class="top-bar__img" :src="userInfo.avatar" />
<el-dropdown>
@ -109,9 +112,18 @@ export default {
isshow: false,
datalist: [],
warehousevalue: '',
checkwarehousevalue:0,
};
},
mounted() {},
mounted() {
getMyWarehouseList().then(res => {
console.log(res.data.data, 'getMyWarehouseList');
let arr = [{ name: '全部', id: '0' }];
this.datalist = arr.concat(res.data.data);
});
this.checkwarehousevalue=Number(localStorage.getItem('checkwarehousevalue'))
console.log(this.checkwarehousevalue)
},
filters: {},
created() {},
computed: {
@ -140,6 +152,7 @@ export default {
let res = await getclearWarehouseCache({});
if (res.data.code == 200) {
this.$message({ message: '切换成功', type: 'success' });
localStorage.setItem('checkwarehousevalue',this.warehousevalue)
this.$router.push({
path: '/',
});
@ -153,6 +166,7 @@ export default {
let res = await preserveCurrentWarehouse(this.datalist[this.warehousevalue]);
if (res.data.code == 200) {
this.$message({ message: '切换成功', type: 'success' });
localStorage.setItem('checkwarehousevalue',this.warehousevalue)
this.$router.push({
path: '/',
});

2
src/views/distribution/reservation/atlas.vue

@ -57,7 +57,7 @@ onMounted(() => {
watchEffect(() => {
console.log(router.currentRoute.value.query.id);
details.item = router.currentRoute.value.query.id;
if(!details.item)return
if(!details.item) return
getReservationAddr(details.item).then(res => {
// selectStockArticleAtlasInfo(details.item.id).then(res => {
console.log(res.data.data);

4
vite.config.js

@ -14,10 +14,10 @@ export default ({ mode, command }) => {
'/api': {
// target: 'http://192.168.10.126:8889',
// target: 'http://192.168.10.48:8888',
target: 'http://192.168.10.123:8889',
// target: 'http://192.168.10.123:8889',
// target: 'http://192.168.10.75:8777',
// target: 'http://192.168.10.29:13000',
// target: 'http://test.api.huitongys.com',
target: 'http://test.api.huitongys.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},

Loading…
Cancel
Save