20240205
luoJunYong.123 3 years ago
parent bafb42d28e
commit 7126c6b276
  1. 4
      src/App.vue
  2. 4
      src/api/api.js
  3. 17
      src/pages/counter/list/index.vue
  4. 13
      src/store/modules/system.js
  5. 3
      src/utils/utilFunction.js

@ -17,11 +17,15 @@
//localStorage //localStorage
if (util.local.get(Setting.storeKey) ) { if (util.local.get(Setting.storeKey) ) {
this.$store.replaceState(Object.assign({}, this.$store.state,util.local.get(Setting.storeKey))) this.$store.replaceState(Object.assign({}, this.$store.state,util.local.get(Setting.storeKey)))
this.$store.system.replaceState(Object.assign({}, sessionStorage.getItem('systemData')))
} }
//vuexlocalStorage //vuexlocalStorage
window.addEventListener("beforeunload",()=>{ window.addEventListener("beforeunload",()=>{
util.local.get(Setting.tokenKey) && util.local.set(Setting.storeKey,this.$store.state) util.local.get(Setting.tokenKey) && util.local.set(Setting.storeKey,this.$store.state)
sessionStorage.setItem('systemData', this.$store.system.state)
console.log('????/')
console.log(sessionStorage.getItem('systemData'))
}) })
} }
} }

@ -3,8 +3,8 @@ import router from '../router';
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// baseURL: "http://www.huorantech.cn:9000",//线上 // baseURL: "http://www.huorantech.cn:9000",//线上
baseURL: "http://39.108.250.202:9000/", // 中台测试服 // baseURL: "http://39.108.250.202:9000/", // 中台测试服
// baseURL: "http://192.168.31.137:9000/", // 赓 baseURL: "http://192.168.31.137:9000/", // 赓
// baseURL: "http://192.168.31.151:9000/", // 榕 // baseURL: "http://192.168.31.151:9000/", // 榕
// baseURL: "http://192.168.31.125:9000/", // 坤 // baseURL: "http://192.168.31.125:9000/", // 坤
// baseURL: 'http://39.108.250.202:9000', // baseURL: 'http://39.108.250.202:9000',

@ -104,7 +104,7 @@
<!-- 物品栏 --> <!-- 物品栏 -->
<div ref="goods" class="goods-dia" :class="{ active: showGoods }"> <div ref="goods" class="goods-dia" :class="{ active: showGoods }">
<!-- goodsShelfTotalData goods2 --> <!-- goodsShelfTotalData goods2 -->
<div :id="item.name" v-for="(item, index) in goodsShelfTotalData" :key="index" class=" justify-center" :class="{ checked: checkList.includes(item.id),file:true }" @click="dblClickFn(item,'goods')"> <div :id="item.name" v-for="(item, index) in goods2" :key="index" class=" justify-center" :class="{ checked: checkList.includes(item.id),file:true }" @click="dblClickFn(item,'goods')">
<img :style="item.name==='开户申请书'?'margin-top:10px;':''" :src="item.src" alt="" /> <img :style="item.name==='开户申请书'?'margin-top:10px;':''" :src="item.src" alt="" />
<p>{{item.name}}</p> <p>{{item.name}}</p>
</div> </div>
@ -979,6 +979,17 @@ export default {
} else { } else {
this.manageVisible = false; this.manageVisible = false;
} }
//localStorage
if(sessionStorage.getItem('systemKey')) {
this.$store.commit('system/containBusinessKey', sessionStorage.getItem('systemKey'))
console.log('---')
console.log(this.$store.state.system.businessKey)
}
window.addEventListener("beforeunload",()=>{
sessionStorage.setItem('systemKey', this.$store.state.system.businessKey)
})
}, },
mounted(){ mounted(){
let that = this let that = this
@ -1259,9 +1270,7 @@ export default {
// } // }
// }) // })
// }) // })
this.addGoods(clickList)
console.log(clickList)
// this.$store.commit('system/changeGoods',{push:arr}) // this.$store.commit('system/changeGoods',{push:arr})
// // 西 // // 西
// this.auditGoodsShelf.push({name:'', src:require('@/assets/img/goods/bankCard.png'), id:16}) // // this.auditGoodsShelf.push({name:'', src:require('@/assets/img/goods/bankCard.png'), id:16}) //

@ -32,8 +32,8 @@ export default {
needs: [] needs: []
}, },
'项目一': { '项目一': {
data: [14, 12, 11, 13], data: [15, 13, 23, 14],
needs: [0] needs: [16, 17]
} }
}, },
goods:[// 物品栏的物品 goods:[// 物品栏的物品
@ -76,6 +76,9 @@ export default {
], ],
}, },
mutations: { mutations: {
containBusinessKey(state, containKey) {
state.businessKey = containKey
},
setBusinessKey: (state, val) => { setBusinessKey: (state, val) => {
state.businessKey = val state.businessKey = val
}, },
@ -86,16 +89,18 @@ export default {
const needArr = [...state.businessSelect[state.businessKey].needs] const needArr = [...state.businessSelect[state.businessKey].needs]
for(let i=0; i<goods.length; i++) { for(let i=0; i<goods.length; i++) {
for(let j=0; j<needArr.length; j++) { for(let j=0; j<needArr.length; j++) {
if(goods[i].name === state.allGoods[needArr[j]].name) { if(goods[i] === needArr[j]) {
console.log(goods[i] + '- -' + needArr[j])
// 如果这个物品是这个项目需要添加的 就加进去 否则不添加 // 如果这个物品是这个项目需要添加的 就加进去 否则不添加
state.businessSelect[state.businessKey].data.push(needArr[j]) state.businessSelect[state.businessKey].data.push(needArr[j])
// 加进去了 下次就添加不了了 // 加进去了 下次就添加不了了
state.businessSelect[state.businessKey].needs.splice(j,1) state.businessSelect[state.businessKey].needs.splice(j,1)
break; break;
}else {
console.log('???')
} }
} }
} }
state.businessSelect[state.businessKey].data.push(...goods)
}, },
deleteGoods: (state, index) => { deleteGoods: (state, index) => {
// 传个物品对象过来 // 传个物品对象过来

@ -156,7 +156,8 @@ const autoPlay = (parentId, form, myTable2, myTable, cards=[]) => {
let params= { let params= {
parentId, parentId,
lcJudgmentRuleReq:formList, lcJudgmentRuleReq:formList,
projectId:+projectId, projectId: 11,
// projectId:+projectId,
startTime:startTime, startTime:startTime,
} }
console.log('---提交的') console.log('---提交的')

Loading…
Cancel
Save