Browse Source

递归增加查询表字段

lcl 7 months ago
parent
commit
c27f6ffcf8

+ 11 - 5
src/views/pri/priLoopSet/components/add/index.vue

@@ -35,6 +35,7 @@ const props = defineProps<{
 let UpdateForm = ref({
   listId: props.listId, //配置ID
   loopModel: "", //执行模式
+  tableEnName: "", //查询表
   parentField: "", //父ID字段
   sonField: "", //子ID字段
 
@@ -76,10 +77,11 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
-      listId: props.listId, //配置ID
-      loopModel: "", //执行模式
-      parentField: "", //父ID字段
-      sonField: "", //子ID字段
+          listId: props.listId, //配置ID
+          loopModel: "", //执行模式
+          tableEnName: "", //查询表
+          parentField: "", //父ID字段
+          sonField: "", //子ID字段
 
         };
         // 关闭新增弹窗;
@@ -103,7 +105,7 @@ const submit = async (formEl) => {
 
 //获取配置ID数据
 const listIdQuery = async () => {
-  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriListDic.method, url: UrlList.prizeSet.prigetPriListDic.url, params: { } });
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriListDic.method, url: UrlList.prizeSet.prigetPriListDic.url, params: {} });
   if (status === 1) {
     listIdOptionList.value = data.records;
   }
@@ -122,6 +124,7 @@ const closeVisible = () => {
   UpdateForm.value = {
     listId: props.listId, //配置ID
     loopModel: "", //执行模式
+    tableEnName: "", //查询表
     parentField: "", //父ID字段
     sonField: "", //子ID字段
 
@@ -151,6 +154,9 @@ const isFullscreen = ref(false)
           clearable,
         )
           el-option(:label="item.label", :value="item.id" v-for="(item,index) in loopModelOptionList")
+      el-form-item(label='查询表' prop="tableEnName")
+        el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
+          placeholder="请输入查询表")
       el-form-item(label='父ID字段' prop="parentField")
         el-input(v-model='UpdateForm.parentField' autocomplete='off'
           placeholder="请输入父ID字段")

+ 11 - 5
src/views/pri/priLoopSet/components/updatePriLoopSet/index.vue

@@ -32,6 +32,7 @@ const props = defineProps<{
 const UpdateForm: any = ref({
   id: null, //ID
   loopModel: "", //执行模式
+  tableEnName: "", //查询表
   parentField: "", //父ID字段
   sonField: "", //子ID字段
 
@@ -68,10 +69,11 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
-      id: null, //ID
-      loopModel: "", //执行模式
-      parentField: "", //父ID字段
-      sonField: "", //子ID字段
+          id: null, //ID
+          loopModel: "", //执行模式
+          tableEnName: "", //查询表
+          parentField: "", //父ID字段
+          sonField: "", //子ID字段
 
         };
         // 关闭修改弹窗;
@@ -104,7 +106,7 @@ const rules = reactive({
 const closeFn: any = inject('closeEditUpdatePriLoopSetVisible');
 const openVisible = async () => {
   //通过ID获取表格数据
-  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriLoopSetQuery.method, url: UrlList.prizeSet.prigetPriLoopSetQuery.url, params: { id: props.formData.id }});
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriLoopSetQuery.method, url: UrlList.prizeSet.prigetPriLoopSetQuery.url, params: { id: props.formData.id } });
   if (status === 1) {
     UpdateForm.value = data;
 
@@ -115,6 +117,7 @@ const closeUpdatePriLoopSetVisible = () => {
   UpdateForm.value = {
     id: null, //ID
     loopModel: "", //执行模式
+    tableEnName: "", //查询表
     parentField: "", //父ID字段
     sonField: "", //子ID字段
 
@@ -140,6 +143,9 @@ const isFullscreen = ref(false)
           clearable,
         )
           el-option(:label="item.label", :value="item.id" v-for="(item,index) in loopModelOptionList")
+      el-form-item(label='查询表' prop="tableEnName")
+        el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
+          placeholder="请输入查询表")
       el-form-item(label='父ID字段' prop="parentField")
         el-input(v-model='UpdateForm.parentField' autocomplete='off'
           placeholder="请输入父ID字段")