| | |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="orgname == '南华大学附属第一医院'" |
| | | label="入院日期" |
| | | width="200" |
| | | align="center" |
| | | key="starttime" |
| | | prop="starttime" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ formatTime(scope.row.starttime) }}</span> |
| | | </template></el-table-column |
| | | > |
| | | <el-table-column |
| | | label="出院日期" |
| | | width="200" |
| | | align="center" |
| | |
| | | <span>{{ formatTime(scope.row.endtime) }}</span> |
| | | </template></el-table-column |
| | | > |
| | | |
| | | <el-table-column |
| | | label="责任护士" |
| | | width="120" |
| | |
| | | <!-- 随访内容 --> |
| | | <div class="call-action"> |
| | | <div class="call-container"> |
| | | <template-selector |
| | | <div |
| | | style="display: flex" |
| | | v-if="orgname == '南华大学附属第一医院' && !Voicetype" |
| | | > |
| | | <template-selector |
| | | v-model="form.templateid" |
| | | :templateName="form.templatename" |
| | | :service-type="form.serviceType" |
| | |
| | | @select="handleTemplateSelect" |
| | | @clear="handleTemplateClear" |
| | | /> |
| | | <div |
| | | v-if="defaultKey" |
| | | style=" |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | height: 100%; |
| | | padding: 33px 0 0 50px; |
| | | " |
| | | > |
| | | <el-button type="success" round @click="handleConfirmReplace"> |
| | | 默认填充 |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="headline"> |
| | | <div>随访内容</div> |
| | | </div> |
| | |
| | | updateTemplate, |
| | | query360PatInfonh, |
| | | sendMsg, |
| | | getconfigKey, |
| | | } from "@/api/AiCentre/index"; |
| | | import { |
| | | messagelistpatient, |
| | |
| | | return { |
| | | visitAgain: 1, |
| | | userid: "", |
| | | defaultKey: false, //是否可默认填报 |
| | | currentPhoneNumber: "", |
| | | callType: "", // 用于区分是哪个电话 |
| | | isSipRegistering: true, // SIP注册状态 |
| | |
| | | // 禁用今天及之前的日期 |
| | | return time.getTime() < Date.now() - 24 * 60 * 60 * 1000; |
| | | }, |
| | | // shortcuts: [ |
| | | // { |
| | | // text: "七天后", |
| | | // onClick(picker) { |
| | | // const date = new Date(); |
| | | // date.setTime(date.getTime() + 3600 * 1000 * 24 * 7); |
| | | // picker.$emit("pick", date); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // text: "15天后", |
| | | // onClick(picker) { |
| | | // const date = new Date(); |
| | | // date.setTime(date.getTime() + 3600 * 1000 * 24 * 15); |
| | | // picker.$emit("pick", date); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // text: "一个月后", |
| | | // onClick(picker) { |
| | | // const date = new Date(); |
| | | // date.setTime(date.getTime() + 3600 * 1000 * 24 * 30); |
| | | // picker.$emit("pick", date); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // text: "三个月后", |
| | | // onClick(picker) { |
| | | // const date = new Date(); |
| | | // date.setTime(date.getTime() + 3600 * 1000 * 24 * 90); |
| | | // picker.$emit("pick", date); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // text: "六个月后", |
| | | // onClick(picker) { |
| | | // const date = new Date(); |
| | | // date.setTime(date.getTime() + 3600 * 1000 * 24 * 180); |
| | | // picker.$emit("pick", date); |
| | | // }, |
| | | // }, |
| | | // { |
| | | // text: "一年后", |
| | | // onClick(picker) { |
| | | // const date = new Date(); |
| | | // date.setTime(date.getTime() + 3600 * 1000 * 24 * 365); |
| | | // picker.$emit("pick", date); |
| | | // }, |
| | | // }, |
| | | // ], |
| | | }, |
| | | options: [ |
| | | { |
| | |
| | | ]; |
| | | } |
| | | this.getTaskservelist(); |
| | | this.getconfigKey(); |
| | | }, |
| | | mounted() { |
| | | // 监听子组件的sipStatus属性变化 |
| | |
| | | return "scriptTopic-dev"; // 正常 - 默认样式 |
| | | } |
| | | }, |
| | | getconfigKey() { |
| | | getconfigKey("default.value.icon").then((res) => { |
| | | |
| | | if (res.msg) { |
| | | if ( |
| | | this.getAssignArr(res.msg).includes(this.$store.state.user.name) || |
| | | this.$store.state.user.name == "admin" |
| | | ) { |
| | | this.defaultKey = true; |
| | | } else { |
| | | this.defaultKey = false; |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | getAssignArr(rule) { |
| | | let arr = []; |
| | | let assiginArr = rule.split(","); |
| | | for (let i = 0; i < assiginArr.length; i++) { |
| | | arr[i] = assiginArr[i]; |
| | | } |
| | | arr.sort(this.compare); |
| | | return arr; |
| | | }, |
| | | // 获取选项样式类 |
| | | getOptionClass(items) { |
| | | if (items.isabnormal == 1) { |
| | |
| | | handleTemplateClear() { |
| | | console.log("清除了模板选择"); |
| | | }, |
| | | handleConfirmReplace() { |
| | | // 遍历所有题目(tableDatatop) |
| | | this.tableDatatop.forEach((item) => { |
| | | // 只处理未填报的题目(scriptResult 为空或空数组) |
| | | if ( |
| | | !item.scriptResult || |
| | | (Array.isArray(item.scriptResult) && item.scriptResult.length === 0) |
| | | ) { |
| | | // 查找选项中 defaultValue 为 2 的选项 |
| | | const defaultOption = item.svyTaskTemplateTargetoptions?.find( |
| | | (opt) => opt.defaultValue == 2 |
| | | ); |
| | | console.log(item); |
| | | |
| | | if (defaultOption) { |
| | | // 根据题目类型赋值 |
| | | if (item.scriptType === "1") { |
| | | // 单选题:直接赋值为 optioncontent 字符串 |
| | | item.scriptResult = defaultOption.optioncontent; |
| | | } else if (item.scriptType === "2") { |
| | | // 多选题:赋值为包含 optioncontent 的数组 |
| | | item.scriptResult = [defaultOption.optioncontent]; |
| | | } else if (item.scriptType === "4") { |
| | | // 填空题:一般没有选项,但如果有则赋值 |
| | | item.scriptResult = defaultOption.optioncontent; |
| | | } |
| | | |
| | | // 触发视图更新(因为 Vue 可能无法检测到深层嵌套对象的变化) |
| | | this.$forceUpdate(); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | // 使用示例 |
| | | isValidPhone(phone) { |
| | | return this.validatePhoneNumber(phone).isValid; |