Browse Source

奖励配置完善

lcl 7 months ago
parent
commit
7b67609480
24 changed files with 1803 additions and 63 deletions
  1. 8 20
      src/views/pri/priCondition/components/add/index.vue
  2. 8 20
      src/views/pri/priCondition/components/updatePriCondition/index.vue
  3. 1 14
      src/views/pri/priCondition/hook.tsx
  4. 2 0
      src/views/pri/priList/components/add/index.vue
  5. 2 0
      src/views/pri/priList/components/updatePriList/index.vue
  6. 2 0
      src/views/pri/priList/hook.tsx
  7. 2 0
      src/views/pri/priLoopSet/components/add/index.vue
  8. 2 0
      src/views/pri/priLoopSet/components/updatePriLoopSet/index.vue
  9. 6 1
      src/views/pri/priLoopSet/hook.tsx
  10. 15 0
      src/views/pri/priLoopSet/index.vue
  11. 1 0
      src/views/pri/priQueryField/components/add/index.vue
  12. 1 0
      src/views/pri/priQueryField/components/updatePriQueryField/index.vue
  13. 263 0
      src/views/pri/priRecursionStartCondition/components/add/index.vue
  14. 253 0
      src/views/pri/priRecursionStartCondition/components/updatePriRecursionStartCondition/index.vue
  15. 237 0
      src/views/pri/priRecursionStartCondition/hook.tsx
  16. 168 0
      src/views/pri/priRecursionStartCondition/index.vue
  17. 1 0
      src/views/pri/priRecursionStartField/components/add/index.vue
  18. 1 0
      src/views/pri/priRecursionStartField/components/updatePriRecursionStartField/index.vue
  19. 218 0
      src/views/pri/priRecursionStartReturnField/components/add/index.vue
  20. 208 0
      src/views/pri/priRecursionStartReturnField/components/updatePriRecursionStartReturnField/index.vue
  21. 207 0
      src/views/pri/priRecursionStartReturnField/hook.tsx
  22. 166 0
      src/views/pri/priRecursionStartReturnField/index.vue
  23. 21 8
      src/views/pri/priRecursionStartTable/hook.tsx
  24. 10 0
      src/views/pri/priRecursionStartTable/index.vue

+ 8 - 20
src/views/pri/priCondition/components/add/index.vue

@@ -12,7 +12,6 @@ let UrlList = reactive(null)
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
   listIdQuery();
-  returnFieldIdQuery();
 
 })
 // 组件传参对象
@@ -35,7 +34,7 @@ const props = defineProps<{
 // 表单数据
 let UpdateForm = ref({
   listId: props.listId, //配置ID
-  returnFieldId: null, //条件返回字段
+  returnFieldId: "", //条件返回字段
   fieldQueryKind: "", //匹配条件
   fieldQueryModel: "", //匹配方式
   fieldQueryValue: "", //匹配值
@@ -63,7 +62,9 @@ const fieldQueryKindOptionList = [
 // 匹配方式选项数据
 const fieldQueryModelOptionList = [
   { id: 'request_param', label: '入参' },
+  { id: 'query_field', label: '条件匹配返回字段' },
   { id: 'loop_field', label: '循环递归字段' },
+  { id: 'loop_condition_field', label: '循环递归条件字段' },
   { id: 'fixed_value', label: '固定值' },
   { id: 'db_field', label: '库内字段' },
 ]
@@ -101,7 +102,7 @@ const submit = async (formEl) => {
         });
         UpdateForm.value = {
           listId: props.listId, //配置ID
-          returnFieldId: null, //条件返回字段
+          returnFieldId: "", //条件返回字段
           fieldQueryKind: "", //匹配条件
           fieldQueryModel: "", //匹配方式
           fieldQueryValue: "", //匹配值
@@ -137,15 +138,6 @@ 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;
-  }
-};
-
 
 
 // 表单校验规则
@@ -158,7 +150,7 @@ const closeVisible = () => {
   // 清空表单项;
   UpdateForm.value = {
     listId: props.listId, //配置ID
-    returnFieldId: null, //条件返回字段
+    returnFieldId: "", //条件返回字段
     fieldQueryKind: "", //匹配条件
     fieldQueryModel: "", //匹配方式
     fieldQueryValue: "", //匹配值
@@ -185,13 +177,9 @@ 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-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="returnFieldId")
+        el-input(v-model='UpdateForm.returnFieldId' autocomplete='off'
+          placeholder="请输入条件返回字段")
       el-form-item(label="匹配条件", prop="fieldQueryKind")
         el-select(
           v-model="UpdateForm.fieldQueryKind",

+ 8 - 20
src/views/pri/priCondition/components/updatePriCondition/index.vue

@@ -12,7 +12,6 @@ let UrlList = reactive(null)
 onMounted(async () => {
   UrlList = await getGroupUrl(["prizeSet"]);
   listIdQuery();
-  returnFieldIdQuery();
 
 })
 const props = defineProps<{
@@ -34,7 +33,7 @@ const props = defineProps<{
 const UpdateForm: any = ref({
   id: null, //ID
   listId: null, //配置ID
-  returnFieldId: null, //条件返回字段
+  returnFieldId: "", //条件返回字段
   fieldQueryKind: "", //匹配条件
   fieldQueryModel: "", //匹配方式
   fieldQueryValue: "", //匹配值
@@ -57,7 +56,9 @@ const fieldQueryKindOptionList = [
 // 匹配方式选项数据
 const fieldQueryModelOptionList = [
   { id: 'request_param', label: '入参' },
+  { id: 'query_field', label: '条件匹配返回字段' },
   { id: 'loop_field', label: '循环递归字段' },
+  { id: 'loop_condition_field', label: '循环递归条件字段' },
   { id: 'fixed_value', label: '固定值' },
   { id: 'db_field', label: '库内字段' },
 ]
@@ -98,7 +99,7 @@ const submit = async (formEl) => {
         UpdateForm.value = {
           id: null, //ID
           listId: null, //配置ID
-          returnFieldId: null, //条件返回字段
+          returnFieldId: "", //条件返回字段
           fieldQueryKind: "", //匹配条件
           fieldQueryModel: "", //匹配方式
           fieldQueryValue: "", //匹配值
@@ -134,15 +135,6 @@ 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;
-  }
-};
-
 
 
 // 表单校验规则
@@ -164,7 +156,7 @@ const closeUpdatePriConditionVisible = () => {
   UpdateForm.value = {
     id: null, //ID
     listId: null, //配置ID
-    returnFieldId: null, //条件返回字段
+    returnFieldId: "", //条件返回字段
     fieldQueryKind: "", //匹配条件
     fieldQueryModel: "", //匹配方式
     fieldQueryValue: "", //匹配值
@@ -194,13 +186,9 @@ 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-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="returnFieldId")
+        el-input(v-model='UpdateForm.returnFieldId' autocomplete='off'
+          placeholder="请输入条件返回字段")
       el-form-item(label="匹配条件", prop="fieldQueryKind")
         el-select(
           v-model="UpdateForm.fieldQueryKind",

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

@@ -14,7 +14,6 @@ export function usePriCondition() {
     UrlList = await getGroupUrl(["prizeSet"]);
     onSearch(ruleFormRef.value);
     listIdQuery();
-    returnFieldIdQuery();
 
   });
   let form = reactive({
@@ -52,11 +51,7 @@ export function usePriCondition() {
     {
       label: "条件返回字段",
       prop: "returnFieldId",
-      minWidth: 200,
-      formatter: ({ returnFieldId }) => {
-        var obj = returnFieldIdOptionList.value.find(item => item.id == returnFieldId);
-        return obj ? obj.fieldEnName + obj.fieldName : ''
-      },
+      minWidth: 200
     },
     {
       label: "匹配条件",
@@ -149,14 +144,6 @@ 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;
-    }
-  };
 
 
 

+ 2 - 0
src/views/pri/priList/components/add/index.vue

@@ -56,6 +56,8 @@ const projectIdOptionList = ref([]);
 const conditionModeOptionList = [
   { id: 'all', label: '全部满足' },
   { id: 'one', label: '一个满足' },
+  { id: 'two', label: '两个满足' },
+  { id: 'three', label: '三个满足' },
 ]
 // 奖励内容选项数据
 const prizeContentOptionList = [

+ 2 - 0
src/views/pri/priList/components/updatePriList/index.vue

@@ -46,6 +46,8 @@ const UpdateForm: any = ref({
 const conditionModeOptionList = [
   { id: 'all', label: '全部满足' },
   { id: 'one', label: '一个满足' },
+  { id: 'two', label: '两个满足' },
+  { id: 'three', label: '三个满足' },
 ]
 // 奖励内容选项数据
 const prizeContentOptionList = [

+ 2 - 0
src/views/pri/priList/hook.tsx

@@ -168,6 +168,8 @@ export function usePriList() {
   const conditionModeOptionList = [
     { id: 'all', label: '全部满足' },
     { id: 'one', label: '一个满足' },
+    { id: 'two', label: '两个满足' },
+    { id: 'three', label: '三个满足' },
   ]
   // 奖励内容选项数据
   const prizeContentOptionList = [

+ 2 - 0
src/views/pri/priLoopSet/components/add/index.vue

@@ -58,6 +58,8 @@ const loopModelOptionList = [
 const conditionModeOptionList = [
   { id: 'all', label: '全部满足' },
   { id: 'one', label: '一个满足' },
+  { id: 'two', label: '两个满足' },
+  { id: 'three', label: '三个满足' },
 ]
 
 // 选项卡参数(默认值为列表某项的id)

+ 2 - 0
src/views/pri/priLoopSet/components/updatePriLoopSet/index.vue

@@ -48,6 +48,8 @@ const loopModelOptionList = [
 const conditionModeOptionList = [
   { id: 'all', label: '全部满足' },
   { id: 'one', label: '一个满足' },
+  { id: 'two', label: '两个满足' },
+  { id: 'three', label: '三个满足' },
 ]
 
 // 表单实例

+ 6 - 1
src/views/pri/priLoopSet/hook.tsx

@@ -1,5 +1,6 @@
 import { reactive, onMounted, ref, ElMessage, ElMessageBox, http, getGroupUrl, RegularVerification, verification, PaginationProps } from "@/utils/importUsed";
 import { useRoute } from "vue-router";
+import router from "@/router";
 // 表单实例
 const ruleFormRef = ref()
 export function usePriLoopSet() {
@@ -140,7 +141,10 @@ export function usePriLoopSet() {
   }
 
 
-
+  //跳转到递归条件设置
+  function linkToPriRecursionStartCondition(row) {
+    router.push({ path: '../../pri/priRecursionStartCondition/index', query: { loopSetId: row.id } });
+  }
 
   // 删除
   function handleDelete(row) {
@@ -204,6 +208,7 @@ export function usePriLoopSet() {
     editUpdatePriLoopSetVisible,
     editUpdatePriLoopSetFormData,
     handleDelete,
+    linkToPriRecursionStartCondition,
 
   };
 }

+ 15 - 0
src/views/pri/priLoopSet/index.vue

@@ -35,6 +35,7 @@ const {
   editUpdatePriLoopSetVisible,
   editUpdatePriLoopSetFormData,
   handleDelete,
+  linkToPriRecursionStartCondition,
 
 } = usePriLoopSet();
 // 关闭添加
@@ -122,6 +123,20 @@ provide('closeEditUpdatePriLoopSetVisible', closeEditUpdatePriLoopSetVisible)
               v-if="hasAuth(['delete'])"
             ) 删除
 
+            el-dropdown(trigger="click", :hide-on-click="false")
+              el-button.ml-3(class="mt-[2px]" link type='primary' :size='size' :icon='useRenderIcon(More)')
+              template(#dropdown)
+                el-dropdown-menu
+                  el-dropdown-item
+                    el-button.reset-margin.edit-btn(
+                      link
+                      type="primary"
+                      size="small"
+                      @click="linkToPriRecursionStartCondition(row)"
+                      :icon="useRenderIcon(EditPen)"
+                      v-if="hasAuth(['linkToPriRecursionStartCondition'])"
+                    ) 条件设置
+
 
 
     Add(:addVisible="addVisible" :listId="form.listId")

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

@@ -59,6 +59,7 @@ const fieldQueryKindOptionList = [
 // 匹配方式选项数据
 const fieldQueryModelOptionList = [
   { id: 'request_param', label: '入参' },
+  { id: 'query_field', label: '条件匹配返回字段' },
   { id: 'loop_field', label: '循环递归字段' },
   { id: 'fixed_value', label: '固定值' },
   { id: 'db_field', label: '库内字段' },

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

@@ -51,6 +51,7 @@ const fieldQueryKindOptionList = [
 // 匹配方式选项数据
 const fieldQueryModelOptionList = [
   { id: 'request_param', label: '入参' },
+  { id: 'query_field', label: '条件匹配返回字段' },
   { id: 'loop_field', label: '循环递归字段' },
   { id: 'fixed_value', label: '固定值' },
   { id: 'db_field', label: '库内字段' },

+ 263 - 0
src/views/pri/priRecursionStartCondition/components/add/index.vue

@@ -0,0 +1,263 @@
+<script lang="ts">
+// 声明额外的选项
+export default {
+  name: "Add"
+};
+</script>
+<script setup lang="ts">
+import { inject, onMounted, reactive, ref, Uploadfile, UploadImg, Editor, useRenderIcon, ElMessage, ElMessageBox, Upload, Close, http, getGroupUrl, RegularVerification, verification } from "@/utils/importUsed"
+// 接口列表实例
+let UrlList = reactive(null)
+// 获取当前板块接口列表
+onMounted(async () => {
+  UrlList = await getGroupUrl(["prizeSet"]);
+  loopSetIdQuery();
+
+})
+// 组件传参对象
+const props = defineProps<{
+  submit: Function;
+  addVisible: {
+    type: Boolean;
+    default: false;
+  };
+  width: {
+    type: Number;
+    default: 50;
+  };
+  loopSetId: {
+    type: Number;
+    default: 0;
+  },
+
+}>();
+// 表单数据
+let UpdateForm = ref({
+  loopSetId: props.loopSetId, //递归配置ID
+  returnFieldId: null, //条件返回字段
+  fieldQueryKind: "", //匹配条件
+  fieldQueryModel: "", //匹配方式
+  fieldQueryValue: "", //匹配值
+  fieldQueryValueType: "", //匹配值类型
+  prizePercent: "", //奖励比例
+  prizeAmount: "", //奖励固定金额
+
+
+});
+// 表单实例
+const ruleFormRef = ref()
+
+// 传参选项数据
+// 递归配置ID选项数据
+const loopSetIdOptionList = ref([]);
+// 匹配条件选项数据
+const fieldQueryKindOptionList = [
+  { id: '1', label: '模糊匹配' },
+  { id: '2', label: '精确匹配' },
+  { id: '3', label: '范围匹配' },
+]
+// 匹配方式选项数据
+const fieldQueryModelOptionList = [
+  { id: 'request_param', label: '入参' },
+  { id: 'fixed_value', label: '固定值' },
+]
+// 匹配值类型选项数据
+const fieldQueryValueTypeOptionList = [
+  { id: 'text', label: '文本' },
+  { id: 'number', label: '数字' },
+  { id: 'range', label: '范围' },
+]
+
+// 选项卡参数(默认值为列表某项的id)
+const activeId = ref('1')
+// 提交函数
+const submit = async (formEl) => {
+  // 表单校验拦截
+  if (!formEl) return
+  await formEl.validate(async (valid, fields) => {
+    if (valid) {
+      //表单校验成功回调
+      console.log('submit!')
+
+
+      // 需动态生成接口
+      const { status, msg }: any = await http.Request({
+        method: UrlList.prizeSet.priaddPriRecursionStartCondition.method,
+        url: UrlList.prizeSet.priaddPriRecursionStartCondition.url,
+        params: UpdateForm.value
+      });
+      if (status === 1) {
+        //业务成功回调
+        ElMessage({
+          message: "新增成功",
+          type: "success"
+        });
+        UpdateForm.value = {
+          loopSetId: props.loopSetId, //递归配置ID
+          returnFieldId: null, //条件返回字段
+          fieldQueryKind: "", //匹配条件
+          fieldQueryModel: "", //匹配方式
+          fieldQueryValue: "", //匹配值
+          fieldQueryValueType: "", //匹配值类型
+          prizePercent: "", //奖励比例
+          prizeAmount: "", //奖励固定金额
+
+        };
+        // 关闭新增弹窗;
+        closeVisible()
+      } else {
+        //业务失败回调
+        ElMessageBox.alert(msg, "提示", {
+          confirmButtonText: "关闭",
+          type: "warning"
+        });
+      }
+    } else {
+      //表单校验失败回调
+      ElMessage({
+        message: "请输入完整信息",
+        type: "error"
+      });
+    }
+  })
+};
+
+//获取递归配置ID数据
+const loopSetIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriLoopSetDic.method, url: UrlList.prizeSet.prigetPriLoopSetDic.url, params: {} });
+  if (status === 1) {
+    loopSetIdOptionList.value = data.records;
+  }
+};
+
+
+
+// 表单校验规则
+const rules = reactive({
+  prizePercent: [
+    { required: true, message: '请输入奖励比例', trigger: 'blur' },
+  ],
+
+})
+// 关闭弹窗回调函数
+const closeFn: any = inject("closeAddVisible");
+const closeVisible = () => {
+  // 清空表单项;
+  UpdateForm.value = {
+    loopSetId: props.loopSetId, //递归配置ID
+    returnFieldId: null, //条件返回字段
+    fieldQueryKind: "", //匹配条件
+    fieldQueryModel: "", //匹配方式
+    fieldQueryValue: "", //匹配值
+    fieldQueryValueType: "", //匹配值类型
+    prizePercent: "", //奖励比例
+    prizeAmount: "", //奖励固定金额
+
+  };
+  closeFn();
+};
+
+// 弹窗是否全屏
+const isFullscreen = ref(false)
+</script>
+
+<template lang="pug">
+.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="递归配置ID", prop="loopSetId")
+        el-select(
+          v-model="UpdateForm.loopSetId",
+          placeholder="请选择递归配置ID",
+          clearable,
+        )
+          el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in loopSetIdOptionList")
+      el-form-item(label='条件返回字段' prop="returnFieldId")
+        el-input(v-model='UpdateForm.returnFieldId' autocomplete='off'
+          placeholder="请输入条件返回字段")
+      el-form-item(label="匹配条件", prop="fieldQueryKind")
+        el-select(
+          v-model="UpdateForm.fieldQueryKind",
+          placeholder="请选择匹配条件",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldQueryKindOptionList")
+      el-form-item(label="匹配方式", prop="fieldQueryModel")
+        el-select(
+          v-model="UpdateForm.fieldQueryModel",
+          placeholder="请选择匹配方式",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldQueryModelOptionList")
+      el-form-item(label='匹配值' prop="fieldQueryValue")
+        el-input(v-model='UpdateForm.fieldQueryValue' autocomplete='off'
+          placeholder="请输入匹配值")
+      el-form-item(label="匹配值类型", prop="fieldQueryValueType")
+        el-select(
+          v-model="UpdateForm.fieldQueryValueType",
+          placeholder="请选择匹配值类型",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldQueryValueTypeOptionList")
+      el-form-item(label='奖励比例' prop="prizePercent")
+        el-input-number(v-model='UpdateForm.prizePercent' :min="0" :max="100000"
+          placeholder="请输入奖励比例")
+      el-form-item(label='奖励固定金额' prop="prizeAmount")
+        el-input-number(v-model='UpdateForm.prizeAmount' :min="0" :max="100000"
+          placeholder="请输入奖励固定金额")
+
+    .flex.justify-end
+      el-button(
+        :icon="useRenderIcon(Close)",
+        @click="closeVisible"
+      ) 关闭
+      el-button(
+        type="primary",
+        :icon="useRenderIcon(Upload)",
+        @click="submit(ruleFormRef)"
+      ) 确认提交
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+
+:deep(.el-form-item__label) {
+  font-weight: 700;
+}
+
+:deep(.el-pagination) {
+  flex-flow: wrap;
+}
+
+:deep(.is-draggable) {
+  max-height: 80vh;
+  overflow: auto;
+}
+
+:deep(.el-dialog__header) {
+  position: sticky;
+  top: 0;
+  z-index: 2;
+  background: #fff;
+}
+
+.collapsedom {
+  padding: 0 20px;
+  background-color: #fff;
+}
+
+.ovh-x {
+  height: 40vh;
+  overflow-y: auto;
+}
+
+:deep(.el-descriptions__header) {
+  margin: 16px 0 !important;
+}
+
+.el-select {
+  width: 100%;
+}
+</style>

+ 253 - 0
src/views/pri/priRecursionStartCondition/components/updatePriRecursionStartCondition/index.vue

@@ -0,0 +1,253 @@
+<script lang="ts">
+// 声明额外的选项
+export default {
+  name: "Edit"
+};
+</script>
+<script setup lang="ts">
+import { inject, onMounted, reactive, ref, Uploadfile, UploadImg, Editor, useRenderIcon, ElMessage, ElMessageBox, Upload, Close, http, getGroupUrl, RegularVerification, verification } from "@/utils/importUsed"
+// 接口列表实例
+let UrlList = reactive(null)
+// 获取当前板块接口列表
+onMounted(async () => {
+  UrlList = await getGroupUrl(["prizeSet"]);
+
+})
+const props = defineProps<{
+  editVisible: {
+    type: Boolean;
+    default: false;
+  };
+  width: {
+    type: Number;
+    default: 50;
+  };
+  formData: {
+    id: any;
+    type: any;
+    default: {};
+  };
+}>();
+// 表单数据
+const UpdateForm: any = ref({
+  id: null, //ID
+  returnFieldId: null, //条件返回字段
+  fieldQueryKind: "", //匹配条件
+  fieldQueryModel: "", //匹配方式
+  fieldQueryValue: "", //匹配值
+  fieldQueryValueType: "", //匹配值类型
+  prizePercent: "", //奖励比例
+  prizeAmount: "", //奖励固定金额
+
+});
+// 匹配条件选项数据
+const fieldQueryKindOptionList = [
+  { id: '1', label: '模糊匹配' },
+  { id: '2', label: '精确匹配' },
+  { id: '3', label: '范围匹配' },
+]
+// 匹配方式选项数据
+const fieldQueryModelOptionList = [
+  { id: 'request_param', label: '入参' },
+  { id: 'fixed_value', label: '固定值' },
+]
+// 匹配值类型选项数据
+const fieldQueryValueTypeOptionList = [
+  { id: 'text', label: '文本' },
+  { id: 'number', label: '数字' },
+  { id: 'range', label: '范围' },
+]
+
+// 表单实例
+const ruleFormRef = ref()
+
+// 选项卡参数(默认值为列表某项的id)
+const activeId = ref('1')
+// 提交函数
+const submit = async (formEl) => {
+  // 表单校验拦截
+  if (!formEl) return
+  await formEl.validate(async (valid, fields) => {
+    if (valid) {
+      //表单校验成功回调
+      console.log('submit!')
+
+      // 需动态生成接口
+      const { status, msg }: any = await http.Request({
+        method: UrlList.prizeSet.priupdatePriRecursionStartCondition.method,
+        url: UrlList.prizeSet.priupdatePriRecursionStartCondition.url,
+        params: UpdateForm.value
+      });
+      if (status === 1) {
+        //业务成功回调
+        ElMessage({
+          message: "修改成功",
+          type: "success"
+        });
+        UpdateForm.value = {
+          id: null, //ID
+          returnFieldId: null, //条件返回字段
+          fieldQueryKind: "", //匹配条件
+          fieldQueryModel: "", //匹配方式
+          fieldQueryValue: "", //匹配值
+          fieldQueryValueType: "", //匹配值类型
+          prizePercent: "", //奖励比例
+          prizeAmount: "", //奖励固定金额
+
+        };
+        // 关闭修改弹窗;
+        closeUpdatePriRecursionStartConditionVisible();
+      } else {
+        //业务失败回调
+        ElMessageBox.alert(msg, "提示", {
+          confirmButtonText: "关闭",
+          type: "warning"
+        });
+      }
+    } else {
+      //表单校验失败回调
+      ElMessage({
+        message: "请输入完整信息",
+        type: "error"
+      });
+    }
+  })
+};
+
+
+
+
+// 表单校验规则
+const rules = reactive({
+  prizePercent: [
+    { required: true, message: '请输入奖励比例', trigger: 'blur' },
+  ],
+
+})
+// 关闭弹窗回调函数
+const closeFn: any = inject('closeEditUpdatePriRecursionStartConditionVisible');
+const openVisible = async () => {
+  //通过ID获取表格数据
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriRecursionStartConditionQuery.method, url: UrlList.prizeSet.prigetPriRecursionStartConditionQuery.url, params: { id: props.formData.id } });
+  if (status === 1) {
+    UpdateForm.value = data;
+
+  }
+};
+// 关闭弹窗回调函数
+const closeUpdatePriRecursionStartConditionVisible = () => {
+  UpdateForm.value = {
+    id: null, //ID
+    returnFieldId: null, //条件返回字段
+    fieldQueryKind: "", //匹配条件
+    fieldQueryModel: "", //匹配方式
+    fieldQueryValue: "", //匹配值
+    fieldQueryValueType: "", //匹配值类型
+    prizePercent: "", //奖励比例
+    prizeAmount: "", //奖励固定金额
+
+  };
+  closeFn();
+};
+
+// 弹窗是否全屏
+const isFullscreen = ref(false)
+</script>
+
+<template lang="pug">
+.main
+  el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="closeUpdatePriRecursionStartConditionVisible" @open="openVisible")
+    el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
+      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="returnFieldId")
+        el-input(v-model='UpdateForm.returnFieldId' autocomplete='off'
+          placeholder="请输入条件返回字段")
+      el-form-item(label="匹配条件", prop="fieldQueryKind")
+        el-select(
+          v-model="UpdateForm.fieldQueryKind",
+          placeholder="请选择匹配条件",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldQueryKindOptionList")
+      el-form-item(label="匹配方式", prop="fieldQueryModel")
+        el-select(
+          v-model="UpdateForm.fieldQueryModel",
+          placeholder="请选择匹配方式",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldQueryModelOptionList")
+      el-form-item(label='匹配值' prop="fieldQueryValue")
+        el-input(v-model='UpdateForm.fieldQueryValue' autocomplete='off'
+          placeholder="请输入匹配值")
+      el-form-item(label="匹配值类型", prop="fieldQueryValueType")
+        el-select(
+          v-model="UpdateForm.fieldQueryValueType",
+          placeholder="请选择匹配值类型",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldQueryValueTypeOptionList")
+      el-form-item(label='奖励比例' prop="prizePercent")
+        el-input-number(v-model='UpdateForm.prizePercent' :min="0" :max="100000"
+          placeholder="请输入奖励比例")
+      el-form-item(label='奖励固定金额' prop="prizeAmount")
+        el-input-number(v-model='UpdateForm.prizeAmount' :min="0" :max="100000"
+          placeholder="请输入奖励固定金额")
+
+    .flex.justify-end
+      el-button(
+        :icon="useRenderIcon(Close)",
+        :loading="loading",
+        @click="closeUpdatePriRecursionStartConditionVisible()"
+      ) 关闭
+      el-button(
+        type="primary",
+        :icon="useRenderIcon(Upload)",
+        @click="submit(ruleFormRef)"
+      ) 确认提交
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+
+:deep(.el-form-item__label) {
+  font-weight: 700;
+}
+
+:deep(.el-pagination) {
+  flex-flow: wrap;
+}
+
+:deep(.is-draggable) {
+  max-height: 80vh;
+  overflow: auto;
+}
+
+:deep(.el-dialog__header) {
+  position: sticky;
+  top: 0;
+  z-index: 2;
+  background: #fff;
+}
+
+.collapsedom {
+  padding: 0 20px;
+  background-color: #fff;
+}
+
+.ovh-x {
+  height: 40vh;
+  overflow-y: auto;
+}
+
+:deep(.el-descriptions__header) {
+  margin: 16px 0 !important;
+}
+
+.el-select {
+  width: 100%;
+}
+</style>

+ 237 - 0
src/views/pri/priRecursionStartCondition/hook.tsx

@@ -0,0 +1,237 @@
+import { reactive, onMounted, ref, ElMessage, ElMessageBox, http, getGroupUrl, RegularVerification, verification, PaginationProps } from "@/utils/importUsed";
+import { useRoute } from "vue-router";
+import router from "@/router";
+// 表单实例
+const ruleFormRef = ref()
+export function usePriRecursionStartCondition() {
+  // 接口列表实例
+  let UrlList = reactive(null)
+  // 获取当前板块接口列表
+  onMounted(async () => {
+    const route = useRoute();
+    form.loopSetId = Number(route.query.loopSetId);
+
+    UrlList = await getGroupUrl(["prizeSet"]);
+    onSearch(ruleFormRef.value);
+    loopSetIdQuery();
+
+  });
+  let form = reactive({
+    loopSetId: null, //递归配置ID
+    fieldQueryModel: "", //匹配方式
+
+
+  });
+  const dataList = ref([]);
+  const loading = ref(false);
+  const dialogAddVisible = ref(false);
+  const pagination = reactive<PaginationProps>({
+    total: 0,
+    pageSize: 10,
+    currentPage: 1,
+    background: true
+  });
+  const columns: TableColumnList = [
+    {
+      type: "selection",
+      width: 55,
+      align: "left",
+      hide: ({ checkList }) => !checkList.includes("勾选列")
+    },
+    {
+      label: "序号",
+      type: "index",
+      width: 70,
+      hide: ({ checkList }) => !checkList.includes("序号列")
+    },
+    {
+      label: "ID",
+      prop: "id",
+      minWidth: 200
+    },
+    {
+      label: "递归配置ID",
+      prop: "loopSetId",
+      minWidth: 200
+    },
+    {
+      label: "条件返回字段",
+      prop: "returnFieldId",
+      minWidth: 200
+    },
+    {
+      label: "匹配条件",
+      prop: "fieldQueryKind",
+      minWidth: 200
+    },
+    {
+      label: "匹配方式",
+      prop: "fieldQueryModel",
+      minWidth: 200
+    },
+    {
+      label: "匹配值",
+      prop: "fieldQueryValue",
+      minWidth: 200
+    },
+    {
+      label: "匹配值类型",
+      prop: "fieldQueryValueType",
+      minWidth: 200
+    },
+    {
+      label: "奖励比例",
+      prop: "prizePercent",
+      minWidth: 200
+    },
+    {
+      label: "奖励固定金额",
+      prop: "prizeAmount",
+      minWidth: 200
+    },
+
+    {
+      label: "操作",
+      fixed: "right",
+      width: 200,
+      slot: "operation"
+    }
+  ];
+  // 当前页数量切换
+  function handleSizeChange(val: number) {
+    if (typeof val === "number") {
+      pagination.pageSize = val;
+      onSearch(ruleFormRef.value);
+    }
+  }
+  // 当前页码切换
+  function handleCurrentChange(val: number) {
+    console.log(`current page: ${val}`);
+    if (typeof val === "number") {
+      pagination.currentPage = val;
+      onSearch(ruleFormRef.value);
+    }
+  }
+  // 选择表格项
+  function handleSelectionChange(val) {
+    console.log(`SelectionChange: ${val}`);
+    onSearch(ruleFormRef.value);
+  }
+  // 搜索列表
+  async function onSearch(formEl) {
+    // 表单校验拦截
+    if (!formEl) return
+    await formEl.validate(async (valid, fields) => {
+      if (valid) {
+        //表单校验成功回调
+        console.log('submit!')
+        // 状态调整为加载中
+        loading.value = true;
+        // 调用接口(需动态生成接口)
+        const { status, msg, data }: any = await http.Request({
+          method: UrlList.prizeSet.prigetPriRecursionStartConditionList.method,
+          url: UrlList.prizeSet.prigetPriRecursionStartConditionList.url,
+          params: {
+            ...form,
+            pageSize: pagination.pageSize,
+            pageNum: pagination.currentPage
+          }
+        });
+        dataList.value = data.records;
+        pagination.total = data.total;
+        setTimeout(() => {
+          loading.value = false;
+        }, 500);
+      } else {
+        //表单校验失败回调
+        ElMessage({
+          message: "请输入完整信息",
+          type: "error"
+        });
+      }
+    })
+  }
+  // 递归配置ID选项数据
+  const loopSetIdOptionList = ref([]);
+  //获取递归配置ID数据
+  async function loopSetIdQuery() {
+    const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriLoopSetDic.method, url: UrlList.prizeSet.prigetPriLoopSetDic.url, params: {} });
+    if (status === 1) {
+      loopSetIdOptionList.value = data.records;
+    }
+  }
+  // 匹配方式选项数据
+  const fieldQueryModelOptionList = [
+    { id: 'request_param', label: '入参' },
+    { id: 'fixed_value', label: '固定值' },
+  ]
+
+
+
+
+  // 删除
+  function handleDelete(row) {
+    ElMessageBox.confirm(
+      `是否删除该递归开始条件? `,
+      "提示",
+      {
+        confirmButtonText: "删除",
+        cancelButtonText: "取消",
+        type: "warning"
+      }
+    ).then(async () => {
+      const { status, msg }: any = await http.Request({ method: UrlList.prizeSet.prideletePriRecursionStartCondition.method, url: UrlList.prizeSet.prideletePriRecursionStartCondition.url, params: String(row.id) });
+      if (status === 1) {
+        ElMessage({
+          message: "删除成功",
+          type: "success"
+        });
+        onSearch(ruleFormRef.value);
+      } else {
+        ElMessageBox.alert(msg, "提示", {
+          confirmButtonText: "关闭",
+          type: "warning"
+        });
+      };
+    })
+  }
+
+  // 新增
+  const addVisible = ref(false);
+  function handleAdd() {
+    addVisible.value = true;
+  };
+
+  // 修改
+  const editUpdatePriRecursionStartConditionVisible = ref(false);
+  const editUpdatePriRecursionStartConditionFormData = ref({});
+  function handleUpdatePriRecursionStartCondition(row) {
+    editUpdatePriRecursionStartConditionVisible.value = true;
+    // 表格数据赋值
+    editUpdatePriRecursionStartConditionFormData.value = row;
+  };
+
+  return {
+    form,
+    loading,
+    columns,
+    dataList,
+    pagination,
+    onSearch,
+    handleSizeChange,
+    handleCurrentChange,
+    handleSelectionChange,
+    ruleFormRef,
+    loopSetIdQuery,
+    loopSetIdOptionList,
+    fieldQueryModelOptionList,
+
+    handleAdd,
+    addVisible,
+    handleUpdatePriRecursionStartCondition,
+    editUpdatePriRecursionStartConditionVisible,
+    editUpdatePriRecursionStartConditionFormData,
+    handleDelete,
+
+  };
+}

+ 168 - 0
src/views/pri/priRecursionStartCondition/index.vue

@@ -0,0 +1,168 @@
+<script lang="ts">
+// 声明额外的选项
+export default {
+  name: "PriRecursionStartCondition"
+};
+</script>
+<script setup lang="ts">
+import { provide } from "vue";
+import { usePriRecursionStartCondition } from "./hook";
+import { http } from "@/utils/http";
+import { useRenderIcon, hasAuth, PureTableBar } from "@/utils/importUsed";
+import Add from "./components/add/index.vue";
+import EditUpdatePriRecursionStartCondition from "./components/updatePriRecursionStartCondition/index.vue";
+import Search from "@iconify-icons/ep/search";
+import Addicon from "@iconify-icons/ep/document-add";
+import Delete from "@iconify-icons/ep/delete";
+import EditPen from "@iconify-icons/ep/edit-pen";
+import More from "@iconify-icons/ep/more-filled";
+
+const {
+  form,
+  loading,
+  columns,
+  dataList,
+  pagination,
+  onSearch,
+  handleSizeChange,
+  handleCurrentChange,
+  handleSelectionChange,
+  ruleFormRef,
+  loopSetIdOptionList,
+  fieldQueryModelOptionList,
+  handleAdd,
+  addVisible,
+  handleUpdatePriRecursionStartCondition,
+  editUpdatePriRecursionStartConditionVisible,
+  editUpdatePriRecursionStartConditionFormData,
+  handleDelete,
+
+} = usePriRecursionStartCondition();
+// 关闭添加
+const closeAddVisible = () => {
+  onSearch(ruleFormRef.value);
+  addVisible.value = false;
+}
+provide('closeAddVisible', closeAddVisible)
+// 关闭修改
+const closeEditUpdatePriRecursionStartConditionVisible = () => {
+  onSearch(ruleFormRef.value);
+  editUpdatePriRecursionStartConditionVisible.value = false
+}
+provide('closeEditUpdatePriRecursionStartConditionVisible', closeEditUpdatePriRecursionStartConditionVisible)
+
+</script>
+
+<template lang="pug">
+.main
+  div
+    //- 搜索表格组件条件
+    el-form.bg-bg_color.pl-8.pt-4.pr-8(
+      label-position="left"
+      label-width="100px"
+      :inline="true",
+      :model="form",
+      class="w-[99/100]"
+      ref="ruleFormRef"
+    )
+      el-form-item(label="递归配置ID", prop="loopSetId")
+        el-select(
+          v-model="form.loopSetId",
+          placeholder="请选择递归配置ID",
+          clearable,
+        )
+          el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in loopSetIdOptionList")
+      el-form-item(label="匹配方式", prop="fieldQueryModel")
+        el-select(
+          v-model="form.fieldQueryModel",
+          placeholder="请选择匹配方式",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldQueryModelOptionList")
+
+      el-form-item
+        el-button(
+          type="primary",
+          :icon="useRenderIcon(Search)",
+          :loading="loading",
+          @click="onSearch(ruleFormRef)"
+        ) 查询
+    //- 表格组件
+    PureTableBar(title="递归开始条件", @refresh="onSearch(ruleFormRef)" )
+      template(#buttons)
+        el-button(type="primary" :icon="useRenderIcon(Addicon)" @click="handleAdd()" v-if="hasAuth(['add'])") 新增
+
+      template(v-slot="{ size, checkList }")
+        pure-table( 
+          row-key="id"
+          ref="tableRef"
+          adaptive
+          align-whole="center"
+          table-layout="auto"
+          :loading="loading"
+          :size="size",
+          :data="dataList",
+          :columns="columns",
+          :checkList="checkList",
+          :pagination="pagination",
+          :paginationSmall="size === 'default' ? true : false",
+          :header-cell-style="{ background: 'var(--el-table-row-hover-bg-color)', color: 'var(--el-text-color-primary)' }",
+          @selection-change="handleSelectionChange",
+          @size-change="handleSizeChange",
+          @current-change="handleCurrentChange"
+        )
+          template(#operation="{ row }")
+            el-button.reset-margin(
+              link
+              type="primary"
+              size="small"
+              @click="handleUpdatePriRecursionStartCondition(row)"
+              :icon="useRenderIcon(EditPen)"
+              v-if="hasAuth(['updatePriRecursionStartCondition'])"
+            ) 编辑
+            el-button.reset-margin(
+              link
+              type="primary"
+              size="small"
+              @click="handleDelete(row)"
+              :icon="useRenderIcon(Delete)"
+              v-if="hasAuth(['delete'])"
+            ) 删除
+
+
+
+    Add(:addVisible="addVisible" :loopSetId="form.loopSetId")
+    EditUpdatePriRecursionStartCondition(:editVisible="editUpdatePriRecursionStartConditionVisible" :formData="editUpdatePriRecursionStartConditionFormData")
+
+                    
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+
+:deep(.el-form-item__label) {
+  font-weight: 700;
+}
+
+:deep(.el-pagination) {
+  flex-flow: wrap;
+}
+
+:deep(.is-draggable) {
+  max-height: 80vh;
+  overflow: auto;
+}
+
+:deep(.el-dialog__header) {
+  position: sticky;
+  top: 0;
+  z-index: 2;
+  background: #fff;
+}
+
+:deep(.el-descriptions__header) {
+  margin: 16px 0 !important;
+}
+</style>

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

@@ -60,6 +60,7 @@ const fieldQueryKindOptionList = [
 const fieldQueryModelOptionList = [
   { id: 'request_param', label: '入参' },
   { id: 'loop_field', label: '循环递归字段' },
+  { id: 'query_field', label: '条件匹配返回字段' },
   { id: 'fixed_value', label: '固定值' },
   { id: 'db_field', label: '库内字段' },
 ]

+ 1 - 0
src/views/pri/priRecursionStartField/components/updatePriRecursionStartField/index.vue

@@ -54,6 +54,7 @@ const fieldQueryKindOptionList = [
 const fieldQueryModelOptionList = [
   { id: 'request_param', label: '入参' },
   { id: 'loop_field', label: '循环递归字段' },
+  { id: 'query_field', label: '条件匹配返回字段' },
   { id: 'fixed_value', label: '固定值' },
   { id: 'db_field', label: '库内字段' },
 ]

+ 218 - 0
src/views/pri/priRecursionStartReturnField/components/add/index.vue

@@ -0,0 +1,218 @@
+<script lang="ts">
+// 声明额外的选项
+export default {
+  name: "Add"
+};
+</script>
+<script setup lang="ts">
+import { inject, onMounted, reactive, ref, Uploadfile, UploadImg, Editor, useRenderIcon, ElMessage, ElMessageBox, Upload, Close, http, getGroupUrl, RegularVerification, verification } from "@/utils/importUsed"
+// 接口列表实例
+let UrlList = reactive(null)
+// 获取当前板块接口列表
+onMounted(async () => {
+  UrlList = await getGroupUrl(["prizeSet"]);
+  objectTableIdQuery();
+
+})
+// 组件传参对象
+const props = defineProps<{
+  submit: Function;
+  addVisible: {
+    type: Boolean;
+    default: false;
+  };
+  width: {
+    type: Number;
+    default: 50;
+  };
+  objectTableId: {
+    type: Number;
+    default: 0;
+  },
+
+}>();
+// 表单数据
+let UpdateForm = ref({
+  fieldName: "", //字段名称
+  fieldEnName: "", //字段名
+  fieldReturnKind: "", //返回类型
+  objectTableId: props.objectTableId, //对象表
+
+
+});
+// 表单实例
+const ruleFormRef = ref()
+
+// 传参选项数据
+// 返回类型选项数据
+const fieldReturnKindOptionList = [
+  { id: '1', label: '字段值' },
+  { id: '2', label: '数量' },
+  { id: '3', label: '求和' },
+  { id: '4', label: '平均值' },
+]
+// 对象表选项数据
+const objectTableIdOptionList = ref([]);
+
+// 选项卡参数(默认值为列表某项的id)
+const activeId = ref('1')
+// 提交函数
+const submit = async (formEl) => {
+  // 表单校验拦截
+  if (!formEl) return
+  await formEl.validate(async (valid, fields) => {
+    if (valid) {
+      //表单校验成功回调
+      console.log('submit!')
+
+
+      // 需动态生成接口
+      const { status, msg }: any = await http.Request({
+        method: UrlList.prizeSet.priaddPriRecursionStartReturnField.method,
+        url: UrlList.prizeSet.priaddPriRecursionStartReturnField.url,
+        params: UpdateForm.value
+      });
+      if (status === 1) {
+        //业务成功回调
+        ElMessage({
+          message: "新增成功",
+          type: "success"
+        });
+        UpdateForm.value = {
+          fieldName: "", //字段名称
+          fieldEnName: "", //字段名
+          fieldReturnKind: "", //返回类型
+          objectTableId: props.objectTableId, //对象表
+
+        };
+        // 关闭新增弹窗;
+        closeVisible()
+      } else {
+        //业务失败回调
+        ElMessageBox.alert(msg, "提示", {
+          confirmButtonText: "关闭",
+          type: "warning"
+        });
+      }
+    } else {
+      //表单校验失败回调
+      ElMessage({
+        message: "请输入完整信息",
+        type: "error"
+      });
+    }
+  })
+};
+
+//获取对象表数据
+const objectTableIdQuery = async () => {
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriRecursionStartTableDic.method, url: UrlList.prizeSet.prigetPriRecursionStartTableDic.url, params: {} });
+  if (status === 1) {
+    objectTableIdOptionList.value = data.records;
+  }
+};
+
+
+
+// 表单校验规则
+const rules = reactive({
+
+})
+// 关闭弹窗回调函数
+const closeFn: any = inject("closeAddVisible");
+const closeVisible = () => {
+  // 清空表单项;
+  UpdateForm.value = {
+    fieldName: "", //字段名称
+    fieldEnName: "", //字段名
+    fieldReturnKind: "", //返回类型
+    objectTableId: props.objectTableId, //对象表
+
+  };
+  closeFn();
+};
+
+// 弹窗是否全屏
+const isFullscreen = ref(false)
+</script>
+
+<template lang="pug">
+.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="fieldName")
+        el-input(v-model='UpdateForm.fieldName' autocomplete='off'
+          placeholder="请输入字段名称")
+      el-form-item(label='字段名' prop="fieldEnName")
+        el-input(v-model='UpdateForm.fieldEnName' autocomplete='off'
+          placeholder="请输入字段名")
+      el-form-item(label="返回类型", prop="fieldReturnKind")
+        el-select(
+          v-model="UpdateForm.fieldReturnKind",
+          placeholder="请选择返回类型",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldReturnKindOptionList")
+      el-form-item(label="对象表", prop="objectTableId")
+        el-select(
+          v-model="UpdateForm.objectTableId",
+          placeholder="请选择对象表",
+          clearable,
+        )
+          el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in objectTableIdOptionList")
+
+    .flex.justify-end
+      el-button(
+        :icon="useRenderIcon(Close)",
+        @click="closeVisible"
+      ) 关闭
+      el-button(
+        type="primary",
+        :icon="useRenderIcon(Upload)",
+        @click="submit(ruleFormRef)"
+      ) 确认提交
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+
+:deep(.el-form-item__label) {
+  font-weight: 700;
+}
+
+:deep(.el-pagination) {
+  flex-flow: wrap;
+}
+
+:deep(.is-draggable) {
+  max-height: 80vh;
+  overflow: auto;
+}
+
+:deep(.el-dialog__header) {
+  position: sticky;
+  top: 0;
+  z-index: 2;
+  background: #fff;
+}
+
+.collapsedom {
+  padding: 0 20px;
+  background-color: #fff;
+}
+
+.ovh-x {
+  height: 40vh;
+  overflow-y: auto;
+}
+
+:deep(.el-descriptions__header) {
+  margin: 16px 0 !important;
+}
+
+.el-select {
+  width: 100%;
+}
+</style>

+ 208 - 0
src/views/pri/priRecursionStartReturnField/components/updatePriRecursionStartReturnField/index.vue

@@ -0,0 +1,208 @@
+<script lang="ts">
+// 声明额外的选项
+export default {
+  name: "Edit"
+};
+</script>
+<script setup lang="ts">
+import { inject, onMounted, reactive, ref, Uploadfile, UploadImg, Editor, useRenderIcon, ElMessage, ElMessageBox, Upload, Close, http, getGroupUrl, RegularVerification, verification } from "@/utils/importUsed"
+// 接口列表实例
+let UrlList = reactive(null)
+// 获取当前板块接口列表
+onMounted(async () => {
+  UrlList = await getGroupUrl(["prizeSet"]);
+
+})
+const props = defineProps<{
+  editVisible: {
+    type: Boolean;
+    default: false;
+  };
+  width: {
+    type: Number;
+    default: 50;
+  };
+  formData: {
+    id: any;
+    type: any;
+    default: {};
+  };
+}>();
+// 表单数据
+const UpdateForm: any = ref({
+  id: null, //ID
+  fieldName: "", //字段名称
+  fieldEnName: "", //字段名
+  fieldReturnKind: "", //返回类型
+
+});
+// 返回类型选项数据
+const fieldReturnKindOptionList = [
+  { id: '1', label: '字段值' },
+  { id: '2', label: '数量' },
+  { id: '3', label: '求和' },
+  { id: '4', label: '平均值' },
+]
+
+// 表单实例
+const ruleFormRef = ref()
+
+// 选项卡参数(默认值为列表某项的id)
+const activeId = ref('1')
+// 提交函数
+const submit = async (formEl) => {
+  // 表单校验拦截
+  if (!formEl) return
+  await formEl.validate(async (valid, fields) => {
+    if (valid) {
+      //表单校验成功回调
+      console.log('submit!')
+
+      // 需动态生成接口
+      const { status, msg }: any = await http.Request({
+        method: UrlList.prizeSet.priupdatePriRecursionStartReturnField.method,
+        url: UrlList.prizeSet.priupdatePriRecursionStartReturnField.url,
+        params: UpdateForm.value
+      });
+      if (status === 1) {
+        //业务成功回调
+        ElMessage({
+          message: "修改成功",
+          type: "success"
+        });
+        UpdateForm.value = {
+          id: null, //ID
+          fieldName: "", //字段名称
+          fieldEnName: "", //字段名
+          fieldReturnKind: "", //返回类型
+
+        };
+        // 关闭修改弹窗;
+        closeUpdatePriRecursionStartReturnFieldVisible();
+      } else {
+        //业务失败回调
+        ElMessageBox.alert(msg, "提示", {
+          confirmButtonText: "关闭",
+          type: "warning"
+        });
+      }
+    } else {
+      //表单校验失败回调
+      ElMessage({
+        message: "请输入完整信息",
+        type: "error"
+      });
+    }
+  })
+};
+
+
+
+
+// 表单校验规则
+const rules = reactive({
+
+})
+// 关闭弹窗回调函数
+const closeFn: any = inject('closeEditUpdatePriRecursionStartReturnFieldVisible');
+const openVisible = async () => {
+  //通过ID获取表格数据
+  const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriRecursionStartReturnFieldQuery.method, url: UrlList.prizeSet.prigetPriRecursionStartReturnFieldQuery.url, params: { id: props.formData.id } });
+  if (status === 1) {
+    UpdateForm.value = data;
+
+  }
+};
+// 关闭弹窗回调函数
+const closeUpdatePriRecursionStartReturnFieldVisible = () => {
+  UpdateForm.value = {
+    id: null, //ID
+    fieldName: "", //字段名称
+    fieldEnName: "", //字段名
+    fieldReturnKind: "", //返回类型
+
+  };
+  closeFn();
+};
+
+// 弹窗是否全屏
+const isFullscreen = ref(false)
+</script>
+
+<template lang="pug">
+.main
+  el-dialog(v-model='props.editVisible' draggable width="50%" :fullscreen="isFullscreen" title="修改" @close="closeUpdatePriRecursionStartReturnFieldVisible" @open="openVisible")
+    el-form(:model='UpdateForm' label-position="right" ref="ruleFormRef" :rules="rules" label-width="100px")
+      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="fieldName")
+        el-input(v-model='UpdateForm.fieldName' autocomplete='off'
+          placeholder="请输入字段名称")
+      el-form-item(label='字段名' prop="fieldEnName")
+        el-input(v-model='UpdateForm.fieldEnName' autocomplete='off'
+          placeholder="请输入字段名")
+      el-form-item(label="返回类型", prop="fieldReturnKind")
+        el-select(
+          v-model="UpdateForm.fieldReturnKind",
+          placeholder="请选择返回类型",
+          clearable,
+        )
+          el-option(:label="item.label", :value="item.id" v-for="(item,index) in fieldReturnKindOptionList")
+
+    .flex.justify-end
+      el-button(
+        :icon="useRenderIcon(Close)",
+        :loading="loading",
+        @click="closeUpdatePriRecursionStartReturnFieldVisible()"
+      ) 关闭
+      el-button(
+        type="primary",
+        :icon="useRenderIcon(Upload)",
+        @click="submit(ruleFormRef)"
+      ) 确认提交
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+
+:deep(.el-form-item__label) {
+  font-weight: 700;
+}
+
+:deep(.el-pagination) {
+  flex-flow: wrap;
+}
+
+:deep(.is-draggable) {
+  max-height: 80vh;
+  overflow: auto;
+}
+
+:deep(.el-dialog__header) {
+  position: sticky;
+  top: 0;
+  z-index: 2;
+  background: #fff;
+}
+
+.collapsedom {
+  padding: 0 20px;
+  background-color: #fff;
+}
+
+.ovh-x {
+  height: 40vh;
+  overflow-y: auto;
+}
+
+:deep(.el-descriptions__header) {
+  margin: 16px 0 !important;
+}
+
+.el-select {
+  width: 100%;
+}
+</style>

+ 207 - 0
src/views/pri/priRecursionStartReturnField/hook.tsx

@@ -0,0 +1,207 @@
+import { reactive, onMounted, ref, ElMessage, ElMessageBox, http, getGroupUrl, RegularVerification, verification, PaginationProps } from "@/utils/importUsed";
+import { useRoute } from "vue-router";
+import router from "@/router";
+// 表单实例
+const ruleFormRef = ref()
+export function usePriRecursionStartReturnField() {
+  // 接口列表实例
+  let UrlList = reactive(null)
+  // 获取当前板块接口列表
+  onMounted(async () => {
+    const route = useRoute();
+    form.objectTableId = Number(route.query.objectTableId);
+
+    UrlList = await getGroupUrl(["prizeSet"]);
+    onSearch(ruleFormRef.value);
+    objectTableIdQuery();
+
+  });
+  let form = reactive({
+    fieldName: "", //字段名称
+    fieldEnName: "", //字段名
+    objectTableId: null, //对象表
+
+
+  });
+  const dataList = ref([]);
+  const loading = ref(false);
+  const dialogAddVisible = ref(false);
+  const pagination = reactive<PaginationProps>({
+    total: 0,
+    pageSize: 10,
+    currentPage: 1,
+    background: true
+  });
+  const columns: TableColumnList = [
+    {
+      type: "selection",
+      width: 55,
+      align: "left",
+      hide: ({ checkList }) => !checkList.includes("勾选列")
+    },
+    {
+      label: "序号",
+      type: "index",
+      width: 70,
+      hide: ({ checkList }) => !checkList.includes("序号列")
+    },
+    {
+      label: "ID",
+      prop: "id",
+      minWidth: 200
+    },
+    {
+      label: "字段名称",
+      prop: "fieldName",
+      minWidth: 200
+    },
+    {
+      label: "字段名",
+      prop: "fieldEnName",
+      minWidth: 200
+    },
+    {
+      label: "返回类型",
+      prop: "fieldReturnKind",
+      minWidth: 200
+    },
+
+    {
+      label: "操作",
+      fixed: "right",
+      width: 200,
+      slot: "operation"
+    }
+  ];
+  // 当前页数量切换
+  function handleSizeChange(val: number) {
+    if (typeof val === "number") {
+      pagination.pageSize = val;
+      onSearch(ruleFormRef.value);
+    }
+  }
+  // 当前页码切换
+  function handleCurrentChange(val: number) {
+    console.log(`current page: ${val}`);
+    if (typeof val === "number") {
+      pagination.currentPage = val;
+      onSearch(ruleFormRef.value);
+    }
+  }
+  // 选择表格项
+  function handleSelectionChange(val) {
+    console.log(`SelectionChange: ${val}`);
+    onSearch(ruleFormRef.value);
+  }
+  // 搜索列表
+  async function onSearch(formEl) {
+    // 表单校验拦截
+    if (!formEl) return
+    await formEl.validate(async (valid, fields) => {
+      if (valid) {
+        //表单校验成功回调
+        console.log('submit!')
+        // 状态调整为加载中
+        loading.value = true;
+        // 调用接口(需动态生成接口)
+        const { status, msg, data }: any = await http.Request({
+          method: UrlList.prizeSet.prigetPriRecursionStartReturnFieldList.method,
+          url: UrlList.prizeSet.prigetPriRecursionStartReturnFieldList.url,
+          params: {
+            ...form,
+            pageSize: pagination.pageSize,
+            pageNum: pagination.currentPage
+          }
+        });
+        dataList.value = data.records;
+        pagination.total = data.total;
+        setTimeout(() => {
+          loading.value = false;
+        }, 500);
+      } else {
+        //表单校验失败回调
+        ElMessage({
+          message: "请输入完整信息",
+          type: "error"
+        });
+      }
+    })
+  }
+  // 对象表选项数据
+  const objectTableIdOptionList = ref([]);
+  //获取对象表数据
+  async function objectTableIdQuery() {
+    const { status, data }: any = await http.Request({ method: UrlList.prizeSet.prigetPriRecursionStartTableDic.method, url: UrlList.prizeSet.prigetPriRecursionStartTableDic.url, params: {} });
+    if (status === 1) {
+      objectTableIdOptionList.value = data.records;
+    }
+  }
+
+
+
+
+  // 删除
+  function handleDelete(row) {
+    ElMessageBox.confirm(
+      `是否删除该递归开始条件返回字段? `,
+      "提示",
+      {
+        confirmButtonText: "删除",
+        cancelButtonText: "取消",
+        type: "warning"
+      }
+    ).then(async () => {
+      const { status, msg }: any = await http.Request({ method: UrlList.prizeSet.prideletePriRecursionStartReturnField.method, url: UrlList.prizeSet.prideletePriRecursionStartReturnField.url, params: String(row.id) });
+      if (status === 1) {
+        ElMessage({
+          message: "删除成功",
+          type: "success"
+        });
+        onSearch(ruleFormRef.value);
+      } else {
+        ElMessageBox.alert(msg, "提示", {
+          confirmButtonText: "关闭",
+          type: "warning"
+        });
+      };
+    })
+  }
+
+  // 新增
+  const addVisible = ref(false);
+  function handleAdd() {
+    addVisible.value = true;
+  };
+
+  // 修改
+  const editUpdatePriRecursionStartReturnFieldVisible = ref(false);
+  const editUpdatePriRecursionStartReturnFieldFormData = ref({});
+  function handleUpdatePriRecursionStartReturnField(row) {
+    editUpdatePriRecursionStartReturnFieldVisible.value = true;
+    // 表格数据赋值
+    editUpdatePriRecursionStartReturnFieldFormData.value = row;
+  };
+
+  return {
+    form,
+    loading,
+    columns,
+    dataList,
+    pagination,
+    onSearch,
+    handleSizeChange,
+    handleCurrentChange,
+    handleSelectionChange,
+    ruleFormRef,
+    objectTableIdQuery,
+    objectTableIdOptionList,
+
+    handleAdd,
+    addVisible,
+    handleUpdatePriRecursionStartReturnField,
+    editUpdatePriRecursionStartReturnFieldVisible,
+    editUpdatePriRecursionStartReturnFieldFormData,
+    handleDelete,
+
+  };
+}

+ 166 - 0
src/views/pri/priRecursionStartReturnField/index.vue

@@ -0,0 +1,166 @@
+<script lang="ts">
+// 声明额外的选项
+export default {
+  name: "PriRecursionStartReturnField"
+};
+</script>
+<script setup lang="ts">
+import { provide } from "vue";
+import { usePriRecursionStartReturnField } from "./hook";
+import { http } from "@/utils/http";
+import { useRenderIcon, hasAuth, PureTableBar } from "@/utils/importUsed";
+import Add from "./components/add/index.vue";
+import EditUpdatePriRecursionStartReturnField from "./components/updatePriRecursionStartReturnField/index.vue";
+import Search from "@iconify-icons/ep/search";
+import Addicon from "@iconify-icons/ep/document-add";
+import Delete from "@iconify-icons/ep/delete";
+import EditPen from "@iconify-icons/ep/edit-pen";
+import More from "@iconify-icons/ep/more-filled";
+
+const {
+  form,
+  loading,
+  columns,
+  dataList,
+  pagination,
+  onSearch,
+  handleSizeChange,
+  handleCurrentChange,
+  handleSelectionChange,
+  ruleFormRef,
+  objectTableIdOptionList,
+  handleAdd,
+  addVisible,
+  handleUpdatePriRecursionStartReturnField,
+  editUpdatePriRecursionStartReturnFieldVisible,
+  editUpdatePriRecursionStartReturnFieldFormData,
+  handleDelete,
+
+} = usePriRecursionStartReturnField();
+// 关闭添加
+const closeAddVisible = () => {
+  onSearch(ruleFormRef.value);
+  addVisible.value = false;
+}
+provide('closeAddVisible', closeAddVisible)
+// 关闭修改
+const closeEditUpdatePriRecursionStartReturnFieldVisible = () => {
+  onSearch(ruleFormRef.value);
+  editUpdatePriRecursionStartReturnFieldVisible.value = false
+}
+provide('closeEditUpdatePriRecursionStartReturnFieldVisible', closeEditUpdatePriRecursionStartReturnFieldVisible)
+
+</script>
+
+<template lang="pug">
+.main
+  div
+    //- 搜索表格组件条件
+    el-form.bg-bg_color.pl-8.pt-4.pr-8(
+      label-position="left"
+      label-width="100px"
+      :inline="true",
+      :model="form",
+      class="w-[99/100]"
+      ref="ruleFormRef"
+    )
+      el-form-item(label='字段名称' prop="fieldName")
+        el-input(v-model='form.fieldName' autocomplete='off'
+          placeholder="请输入字段名称")
+      el-form-item(label='字段名' prop="fieldEnName")
+        el-input(v-model='form.fieldEnName' autocomplete='off'
+          placeholder="请输入字段名")
+      el-form-item(label="对象表", prop="objectTableId")
+        el-select(
+          v-model="form.objectTableId",
+          placeholder="请选择对象表",
+          clearable,
+        )
+          el-option(:label="item.tableEnName", :value="item.id" v-for="(item,index) in objectTableIdOptionList")
+
+      el-form-item
+        el-button(
+          type="primary",
+          :icon="useRenderIcon(Search)",
+          :loading="loading",
+          @click="onSearch(ruleFormRef)"
+        ) 查询
+    //- 表格组件
+    PureTableBar(title="递归开始条件返回字段", @refresh="onSearch(ruleFormRef)" )
+      template(#buttons)
+        el-button(type="primary" :icon="useRenderIcon(Addicon)" @click="handleAdd()" v-if="hasAuth(['add'])") 新增
+
+      template(v-slot="{ size, checkList }")
+        pure-table( 
+          row-key="id"
+          ref="tableRef"
+          adaptive
+          align-whole="center"
+          table-layout="auto"
+          :loading="loading"
+          :size="size",
+          :data="dataList",
+          :columns="columns",
+          :checkList="checkList",
+          :pagination="pagination",
+          :paginationSmall="size === 'default' ? true : false",
+          :header-cell-style="{ background: 'var(--el-table-row-hover-bg-color)', color: 'var(--el-text-color-primary)' }",
+          @selection-change="handleSelectionChange",
+          @size-change="handleSizeChange",
+          @current-change="handleCurrentChange"
+        )
+          template(#operation="{ row }")
+            el-button.reset-margin(
+              link
+              type="primary"
+              size="small"
+              @click="handleUpdatePriRecursionStartReturnField(row)"
+              :icon="useRenderIcon(EditPen)"
+              v-if="hasAuth(['updatePriRecursionStartReturnField'])"
+            ) 编辑
+            el-button.reset-margin(
+              link
+              type="primary"
+              size="small"
+              @click="handleDelete(row)"
+              :icon="useRenderIcon(Delete)"
+              v-if="hasAuth(['delete'])"
+            ) 删除
+
+
+
+    Add(:addVisible="addVisible" :objectTableId="form.objectTableId")
+    EditUpdatePriRecursionStartReturnField(:editVisible="editUpdatePriRecursionStartReturnFieldVisible" :formData="editUpdatePriRecursionStartReturnFieldFormData")
+
+                    
+</template>
+
+<style scoped lang="scss">
+:deep(.el-dropdown-menu__item i) {
+  margin: 0;
+}
+
+:deep(.el-form-item__label) {
+  font-weight: 700;
+}
+
+:deep(.el-pagination) {
+  flex-flow: wrap;
+}
+
+:deep(.is-draggable) {
+  max-height: 80vh;
+  overflow: auto;
+}
+
+:deep(.el-dialog__header) {
+  position: sticky;
+  top: 0;
+  z-index: 2;
+  background: #fff;
+}
+
+:deep(.el-descriptions__header) {
+  margin: 16px 0 !important;
+}
+</style>

+ 21 - 8
src/views/pri/priRecursionStartTable/hook.tsx

@@ -15,6 +15,7 @@ export function usePriRecursionStartTable() {
     UrlList = await getGroupUrl(["prizeSet"]);
     onSearch(ruleFormRef.value);
     listIdQuery();
+    databaseIdQuery();
 
   });
   let form = reactive({
@@ -55,14 +56,12 @@ export function usePriRecursionStartTable() {
       minWidth: 200
     },
     {
-      label: "ID",
-      prop: "id",
-      minWidth: 200
-    },
-    {
-      label: "查询表",
-      prop: "tableEnName",
-      minWidth: 200
+      label: "数据库",
+      prop: "databaseId",
+      width: 200,
+      formatter: ({ databaseId }) => {
+        return databaseIdOptionList.value.find(item => item.id == databaseId).title
+      },
     },
 
     {
@@ -137,12 +136,25 @@ export function usePriRecursionStartTable() {
     }
   }
 
+  //获取查询库数据
+  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;
+    }
+  };
+
 
 
   //跳转到递归开始条件字段
   function linkToPriRecursionStartField(row) {
     router.push({ path: '../../pri/priRecursionStartField/index', query: { objectTableId: row.id } });
   }
+  //跳转到递归开始条件字段
+  function linkToPriRecursionStartReturnField(row) {
+    router.push({ path: '../../pri/priRecursionStartReturnField/index', query: { objectTableId: row.id } });
+  }
 
   // 删除
   function handleDelete(row) {
@@ -205,6 +217,7 @@ export function usePriRecursionStartTable() {
     editUpdatePriRecursionStartTableFormData,
     handleDelete,
     linkToPriRecursionStartField,
+    linkToPriRecursionStartReturnField,
     listIdOptionList,
 
   };

+ 10 - 0
src/views/pri/priRecursionStartTable/index.vue

@@ -35,6 +35,7 @@ const {
   editUpdatePriRecursionStartTableFormData,
   handleDelete,
   linkToPriRecursionStartField,
+  linkToPriRecursionStartReturnField,
   listIdOptionList,
 
 } = usePriRecursionStartTable();
@@ -140,6 +141,15 @@ provide('closeEditUpdatePriRecursionStartTableVisible', closeEditUpdatePriRecurs
                       :icon="useRenderIcon(EditPen)"
                       v-if="hasAuth(['linkToPriRecursionStartField'])"
                     ) 递归开始条件字段
+                  el-dropdown-item
+                    el-button.reset-margin.edit-btn(
+                      link
+                      type="primary"
+                      size="small"
+                      @click="linkToPriRecursionStartReturnField(row)"
+                      :icon="useRenderIcon(EditPen)"
+                      v-if="hasAuth(['linkToPriRecursionStartReturnField'])"
+                    ) 递归开始条件返回字段
 
     Add(:addVisible="addVisible" :listId="form.listId")
     EditUpdatePriRecursionStartTable(:editVisible="editUpdatePriRecursionStartTableVisible" :formData="editUpdatePriRecursionStartTableFormData")