| | |
| | | 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" |
| | | /> |
| | |
| | | > |
| | | 快捷标签 |
| | | </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 |
| | |
| | | <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"> |
| | |
| | | // advice表格数据 |
| | | adviceList: [], |
| | | dataList: [], |
| | | kjbq:[], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | |
| | | }, |
| | | // 表单参数 |
| | | form: { |
| | | kjbq:[], |
| | | }, |
| | | formss:{ |
| | | |
| | | }, |
| | | // 表单校验 |
| | | rules: { |
| | |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getlistProject(); |
| | | |
| | | }, |
| | | methods: { |
| | | /** 查询advice列表 */ |
| | |
| | | }, |
| | | 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; |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | // 取消按钮 |
| | |
| | | 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) { |
| | |
| | | const id = row.id || this.ids; |
| | | getAdvice(id).then((response) => { |
| | | this.form = response.data; |
| | | this.getlistProject(); |
| | | this.open = true; |
| | | this.title = "体检建议信息维护"; |
| | | }); |
| | |
| | | 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; |