| | |
| | | :data="adviceList" |
| | | @selection-change="handleSelectionChange" |
| | | border |
| | | |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" fixed /> |
| | | <el-table-column label="序号" align="center" prop="newID" width="55px" fixed /> |
| | | <el-table-column label="所选项目" align="center" prop="proName" width="120px" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="标题" align="center" prop="title" width="120px" :show-overflow-tooltip="true" /> |
| | | <el-table-column |
| | | label="序号" |
| | | align="center" |
| | | prop="newID" |
| | | width="55px" |
| | | fixed |
| | | /> |
| | | <el-table-column |
| | | label="所选项目" |
| | | align="center" |
| | | prop="proName" |
| | | width="120px" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="标题" |
| | | align="center" |
| | | prop="title" |
| | | width="120px" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="建议" |
| | | align="center" |
| | |
| | | <el-form-item label="建议标题" prop="title"> |
| | | <el-input v-model="form.title" placeholder="请输入名称标题" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="快捷标签" prop="kjbq"> |
| | | <span |
| | | slot="label" |
| | | style="display: inline-block; border-bottom: 2px solid blue" |
| | | @click="handlekjbq" |
| | | > |
| | | 快捷标签 |
| | | </span> |
| | | <el-checkbox-group v-model="form.kjbq"> |
| | | <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"> |
| | | <el-input |
| | | type="textarea" |
| | |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitForm">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | <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-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFormbgq">确 定</el-button> |
| | | <el-button @click="cancel">取 消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | |
| | | updateAdvice, |
| | | } from "@/api/advice/advice"; |
| | | import { listProject } from "@/api/hosp/project"; |
| | | import { getTjAdviceKjbqByFl,addTjAdviceKjbq } from "@/api/system/biaoqianzidian"; |
| | | import { getInfo } from "@/api/login"; |
| | | |
| | | export default { |
| | | name: "Advice", |
| | | data() { |
| | | let checkPhoneNum = (rule, value, callback) => { |
| | | console.log( value) |
| | | console.log(value); |
| | | let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); |
| | | if (value == "" && value == undefined && !value) { |
| | | return callback(''); |
| | | return callback(""); |
| | | } else if(value != undefined && value != ""){ |
| | | return callback(); |
| | | }else if (!patter.test(value)) { |
| | | return callback(''); |
| | | return callback(""); |
| | | } |
| | | }; |
| | | return { |
| | |
| | | total: 0, |
| | | // advice表格数据 |
| | | adviceList: [], |
| | | dataList: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | | open: false, |
| | | kjbqopen: false, |
| | | // 查询参数 |
| | | queryParams: { |
| | | page: 1, |
| | |
| | | proName: null, |
| | | }, |
| | | // 表单参数 |
| | | form: {}, |
| | | form: { |
| | | kjbq:[], |
| | | }, |
| | | // 表单校验 |
| | | rules: { |
| | | proId: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], |
| | |
| | | // pageSize:this.queryParams.pageSize, |
| | | // } |
| | | listAdvice(this.queryParams).then((response) => { |
| | | response.data.list.forEach((item, index) => {item.newID =(this.queryParams.page - 1) * this.queryParams.pageSize +index +1; |
| | | response.data.list.forEach((item, index) => { |
| | | item.newID = |
| | | (this.queryParams.page - 1) * this.queryParams.pageSize + index + 1; |
| | | }); |
| | | this.adviceList = response.data.list; |
| | | this.total = response.data.total; |
| | | this.loading = false; |
| | | }); |
| | | |
| | | }, |
| | | getlistProject(){ |
| | | listProject(this.queryParams).then((response) => { |
| | |
| | | // 取消按钮 |
| | | cancel() { |
| | | this.open = false; |
| | | this.kjbqopen = false; |
| | | this.reset(); |
| | | }, |
| | | // 表单重置 |
| | |
| | | /** 新增按钮操作 */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.open = true; |
| | | 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.open = true; |
| | | console.log(this.dataList ) |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "体检建议信息维护"; |
| | | }); |
| | | }, |
| | | submitFormbgq() { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.id != null) { |
| | | updateTjAdviceKjbq(this.form).then((response) => { |
| | | this.$modal.msgSuccess("修改成功"); |
| | | this.kjbqopen = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addTjAdviceKjbq(this.form).then((response) => { |
| | | this.$modal.msgSuccess("新增成功"); |
| | | this.kjbqopen = false; |
| | | this.getList(); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | /** 提交按钮 */ |
| | |
| | | } |
| | | }); |
| | | }, |
| | | handlekjbq(){ |
| | | this.kjbqopen = true; |
| | | }, |
| | | |
| | | /** 删除按钮操作 */ |
| | | handleDelete(row) { |
| | | const ids = row.id || this.ids; |