|
@@ -4,12 +4,13 @@
|
|
v-model:visible="visible"
|
|
v-model:visible="visible"
|
|
:title="title"
|
|
:title="title"
|
|
:confirm-loading="confirmLoading"
|
|
:confirm-loading="confirmLoading"
|
|
|
|
+ @ok="handleOk"
|
|
ok-text="提交"
|
|
ok-text="提交"
|
|
@cancel="handleCancel"
|
|
@cancel="handleCancel"
|
|
cancel-text="取消"
|
|
cancel-text="取消"
|
|
:keyboard="false"
|
|
:keyboard="false"
|
|
:mask-closable="false" >
|
|
:mask-closable="false" >
|
|
- <a-form :model="dataModel" autocomplete="off" @finish="handleOk">
|
|
|
|
|
|
+ <a-form :model="dataModel" autocomplete="off">
|
|
<a-divider orientation="left">基础信息</a-divider>
|
|
<a-divider orientation="left">基础信息</a-divider>
|
|
<a-row type="flex">
|
|
<a-row type="flex">
|
|
<a-col :span="7">
|
|
<a-col :span="7">
|
|
@@ -56,6 +57,7 @@ import {getSiteUserByID, saveSiteUser} from "@/api/baseSettings/userInfo";
|
|
import BUploadFile from "@/components/file/uploadFile.vue";
|
|
import BUploadFile from "@/components/file/uploadFile.vue";
|
|
import type {SelectProps} from "ant-design-vue";
|
|
import type {SelectProps} from "ant-design-vue";
|
|
import {getSysDictionaryList} from "@/api/system/dictionary";
|
|
import {getSysDictionaryList} from "@/api/system/dictionary";
|
|
|
|
+import {message} from "ant-design-vue";
|
|
|
|
|
|
interface InstitutionModel {
|
|
interface InstitutionModel {
|
|
dataModel: any;
|
|
dataModel: any;
|
|
@@ -75,6 +77,7 @@ export default defineComponent({
|
|
const confirmLoading = ref<boolean>(false);
|
|
const confirmLoading = ref<boolean>(false);
|
|
const title = ref();
|
|
const title = ref();
|
|
const opCategory = ref<any>();
|
|
const opCategory = ref<any>();
|
|
|
|
+ const isAllowCommit = ref<boolean>(false) ;
|
|
const formState = reactive({
|
|
const formState = reactive({
|
|
total: 0,
|
|
total: 0,
|
|
selectedRowKeys: [],
|
|
selectedRowKeys: [],
|
|
@@ -111,12 +114,19 @@ export default defineComponent({
|
|
};
|
|
};
|
|
|
|
|
|
const handleOk = () => {
|
|
const handleOk = () => {
|
|
- saveSiteUser(formData.dataModel).then(result => {
|
|
|
|
- if (result) {
|
|
|
|
- visible.value = false;
|
|
|
|
- props.loadData();
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ if(formData.dataModel.name==null||formData.dataModel.gender ==null||formData.dataModel.mobile==null|| formData.dataModel.roleID==null){
|
|
|
|
+ message.error("请填写完整的人员信息!");
|
|
|
|
+ isAllowCommit.value = false;
|
|
|
|
+ }
|
|
|
|
+ if(isAllowCommit.value){
|
|
|
|
+ saveSiteUser(formData.dataModel).then(result => {
|
|
|
|
+ if (result) {
|
|
|
|
+ visible.value = false;
|
|
|
|
+ props.loadData();
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
};
|
|
};
|
|
|
|
|
|
const handleCancel = () => {
|
|
const handleCancel = () => {
|
|
@@ -126,10 +136,11 @@ export default defineComponent({
|
|
|
|
|
|
return {
|
|
return {
|
|
...toRefs(formData),
|
|
...toRefs(formData),
|
|
|
|
+ title,
|
|
|
|
+ visible,
|
|
formState,
|
|
formState,
|
|
opCategory,
|
|
opCategory,
|
|
- visible,
|
|
|
|
- title,
|
|
|
|
|
|
+ isAllowCommit,
|
|
confirmLoading,
|
|
confirmLoading,
|
|
genderList,
|
|
genderList,
|
|
roleList,
|
|
roleList,
|