From caf5eece759763e96591a786cf9a8eb8f515d5f0 Mon Sep 17 00:00:00 2001
From: WXL (wul) <wl_5969728@163.com>
Date: 星期四, 18 九月 2025 09:38:59 +0800
Subject: [PATCH] Merge branch 'master' of http://116.62.18.175:6699/r/~yxh/smartor-web
---
src/views/followvisit/record/detailpage/index.vue | 235 +++++++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 172 insertions(+), 63 deletions(-)
diff --git a/src/views/followvisit/record/detailpage/index.vue b/src/views/followvisit/record/detailpage/index.vue
index e2ff50a..dfc141d 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,7 +237,22 @@
</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">
@@ -278,7 +317,7 @@
</el-radio-group>
</div>
<div
- v-if="item.showAppendInput"
+ v-if="item.showAppendInput || item.answerps"
class="append-input-container"
>
<el-input
@@ -509,7 +548,7 @@
>淇濆瓨鍩虹淇℃伅</el-button
>
</div>
- <div>
+ <!-- <div>
<el-button
type="primary"
round
@@ -517,7 +556,7 @@
@click="sendAgain()"
>鍐嶆闅忚</el-button
>
- </div>
+ </div> -->
</div>
<el-row>
<el-col :span="14"
@@ -843,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"],
@@ -882,6 +923,9 @@
tableDatatop: [], //棰樼洰琛�
voiceDatatop: [], //棰樼洰琛�
dynamicTags: [],
+ isMergeMode: false,
+ mergeDialogVisible: false,
+ selectedServices: [], // 閫変腑鐨勬湇鍔″垪琛�
zcrules: {
resource: [
{ required: true, message: "璇烽�夋嫨闅忚鏂瑰紡", trigger: "change" },
@@ -1263,55 +1307,56 @@
});
this.Editsingletasksonyic(6);
- this.$modal
- .confirm(
- '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
- this.logsheetlist[0].sendname +
- '"鍐嶆闅忚锛�',
- "纭",
- {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- showCancelButton: true,
- dangerouslyUseHTMLString: true,
- confirmButtonClass: "custom-confirm-button", // 鑷畾涔夌‘璁ゆ寜閽殑绫诲悕
- cancelButtonClass: "custom-cancel-button", // 鑷畾涔夊彇娑堟寜閽殑绫诲悕
- }
- )
- .then(() => {
- document.querySelector("#app").scrollTo(0, 0);
- this.formtidy();
- this.dialogFormVisible = true;
- })
- .catch(() => {
- if (this.form.serviceType == 13) {
- if (this.visitCount != 1) {
- this.$router.push({
- path: "/logisticsservice/zbAgain",
- });
- } else {
- this.$router.push({
- path: "/logisticsservice/record",
- });
- }
- } else if (this.form.serviceType == 2) {
- if (this.visitCount != 1) {
- this.$router.push({
- path: "/logisticsservice/again",
- });
- } else {
- this.$router.push({
- path: "/followvisit/discharge",
- });
- }
- }
- });
+ // this.$modal
+ // .confirm(
+ // '浠诲姟淇濆瓨鎴愬姛鏄惁閽堝鎮h�咃細"' +
+ // this.logsheetlist[0].sendname +
+ // '"鍐嶆闅忚锛�',
+ // "纭",
+ // {
+ // confirmButtonText: "纭畾",
+ // cancelButtonText: "鍙栨秷",
+ // showCancelButton: true,
+ // dangerouslyUseHTMLString: true,
+ // confirmButtonClass: "custom-confirm-button", // 鑷畾涔夌‘璁ゆ寜閽殑绫诲悕
+ // cancelButtonClass: "custom-cancel-button", // 鑷畾涔夊彇娑堟寜閽殑绫诲悕
+ // }
+ // )
+ // .then(() => {
+ // document.querySelector("#app").scrollTo(0, 0);
+ // this.formtidy();
+ // this.dialogFormVisible = true;
+ // })
+ // .catch(() => {
+ // if (this.form.serviceType == 13) {
+ // if (this.visitCount != 1) {
+ // this.$router.push({
+ // path: "/logisticsservice/zbAgain",
+ // });
+ // } else {
+ // this.$router.push({
+ // path: "/logisticsservice/record",
+ // });
+ // }
+ // } else if (this.form.serviceType == 2) {
+ // if (this.visitCount != 1) {
+ // this.$router.push({
+ // path: "/logisticsservice/again",
+ // });
+ // } else {
+ // this.$router.push({
+ // path: "/followvisit/discharge",
+ // });
+ // }
+ // }
+ // });
})
.catch((error) => {
// 濡傛灉鏈変换浣曚竴涓紓姝ユ搷浣滃け璐ワ紝浼氳繘鍏ヨ繖閲�
console.error("鍙戠敓閿欒锛�", error);
});
},
+ // 鐢佃瘽============================
// 楠岃瘉鐢佃瘽鍙风爜鏍煎紡骞惰繑鍥為敊璇俊鎭�
validatePhoneNumber(phone) {
if (!phone) {
@@ -1343,7 +1388,6 @@
};
}
},
-
// 浣跨敤绀轰緥
isValidPhone(phone) {
return this.validatePhoneNumber(phone).isValid;
@@ -1367,7 +1411,6 @@
});
});
},
-
// 澶勭悊閫氳瘽鐘舵�佸彉鍖�
handleCallStatusChange(status) {
console.log(status, "status");
@@ -1389,7 +1432,6 @@
this.$message.error(`鍛煎彨澶辫触: ${status.text}`);
}
},
-
// 缁撴潫褰撳墠閫氳瘽
endCurrentCall() {
if (!this.currentCall) return;
@@ -1490,9 +1532,13 @@
subId: id,
}).then((res) => {
if (res.code == 200) {
+ console.log(11);
+
this.form = res.rows[0].serviceSubtaskList.find(
(item) => item.id == this.id
);
+ console.log(this.form);
+
console.log(this.form.serviceType, "serviceType");
this.logsheetlist = res.rows[0].serviceSubtaskList;
@@ -1597,17 +1643,17 @@
},
aahandleOptionChange(a, b, c) {
const result = c.find((item) => item.optioncontent == a);
- if (result.nextQuestion == 0) {
- this.tableDatatop = this.tableDatatop.reduce((acc, item, i) => {
- acc.push(i > b ? { ...item, astrict: 1 } : item);
- return acc;
- }, []);
- } else {
- this.tableDatatop = this.tableDatatop.reduce((acc, item, i) => {
- acc.push(i > b ? { ...item, astrict: 0 } : item);
- return acc;
- }, []);
- }
+ // if (result.nextQuestion == 0) {
+ // this.tableDatatop = this.tableDatatop.reduce((acc, item, i) => {
+ // acc.push(i > b ? { ...item, astrict: 1 } : item);
+ // return acc;
+ // }, []);
+ // } else {
+ // this.tableDatatop = this.tableDatatop.reduce((acc, item, i) => {
+ // acc.push(i > b ? { ...item, astrict: 0 } : item);
+ // return acc;
+ // }, []);
+ // }
if (this.Voicetype) {
var obj = this.tableDatatop[b].ivrTaskScriptTargetoptionList.find(
(item) => item.optioncontent == a
@@ -1626,6 +1672,11 @@
},
// 鍦╩ethods閮ㄥ垎锛屼慨鏀筯andleOptionChange鏂规硶:
handleOptionChange(selectedOption, questionIndex, options, a) {
+ // 鍒ゆ柇鏄惁璇煶
+ if (this.Voicetype) {
+ this.aahandleOptionChange(selectedOption, questionIndex, options);
+ return;
+ }
if (document.activeElement) {
document.activeElement.blur();
}
@@ -1642,7 +1693,7 @@
this.tableDatatop[questionIndex].showAppendInput =
selectedOptionObj.appendflag == 1;
- console.log(this.tableDatatop);
+ console.log(this.tableDatatop);
// if (!this.tableDatatop[questionIndex].showAppendInput) {
// this.tableDatatop[questionIndex].answerps = ""; // 娓呴櫎闄勫姞淇℃伅
@@ -1793,6 +1844,60 @@
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>
@@ -1852,7 +1957,11 @@
margin-top: 20px;
}
}
-
+.merge-controls {
+ background: #f5f7fa;
+ border-radius: 4px;
+ margin-left: 20px;
+}
.Followuserinfo {
margin: 10px 10px 0 10px;
align-items: center;
--
Gitblit v1.9.3