This commit is contained in:
duanxiaohai 2024-10-08 09:11:07 +08:00
parent 31ea03965a
commit 321f3c9e17
1 changed files with 5 additions and 10 deletions

View File

@ -230,10 +230,8 @@ const data = reactive({
title: "", title: "",
typeId: "", typeId: "",
columns: [], columns: [],
tableData: { deng: 1 }, tableData: [],
xq: { xq: {},
deng: 0,
},
typeId: "", typeId: "",
sfzhm: "", sfzhm: "",
xh: "", xh: "",
@ -260,7 +258,7 @@ watch(
(newVal, oldVal) => { (newVal, oldVal) => {
dialogShow.value = newVal; dialogShow.value = newVal;
if (props.dialogShow == true) { if (props.dialogShow == true) {
console.log(6666, props.tableData); // console.log(props.tableData);
data.xq = props.tableData.data.xq; data.xq = props.tableData.data.xq;
data.typeId = props.tableData.typeId; data.typeId = props.tableData.typeId;
data.sfzhm = props.tableData.data.xq.sfzhm; data.sfzhm = props.tableData.data.xq.sfzhm;
@ -270,16 +268,14 @@ watch(
data.columns = props.tableData.columns; data.columns = props.tableData.columns;
data.tableData.length = 0; data.tableData.length = 0;
if (props.tableData.data.wxs.length > 0) { if (props.tableData.data.wxs.length > 0) {
console.log(444);
props.tableData.data.wxs.forEach((item, index) => { props.tableData.data.wxs.forEach((item, index) => {
let obj = { let obj = {
deng: 2, deng: 2,
bzlx: item.bzlx, bzlx: item.bzlx,
}; };
// data.tableData.push(obj); data.tableData.push(obj);
}); });
} }
// data.tableData.length = []; // data.tableData.length = [];
if (props.tableData.data.ysx.length > 0) { if (props.tableData.data.ysx.length > 0) {
props.tableData.data.ysx.forEach((item, index) => { props.tableData.data.ysx.forEach((item, index) => {
@ -287,10 +283,9 @@ watch(
deng: 1, deng: 1,
bzlx: item.bzlx, bzlx: item.bzlx,
}; };
// data.tableData.push(obj); data.tableData.push(obj);
}); });
} }
console.log(777, props.tableData);
data.tableData = data.tableData.map((item, index1) => { data.tableData = data.tableData.map((item, index1) => {
return { return {
...item, ...item,