From 1e4a70437b5e2f7bd027ebc4081c22b315da3025 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期五, 26 四月 2024 16:13:58 +0800 Subject: [PATCH] qxtj --- src/views/doctor/checkAll/index.vue | 4 + src/components/createproposal/index.vue | 10 +++-- src/views/advice/advice/index.vue | 63 ++++++++++++++++++------------- 3 files changed, 46 insertions(+), 31 deletions(-) diff --git a/src/components/createproposal/index.vue b/src/components/createproposal/index.vue index 623f6fe..5d9490a 100644 --- a/src/components/createproposal/index.vue +++ b/src/components/createproposal/index.vue @@ -109,15 +109,19 @@ console.log(val, 111); this.propform.advice = val.proParentList; this.isZjs = val.isZj; + if(val.proParentList){ + this.getList(); + } + }, }, mounted() { this.propform.kjbq = []; - this.getList(); + // this.getList(); }, created() { - this.getList(); + // this.getList(); }, methods: { getList() { @@ -163,8 +167,6 @@ }, handleCheckedCitiesChange(val) {}, handleOk() { - console.log(this.isZjs); - if (this.isZjs == 0) { let data = { title: this.propform.title, diff --git a/src/views/advice/advice/index.vue b/src/views/advice/advice/index.vue index 3b9dd6e..19507b8 100644 --- a/src/views/advice/advice/index.vue +++ b/src/views/advice/advice/index.vue @@ -166,8 +166,8 @@ clearable > <el-option - v-for="dict in projectList" - :key="dict.proName" + v-for="(dict,index) in projectList" + :key="index" :label="dict.proName" :value="dict.proId" /> @@ -184,9 +184,9 @@ > 蹇嵎鏍囩 </span> - <el-checkbox-group v-model="form.kjbq"> + <el-checkbox-group v-model="kjbq" @change="handleCheckedCitiesChange"> <el-checkbox - v-for="(item, index) in dataList" + v-for="(item,index) in dataList" :key="index" :label="item.id" >{{ item.kjbq }}</el-checkbox @@ -210,7 +210,7 @@ <el-dialog title="娣诲姞蹇嵎鏍囩" :visible.sync="kjbqopen" width="500px" append-to-body> <el-form ref="form" :model="form" label-width="80px"> <el-form-item label="鍚嶇О" prop="kjbq"> - <el-input v-model="form.kjbq" placeholder="璇疯緭鍏ュ悕绉�" /> + <el-input v-model="formss.kjbq" placeholder="璇疯緭鍏ュ悕绉�" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -264,6 +264,7 @@ // advice琛ㄦ牸鏁版嵁 adviceList: [], dataList: [], + kjbq:[], // 寮瑰嚭灞傛爣棰� title: "", // 鏄惁鏄剧ず寮瑰嚭灞� @@ -277,7 +278,9 @@ }, // 琛ㄥ崟鍙傛暟 form: { - kjbq:[], + }, + formss:{ + }, // 琛ㄥ崟鏍¢獙 rules: { @@ -287,7 +290,7 @@ }, created() { this.getList(); - this.getlistProject(); + }, methods: { /** 鏌ヨadvice鍒楄〃 */ @@ -310,7 +313,23 @@ }, getlistProject() { listProject(this.queryParams).then((response) => { - this.projectList = response.data; + if(response.data){ + this.projectList = response.data; + } + }); + getInfo().then((res) => { + this.formss.userId = res.user.userId; + let data = { + pageNum: 1, + pageSize: 10, + userId: res.user.userId, + qyzt: 0, + }; + getTjAdviceKjbqByFl(data).then((res) => { + if (res.data) { + this.dataList = res.data.records; + } + }); }); }, // 鍙栨秷鎸夐挳 @@ -354,21 +373,9 @@ handleAdd() { this.reset(); this.title = "浣撴寤鸿淇℃伅缁存姢"; - getInfo().then((res) => { - let data = { - pageNum: 1, - pageSize: 10, - userId: res.user.userId, - qyzt: 0, - }; - getTjAdviceKjbqByFl(data).then((res) => { - if (res.data) { - this.dataList = res.data.records; + this.getlistProject(); this.open = true; - console.log(this.dataList ) - } - }); - }); + }, /** 淇敼鎸夐挳鎿嶄綔 */ handleUpdate(row) { @@ -376,6 +383,7 @@ const id = row.id || this.ids; getAdvice(id).then((response) => { this.form = response.data; + this.getlistProject(); this.open = true; this.title = "浣撴寤鸿淇℃伅缁存姢"; }); @@ -384,32 +392,35 @@ this.$refs["form"].validate((valid) => { if (valid) { if (this.form.id != null) { - updateTjAdviceKjbq(this.form).then((response) => { + updateTjAdviceKjbq(this.formss).then((response) => { this.$modal.msgSuccess("淇敼鎴愬姛"); this.kjbqopen = false; - this.getList(); + this.getlistProject(); }); } else { - addTjAdviceKjbq(this.form).then((response) => { + addTjAdviceKjbq(this.formss).then((response) => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.kjbqopen = false; - this.getList(); + this.getlistProject(); }); } } }); }, + handleCheckedCitiesChange(val) {}, /** 鎻愪氦鎸夐挳 */ submitForm() { this.$refs["form"].validate((valid) => { if (valid) { if (this.form.id != null) { + this.form.kjbq = this.kjbq.toString() updateAdvice(this.form).then((response) => { this.$modal.msgSuccess("淇敼鎴愬姛"); this.open = false; this.getList(); }); } else { + this.form.kjbq = this.kjbq.toString() addAdvice(this.form).then((response) => { this.$modal.msgSuccess("鏂板鎴愬姛"); this.open = false; diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue index 5beb0fd..f1043aa 100644 --- a/src/views/doctor/checkAll/index.vue +++ b/src/views/doctor/checkAll/index.vue @@ -1048,7 +1048,7 @@ </el-dialog> <Packages ref="bbb" :baogao="baogao" /> <proposal ref="proposal" :cusobj="cusobj" @event1="eventchange($event)" /> - <createproposal ref="createproposal" :textarea1="textarea1" /> + <createproposal ref="createproposal" :creatobj="creatobj" /> <el-dialog title="甯哥敤寤鸿缁存姢" @@ -1123,6 +1123,7 @@ hosproy: true, remarks: "", remark: "", + creatobj:{}, propdialog: false, proIds: "", cusobj: {}, @@ -1496,6 +1497,7 @@ }, proposalChange() { if (this.textarea1) { + this.creatobj = {proParentList:this.textarea1, isZj: 0} this.$refs.createproposal.open = true; this.$refs.createproposal.title = "甯哥敤寤鸿缁存姢"; }else{ -- Gitblit v1.8.0