优化低版本?.

newCac1.0
fanluyan 6 months ago
parent 23cbc8cc4e
commit 9c716e7a1b

@ -4,7 +4,7 @@
class="AddDialogBox"
:title="title"
:visible.sync="filedDialogshow"
width="520px"
width="820px"
:close-on-click-modal="false"
>
<div class="filedInfo">
@ -37,7 +37,9 @@
<div class="coltitle">
<span>表字段</span>
<span>导出字段</span>
<span>拆分sensorCode附加值</span>
</div>
<div
class="selectCol"
v-for="(item, index) in colData"
@ -55,6 +57,12 @@
placeholder="请输入值"
type="text"
></el-input>
<el-input
:disabled="!item.selected"
v-model="item.attachVal"
placeholder="请输入值"
type="text"
></el-input>
</div>
</div>
</div>
@ -113,12 +121,14 @@ export default {
(item) =>
item.hasOwnProperty("value") &&
item.hasOwnProperty("name") && // name
item.value !== "" && // name
item.value !== "" &&
// name
item.selected // valueundefinednull
) // valuename
.map((item) => ({
destFieldName: item.value,
fieldName: item.name,
attach: item.attachVal,
}));
let params = {
tablename: this.selectTableName,
@ -162,6 +172,7 @@ export default {
.map((item) => ({
destFieldName: item.value,
fieldName: item.name,
attach: item.attachVal,
}));
let params = {
tablename: this.selectTableName,
@ -242,8 +253,10 @@ export default {
// checkbox input
if (item.selected && !item.value) {
item.value = item.name; //
item.attachVal = item.attach;
} else {
item.value = "";
item.attachVal = "";
}
console.log(this.colData);
},
@ -270,6 +283,7 @@ export default {
...item, // 使
selected: false, // selectedfalse
value: "", // value
attachVal: "", // attachVal
}));
if (this.title == "新增字段导出映射") {
this.colData = [...this.colAllData]; // 使
@ -281,6 +295,7 @@ export default {
// selected true
colDataItem.selected = true;
colDataItem.value = syncField.destFieldName;
colDataItem.attachVal = syncField.attach;
// value colDataItem this.colAllData
//
// colDataItem.value = this.curdata; // curdata
@ -328,11 +343,15 @@ export default {
span {
font-weight: bold;
&:first-child {
width: 40%;
width: 30%;
margin-right: 24px;
}
&:nth-child(2) {
width: 30%;
margin-right: 24px;
}
&:last-child {
width: 50%;
width: 30%;
}
}
}
@ -341,11 +360,12 @@ export default {
align-items: center;
margin-bottom: 10px;
.el-checkbox {
width: 40%;
width: 30%;
margin-right: 24px;
}
.el-input {
width: 50%;
width: 30%;
margin-right: 24px;
}
}
}

@ -25,6 +25,8 @@
</el-table-column>
<el-table-column prop="destFieldName" label="导出字段">
</el-table-column>
<el-table-column prop="attach" label="拆分sensorCode附加值">
</el-table-column>
</el-table>
</template>
</el-table-column>

@ -292,9 +292,13 @@ export default {
this.ljOptions = res.data;
console.log("获取逻辑", this.icdid);
if (this.icdid !== null) {
this.ljName =
this.ljOptions.find((item) => item.id === this.icdid)
?.paramIndex || "";
// this.ljName =
// this.ljOptions.find((item) => item.id === this.icdid)
// ?.paramIndex || "";
const foundItem = this.ljOptions.find(
(item) => item.id === this.icdid
);
this.ljName = foundItem ? foundItem.paramIndex : "";
if (this.ljName !== "") {
this.getlistRpt(this.ljName);
}

Loading…
Cancel
Save