|
@@ -47,7 +47,7 @@
|
|
|
<el-col v-for="(item, index) in tableColsCopy" :key="index" :span="rows">
|
|
|
<el-form-item :label="item.columnLabel">
|
|
|
<template v-if="item.listqueryTemplateID || item.listqueryTemplateID == 0">
|
|
|
- <el-select class="input-shadow" size="default" filterable default-first-option style="width: 100%" v-model="tableForm[item.columnName]" placeholder="请选择" clearable @clear="tableForm[item.columnName] = ''">
|
|
|
+ <el-select class="input-shadow" size="default" filterable default-first-option style="width: 100%" v-model="tableForm[item.columnName]" placeholder="请选择" clearable>
|
|
|
<el-option v-for="citem in tableOptions[item.columnName]" :key="citem.v ? citem.v : citem.planDepartureApt" :label="citem.k ? citem.k : citem.planDepartureApt" :value="citem.setlabel === 'positionDescribe' ? citem.v : citem.v != undefined ? citem.v : citem.planDepartureApt">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -103,7 +103,7 @@ const props = defineProps({
|
|
|
//弹框-表单文字宽度
|
|
|
labelWidth: {
|
|
|
type: String,
|
|
|
- default: "80px",
|
|
|
+ default: "100px",
|
|
|
},
|
|
|
//弹框表单-行数
|
|
|
rows: {
|
|
@@ -129,6 +129,7 @@ const filterValues = ref<any>({}); //表头-下拉-选中数据
|
|
|
const tableDataFilters = ref<any>({}); //表头-下拉数据
|
|
|
const tableGroups = ref<any>([]); //表格分组数据
|
|
|
const btnGroups = ref<any>([]); //操作-按钮-额外数据
|
|
|
+const tableArrs = ref<any>([]);
|
|
|
const pageTitle = ref<any>("");
|
|
|
const rowTitle = ref("");
|
|
|
const delTitle = ref("");
|
|
@@ -175,6 +176,20 @@ const getQuery = async (id) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
+//获取弹框-下拉数据
|
|
|
+const getSelectData = async (id, name?) => {
|
|
|
+ // name ? [name] : name === null ? [null]: [],
|
|
|
+ const { code, returnData } = await Query({
|
|
|
+ id,
|
|
|
+ dataContent: name ? [name] : name === null ? [null] : [],
|
|
|
+ });
|
|
|
+ if (code == 0) {
|
|
|
+ return returnData.listValues;
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
//初始化表格
|
|
|
const initTableData = () => {
|
|
|
tableColsCopy.value = tableCols.value.filter((item) => item.needShow);
|
|
@@ -185,6 +200,36 @@ const initTableData = () => {
|
|
|
if (item.needGroup) {
|
|
|
tableGroups.value.push(item.columnName);
|
|
|
}
|
|
|
+ if (item.listqueryTemplateID || item.listqueryTemplateID == 0) {
|
|
|
+ tableArrs.value.push(item.columnName);
|
|
|
+ if (!tableOptions.value[item.columnName]) {
|
|
|
+ //开始位置beginPosition 结束位置endPosition (区分开始结束位置必须传null)
|
|
|
+ if (
|
|
|
+ item.columnName !== "beginPosition" &&
|
|
|
+ item.columnName !== "endPosition"
|
|
|
+ ) {
|
|
|
+ tableOptions.value[item.columnName] = await getSelectData(
|
|
|
+ item.listqueryTemplateID
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ tableOptions.value[item.columnName] = await getSelectData(
|
|
|
+ item.listqueryTemplateID,
|
|
|
+ null
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (
|
|
|
+ item.columnName === "beginPosition" ||
|
|
|
+ item.columnName === "endPosition"
|
|
|
+ ) {
|
|
|
+ tableOptions.value[item.columnName] = await getSelectData(
|
|
|
+ item.listqueryTemplateID,
|
|
|
+ null
|
|
|
+ );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ //
|
|
|
+ }
|
|
|
});
|
|
|
setTableFilters(tableData.value, tableDataFilters.value);
|
|
|
};
|
|
@@ -265,15 +310,28 @@ const handleEdit = (row) => {
|
|
|
};
|
|
|
const handleOther = (item, row) => {
|
|
|
const queryparams = item.queryparams;
|
|
|
- const arr = queryparams.split(",");
|
|
|
- const obj = <any>{};
|
|
|
- arr.forEach((p) => {
|
|
|
- obj[p] = item[p];
|
|
|
- });
|
|
|
- router.push({
|
|
|
- path: item.route_info,
|
|
|
- query: obj,
|
|
|
- });
|
|
|
+ if (queryparams) {
|
|
|
+ if (queryparams.includes(",")) {
|
|
|
+ const arr = queryparams.split(",");
|
|
|
+ const obj = <any>{};
|
|
|
+ arr.forEach((p) => {
|
|
|
+ obj[p] = item[p];
|
|
|
+ });
|
|
|
+ router.push({
|
|
|
+ path: item.route_info,
|
|
|
+ query: obj,
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ const obj = <any>{};
|
|
|
+ obj[queryparams] = item[queryparams];
|
|
|
+ router.push({
|
|
|
+ path: item.route_info,
|
|
|
+ query: obj,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ router.push(item.route_info);
|
|
|
+ }
|
|
|
};
|
|
|
//表格数据删除弹框
|
|
|
const handleRemove = (row) => {
|