| | |
| | | list.value = deepClone(res.data.data) |
| | | const data = produceList.value[0].value |
| | | dataList = JSON.parse(`[${data}]`); |
| | | console.log(switchType) |
| | | if (switchType===true){ |
| | | labelList = props.titleList |
| | | }else { |
| | |
| | | const newValue = event.target.innerText; |
| | | const parts = newValue.split(':'); |
| | | const result = parts[1]; // 获取冒号后的部分 |
| | | |
| | | // 获取映射中所有的键 |
| | | const keys = Object.keys(propertyMapping); |
| | | |
| | | // 根据 index 获取对应的属性名 |
| | | const propertyName = keys[index]; |
| | | |
| | | // 如果映射中没有该 index,直接返回 |
| | | if (!propertyName) { |
| | | console.warn('Unsupported index:', index); |
| | |
| | | if (propertyName === 'glassNumber' && glassNumber === obj.glassNumber){ |
| | | obj.glassNumber = result; |
| | | } |
| | | if (propertyName === 'width' && glassNumber === obj.glassNumber){ |
| | | obj.width = result; |
| | | } |
| | | if (propertyName === 'height' && glassNumber === obj.glassNumber){ |
| | | obj.height = result; |
| | | } |
| | | if (propertyName === 'custom1' && orderId === obj.orderId){ |
| | | obj.custom1 = result; |
| | | } |
| | | if (propertyName === 'custom2' && orderId === obj.orderId){ |
| | | obj.custom2 = result; |
| | | } |
| | | if (propertyName === 'custom3' && orderId === obj.orderId){ |
| | | obj.custom3 = result; |
| | | } |
| | | if (propertyName === 'custom4' && orderId === obj.orderId){ |
| | | obj.custom4 = result; |
| | | } |
| | | if (propertyName === 'custom5' && orderId === obj.orderId){ |
| | | obj.custom5 = result; |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | <div class="row4">{{ faceOrientation }}</div> |
| | | <div v-for="(item,id) in labelList" :class="company.printLabel.className.custom.contentRowName()"> |
| | | <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row1" contenteditable="true" @input="updateProductName($event, id,index)" v-text="item.title+':'+item1[item.name]"></div> |
| | | <div v-else class="row1" contenteditable="true" @input="updateProductName($event, id,index)" v-text="item.title+':'"></div> |
| | | <!-- <div class="row2" style="width: 100%;"><input class="contentRow2" v-model="item1[item.name]" @keyup="updataProductName()" style="border: none;"/></div>--> |
| | | <!-- <div v-if="item1[item.name] != null && item1[item.name] !== ''" class="row2" style="width: 100%;" contenteditable="true" @input="updateProductName($event, id)" v-text="item1[item.name]"></div>--> |
| | | </div> |