|
@@ -28,6 +28,7 @@
|
|
|
:limit="1"
|
|
|
:size="4000"
|
|
|
:showTip="false"
|
|
|
+ @initiate="isUploading = true"
|
|
|
@finished="photoChange"
|
|
|
/>
|
|
|
</template>
|
|
@@ -66,7 +67,7 @@ import { treeList } from "@/api/user/index";
|
|
|
import { getMessageOrgList } from "@/api/messageOrg/index";
|
|
|
|
|
|
const userTableRef = ref(null);
|
|
|
-
|
|
|
+const isUploading = ref(false)
|
|
|
const photoUrlList = ref([]);
|
|
|
const photoNameList = ref([]);
|
|
|
const deptList = ref([]); //部门列表
|
|
@@ -78,6 +79,7 @@ const getDeptList = async () => {
|
|
|
};
|
|
|
const photoChange = () => {
|
|
|
if (photoUrlList.value.length > 0) {
|
|
|
+ isUploading.value = false;
|
|
|
form.value.fileLists = [
|
|
|
{
|
|
|
name: photoNameList.value[0],
|
|
@@ -290,6 +292,15 @@ option.value = Object.assign(option.value, {
|
|
|
type: "array",
|
|
|
span: 24,
|
|
|
hide: true,
|
|
|
+ rules: [{
|
|
|
+ validator: (rule, value, callback) => {
|
|
|
+ if (isUploading.value) {
|
|
|
+ callback(new Error('文件正在上传中,请等待!!'))
|
|
|
+ } else {
|
|
|
+ callback()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }]
|
|
|
},
|
|
|
],
|
|
|
});
|