From 93bc6ed9fbed8472be7b393334855743d09940f8 Mon Sep 17 00:00:00 2001 From: WXL (wul) <wl_5969728@163.com> Date: 星期三, 03 九月 2025 14:49:08 +0800 Subject: [PATCH] 测试完成 --- src/views/followvisit/record/physical/index.vue | 1 src/views/followvisit/again/index.vue | 5 vue.config.js | 2 src/views/followvisit/zbAgain/index.vue | 4 src/views/followvisit/record/detailpage/index.vue | 1126 +++++++++++++++++++++----------- src/views/patient/patient/outpatient.vue | 344 +++++++++ src/views/followvisit/record/detailpage/MergeAndModify.vue | 449 +++++++++++++ src/views/knowledge/questionnaire/compilequer/index.vue | 43 src/views/followvisit/discharge/outpatientService.vue | 5 src/api/AiCentre/external.js | 10 src/views/followvisit/discharge/index.vue | 5 11 files changed, 1,555 insertions(+), 439 deletions(-) diff --git a/src/api/AiCentre/external.js b/src/api/AiCentre/external.js index cba2ebd..9288107 100644 --- a/src/api/AiCentre/external.js +++ b/src/api/AiCentre/external.js @@ -92,7 +92,7 @@ data: data }); } -// 鏂板鏈嶅姟 +// 鍐嶆闅忚鏈嶅姟 export function addserviceSubtask(data) { return request({ url: "/smartor/serviceSubtask/addSubTaskAgain", @@ -100,4 +100,12 @@ data: data }); } +// 鍐嶆闅忚鏈嶅姟 +export function addSubtask(data) { + return request({ + url: "/smartor/serviceSubtask/addSubTask", + method: "post", + data: data + }); +} diff --git a/src/views/followvisit/again/index.vue b/src/views/followvisit/again/index.vue index 69529da..3427512 100644 --- a/src/views/followvisit/again/index.vue +++ b/src/views/followvisit/again/index.vue @@ -1197,8 +1197,9 @@ }); }, affiliation() { - this.topqueryParams.drcode = store.getters.hisUserId; - this.topqueryParams.nurseId = store.getters.hisUserId; + + this.topqueryParams.managementDoctor = store.getters.hisUserId; + this.getList(1); }, onthatday() { diff --git a/src/views/followvisit/discharge/index.vue b/src/views/followvisit/discharge/index.vue index 23cfc3a..38d9555 100644 --- a/src/views/followvisit/discharge/index.vue +++ b/src/views/followvisit/discharge/index.vue @@ -1408,9 +1408,8 @@ }); }, affiliation() { - this.topqueryParams.drcode = store.getters.hisUserId; - this.topqueryParams.nurseId = store.getters.hisUserId; - this.topqueryParams.managementDoctor = store.getters.name; + + this.topqueryParams.managementDoctor = store.getters.hisUserId; this.getList(1); }, onthatday() { diff --git a/src/views/followvisit/discharge/outpatientService.vue b/src/views/followvisit/discharge/outpatientService.vue index bdbf87b..f398f76 100644 --- a/src/views/followvisit/discharge/outpatientService.vue +++ b/src/views/followvisit/discharge/outpatientService.vue @@ -1181,8 +1181,9 @@ }); }, affiliation() { - this.topqueryParams.drcode = store.getters.hisUserId; - this.topqueryParams.nurseId = store.getters.hisUserId; + + this.topqueryParams.managementDoctor = store.getters.hisUserId; + this.getList(1); }, onthatday() { diff --git a/src/views/followvisit/record/detailpage/MergeAndModify.vue b/src/views/followvisit/record/detailpage/MergeAndModify.vue new file mode 100644 index 0000000..6449d1e --- /dev/null +++ b/src/views/followvisit/record/detailpage/MergeAndModify.vue @@ -0,0 +1,449 @@ +<template> + <div class="merge-questionnaire-container"> + <div class="merge-header"> + <h3>鍚堝苟缂栬緫闂嵎 (鍏� {{ services.length }} 涓湭瀹屾垚鏈嶅姟)</h3> + <el-tag + v-for="service in services" + :key="service.id" + type="info" + style="margin-right: 10px" + > + {{ service.taskName }} ({{ service.sendname }}) + </el-tag> + </div> + + <div class="merge-content"> + <div class="question-list"> + <div + v-for="(question, index) in mergedQuestions" + :key="question.uniqueKey" + class="question-item" + > + <!-- 棰樼洰灞曠ず - 涓庣埗缁勪欢淇濇寔涓�鑷� --> + <div + :class=" + question.isabnormal ? 'scriptTopic-isabnormal' : 'scriptTopic-dev' + " + > + <div class="dev-text"> + {{ index + 1 }}銆乕{{ + getQuestionType(question.scriptType) + }}]<span> {{ question.scriptContent }}</span> + </div> + + <!-- 鍗曢�� --> + <div class="dev-xx" v-if="question.scriptType == 1"> + <el-radio-group + v-model="question.mergedResult" + @change=" + handleOptionChange( + $event, + index, + question.svyLibTemplateTargetoptions, + question + ) + " + >11 + <el-radio + v-for="( + option, optIndex + ) in question.svyLibTemplateTargetoptions" + :key="optIndex" + :label="option.optioncontent" + :class="option.isabnormal ? 'red-star' : ''" + > + {{ option.optioncontent }} + </el-radio> + </el-radio-group> + </div> + + <!-- 澶氶�� --> + <div class="dev-xx" v-if="question.scriptType == 2"> + <el-checkbox-group + v-model="question.mergedResult" + @change="updateScore($event, index, question.options, question)" + > + <el-checkbox + v-for="(option, optIndex) in question.options" + :key="optIndex" + :label="option.optioncontent" + :class="option.isabnormal ? 'red-star' : ''" + > + {{ option.optioncontent }} + </el-checkbox> + </el-checkbox-group> + </div> + + <!-- 濉┖ --> + <div class="dev-xx" v-if="question.scriptType == 4"> + <el-input + type="textarea" + :rows="2" + placeholder="璇疯緭鍏ョ瓟妗�" + v-model="question.mergedResult" + clearable + /> + </div> + + <!-- 闄勫姞杈撳叆妗� --> + <div v-if="question.showAppendInput" class="append-input-container"> + <el-input + type="textarea" + :rows="2" + placeholder="璇疯緭鍏ュ叿浣撲俊鎭�" + v-model="question.answerps" + clearable + /> + </div> + + <!-- 鎻愮ず淇℃伅 --> + <div v-show="question.prompt"> + <el-alert :title="question.prompt" type="warning" /> + </div> + </div> + </div> + </div> + </div> + + <div class="merge-footer"> + <el-button @click="handleCancel">鍙栨秷</el-button> + <el-button type="primary" @click="handleSave" :loading="isSaving" + >淇濆瓨鍒版墍鏈夐棶鍗�</el-button + > + </div> + </div> +</template> + +<script> +import { + getsearchrResults, + serviceSubtaskDetailedit, + serviceSubtaskDetailadd, + Editsingletaskson, + getTaskservelist, + alterpatient, +} from "@/api/AiCentre/index"; + +export default { + props: { + selectedServices: { + type: Array, + required: true, + }, + patid: { + type: [String, Number], + required: true, + }, + }, + data() { + return { + services: [], + mergedQuestions: [], // 鍚堝苟鍚庣殑闂鏁版嵁 + isSaving: false, + }; + }, + created() { + this.loadServicesData(); + }, + methods: { + getQuestionType(type) { + const types = { 1: "鍗曢��", 2: "澶氶��", 4: "闂瓟" }; + return types[type] || "鏈煡"; + }, + + async loadServicesData() { + this.services = this.selectedServices; + + const loading = this.$loading({ + lock: true, + text: "姝e湪鍔犺浇鏈畬鎴愰棶鍗锋暟鎹�...", + spinner: "el-icon-loading", + background: "rgba(0, 0, 0, 0.7)", + }); + + try { + // 鍙姞杞芥湭瀹屾垚鐨勬湇鍔¢棶鍗锋暟鎹� + const requests = this.services.map((service) => + getsearchrResults({ + taskid: service.taskid, + patid: this.patid, + subId: service.id, + isFinish: false, // 纭繚鍙幏鍙栨湭瀹屾垚鐨勯棶鍗� + }) + ); + + const responses = await Promise.all(requests); + + // 鍚堝苟鎵�鏈夐棶棰橈紝鍘婚噸 + const allQuestions = []; + const questionMap = {}; + + responses.forEach((response, index) => { + if (response.code == 200 && response.data.scriptResult) { + response.data.scriptResult.forEach((q) => { + const key = `${q.scriptContent}_${q.scriptType}`; + if (!questionMap[key]) { + questionMap[key] = { + ...q, + uniqueKey: key, + mergedResult: q.scriptType == 2 ? [] : null, + originalServices: [], // 璁板綍鍘熷鏈嶅姟ID + }; + allQuestions.push(questionMap[key]); + } + questionMap[key].originalServices.push(this.services[index].id); + }); + } + }); + + // 鍒濆鍖栧悎骞剁粨鏋� + this.mergedQuestions = allQuestions.map((q) => ({ + ...q, + mergedResult: q.scriptType == 2 ? [] : q.scriptResult || null, + })); + console.log(this.mergedQuestions); + } catch (error) { + this.$message.error("鍔犺浇闂嵎鏁版嵁澶辫触: " + error.message); + } finally { + loading.close(); + } + }, + + // 澶勭悊閫夐」鍙樺寲 (涓庣埗缁勪欢淇濇寔涓�鑷�) + handleOptionChange(selectedOption, questionIndex, options, question) { + const selectedOptionObj = options.find( + (item) => item.optioncontent == selectedOption + ); + + // 璁剧疆寮傚父鐘舵�� + question.isabnormal = !!selectedOptionObj?.isabnormal; + + // 澶勭悊闄勫姞杈撳叆妗嗘樉绀� + question.showAppendInput = selectedOptionObj?.appendflag == 1; + if (!question.showAppendInput) { + question.answerps = ""; + } + + this.$forceUpdate(); + }, + + // 鏇存柊澶氶�夊垎鏁� (涓庣埗缁勪欢淇濇寔涓�鑷�) + updateScore(selectedValues, questionIndex, options, question) { + const abnormalOptions = options.filter((opt) => opt.isabnormal); + question.isabnormal = abnormalOptions.some((opt) => + selectedValues.includes(opt.optioncontent) + ); + this.$forceUpdate(); + }, + + handleCancel() { + this.$emit("cancel"); + }, + + async handleSave() { + this.isSaving = true; + + try { + const saveResults = []; + const updateServicePromises = []; + + // 1. 淇濆瓨鎵�鏈夐棶鍗烽棶棰� + for (const service of this.services) { + const serviceId = service.id; + const questionsToSave = this.mergedQuestions + .filter((q) => q.originalServices.includes(serviceId)) + .map((question) => ({ + scriptid: question.id, + scriptResultId: question.scriptResultId, + scriptType: question.scriptType, + questiontext: question.scriptContent, + asrtext: + question.scriptType == 2 + ? question.mergedResult.join("&") + : question.mergedResult, + answerps: question.answerps || null, + isabnormal: question.isabnormal || false, + })); + + // 淇濆瓨闂鏁版嵁 + for (const question of questionsToSave) { + const saveData = { + taskid: service.taskid, + patid: this.patid, + subId: serviceId, + ...question, + }; + + if (saveData.isabnormal) { + saveData.excep = 1; + } + + try { + const response = question.scriptResultId + ? await serviceSubtaskDetailedit(saveData) + : await serviceSubtaskDetailadd(saveData); + + saveResults.push({ + serviceId, + success: response.code === 200, + message: + response.message || + (response.code === 200 ? "淇濆瓨鎴愬姛" : "淇濆瓨澶辫触"), + }); + } catch (error) { + saveResults.push({ + serviceId, + success: false, + message: error.message || "淇濆瓨澶辫触", + }); + } + } + + // 2. 鏇存柊鏈嶅姟鐘舵�佷负宸插畬鎴� (sendstate = 6) + updateServicePromises.push(this.updateServiceStatus(serviceId)); + } + + // 绛夊緟鎵�鏈夋湇鍔$姸鎬佹洿鏂板畬鎴� + const updateResults = await Promise.all(updateServicePromises); + updateResults.forEach((result) => { + if (!result.success) { + saveResults.push({ + serviceId: result.serviceId, + success: false, + message: result.message || "鏈嶅姟鐘舵�佹洿鏂板け璐�", + }); + } + }); + + // 缁熻缁撴灉 + const successCount = saveResults.filter((r) => r.success).length; + const totalCount = saveResults.length; + + // 閫氱煡鐖剁粍浠� + this.$emit("save", { + successCount, + totalCount, + results: saveResults, + }); + + if (successCount === totalCount) { + this.$message.success("鎵�鏈夐棶鍗峰拰鏈嶅姟鐘舵�佹洿鏂版垚鍔�"); + } else { + this.$message.warning( + `鎴愬姛淇濆瓨 ${successCount} 椤癸紝澶辫触 ${totalCount - successCount} 椤筦 + ); + } + } catch (error) { + this.$message.error("淇濆瓨杩囩▼涓彂鐢熼敊璇�: " + error.message); + } finally { + this.isSaving = false; + } + }, + // 鏂板鏂规硶锛氭洿鏂版湇鍔$姸鎬� + async updateServiceStatus(serviceId) { + try { + // 鑾峰彇鏈嶅姟褰撳墠鏁版嵁 + const res = await getTaskservelist({ + patid: this.patid, + subId: serviceId, + }); + + if (res.code === 200) { + const serviceData = res.rows[0].serviceSubtaskList.find( + (item) => item.id === serviceId + ); + + if (serviceData) { + // 鏇存柊鏈嶅姟鐘舵�佷负宸插畬鎴� (sendstate = 6) + const updateRes = await Editsingletaskson({ + ...serviceData, + sendstate: 6, // 璁剧疆涓哄凡瀹屾垚鐘舵�� + remark: "閫氳繃鍚堝苟缂栬緫瀹屾垚", // 鍙�夛細娣诲姞澶囨敞 + }); + + return { + serviceId, + success: updateRes.code === 200, + message: updateRes.message || "鏈嶅姟鐘舵�佹洿鏂版垚鍔�", + }; + } + } + return { + serviceId, + success: false, + message: "鑾峰彇鏈嶅姟鏁版嵁澶辫触", + }; + } catch (error) { + return { + serviceId, + success: false, + message: error.message || "鏇存柊鏈嶅姟鐘舵�佸け璐�", + }; + } + }, + }, +}; +</script> + +<style scoped> +.merge-questionnaire-container { + display: flex; + flex-direction: column; + height: 100%; + padding: 20px; +} + +.merge-header { + margin-bottom: 20px; +} + +.merge-content { + flex: 1; + overflow-y: auto; +} + +.question-list { + padding: 10px; +} + +/* 涓庣埗缁勪欢涓�鑷寸殑棰樼洰鏍峰紡 */ +.scriptTopic-dev { + margin-bottom: 20px; + padding: 15px; + border: 1px solid #ebeef5; + border-radius: 4px; +} + +.scriptTopic-isabnormal { + margin-bottom: 20px; + padding: 15px; + border: 1px solid #f56c6c; + border-radius: 4px; + background-color: #fff6f6; +} + +.dev-text { + font-size: 16px; + margin-bottom: 15px; + color: #333; +} + +.dev-xx { + margin-left: 20px; +} + +.append-input-container { + margin-top: 15px; +} + +.red-star { + color: #f56c6c; +} + +.merge-footer { + margin-top: 20px; + text-align: right; + padding-top: 15px; + border-top: 1px solid #ebeef5; +} +</style> diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue index cc8b055..13a3136 100644 --- a/src/views/followvisit/record/detailpage/index.vue +++ b/src/views/followvisit/record/detailpage/index.vue @@ -27,6 +27,23 @@ 鍓嶅線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> --> </div> @@ -36,7 +53,14 @@ :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" @@ -213,118 +237,427 @@ </el-table> </div> </div> - <div class="Followuserinfos"> - <div> - <el-form - ref="userform" - :model="form" - :rules="userrules" - label-width="120px" - > + <!-- 娣诲姞鍚堝苟缂栬緫瀵硅瘽妗� --> + <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"> + <!-- <div class="call-header"> + <h2>涓�閿懠鍙姛鑳�</h2> + </div> --> + <div class="headline"> - <div>浜哄伐澶勭悊</div> - <el-row :gutter="20"> - <el-col :span="8" - ><el-form-item label="鑱旂郴鐢佃瘽"> - <el-input - placeholder="鑱旂郴鐢佃瘽缂哄け" - v-model="userform.telcode" - > - <el-button - slot="append" - icon="el-icon-phone" - @click="handleCall(userform.telcode, 'tel')" - :disabled="!isValidPhone(userform.telcode)" - ></el-button - ></el-input> </el-form-item - ></el-col> - <el-col :span="8" - ><el-form-item label="鑱旂郴浜虹數璇�"> - <el-input - placeholder="鑱旂郴浜虹數璇濈己澶�" - v-model="userform.relativetelcode" - > - <el-button - slot="append" - icon="el-icon-phone" - @click="handleCall(userform.relativetelcode, 'relative')" - :disabled="!isValidPhone(userform.relativetelcode)" - ></el-button - ></el-input> </el-form-item - ></el-col> - <el-col :span="8" - ><el-form-item label="鑱旂郴浜哄叧绯�"> - <el-input - placeholder="鑱旂郴浜哄叧绯荤己澶�" - v-model="userform.relation" - ></el-input> </el-form-item - ></el-col> - </el-row> - - <div style="margin-left: 30px"> - <el-button type="primary" plain @click="Editsingletasksonyic('')" - >淇濆瓨鏈嶅姟</el-button - > - </div> + <div>闅忚鍐呭</div> </div> - <el-row :gutter="20" v-if="callStatus !== 'idle'"> - <el-col :span="24"> - <el-alert - :title="callStatusText" - :type="callStatusType" - :closable="false" - show-icon - /> - </el-col> - </el-row> + <div> + <el-tabs v-model="activeName" type="border-card"> + <el-tab-pane name="wj"> + <span class="mulsz" slot="label" + ><i class="el-icon-notebook-1"></i> 闂嵎闅忚缁撴灉</span + > + <div class="CONTENT"> + <div class="title">{{ taskname ? taskname : "闂嵎" }}</div> - <!-- 鎸傛柇鎸夐挳锛堜粎鍦ㄩ�氳瘽涓樉绀猴級 --> - <el-row :gutter="20" v-if="callStatus === 'connected'"> - <el-col :span="24" style="text-align: center; margin-top: 10px"> - <el-button - type="danger" - icon="el-icon-phone" - @click="endCurrentCall" - :loading="isEndingCall" - > - 鎸傛柇鐢佃瘽 - </el-button> - </el-col> - </el-row> - <el-form-item label="闅忚璁板綍"> - <el-input type="textarea" v-model="form.remark"></el-input> - </el-form-item> + <div class="preview-left" v-if="!Voicetype"> + <div + class="topic-dev" + v-for="(item, index) in tableDatatop" + :key="item.id" + > + <!-- 鍗曢�� --> + <div + :class=" + item.isabnormal + ? 'scriptTopic-isabnormal' + : 'scriptTopic-dev' + " + :key="index" + v-if="item.scriptType == 1 && !item.astrict" + > + <div class="dev-text"> + {{ index + 1 }}銆乕鍗曢�塢<span>{{ + item.scriptContent + }}</span> + </div> + <div class="dev-xx"> + <el-radio-group + v-model="item.scriptResult" + @change=" + handleOptionChange( + $event, + index, + item.svyLibTemplateTargetoptions, + item + ) + " + > + <el-radio + v-for="( + items, indexs + ) in item.svyLibTemplateTargetoptions" + :class="items.isabnormal ? 'red-star' : ''" + :key="indexs" + :label="items.optioncontent" + >{{ items.optioncontent }}</el-radio + > + </el-radio-group> + </div> + <div + v-if="item.showAppendInput||item.answerps" + class="append-input-container" + > + <el-input + type="textarea" + :rows="2" + placeholder="璇疯緭鍏ュ叿浣撲俊鎭�" + v-model="item.answerps" + clearable + ></el-input> + </div> + <div v-show="item.prompt"> + <el-alert :title="item.prompt" type="warning"> + </el-alert> + </div> + </div> + <!-- 澶氶�� --> + <div + :class=" + item.isabnormal + ? 'scriptTopic-isabnormal' + : 'scriptTopic-dev' + " + :key="index" + v-if="item.scriptType == 2 && !item.astrict" + > + <div class="dev-text"> + {{ index + 1 }}銆乕澶氶�塢<span>{{ + item.scriptContent + }}</span> + </div> + <div class="dev-xx"> + <el-checkbox-group + v-model="item.scriptResult" + @change="updateScore($event, index, item)" + > + <el-checkbox + :class="items.isabnormal ? 'red-star' : ''" + @change="$forceUpdate()" + v-for="( + items, indexs + ) in item.svyLibTemplateTargetoptions" + :key="indexs" + :label="items.optioncontent" + > + {{ items.optioncontent }} + </el-checkbox> + </el-checkbox-group> + </div> + <div v-show="item.prompt && item.scriptResult[0]"> + <el-alert :title="item.prompt" type="warning"> + </el-alert> + </div> + </div> + <!-- 濉┖ --> + <div + class="scriptTopic-dev" + :key="index" + v-if="item.scriptType == 4 && !item.astrict" + > + <div class="dev-text"> + {{ index + 1 }}銆乕闂瓟]<span>{{ + item.scriptContent + }}</span> + </div> + <div class="dev-xx"> + <el-input + type="textarea" + :rows="2" + placeholder="璇疯緭鍏ョ瓟妗�" + v-model="item.scriptResult" + clearable + > + </el-input> + </div> + </div> + </div> + </div> - <el-form-item label="澶勭悊鎰忚"> - <div> - <el-button plain type="warning" @click="Editsingletaskson('1')" - >鏆備笉澶勭悊</el-button - > - <el-button plain type="success" @click="Editsingletaskson('2')" - >鐥呮儏绋冲畾</el-button - > - <el-button plain type="primary" @click="Editsingletaskson('3')" - >閫氱煡灏辫瘖</el-button - > - <!-- <el-button type="danger" @click="Editsingletaskson('4')" - >澶辫</el-button - > --> - <el-button plain type="info" @click="Editsingletaskson('5')" - >涓績闅忚</el-button - > - <el-button - type="primary" - round - v-if="this.form.isVisitAgain != 2" - @click="sendAgain()" - >鍐嶆闅忚</el-button - > - </div> - </el-form-item> - </el-form> - <el-collapse> - <el-collapse-item title="鏌ョ湅褰撳墠鎮h�呬俊鎭�" name="1"> + <div class="preview-left" v-else> + <div + class="topic-dev" + v-for="(item, index) in tableDatatop" + :key="item.id" + > + <div v-if="item.targetvalue"> + <div class="dev-text"> + {{ index + 1 }}銆乕鍗曢�塢<span>{{ + item.questiontext + }}</span> + </div> + <div class="dev-xx"> + <el-radio-group + v-model="item.matchedtext" + @change=" + handleOptionChange( + $event, + index, + item.ivrTaskScriptTargetoptionList, + item + ) + " + > + <el-radio + v-for="(items, index) in item.scriptResult" + :key="items" + :label="items" + >{{ items }}</el-radio + > + </el-radio-group> + </div> + <div v-show="item.prompt"> + <el-alert :title="item.prompt" type="warning"> + </el-alert> + </div> + </div> + + <div class="scriptTopic-dev" :key="index" v-else> + <div class="dev-text"> + {{ index + 1 }}銆乕闂瓟]<span>{{ + item.questiontext + }}</span> + </div> + <div class="dev-xx"> + <el-input + type="textarea" + :rows="2" + placeholder="璇疯緭鍏ョ瓟妗�" + v-model="item.matchedtext" + clearable + > + </el-input> + </div> + </div> + </div> + </div> + <el-button + v-if="Voicetype" + type="primary" + @click="yuyingetdetail" + >淇濆瓨鏈嶅姟璇︽儏</el-button + > + <el-button v-else type="primary" @click="getdetail" + >淇濆瓨鏈嶅姟璇︽儏</el-button + > + </div> + </el-tab-pane> + + <el-tab-pane name="yy"> + <span class="mulsz" slot="label" + ><i class="el-icon-headset"></i> 璇煶闅忚璇︽儏</span + > + <div class="borderdiv"> + <div class="title">{{ taskname ? taskname : "闂嵎" }}</div> + <div + style=" + display: flex; + text-align: center; + align-items: center; + color: #59a0f0; + " + > + 瀹屾暣璇煶锛� + <mini-audio + :audio-source=" + voice ? voice : '@assets/order/example.mp3' + " + ></mini-audio> + </div> + <div class="preview-left"> + <div v-for="item in voiceDatatop"> + <div class="leftside"> + <i class="el-icon-phone-outline"></i + ><span>{{ item.questiontext }}</span> + </div> + <div class="offside"> + <i class="el-icon-user"></i> + <div class="offside-value"> + <el-input + type="textarea" + :autosize="{ minRows: 1 }" + v-model="item.asrtext" + ></el-input> + + <div> + <mini-audio + :audio-source=" + item.questionvoice + ? item.questionvoice + : '@assets/order/example.mp3' + " + ></mini-audio> + </div> + </div> + </div> + </div> + </div> + <el-button + v-if="Voicetype" + type="primary" + @click="yuyingetdetail" + >淇濆瓨闅忚璇︽儏</el-button + > + <el-button v-else type="primary" @click="getdetail" + >淇濆瓨闅忚璇︽儏</el-button + > + </div> + </el-tab-pane> + </el-tabs> + </div> + </div> + </div> + <div class="manual-action"> + <div class="Followuserinfos"> + <div> + <el-form + ref="userform" + :model="form" + :rules="userrules" + label-width="120px" + > + <div class="headline"> + <div>浜哄伐澶勭悊</div> + <div style="margin: 0 30px"> + <el-button + type="primary" + plain + @click="Editsingletasksonyic('')" + >淇濆瓨鍩虹淇℃伅</el-button + > + </div> + <div> + <el-button + type="primary" + round + v-if="this.form.isVisitAgain != 2" + @click="sendAgain()" + >鍐嶆闅忚</el-button + > + </div> + </div> + <el-row> + <el-col :span="14" + ><el-form-item label="鑱旂郴鐢佃瘽"> + <el-input + placeholder="鑱旂郴鐢佃瘽缂哄け" + v-model="userform.telcode" + > + <el-button + slot="append" + icon="el-icon-phone" + @click="handleCall(userform.telcode, 'tel')" + :disabled="!isValidPhone(userform.telcode)" + ></el-button + ></el-input> </el-form-item + ></el-col> + </el-row> + <el-row> + <el-col :span="14" + ><el-form-item label="鑱旂郴浜虹數璇�"> + <el-input + placeholder="鑱旂郴浜虹數璇濈己澶�" + v-model="userform.relativetelcode" + > + <el-button + slot="append" + icon="el-icon-phone" + @click=" + handleCall(userform.relativetelcode, 'relative') + " + :disabled="!isValidPhone(userform.relativetelcode)" + ></el-button + ></el-input> </el-form-item + ></el-col> + <el-col :span="10" + ><el-form-item label="鑱旂郴浜哄叧绯�"> + <el-input + placeholder="鑱旂郴浜哄叧绯荤己澶�" + v-model="userform.relation" + ></el-input> </el-form-item + ></el-col> + </el-row> + <div class="call-controls"> + <CallButton + ref="callButton" + :phoneNumber="currentPhoneNumber" + style="display: none" + /> + + <div v-if="callStatus === 'connected'" class="hangup-btn"> + <el-button + type="danger" + icon="el-icon-phone" + @click="endCurrentCall" + :loading="isEndingCall" + > + 鎸傛柇鐢佃瘽 + </el-button> + </div> + <div class="call-status" v-if="callStatus !== 'idle'"> + <el-alert + :title="callStatusText" + :type="callStatusType" + :closable="false" + show-icon + /> + </div> + </div> + <el-form-item label="闅忚璁板綍"> + <el-input type="textarea" v-model="form.remark"></el-input> + </el-form-item> + + <el-form-item label="澶勭悊鎰忚"> + <div> + <el-button + plain + type="warning" + @click="Editsingletaskson('1')" + >鏆備笉澶勭悊</el-button + > + <el-button + plain + type="success" + @click="Editsingletaskson('2')" + >鐥呮儏绋冲畾</el-button + > + <el-button + plain + type="primary" + @click="Editsingletaskson('3')" + >閫氱煡灏辫瘖</el-button + > + <el-button plain type="info" @click="Editsingletaskson('5')" + >涓績闅忚</el-button + > + </div> + </el-form-item> + </el-form> + <div class="detailed"> + <h3>鎮h�呮。妗堜俊鎭�</h3> <el-form ref="userform" :model="userform" label-width="100px"> <el-row :gutter="20"> <el-col :span="12"> @@ -374,261 +707,13 @@ /> </el-form-item ></el-col> </el-row> - <!-- <el-row :gutter="20"> - <el-col :span="24"> - <el-form-item label="鏍囩" prop="desc"> - <div class="xinz-inf"> - <el-tag - :key="tag.tagname" - type="success" - v-for="tag in dynamicTags" - :disable-transitions="false" - > - {{ tag.tagname }} - </el-tag> - </div> - </el-form-item> - </el-col> - </el-row> --> </el-form> </div> - </el-collapse-item> - </el-collapse> + </div> + </div> </div> </div> - <div> - <h2>闅忚鍐呭</h2> - <CallButton - ref="callButton" - :phoneNumber="currentPhoneNumber" - style="display: none" - /> - </div> - <div> - <el-tabs v-model="activeName" type="border-card"> - <el-tab-pane name="wj"> - <span class="mulsz" slot="label" - ><i class="el-icon-notebook-1"></i> 闂嵎闅忚缁撴灉</span - > - <div class="CONTENT"> - <div class="title">{{ taskname ? taskname : "闂嵎" }}</div> - <div class="preview-left" v-if="!Voicetype"> - <div - class="topic-dev" - v-for="(item, index) in tableDatatop" - :key="item.id" - > - <!-- 鍗曢�� --> - <div - :class=" - item.isabnormal - ? 'scriptTopic-isabnormal' - : 'scriptTopic-dev' - " - :key="index" - v-if="item.scriptType == 1 && !item.astrict" - > - <div class="dev-text"> - {{ index + 1 }}銆乕鍗曢�塢<span>{{ item.scriptContent }}</span> - </div> - <div class="dev-xx"> - <el-radio-group - v-model="item.scriptResult" - @change=" - handleOptionChange( - $event, - index, - item.svyLibTemplateTargetoptions - ) - " - > - <el-radio - v-for="( - items, indexs - ) in item.svyLibTemplateTargetoptions" - :class="items.isabnormal ? 'red-star' : ''" - :key="indexs" - :label="items.optioncontent" - >{{ items.optioncontent }}</el-radio - > - </el-radio-group> - </div> - <div v-show="item.prompt"> - <el-alert :title="item.prompt" type="warning"> </el-alert> - </div> - </div> - <!-- 澶氶�� --> - <div - :class=" - item.isabnormal - ? 'scriptTopic-isabnormal' - : 'scriptTopic-dev' - " - :key="index" - v-if="item.scriptType == 2 && !item.astrict" - > - <div class="dev-text"> - {{ index + 1 }}銆乕澶氶�塢<span>{{ item.scriptContent }}</span> - </div> - <div class="dev-xx"> - <el-checkbox-group - v-model="item.scriptResult" - @change="updateScore($event, index, item)" - > - <el-checkbox - :class="items.isabnormal ? 'red-star' : ''" - @change="$forceUpdate()" - v-for="( - items, indexs - ) in item.svyLibTemplateTargetoptions" - :key="indexs" - :label="items.optioncontent" - > - {{ items.optioncontent }} - </el-checkbox> - </el-checkbox-group> - </div> - <div v-show="item.prompt && item.scriptResult[0]"> - <el-alert :title="item.prompt" type="warning"> </el-alert> - </div> - </div> - <!-- 濉┖ --> - <div - class="scriptTopic-dev" - :key="index" - v-if="item.scriptType == 4 && !item.astrict" - > - <div class="dev-text"> - {{ index + 1 }}銆乕闂瓟]<span>{{ item.scriptContent }}</span> - </div> - <div class="dev-xx"> - <el-input - type="textarea" - :rows="2" - placeholder="璇疯緭鍏ョ瓟妗�" - v-model="item.scriptResult" - clearable - > - </el-input> - </div> - </div> - </div> - </div> - - <div class="preview-left" v-else> - <div - class="topic-dev" - v-for="(item, index) in tableDatatop" - :key="item.id" - > - <div v-if="item.targetvalue"> - <div class="dev-text"> - {{ index + 1 }}銆乕鍗曢�塢<span>{{ item.questiontext }}</span> - </div> - <div class="dev-xx"> - <el-radio-group - v-model="item.matchedtext" - @change="handleOptionChange($event, index, item)" - > - <el-radio - v-for="(items, index) in item.scriptResult" - :key="items" - :label="items" - >{{ items }}</el-radio - > - </el-radio-group> - </div> - <div v-show="item.prompt"> - <el-alert :title="item.prompt" type="warning"> </el-alert> - </div> - </div> - - <div class="scriptTopic-dev" :key="index" v-else> - <div class="dev-text"> - {{ index + 1 }}銆乕闂瓟]<span>{{ item.questiontext }}</span> - </div> - <div class="dev-xx"> - <el-input - type="textarea" - :rows="2" - placeholder="璇疯緭鍏ョ瓟妗�" - v-model="item.matchedtext" - clearable - > - </el-input> - </div> - </div> - </div> - </div> - <el-button v-if="Voicetype" type="primary" @click="yuyingetdetail" - >淇濆瓨鏈嶅姟璇︽儏</el-button - > - <el-button v-else type="primary" @click="getdetail" - >淇濆瓨鏈嶅姟璇︽儏</el-button - > - </div> - </el-tab-pane> - - <el-tab-pane name="yy"> - <span class="mulsz" slot="label" - ><i class="el-icon-headset"></i> 璇煶闅忚璇︽儏</span - > - <div class="borderdiv"> - <div class="title">{{ taskname ? taskname : "闂嵎" }}</div> - <div - style=" - display: flex; - text-align: center; - align-items: center; - color: #59a0f0; - " - > - 瀹屾暣璇煶锛� - <mini-audio - :audio-source=" - voice ? voice : '@assets/order/example.mp3' - " - ></mini-audio> - </div> - <div class="preview-left"> - <div v-for="item in voiceDatatop"> - <div class="leftside"> - <i class="el-icon-phone-outline"></i - ><span>{{ item.questiontext }}</span> - </div> - <div class="offside"> - <i class="el-icon-user"></i> - <div class="offside-value"> - <el-input - type="textarea" - :autosize="{ minRows: 1 }" - v-model="item.asrtext" - ></el-input> - - <div> - <mini-audio - :audio-source=" - item.questionvoice - ? item.questionvoice - : '@assets/order/example.mp3' - " - ></mini-audio> - </div> - </div> - </div> - </div> - </div> - <el-button v-if="Voicetype" type="primary" @click="yuyingetdetail" - >淇濆瓨闅忚璇︽儏</el-button - > - <el-button v-else type="primary" @click="getdetail" - >淇濆瓨闅忚璇︽儏</el-button - > - </div> - </el-tab-pane> - </el-tabs> - </div> <el-dialog title="鎮h�呭啀娆¢殢璁�" v-dialogDrags @@ -797,9 +882,11 @@ listcontactinformation, } from "@/api/patient/homepage"; import CallButton from "@/components/CallButton"; +import MergeAndModify from "./MergeAndModify.vue"; export default { components: { CallButton, + MergeAndModify, }, dicts: ["sys_normal_disable", "sys_user_sex", "sys_yujing", "sys_suggest"], @@ -836,6 +923,9 @@ tableDatatop: [], //棰樼洰琛� voiceDatatop: [], //棰樼洰琛� dynamicTags: [], + isMergeMode: false, + mergeDialogVisible: false, + selectedServices: [], // 閫変腑鐨勬湇鍔″垪琛� zcrules: { resource: [ { required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" }, @@ -1194,6 +1284,7 @@ scriptid: item.id, excep: excep, questiontext: item.scriptContent, + answerps: item.answerps || null, // 娣诲姞闄勫姞淇℃伅 }; if (item.scriptType == 2 && item.scriptResult[0]) { obj.asrtext = item.scriptResult.join("&"); @@ -1240,7 +1331,7 @@ }) .catch(() => { if (this.form.serviceType == 13) { - if (this.visitCount!=1) { + if (this.visitCount != 1) { this.$router.push({ path: "/logisticsservice/zbAgain", }); @@ -1250,7 +1341,7 @@ }); } } else if (this.form.serviceType == 2) { - if (this.visitCount!=1) { + if (this.visitCount != 1) { this.$router.push({ path: "/logisticsservice/again", }); @@ -1267,6 +1358,7 @@ console.error("鍙戠敓閿欒锛�", error); }); }, + // 鐢佃瘽============================ // 楠岃瘉鐢佃瘽鍙风爜鏍煎紡骞惰繑鍥為敊璇俊鎭� validatePhoneNumber(phone) { if (!phone) { @@ -1298,7 +1390,6 @@ }; } }, - // 浣跨敤绀轰緥 isValidPhone(phone) { return this.validatePhoneNumber(phone).isValid; @@ -1322,7 +1413,6 @@ }); }); }, - // 澶勭悊閫氳瘽鐘舵�佸彉鍖� handleCallStatusChange(status) { console.log(status, "status"); @@ -1344,7 +1434,6 @@ this.$message.error(`鍛煎彨澶辫触: ${status.text}`); } }, - // 缁撴潫褰撳墠閫氳瘽 endCurrentCall() { if (!this.currentCall) return; @@ -1550,7 +1639,7 @@ }) .catch(() => {}); }, - handleOptionChange(a, b, c) { + aahandleOptionChange(a, b, c) { const result = c.find((item) => item.optioncontent == a); if (result.nextQuestion == 0) { this.tableDatatop = this.tableDatatop.reduce((acc, item, i) => { @@ -1577,6 +1666,98 @@ } else { this.tableDatatop[b].isabnormal = false; } + this.$forceUpdate(); + }, + // 鍦╩ethods閮ㄥ垎锛屼慨鏀筯andleOptionChange鏂规硶: + handleOptionChange(selectedOption, questionIndex, options, a) { + if (document.activeElement) { + document.activeElement.blur(); + } + + // 鎵惧埌琚�変腑鐨勯�夐」瀵硅薄 + const selectedOptionObj = options.find( + (item) => item.optioncontent == selectedOption + ); + + // 澶勭悊寮傚父鐘舵�侀珮浜� + this.tableDatatop[questionIndex].isabnormal = + !!selectedOptionObj.isabnormal; + // 澶勭悊闄勫姞杈撳叆妗嗘樉绀� + + this.tableDatatop[questionIndex].showAppendInput = + selectedOptionObj.appendflag == 1; + console.log(this.tableDatatop); + + // if (!this.tableDatatop[questionIndex].showAppendInput) { + // this.tableDatatop[questionIndex].answerps = ""; // 娓呴櫎闄勫姞淇℃伅 + // } + // 淇濆瓨褰撳墠棰樼洰涔嬪墠宸茬粡闅愯棌鐨勯鐩姸鎬� + const previouslyHiddenBeforeCurrent = this.tableDatatop + .slice(0, questionIndex) + .map((item, index) => (item.astrict ? index : -1)) + .filter((index) => index !== -1); + + // 淇濆瓨涔嬪墠鍥爊extQuestion=0鑰岄殣钘忕殑棰樼洰鑼冨洿 + const previouslyHiddenByEnd = this.tableDatatop + .map((item, index) => (item.hiddenByEnd ? index : -1)) + .filter((index) => index !== -1); + + // 濡傛灉branchFlag涓�1锛屽鐞嗛鐩烦杞� + if (a.branchFlag == 1) { + if (selectedOptionObj.nextQuestion == 0) { + // 缁撴潫闂瓟 - 闅愯棌鍚庨潰鎵�鏈夐鐩苟鏍囪 + this.tableDatatop = this.tableDatatop.map((item, index) => ({ + ...item, + astrict: index > questionIndex, + hiddenByEnd: index > questionIndex, // 鏍囪杩欎簺棰樼洰鏄缁撴潫闂瓟闅愯棌鐨� + })); + } else { + // 姝e父璺宠浆閫昏緫 + const nextQuestionIndex = selectedOptionObj.nextQuestion - 1; + + this.tableDatatop = this.tableDatatop.map((item, index) => { + // 淇濈暀褰撳墠棰樼洰涔嬪墠鐨勯殣钘忕姸鎬� + if (index < questionIndex) { + return { + ...item, + astrict: previouslyHiddenBeforeCurrent.includes(index), + hiddenByEnd: false, // 娓呴櫎缁撴潫鏍囪 + }; + } + + // 褰撳墠棰樼洰鎬绘槸鍙 + if (index === questionIndex) { + return { ...item, astrict: 0, hiddenByEnd: false }; + } + + // 鏄剧ず鐩爣涓嬩竴棰� + if (index === nextQuestionIndex) { + return { ...item, astrict: 0, hiddenByEnd: false }; + } + + // 濡傛灉鏄箣鍓嶈缁撴潫闂瓟闅愯棌鐨勯鐩紝鐜板湪搴旇鎭㈠鏄剧ず + if (item.hiddenByEnd) { + return { ...item, astrict: 0, hiddenByEnd: false }; + } + + // 闅愯棌褰撳墠棰樺拰鐩爣棰樹箣闂寸殑棰樼洰 + if (index > questionIndex && index < nextQuestionIndex) { + return { ...item, astrict: 1, hiddenByEnd: false }; + } + + // 鍏朵粬鎯呭喌淇濇寔鍘熺姸 + return item; + }); + } + } else { + // 濡傛灉娌℃湁璺宠浆锛屽彧闇�纭繚涓嬩竴棰樺彲瑙� + this.tableDatatop = this.tableDatatop.map((item, index) => ({ + ...item, + astrict: index === questionIndex + 1 ? 0 : item.astrict, + hiddenByEnd: index === questionIndex + 1 ? false : item.hiddenByEnd, + })); + } + this.$forceUpdate(); }, overdata() { @@ -1656,69 +1837,205 @@ 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> -<style lang="scss"> +<style lang="scss" scoped> .Followupdetailspage { margin: 10px; + display: flex; + flex-direction: column; + gap: 20px; +} + +.action-container { + display: flex; + gap: 20px; + margin: 0 10px 20px 10px; + + .manual-action { + flex: 1; + min-width: 0; + height: 100%; /* 纭繚楂樺害缁ф壙 */ + } + + .call-action { + width: 60%; + min-width: 0; + height: 100%; /* 纭繚楂樺害缁ф壙 */ + } +} + +.call-container { + padding: 20px; + background: #fff; + border: 1px solid #dcdfe6; + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04); + border-radius: 4px; + height: 100%; + + .call-header { + margin-bottom: 20px; + + h2 { + font-size: 20px; + color: #333; + margin: 0; + padding-bottom: 10px; + border-bottom: 1px solid #eee; + } + } + + .call-status { + margin-bottom: 20px; + } + + .hangup-btn { + text-align: center; + margin-top: 20px; + } +} +.merge-controls { + background: #f5f7fa; + border-radius: 4px; + margin-left: 20px; } .Followuserinfo { - margin: 20px 10px; + margin: 10px 10px 0 10px; align-items: center; padding: 30px; background: #ffff; border: 1px solid #dcdfe6; - -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), - 0 0 6px 0 rgba(0, 0, 0, 0.04); + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04); + .userinfo-text { font-size: 20px; margin-right: 20px; margin-bottom: 10px; } + .userinfo-value { color: rgb(15, 139, 211); + span { margin-right: 20px; } } } + ::v-deep.el-table .warning-row { background: #c4e2ee; } + .Followuserinfos { - margin: 20px 10px; align-items: center; padding: 30px; background: #ffff; border: 1px solid #dcdfe6; - -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), - 0 0 6px 0 rgba(0, 0, 0, 0.04); + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04); + height: 100%; /* 纭繚楂樺害缁ф壙 */ + min-height: 880px; /* 鏈�灏忛珮搴︿笌闅忚鍐呭涓�鑷� */ + display: flex; + flex-direction: column; + .userinfo-text { font-size: 20px; margin-right: 20px; margin-bottom: 10px; } + .userinfo-value { color: rgb(15, 139, 211); + span { margin-right: 20px; } } + + .el-form { + flex: 1; + overflow-y: auto; /* 鍐呭瓒呰繃楂樺害鏃舵樉绀烘粴鍔ㄦ潯 */ + max-height: calc(880px - 60px); /* 鍑忓幓padding */ + padding-right: 10px; /* 闃叉婊氬姩鏉¢伄鎸″唴瀹� */ + } +} +.append-input-container { + margin-top: 15px; + padding: 10px; + background-color: #f5f7fa; + border-radius: 4px; + border: 1px solid #dcdfe6; } .borderdiv { min-height: 60vh; font-size: 20px; padding: 30px; + .title { font-size: 22px; font-weight: bold; margin-bottom: 20px; text-align: center; } + .leftside { margin: 30px 0; + span { width: 400px; margin-left: 20px; @@ -1728,9 +2045,11 @@ border-radius: 10px; } } + .offside { display: flex; flex-direction: row-reverse; + .offside-value { padding: 10px; background: rgb(217, 173, 253); @@ -1740,8 +2059,15 @@ } } } +.topic-dev[inert] { + opacity: 0.5; + pointer-events: none; +} .CONTENT { padding: 10px; + height: 100%; + min-height: 660px; /* 璁剧疆鏈�灏忛珮搴� */ + .title { font-size: 22px; font-weight: bold; @@ -1749,40 +2075,47 @@ text-align: center; } } + .preview-left { margin: 20px; - // margin: 20px; padding: 30px; - // background: #ffff; border: 1px solid #dcdfe6; - -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), - 0 0 6px 0 rgba(0, 0, 0, 0.04); + box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04); + max-height: 580px; /* 璁剧疆鏈�澶ч珮搴� */ + overflow-y: auto; /* 鍐呭瓒呰繃楂樺害鏃舵樉绀烘粴鍔ㄦ潯 */ + .topic-dev { margin-bottom: 25px; font-size: 20px !important; + .dev-text { margin-bottom: 10px; } } } + .scriptTopic-isabnormal { color: red; } + .detailed { width: 88%; border-radius: 8px; padding: 30px; margin-bottom: 30px; background-color: #ddf0f8; + .bg-purple { margin-bottom: 20px; } + .spanvalue { display: inline-block; min-width: 200px; border-bottom: 1px solid rgb(172, 172, 172); } } + .headline { font-size: 24px; height: 40px; @@ -1790,79 +2123,94 @@ padding-left: 5px; margin-bottom: 10px; display: flex; - // justify-content: space-between; + .Add-details { font-size: 18px; color: #02a7f0; cursor: pointer; } } + .red-star { ::v-deep.el-radio__label { position: relative; - padding-right: 10px; /* 鏍规嵁闇�瑕佽皟鏁� */ + padding-right: 10px; } + ::v-deep.el-radio__label::after { content: "*"; color: red; position: absolute; - right: -5px; /* 鏍规嵁闇�瑕佽皟鏁� */ + right: -5px; top: 0; } + ::v-deep.el-input-group__textarea { - white-space: pre-wrap; /* 淇濇寔绌虹櫧绗﹀簭鍒楀苟姝e父鎹㈣ */ - word-break: break-all; /* 鍦ㄩ暱鍗曡瘝鎴朥RL鍦板潃鍐呴儴杩涜鎹㈣ */ + white-space: pre-wrap; + word-break: break-all; } + ::v-deep.el-checkbox__label { position: relative; - padding-right: 10px; /* 鏍规嵁闇�瑕佽皟鏁� */ + padding-right: 10px; } + ::v-deep.el-checkbox__label::after { content: "*"; color: red; position: absolute; - right: -5px; /* 鏍规嵁闇�瑕佽皟鏁� */ + right: -5px; top: 0; } } + ::v-deep.offside-value .el-radio__label { color: #fff; } + ::v-deep.el-link.el-link--default { color: #02a7f0 !important; } + .el-message-box__btns button:nth-child(2) { margin-left: 10px; background-color: #f57676; border-color: #f57676; } + .el-icon-phone { transition: all 0.3s; } + .el-button[disabled] .el-icon-phone { color: #c0c4cc; } + .el-button:not([disabled]) .el-icon-phone { color: #409eff; } + .el-button:not([disabled]):hover .el-icon-phone { color: #66b1ff; transform: scale(1.1); } + .mulsz { font-size: 25px; margin-top: 20px; } + .el-input.is-disabled .el-input__inner { - background-color: #fff; /* 鑳屾櫙棰滆壊 */ - border-color: #dcdfe6; /* 杈规棰滆壊 */ - color: #080808 !important; /* 鏂囧瓧棰滆壊 */ - cursor: not-allowed; /* 榧犳爣鏍峰紡 */ + background-color: #fff; + border-color: #dcdfe6; + color: #080808 !important; + cursor: not-allowed; } + .el-textarea.is-disabled .el-textarea__inner { - background-color: #fff; /* 鑳屾櫙棰滆壊 */ - border-color: #dcdfe6; /* 杈规棰滆壊 */ - color: #080808 !important; /* 鏂囧瓧棰滆壊 */ - cursor: not-allowed; /* 榧犳爣鏍峰紡 */ + background-color: #fff; + border-color: #dcdfe6; + color: #080808 !important; + cursor: not-allowed; } </style> diff --git a/src/views/followvisit/record/physical/index.vue b/src/views/followvisit/record/physical/index.vue index 77f5cbb..a035698 100644 --- a/src/views/followvisit/record/physical/index.vue +++ b/src/views/followvisit/record/physical/index.vue @@ -713,7 +713,6 @@ const queryParams = { pid: Number(this.patid), allhosp: "0", - pageNum: 1, }; // 鎮h�呭熀纭�淇℃伅 messagelistpatient(queryParams).then((response) => { diff --git a/src/views/followvisit/zbAgain/index.vue b/src/views/followvisit/zbAgain/index.vue index 1a8bbb8..92f8e52 100644 --- a/src/views/followvisit/zbAgain/index.vue +++ b/src/views/followvisit/zbAgain/index.vue @@ -1187,8 +1187,8 @@ }); }, affiliation() { - this.topqueryParams.drcode = store.getters.hisUserId; - this.topqueryParams.nurseId = store.getters.hisUserId; + + this.topqueryParams.managementDoctor = store.getters.hisUserId; this.getList(1); }, onthatday() { diff --git a/src/views/knowledge/questionnaire/compilequer/index.vue b/src/views/knowledge/questionnaire/compilequer/index.vue index bc81908..005f434 100644 --- a/src/views/knowledge/questionnaire/compilequer/index.vue +++ b/src/views/knowledge/questionnaire/compilequer/index.vue @@ -262,7 +262,7 @@ <el-option class="ruleFormaa" v-for="item in flatArray" - :key="item.deptCode" + :key="item.id" :label="item.label" :value="item.deptCode" > @@ -285,7 +285,7 @@ <el-option class="ruleFormaa" v-for="item in flatArray" - :key="item.deptCode" + :key="item.id" :label="item.label" :value="item.deptCode" > @@ -566,10 +566,10 @@ </el-form-item></el-col > <el-col :span="12" - ><el-form-item label="鏄惁鍙敤"> - <el-radio-group v-model="topicobj.isenable"> + ><el-form-item label="鏄惁闅愯棌"> + <el-radio-group v-model="topicobj.ishide"> <el-radio - v-for="(item, index) in usable" + v-for="(item, index) in hides" :label="item.value" >{{ item.label }}</el-radio > @@ -582,8 +582,8 @@ v-if="topicobj.scriptType == 1" > <el-radio-group v-model="topicobj.branchFlag"> - <el-radio :label="1">鏄�</el-radio> - <el-radio :label="0">鍚�</el-radio> + <el-radio label="1">鏄�</el-radio> + <el-radio label="0">鍚�</el-radio> </el-radio-group> </el-form-item> <el-form-item label="閫変腑鎻愮ず" v-if="topicobj.scriptType != 1"> @@ -656,6 +656,12 @@ <el-radio-group v-model="item.isabnormal"> <el-radio :label="1">鏄�</el-radio> <el-radio :label="0">鍚�</el-radio> + </el-radio-group> + </el-form-item> + <el-form-item label="鏄惁閫変腑鏀堕泦闄勫姞淇℃伅"> + <el-radio-group v-model="item.appendflag"> + <el-radio label="1">鏄�</el-radio> + <el-radio label="0">鍚�</el-radio> </el-radio-group> </el-form-item> </el-row> @@ -749,9 +755,7 @@ > <el-button type="primary" @click="laststep()">涓婁竴姝�</el-button> <el-button type="info" @click="closeFm('ruleForm')">鍏抽棴</el-button> - <el-button @click="toExamine('ruleForm')" - >淇濆瓨闂鏁版嵁</el-button - > + <el-button @click="toExamine('ruleForm')">淇濆瓨闂鏁版嵁</el-button> </div> <!-- 闂嵎棰勮 --> <div v-if="Editprogress == 3"> @@ -1215,8 +1219,8 @@ style="width: 100px; height: 100px" :src="item.picturePath" :preview-src-list=" - item.picturePath ? [item.picturePath] : [] - " + item.picturePath ? [item.picturePath] : [] + " > </el-image> </div> @@ -1299,6 +1303,7 @@ svyTemplateLibScripts: [], tempDetpRelevances: [], svyLibTemplateTagList: [], + suitway: [], scoreType: "4", isenable: "0", longTemp: "0", @@ -1404,6 +1409,10 @@ usable: [ { value: "0", label: "鍙敤" }, { value: "1", label: "鍋滅敤" }, + ], + hides: [ + { value: 0, label: "姝e父" }, + { value: 1, label: "闅愯棌" }, ], longtype: [ { value: "0", label: "鏅�氫换鍔�" }, @@ -1622,8 +1631,8 @@ this.confirmillness(); this.putbelongDepts(); this.$modal.closeLoading(); - // this.$router.go(-1); - window.location.reload(); + this.$router.go(-1); + // window.location.reload(); }); } else { this.ruleForm.isoperation = 1; @@ -1643,8 +1652,8 @@ // 棰樼洰鏍¢獙 toExamine() { // 閬嶅巻棰樼洰闆嗗悎 - for (let i = 0; i < this.ruleForm.svyTemplateLibScripts.length; i++) { - const question = this.ruleForm.svyTemplateLibScripts[i]; + for (let i = 0; i < this.ruleForm.svyTemplateLibScripts.length; i++) { + const question = this.ruleForm.svyTemplateLibScripts[i]; // 濡傛灉 scriptType 涓� 4锛屽垯璺宠繃褰撳墠棰樼洰 if (question.scriptType === 4) { @@ -1675,7 +1684,7 @@ // 濡傛灉鎵�鏈夐鐩兘鏍¢獙閫氳繃锛岃繑鍥� true console.log("鎵�鏈夐鐩牎楠岄�氳繃锛岄�夐」鍚嶇О鏃犻噸澶�"); - this.Departmenttreatment(); + this.Departmenttreatment(); }, // 绉戝/闄㈠尯澶勭悊 diff --git a/src/views/patient/patient/outpatient.vue b/src/views/patient/patient/outpatient.vue index 06406f8..9b5729a 100644 --- a/src/views/patient/patient/outpatient.vue +++ b/src/views/patient/patient/outpatient.vue @@ -67,16 +67,16 @@ ></el-cascader> </el-form-item> <el-form-item label="灏辫瘖鏃ユ湡"> - <el-date-picker - v-model="dateRange" - style="width: 240px" - value-format="yyyy-MM-dd" - type="daterange" - range-separator="-" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - ></el-date-picker> - <!-- <el-date-picker + <el-date-picker + v-model="dateRange" + style="width: 240px" + value-format="yyyy-MM-dd" + type="daterange" + range-separator="-" + start-placeholder="寮�濮嬫棩鏈�" + end-placeholder="缁撴潫鏃ユ湡" + ></el-date-picker> + <!-- <el-date-picker v-model="dateRange" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" @@ -85,7 +85,7 @@ :default-time="['12:00:00']" > </el-date-picker> --> - </el-form-item> + </el-form-item> <el-row> <!-- <el-form-item label=" 灏辫瘖鏃ユ湡 " prop="admitdate"> <el-date-picker @@ -150,6 +150,18 @@ @click="handleDelete" v-hasPermi="['system:user:remove']" >鍒犻櫎</el-button + > + </el-col> + <el-col :span="1.5"> + <el-button + type="warning" + plain + icon="el-icon-plus" + size="medium" + :disabled="multiple" + @click="handleBatchAddTask" + > + 鎵归噺娣诲姞浠诲姟</el-button > </el-col> <el-col :span="19"> @@ -228,7 +240,13 @@ <el-button size="medium" type="text" - @click="gettoken360(scope.row.idcardno,scope.row.drcode,scope.row.drname)" + @click=" + gettoken360( + scope.row.idcardno, + scope.row.drcode, + scope.row.drname + ) + " ><span class="button-textsc">{{ scope.row.patname }}</span></el-button @@ -301,7 +319,23 @@ prop="drname" width="120" /> - + <el-table-column + label="鏄惁瀛樺湪浠诲姟" + align="center" + key="serverState" + prop="serverState" + width="100" + > + <template slot-scope="scope"> + <span + :style="{ + color: scope.row.serverState == 1 ? 'green' : 'gray', + }" + > + {{ scope.row.serverState == 1 ? "鏄�" : "鏃�" }} + </span> + </template> + </el-table-column> <el-table-column label="鎿嶄綔" fixed="right" @@ -337,7 +371,113 @@ /> </el-col> </el-row> + <el-dialog + title="鎵归噺娣诲姞浠诲姟" + :visible.sync="batchTaskVisible" + width="90%" + append-to-body + > + <el-row :gutter="20"> + <!-- 宸︿晶锛氶�変腑鎮h�呭垪琛� --> + <el-col :span="12"> + <div class="batch-patient-section"> + <h4>閫変腑鎮h�咃紙{{ selectedPatients.length }}浜猴級</h4> + <el-table + :data="selectedPatients" + border + style="width: 100%" + size="small" + > + <el-table-column prop="patname" label="濮撳悕" width="100" /> + <el-table-column prop="sex" label="鎬у埆" width="80"> + <template slot-scope="scope"> + {{ scope.row.sex === 1 ? "鐢�" : "濂�" }} + </template> + </el-table-column> + <el-table-column + label="灏辫瘖鏃堕棿" + align="center" + key="admitdate" + prop="admitdate" + > + <template slot-scope="scope"> + <span>{{ formatTime(scope.row.admitdate) }}</span> + </template> + </el-table-column> + <el-table-column prop="outhospno" label="鐥呮鍙�" /> + <el-table-column prop="deptname" label="绉戝" /> + </el-table> + </div> + </el-col> + <!-- 鍙充晶锛氫换鍔″垪琛� --> + <el-col :span="12"> + <div class="batch-task-section"> + <h4>浠诲姟鍒楄〃锛堣閫夋嫨1涓换鍔★級</h4> + <el-table + :data="taskList" + border + style="width: 100%" + size="small" + @current-change="handleTaskSelectionChange" + highlight-current-row + > + <el-table-column + label="浠诲姟鍚嶇О" + fixed + align="center" + key="taskName" + prop="taskName" + :show-overflow-tooltip="true" + /> + + <el-table-column + label="鏈嶅姟椤圭洰" + align="center" + key="templatename" + prop="templatename" + :show-overflow-tooltip="true" + /> + + <el-table-column + label="鍒涘缓浜�" + align="center" + key="createBy" + prop="createBy" + :show-overflow-tooltip="true" + /> + <el-table-column + label="鍒涘缓鏃堕棿" + sortable + align="center" + prop="createTime" + > + <template slot-scope="scope"> + <span>{{ formatTime(scope.row.createTime) }}</span> + </template> + </el-table-column> + <template #empty> + <div class="empty-message"> + <i class="el-icon-warning"></i> + <span>鎮h�呯瀹ゆ棤鍖归厤鏈嶅姟</span> + </div> + </template> + </el-table> + </div> + </el-col> + </el-row> + + <!-- 搴曢儴鎸夐挳 --> + <div slot="footer" class="dialog-footer"> + <el-button @click="batchTaskVisible = false">鍙� 娑�</el-button> + <el-button + type="primary" + :loading="batchLoading" + @click="submitBatchTask" + >鍒涘缓浠诲姟</el-button + > + </div> + </el-dialog> <!-- 鐢ㄦ埛瀵煎叆瀵硅瘽妗� --> <el-dialog :title="upload.title" @@ -383,6 +523,7 @@ </div> </el-upload> </div> + <!-- 瀵煎叆妫�鏌� --> <div class="uploading" v-else-if="dractive == 2"> <el-table :data="uploadingData" style="width: 100%"> @@ -446,7 +587,7 @@ import { getToken } from "@/utils/auth"; import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; -import { query360PatInfo } from "@/api/AiCentre/index"; +import { query360PatInfo, getTasklist, addSubtask } from "@/api/AiCentre/index"; import store from "@/store"; @@ -509,6 +650,12 @@ Labelchange: false, //淇敼鏂板寮圭獥 propss: { multiple: true }, optionstag: [], //鏍囩鍒楄〃 + batchTaskVisible: false, // 寮圭獥鍙鎬� + selectedPatients: [], // 閫変腑鐨勬偅鑰呭垪琛� + taskList: [], // 浠诲姟鍒楄〃 + selectedTask: null, // 閫変腑鐨勪换鍔″垪琛� + batchLoading: false, // 鎵归噺鎻愪氦鍔犺浇鐘舵�� + deptcode: "", Patientrange: [ { name: "鍏ㄩ儴", @@ -680,9 +827,9 @@ if (this.dateRange) { this.queryParams.beginTime = this.dateRange[0]; this.queryParams.endTime = this.dateRange[1]; - }else{ - this.queryParams.beginTime = ''; - this.queryParams.endTime = ''; + } else { + this.queryParams.beginTime = ""; + this.queryParams.endTime = ""; } listPatouthosp(this.queryParams).then((response) => { this.userList = response.rows; @@ -737,9 +884,9 @@ this.$modal.msgWarning('360鍔熻兘鏆傛湭寮�閫�'); return; // 闃绘鍚庣画浠g爜鎵ц this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh; - if (this.postData.XiaoXiTou.ZuHuMC=='涓芥按甯備腑鍖婚櫌') { - this.postData.YeWuXX.YongHuXX.YongHuID = '1400398571877961728'; - this.postData.YeWuXX.YongHuXX.YongHuXM = 'LSZYY'; + if (this.postData.XiaoXiTou.ZuHuMC == "涓芥按甯備腑鍖婚櫌") { + this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728"; + this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY"; } query360PatInfo(this.postData).then((res) => { @@ -798,7 +945,7 @@ leaveldeptcodes: [], leavehospitaldistrictcodes: [], }; - this.handleQuery(); + this.handleQuery(); }, // 澶氶�夋閫変腑鏁版嵁 handleSelectionChange(selection) { @@ -915,6 +1062,124 @@ this.upload.open = false; this.dractive = 1; }, + /** 鎵归噺娣诲姞浠诲姟鎸夐挳鐐瑰嚮 */ + handleBatchAddTask() { + // 鏍¢獙鏄惁閫変腑鎮h�� + if (this.ids.length === 0) { + this.$modal.msgWarning("璇疯嚦灏戦�変腑1鍚嶆偅鑰�"); + return; + } + // 妫�鏌ラ�変腑鐨勬偅鑰呬腑鏄惁鏈夊凡鏈変换鍔$殑 + const hasTaskPatients = this.userList.filter( + (item) => this.ids.includes(item.patid) && item.serverState == 1 + ); + + if (hasTaskPatients.length > 0) { + const patientNames = hasTaskPatients.map((p) => p.patname).join("銆�"); + this.$modal.msgError( + `閫変腑鐨勬偅鑰� ${patientNames} 宸叉湁浠诲姟锛屾棤娉曢噸澶嶆坊鍔燻 + ); + return; + } + // 鑾峰彇閫変腑鎮h�呯殑绉戝淇℃伅锛堢敤浜庢牎楠屽悓涓�绉戝锛� + const patientDepts = new Set(); + let deptcode = ""; + this.ids.forEach((patId) => { + const patient = this.userList.find((item) => item.patid === patId); + if (patient) { + patientDepts.add(patient.deptname); + deptcode = patient.deptcode; + } + }); + + // 鏍¢獙鏄惁鍚屼竴绉戝 + if (patientDepts.size > 1) { + this.$modal.msgError("閫変腑鐨勬偅鑰呬笉灞炰簬鍚屼竴绉戝锛屾棤娉曟壒閲忔坊鍔犱换鍔�"); + return; + } + + // 鑾峰彇閫変腑鎮h�呭垪琛� + this.selectedPatients = this.userList.filter((item) => + this.ids.includes(item.patid) + ); + + // 鏄剧ず寮圭獥 + this.batchTaskVisible = true; + + // 鑾峰彇浠诲姟鍒楄〃 + this.loadTaskList(deptcode); + }, + + /** 鍔犺浇浠诲姟鍒楄〃 */ + loadTaskList(deptcode) { + this.batchLoading = true; + let topqueryParams = { + pageNum: 1, + pageSize: 10, + serviceType: 3, + type: 2, + deptcode: deptcode, + }; + getTasklist(topqueryParams).then((response) => { + this.taskList = response.rows; + this.batchLoading = false; + }); + }, + + /** 澶勭悊浠诲姟閫夋嫨鍙樺寲 */ + handleTaskSelectionChange(currentRow) { + this.selectedTask = currentRow; + }, + + // 閲嶅啓鎵归噺鎻愪氦鏂规硶 + async submitBatchTask() { + // 鏍¢獙鏄惁閫変腑浠诲姟 + if (!this.selectedTask) { + this.$modal.msgWarning("璇烽�夋嫨1涓换鍔�"); + return; + } + + this.batchLoading = true; + const successPatients = []; + const failedPatients = []; + + try { + // 閬嶅巻閫変腑鐨勬偅鑰咃紝閫愪釜璋冪敤鎺ュ彛 + for (const patient of this.selectedPatients) { + const params = { + taskId: this.selectedTask.taskId, + taskName: this.selectedTask.taskName, + serviceType: this.selectedTask.serviceType, + ...patient, + age: "", + }; + + try { + await addSubtask(params); + successPatients.push(patient.patname); + } catch (error) { + failedPatients.push(patient.patname); + } + } + + // 鏄剧ず澶勭悊缁撴灉 + let message = `鎴愬姛涓� ${successPatients.length} 鍚嶆偅鑰呮坊鍔犱换鍔; + if (failedPatients.length > 0) { + message += `锛�${failedPatients.length} 鍚嶆偅鑰呮坊鍔犲け璐; + } + this.$modal.msgSuccess(message); + + this.batchTaskVisible = false; + this.getList(); // 鍒锋柊鎮h�呭垪琛� + } catch (error) { + this.$modal.msgError("鎵归噺娣诲姞浠诲姟杩囩▼涓嚭閿�"); + } finally { + this.batchLoading = false; + } + }, + + /** 鎵归噺娣诲姞鎮h�呬换鍔℃帴鍙� */ + batchAddPatientTask(params) {}, }, }; </script> @@ -965,4 +1230,41 @@ .button-textsc { color: #28cfe6; } +.batch-patient-section, +.batch-task-section { + padding: 15px; + border: 1px solid #ebeef5; + border-radius: 4px; + margin-bottom: 15px; +} + +.el-table--enable-row-hover .el-table__body tr:hover > td { + background-color: #f5f7fa; +} +.el-table__body tr.current-row > td { + background-color: #e6f7ff; +} + +/* 绂佺敤鐘舵�佷笅鎸夐挳鏍峰紡 */ +.el-button.is-disabled { + cursor: not-allowed; +} +.batch-patient-section h4, +.batch-task-section h4 { + margin-top: 0; + margin-bottom: 15px; + color: #303133; + font-size: 16px; +} + +/* 琛ㄦ牸鏍峰紡浼樺寲 */ +.el-table { + margin-bottom: 10px; +} + +/* 寮圭獥搴曢儴鎸夐挳闂磋窛 */ +.dialog-footer { + text-align: right; + padding: 10px 20px 20px; +} </style> diff --git a/vue.config.js b/vue.config.js index 382765f..447ffb1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -37,7 +37,7 @@ [process.env.VUE_APP_BASE_API]: { // target: `https://www.health-y.cn/lssf`, // target: `http://10.202.20.185:8095`, - // target: `http://9.208.2.190:8095`, + // target: `http://192.168.100.195:8095`, target:`http://localhost:8095`, // target: `http://192.168.100.193:8095`, // target: `http://192.168.101.166:8093`, -- Gitblit v1.9.3