|
|
@@ -47,11 +47,6 @@ const formData = ref<ReportFormData>(createInitialFormData())
|
|
|
const range = ref<{ text: string; value: string }[]>([])
|
|
|
const rangePerson = ref([]) as any
|
|
|
|
|
|
-const changeQuestionType = (e:any) => {
|
|
|
- formData.value = createInitialFormData();
|
|
|
- formData.value.questionType = e;
|
|
|
-}
|
|
|
-
|
|
|
const rules = ref({
|
|
|
questionType: [{ required: true, message: '请选择类型' }],
|
|
|
// questionTitle: [{ required: true, message: '请输入标题' }],
|
|
|
@@ -97,10 +92,10 @@ const fillVisitorName = () => {
|
|
|
|
|
|
const fillVisitorPhone = () => {
|
|
|
const profile = getCachedWecomVisitorProfile()
|
|
|
- const mobile = profile?.mobile || visitorPhone.value
|
|
|
+ const mobile = (profile?.mobile || visitorPhone.value || '').trim()
|
|
|
|
|
|
if (!mobile) {
|
|
|
- showNotify('暂未获取到您的手机号,请手动填写')
|
|
|
+ showNotify({ type: 'warning', message: '暂未获取到您的手机号,请手动填写' })
|
|
|
return
|
|
|
}
|
|
|
|
|
|
@@ -248,6 +243,19 @@ const hanleSelectArea = () => {
|
|
|
areaShow.value = true
|
|
|
}
|
|
|
|
|
|
+const changeQuestionType = (e: any) => {
|
|
|
+ const { contactPerson, contactPhone, contactPersonPhone } = formData.value
|
|
|
+ formData.value = createInitialFormData()
|
|
|
+ formData.value.questionType = e
|
|
|
+ formData.value.contactPerson = contactPerson
|
|
|
+ formData.value.contactPhone = contactPhone
|
|
|
+ formData.value.contactPersonPhone = contactPersonPhone
|
|
|
+ addressList.value = null
|
|
|
+ personData.value = []
|
|
|
+ rangePerson.value = []
|
|
|
+ areaShow.value = false
|
|
|
+}
|
|
|
+
|
|
|
onMounted(async () => {
|
|
|
fillVisitorName()
|
|
|
|