|
@@ -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
|
|
|
|
+ // 清空草稿数据
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|