|  |  |  | 
|---|
|  |  |  | >只展示本次服务信息</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div style="margin-left: 20px; color: #59a0f0"> | 
|---|
|  |  |  | <!-- <div style="margin-left: 20px; color: #59a0f0"> | 
|---|
|  |  |  | <el-link | 
|---|
|  |  |  | href="https://9.208.2.207:6060/search-homepage" | 
|---|
|  |  |  | target="_blank" | 
|---|
|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | 前往CDSS查询 | 
|---|
|  |  |  | </el-link> | 
|---|
|  |  |  | </div> --> | 
|---|
|  |  |  | <div class="merge-controls" v-if="Whetherall"> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | @click="toggleMergeMode" | 
|---|
|  |  |  | :disabled="selectedServices.length < 2" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | {{ isMergeMode ? "取消合并" : "合并编辑问卷" }} | 
|---|
|  |  |  | </el-button> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | v-if="isMergeMode" | 
|---|
|  |  |  | type="success" | 
|---|
|  |  |  | @click="openMergeDialog" | 
|---|
|  |  |  | :disabled="selectedServices.length < 2" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | 开始合并 (已选 {{ selectedServices.length }} 个服务) | 
|---|
|  |  |  | </el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- <el-button type="success">随访后短信</el-button> --> | 
|---|
|  |  |  | 
|---|
|  |  |  | :data="logsheetlist" | 
|---|
|  |  |  | :row-class-name="tableRowClassName" | 
|---|
|  |  |  | style="width: 100%" | 
|---|
|  |  |  | @selection-change="handleSelectionChange" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | type="selection" | 
|---|
|  |  |  | width="55" | 
|---|
|  |  |  | :selectable="checkSelectable" | 
|---|
|  |  |  | v-if="Whetherall" | 
|---|
|  |  |  | ></el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | prop="sendname" | 
|---|
|  |  |  | align="center" | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 添加合并编辑对话框 --> | 
|---|
|  |  |  | <el-dialog | 
|---|
|  |  |  | title="合并编辑问卷" | 
|---|
|  |  |  | :visible.sync="mergeDialogVisible" | 
|---|
|  |  |  | width="80%" | 
|---|
|  |  |  | top="5vh" | 
|---|
|  |  |  | v-dialogDrag | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <MergeAndModify | 
|---|
|  |  |  | v-if="mergeDialogVisible" | 
|---|
|  |  |  | :selected-services="selectedServices" | 
|---|
|  |  |  | :patid="patid" | 
|---|
|  |  |  | @save="handleMergeSave" | 
|---|
|  |  |  | @cancel="mergeDialogVisible = false" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </el-dialog> | 
|---|
|  |  |  | <div class="action-container"> | 
|---|
|  |  |  | <div class="call-action"> | 
|---|
|  |  |  | <div class="call-container"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | v-if="item.showAppendInput" | 
|---|
|  |  |  | v-if="item.showAppendInput || item.answerps" | 
|---|
|  |  |  | class="append-input-container" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | 
|---|
|  |  |  | {{ index + 1 }}、[问答]<span>{{ | 
|---|
|  |  |  | item.scriptContent | 
|---|
|  |  |  | }}</span> | 
|---|
|  |  |  | <span v-if="item.valueType == 3">(只能输入数字)</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="dev-xx"> | 
|---|
|  |  |  | <div class="dev-xx" v-if="item.valueType == 3"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | v-numeric-only | 
|---|
|  |  |  | placeholder="请输入答案" | 
|---|
|  |  |  | v-model="item.scriptResult" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-input> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="dev-xx" v-else> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="textarea" | 
|---|
|  |  |  | :rows="2" | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="scriptTopic-dev" :key="index" v-else> | 
|---|
|  |  |  | <div class="dev-text"> | 
|---|
|  |  |  | {{ index + 1 }}、[问答]<span>{{ | 
|---|
|  |  |  | item.questiontext | 
|---|
|  |  |  | item.scriptContent | 
|---|
|  |  |  | }}</span> | 
|---|
|  |  |  | <span v-if="item.valueType == 3">(只能输入数字)</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="dev-xx"> | 
|---|
|  |  |  | <div class="dev-xx" v-if="item.valueType == 3"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | v-numeric-only | 
|---|
|  |  |  | placeholder="请输入答案" | 
|---|
|  |  |  | v-model="item.scriptResult" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-input> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="dev-xx" v-else> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | type="textarea" | 
|---|
|  |  |  | :rows="2" | 
|---|
|  |  |  | placeholder="请输入答案" | 
|---|
|  |  |  | v-model="item.matchedtext" | 
|---|
|  |  |  | v-model="item.scriptResult" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-input> | 
|---|
|  |  |  | 
|---|
|  |  |  | >再次随访</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="tag-selector-container"> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="selectedTag" | 
|---|
|  |  |  | placeholder="请选择异常状态" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | style="width: 150px; margin-right: 10px" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | v-for="item in tagOptions" | 
|---|
|  |  |  | :key="item.value" | 
|---|
|  |  |  | :label="item.label" | 
|---|
|  |  |  | :value="item.value" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <span style="display: flex; align-items: center"> | 
|---|
|  |  |  | <span | 
|---|
|  |  |  | class="color-indicator" | 
|---|
|  |  |  | :style="{ backgroundColor: item.color }" | 
|---|
|  |  |  | ></span> | 
|---|
|  |  |  | <span>{{ item.label }}</span> | 
|---|
|  |  |  | </span> | 
|---|
|  |  |  | </el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 当前选择的颜色指示器 --> | 
|---|
|  |  |  | <div | 
|---|
|  |  |  | v-if="selectedTag" | 
|---|
|  |  |  | class="color-indicator selected-indicator" | 
|---|
|  |  |  | :style="{ backgroundColor: getSelectedTagColor() }" | 
|---|
|  |  |  | ></div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 标记说明提示 --> | 
|---|
|  |  |  | <el-tooltip | 
|---|
|  |  |  | v-if="selectedTag" | 
|---|
|  |  |  | effect="light" | 
|---|
|  |  |  | :content="getSelectedDescription()" | 
|---|
|  |  |  | placement="top" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <i class="el-icon-info tag-info-icon"></i> | 
|---|
|  |  |  | </el-tooltip> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-col :span="14" | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-button plain type="info" @click="Editsingletaskson('5')" | 
|---|
|  |  |  | >中心随访</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-button type="primary" round @click="sendAgainmsg" | 
|---|
|  |  |  | >短信发送</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 短信发送对话框 --> | 
|---|
|  |  |  | <el-dialog title="短信发送" :visible.sync="smsDialogVisible"> | 
|---|
|  |  |  | <!-- 注意这里使用了 smsDialogVisible 以区分已有的 dialogFormVisible --> | 
|---|
|  |  |  | <el-form ref="smsForm" :model="form" label-width="80px"> | 
|---|
|  |  |  | <el-form-item label="患者名称"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 400px" | 
|---|
|  |  |  | disabled | 
|---|
|  |  |  | v-model="form.sendname" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="年龄"> | 
|---|
|  |  |  | <el-input style="width: 400px" disabled v-model="form.age"></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="电话"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 400px" | 
|---|
|  |  |  | disabled | 
|---|
|  |  |  | v-model="userform.telcode" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | <!-- 注意这里可能使用 userform.telcode --> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="科室"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 400px" | 
|---|
|  |  |  | disabled | 
|---|
|  |  |  | v-model="form.deptname" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="病区"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | style="width: 400px" | 
|---|
|  |  |  | disabled | 
|---|
|  |  |  | v-model="form.leavehospitaldistrictname" | 
|---|
|  |  |  | ></el-input> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="短信内容"> | 
|---|
|  |  |  | <el-input type="textarea" v-model="smsContent"></el-input> | 
|---|
|  |  |  | <!-- 建议使用独立的 smsContent 变量 --> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  | <div slot="footer" class="dialog-footer"> | 
|---|
|  |  |  | <el-button @click="smsDialogVisible = false">取 消</el-button> | 
|---|
|  |  |  | <el-button type="primary" @click="sendSms">确认发送</el-button> | 
|---|
|  |  |  | <!-- 注意方法名改为 sendSms --> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </el-dialog> | 
|---|
|  |  |  | <el-dialog | 
|---|
|  |  |  | title="患者再次随访" | 
|---|
|  |  |  | v-dialogDrags | 
|---|
|  |  |  | 
|---|
|  |  |  | updatePersonVoices, | 
|---|
|  |  |  | addPersonVoices, | 
|---|
|  |  |  | query360PatInfo, | 
|---|
|  |  |  | sendMsg, | 
|---|
|  |  |  | } from "@/api/AiCentre/index"; | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | messagelistpatient, | 
|---|
|  |  |  | 
|---|
|  |  |  | listcontactinformation, | 
|---|
|  |  |  | } from "@/api/patient/homepage"; | 
|---|
|  |  |  | import CallButton from "@/components/CallButton"; | 
|---|
|  |  |  | import MergeAndModify from "./MergeAndModify.vue"; | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | components: { | 
|---|
|  |  |  | CallButton, | 
|---|
|  |  |  | MergeAndModify, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | directives: { | 
|---|
|  |  |  | numericOnly: { | 
|---|
|  |  |  | bind(el, binding, vnode) { | 
|---|
|  |  |  | // 尝试获取实际的input元素 | 
|---|
|  |  |  | const input = el.tagName === "INPUT" ? el : el.querySelector("input"); | 
|---|
|  |  |  | if (!input) { | 
|---|
|  |  |  | console.warn("v-numeric-only: 未找到input元素"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handleInput = function (event) { | 
|---|
|  |  |  | const oldValue = input.value; | 
|---|
|  |  |  | const newValue = oldValue.replace(/[^\d]/g, ""); | 
|---|
|  |  |  | if (newValue !== oldValue) { | 
|---|
|  |  |  | input.value = newValue; | 
|---|
|  |  |  | // 触发input事件,通知v-model更新 | 
|---|
|  |  |  | input.dispatchEvent(new Event("input", { bubbles: true })); // 注意bubbles | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const handlePaste = function (event) { | 
|---|
|  |  |  | event.preventDefault(); | 
|---|
|  |  |  | const clipboardData = event.clipboardData || window.clipboardData; | 
|---|
|  |  |  | const pastedData = clipboardData.getData("text"); | 
|---|
|  |  |  | const numericValue = pastedData.replace(/[^\d]/g, ""); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 模拟在光标位置插入纯数字文本 | 
|---|
|  |  |  | const start = input.selectionStart; | 
|---|
|  |  |  | const end = input.selectionEnd; | 
|---|
|  |  |  | input.value = | 
|---|
|  |  |  | input.value.substring(0, start) + | 
|---|
|  |  |  | numericValue + | 
|---|
|  |  |  | input.value.substring(end); | 
|---|
|  |  |  | // 调整光标位置 | 
|---|
|  |  |  | const newCursorPos = start + numericValue.length; | 
|---|
|  |  |  | input.setSelectionRange(newCursorPos, newCursorPos); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 触发input事件 | 
|---|
|  |  |  | input.dispatchEvent(new Event("input", { bubbles: true })); | 
|---|
|  |  |  | }; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | input.addEventListener("input", handleInput); | 
|---|
|  |  |  | input.addEventListener("paste", handlePaste); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 存储引用以便解绑 | 
|---|
|  |  |  | el._numericOnly = { | 
|---|
|  |  |  | inputHandle: handleInput, | 
|---|
|  |  |  | pasteHandle: handlePaste, | 
|---|
|  |  |  | inputEl: input, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | unbind(el) { | 
|---|
|  |  |  | if (el._numericOnly) { | 
|---|
|  |  |  | const { inputHandle, pasteHandle, inputEl } = el._numericOnly; | 
|---|
|  |  |  | inputEl.removeEventListener("input", inputHandle); | 
|---|
|  |  |  | inputEl.removeEventListener("paste", pasteHandle); | 
|---|
|  |  |  | delete el._numericOnly; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"], | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | const validatePhone = (rule, value, callback) => { | 
|---|
|  |  |  | 
|---|
|  |  |  | tableDatatop: [], //题目表 | 
|---|
|  |  |  | voiceDatatop: [], //题目表 | 
|---|
|  |  |  | dynamicTags: [], | 
|---|
|  |  |  | isMergeMode: false, | 
|---|
|  |  |  | mergeDialogVisible: false, | 
|---|
|  |  |  | selectedServices: [], // 选中的服务列表 | 
|---|
|  |  |  | selectedTag: "", | 
|---|
|  |  |  | tagOptions: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value: "0", | 
|---|
|  |  |  | label: "正常", | 
|---|
|  |  |  | type: "normal", | 
|---|
|  |  |  | color: "#7ff5e1", | 
|---|
|  |  |  | description: "患者情况正常,无需特别关注", | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value: "1", | 
|---|
|  |  |  | label: "异常", | 
|---|
|  |  |  | type: "abnormal", | 
|---|
|  |  |  | color: "#f75c5c", | 
|---|
|  |  |  | description: "患者存在异常情况,需要重点关注", | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | value: "2", | 
|---|
|  |  |  | label: "警告", | 
|---|
|  |  |  | type: "warning", | 
|---|
|  |  |  | color: "#fbfb4a", | 
|---|
|  |  |  | description: "患者情况需要警告注意,可能存在风险", | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | zcrules: { | 
|---|
|  |  |  | resource: [ | 
|---|
|  |  |  | { required: true, message: "请选择随访方式", trigger: "change" }, | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | userform: {}, | 
|---|
|  |  |  | smsDialogVisible: false, // 控制短信对话框显示 | 
|---|
|  |  |  | smsContent: "", // 存储短信内容 | 
|---|
|  |  |  | Whetherall: true, //是否全部记录展示 | 
|---|
|  |  |  | dialogFormVisible: false, | 
|---|
|  |  |  | Voicetype: 0, //是否为语音服务 | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //患者360跳转 | 
|---|
|  |  |  | gettoken360(sfzh, drcode, drname) { | 
|---|
|  |  |  | this.$modal.msgWarning("360功能暂未开通"); | 
|---|
|  |  |  | return; // 阻止后续代码执行 | 
|---|
|  |  |  | this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh; | 
|---|
|  |  |  | if (this.postData.XiaoXiTou.ZuHuMC == "丽水市中医院") { | 
|---|
|  |  |  | this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728"; | 
|---|
|  |  |  | 
|---|
|  |  |  | getuserinfo() { | 
|---|
|  |  |  | const queryParams = { | 
|---|
|  |  |  | pid: Number(this.patid), | 
|---|
|  |  |  | allhosp: "0", | 
|---|
|  |  |  | allhosp: "0", //1住院2门诊3体检4出院 | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | // 患者基础信息 | 
|---|
|  |  |  | messagelistpatient(queryParams).then((response) => { | 
|---|
|  |  |  | 
|---|
|  |  |  | let excep = ""; | 
|---|
|  |  |  | const promises = []; | 
|---|
|  |  |  | this.tableDatatop.forEach((item) => { | 
|---|
|  |  |  | if (item.valueType == 3 && item.scriptResult) { | 
|---|
|  |  |  | // 验证是否为有效数字 | 
|---|
|  |  |  | if (!/^\d+$/.test(item.scriptResult)) { | 
|---|
|  |  |  | this.$message.error(`问题 "${item.scriptContent}" 必须输入数字`); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var objs = item.svyLibTemplateTargetoptions.find( | 
|---|
|  |  |  | (items) => items.optioncontent == item.scriptResult | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | 
|---|
|  |  |  | promises.push(serviceSubtaskDetailadd(obj)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 使用 Promise.all 等待所有异步操作完成 | 
|---|
|  |  |  | Promise.all(promises) | 
|---|
|  |  |  | .then((results) => { | 
|---|
|  |  |  | 
|---|
|  |  |  | console.error("发生错误:", error); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 电话============================ | 
|---|
|  |  |  | // 验证电话号码格式并返回错误信息 | 
|---|
|  |  |  | validatePhoneNumber(phone) { | 
|---|
|  |  |  | if (!phone) { | 
|---|
|  |  |  | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 使用示例 | 
|---|
|  |  |  | isValidPhone(phone) { | 
|---|
|  |  |  | return this.validatePhoneNumber(phone).isValid; | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 处理通话状态变化 | 
|---|
|  |  |  | handleCallStatusChange(status) { | 
|---|
|  |  |  | console.log(status, "status"); | 
|---|
|  |  |  | 
|---|
|  |  |  | this.$message.error(`呼叫失败: ${status.text}`); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 结束当前通话 | 
|---|
|  |  |  | endCurrentCall() { | 
|---|
|  |  |  | if (!this.currentCall) return; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | this.logsheetlist = res.rows[0].serviceSubtaskList; | 
|---|
|  |  |  | this.templateid = this.logsheetlist[0].templateid; | 
|---|
|  |  |  | this.selectedTag = this.logsheetlist[0].excep; | 
|---|
|  |  |  | const targetDate = new Date(this.form.longSendTime); // 目标日期 | 
|---|
|  |  |  | const now = new Date(); // 当前时间 | 
|---|
|  |  |  | if (now < targetDate && this.form.sendstate == 2) { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.getsearchrResults(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 调起短信发送对话框 | 
|---|
|  |  |  | sendAgainmsg() { | 
|---|
|  |  |  | this.smsDialogVisible = true; | 
|---|
|  |  |  | // 可以在这里初始化 smsContent,例如 this.smsContent = ''; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 发送短信的方法 | 
|---|
|  |  |  | sendSms() { | 
|---|
|  |  |  | // 这里调用你的短信发送 API | 
|---|
|  |  |  | // 假设 API 为 sendMsg,参数可能需要根据实际情况调整 | 
|---|
|  |  |  | sendMsg({ | 
|---|
|  |  |  | phone: this.userform.telcode, // 确保电话号码字段正确 | 
|---|
|  |  |  | content: this.smsContent, | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .then((res) => { | 
|---|
|  |  |  | if (res.code == 200) { | 
|---|
|  |  |  | this.$modal.msgSuccess("发送成功"); | 
|---|
|  |  |  | this.smsDialogVisible = false; // 关闭对话框 | 
|---|
|  |  |  | this.smsContent = ""; // 清空内容 | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.$modal.msgError("发送失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch((error) => { | 
|---|
|  |  |  | console.error("发送短信失败:", error); | 
|---|
|  |  |  | this.$modal.msgError("发送失败"); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | Editsingletaskson(son) { | 
|---|
|  |  |  | let objson = {}; | 
|---|
|  |  |  | 
|---|
|  |  |  | (item) => item.id == this.id | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | objson.remark = this.form.remark; | 
|---|
|  |  |  | objson.excep = this.selectedTag; | 
|---|
|  |  |  | if (sendstate) objson.sendstate = sendstate; | 
|---|
|  |  |  | Editsingletaskson(objson).then((res) => { | 
|---|
|  |  |  | if (res.code) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | getSelectedTagType() { | 
|---|
|  |  |  | if (!this.selectedTag) return ""; | 
|---|
|  |  |  | const tag = this.tagOptions.find( | 
|---|
|  |  |  | (item) => item.value === this.selectedTag | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return tag ? tag.type : ""; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | getSelectedTagColor() { | 
|---|
|  |  |  | if (!this.selectedTag) return ""; | 
|---|
|  |  |  | const tag = this.tagOptions.find( | 
|---|
|  |  |  | (item) => item.value === this.selectedTag | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return tag ? tag.color : ""; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | getSelectedDescription() { | 
|---|
|  |  |  | if (!this.selectedTag) return ""; | 
|---|
|  |  |  | const tag = this.tagOptions.find( | 
|---|
|  |  |  | (item) => item.value === this.selectedTag | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return tag ? tag.description : ""; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 调起再次发送 | 
|---|
|  |  |  | sendAgain() { | 
|---|
|  |  |  | document.querySelector("#app").scrollTo(0, 0); | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | this.tableDatatop[questionIndex].showAppendInput = | 
|---|
|  |  |  | selectedOptionObj.appendflag == 1; | 
|---|
|  |  |  | console.log(this.tableDatatop); | 
|---|
|  |  |  | console.log(this.tableDatatop); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // if (!this.tableDatatop[questionIndex].showAppendInput) { | 
|---|
|  |  |  | //   this.tableDatatop[questionIndex].answerps = ""; // 清除附加信息 | 
|---|
|  |  |  | 
|---|
|  |  |  | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | updateScore(a, b, c) {}, | 
|---|
|  |  |  | // 合并修改相关============================= | 
|---|
|  |  |  | toggleMergeMode() { | 
|---|
|  |  |  | this.isMergeMode = !this.isMergeMode; | 
|---|
|  |  |  | if (!this.isMergeMode) { | 
|---|
|  |  |  | this.selectedServices = []; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | handleSelectionChange(selection) { | 
|---|
|  |  |  | this.selectedServices = selection | 
|---|
|  |  |  | .filter( | 
|---|
|  |  |  | (item) => !item.preachformson || !item.preachformson.includes("3") | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | .map((item) => ({ | 
|---|
|  |  |  | id: item.id, | 
|---|
|  |  |  | taskid: item.taskid, | 
|---|
|  |  |  | taskName: item.taskName, | 
|---|
|  |  |  | sendname: item.sendname, | 
|---|
|  |  |  | })); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | checkSelectable(row, index) { | 
|---|
|  |  |  | // 当 sendstate 为 6 时不可选 | 
|---|
|  |  |  | return row.sendstate !== 6; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | openMergeDialog() { | 
|---|
|  |  |  | if (this.selectedServices.length < 2) { | 
|---|
|  |  |  | this.$message.warning("请至少选择2个问卷服务进行合并"); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.mergeDialogVisible = true; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | handleMergeSave(mergedData) { | 
|---|
|  |  |  | // 处理合并保存逻辑 | 
|---|
|  |  |  | this.mergeDialogVisible = false; | 
|---|
|  |  |  | this.isMergeMode = false; | 
|---|
|  |  |  | this.selectedServices = []; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 显示保存结果 | 
|---|
|  |  |  | if (mergedData.successCount == mergedData.totalCount) { | 
|---|
|  |  |  | this.$message.success(`成功保存 ${mergedData.successCount} 个问卷`); | 
|---|
|  |  |  | } else if (mergedData.successCount > 0) { | 
|---|
|  |  |  | this.$message.warning( | 
|---|
|  |  |  | `成功保存 ${mergedData.successCount} 个问卷,失败 ${ | 
|---|
|  |  |  | mergedData.totalCount - mergedData.successCount | 
|---|
|  |  |  | } 个` | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | this.$message.error("所有问卷保存失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 刷新数据 | 
|---|
|  |  |  | this.getTaskservelist(); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | 
|---|
|  |  |  | height: 100%; /* 确保高度继承 */ | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .numeric-input { | 
|---|
|  |  |  | position: relative; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .numeric-input::after { | 
|---|
|  |  |  | content: "只能输入数字"; | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | right: 8px; | 
|---|
|  |  |  | top: 50%; | 
|---|
|  |  |  | transform: translateY(-50%); | 
|---|
|  |  |  | font-size: 12px; | 
|---|
|  |  |  | color: #999; | 
|---|
|  |  |  | background: #f5f5f5; | 
|---|
|  |  |  | padding: 2px 6px; | 
|---|
|  |  |  | border-radius: 4px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .call-container { | 
|---|
|  |  |  | padding: 20px; | 
|---|
|  |  |  | background: #fff; | 
|---|
|  |  |  | 
|---|
|  |  |  | margin-top: 20px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .merge-controls { | 
|---|
|  |  |  | background: #f5f7fa; | 
|---|
|  |  |  | border-radius: 4px; | 
|---|
|  |  |  | margin-left: 20px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .Followuserinfo { | 
|---|
|  |  |  | margin: 10px 10px 0 10px; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | 
|---|
|  |  |  | top: 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .tag-selector-container { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | margin: 0 30px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .color-indicator { | 
|---|
|  |  |  | width: 16px; | 
|---|
|  |  |  | height: 16px; | 
|---|
|  |  |  | border-radius: 3px; | 
|---|
|  |  |  | margin-right: 8px; | 
|---|
|  |  |  | display: inline-block; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .selected-indicator { | 
|---|
|  |  |  | margin-left: 10px; | 
|---|
|  |  |  | width: 20px; | 
|---|
|  |  |  | height: 20px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .tag-info-icon { | 
|---|
|  |  |  | margin-left: 10px; | 
|---|
|  |  |  | color: #909399; | 
|---|
|  |  |  | cursor: pointer; | 
|---|
|  |  |  | font-size: 16px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* 确保选择器选项中也显示颜色块 */ | 
|---|
|  |  |  | .el-select-dropdown__item { | 
|---|
|  |  |  | display: flex; | 
|---|
|  |  |  | align-items: center; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .tag-normal { | 
|---|
|  |  |  | background-color: #7ff5e1; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .tag-abnormal { | 
|---|
|  |  |  | background-color: #f75c5c; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | .tag-warning { | 
|---|
|  |  |  | background-color: #fbfb4a; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .tag-info { | 
|---|
|  |  |  | margin-left: 10px; | 
|---|
|  |  |  | color: #909399; | 
|---|
|  |  |  | cursor: pointer; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ::v-deep.offside-value .el-radio__label { | 
|---|
|  |  |  | color: #fff; | 
|---|
|  |  |  | } | 
|---|