|
@@ -309,13 +309,14 @@
|
|
|
"
|
|
|
>
|
|
|
<el-select
|
|
|
+ v-if="asShow"
|
|
|
class="input-shadow"
|
|
|
size="small"
|
|
|
filterable
|
|
|
default-first-option
|
|
|
style="width: 100%"
|
|
|
v-model="tableForm[item.columnName]"
|
|
|
- @change="changeSelect(item.columnName)"
|
|
|
+ @change="changeSelect(item.columnName, item)"
|
|
|
placeholder="请选择"
|
|
|
>
|
|
|
<el-option
|
|
@@ -582,6 +583,7 @@ export default {
|
|
|
components: { Dialog, NoData },
|
|
|
data() {
|
|
|
return {
|
|
|
+ asShow: true,
|
|
|
loading: false,
|
|
|
flag: false,
|
|
|
serviceId: null,
|
|
@@ -737,13 +739,40 @@ export default {
|
|
|
this.noMore = false;
|
|
|
this.tableData = [];
|
|
|
},
|
|
|
- changeSelect(data) {
|
|
|
+ changeSelect(data, name) {
|
|
|
if (this.tableForm[data] === "") {
|
|
|
this.tableForm[data] = null;
|
|
|
}
|
|
|
this.tableForm[this.tableOptions[data][0].setvalue] =
|
|
|
this.tableForm[data];
|
|
|
- //
|
|
|
+ if (this.tableForm.beginNode) {
|
|
|
+ const datas = _.cloneDeep(this.tableColsCopy);
|
|
|
+ // const reqUts = [];
|
|
|
+ datas.forEach(async (item) => {
|
|
|
+ if (item.columnLabel === "开始位置") {
|
|
|
+ this.tableOptions.beginPosition = await this.getSelectData(
|
|
|
+ item.listqueryTemplateID,
|
|
|
+ this.tableForm.beginNode
|
|
|
+ );
|
|
|
+ this.asShow = false;
|
|
|
+ this.asShow = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.tableForm.endNode) {
|
|
|
+ const datas = _.cloneDeep(this.tableColsCopy);
|
|
|
+ // const reqUts = [];
|
|
|
+ datas.forEach(async (item) => {
|
|
|
+ if (item.columnLabel === "结束位置") {
|
|
|
+ this.tableOptions.endPosition = await this.getSelectData(
|
|
|
+ item.listqueryTemplateID,
|
|
|
+ this.tableForm.endNode
|
|
|
+ );
|
|
|
+ this.asShow = false;
|
|
|
+ this.asShow = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
inputChangeHandler(data) {
|
|
|
if (this.tableForm[data] === "") {
|
|
@@ -874,10 +903,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//获取弹框-下拉数据
|
|
|
- async getSelectData(id) {
|
|
|
+ async getSelectData(id, name) {
|
|
|
const { code, returnData } = await Query({
|
|
|
id,
|
|
|
- dataContent: [],
|
|
|
+ dataContent: name ? [name] : [],
|
|
|
});
|
|
|
if (code == 0) {
|
|
|
return returnData.listValues;
|
|
@@ -1006,12 +1035,66 @@ export default {
|
|
|
row.queryTemplateColumnSetID
|
|
|
);
|
|
|
this.tableForm = JSON.parse(JSON.stringify(data));
|
|
|
+ // if (this.tableForm.beginNode) {
|
|
|
+ // const datas = _.cloneDeep(this.tableColsCopy);
|
|
|
+ // datas.forEach(async (item) => {
|
|
|
+ // if (item.columnLabel === "开始位置") {
|
|
|
+ // this.tableOptions.beginPosition = await this.getSelectData(
|
|
|
+ // item.listqueryTemplateID,
|
|
|
+ // this.tableForm.beginNode
|
|
|
+ // );
|
|
|
+ // this.asShow = false;
|
|
|
+ // this.asShow = true;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // if (this.tableForm.endNode) {
|
|
|
+ // const datas = _.cloneDeep(this.tableColsCopy);
|
|
|
+ // datas.forEach(async (item) => {
|
|
|
+ // if (item.columnLabel === "结束位置") {
|
|
|
+ // this.tableOptions.endPosition = await this.getSelectData(
|
|
|
+ // item.listqueryTemplateID,
|
|
|
+ // this.tableForm.endNode
|
|
|
+ // );
|
|
|
+ // this.asShow = false;
|
|
|
+ // this.asShow = true;
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // }
|
|
|
// this.tableForm =this.tableForm;
|
|
|
// Object.entries(tableForm).forEach(([key, value]) => {
|
|
|
// this.tableForm[key] = value
|
|
|
// })
|
|
|
} else {
|
|
|
this.tableForm = JSON.parse(JSON.stringify(row));
|
|
|
+ if (this.tableForm.beginNode) {
|
|
|
+ const datas = _.cloneDeep(this.tableColsCopy);
|
|
|
+ // const reqUts = [];
|
|
|
+ datas.forEach(async (item) => {
|
|
|
+ if (item.columnLabel === "开始位置") {
|
|
|
+ this.tableOptions.beginPosition = await this.getSelectData(
|
|
|
+ item.listqueryTemplateID,
|
|
|
+ this.tableForm.beginNode
|
|
|
+ );
|
|
|
+ this.asShow = false;
|
|
|
+ this.asShow = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (this.tableForm.endNode) {
|
|
|
+ const datas = _.cloneDeep(this.tableColsCopy);
|
|
|
+ // const reqUts = [];
|
|
|
+ datas.forEach(async (item) => {
|
|
|
+ if (item.columnLabel === "结束位置") {
|
|
|
+ this.tableOptions.endPosition = await this.getSelectData(
|
|
|
+ item.listqueryTemplateID,
|
|
|
+ this.tableForm.endNode
|
|
|
+ );
|
|
|
+ this.asShow = false;
|
|
|
+ this.asShow = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
this.flag = true;
|
|
|
this.tableType = "edit";
|