| | |
| | | adviceKjbqId:adviceKjbqId, |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | // 修改体检建议快捷标签启用状态接口 |
| | | export function addCyTjAdvice(data) { |
| | | return request({ |
| | | url: '/advice/advice/addCyTjAdvice', |
| | | method: 'post', |
| | | data:data |
| | | }) |
| | | } |
| | |
| | | <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"> |
| | |
| | | </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, |
| | |
| | | }, |
| | | 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() { |
| | |
| | | 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); |
| | | // } |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | this.queryParams.sex = val.sex; |
| | | this.queryParams.isZj = val.isZj; |
| | | if (this.queryParams.sex) { |
| | | this.tjproposal ="0" |
| | | this.getList(); |
| | | } |
| | | }, |
| | |
| | | </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="常用建议维护" |
| | |
| | | }); |
| | | }, |
| | | proposalChange() { |
| | | if (this.dataText.length != 0) { |
| | | if (this.textarea1) { |
| | | this.$refs.createproposal.open = true; |
| | | this.$refs.createproposal.title = "常用建议维护"; |
| | | }else{ |