Kaynağa Gözat

数据结构下拉

chenrui  2 yıl önce
ebeveyn
işleme
e51aa428ed

+ 0 - 1
src/views/BasicsData/airportCompany/index.vue

@@ -178,7 +178,6 @@ const btnClick = (row, index, param) => {
         tableOptionser.value.push(element);
       }
     });
-    console.log(tableOptionser);
   } else if (param === 3) {
     msgTitle.value = "删除机场公司维护";
     flag.value = true;

+ 19 - 1
src/views/systemSettings/datastructure/index.vue

@@ -121,7 +121,8 @@ const flag = ref<Boolean>(false); //弹窗开关
 const type = ref<String>(""); //判断是否删除
 const msgTitle = ref<String>("新增数据结构"); //弹窗标题
 const tableColsCopys = reactive<Object>({}); //弹窗\
-const tableOptionser = ref<Array>([]); //弹窗下拉
+const tableOptionser = ref([]); //弹窗下拉
+const tableOptionCopys = ref([]); //弹窗下拉
 const tableForm = reactive({
   dataStructureID: "",
   structureName: "",
@@ -235,6 +236,18 @@ const delRemove = () => {
 const delRest = () => {
   flag.value = false;
 };
+//获取弹框-下拉数据
+const getSelectData = async (id, name) => {
+  const { code, returnData } = await Query({
+    id,
+    dataContent: name ? [name] : name === null ? [null] : [],
+  });
+  if (code == 0) {
+    tableOptionser.value = returnData.listValues;
+  } else {
+    tableOptionser.value = [];
+  }
+};
 //获取表格数据
 const getQuery = async () => {
   try {
@@ -256,6 +269,11 @@ const getQuery = async () => {
       }
       tableData.value.push(...returnData.listValues);
       tableCols.value = returnData.columnSet;
+      returnData.columnSet.forEach((item) => {
+        if (item.listqueryTemplateID && item.columnName === "datatype") {
+          getSelectData(item.listqueryTemplateID);
+        }
+      });
       tableCols.value.forEach((element) => {
         element.label = element.columnLabel;
         element.key = element.columnName;