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 | 168 +++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 119 insertions(+), 49 deletions(-) diff --git a/src/views/patient/propaganda/QuestionnaireTask.vue b/src/views/patient/propaganda/QuestionnaireTask.vue index 3297f8f..1573ba4 100644 --- a/src/views/patient/propaganda/QuestionnaireTask.vue +++ b/src/views/patient/propaganda/QuestionnaireTask.vue @@ -7,7 +7,7 @@ <el-step icon="el-icon-edit" title="鍩虹淇℃伅" - description="閫夋嫨妯$増銆佸舰寮忕瓑鍩虹淇℃伅" + description="閫夋嫨妯℃澘銆佸舰寮忕瓑鍩虹淇℃伅" ></el-step> <el-step icon="el-icon-user" @@ -21,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"> <!-- 鍩虹淇℃伅 --> @@ -40,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="浠诲姟鎻忚堪"> @@ -167,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> @@ -376,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 @@ -437,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,17 +472,10 @@ label-width="98px" > <el-form-item label="闂嵎鍚嶇О"> - <el-input - v-model="topqueryParams.name" - ></el-input> </el-form-item - ><el-form-item label="閫氱煡鍚嶇О"> - <el-input v-model="topqueryParams.name"></el-input> - </el-form-item> - <el-form-item label="闂嵎涓婚"> - <el-input v-model="topqueryParams.name"></el-input> + <el-input v-model="topqueryParams.svyname"></el-input> </el-form-item> - <el-form-item label="闂嵎绫诲瀷" prop="status"> + <!-- <el-form-item label="闂嵎绫诲瀷" prop="status"> <el-select v-model="topqueryParams.topic" placeholder="璇烽�夋嫨"> <el-option v-for="item in taskoptions" @@ -482,7 +485,7 @@ > </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 @@ -495,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" @@ -505,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 @@ -523,7 +526,7 @@ </el-form-item> </el-form> <el-divider></el-divider> - <!-- 閫夋嫨妯$増鍒楄〃 --> + <!-- 閫夋嫨妯℃澘鍒楄〃 --> <SFtable @selectfn="selectfn" :currentList="userList" @@ -572,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, // 閬僵灞� @@ -656,7 +659,7 @@ // 闈炲涓鐢� multiple: true, // 鐢ㄦ埛琛ㄦ牸鏁版嵁 - userList: [], //妯$増鍒楄〃 + userList: [], //妯℃澘鍒楄〃 multiplechoice: [], //澶氶�夌粨鏋� patientuserList: [], //閫夋嫨鎮h�呭垪琛� sonuserList: [], //閫変腑鎮h�呭垪琛� @@ -726,6 +729,7 @@ }, ], quote: false, + serviceType:null, }; }, components: { SFtable }, @@ -734,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: { @@ -789,6 +801,10 @@ { value: "2", label: "绾歌川", + }, + { + value: "5", + label: "寰俊鍏紬鍙�", }, ]; } else if (this.form.serviceType == 6) { @@ -842,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; }); @@ -875,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) { @@ -890,13 +935,13 @@ }); }, // ----------------------琛ㄦ牸瀛愮粍浠朵簨浠� - // 纭閫夋嫨妯$増鏀惧叆浠诲姟妯$増 + + // 纭閫夋嫨妯℃澘鏀惧叆浠诲姟妯℃澘 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; @@ -905,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) { @@ -1045,6 +1103,12 @@ this.handleAddpatient(); }, resetQuery() {}, + handleQuerymb() { + getQtemplatelist(this.topqueryParams).then((response) => { + this.userList = response.rows; + this.total = response.total; + }); + }, handleClosehz() { this.dialogVisiblepatient = false; }, @@ -1056,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 : []; @@ -1192,7 +1263,7 @@ if (this.time3) this.form.showTimeNight = this.time3.join(","); console.log(combinedData, "combinedData"); }, - // 鏌ョ湅妯$増 + // 鏌ョ湅妯℃澘 previewGo() { this.$router.push({ path: "/knowledge/tpuconfigurat/", @@ -1212,12 +1283,11 @@ 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