|
@@ -287,6 +287,7 @@ const setFormDataNum = (datas) => {
|
|
|
formData.value = newArr
|
|
|
}
|
|
|
const sampledata=ref([])
|
|
|
+const positiondata=ref([])
|
|
|
//展开事件
|
|
|
const ActiveKey = ref('')
|
|
|
const formKeyIds = ref('')
|
|
@@ -398,18 +399,6 @@ const setTableFormBlurReg = (pkeyId, event, key, reg, val, msg, item, index) =>
|
|
|
}
|
|
|
}
|
|
|
//关联取样成功改变所有表格取样名称数据
|
|
|
-// const changeSimpleInput=(infodata,id)=>{
|
|
|
-// formData.value.forEach((item)=>{
|
|
|
-// if(item.pkeyId==id){
|
|
|
-// for(let i in infodata){
|
|
|
-// item[i]=infodata[i]
|
|
|
-// }
|
|
|
-// }
|
|
|
-
|
|
|
-
|
|
|
-// })
|
|
|
-// console.log( formData.value,' formData.value');
|
|
|
-// }
|
|
|
const getsampleData=()=>{
|
|
|
console.log(sampledata.value,'sampledata.value');
|
|
|
if(sampledata.value.length>0){
|
|
@@ -424,11 +413,29 @@ const getsampleData=()=>{
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+//getPositionData关联取样成功改变所有表格工程部位数据
|
|
|
+const getPositionData=()=>{
|
|
|
+ console.log(positiondata.value,'positiondata.value');
|
|
|
+ if(positiondata.value.length>0){
|
|
|
+ formData.value.forEach((ele)=>{
|
|
|
+ positiondata.value.forEach((item)=>{
|
|
|
+ if(item.tabPKeyId===ele.pkeyId){
|
|
|
+ for(let i in item){
|
|
|
+ ele[i]=item[i]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ console.log(formData.value,'formData.value');
|
|
|
+ }
|
|
|
+}
|
|
|
const changeSimpleInput=(infodata,id)=>{
|
|
|
sampledata.value=infodata
|
|
|
-
|
|
|
- getsampleData()
|
|
|
-
|
|
|
+ getsampleData()
|
|
|
+}
|
|
|
+const changePositionInput =(infodata)=>{
|
|
|
+ positiondata.value=infodata
|
|
|
+ getPositionData()
|
|
|
}
|
|
|
|
|
|
|
|
@@ -452,6 +459,7 @@ const getBussDataInfo = async (item, index) => {
|
|
|
isCollapseLoad: true
|
|
|
}
|
|
|
getsampleData()
|
|
|
+ getPositionData()
|
|
|
}else{
|
|
|
console.log(2222222222);
|
|
|
data.forEach((item1)=>{
|
|
@@ -464,12 +472,14 @@ const getBussDataInfo = async (item, index) => {
|
|
|
isCollapseLoad: true
|
|
|
}
|
|
|
getsampleData()
|
|
|
+ getPositionData()
|
|
|
}else {
|
|
|
formData.value[index] = {
|
|
|
...getFormDataInit(item),
|
|
|
isCollapseLoad: true
|
|
|
}
|
|
|
getsampleData()
|
|
|
+ getPositionData()
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -1194,7 +1204,9 @@ defineExpose({
|
|
|
getFormRegExpJson,
|
|
|
getActiveKey,
|
|
|
setActiveKey,
|
|
|
- changeSimpleInput
|
|
|
+ changeSimpleInput,
|
|
|
+ changePositionInput
|
|
|
+
|
|
|
})
|
|
|
|
|
|
</script>
|