From a9d2b856e0f6be6475319c2dc36bf405c2f908fc Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期二, 22 九月 2026 14:04:52 +0800
Subject: [PATCH] 测试完成
---
src/views/followvisit/record/detailpage/index.vue | 160 +++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 137 insertions(+), 23 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index 89f2297..cb7e4ef 100644
--- a/src/views/followvisit/record/detailpage/index.vue
+++ b/src/views/followvisit/record/detailpage/index.vue
@@ -336,7 +336,9 @@
v-if="
(orgname == '鍗楀崕澶у闄勫睘绗竴鍖婚櫌' ||
orgname == '涓芥按甯傜浜屼汉姘戝尰闄�' ||
- orgname == '缂欎簯鍘夸汉姘戝尰闄�') &&
+ orgname == '缂欎簯鍘夸汉姘戝尰闄�' ||
+ orgname == '涓芥按甯傚骞间繚鍋ラ櫌' ||
+ orgname == '鏉鹃槼鍘夸腑鍖诲尰闄�') &&
!Voicetype
"
>
@@ -388,7 +390,7 @@
</span>
</div>
- <div class="preview-left" v-if="!Voicetype">
+ <div class="preview-left" v-if="showQuestionnaireForm">
<div
class="topic-dev"
v-for="(item, index) in tableDatatop"
@@ -599,12 +601,12 @@
</div>
</div>
<el-button
- v-if="Voicetype"
+ v-if="showQuestionnaireForm"
type="primary"
- @click="yuyingetdetail"
+ @click="getdetail"
>淇濆瓨闂嵎璇︽儏</el-button
>
- <el-button v-else type="primary" @click="getdetail"
+ <el-button v-else type="primary" @click="yuyingetdetail"
>淇濆瓨闂嵎璇︽儏</el-button
>
</div>
@@ -704,6 +706,15 @@
v-if="(form.isVisitAgain == 1) & (visitAgain == 2)"
>
鍐嶆闅忚
+ </el-button>
+ <!-- 瓒呮椂鏈嶅姟锛氱鐞嗗憳鍙皢瀹屾垚鏃堕棿鏀逛负搴旈殢璁挎椂闂淬�佺姸鎬佹敼涓哄凡瀹屾垚 -->
+ <el-button
+ type="danger"
+ plain
+ @click="handleTimeoutComplete"
+ v-if="form.sendstate == 7 && isAdmin"
+ >
+ 瓒呮椂鏍囪宸插畬鎴�
</el-button>
</div>
@@ -988,16 +999,29 @@
<div class="collapse-section">
<el-collapse v-model="collapseActive" accordion>
<el-collapse-item title="鎮h�呮。妗堜俊鎭�" name="patient">
- <el-form ref="userform2" :model="userform" label-width="90px" size="small">
+ <el-form
+ ref="userform2"
+ :model="userform"
+ label-width="90px"
+ size="small"
+ >
<el-row :gutter="16">
<el-col :span="12">
<el-form-item label="鎮h�呭鍚�">
- <el-input v-model="userform.name" placeholder="璇疯緭鍏ュ鍚�" maxlength="30"></el-input>
+ <el-input
+ v-model="userform.name"
+ placeholder="璇疯緭鍏ュ鍚�"
+ maxlength="30"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鎬у埆">
- <el-select v-model="userform.sex" placeholder="璇烽�夋嫨" style="width: 100%">
+ <el-select
+ v-model="userform.sex"
+ placeholder="璇烽�夋嫨"
+ style="width: 100%"
+ >
<el-option label="鐢�" :value="1"></el-option>
<el-option label="濂�" :value="2"></el-option>
</el-select>
@@ -1007,53 +1031,78 @@
<el-row :gutter="16">
<el-col :span="12">
<el-form-item label="骞撮緞">
- <el-input v-model="userform.age" placeholder="璇疯緭鍏ュ勾榫�" maxlength="20"></el-input>
+ <el-input
+ v-model="userform.age"
+ placeholder="璇疯緭鍏ュ勾榫�"
+ maxlength="20"
+ ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="鑱旂郴鏂瑰紡">
- <el-input v-model="userform.telcode" placeholder="璇疯緭鍏ヨ仈绯绘柟寮�" maxlength="20"></el-input>
+ <el-input
+ v-model="userform.telcode"
+ placeholder="璇疯緭鍏ヨ仈绯绘柟寮�"
+ maxlength="20"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="24">
<el-form-item label="浜插睘鐢佃瘽">
- <el-input v-model="userform.relativetelcode" placeholder="璇疯緭鍏ヤ翰灞炶仈绯绘柟寮�" maxlength="20"></el-input>
+ <el-input
+ v-model="userform.relativetelcode"
+ placeholder="璇疯緭鍏ヤ翰灞炶仈绯绘柟寮�"
+ maxlength="20"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="24">
<el-form-item label="璇婃柇鍚嶇О">
- <el-input v-model="form.leavediagname" placeholder="璇疯緭鍏ヨ瘖鏂�" maxlength="50"></el-input>
+ <el-input
+ v-model="form.leavediagname"
+ placeholder="璇疯緭鍏ヨ瘖鏂�"
+ maxlength="50"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="24">
<el-form-item label="鍑虹敓鍦�">
- <el-input v-model="userform.birthplace" placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑" maxlength="50"></el-input>
+ <el-input
+ v-model="userform.birthplace"
+ placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑"
+ maxlength="50"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="24">
<el-form-item label="灞呬綇鍦�">
- <el-input v-model="userform.placeOfResidence" placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑" maxlength="50"></el-input>
+ <el-input
+ v-model="userform.placeOfResidence"
+ placeholder="鍥姐�佺渷銆佸湴甯傘�佸尯鍘裤�佽閬撶瓑"
+ maxlength="50"
+ ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-collapse-item>
- <el-collapse-item title="鎶曡瘔寤鸿" name="advice" v-if="orgname=='缂欎簯鍘夸汉姘戝尰闄�'">
+ <el-collapse-item
+ title="鎶曡瘔寤鸿"
+ name="advice"
+ v-if="orgname == '缂欎簯鍘夸汉姘戝尰闄�'"
+ >
<AdviceList :subid="taskid" :taskid="id" :patid="patid" />
</el-collapse-item>
</el-collapse>
</div>
-
-
-
</div>
</div>
</div>
@@ -1657,6 +1706,15 @@
};
return typeMap[this.callStatus];
},
+ // 鏄惁浠ラ棶鍗峰舰寮忓睍绀猴紙闈炶闊虫湇鍔★紝鎴栬闊虫湇鍔′絾鏃犲畬鏁磋闊虫暟鎹渶鎵嬪姩濉姤锛�
+ showQuestionnaireForm() {
+ return !this.Voicetype;
+ },
+ // 鏄惁涓虹鐞嗗憳瑙掕壊
+ isAdmin() {
+ const roles = this.$store.getters.roles || [];
+ return roles.includes("admin") || roles.includes("sysadmin");
+ },
},
created() {
this.taskid = this.$route.query.taskid;
@@ -1991,7 +2049,7 @@
if (res.code == 200) {
this.voiceDatatop = res.data.serviceSubtaskDetails;
this.voice = res.data.voice;
- this.activeName = "yy";
+ this.activeName = this.voice ? "yy" : "wj";
this.taskname = res.data.taskName;
// 闂嵎灞曠ず鏁版嵁澶勭悊
this.tableDatatop = res.data.filteredDetails;
@@ -2026,9 +2084,12 @@
.map((obj) => obj.targetvalue)
.join("&");
}
+ console.log(item.targetvalue, "item.targetvalue");
+
if (item.targetvalue) {
item.scriptResult = item.targetvalue.split("&");
}
+ console.log(item.scriptResult);
});
}
});
@@ -2094,8 +2155,11 @@
this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
this.Editsingletasksonyic(this.serviceStates);
const orgName = localStorage.getItem("orgname");
-
- if (this.form.isVisitAgain != 1 || this.visitAgain == 1) {
+ if (
+ this.form.isVisitAgain != 1 ||
+ orgName == "涓芥按甯備腑鍖婚櫌" ||
+ this.visitAgain == 1
+ ) {
this.Torouter();
return;
}
@@ -2383,7 +2447,7 @@
savequestiondetail(obj).then((res) => {
if (res.code == 200) {
this.$modal.msgSuccess("鏈嶅姟淇濆瓨鎴愬姛");
- // this.Torouter();
+
if (
this.form.isVisitAgain != 1 ||
orgName == "涓芥按甯備腑鍖婚櫌" ||
@@ -2394,6 +2458,7 @@
this.Torouter();
return;
}
+
this.$modal
.confirm(
'浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
@@ -2575,6 +2640,36 @@
}
});
},
+ // 瓒呮椂鏈嶅姟锛氱鐞嗗憳灏嗗畬鎴愭椂闂存敼涓哄簲闅忚鏃堕棿銆佺姸鎬佹敼涓哄凡瀹屾垚
+ handleTimeoutComplete() {
+ this.$modal
+ .confirm(
+ "鏄惁灏嗚瓒呮椂鏈嶅姟鐨勯殢璁垮畬鎴愭椂闂磋皟鏁翠负搴旈殢璁挎椂闂达紝骞跺皢闅忚鐘舵�佹敼涓哄凡瀹屾垚锛�"
+ )
+ .then(() => {
+ getTaskservelist({
+ patid: this.patid,
+ subId: this.id,
+ }).then((res) => {
+ if (res.code == 200) {
+ const objson = res.rows[0].serviceSubtaskList.find(
+ (item) => item.id == this.id
+ );
+ if (objson) {
+ objson.finishtime = objson.visitTime;
+ objson.sendstate = 6;
+ Editsingletaskson(objson).then((res) => {
+ if (res.code) {
+ this.$modal.msgSuccess("鎿嶄綔鎴愬姛");
+ this.getTaskservelist();
+ }
+ });
+ }
+ }
+ });
+ })
+ .catch(() => {});
+ },
alterpatient(sendstate) {
this.Editsingletasksonyic(this.serviceStates);
// alterpatient(this.userform).then((res) => {
@@ -2696,6 +2791,7 @@
// 鍚屾椂閲嶇疆涓庨�夐」鐩稿叧鐨勭姸鎬�
// questionItem.isabnormal = false;
questionItem.showAppendInput = false;
+ questionItem.score = null; // 鍙栨秷閫変腑鍚庢竻绌洪鐩垎鏁�
// 娉ㄦ剰锛氬彇娑堥�変腑鏃讹紝鎴戜滑閫氬父涓嶅笇鏈涜Е鍙戦鐩烦杞�昏緫锛屾墍浠ョ洿鎺ヨ繑鍥�
// 濡傛灉闇�瑕侊紝鍙互鍦ㄨ繖閲屾坊鍔犲彇娑堥�変腑鍚庣殑鐗瑰畾閫昏緫锛屼緥濡傞噸缃鐩簭鍒�
} else {
@@ -2733,6 +2829,9 @@
// 澶勭悊寮傚父鐘舵�侀珮浜�
this.tableDatatop[questionIndex].isabnormal =
selectedOptionObj.isabnormal;
+
+ // 澶勭悊鍒嗘暟锛氭妸閫変腑閫夐」鐨� score 甯﹀埌棰樼洰 score 涓�
+ this.tableDatatop[questionIndex].score = selectedOptionObj.score;
// 澶勭悊闄勫姞杈撳叆妗嗘樉绀�
@@ -2827,6 +2926,10 @@
if (obj.isabnormal) {
this.tableDatatop[index].isabnormal = obj.isabnormal;
}
+ // 鍥炴樉鍗曢�夐鐩垎鏁帮細鎶婂凡閫変腑閫夐」鐨� score 甯﹀埌棰樼洰 score 涓�
+ if (obj.score !== undefined && obj.score !== null) {
+ this.tableDatatop[index].score = obj.score;
+ }
this.$forceUpdate();
}
});
@@ -2898,7 +3001,18 @@
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
},
- updateScore(a, b, c) {},
+ // 澶氶�夛細鎶婇�変腑閫夐」鐨勫垎鏁扮疮鍔犲埌棰樼洰 score 涓�
+ updateScore(selectedValues, questionIndex, question) {
+ const options = question.svyTaskTemplateTargetoptions || [];
+ const score = options.reduce((sum, opt) => {
+ if (selectedValues && selectedValues.includes(opt.optioncontent)) {
+ return sum + (Number(opt.score) || 0);
+ }
+ return sum;
+ }, 0);
+ question.score = score;
+ this.$forceUpdate();
+ },
// 鍚堝苟淇敼鐩稿叧=============================
toggleMergeMode() {
this.isMergeMode = !this.isMergeMode;
--
Gitblit v1.9.3