From efdc0b52f159679437ba4bd150fda32297d915d5 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期五, 26 四月 2024 11:09:22 +0800 Subject: [PATCH] qxtj --- src/views/doctor/checkAll/index.vue | 4 +- src/components/proposal/index.vue | 1 src/components/createproposal/index.vue | 69 ++++++++++++++++++++++------------ src/api/system/biaoqianzidian.js | 12 +++++ 4 files changed, 58 insertions(+), 28 deletions(-) diff --git a/src/api/system/biaoqianzidian.js b/src/api/system/biaoqianzidian.js index db7af16..45e80c6 100644 --- a/src/api/system/biaoqianzidian.js +++ b/src/api/system/biaoqianzidian.js @@ -56,4 +56,14 @@ adviceKjbqId:adviceKjbqId, } }) - } \ No newline at end of file + } + + + // 淇敼浣撴寤鸿蹇嵎鏍囩鍚敤鐘舵�佹帴鍙� +export function addCyTjAdvice(data) { + return request({ + url: '/advice/advice/addCyTjAdvice', + method: 'post', + data:data + }) +} \ No newline at end of file diff --git a/src/components/createproposal/index.vue b/src/components/createproposal/index.vue index 95901fa..b904274 100644 --- a/src/components/createproposal/index.vue +++ b/src/components/createproposal/index.vue @@ -11,8 +11,16 @@ <el-input v-model="propform.title" placeholder="璇疯緭鍏ュ悕绉版爣棰�" /> </el-form-item> <el-form-item label="蹇嵎鏍囩" prop="kjbq"> - <el-checkbox-group v-model="propform.kjbq" @change="handleCheckedCitiesChange"> - <el-checkbox v-for="(item,index) in dataList" :key="index" :label="item.id" >{{ item.kjbq}}</el-checkbox> + <el-checkbox-group + v-model="propform.kjbq" + @change="handleCheckedCitiesChange" + > + <el-checkbox + v-for="(item, index) in dataList" + :key="index" + :label="item.id" + >{{ item.kjbq }}</el-checkbox + > </el-checkbox-group> </el-form-item> <el-form-item label="寤鸿鍐呭" prop="advice"> @@ -34,18 +42,21 @@ </template> <script> -import { getTjAdviceKjbqByFl } from "@/api/system/biaoqianzidian"; +import { + getTjAdviceKjbqByFl, + addCyTjAdvice, +} from "@/api/system/biaoqianzidian"; import { getInfo } from "@/api/login"; export default { name: "createproposal", props: { - dataText: Array, + textarea1: String, }, data() { return { propform: { advice: "", - kjbq:[], + kjbq: [], }, open: false, openone: false, @@ -62,27 +73,22 @@ }, list: [], fList: [], + id: "", }; }, watch: { - dataText(val, newVla) { - this.fList = val; - val.forEach((item) => { - this.propform.advice += item.advice; - }); - if (this.propform.advice) { - this.getList(); - } + + textarea1(val, newVla) { + this.propform.advice = val; }, }, mounted() { - // this.getList() + this.propform.kjbq =[] + this.getList() }, created() { - // if( this.queryParams){ - // this.getList() - // } + this.getList() }, methods: { getList() { @@ -90,22 +96,35 @@ getInfo().then((res) => { this.queryParams.userId = res.user.userId; getTjAdviceKjbqByFl(this.queryParams).then((res) => { - if(res.data){ + if (res.data) { this.dataList = res.data.records; } - + this.loading = false; }); }); }, - handleCheckedCitiesChange(val){ - console.log(val) + handleCheckedCitiesChange(val) { + val.forEach((item) => { + this.checkbox += item; + }); }, handleOk() { - this.open = false; - if (this.list.length != 0) { - this.$emit("event1", this.list); - } + let data = { + title: this.propform.title, + isZj: 1, + kjbq: this.propform.kjbq.toString(), + advice: this.propform.advice, + }; + addCyTjAdvice(data).then((res) => { + if (res.code == 200) { + this.open = false; + } + }); + + // if (this.list.length != 0) { + // this.$emit("event1", this.list); + // } }, }, }; diff --git a/src/components/proposal/index.vue b/src/components/proposal/index.vue index 160259f..0a477ef 100644 --- a/src/components/proposal/index.vue +++ b/src/components/proposal/index.vue @@ -104,6 +104,7 @@ this.queryParams.sex = val.sex; this.queryParams.isZj = val.isZj; if (this.queryParams.sex) { + this.tjproposal ="0" this.getList(); } }, diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue index a97c0b8..7ae9719 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" :dataText="dataText" /> + <createproposal ref="createproposal" :textarea1="textarea1" /> <el-dialog title="甯哥敤寤鸿缁存姢" @@ -1495,7 +1495,7 @@ }); }, proposalChange() { - if (this.dataText.length != 0) { + if (this.textarea1) { this.$refs.createproposal.open = true; this.$refs.createproposal.title = "甯哥敤寤鸿缁存姢"; }else{ -- Gitblit v1.8.0