重要凭证箱拉取

20240205
e 3 years ago
parent c6f12c9ed7
commit f39b4d182d
  1. 39
      src/pages/counter/list/index.vue

@ -115,7 +115,6 @@
<p v-if="popText=='密码器'" class="tips"></p>
<p v-else-if="popText=='重要空白凭证箱'||popText=='普通凭证箱'" class="tips">- 请从以下物品中选取所需材料 -</p>
<p v-else class="tips">- 请从物品栏选中或拖拽所需材料 -</p>
<div v-if="popText==='密码器'" style="width:800px;padding-right:150px;padding-top:80px">
<el-form :model="passwordForm" :rules="passwordRules" ref="form" label-width="180px">
<el-form-item label="密码" prop="password">
@ -827,18 +826,40 @@ export default {
sort: false,//
//
onEnd: function (/**Event*/evt) {
// console.log(refParamBox,'dom',refParamBox.getBoundingClientRect());
//
if(!that.$refs.goods) return that.$message.warning('非可拖拽的交互!')
let targetDom = that.$refs.goods.getBoundingClientRect()
console.log(evt.oldIndex)
if(evt.originalEvent.pageX<targetDom.right&&evt.originalEvent.pageX>targetDom.left){
if(evt.originalEvent.pageY<targetDom.bottom&&evt.originalEvent.pageY>targetDom.top){
console.log(evt)
// this.importanceArr[evt.oldIndex]
// this.importanceArr
alert('拉入到弹框')
/* oldindex识别是拖拽了哪个文件 */
console.log(that.importanceArr[evt.oldIndex].name,'执行拖拽2');
that.checkList.push(that.importanceArr[evt.oldIndex].name)
let ifElse = 0;
if(that.goodsShelfTotalData.length > 0){
for(var i=0;i<that.goodsShelfTotalData.length;i++){
if(that.goodsShelfTotalData[i].name == that.importanceArr[evt.oldIndex].name){
ifElse = ifElse+1
}else{
}
}
}
if (ifElse == 0){
that.goodsShelfTotalData.push(that.importanceArr[evt.oldIndex])
}
}
}
// // console.log(refParamBox,'dom',refParamBox.getBoundingClientRect());
// //
// let targetDom = that.$refs.goods.getBoundingClientRect()
// console.log(evt.oldIndex)
// if(evt.originalEvent.pageX<targetDom.right&&evt.originalEvent.pageX>targetDom.left){
// if(evt.originalEvent.pageY<targetDom.bottom&&evt.originalEvent.pageY>targetDom.top){
// console.log(evt)
// // this.importanceArr[evt.oldIndex]
// // this.importanceArr
// alert('')
// }
// }
},
});
},
@ -2598,7 +2619,7 @@ export default {
}
}
.box{
background-color: red;
//background-color: red;
border: 2px solid #e6e6e6;
height: 2vh;
width: 45%;

Loading…
Cancel
Save