diff --git a/src/views/components/TaskForm.vue b/src/views/components/TaskForm.vue
index 80b19a8..4c319fa 100644
--- a/src/views/components/TaskForm.vue
+++ b/src/views/components/TaskForm.vue
@@ -94,6 +94,8 @@
maxlength="200"
placeholder="请输入问题描述"
show-word-limit
+ required
+ :rules="[{ required: true, message: '请输入问题描述' }]"
/>
@@ -110,7 +112,7 @@
返回
- 提交
+ 提交
@@ -122,6 +124,7 @@
import { timestampToTime, getCurrentPositon } from '@/utils/common.js';
import CoordTransform from '@/utils/gis/CoorTransform.js';
import { useDictA } from '@/utils/dict';
+import bus from '@/utils/utils';
const { inspection_items, problem_type } = useDictA('inspection_items', 'problem_type');
// 添加高德安全密钥
@@ -148,6 +151,9 @@
problemBox: [],
showPicker: false,
showproblem: false,
+ isdisabled: false,
+ messageOne: '',
+ messageTwo: '',
userId: '',
problemN: '',
formData: {
@@ -248,7 +254,6 @@
AllData.formData.checkItemName = problemName.join(',');
AllData.formData.checkItem = Typeb.join(',');
};
-
watch(
route,
(val) => {
@@ -259,6 +264,18 @@
AllData.formData.patrolTaskNo = props.numberNum;
//2:临时巡查 1任务巡查 uploadType
AllData.formData.uploadType = props.uploadType;
+
+ bus.on('fileOBJVisible', (e) => {
+ AllData.messageOne = e;
+ // console.log(AllData.messageOne, ' AllData.messageOne');
+ if (AllData.messageOne == '上传成功') {
+ AllData.isdisabled = false;
+ // console.log(AllData.isdisabled, ' 上传成功');
+ } else {
+ AllData.isdisabled = true;
+ // console.log(AllData.isdisabled, ' 上传中...');
+ }
+ });
},
{ immediate: true }
);
@@ -270,6 +287,9 @@
AllData.formData.problemAddress = address;
});
});
+onBeforeUnmount(() => {
+ bus.off('fileOBJVisible');
+});