Browse Source

829 早上提交

LT32820A 2 months ago
parent
commit
2d4891363f

+ 1 - 1
jeecg-boot/jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/controller/AppmanageController.java

@@ -30,7 +30,7 @@ public class AppmanageController {
 
 
     @ApiOperation("注册应用信息")
     @ApiOperation("注册应用信息")
     @PostMapping("/add")
     @PostMapping("/add")
-    @RequiresPermissions("Appmanage:addAppInfo")
+    @RequiresPermissions("system:app:register")
     public Result<String> addAppInfo(@RequestBody AppInfo appInfo) throws Exception {
     public Result<String> addAppInfo(@RequestBody AppInfo appInfo) throws Exception {
         System.out.println(appInfo.toString());
         System.out.println(appInfo.toString());
         String message = appInfoService.addAppInfo(appInfo);
         String message = appInfoService.addAppInfo(appInfo);

+ 5 - 1
jeecgboot-vue3/src/views/appmanage/AppBaseInfo.data.ts

@@ -481,7 +481,11 @@ export const listColumns2 =[
         title: '操作',
         title: '操作',
         key: 'action',
         key: 'action',
     },
     },
-    // 非信息部用户看到的列
+    {
+      title: '',
+      key: 'addType'
+    },
+  // 非信息部用户看到的列
     {
     {
       title: '业务对接人',
       title: '业务对接人',
       key: 'busUser',
       key: 'busUser',

+ 12 - 6
jeecgboot-vue3/src/views/appmanage/AppInfoList.vue

@@ -48,7 +48,7 @@
                 @cancel="handleAdd('easy')">
                 @cancel="handleAdd('easy')">
           <a-button type="primary" preIcon="ant-design:plus-outlined">注 册</a-button>
           <a-button type="primary" preIcon="ant-design:plus-outlined">注 册</a-button>
         </a-popconfirm>
         </a-popconfirm>
-      <a-button @click="batchDelete" :disabled="!batchDeleteAvailable" > 批量删除</a-button>
+<!--      <a-button @click="batchDelete" :disabled="!batchDeleteAvailable" > 批量删除</a-button>-->
     </div>
     </div>
 
 
     <!-- 添加事件弹出对话框表单 -->
     <!-- 添加事件弹出对话框表单 -->
@@ -219,8 +219,15 @@
   </div>
   </div>
 </template>
 </template>
 <script lang="ts">
 <script lang="ts">
-import { SmileOutlined, DownOutlined, AndroidOutlined,GoldOutlined,PartitionOutlined,SearchOutlined,UndoOutlined} from '@ant-design/icons-vue';
-import { computed, reactive, toRefs, ref,defineComponent} from 'vue';
+import { SmileOutlined,
+  DownOutlined,
+  AndroidOutlined,
+  GoldOutlined,
+  PartitionOutlined,
+  SearchOutlined,
+  UndoOutlined,
+  ExclamationCircleOutlined} from '@ant-design/icons-vue';
+import {computed, reactive, toRefs, ref, defineComponent, createVNode} from 'vue';
 import { listColumns2,Appdescschema} from './AppBaseInfo.data';
 import { listColumns2,Appdescschema} from './AppBaseInfo.data';
 import {list, getDictItem, lookBaseInforeq, lookEnvInforeq, lookDocInforeq, deleteOne,
 import {list, getDictItem, lookBaseInforeq, lookEnvInforeq, lookDocInforeq, deleteOne,
   lookAppInfoDetail,
   lookAppInfoDetail,
@@ -262,7 +269,7 @@ const addFormDraftData = ref({
   userInfo:{},
   userInfo:{},
   current: 0
   current: 0
 })  // 添加表单草稿数据,存储添加至一半时关闭表单且已填入的数据
 })  // 添加表单草稿数据,存储添加至一半时关闭表单且已填入的数据
-const draftUserInfo = ref()
+
 
 
 type Key = string | number;
 type Key = string | number;
 
 
@@ -449,7 +456,7 @@ export default defineComponent({
 
 
       this.$nextTick(() => {
       this.$nextTick(() => {
         if (this.$refs.baseInfoForm) {
         if (this.$refs.baseInfoForm) {
-          (this.$refs.baseInfoForm as any).getData11()
+          (this.$refs.baseInfoForm as any).initBaseForm()
         }
         }
       });
       });
       setTimeout(function (){
       setTimeout(function (){
@@ -528,7 +535,6 @@ export default defineComponent({
       }
       }
     },
     },
 
 
-
     // 应用信息删除(单个)事件
     // 应用信息删除(单个)事件
     async deleteAppInfo(value){
     async deleteAppInfo(value){
       const params = [value]
       const params = [value]

+ 29 - 30
jeecgboot-vue3/src/views/appmanage/addForm/Step1.vue

@@ -20,6 +20,7 @@
         <a-button type="primary" @click="uncheck" v-if="!isFormType&&baseFormData?.isEdit" v-show="unCheckTag">反审核</a-button>
         <a-button type="primary" @click="uncheck" v-if="!isFormType&&baseFormData?.isEdit" v-show="unCheckTag">反审核</a-button>
         <a-button type="primary" @click="quiteuncheck" v-if="!isFormType&&baseFormData?.isEdit" v-show="!unCheckTag">退出反审核</a-button>
         <a-button type="primary" @click="quiteuncheck" v-if="!isFormType&&baseFormData?.isEdit" v-show="!unCheckTag">退出反审核</a-button>
         <a-button @click="closeModal('filling')">关 闭</a-button>
         <a-button @click="closeModal('filling')">关 闭</a-button>
+        <!-- 作为编辑表单下的保存按钮 -->
         <a-button type="primary" :disabled="unCheckTag" @click="save" v-if="!isFormType&&baseFormData?.isEdit" v-show="!unCheckTag">保 存</a-button>
         <a-button type="primary" :disabled="unCheckTag" @click="save" v-if="!isFormType&&baseFormData?.isEdit" v-show="!unCheckTag">保 存</a-button>
         <a-button
         <a-button
           v-show="addType==='full'"
           v-show="addType==='full'"
@@ -28,6 +29,8 @@
           @click="customSubmitFunc">
           @click="customSubmitFunc">
             下一步 ->
             下一步 ->
         </a-button>
         </a-button>
+
+        <!-- 作为简易注册表单下的保存按钮  -->
         <a-button
         <a-button
             v-show="!(addType==='full')"
             v-show="!(addType==='full')"
             v-if="isFormType"
             v-if="isFormType"
@@ -40,15 +43,15 @@
   </div>
   </div>
 </template>
 </template>
 <script lang="ts">
 <script lang="ts">
-  import {defineComponent, ref, reactive} from 'vue';
-  import { BasicForm, useForm } from '/@/components/Form';
-  import {step1Schemas} from './data';
-  import { Select, Input, Divider, message, SelectProps } from 'ant-design-vue';
-  import {string} from "vue-types";
-  import {editBaseInfo, getLock, saveOrUpdate, selectUserByDept, unLock} from '../AppBaseInfo.api'
-  import { useUserStore } from '@/store/modules/user'
+import {defineComponent, reactive, ref} from 'vue';
+import {BasicForm, useForm} from '/@/components/Form';
+import {step1Schemas} from './data';
+import {Divider, Input, message, Select, SelectProps} from 'ant-design-vue';
+import {string} from "vue-types";
+import {editBaseInfo, getLock, saveOrUpdate, selectUserByDept, unLock} from '../AppBaseInfo.api'
+import {useUserStore} from '@/store/modules/user'
 
 
-  //设置变量储存登陆人信息
+//设置变量储存登陆人信息
   const userStore = useUserStore();
   const userStore = useUserStore();
   console.log("登录用户:"+userStore.userInfo.id)
   console.log("登录用户:"+userStore.userInfo.id)
   console.dir(userStore)
   console.dir(userStore)
@@ -119,11 +122,10 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
           addType: 'easy'
           addType: 'easy'
         })
         })
         appInfoData.appBaseInfoDTO = addFormvalues
         appInfoData.appBaseInfoDTO = addFormvalues
-        console.log("提交数据")
-        console.dir(appInfoData)
         const res = await saveOrUpdate(appInfoData,false)
         const res = await saveOrUpdate(appInfoData,false)
         console.log("保存结果:" + res)
         console.log("保存结果:" + res)
         if (res !== '应用名称已存在'){
         if (res !== '应用名称已存在'){
+
           await this.closeModal('submitted')
           await this.closeModal('submitted')
         }
         }
       },
       },
@@ -132,36 +134,31 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
       // tag: 用于判断是填写过程中的关闭,还是已提交信息后的关闭()关系到草稿数据是否需要清除
       // tag: 用于判断是填写过程中的关闭,还是已提交信息后的关闭()关系到草稿数据是否需要清除
       async closeModal(tag){
       async closeModal(tag){
         console.log("关闭表单1事件")
         console.log("关闭表单1事件")
+        let obj = {
+          data: {},
+          info: 'base',
+          type: 'isAdd'
+        }
         // 判断该表单是处于添加表单下的关闭事件,还是处于编辑表单下的关闭事件
         // 判断该表单是处于添加表单下的关闭事件,还是处于编辑表单下的关闭事件
         if (this.formType === 'isAdd'){  // 处于添加表单下的关闭事件,需收集表单已填数据进行存储
         if (this.formType === 'isAdd'){  // 处于添加表单下的关闭事件,需收集表单已填数据进行存储
           console.log("表单一添加状态下关闭")
           console.log("表单一添加状态下关闭")
-          let obj = {
-            data: {},
-            info: 'base',
-            type: 'isAdd'
+          if (tag === 'filling'){  // 填写过程中关闭表单,需要保存草稿数据
+            obj.data = getFieldsValue()
           }
           }
-          if (tag === 'filling'){  // 填写过程中的关闭,需要保存草稿数据
-            const baseInfo = await getFieldsValue()
-            console.dir(baseInfo)
-            obj.data = baseInfo
-          }
-          this.$emit('closeModal',obj);
-        }else { // 处于编辑表单下的关闭事件,需回收反审核状态
+        }else { // 处于编辑表单下的关闭事件
           console.log("表单一编辑状态下关闭")
           console.log("表单一编辑状态下关闭")
-          // 判断是不是处于反审核状态下的关闭
+          // 判断是不是处于反审核状态下的关闭,需回收反审核状态
           if (!unCheckTag.value){
           if (!unCheckTag.value){
             console.log("表单一处于反审核状态下的关闭事件")
             console.log("表单一处于反审核状态下的关闭事件")
-            unLock("AppbaseInfo"+this.baseFormData?.key)
-          }
-          const obj = {
-            type: 'isBaseFrom'
+            await unLock("AppbaseInfo" + this.baseFormData?.key)
           }
           }
-          this.$emit('closeModal',obj);
+          obj.type = 'isBaseFrom'
         }
         }
+        this.$emit('closeModal',obj);
       },
       },
 
 
       // 设置表单数据
       // 设置表单数据
-      async getData11(value) {
+      async initBaseForm(value) {
         console.log("表单一设置数据")
         console.log("表单一设置数据")
         // 设置信息部用户
         // 设置信息部用户
         await selectUserByDept('1817753406332235777').then(res => {
         await selectUserByDept('1817753406332235777').then(res => {
@@ -178,9 +175,10 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
         let formData = {...this.baseFormData}
         let formData = {...this.baseFormData}
         if (this.formType === "isAdd"){
         if (this.formType === "isAdd"){
           console.log("表单一:作为添加表单的初始化:"+unCheckTag.value)
           console.log("表单一:作为添加表单的初始化:"+unCheckTag.value)
+          console.dir(value)
           isFormType.value = true
           isFormType.value = true
           unCheckTag.value = false
           unCheckTag.value = false
-          await setFieldsValue(value)
+          if (value !== undefined) await setFieldsValue(value)
         }else {
         }else {
           console.log("作为编辑表单的初始化:"+unCheckTag.value)
           console.log("作为编辑表单的初始化:"+unCheckTag.value)
           console.dir(formData)
           console.dir(formData)
@@ -190,7 +188,7 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
         }
         }
       },
       },
 
 
-      // 保存数据
+      // 保存数据()
       async save(){
       async save(){
         // 获取编辑后的数据
         // 获取编辑后的数据
         const values = await validate();
         const values = await validate();
@@ -200,6 +198,7 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
           console.log("保存数据成功响应"+res)
           console.log("保存数据成功响应"+res)
           message.success("保存成功!")
           message.success("保存成功!")
           unCheckTag.value = true
           unCheckTag.value = true
+          // 清空草稿数据
         })
         })
       },
       },
 
 

+ 1 - 1
jeecgboot-vue3/src/views/appmanage/addForm/index.vue

@@ -83,7 +83,7 @@ import {any, array, string} from "vue-types";
       appInfoData.addType = this.addType
       appInfoData.addType = this.addType
       this.$nextTick(() => {
       this.$nextTick(() => {
         if (this.$refs.step1) {
         if (this.$refs.step1) {
-          (this.$refs.step1 as any).getData11(this.addFormDraftData?.appBaseInfoDTO);
+          (this.$refs.step1 as any).initBaseForm(this.addFormDraftData?.appBaseInfoDTO);
         }
         }
       });
       });
       if(tag.value){   // 完整添加
       if(tag.value){   // 完整添加