From 88d423ce3a1f624bc3b84b4c71ec06d8024da15b Mon Sep 17 00:00:00 2001
From: WXL <1785969728@qq.com>
Date: 星期六, 07 九月 2024 16:09:25 +0800
Subject: [PATCH] 测试完成
---
src/views/patient/propaganda/QuestionnaireTask.vue | 141 +++++++++++++++++++++-------------------------
1 files changed, 65 insertions(+), 76 deletions(-)
diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue
index e7b0051..1c8b4ea 100644
--- a/src/views/patient/propaganda/QuestionnaireTask.vue
+++ b/src/views/patient/propaganda/QuestionnaireTask.vue
@@ -69,7 +69,7 @@
placeholder="璇疯緭鍏ヤ换鍔℃弿杩�"
/>
</el-form-item>
- <el-form-item label="鏈嶅姟褰㈠紡" prop="taskDesc">
+ <el-form-item label="鏈嶅姟褰㈠紡">
<el-checkbox-group v-model="checkList">
<el-checkbox
v-for="(item, index) in checkboxlist"
@@ -183,7 +183,7 @@
<div class="headline">
<div>浠诲姟浣跨敤妯℃澘</div>
<div style="margin-left: 20px">
- <el-form :model="form">
+ <el-form ref="forms">
<el-form-item label="">
<el-input
style="width: 300px"
@@ -199,7 +199,7 @@
></el-button>
<el-button
- v-if="this.form.libtemplateid"
+ v-if="form.libtemplateid"
type="success"
icon="el-icon-search"
@click="previewfnmb"
@@ -502,18 +502,6 @@
<el-form-item label="闂嵎鍚嶇О">
<el-input v-model="topqueryParams.svyname"></el-input>
</el-form-item>
-
- <!-- <el-form-item label="闂嵎绫诲瀷" prop="status">
- <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in taskoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item> -->
<el-form-item label="閫傜敤褰㈠紡" prop="status">
<el-select v-model="topqueryParams.topica" placeholder="璇烽�夋嫨">
<el-option
@@ -525,18 +513,6 @@
</el-option>
</el-select>
</el-form-item>
-
- <!-- <el-form-item label="閫傜敤绉戝" prop="status">
- <el-select v-model="topqueryParams.topicd" placeholder="璇烽�夋嫨">
- <el-option
- v-for="item in topicoptions"
- :key="item.value"
- :label="item.label"
- :value="item.value"
- >
- </el-option>
- </el-select>
- </el-form-item> -->
<el-form-item>
<el-button
type="primary"
@@ -796,19 +772,17 @@
{ required: true, message: "浠诲姟鍚嶇О涓嶈兘涓虹┖", trigger: "blur" },
{
min: 2,
- max: 20,
- message: "浠诲姟鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 20 涔嬮棿",
+ max: 30,
+ message: "浠诲姟鍚嶇О闀垮害蹇呴』浠嬩簬 2 鍜� 30 涔嬮棿",
trigger: "blur",
},
],
-
taskDesc: [
{ required: true, message: "浠诲姟鎻忚堪涓嶈兘涓虹┖", trigger: "blur" },
],
sendType: [
{ required: true, message: "鍙戦�佽缃笉鑳戒负绌�", trigger: "blur" },
],
- daytime: [{ required: true, message: "姘戞棌涓嶈兘涓虹┖", trigger: "blur" }],
},
quote: false,
serviceType: null,
@@ -975,55 +949,70 @@
});
},
nextstep() {
- if (this.Editprogress <= 3) {
- return this.Editprogress++;
- }
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ if (this.Editprogress <= 3) {
+ return this.Editprogress++;
+ }
+ } else {
+ this.$modal.msgError("琛ㄥ崟鍐呭鏈畬鍠勶紝璇锋鏌�");
+ }
+ });
},
// 淇濆瓨
submitForm(formName) {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.checkList[0]) {
- this.form.preachform = this.checkList.join(",");
- } else {
- this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
- return;
- }
- if (!this.form.patTaskRelevances[0]) {
- this.$modal.msgError("璇烽�夋嫨鐥呬汉");
- return;
- }
- const filteredArray = this.variableList.filter(
- (item) =>
- item.name !== "濮撳悕" &&
- item.name !== "鐢佃瘽" &&
- item.name !== "鍦板潃"
- );
- this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
+ if (this.time4 && this.form.sendType == 3)
+ this.form.showTimeMorn = this.time4;
+ this.form.sendTimeslot = [{
+ begantime: this.time4,
+ endtime: "",
+ xh: 1,
+ }];
+ if (this.checkList[0]) {
+ this.form.preachform = this.checkList.join(",");
+ } else {
+ this.$modal.msgError("璇烽�夋嫨鏈嶅姟绫诲瀷");
+ return;
+ }
+ if (!this.form.patTaskRelevances[0]) {
+ this.$modal.msgError("璇烽�夋嫨鐥呬汉");
+ return;
+ }
+ if (!this.form.templatename) {
+ this.$modal.msgError("鏈�夋嫨妯℃澘");
+ return;
+ }
+ if ((this.form.sendType == 1 && this.time1) || this.form.sendType == 2) {
+ } else if (this.form.sendType == 3 && this.time4) {
+ } else {
+ return this.$modal.msgError("鏃堕棿淇℃伅缂哄け");
+ }
+
+ const filteredArray = this.variableList.filter(
+ (item) =>
+ item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃"
+ );
+ this.form.textParam = this.convertFormat2ToFormat1(filteredArray);
+ if (this.form.taskid) {
+ this.form.isoperation = 2;
+ } else {
+ this.form.isoperation = 1;
+ }
+ if (!this.form.type) {
+ this.form.type = this.$route.query.type;
+ }
+ this.form.serviceType = this.serviceType;
+ Editsingletask(this.form).then((res) => {
+ if (res.code == 200) {
if (this.form.taskid) {
- this.form.isoperation = 2;
+ this.$modal.msgSuccess("鏂板鎴愬姛");
} else {
- this.form.isoperation = 1;
+ this.$modal.msgSuccess("淇敼鎴愬姛");
}
- if (!this.form.type) {
- this.form.type = this.$route.query.type;
- }
- this.form.serviceType = this.serviceType;
- Editsingletask(this.form).then((res) => {
- if (res.code == 200) {
- if (this.form.taskid) {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- } else {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- }
- this.$router.push({
- path: "/followvisit/tasklist",
- query: { tasktopic: this.form.serviceType },
- });
- }
+ this.$router.push({
+ path: "/followvisit/tasklist",
+ query: { tasktopic: this.form.serviceType },
});
- }else{
- this.$modal.msgError("琛ㄥ崟鍐呭鏈畬鍠勶紝璇锋鏌�");
}
});
},
@@ -1239,11 +1228,12 @@
: [];
this.overallCase = this.form.patTaskRelevances.concat();
this.checkList = this.form.preachform.split(",");
- console.log(this.form.showDate, "this.form");
- this.daytime = this.form.showDate.split(",");
+ console.log(this.form, "this.form");
+ if (this.form.showDate)this.daytime = this.form.showDate.split(",");
if (this.form.showTimeMorn) {
if (this.form.sendType == 3) {
this.time4 = this.form.showTimeMorn;
+ console.log(1122);
} else {
this.time1 = this.form.showTimeMorn.split(",");
}
@@ -1354,7 +1344,6 @@
if (this.time1) this.form.showTimeMorn = this.time1.join(",");
if (this.time2) this.form.showTimeNoon = this.time2.join(",");
if (this.time3) this.form.showTimeNight = this.time3.join(",");
- console.log(combinedData, "combinedData");
},
// 鏌ョ湅妯℃澘
previewGo() {
--
Gitblit v1.9.3