Parcourir la source

区分数据库配置

lcl il y a 7 mois
Parent
commit
11d8689863

+ 17 - 3
src/views/pri/priCondition/components/add/index.vue

@@ -12,6 +12,7 @@ let UrlList = reactive(null)
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
   listIdQuery();
+  returnFieldIdQuery();
 
 })
 // 组件传参对象
@@ -136,6 +137,15 @@ const listIdQuery = async () => {
   }
 };
 
+// 条件返回字段
+const returnFieldIdOptionList = ref([]);
+const returnFieldIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriReturnFieldList.method, url: UrlList.prizeSet.prigetPriReturnFieldList.url, params: {} });
+  if (status === 1) {
+    returnFieldIdOptionList.value = data.records;
+  }
+};
+
 
 
 // 表单校验规则
@@ -175,9 +185,13 @@ const isFullscreen = ref(false)
           clearable,
         )
           el-option(:label="item.prizeName", :value="item.id" v-for="(item,index) in listIdOptionList")
-      el-form-item(label='条件返回字段' prop="returnFieldId")
-        el-input-number(v-model='UpdateForm.returnFieldId' :min="1" :max="1000"
-          placeholder="请输入条件返回字段")
+      el-form-item(label="条件返回字段", prop="returnFieldId")
+        el-select(
+          v-model="UpdateForm.returnFieldId",
+          placeholder="请选择条件返回字段",
+          clearable,
+        )
+          el-option(:label="item.fieldEnName + item.fieldName", :value="item.id" v-for="(item,index) in returnFieldIdOptionList")
       el-form-item(label="匹配条件", prop="fieldQueryKind")
         el-select(
           v-model="UpdateForm.fieldQueryKind",

+ 17 - 3
src/views/pri/priCondition/components/updatePriCondition/index.vue

@@ -12,6 +12,7 @@ let UrlList = reactive(null)
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
   listIdQuery();
+  returnFieldIdQuery();
 
 })
 const props = defineProps<{
@@ -133,6 +134,15 @@ const listIdQuery = async () => {
   }
 };
 
+// 条件返回字段
+const returnFieldIdOptionList = ref([]);
+const returnFieldIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriReturnFieldList.method, url: UrlList.prizeSet.prigetPriReturnFieldList.url, params: {} });
+  if (status === 1) {
+    returnFieldIdOptionList.value = data.records;
+  }
+};
+
 
 
 // 表单校验规则
@@ -184,9 +194,13 @@ const isFullscreen = ref(false)
           clearable,
         )
           el-option(:label="item.prizeName", :value="item.id" v-for="(item,index) in listIdOptionList")
-      el-form-item(label='条件返回字段' prop="returnFieldId")
-        el-input-number(v-model='UpdateForm.returnFieldId' :min="1" :max="1000"
-          placeholder="请输入条件返回字段")
+      el-form-item(label="条件返回字段", prop="returnFieldId")
+        el-select(
+          v-model="UpdateForm.returnFieldId",
+          placeholder="请选择条件返回字段",
+          clearable,
+        )
+          el-option(:label="item.fieldEnName + item.fieldName", :value="item.id" v-for="(item,index) in returnFieldIdOptionList")
       el-form-item(label="匹配条件", prop="fieldQueryKind")
         el-select(
           v-model="UpdateForm.fieldQueryKind",

+ 14 - 1
src/views/pri/priCondition/hook.tsx

@@ -14,6 +14,7 @@ export function usePriCondition() {
     UrlList = await getGroupUrl(["prizeSet"]);
     onSearch(ruleFormRef.value);
     listIdQuery();
+    returnFieldIdQuery();
 
   });
   let form = reactive({
@@ -51,7 +52,11 @@ export function usePriCondition() {
     {
       label: "条件返回字段",
       prop: "returnFieldId",
-      minWidth: 200
+      minWidth: 200,
+      formatter: ({ returnFieldId }) => {
+        var obj = returnFieldIdOptionList.value.find(item => item.id == returnFieldId);
+        return obj ? obj.fieldEnName + obj.fieldName : ''
+      },
     },
     {
       label: "匹配条件",
@@ -144,6 +149,14 @@ export function usePriCondition() {
       listIdOptionList.value = data.records;
     }
   }
+  // 条件返回字段
+  const returnFieldIdOptionList = ref([]);
+  const returnFieldIdQuery = async () => {
+    const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriReturnFieldList.method, url: UrlList.prizeSet.prigetPriReturnFieldList.url, params: {} });
+    if (status === 1) {
+      returnFieldIdOptionList.value = data.records;
+    }
+  };
 
 
 

+ 6 - 0
src/views/pri/priDatabaseSet/components/add/index.vue

@@ -33,6 +33,7 @@ const props = defineProps<{
 }>();
 // 表单数据
 let UpdateForm = ref({
+  title: "", //数据库名称
   ipAddress: "", //IP地址
   port: null, //端口
   userId: "", //用户名
@@ -74,6 +75,7 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
+          title: "", //数据库名称
           ipAddress: "", //IP地址
           port: null, //端口
           userId: "", //用户名
@@ -135,6 +137,7 @@ const closeFn: any = inject("closeAddVisible");
 const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
+    title: "", //数据库名称
     ipAddress: "", //IP地址
     port: null, //端口
     userId: "", //用户名
@@ -154,6 +157,9 @@ const isFullscreen = ref(false)
 .main
   el-dialog(v-model='props.addVisible' width="50%" :fullscreen="isFullscreen" title="新增" draggable @close="closeVisible")
     el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
+      el-form-item(label='数据库名称' prop="title")
+        el-input(v-model='UpdateForm.title' autocomplete='off'
+          placeholder="请输入数据库名称")
       el-form-item(label='IP地址' prop="ipAddress")
         el-input(v-model='UpdateForm.ipAddress' autocomplete='off'
           placeholder="请输入IP地址")

+ 6 - 0
src/views/pri/priDatabaseSet/components/updatePriDatabaseSet/index.vue

@@ -31,6 +31,7 @@ const props = defineProps<{
 // 表单数据
 const UpdateForm: any = ref({
   id: null, //ID
+  title: "", //数据库名称
   ipAddress: "", //IP地址
   port: null, //端口
   userId: "", //用户名
@@ -67,6 +68,7 @@ const submit = async (formEl) => {
         });
         UpdateForm.value = {
           id: null, //ID
+          title: "", //数据库名称
           ipAddress: "", //IP地址
           port: null, //端口
           userId: "", //用户名
@@ -126,6 +128,7 @@ const openVisible = async () => {
 const closeUpdatePriDatabaseSetVisible = () => {
   UpdateForm.value = {
     id: null, //ID
+    title: "", //数据库名称
     ipAddress: "", //IP地址
     port: null, //端口
     userId: "", //用户名
@@ -147,6 +150,9 @@ const isFullscreen = ref(false)
       el-form-item(label='ID' prop="id")
         el-input-number(v-model='UpdateForm.id' :min="1" :max="100000"
           placeholder="请输入ID")
+      el-form-item(label='数据库名称' prop="title")
+        el-input(v-model='UpdateForm.title' autocomplete='off'
+          placeholder="请输入数据库名称")
       el-form-item(label='IP地址' prop="ipAddress")
         el-input(v-model='UpdateForm.ipAddress' autocomplete='off'
           placeholder="请输入IP地址")

+ 5 - 0
src/views/pri/priDatabaseSet/hook.tsx

@@ -50,6 +50,11 @@ export function usePriDatabaseSet() {
       prop: "id",
       minWidth: 200
     },
+    {
+      label: "数据库名称",
+      prop: "title",
+      minWidth: 200
+    },
     {
       label: "IP地址",
       prop: "ipAddress",

+ 22 - 4
src/views/pri/priPrizeInTable/components/add/index.vue

@@ -11,6 +11,7 @@ let UrlList = reactive(null)
 // 获取当前板块接口列表
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
+  databaseIdQuery();
 
 })
 // 组件传参对象
@@ -33,6 +34,7 @@ const props = defineProps<{
 // 表单数据
 let UpdateForm = ref({
   listId: props.listId, //奖励配置
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
   excuteKind: "", //执行方式
 
@@ -73,9 +75,10 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
-      listId: props.listId, //奖励配置
-      tableEnName: "", //查询表
-      excuteKind: "", //执行方式
+          listId: props.listId, //奖励配置
+          databaseId: null, //查询数据库
+          tableEnName: "", //查询表
+          excuteKind: "", //执行方式
 
         };
         // 关闭新增弹窗;
@@ -98,7 +101,14 @@ const submit = async (formEl) => {
 };
 
 
-
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 // 表单校验规则
 const rules = reactive({
@@ -113,6 +123,7 @@ const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
     listId: props.listId, //奖励配置
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
     excuteKind: "", //执行方式
 
@@ -131,6 +142,13 @@ const isFullscreen = ref(false)
       el-form-item(label='奖励配置' prop="listId")
         el-input(v-model='UpdateForm.listId' autocomplete='off'
           placeholder="请输入奖励配置")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 23 - 5
src/views/pri/priPrizeInTable/components/updatePriPrizeInTable/index.vue

@@ -11,6 +11,7 @@ let UrlList = reactive(null)
 // 获取当前板块接口列表
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
+  databaseIdQuery();
 
 })
 const props = defineProps<{
@@ -31,6 +32,7 @@ const props = defineProps<{
 // 表单数据
 const UpdateForm: any = ref({
   id: null, //ID
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
   excuteKind: "", //执行方式
 
@@ -68,9 +70,10 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
-      id: null, //ID
-      tableEnName: "", //查询表
-      excuteKind: "", //执行方式
+          id: null, //ID
+          databaseId: null, //查询数据库
+          tableEnName: "", //查询表
+          excuteKind: "", //执行方式
 
         };
         // 关闭修改弹窗;
@@ -92,7 +95,14 @@ const submit = async (formEl) => {
   })
 };
 
-
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 
 // 表单校验规则
@@ -106,7 +116,7 @@ const rules = reactive({
 const closeFn: any = inject('closeEditUpdatePriPrizeInTableVisible');
 const openVisible = async () => {
   //通过ID获取表格数据
-  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriPrizeInTableQuery.method, url: UrlList.prizeSet.prigetPriPrizeInTableQuery.url, params: { id: props.formData.id }});
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriPrizeInTableQuery.method, url: UrlList.prizeSet.prigetPriPrizeInTableQuery.url, params: { id: props.formData.id } });
   if (status === 1) {
     UpdateForm.value = data;
 
@@ -116,6 +126,7 @@ const openVisible = async () => {
 const closeUpdatePriPrizeInTableVisible = () => {
   UpdateForm.value = {
     id: null, //ID
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
     excuteKind: "", //执行方式
 
@@ -134,6 +145,13 @@ const isFullscreen = ref(false)
       el-form-item(label='ID' prop="id")
         el-input-number(v-model='UpdateForm.id' :min="1" :max="1000"
           placeholder="请输入ID")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 19 - 0
src/views/pri/priPrizeObjectTable/components/add/index.vue

@@ -12,6 +12,7 @@ let UrlList = reactive(null)
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
   projectIdQuery();
+  databaseIdQuery();
 
 })
 // 组件传参对象
@@ -34,6 +35,7 @@ const props = defineProps<{
 // 表单数据
 let UpdateForm = ref({
   projectId: props.projectId, //项目
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
   prizeListIds: "", //指定奖励配置
   selectField: "", //取值字段
@@ -73,6 +75,7 @@ const submit = async (formEl) => {
         });
         UpdateForm.value = {
           projectId: props.projectId, //项目
+          databaseId: null, //查询数据库
           tableEnName: "", //查询表
           prizeListIds: "", //指定奖励配置
           selectField: "", //取值字段
@@ -104,6 +107,14 @@ const projectIdQuery = async () => {
     projectIdOptionList.value = data.records;
   }
 };
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 
 
@@ -123,6 +134,7 @@ const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
     projectId: props.projectId, //项目
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
     prizeListIds: "", //指定奖励配置
     selectField: "", //取值字段
@@ -146,6 +158,13 @@ const isFullscreen = ref(false)
           clearable,
         )
           el-option(:label="item.projectName", :value="item.id" v-for="(item,index) in projectIdOptionList")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 19 - 1
src/views/pri/priPrizeObjectTable/components/updatePriPrizeObjectTable/index.vue

@@ -11,6 +11,7 @@ let UrlList = reactive(null)
 // 获取当前板块接口列表
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
+  databaseIdQuery();
 
 })
 const props = defineProps<{
@@ -30,6 +31,7 @@ const props = defineProps<{
 }>();
 // 表单数据
 const UpdateForm: any = ref({
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
   id: null, //ID
   prizeListIds: "", //指定奖励配置
@@ -64,6 +66,7 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
+          databaseId: null, //查询数据库
           tableEnName: "", //查询表
           id: null, //ID
           prizeListIds: "", //指定奖励配置
@@ -90,7 +93,14 @@ const submit = async (formEl) => {
 };
 
 
-
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 // 表单校验规则
 const rules = reactive({
@@ -112,6 +122,7 @@ const openVisible = async () => {
 // 关闭弹窗回调函数
 const closeUpdatePriPrizeObjectTableVisible = () => {
   UpdateForm.value = {
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
     id: null, //ID
     prizeListIds: "", //指定奖励配置
@@ -129,6 +140,13 @@ const isFullscreen = ref(false)
 .main
   el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="closeUpdatePriPrizeObjectTableVisible" @open="openVisible")
     el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 1 - 1
src/views/pri/priQueryField/components/add/index.vue

@@ -201,7 +201,7 @@ const isFullscreen = ref(false)
           placeholder="请选择匹配表",
           clearable,
         )
-          el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in queryTableIdOptionList")
+          el-option(:label="item.tableEnName + item.summary", :value="item.id" v-for="(item,index) in queryTableIdOptionList")
 
     .flex.justify-end
       el-button(

+ 1 - 1
src/views/pri/priQueryField/index.vue

@@ -77,7 +77,7 @@ provide('closeEditUpdatePriQueryFieldVisible', closeEditUpdatePriQueryFieldVisib
           placeholder="请选择匹配表",
           clearable,
         )
-          el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in queryTableIdOptionList")
+          el-option(:label="item.tableEnName + item.summary", :value="item.id" v-for="(item,index) in queryTableIdOptionList")
 
       el-form-item
         el-button(

+ 19 - 0
src/views/pri/priQueryTable/components/add/index.vue

@@ -12,6 +12,7 @@ let UrlList = reactive(null)
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
   projectIdQuery();
+  databaseIdQuery();
 
 })
 // 组件传参对象
@@ -33,6 +34,7 @@ const props = defineProps<{
 }>();
 // 表单数据
 let UpdateForm = ref({
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
   projectId: props.projectId, //项目
   summary: "", //说明
@@ -70,6 +72,7 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
+          databaseId: null, //查询数据库
           tableEnName: "", //查询表
           projectId: props.projectId, //项目
           summary: "", //说明
@@ -100,6 +103,14 @@ const projectIdQuery = async () => {
     projectIdOptionList.value = data.records;
   }
 };
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 
 
@@ -118,6 +129,7 @@ const closeFn: any = inject("closeAddVisible");
 const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
     projectId: props.projectId, //项目
     summary: "", //说明
@@ -133,6 +145,13 @@ const isFullscreen = ref(false)
 .main
   el-dialog(v-model='props.addVisible' width="50%" :fullscreen="isFullscreen" title="新增" draggable @close="closeVisible")
     el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 19 - 1
src/views/pri/priQueryTable/components/updatePriQueryTable/index.vue

@@ -11,6 +11,7 @@ let UrlList = reactive(null)
 // 获取当前板块接口列表
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
+  databaseIdQuery();
 
 })
 const props = defineProps<{
@@ -31,6 +32,7 @@ const props = defineProps<{
 // 表单数据
 const UpdateForm: any = ref({
   id: null, //ID
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
   summary: "", //说明
 });
@@ -63,6 +65,7 @@ const submit = async (formEl) => {
         });
         UpdateForm.value = {
           id: null, //ID
+          databaseId: null, //查询数据库
           tableEnName: "", //查询表
           summary: "", //说明
 
@@ -87,7 +90,14 @@ const submit = async (formEl) => {
 };
 
 
-
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 // 表单校验规则
 const rules = reactive({
@@ -110,6 +120,7 @@ const openVisible = async () => {
 const closeUpdatePriQueryTableVisible = () => {
   UpdateForm.value = {
     id: null, //ID
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
     summary: "", //说明
 
@@ -128,6 +139,13 @@ const isFullscreen = ref(false)
       el-form-item(label='ID' prop="id")
         el-input-number(v-model='UpdateForm.id' :min="1" :max="1000"
           placeholder="请输入ID")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 22 - 3
src/views/pri/priRecursionEndTable/components/add/index.vue

@@ -12,6 +12,7 @@ let UrlList = reactive(null)
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
   projectIdQuery();
+  databaseIdQuery();
 
 })
 // 组件传参对象
@@ -34,6 +35,7 @@ const props = defineProps<{
 // 表单数据
 let UpdateForm = ref({
   projectId: props.projectId, //项目
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
 
 
@@ -70,8 +72,9 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
-      projectId: props.projectId, //项目
-      tableEnName: "", //查询表
+          projectId: props.projectId, //项目
+          databaseId: null, //查询数据库
+          tableEnName: "", //查询表
 
         };
         // 关闭新增弹窗;
@@ -95,11 +98,19 @@ const submit = async (formEl) => {
 
 //获取项目数据
 const projectIdQuery = async () => {
-  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriProjectDic.method, url: UrlList.prizeSet.prigetPriProjectDic.url, params: { } });
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriProjectDic.method, url: UrlList.prizeSet.prigetPriProjectDic.url, params: {} });
   if (status === 1) {
     projectIdOptionList.value = data.records;
   }
 };
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 
 
@@ -119,6 +130,7 @@ const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
     projectId: props.projectId, //项目
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
 
   };
@@ -140,6 +152,13 @@ const isFullscreen = ref(false)
           clearable,
         )
           el-option(:label="item.projectName", :value="item.id" v-for="(item,index) in projectIdOptionList")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 22 - 4
src/views/pri/priRecursionEndTable/components/updatePriRecursionEndTable/index.vue

@@ -11,6 +11,7 @@ let UrlList = reactive(null)
 // 获取当前板块接口列表
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
+  databaseIdQuery();
 
 })
 const props = defineProps<{
@@ -30,6 +31,7 @@ const props = defineProps<{
 }>();
 // 表单数据
 const UpdateForm: any = ref({
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
   id: null, //ID
 
@@ -62,8 +64,9 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
-      tableEnName: "", //查询表
-      id: null, //ID
+          databaseId: null, //查询数据库
+          tableEnName: "", //查询表
+          id: null, //ID
 
         };
         // 关闭修改弹窗;
@@ -85,7 +88,14 @@ const submit = async (formEl) => {
   })
 };
 
-
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 
 // 表单校验规则
@@ -99,7 +109,7 @@ const rules = reactive({
 const closeFn: any = inject('closeEditUpdatePriRecursionEndTableVisible');
 const openVisible = async () => {
   //通过ID获取表格数据
-  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriRecursionEndTableQuery.method, url: UrlList.prizeSet.prigetPriRecursionEndTableQuery.url, params: { id: props.formData.id }});
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriRecursionEndTableQuery.method, url: UrlList.prizeSet.prigetPriRecursionEndTableQuery.url, params: { id: props.formData.id } });
   if (status === 1) {
     UpdateForm.value = data;
 
@@ -108,6 +118,7 @@ const openVisible = async () => {
 // 关闭弹窗回调函数
 const closeUpdatePriRecursionEndTableVisible = () => {
   UpdateForm.value = {
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
     id: null, //ID
 
@@ -123,6 +134,13 @@ const isFullscreen = ref(false)
 .main
   el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="closeUpdatePriRecursionEndTableVisible" @open="openVisible")
     el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 19 - 0
src/views/pri/priRecursionStartTable/components/add/index.vue

@@ -12,6 +12,7 @@ let UrlList = reactive(null)
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
   listIdQuery();
+  databaseIdQuery();
 })
 // 组件传参对象
 const props = defineProps<{
@@ -32,6 +33,7 @@ const props = defineProps<{
 }>();
 // 表单数据
 let UpdateForm = ref({
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
   listId: props.listId
 });
@@ -65,6 +67,7 @@ const submit = async (formEl) => {
           type: "success"
         });
         UpdateForm.value = {
+          databaseId: null, //查询数据库
           tableEnName: "", //查询表
           listId: props.listId
         };
@@ -96,6 +99,14 @@ const listIdQuery = async () => {
     listIdOptionList.value = data.records;
   }
 };
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 
 // 表单校验规则
@@ -113,6 +124,7 @@ const closeFn: any = inject("closeAddVisible");
 const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
     listId: props.listId
   };
@@ -127,6 +139,13 @@ const isFullscreen = ref(false)
 .main
   el-dialog(v-model='props.addVisible' width="50%" :fullscreen="isFullscreen" title="新增" draggable @close="closeVisible")
     el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 19 - 1
src/views/pri/priRecursionStartTable/components/updatePriRecursionStartTable/index.vue

@@ -11,6 +11,7 @@ let UrlList = reactive(null)
 // 获取当前板块接口列表
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
+  databaseIdQuery();
 
 })
 const props = defineProps<{
@@ -31,6 +32,7 @@ const props = defineProps<{
 // 表单数据
 const UpdateForm: any = ref({
   id: null, //ID
+  databaseId: null, //查询数据库
   tableEnName: "", //查询表
 
 });
@@ -63,6 +65,7 @@ const submit = async (formEl) => {
         });
         UpdateForm.value = {
           id: null, //ID
+          databaseId: null, //查询数据库
           tableEnName: "", //查询表
 
         };
@@ -85,7 +88,14 @@ const submit = async (formEl) => {
   })
 };
 
-
+//获取查询库数据
+const databaseIdOptionList = ref([]);
+const databaseIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriDatabaseSetDic.method, url: UrlList.prizeSet.prigetPriDatabaseSetDic.url, params: {} });
+  if (status === 1) {
+    databaseIdOptionList.value = data.records;
+  }
+};
 
 
 // 表单校验规则
@@ -109,6 +119,7 @@ const openVisible = async () => {
 const closeUpdatePriRecursionStartTableVisible = () => {
   UpdateForm.value = {
     id: null, //ID
+    databaseId: null, //查询数据库
     tableEnName: "", //查询表
 
   };
@@ -126,6 +137,13 @@ const isFullscreen = ref(false)
       el-form-item(label='ID' prop="id")
         el-input-number(v-model='UpdateForm.id' :min="0" :max="100000"
           placeholder="请输入ID")
+      el-form-item(label="数据库", prop="databaseId")
+        el-select(
+          v-model="UpdateForm.databaseId",
+          placeholder="请选择数据库",
+          clearable,
+        )
+          el-option(:label="item.title", :value="item.id" v-for="(item,index) in databaseIdOptionList")
       el-form-item(label='查询表' prop="tableEnName")
         el-input(v-model='UpdateForm.tableEnName' autocomplete='off'
           placeholder="请输入查询表")

+ 1 - 1
src/views/pri/priReturnField/components/add/index.vue

@@ -159,7 +159,7 @@ const isFullscreen = ref(false)
           placeholder="请选择匹配表",
           clearable,
         )
-          el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in queryTableIdOptionList")
+          el-option(:label="item.tableEnName + item.summary", :value="item.id" v-for="(item,index) in queryTableIdOptionList")
 
     .flex.justify-end
       el-button(

+ 1 - 1
src/views/pri/priReturnField/index.vue

@@ -77,7 +77,7 @@ provide('closeEditUpdatePriReturnFieldVisible', closeEditUpdatePriReturnFieldVis
           placeholder="请选择匹配表",
           clearable,
         )
-          el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in queryTableIdOptionList")
+          el-option(:label="item.tableEnName + item.summary", :value="item.id" v-for="(item,index) in queryTableIdOptionList")
 
       el-form-item
         el-button(