| | |
| | | 完整语音: |
| | | <mini-audio |
| | | :audio-source=" |
| | | voice ? voice : 'https://example.com/example.mp3' |
| | | voice ? voice : '@assets/order/example.mp3' |
| | | " |
| | | ></mini-audio> |
| | | </div> |
| | |
| | | :audio-source=" |
| | | item.questionvoice |
| | | ? item.questionvoice |
| | | : 'https://example.com/example.mp3' |
| | | : '@assets/order/example.mp3' |
| | | " |
| | | ></mini-audio> |
| | | </div> |
| | |
| | | // 验证电话号码格式并返回错误信息 |
| | | validatePhoneNumber(phone) { |
| | | if (!phone) { |
| | | return { isValid: false, message: '请输入电话号码' }; |
| | | return { isValid: false, message: "请输入电话号码" }; |
| | | } |
| | | |
| | | // 手机号正则 |
| | |
| | | const landlineLocalRegex = /^\d{7,8}$/; |
| | | |
| | | if (mobileRegex.test(phone)) { |
| | | return { isValid: true, type: 'mobile' }; |
| | | return { isValid: true, type: "mobile" }; |
| | | } else if (landlineFullRegex.test(phone)) { |
| | | return { isValid: true, type: 'landline' }; |
| | | return { isValid: true, type: "landline" }; |
| | | } else if (landlineLocalRegex.test(phone)) { |
| | | return { |
| | | isValid: false, |
| | | message: '本地号码请添加区号(如028-1234567)' |
| | | message: "本地号码请添加区号(如028-1234567)", |
| | | }; |
| | | } else { |
| | | return { |
| | | isValid: false, |
| | | message: '请输入正确的电话号码(手机号或带区号的固定电话)' |
| | | message: "请输入正确的电话号码(手机号或带区号的固定电话)", |
| | | }; |
| | | } |
| | | }, |
| | |
| | | |
| | | // 处理通话状态变化 |
| | | handleCallStatusChange(status) { |
| | | console.log(status,'status'); |
| | | console.log(status, "status"); |
| | | |
| | | this.callStatus = status.type; |
| | | |
| | |
| | | setupsubtask() { |
| | | this.$refs["zcform"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.date1 && new Date(this.form.date1) < new Date()) { |
| | | this.$message.error("随访时间不能小于当前时间"); |
| | | return false; |
| | | } |
| | | this.form.remark = |
| | | this.form.remark + "【" + this.getCurrentTime() + "】"; |
| | | let form = structuredClone(this.form); |