LT32820A 2 месяцев назад
Родитель
Сommit
aef80022e1

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

@@ -483,20 +483,20 @@ export const listColumns2 =[
   // 非信息部用户看到的列
     {
       title: '业务对接人',
-      key: 'busUser',
-      dataIndex: 'busUser',
+      key: 'businessUser',
+      dataIndex: 'businessUser',
       show: false,
     },
     {
       title: '需求对接人',
-      key: 'reqUser',
-      dataIndex: 'reqUser',
+      key: 'requirementUser',
+      dataIndex: 'requirementUser',
       show: false,
     },
     {
       title: '运维负责人',
-      key: 'opeUser',
-      dataIndex: 'opeUser',
+      key: 'operationUser',
+      dataIndex: 'operationUser',
     }
 ];
 

+ 20 - 39
jeecgboot-vue3/src/views/appmanage/AppInfoList.vue

@@ -97,8 +97,14 @@
         :width="1000">
       <a-spin tip="加载中" :spinning="isLoading">
         <div style="height: 40vh" v-if="isLoading"></div>
-      <EnvInfoFrom ref="envInfoForm" v-show="!isLoading" @closeModal="closeModal" formType="isEnvFrom"
-                   :envFormData="envFormData" :appid="appid"/>
+        <div style="padding-top: 15px">
+          <EnvInfoFrom ref="envInfoForm"
+                       v-show="!isLoading"
+                       @closeModal="closeModal"
+                       formType="isEnvFrom"
+                       :envFormData="envFormData"
+                       :appid="appid"/>
+        </div>
       </a-spin>
     </a-modal>
 
@@ -125,8 +131,10 @@
         :width="1200">
       <a-spin tip="加载中" :spinning="isLoading">
         <div style="height: 80vh" v-if="isLoading"></div>
-        <UserInfoFrom ref="userInfoForm" v-show="!isLoading" v-if="userVisible"
-                      @closeModal="closeModal" formType="isUserFrom" :userFormData="userFormData" :appid="appid"/>
+        <div style="padding-right: 15px; padding-left: 15px">
+          <UserInfoFrom ref="userInfoForm" v-show="!isLoading" v-if="userVisible"
+                        @closeModal="closeModal" formType="isUserFrom" :userFormData="userFormData" :appid="appid"/>
+        </div>
       </a-spin>
     </a-modal>
 
@@ -212,7 +220,7 @@
                 cancel-text="否"
                 @confirm="deleteAppInfo(record.id)"
                 @cancel="cancel">
-              <a href="#" v-if="showAddAppInfoButtonTag">删除</a>
+              <a href="#" v-if="isInfoDeptUserTag">删除</a>
             </a-popconfirm>
           </div>
         </template>
@@ -227,14 +235,13 @@ import { SmileOutlined,
   GoldOutlined,
   PartitionOutlined,
   SearchOutlined,
-  UndoOutlined,
-  ExclamationCircleOutlined} from '@ant-design/icons-vue';
+  UndoOutlined} from '@ant-design/icons-vue';
 import {computed, reactive, toRefs, ref, defineComponent, createVNode} from 'vue';
 import { listColumns2,Appdescschema} from './AppBaseInfo.data';
 import {
   list, getDictItem, lookBaseInforeq, lookEnvInforeq, lookDocInforeq, deleteOne,
   lookAppInfoDetail,
-  isInfoUser, isAppAdminOrDevOrOpe, isAppAdmin, JFlow_Test1
+  isInfoUser, isAppAdminOrDevOrOpe, isAppAdmin
 } from './AppBaseInfo.api'
 import FormStepPage from "@/views/appmanage/addForm/index.vue"
 import BaseInfoFrom from '@/views/appmanage/addForm/Step1.vue'
@@ -331,14 +338,13 @@ export default defineComponent({
   },
 
   async created() {
-    console.log("创建完成啦啦啦")
     // 清除草稿数据缓存
     columns.value = listColumns2
+    // 检查当前进入应用管理的用户是否为信息部用户
     const isInfoDeptUser = await isInfoUser()
     isInfoDeptUserTag.value = isInfoDeptUser
-    console.log("是否为信息部用户:"+isInfoDeptUser)
+    // 是否显示注册应用按钮
     showAddAppInfoButtonTag.value = await isAppAdmin()
-    console.log(showAddAppInfoButtonTag.value)
 
     if (isInfoDeptUser){
       columns.value.splice(11, 4)
@@ -365,33 +371,19 @@ export default defineComponent({
   },
 
   methods:{
-    async test(){
-      try {
-        let userInfo = await JFlow_Test1()
-        console.log("看看拿到的userInfo:")
-        console.dir(userInfo)
-      }catch (e){
-       console.log("错误:"+e)
-      }
-    },
 
     // 关闭对话框事件
     closeModal(value){
       console.log("主页面关闭")
       switch (value.type){
         case 'isAdd':
-          console.log("主页面关闭添加表单事件")
           addFormDraftData.value = value.data
-          console.log("关闭注册对话框时存储的草稿数据")
-          console.dir(addFormDraftData)
           modalVisible.value = false;
           break;
         case 'isUserFrom':
-          console.log("用户信息表单关闭")
           userVisible.value =false;
           break;
         case 'isEnvFrom':
-          console.log("环境信息表单关闭")
           envVisible.value =false;
           break;
         case 'isDocFrom':
@@ -417,8 +409,6 @@ export default defineComponent({
       this.appname = appname
       console.log("查看应用信息详情:"+value)
       await lookAppInfoDetail(value).then((res)=>{
-        console.log("详情信息查询成功")
-        console.dir(res)
         // 判断有哪些应用环境信息
         let hasProdInfo = false
         let hasDevInfo = false
@@ -458,15 +448,12 @@ export default defineComponent({
       this.appid = value
       try {
         await lookBaseInforeq(value).then(response =>{
-          console.log("请求成功")
-          console.dir(response)
           this.baseFormData = response
         })
       }catch (e){
         console.log("请求异常", e)
       }
       baseVisible.value = true;
-
       this.$nextTick(() => {
         if (this.$refs.baseInfoForm) {
           (this.$refs.baseInfoForm as any).initBaseForm()
@@ -486,8 +473,6 @@ export default defineComponent({
         appname.value = name
         this.appid = value
         await lookEnvInforeq(value).then(response =>{
-          console.log("查询应用环境信息成功")
-          console.dir(response)
           this.envFormData = response
           envVisible.value = true
         })
@@ -508,7 +493,6 @@ export default defineComponent({
     async lookDocInfo(value, name) {
       isLoading.value = true
       appname.value = name
-      console.log("查看应用文档信息:" + value)
       try {
         await lookDocInforeq(value).then(response => {
           this.docFormData = response
@@ -557,7 +541,7 @@ export default defineComponent({
           this.resetAppInfo()
         }
         else {
-         message.warning("您无权执行此操作")
+         message.warning("删除失败")
         }
       })
     },
@@ -574,7 +558,6 @@ export default defineComponent({
 
     // 查询按钮事件
     async queryAppInfo(){
-      console.log("执行了查询事件")
       await list({
         appname: formState.appname, // 根据需要设置查询参数
         apptype: formState.apptype,
@@ -586,10 +569,10 @@ export default defineComponent({
           let dateB = new Date(b.createTime);
           return dateB - dateA;
         });
+        console.log("查询到的应用信息")
+        console.dir(res)
         this.tableData = res.filter(obj => obj.id !== '0');
       })
-      console.log("发送了一次查询")
-      console.dir(this.tableData)
     },
 
     // 重置按钮事件
@@ -612,8 +595,6 @@ export default defineComponent({
       isLoading.value = true
       let time = isaddType === 'full'? 1500:1000
       addType.value = isaddType
-      console.log("点击注册时查看草稿数据")
-      console.dir(addFormDraftData)
       menuInfoisshow.value = isaddType === 'full';
       setTimeout(function (){
         isLoading.value = false

+ 10 - 22
jeecgboot-vue3/src/views/appmanage/addForm/Step1.vue

@@ -7,7 +7,7 @@
             v-model:value="model[field]"
             show-search
             placeholder="选择用户"
-            style="width: 150px"
+            style="width: 183px"
             :options="infoDeptUseroptions"
             :filter-option="filterOption"
             @focus="handleFocus"
@@ -36,7 +36,7 @@
             v-if="isFormType"
             type="primary"
             @click="handAdd">
-          保 存
+          提交审核
         </a-button>
       </div>
     </div>
@@ -53,13 +53,11 @@ import {useUserStore} from '@/store/modules/user'
 
 //设置变量储存登陆人信息
   const userStore = useUserStore();
-  console.log("登录用户:"+userStore.userInfo.id)
-  console.dir(userStore)
   step1Schemas.forEach(item =>{
     if (item.field === 'admin') item.defaultValue = userStore.userInfo.id
   })
 
-  const [register, {setFieldsValue, getFieldsValue, validate }]  = useForm({
+const [register, {setFieldsValue, getFieldsValue, validate }]  = useForm({
     labelWidth: 100,
     schemas: step1Schemas,
     actionColOptions: {
@@ -78,7 +76,7 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
       appid: string,
       baseFormData: {
         type: Object as PropType<{
-          key: string;
+          id: string;
           name: string;
           type: string;
           status: string;
@@ -123,9 +121,8 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
         })
         appInfoData.appBaseInfoDTO = addFormvalues
         const res = await saveOrUpdate(appInfoData,false)
-        console.log("保存结果:" + res)
         if (res !== '应用名称已存在'){
-
+          await setFieldsValue(null)
           await this.closeModal('submitted')
         }
       },
@@ -133,7 +130,6 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
       // 向父组件传值触发关闭对话框事件
       // tag: 用于判断是填写过程中的关闭,还是已提交信息后的关闭()关系到草稿数据是否需要清除
       async closeModal(tag){
-        console.log("关闭表单1事件")
         let obj = {
           data: {},
           info: 'base',
@@ -141,7 +137,6 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
         }
         // 判断该表单是处于添加表单下的关闭事件,还是处于编辑表单下的关闭事件
         if (this.formType === 'isAdd'){  // 处于添加表单下的关闭事件,需收集表单已填数据进行存储
-          console.log("表单一添加状态下关闭")
           if (tag === 'filling'){  // 填写过程中关闭表单,需要保存草稿数据
             obj.data = getFieldsValue()
           }
@@ -150,7 +145,7 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
           // 判断是不是处于反审核状态下的关闭,需回收反审核状态
           if (!unCheckTag.value){
             console.log("表单一处于反审核状态下的关闭事件")
-            await unLock("AppbaseInfo" + this.baseFormData?.key)
+            await unLock("AppbaseInfo:"+this.appid)
           }
           obj.type = 'isBaseFrom'
         }
@@ -173,15 +168,12 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
           infoDeptUseroptions.value = infoUserData
         })
         let formData = {...this.baseFormData}
+        // 作为新增表单的初始化
         if (this.formType === "isAdd"){
-          console.log("表单一:作为添加表单的初始化:"+unCheckTag.value)
-          console.dir(value)
           isFormType.value = true
           unCheckTag.value = false
           if (value !== undefined) await setFieldsValue(value)
-        }else {
-          console.log("作为编辑表单的初始化:"+unCheckTag.value)
-          console.dir(formData)
+        }else {  // 作为编辑表单的初始化
           isFormType.value = false
           unCheckTag.value = true
           await setFieldsValue(formData)
@@ -192,10 +184,7 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
       async save(){
         // 获取编辑后的数据
         const values = await validate();
-        console.log("保存提交的values")
-        console.dir(values)
         await editBaseInfo(values).then(res =>{
-          console.log("保存数据成功响应"+res)
           message.success("保存成功!")
           unCheckTag.value = true
           // 清空草稿数据
@@ -204,8 +193,8 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
 
       // 反审核按钮
       async uncheck(){
-        console.log("反审核:"+this.baseFormData?.key)
-        await getLock("AppbaseInfo:"+this.baseFormData?.key).then((res: boolean) =>{
+        console.log("反审核:"+this.appid)
+        await getLock("AppbaseInfo:"+this.appid).then((res: boolean) =>{
           res? message.error('当前信息处于反审核状态!') : message.success('反审核成功')
           unCheckTag.value = res
         })
@@ -216,7 +205,6 @@ const infoDeptUseroptions = ref<SelectProps['options']>([]);
       async quiteuncheck(){
         await unLock("AppbaseInfo:"+this.appid)
         unCheckTag.value = true
-        console.log("退出反审核:"+unCheckTag.value)
       },
     },
 

+ 94 - 56
jeecgboot-vue3/src/views/appmanage/addForm/Step2.vue

@@ -1,36 +1,53 @@
 <template>
   <div>
     <div class="step2"  ref="scrollableDiv">
-    <div>
-    <!-- 表单删除按钮 -->
-    <a-button @click="closeenvForm(1)" type="text" v-if="envFrom1" v-show="!unCheckTag"
-              preIcon="ant-design:close-outlined" style="margin-left: 95%; margin-bottom: 2%"/>
-    <BasicForm @register="register1"
-                     :disabled="unCheckTag"
-                     v-if="envFrom1"
-                     style="height: 25vh"/>
-    </div>
-    <div>
-      <a-divider v-if="envFrom2" style="margin-top: 2%"/>
+      <div>
       <!-- 表单删除按钮 -->
-      <a-button @click="closeenvForm(2)" type="text" v-if="envFrom2" v-show="!unCheckTag"
-                preIcon="ant-design:close-outlined" style="margin-left: 95%; margin-bottom: 2%"/>
-      <BasicForm @register="register2"
-                       :disabled="unCheckTag"
-                       v-if="envFrom2"
-                       style="height: 25vh"/>
-    </div>
-    <div>
-      <a-divider v-if="envFrom3"/>
-      <a-button @click="closeenvForm(3)" type="text" v-if="envFrom3" v-show="!unCheckTag"
+      <a-button @click="closeenvForm(1)" type="text" v-if="envFrom1" v-show="!unCheckTag"
                 preIcon="ant-design:close-outlined" style="margin-left: 95%; margin-bottom: 2%"/>
-      <BasicForm @register="register3"
+      <BasicForm @register="register1"
                        :disabled="unCheckTag"
-                       v-if="envFrom3"
-                       style="height: 25vh"/>
-    </div>
-    <a-button v-if="!unCheckTag||formType" v-show="!(showAddEnvButtonTag === 3)" :disabled="unCheckTag" @click="addOtherEnvType"
-              style="width: 60%; margin-left: 20%" type="primary">添加环境信息</a-button>
+                       v-if="envFrom1"
+                 style="height: 30vh">
+        <template #envType="{model, field}">
+          <a-select
+            v-model:value="model[field]"
+            show-search
+            placeholder="选择用户"
+            style="width: 183px"
+            :options="infoDeptUseroptions"
+            :filter-option="filterOption"
+            @focus="handleFocus"
+            @blur="handleBlur"
+            @change="handleChange"
+          ></a-select>
+        </template>
+      </BasicForm>
+      </div>
+      <div style="margin-top: 2%">
+        <a-divider v-if="envFrom2" />
+        <!-- 表单删除按钮 -->
+        <a-button @click="closeenvForm(2)" type="text" v-if="envFrom2" v-show="!unCheckTag"
+                  preIcon="ant-design:close-outlined" style="margin-left: 95%; margin-bottom: 2%"/>
+        <BasicForm @register="register2"
+                         :disabled="unCheckTag"
+                         v-if="envFrom2"
+                         style="height: 32vh"/>
+      </div>
+      <div>
+        <a-divider v-if="envFrom3"/>
+        <a-button @click="closeenvForm(3)" type="text" v-if="envFrom3" v-show="!unCheckTag"
+                  preIcon="ant-design:close-outlined" style="margin-left: 95%; margin-bottom: 2%"/>
+        <BasicForm @register="register3"
+                         :disabled="unCheckTag"
+                         v-if="envFrom3"
+                         style="height: 25vh"/>
+      </div>
+  <!--      <br/><br/><br/><br/><br/>-->
+      <div class="addEnvInfoBtnDiv">
+        <a-button v-if="!unCheckTag||formType" v-show="!(showAddEnvButtonTag === 3)" :disabled="unCheckTag" @click="addOtherEnvType"
+                    class="addEnvInfoBtn" type="primary">添加环境信息</a-button>
+      </div>
   </div>
     <div class="addFromButton">
       <div class="buttonPosition">
@@ -138,6 +155,24 @@
     },
 
     methods:{
+
+      judgeEnvTypeisSame(){
+        if (envData.length>1){
+          const envSet = new Set();
+          for (const obj of envData) {
+            if (envSet.has(obj.env)) {
+              message.error("不能设置相同的环境类型")
+              return false
+            } else {
+              // 添加到 Set 中
+              envSet.add(obj.env);
+            }
+          }
+        }
+        return true
+      },
+
+
         // 向父组件传值触发关闭对话框事件
       async closeModal(){
         console.log("关闭表单2事件")
@@ -256,33 +291,23 @@
           }
       },
 
+      // 点击下一步按钮事件
       async customSubmitFunc() {
          envData = []
-         console.log("点击下一步时")
-            // 触发表单1子组件事件,使其传值过来
-          if (envFrom1.value){
-            const v1 = await validate1()
-            envData.push(v1)
-          }
-          if (envFrom2.value){
-            const v2 = await validate2()
-            envData.push(v2)
-          }
-          if (envFrom3.value){
-            const v3 = await validate3()
-            envData.push(v3)
+          await this.assmblyData()
+          const tag = this.judgeEnvTypeisSame()
+          console.log("点击下一步时:"+tag)
+          if(this.judgeEnvTypeisSame()){
+            this.$emit('next',envData)
           }
-          this.$emit('next',envData)
         },
 
       // 反审核按钮
       async uncheck() {
-        console.log("反审核:"+this.envFormData)
         await getLock("AppenvInfo:"+this.appid).then((res: boolean) =>{
           res? message.error('当前信息处于反审核状态!') : message.success('反审核成功')
           unCheckTag.value = res
         })
-        console.log("反审核状态:"+unCheckTag)
       },
 
       async addOtherEnvType(){
@@ -290,9 +315,7 @@
           envFrom1.value = true
         } else if (!envFrom2.value) {
           // 检查表单一是否已填写数据(检查环境类型的数据)
-          console.log("打开环境信息表单二")
           const v1 = await validate1()
-          console.dir(v1)
           envFrom2.value = true
         } else {
           await validate2()
@@ -307,6 +330,7 @@
         })
       },
 
+      // 组装环境信息数据
       async assmblyData(){
         envData = []
         if (envFrom1.value){
@@ -325,17 +349,19 @@
 
       async save(){
         await this.assmblyData()
-        const obj = {
-          envInfo: envData,
-          appid: this.appid,
-          delids: delids.value
+        if(this.judgeEnvTypeisSame()){ // 不可输入两个类型一致的环境信息
+          const obj = {
+            envInfo: envData,
+            appid: this.appid,
+            delids: delids.value
+          }
+          await updateEnvInfo(obj).then(res=>{
+            console.log("保存成功:"+res)
+            unCheckTag.value = true
+            // 清空delids数据
+            delids.value = []
+          })
         }
-        await updateEnvInfo(obj).then(res=>{
-          console.log("保存成功:"+res)
-          unCheckTag.value = true
-          // 清空delids数据
-          delids.value = []
-        })
       },
 
       async customResetFunc() {
@@ -358,11 +384,23 @@
 <style lang="less" scoped>
   .step2 {
     width: 850px;
-    height: 40vh;
+    height: 50vh;
     margin: 0 auto;
     overflow-y: auto; /* 或使用 'scroll' */
     max-height: 60vh; /* 设定 div 的最大高度 */
+    display: grid;
+    gap: 20px; /* 使用 gap 属性 */
+  }
+
+  .addEnvInfoBtnDiv{
+    margin-top: 2%;
   }
+
+  .addEnvInfoBtn{
+    width: 60%;
+    margin-left: 20%;
+  }
+
   .addFromButton{
     width: 100%;
     height: auto;

+ 11 - 27
jeecgboot-vue3/src/views/appmanage/addForm/Step4.vue

@@ -1,4 +1,5 @@
 <template>
+  <a-spin tip="加载中" :spinning="isLoading">
   <div class="step4">
     <!-- 顶部条件筛选与操作区 -->
     <div class="operateRow">
@@ -82,14 +83,11 @@
      <a-table :columns="columns" :data-source="data" v-show="uncheckTag&&!tag" :scroll="{y: 500}"
               :pagination="pagination" @change="handleTableChange"/>
       <div class="table_container" >
-        <!-- 左用户数据列表    -->
+        <!-- 左用户数据列表 (反审核后)   -->
         <div class="table_left">
-          <a-table :row-selection="rowSelection" :columns="columns"
+          <a-table :row-selection="rowSelection" :columns="columns" :scroll="{y: 500}"
                    :data-source="data" v-show="!uncheckTag||tag" size="small"
                     class="userTableClass" :pagination="pagination" @change="handleTableChange">
-            <template #title>
-              <b>平台用户</b>
-            </template>
           </a-table>
         </div>
 
@@ -177,7 +175,6 @@
           保 存
         </a-button>
     </div>
-
     <!-- 提交审核事件二次确认 -->
     <a-modal
       v-model:visible="modalVisible"
@@ -196,6 +193,7 @@
       </a-row>
     </a-modal>
   </div>
+  </a-spin>
 </template>
 <script lang="ts">
 import {computed, defineComponent, ref, unref, watch} from 'vue';
@@ -251,7 +249,6 @@ let addUserModalTag = ref(false)
 const treeData = ref<TreeSelectProps['treeData']>([])  // 框部门信息数据
 const deptConditionValue = ref([])  // 查询条件-部门
 const isEdit = ref(false) // 当前用户是否可以进行应用用户编辑操作
-const permissionTag = ref(false)  // 授权对话框标志
 const deptInfovalue = ref<string>();
 const searchValue = ref('')
 
@@ -282,6 +279,7 @@ export default defineComponent({
 
   data(){
     return{
+      isLoading: false,
       modalVisible,
       collapsed: ref<boolean>(false),
       selectedKeys: ref<string[]>(['1']),
@@ -295,10 +293,9 @@ export default defineComponent({
       treeData,
       appUserids: [],
       isEdit,
-      permissionTag,
       pagination: {
         current: 1, // 当前页码
-        pageSize: 5, // 每页显示条数
+        pageSize: 50, // 每页显示条数
         total: 50,
       },
     }
@@ -337,11 +334,7 @@ export default defineComponent({
         filteruserids: filteruserids,
         pageNo: pageNo
       }
-      console.log("发送的查询参数:"+tag)
-      console.dir(params)
       await queryAppUser(params).then(response => {
-        console.log("查询到用户数据")
-        console.dir(response)
         this.pagination.total = response.total
         isEdit.value = response.isEdit
         response.userinfos.forEach(item =>{
@@ -358,13 +351,8 @@ export default defineComponent({
       })
     },
 
-    openPermissionModal(){
-      permissionTag.value = true
-    },
-
     // 重置事件:清除查询条件及各种数据,重新查询全部用户信息
     async clearConditionAndData(){
-      console.log("重置事件看信息:")
       this.pagination.current = 1
       searchValue.value = ''
       data.value = []
@@ -390,8 +378,6 @@ export default defineComponent({
     // 初始化表单样式,判断是添加表单还是编辑表单
     async initUserInfo(value){
       // 获取部门信息
-      console.log("先看看这个value吧")
-      console.dir(value)
       const deptInfo = await queryTreeList()
       treeData.value = this.transformTreeData(deptInfo);
       tag.value = this.formType === 'isAdd'
@@ -416,7 +402,6 @@ export default defineComponent({
       }
     },
 
-
     cancelAdd(){
       modalVisible.value=false
     },
@@ -505,7 +490,7 @@ export default defineComponent({
 
     // 向父组件传值触发关闭对话框事件
     async closeModal(){
-      console.log("关闭表单4事件")
+      deptInfovalue.value = undefined
       // 判断该表单是处于添加表单下的关闭事件,还是处于编辑表单下的关闭事件
       if (this.formType === 'isAdd'){  // 处于添加表单下的关闭事件,需收集表单已填数据进行存储
         console.log("表单四添加状态下关闭")
@@ -591,9 +576,9 @@ export default defineComponent({
     }
     // 注册信息提交审核
    function sumbitCheck(){
-     data.value = []
      emit('add', addForm_newlyUserData.value)
      modalVisible.value=false
+     data.value = []
    }
 
     /**
@@ -602,7 +587,6 @@ export default defineComponent({
     function setValue(values) {
       console.log("设置值:"+tag.value)
       tag.value = false
-      console.dir(values.value)
       values.value.forEach(item=>{
         const obj = {
           key: item.id,
@@ -614,7 +598,6 @@ export default defineComponent({
     }
 
     async function customResetFunc() {
-      console.log("上一页")
       emit('prev');
     }
 
@@ -716,7 +699,8 @@ export default defineComponent({
 }
 
 .tableDataArea{ // 表单数据区
-  margin-top: 1%;
+  padding-right: 1%;
+  padding-left: 1%;
   height: 82%;
 }
 
@@ -733,7 +717,7 @@ export default defineComponent({
   display: flex; /* 使用 Flexbox 布局 */
   align-items: center; /* 垂直居中对齐 */
   justify-content: center; /* 水平居中对齐 */
-  margin-right: 10px; /* 为每个 .item 添加右边距 */
+  margin-left: 10px; /* 为每个 .item 添加左边距 */
   gap: 10px;
 }
 

+ 270 - 122
jeecgboot-vue3/src/views/appmanage/addForm/data.tsx

@@ -1,30 +1,56 @@
 import { FormSchema } from '/@/components/Form';
 import {ref} from "vue";
-import {checkPermDuplication} from "@/views/system/menu/menu/menu.api";
 import {ComponentTypes} from "@/views/system/menu/menu/menu.data";
 import {checkMenuInfoisExist} from "@/views/appmanage/AppBaseInfo.api";
 
 
 export const menuInfoisshow = ref(false)
 
+const isValidIp = (_rule, value, callback) => {
+  if (!value) {
+    return callback(new Error('请输入 IP 地址'));
+  }
+  if (!isValidIpAddress(value)) {
+    return callback(new Error('请输入正确的 IP 地址格式'));
+  }
+  callback();
+};
+
+const isValidIpAddress = (ip) => {
+  const regex = /^(\d{1,3}\.){3}\d{1,3}$/;
+  const parts = ip.split('.');
+  if (parts.length !== 4) return false;
+  for (let part of parts) {
+    if (isNaN(part) || part < 0 || part > 255) {
+      return false;
+    }
+  }
+  return regex.test(ip);
+};
 
 export const checkMenuInfo = async (_rule, value, callback) => {
-  console.log("菜单value:" + value)
+  console.log("菜单信息:"+value)
   const res = await checkMenuInfoisExist(value)
-  if (res === '该值可用!') {
-    callback(); // 校验通过
-  } else {
-    callback(new Error(res)); // 校验失败
+  console.dir(res)
+  if (value === undefined){
+    callback(new Error('菜单信息不能为空')); // 校验失败
+  }else {
+
+    if (res === '该值可用!') {
+      callback(); // 校验通过
+    } else {
+      callback(new Error(res)); // 校验失败
+    }
   }
 };
 
+
 export const step1Schemas: FormSchema[] = [
   {
     field: 'name',
     component: 'Input',
     label: '应用名称',
     required: true,
-    defaultValue:'',
     componentProps: {
       placeholder:"请输入应用名称"
     },
@@ -70,41 +96,41 @@ export const step1Schemas: FormSchema[] = [
     },
   },
   {
-    field: 'businessUser',
-    component: 'JSelectUser',
-    label: '业务对接人',
-    componentProps: {
-      isRadioSelection: true,
-      rowKey:'id'
-    },
+    field: 'developUser',
+    component: 'JDictSelectTag',
+    label: '开发负责人',
+    defaultValue: '',
+    slot: 'UserInfoByInfoDept',
     colProps: {
       span: 8,
     },
   },
   {
-    field: 'requirementUser',
-    component: 'JDictSelectTag',
-    label: '需求对接人',
+    field: 'operationUser',
+    component: 'JInputSelect',
+    label: '运维负责人',
     slot: 'UserInfoByInfoDept',
     colProps: {
       span: 8,
     },
   },
   {
-    field: 'developUser',
+    field: 'requirementUser',
     component: 'JDictSelectTag',
-    label: '开发负责人',
-    defaultValue: '',
+    label: '需求对接人',
     slot: 'UserInfoByInfoDept',
     colProps: {
       span: 8,
     },
   },
   {
-    field: 'operationUser',
-    component: 'JInputSelect',
-    label: '运维负责人',
-    slot: 'UserInfoByInfoDept',
+    field: 'businessUser',
+    component: 'JSelectUser',
+    label: '业务对接人',
+    componentProps: {
+      isRadioSelection: true,
+      rowKey:'id'
+    },
     colProps: {
       span: 8,
     },
@@ -113,9 +139,8 @@ export const step1Schemas: FormSchema[] = [
     field: 'menuInfo',
     component: 'Input',
     label: '菜单信息',
-    required: true,
     ifShow: ({ values }) => !(values.component === ComponentTypes.IFrame && values.internalOrExternal),
-    rules:[{required: true, validator: checkMenuInfo, trigger: 'blur'}],
+    rules:[{ validator: checkMenuInfo, trigger: 'blur'}],
     // dynamicRules: ({ model, schema, values }) => {
     //   return checkPermDuplication(model, schema, values.menuType !== 2);
     // },
@@ -149,27 +174,6 @@ export const step1Schemas: FormSchema[] = [
 ];
 
 
-const isValidIp = (_rule, value, callback) => {
-  if (!value) {
-    return callback(new Error('请输入 IP 地址'));
-  }
-  if (!isValidIpAddress(value)) {
-    return callback(new Error('请输入正确的 IP 地址格式'));
-  }
-  callback();
-};
-
-const isValidIpAddress = (ip) => {
-  const regex = /^(\d{1,3}\.){3}\d{1,3}$/;
-  const parts = ip.split('.');
-  if (parts.length !== 4) return false;
-  for (let part of parts) {
-    if (isNaN(part) || part < 0 || part > 255) {
-      return false;
-    }
-  }
-  return regex.test(ip);
-};
 
 export const step2Schemas: FormSchema[] = [
   {
@@ -177,7 +181,6 @@ export const step2Schemas: FormSchema[] = [
     component: 'Select',
     label: '环境类型',
     required: true,
-    defaultValue: "",
     componentProps: {
       options: [
         {
@@ -220,17 +223,45 @@ export const step2Schemas: FormSchema[] = [
       span: 8,
     },
   },
+  {
+    field: 'backupFrequency',
+    component: 'JDictSelectTag',
+    label: '备份频率',
+    componentProps: {
+      dictCode: "dataBackupFrequency",
+    },
+    show: ({ values }) => {
+      return values.env === 'prod'
+    },
+    colProps: {
+      span: 6,
+    },
+  },
+  {
+    field: 'backupLocation',
+    component: 'Input',
+    label: '备份位置',
+    show: ({ values }) => {
+      return values.env === 'prod'
+    },
+    colProps: {
+      span: 18,
+    },
+  },
   {
     field: 'dataBaseInfo',
     component: 'Input',
-    label: '数据库连接信息',
+    label: '数据库信息',
+    colProps: {
+      span: 24,
+    },
   },
   {
     field: 'codeUrl',
     component: 'Input',
     label: '源码路径',
     colProps: {
-      span: 12,
+      span: 24,
     },
   },
 
@@ -242,7 +273,7 @@ export const step2Schemas: FormSchema[] = [
       placeholder:"namespace-group-dataId"
     },
     colProps: {
-      span: 12,
+      span: 24,
     },
   },
 
@@ -251,27 +282,7 @@ export const step2Schemas: FormSchema[] = [
     component: 'InputTextArea',
     label: '其它备注',
     colProps: {
-      span: 12,
-    },
-  },
-
-  {
-    field: 'backupFrequency',
-    component: 'JDictSelectTag',
-    label: '备份频率',
-    componentProps: {
-      dictCode: "sys_user,realname,id,username!='admin' order by create_time",
-    },
-    colProps: {
-      span: 6,
-    },
-  },
-  {
-    field: 'backupLocation',
-    component: 'Input',
-    label: '备份位置',
-    colProps: {
-      span: 6,
+      span: 24,
     },
   },
   // 隐藏主键字段
@@ -289,6 +300,7 @@ export const step2_1Schemas: FormSchema[] = [
     component: 'Select',
     label: '环境类型',
     required: true,
+    defaultValue: "",
     componentProps: {
       options: [
         {
@@ -316,8 +328,8 @@ export const step2_1Schemas: FormSchema[] = [
     field: 'leadingIp',
     component: 'Input',
     required: true,
-    label: '前端部署IP',
     rules:[{ required: true, validator: isValidIp, trigger: 'blur' }],
+    label: '前端部署IP',
     colProps: {
       span: 8,
     },
@@ -331,17 +343,45 @@ export const step2_1Schemas: FormSchema[] = [
       span: 8,
     },
   },
+  {
+    field: 'backupFrequency',
+    component: 'JDictSelectTag',
+    label: '备份频率',
+    componentProps: {
+      dictCode: "dataBackupFrequency",
+    },
+    show: ({ values }) => {
+      return values.env === 'prod'
+    },
+    colProps: {
+      span: 6,
+    },
+  },
+  {
+    field: 'backupLocation',
+    component: 'Input',
+    label: '备份位置',
+    show: ({ values }) => {
+      return values.env === 'prod'
+    },
+    colProps: {
+      span: 18,
+    },
+  },
   {
     field: 'dataBaseInfo',
     component: 'Input',
-    label: '数据库连接信息',
+    label: '数据库信息',
+    colProps: {
+      span: 24,
+    },
   },
   {
     field: 'codeUrl',
     component: 'Input',
     label: '源码路径',
     colProps: {
-      span: 12,
+      span: 24,
     },
   },
 
@@ -353,7 +393,7 @@ export const step2_1Schemas: FormSchema[] = [
       placeholder:"namespace-group-dataId"
     },
     colProps: {
-      span: 12,
+      span: 24,
     },
   },
 
@@ -362,27 +402,7 @@ export const step2_1Schemas: FormSchema[] = [
     component: 'InputTextArea',
     label: '其它备注',
     colProps: {
-      span: 12,
-    },
-  },
-
-  {
-    field: 'backupFrequency',
-    component: 'JDictSelectTag',
-    label: '备份频率',
-    componentProps: {
-      dictCode: "sys_user,realname,id,username!='admin' order by create_time",
-    },
-    colProps: {
-      span: 6,
-    },
-  },
-  {
-    field: 'backupLocation',
-    component: 'Input',
-    label: '备份位置',
-    colProps: {
-      span: 6,
+      span: 24,
     },
   },
   // 隐藏主键字段
@@ -428,8 +448,8 @@ export const step2_2Schemas: FormSchema[] = [
     field: 'leadingIp',
     component: 'Input',
     required: true,
-    label: '前端部署IP',
     rules:[{ required: true, validator: isValidIp, trigger: 'blur' }],
+    label: '前端部署IP',
     colProps: {
       span: 8,
     },
@@ -443,17 +463,45 @@ export const step2_2Schemas: FormSchema[] = [
       span: 8,
     },
   },
+  {
+    field: 'backupFrequency',
+    component: 'JDictSelectTag',
+    label: '备份频率',
+    componentProps: {
+      dictCode: "dataBackupFrequency",
+    },
+    show: ({ values }) => {
+      return values.env === 'prod'
+    },
+    colProps: {
+      span: 6,
+    },
+  },
+  {
+    field: 'backupLocation',
+    component: 'Input',
+    label: '备份位置',
+    show: ({ values }) => {
+      return values.env === 'prod'
+    },
+    colProps: {
+      span: 18,
+    },
+  },
   {
     field: 'dataBaseInfo',
     component: 'Input',
-    label: '数据库连接信息',
+    label: '数据库信息',
+    colProps: {
+      span: 24,
+    },
   },
   {
     field: 'codeUrl',
     component: 'Input',
     label: '源码路径',
     colProps: {
-      span: 12,
+      span: 24,
     },
   },
 
@@ -465,7 +513,7 @@ export const step2_2Schemas: FormSchema[] = [
       placeholder:"namespace-group-dataId"
     },
     colProps: {
-      span: 12,
+      span: 24,
     },
   },
 
@@ -474,27 +522,7 @@ export const step2_2Schemas: FormSchema[] = [
     component: 'InputTextArea',
     label: '其它备注',
     colProps: {
-      span: 12,
-    },
-  },
-
-  {
-    field: 'backupFrequency',
-    component: 'JDictSelectTag',
-    label: '备份频率',
-    componentProps: {
-      dictCode: "sys_user,realname,id,username!='admin' order by create_time",
-    },
-    colProps: {
-      span: 6,
-    },
-  },
-  {
-    field: 'backupLocation',
-    component: 'Input',
-    label: '备份位置',
-    colProps: {
-      span: 6,
+      span: 24,
     },
   },
   // 隐藏主键字段
@@ -546,4 +574,124 @@ export const step3Schemas: FormSchema[] = [
     show: false,
   },
 ];
+// 用于注册应用信息审核的表单
+export const registerFormCheckSchemas: FormSchema[] = [
+  {
+    field: 'name',
+    component: 'Input',
+    label: '应用名称',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'type',
+    component: 'Input',
+    label: '应用类型',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'status',
+    component: 'Input',
+    label: '应用状态',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'admin',
+    component: 'Input',
+    label: '应用管理员',
+    required: true,
+    defaultValue:'',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'businessUser',
+    component: 'Input',
+    label: '业务对接人',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'requirementUser',
+    component: 'Input',
+    label: '需求对接人',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'developUser',
+    component: 'Input',
+    label: '开发负责人',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'operationUser',
+    component: 'Input',
+    label: '运维负责人',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'menuInfo',
+    component: 'Input',
+    label: '菜单信息',
+    colProps: {
+      span: 8,
+    },
+  },
+  {
+    field: 'descr',
+    component: 'InputTextArea',
+    label: '应用描述',
+  },
+
+  // 隐藏主键字段
+  {
+    label: '',
+    field: 'key',
+    component: 'Input',
+    show: false,
+  },
+  {
+    field: 'requirement',
+    component: 'Input',
+    label: '需求文档',
+  },
+  {
+    field: 'design',
+    component: 'Input',
+    label: '设计文档',
+  },
+  {
+    field: 'dev',
+    component: 'Input',
+    label: '开发文档',
+  },
+  {
+    field: 'test',
+    component: 'Input',
+    label: '测试报告',
+  },
+  {
+    field: 'instructions',
+    component: 'Input',
+    label: '软件使用说明',
+  },
 
+  {
+    field: 'other',
+    component: 'Input',
+    label: '其它文档',
+  },
+]

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

@@ -11,7 +11,9 @@
       <Step1 ref="step1" @next="handleStep1Next" v-show="current === 0"  @closeModal="closeModal" formType="isAdd" :addType="addType"/>
       <Step2 ref="step2" @prev="handleStepPrev" formType="isAdd" @next="handleStep2Next" v-show="current === 1" @closeModal="closeModal"/>
       <Step3 ref="step3" v-show="current === 2" @prev="handleStepPrev" @next="handleStep3Next" @closeModal="closeModal" formType="isAdd"/>
-      <Step4 ref="userManage" v-show="current === 3" formType="isAdd" @prev="handleStepPrev" @redo="handleRedo" @add="handAdd" @closeModal="closeModal"/>
+      <a-spin tip="加载中" :spinning="isLoading">
+        <Step4 ref="userManage" v-show="current === 3" formType="isAdd" @prev="handleStepPrev" @redo="handleRedo" @add="handAdd" @closeModal="closeModal"/>
+      </a-spin>
     </div>
 </template>
 <script lang="ts">
@@ -32,7 +34,7 @@ import {any, array, string} from "vue-types";
     initSetp3: false,
     initSetp4: false
   });
-
+  const isLoading = ref(false)
   // 应用信息
   const appInfoData = reactive({
     appBaseInfoDTO:{},
@@ -70,10 +72,6 @@ import {any, array, string} from "vue-types";
       [Steps.Step.name]: Steps.Step,
     },
     mounted() {
-      console.log("分步表单挂载完成事件:"+this.addType);
-      console.log(this.test)
-      console.dir(this.addFormDraftData);
-
       tag.value = this.addType === 'full';
       (appInfoData.appBaseInfoDTO as any) = this.addFormDraftData?.appBaseInfoDTO
       appInfoData.appEnvInfoDTO = this.addFormDraftData?.appEnvInfoDTO
@@ -106,12 +104,15 @@ import {any, array, string} from "vue-types";
       }
       console.log("当前步码:"+current.value)
     },
-
+    data(){
+      return{
+        isLoading,
+      }
+    },
     methods:{
       handleStep3Next(step3Values: any) {
         current.value++;
         state.initSetp4 = true;
-        console.log(step3Values);
         appInfoData.appDocInfoDTO = step3Values;
       },
 
@@ -126,17 +127,13 @@ import {any, array, string} from "vue-types";
             (this.$refs.step2 as any).initEnvFrom(this.appInfoData.appEnvInfoDTO)
           }
         })
-
       }
     },
 
     emits: ['closeModal','submit'],
     setup(_, { emit }) {
-
       function handleStepPrev(step2Values: any) {
         current.value--;
-        console.log("表单二点击上一步")
-        console.dir(step2Values)
         appInfoData.appEnvInfoDTO = step2Values;
       }
 
@@ -144,24 +141,25 @@ import {any, array, string} from "vue-types";
         current.value++;
         state.initSetp3 = true;
         appInfoData.appEnvInfoDTO = step2Values;
-        console.log("当前页码:"+current.value)
-        console.dir(step2Values)
       }
 
       // 新增应用信息
       async function handAdd(step4Values){
+        console.log("来到了注册提交审核方法")
         let addUserids = [];
+        isLoading.value = true;
         (step4Values as Array).forEach(item=>{
           addUserids.push(item.key)
         })
         appInfoData.userInfo = addUserids
-        console.log("提交数据")
-        console.dir(appInfoData)
-        const res = await saveOrUpdate(appInfoData,false)
-        if (res !== '应用名称已存在'){
-          closeModal("isAdd")
-          current.value = 0
-        }
+        await saveOrUpdate(appInfoData,false).then(res=>{
+          isLoading.value = false
+          console.log("提交审核返回值:"+res)
+          if (res !== '应用名称已存在'){
+            closeModal("submitted")
+            current.value = 0
+          }
+        })
       }
 
       function handleRedo() {
@@ -171,13 +169,20 @@ import {any, array, string} from "vue-types";
       }
 
       function closeModal(value){
-        if (value.info === 'base') appInfoData.appBaseInfoDTO = value.data
-        if (value.info === 'env') appInfoData.appEnvInfoDTO = value.data
-        if (value.info === 'doc') appInfoData.appDocInfoDTO = value.data
-        if (value.info === 'user') appInfoData.userInfo = value.data
-        console.log("分布表单主页面收到:")
-        console.dir(value)
-        appInfoData.current = current.value
+        if (value === 'submitted'){
+          console.log("提交审核的关闭表单方法")
+          appInfoData.appBaseInfoDTO = {}
+          appInfoData.appEnvInfoDTO = {}
+          appInfoData.appDocInfoDTO = {}
+          appInfoData.userInfo = {}
+          appInfoData.current = 0
+        }else {
+          if (value.info === 'base') appInfoData.appBaseInfoDTO = value.data
+          if (value.info === 'env') appInfoData.appEnvInfoDTO = value.data
+          if (value.info === 'doc') appInfoData.appDocInfoDTO = value.data
+          if (value.info === 'user') appInfoData.userInfo = value.data
+          appInfoData.current = current.value
+        }
         const obj = {
           data: appInfoData,
           type: 'isAdd'
@@ -194,7 +199,6 @@ import {any, array, string} from "vue-types";
         closeModal,
         handAdd,
         appInfoData
-
       };
     },
   });

+ 23 - 0
jeecgboot-vue3/src/views/appmanage/components/RegisterAppForm.vue

@@ -0,0 +1,23 @@
+<script setup lang="ts">
+import {defineComponent, reactive, ref} from 'vue';
+import {BasicForm, useForm} from '/@/components/Form';
+import {registerFormCheckSchemas} from "@/views/appmanage/addForm/data";
+const [register, {setFieldsValue, getFieldsValue, validate }]  = useForm({
+  labelWidth: 100,
+  schemas: registerFormCheckSchemas,
+  actionColOptions: {
+    span: 8,
+  },
+  showResetButton: false,
+  showSubmitButton: false,
+});
+
+</script>
+
+<template>
+  <BasicForm @register="register" />
+</template>
+
+<style scoped lang="less">
+
+</style>