From 44fe7b7d69118a4d03bed8dadcf9b6bba1416f9d Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期三, 04 九月 2024 18:08:10 +0800 Subject: [PATCH] 测试完成 --- src/views/patient/propaganda/QuestionnaireTask.vue | 259 ++++++++++++++++++++++++++------------------------- 1 files changed, 130 insertions(+), 129 deletions(-) diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue index 0428fb8..1573ba4 100644 --- a/src/views/patient/propaganda/QuestionnaireTask.vue +++ b/src/views/patient/propaganda/QuestionnaireTask.vue @@ -7,14 +7,13 @@ <el-step icon="el-icon-edit" title="鍩虹淇℃伅" - description="閫夋嫨妯$増銆佸舰寮忕瓑鍩虹淇℃伅" + description="閫夋嫨妯℃澘銆佸舰寮忕瓑鍩虹淇℃伅" ></el-step> <el-step icon="el-icon-user" title="浠诲姟涓讳綋" description="鍦ㄦ湰閮ㄩ�夋嫨鏈嶅姟鎮h��" ></el-step> - <el-step icon="el-icon-user" title="妯$増纭"></el-step> </el-steps> </div> </div> @@ -22,7 +21,7 @@ <div class="leftvlue" style="margin: 0 20px"> <!-- 鍩烘湰淇℃伅 --> <div v-if="Editprogress == 1"> - <el-alert title="閫夋嫨妯$増銆佸舰寮忕瓑鍩虹淇℃伅" type="success" effect="dark"> + <el-alert title="閫夋嫨妯℃澘銆佸舰寮忕瓑鍩虹淇℃伅" type="success" effect="dark"> </el-alert> <div class="leftvlue-jbxx"> <!-- 鍩虹淇℃伅 --> @@ -41,23 +40,6 @@ placeholder="璇疯緭鍏ヤ换鍔″悕绉�" /> </el-form-item ></el-col> - <el-col :span="8" - ><el-form-item label="妯$増鍚嶇О"> - <el-input - style="width: 220px" - :disabled="true" - v-model="form.templatename" - placeholder="璇峰湪涓嬪垪閫夋嫨" - /> </el-form-item - ></el-col> - <el-col :span="4"> - <el-button - type="primary" - icon="el-icon-edit" - @click="drawermb = true" - circle - ></el-button> - </el-col> </el-row> <el-form-item label="浠诲姟鎻忚堪"> @@ -67,7 +49,7 @@ placeholder="璇疯緭鍏ヤ换鍔℃弿杩�" /> </el-form-item> - <el-form-item label="鍙戦�佽缃細" v-if="currenttype != 2"> + <el-form-item label="鍙戦�佽缃細"> <el-radio-group v-model="form.sendType"> <el-radio :label="1">鏃堕棿娈靛彂閫�</el-radio> <el-radio :label="3">鏃堕棿鐐瑰彂閫�</el-radio> @@ -168,6 +150,33 @@ > </el-checkbox-group> </el-form-item> + <el-row :gutter="20"> + <el-col :span="10" + ><el-form-item label="妯℃澘鍚嶇О"> + <el-input + style="width: 300px" + :disabled="true" + v-model="form.templatename" + placeholder="璇峰湪涓嬪垪閫夋嫨" + /> </el-form-item + ></el-col> + <el-col :span="4"> + <el-button + type="primary" + icon="el-icon-edit" + @click="drawermb = true" + circle + ></el-button> + + <el-button + v-if="this.form.libtemplateid" + type="success" + icon="el-icon-search" + @click="previewfnmb" + circle + ></el-button> + </el-col> + </el-row> </el-form> </div> </div> @@ -377,7 +386,7 @@ > </span> </el-dialog> - <el-dialog title="妯$増棰勮" :visible.sync="previewtf" width="60%"> + <el-dialog title="妯℃澘棰勮" :visible.sync="previewtf" width="60%"> <div class="preview-left"> <!-- 鍗曢�� --> <div @@ -426,7 +435,7 @@ class="scriptTopic-dev" v-for="item in questionList" :key="item.sort" - v-if="item.scriptType == 3" + v-if="item.scriptType == 4" > <div class="dev-text"> {{ item.sort }}銆乕濉┖]<span>{{ item.scriptContent }}</span> @@ -438,7 +447,7 @@ </div> </div> <span slot="footer" class="dialog-footer"> - <el-button @click="previewGo">鍓嶅線妯$増璇︽儏淇敼</el-button> + <el-button @click="previewGo">鍓嶅線妯℃澘璇︽儏淇敼</el-button> <el-button type="primary" @click="previewFn">纭浣跨敤</el-button> </span> </el-dialog> @@ -462,41 +471,11 @@ v-show="showSearch" label-width="98px" > - <el-form-item - label="瀹f暀涓婚" - v-if="currenttype == 1 || currenttype == 8" - > - <el-input v-model="topqueryParams.name"></el-input> - </el-form-item> - <el-form-item - label="闂嵎鍚嶇О" - v-if="currenttype == 2 || currenttype == 3 || currenttype == 7" - > - <el-input - v-model="topqueryParams.name" - ></el-input> </el-form-item - ><el-form-item - label="閫氱煡鍚嶇О" - v-if="currenttype == 4 || currenttype == 5" - > - <el-input - v-model="topqueryParams.name" - ></el-input> </el-form-item - ><el-form-item label="浣撴濂楅" v-if="currenttype == 5"> - <el-input v-model="topqueryParams.name"></el-input> - </el-form-item> - <el-form-item label="闂嵎涓婚" v-if="currenttype == 6"> - <el-input v-model="topqueryParams.name"></el-input> - </el-form-item> - <el-form-item label="閫傜敤鐤剧梾" v-if="currenttype != 5"> - <el-input v-model="topqueryParams.name"></el-input> + <el-form-item label="闂嵎鍚嶇О"> + <el-input v-model="topqueryParams.svyname"></el-input> </el-form-item> - <el-form-item - label="瀹f暀绫诲瀷" - prop="status" - v-if="currenttype == 1 || currenttype == 8" - > + <!-- <el-form-item label="闂嵎绫诲瀷" prop="status"> <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨"> <el-option v-for="item in taskoptions" @@ -506,52 +485,7 @@ > </el-option> </el-select> - </el-form-item> - <el-form-item - label="閫氱煡绫诲瀷" - prop="status" - v-if="currenttype == 4 || currenttype == 5" - > - <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" - v-if="currenttype == 2 || currenttype == 3 || currenttype == 7" - > - <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" - v-if="currenttype == 6" - > - <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> --> <el-form-item label="閫傜敤褰㈠紡" prop="status"> <el-select v-model="topqueryParams.topica" placeholder="璇烽�夋嫨"> <el-option @@ -564,7 +498,7 @@ </el-select> </el-form-item> - <el-form-item label="閫傜敤绉戝" prop="status"> + <!-- <el-form-item label="閫傜敤绉戝" prop="status"> <el-select v-model="topqueryParams.topicd" placeholder="璇烽�夋嫨"> <el-option v-for="item in topicoptions" @@ -574,13 +508,13 @@ > </el-option> </el-select> - </el-form-item> + </el-form-item> --> <el-form-item> <el-button type="primary" icon="el-icon-search" size="medium" - @click="handleQuery" + @click="handleQuerymb" >鎼滅储</el-button > <el-button @@ -592,7 +526,7 @@ </el-form-item> </el-form> <el-divider></el-divider> - <!-- 閫夋嫨妯$増鍒楄〃 --> + <!-- 閫夋嫨妯℃澘鍒楄〃 --> <SFtable @selectfn="selectfn" :currentList="userList" @@ -641,13 +575,13 @@ title: "瀹f暀鍐呭鍒楄〃", currenttype: 1, //1瀹f暀2闂ㄨ瘖3鍑洪櫌4澶嶈瘖5浣撴6闂嵎 id: "", // - previewid: "", //浠诲姟妯$増浼犻�抜d + previewid: "", //浠诲姟妯℃澘浼犻�抜d libName: "", overallCase: [], //閫夋嫨鎮h�呮�� allpids: [], - libId: null, //妯℃澘搴撴ā鐗坕d + libId: null, //妯℃澘搴撴ā鏉縤d Editprogress: 1, //缂栬緫杩涘害 - drawermb: false, //閫夋嫨妯$増寮圭獥 + drawermb: false, //閫夋嫨妯℃澘寮圭獥 previewtf: false, //棰勮 loading: false, // 閬僵灞� patientloading: false, // 閬僵灞� @@ -658,7 +592,7 @@ questionList: [], // 鎮h�呰〃鍗� tableLabelhz: [ - { label: "搴忓彿", width: "", prop: "patid" }, + // { label: "搴忓彿", width: "", prop: "patid" }, { label: "鎮h�呭悕绉�", width: "", prop: "name" }, { label: "鎬у埆", width: "", prop: "sex" }, { label: "骞撮緞", width: "", prop: "age" }, @@ -725,7 +659,7 @@ // 闈炲涓鐢� multiple: true, // 鐢ㄦ埛琛ㄦ牸鏁版嵁 - userList: [], //妯$増鍒楄〃 + userList: [], //妯℃澘鍒楄〃 multiplechoice: [], //澶氶�夌粨鏋� patientuserList: [], //閫夋嫨鎮h�呭垪琛� sonuserList: [], //閫変腑鎮h�呭垪琛� @@ -795,6 +729,7 @@ }, ], quote: false, + serviceType:null, }; }, components: { SFtable }, @@ -803,10 +738,18 @@ this.id = this.$route.query.id; this.form.type = this.$route.query.type; this.form.typename = this.$route.query.typename; + this.serviceType = Number(this.$route.query.serviceType); this.form.serviceType = Number(this.$route.query.serviceType); this.listDept(); this.Acquisitiontype(); this.Getdetails(); + }, + activated() { + if (this.id != this.$route.query.id) { + this.listDept(); + this.Acquisitiontype(); + this.Getdetails(); + } }, methods: { @@ -858,6 +801,10 @@ { value: "2", label: "绾歌川", + }, + { + value: "5", + label: "寰俊鍏紬鍙�", }, ]; } else if (this.form.serviceType == 6) { @@ -911,8 +858,36 @@ label: "寰俊灏忕▼搴�", }, ]; + } else if (this.form.serviceType == 2 || this.form.serviceType == 3) { + this.checkboxlist = [ + { + value: "1", + label: "浜哄伐", + }, + { + value: "3", + label: "鐢佃瘽", + }, + { + value: "4", + label: "鐭俊", + }, + { + value: "5", + label: "寰俊鍏紬鍙�", + }, + { + value: "6", + label: "寰俊灏忕▼搴�", + }, + + { + value: "8", + label: "鏅鸿兘鏈哄櫒浜�", + }, + ]; } - getQtemplatelist(queryParams).then((response) => { + getQtemplatelist(this.topqueryParams).then((response) => { this.userList = response.rows; this.total = response.total; }); @@ -930,7 +905,6 @@ this.$modal.msgError("璇烽�夋嫨鐥呬汉"); return; } - this.form.hospType = this.currenttype; const filteredArray = this.variableList.filter( (item) => item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃" @@ -945,6 +919,7 @@ 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) { @@ -954,19 +929,19 @@ } this.$router.push({ path: "/followvisit/tasklist", - query: { tasktopic: 6 }, + query: { tasktopic: this.form.serviceType }, }); } }); }, // ----------------------琛ㄦ牸瀛愮粍浠朵簨浠� - // 纭閫夋嫨妯$増鏀惧叆浠诲姟妯$増 + + // 纭閫夋嫨妯℃澘鏀惧叆浠诲姟妯℃澘 selectfn(row, type) { - // 妯$増鎯呭喌涓嬭幏鍙栨ā鐗堜俊鎭� + // 妯℃澘鎯呭喌涓嬭幏鍙栨ā鏉夸俊鎭� if (type == 1) { this.libName = row.svyname; this.libId = row.svyid; - console.log(row, "row"); this.Tasktemplate = row; this.questionList = row.svyTemplateLibScripts; this.previewtf = true; @@ -975,6 +950,19 @@ } else if (type == 2) { } else if (type == 3) { } + }, + // 棰勮 + previewfnmb() { + console.log(this.form); + + getQtemplatelist({ svyid: this.form.libtemplateid }).then((res) => { + if (res.code == 200) { + console.log(); + + this.questionList = res.rows[0].svyTemplateLibScripts; + this.previewtf = true; + } + }); }, // 澶勭悊闂灞傚彉閲� Variablehandling(arr, type) { @@ -1013,7 +1001,6 @@ }); if (this.patientqueryParams.allhosp == 1) { this.tableLabelhz = [ - { label: "搴忓彿", width: "", prop: "patid" }, { label: "鎮h�呭悕绉�", width: "", prop: "name" }, { label: "鎬у埆", width: "", prop: "sex" }, { label: "骞撮緞", width: "", prop: "age" }, @@ -1024,7 +1011,6 @@ ]; } else if (this.patientqueryParams.allhosp == 2) { this.tableLabelhz = [ - { label: "搴忓彿", width: "", prop: "patid" }, { label: "鎮h�呭悕绉�", width: "", prop: "name" }, { label: "鎬у埆", width: "", prop: "sex" }, { label: "骞撮緞", width: "", prop: "age" }, @@ -1065,6 +1051,7 @@ const isExist = this.overallCase.find((obj) => obj.name == item.name); if (!isExist) { item.isoperation = 1; + item.patid = item.id; item.hospType = this.patientqueryParams.allhosp; this.overallCase.push(item); this.form.patTaskRelevances.push(item); @@ -1116,6 +1103,12 @@ this.handleAddpatient(); }, resetQuery() {}, + handleQuerymb() { + getQtemplatelist(this.topqueryParams).then((response) => { + this.userList = response.rows; + this.total = response.total; + }); + }, handleClosehz() { this.dialogVisiblepatient = false; }, @@ -1127,20 +1120,27 @@ resetForm(formName) { this.$refs[formName].resetFields(); }, - // 棰勮妯$増 + // 棰勮妯℃澘 PreviewTemplate() {}, Acknowledgereference() { this.quote = true; }, // 鑾峰彇璇︽儏 Getdetails() { + this.form= { + patTaskRelevances: [], + sendType: 1, + templatename: "", + templateid: null, + libtemplateid: null, + }; + this.questionList=[]; if (this.id) { Questionnairetaskget({ taskid: this.id }).then((res) => { let filteredArray = ""; - console.log(2233); if (res.code == 200) { this.form = res.data; - + this.form.serviceType=this.serviceType; this.form.patTaskRelevances = this.form.patTaskRelevances ? this.form.patTaskRelevances : []; @@ -1263,10 +1263,10 @@ if (this.time3) this.form.showTimeNight = this.time3.join(","); console.log(combinedData, "combinedData"); }, - // 鏌ョ湅妯$増 + // 鏌ョ湅妯℃澘 previewGo() { this.$router.push({ - path: "/knowledge/templateku/configurat/", + path: "/knowledge/tpuconfigurat/", query: { id: this.previewid, task: true, data: this.form }, }); }, @@ -1274,19 +1274,20 @@ let id = this.Tasktemplate.id; this.Tasktemplate.id = null; console.log(this.Tasktemplate); - this.Tasktemplate.svyTemplateLibScripts.svyTaskTemplateTargetoptions = - this.Tasktemplate.svyTemplateLibScripts.svyLibTemplateTargetoptions; + + this.Tasktemplate.svyTemplateLibScripts.forEach((item) => { + item.svyTaskTemplateTargetoptions = item.svyLibTemplateTargetoptions; + }); this.Tasktemplate.svyTaskTemplateScriptVOS = this.Tasktemplate.svyTemplateLibScripts; this.Tasktemplate.templateid = id; this.Tasktemplate.isoperation = 1; TaskQuestioncomit(this.Tasktemplate).then((response) => { - console.log(response); this.previewtf = false; this.form.templateid = response.data; this.form.libtemplateid = this.libId; this.form.templatename = this.libName; - this.$modal.msgSuccess("閫夋嫨妯$増鎴愬姛"); + this.$modal.msgSuccess("閫夋嫨妯℃澘鎴愬姛"); }); }, // 澶勭悊鏈嶅姟褰㈠紡 -- Gitblit v1.9.3