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 | 446 +++++++++++++++++++++++++------------------------------ 1 files changed, 206 insertions(+), 240 deletions(-) diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue index 2a871f3..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> @@ -162,10 +144,39 @@ <el-checkbox v-for="(item, index) in checkboxlist" :key="index" - :label="item" - ></el-checkbox> + :label="item.value" + > + {{ item.label }}</el-checkbox + > </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> @@ -220,7 +231,6 @@ }}</el-button> <el-button @click="resetForm('ruleForm')">閲嶇疆</el-button> </div> - <!-- 浠诲姟璇︽儏 --> <div v-if="Editprogress == 2"> <el-alert title="鍦ㄦ湰闃舵閫夋嫨瀹f暀鐥呬汉" type="success" effect="dark"> @@ -233,88 +243,6 @@ <div class="examine-jic"> <div class="jic-value"> <el-row :gutter="20"> - <!--鐢ㄦ埛鏁版嵁--> - <!-- <el-form - :model="topqueryParams" - ref="queryForm" - size="small" - :inline="true" - v-show="showSearch" - label-width="98px" - > - <el-form-item label="鎮h�呭悕绉�"> - <el-input v-model="topqueryParams.name"></el-input> - </el-form-item> - - <el-form-item label="鎮h�呰寖鍥�" 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="鎮h�呯姸鎬�" prop="status"> - <el-select - v-model="topqueryParams.topic" - 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 label="闂嵎缁撴灉" prop="status"> - <el-select - v-model="topqueryParams.topic" - 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 label="鎮h�呯數璇�"> - <el-input v-model="topqueryParams.name"></el-input> - </el-form-item> - <el-form-item> - <el-button - type="primary" - icon="el-icon-search" - size="medium" - @click="handleQuery" - >鎼滅储</el-button - > - <el-button - icon="el-icon-refresh" - size="medium" - @click="resetQuery" - >閲嶇疆</el-button - > - <el-button - icon="el-icon-upload2" - size="medium" - type="warning" - >褰撳墠鎮h�呬竴閿彂閫�</el-button - > - </el-form-item> - </el-form> - <el-divider></el-divider> --> <el-row :gutter="10" class="mb8"> <el-col :span="1.5"> <el-select @@ -408,29 +336,11 @@ label-width="98px" > <el-form-item label="鎮h�呭悕绉帮細"> - <el-input v-model="patientqueryParams.name"></el-input> + <el-input + v-model="patientqueryParams.name" + @keyup.enter.native="handleQuery" + ></el-input> </el-form-item> - - <!-- <el-form-item label="灏辫瘖绉戝" prop="status"> - <el-select - v-model="patientqueryParams.topic" - placeholder="璇烽�夋嫨" - > - <el-option-group - v-for="group in topicoptions[0].children" - :key="group.deptName" - :label="group.deptName" - > - <el-option - v-for="item in group.children" - :key="item.deptId" - :label="item.deptName" - :value="item.deptId" - > - </el-option> - </el-option-group> - </el-select> - </el-form-item> --> <el-form-item> <el-button @@ -476,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 @@ -525,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> @@ -537,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> @@ -561,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" @@ -605,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 @@ -663,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" @@ -673,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 @@ -691,7 +526,7 @@ </el-form-item> </el-form> <el-divider></el-divider> - <!-- 閫夋嫨妯$増鍒楄〃 --> + <!-- 閫夋嫨妯℃澘鍒楄〃 --> <SFtable @selectfn="selectfn" :currentList="userList" @@ -740,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, // 閬僵灞� @@ -757,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" }, @@ -824,7 +659,7 @@ // 闈炲涓鐢� multiple: true, // 鐢ㄦ埛琛ㄦ牸鏁版嵁 - userList: [], //妯$増鍒楄〃 + userList: [], //妯℃澘鍒楄〃 multiplechoice: [], //澶氶�夌粨鏋� patientuserList: [], //閫夋嫨鎮h�呭垪琛� sonuserList: [], //閫変腑鎮h�呭垪琛� @@ -894,6 +729,7 @@ }, ], quote: false, + serviceType:null, }; }, components: { SFtable }, @@ -902,9 +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: { @@ -946,8 +791,103 @@ this.currenttype = this.$route.query.type; this.title = "闂嵎鍐呭鍒楄〃"; this.tableLabel = this.tableLabelwj; - this.checkboxlist = ["鐭俊", "寰俊", "浜哄伐鐢佃瘽", "鏅鸿兘鏈哄櫒浜�"]; - getQtemplatelist(queryParams).then((response) => { + if (this.form.serviceType == 1) { + this.checkboxlist = [ + { + value: "1", + label: "浜哄伐", + }, + + { + value: "2", + label: "绾歌川", + }, + { + value: "5", + label: "寰俊鍏紬鍙�", + }, + ]; + } else if (this.form.serviceType == 6) { + this.checkboxlist = [ + { + value: "3", + label: "鐢佃瘽", + }, + { + value: "4", + label: "鐭俊", + }, + { + value: "5", + label: "寰俊鍏紬鍙�", + }, + { + value: "6", + label: "寰俊灏忕▼搴�", + }, + + { + value: "8", + label: "鏅鸿兘鏈哄櫒浜�", + }, + ]; + } else if (this.form.serviceType == 7) { + this.checkboxlist = [ + { + value: "1", + label: "浜哄伐", + }, + { + value: "2", + label: "绾歌川", + }, + { + value: "3", + label: "鐢佃瘽", + }, + { + value: "4", + label: "鐭俊", + }, + { + value: "5", + label: "寰俊鍏紬鍙�", + }, + { + value: "6", + 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(this.topqueryParams).then((response) => { this.userList = response.rows; this.total = response.total; }); @@ -959,13 +899,12 @@ }, // 淇濆瓨 submitForm(formName) { - // this.form.preachform = this.checkList.join(","); - this.formatFn(1); + this.form.preachform = this.checkList.join(","); + if (!this.form.patTaskRelevances[0]) { this.$modal.msgError("璇烽�夋嫨鐥呬汉"); return; } - this.form.hospType = this.currenttype; const filteredArray = this.variableList.filter( (item) => item.name !== "濮撳悕" && item.name !== "鐢佃瘽" && item.name !== "鍦板潃" @@ -980,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) { @@ -989,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; @@ -1010,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) { @@ -1048,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" }, @@ -1059,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" }, @@ -1100,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); @@ -1151,6 +1103,12 @@ this.handleAddpatient(); }, resetQuery() {}, + handleQuerymb() { + getQtemplatelist(this.topqueryParams).then((response) => { + this.userList = response.rows; + this.total = response.total; + }); + }, handleClosehz() { this.dialogVisiblepatient = false; }, @@ -1162,25 +1120,32 @@ 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 : []; this.overallCase = this.form.patTaskRelevances.concat(); - this.formatFn(2); + this.checkList = this.form.preachform.split(","); console.log(this.form.showDate, "this.form"); this.daytime = this.form.showDate.split(","); if (this.form.showTimeMorn) { @@ -1298,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 }, }); }, @@ -1309,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