| | |
| | | } |
| | | |
| | | if (newVal.length > 0 && typeof newVal[0] === "object") { |
| | | console.log(this.selectedOrder, "111"); |
| | | // 1. 传入的是对象数组 [{ sort, preachform, compensateTime }] |
| | | this.checkedValues = newVal.map((item) => item.preachform); |
| | | this.selectedOrder = newVal.map((item) => ({ |
| | |
| | | import JsSIP from "jssip"; |
| | | import { Notification, MessageBox, Message, Loading } from "element-ui"; |
| | | |
| | | class SipService { |
| | | constructor() { |
| | |
| | | const remaining = minDelay - timeSinceRegistration; |
| | | return { |
| | | canCall: false, |
| | | reason: `注册成功,请等待 ${Math.ceil(remaining / 1000)} 秒后再呼叫`, |
| | | reason: `注册成功,资源加载中请等待 ${Math.ceil(remaining / 1000)} 秒后再呼叫`, |
| | | }; |
| | | } |
| | | |
| | |
| | | makeCall(targetNumber) { |
| | | const { canCall, reason } = this.canMakeCall(); |
| | | if (!canCall) { |
| | | Message.error(reason); |
| | | return Promise.reject(new Error(reason)); |
| | | } |
| | | return new Promise((resolve, reject) => { |
| | |
| | | <template> |
| | | <!-- 历史随访记录 --> |
| | | <div class="app-container"> |
| | | <div class="leftvlue" style="margin-bottom: 20px"></div> |
| | | <el-row :gutter="20"> |
| | |
| | | this.topqueryParams.pageSize = null; |
| | | this.download( |
| | | // "smartor/serviceSubtask/export", |
| | | "smartor/serviceSubtask/patItemExport", |
| | | "smartor/serviceSubtask/getSubtaskByDiagnameExport", |
| | | { |
| | | ...this.topqueryParams, |
| | | }, |
| | |
| | | methods: { |
| | | // 获取主题样式类 |
| | | getTopicClass(item) { |
| | | console.log(item.isabnormal,'111'); |
| | | |
| | | // 根据状态值返回对应的样式类 |
| | | if (item.isabnormal == 1) { |
| | | return "scriptTopic-isabnormal"; // 异常 - 红色 |
| | |
| | | </div> |
| | | |
| | | <!-- SIP注册状态提示 --> |
| | | <div v-if="isSipRegistering&&orgname == '丽水市中医院'" class="sip-registering"> |
| | | <div |
| | | v-if="isSipRegistering && orgname == '丽水市中医院'" |
| | | class="sip-registering" |
| | | > |
| | | <el-alert |
| | | title="呼叫座机初始化中,请稍候..." |
| | | type="info" |
| | |
| | | callType: "", // 用于区分是哪个电话 |
| | | isSipRegistering: true, // SIP注册状态 |
| | | // 已有数据... |
| | | customCallStatus: "", // 用于存储自定义状态文本 |
| | | callStatus: "idle", // idle, calling, connected, ended, failed |
| | | isEndingCall: false, |
| | | CaldialogVisible: false, |
| | |
| | | label: "一年后", |
| | | }, |
| | | ], |
| | | statusTimer: null, |
| | | userform: {}, |
| | | smsDialogVisible: false, // 控制短信对话框显示 |
| | | smsContent: "", // 存储短信内容 |
| | |
| | | patid: null, |
| | | }; |
| | | }, |
| | | |
| | | // 在组件中添加销毁前的清理 |
| | | beforeUnmount() { |
| | | if (this.statusTimer) { |
| | | clearTimeout(this.statusTimer); |
| | | this.statusTimer = null; |
| | | } |
| | | }, |
| | | computed: { |
| | | callStatusText() { |
| | | if (this.customCallStatus) { |
| | | return this.customCallStatus; |
| | | } |
| | | const statusMap = { |
| | | idle: "准备呼叫", |
| | | calling: `正在呼叫 ${this.currentPhoneNumber}...`, |
| | |
| | | this.$watch( |
| | | () => this.$refs.callButton.sipStatus, |
| | | (newStatus) => { |
| | | if (newStatus === '已注册') { |
| | | if (this.statusTimer) { |
| | | clearTimeout(this.statusTimer); |
| | | this.statusTimer = null; |
| | | } |
| | | if (newStatus === "已注册") { |
| | | this.statusTimer = setTimeout(() => { |
| | | this.isSipRegistering = false; |
| | | } else if (newStatus === '注册失败' || newStatus === '未连接') { |
| | | this.customCallStatus = ""; // 注册成功后清空自定义提示 |
| | | console.log("SIP注册成功,状态已更新"); |
| | | }, 2000); |
| | | this.isSipRegistering = false; |
| | | } else if (newStatus === "注册失败" || newStatus === "未连接") { |
| | | this.isSipRegistering = true; |
| | | this.customCallStatus = "呼叫中断,资源重新加载中请稍等3s重新。"; |
| | | } |
| | | }, |
| | | { immediate: true } // 立即执行一次以获取初始值 |
| | |
| | | }, |
| | | // 检查随访日期是否有效 |
| | | checkFollowupDate(date) { |
| | | console.log(date); |
| | | |
| | | if (!date) { |
| | | this.form.date1 = ""; |
| | | this.$refs.zcform.clearValidate(["date1"]); |
| | |
| | | } |
| | | }); |
| | | this.Editsingletasksonyic(6); |
| | | |
| | | if (this.visitCount != 1) { |
| | | this.Torouter(); |
| | | return; |
| | | } |
| | | this.$modal |
| | | .confirm( |
| | | '任务保存成功是否针对患者:"' + |
| | |
| | | this.dialogFormVisible = true; |
| | | }) |
| | | .catch(() => { |
| | | this.Torouter(); |
| | | }); |
| | | }) |
| | | .catch((error) => { |
| | | // 如果有任何一个异步操作失败,会进入这里 |
| | | console.error("发生错误:", error); |
| | | }); |
| | | }, |
| | | Torouter() { |
| | | if (this.form.serviceType == 13) { |
| | | if (this.visitCount != 1) { |
| | | this.$router.push({ |
| | |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }) |
| | | .catch((error) => { |
| | | // 如果有任何一个异步操作失败,会进入这里 |
| | | console.error("发生错误:", error); |
| | | }); |
| | | }, |
| | | // 电话============================ |
| | | // 验证电话号码格式并返回错误信息 |
| | |
| | | param2: this.patid, |
| | | subId: this.id, |
| | | }; |
| | | |
| | | if (this.visitCount != 1) { |
| | | this.Torouter(); |
| | | return; |
| | | } |
| | | addPersonVoices(obj).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$modal.msgSuccess("服务保存成功"); |
| | |
| | | this.dialogFormVisible = true; |
| | | }) |
| | | .catch(() => { |
| | | if (this.form.serviceType == 13) { |
| | | if (this.visitCount != 1) { |
| | | this.$router.push({ |
| | | path: "/logisticsservice/zbAgain", |
| | | }); |
| | | } else { |
| | | this.$router.push({ |
| | | path: "/logisticsservice/record", |
| | | }); |
| | | } |
| | | } else if (form.serviceType == 2) { |
| | | if (this.visitCount != 1) { |
| | | this.$router.push({ |
| | | path: "/followvisit/again", |
| | | }); |
| | | } else { |
| | | this.$router.push({ |
| | | path: "/followvisit/discharge", |
| | | }); |
| | | } |
| | | } |
| | | this.Torouter(); |
| | | }); |
| | | } |
| | | }); |
| | |
| | | }, |
| | | // 页面变化调整大小 |
| | | handleResize() { |
| | | console.log(111); |
| | | // 调整 ECharts 图表大小 |
| | | if (this.myChart2) { |
| | | this.myChart2.resize(); |
| | |
| | | // detail: https://cli.vuejs.org/config/#devserver-proxy |
| | | [process.env.VUE_APP_BASE_API]: { |
| | | // target: `https://www.health-y.cn/lssf`, |
| | | // target: `http://192.168.100.10:8096`, |
| | | target: `http://192.168.100.10:8094`,//省立同德 |
| | | target: `http://192.168.100.10:8096`, |
| | | // target: `http://192.168.100.10:8094`,//省立同德 |
| | | // target: `http://192.168.100.10:8095`,//新华 |
| | | // target:`http://localhost:8095`, |
| | | // target:`http://35z1t16164.qicp.vip`, |