| | |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | label-width="68px" |
| | | @submit.native.prevent |
| | | > |
| | | <el-form-item label="项目名称" prop="proName"> |
| | | <el-input |
| | |
| | | >导出</el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar |
| | | :showSearch.sync="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="4" :xs="24"> |
| | | <div class="head-container"> |
| | | <div class="content"> |
| | | <el-tree |
| | | :data="deptOptions" |
| | | :props="defaultProps" |
| | | :expand-on-click-node="false" |
| | | :filter-node-method="filterNode" |
| | | ref="tree" |
| | | node-key="id" |
| | | default-expand-all |
| | | :default-expanded-keys="treeId" |
| | | highlight-current |
| | | @node-click="handleNodeClick" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | |
| | | <el-col :span="20" :xs="24"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :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" |
| | | /> |
| | | <el-table-column |
| | | label="所属科室" |
| | | align="center" |
| | | prop="deptName" |
| | | width="120px" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <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="advice" |
| | | width="1249px" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="80px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['advice:advice:edit']" |
| | | title="修改" |
| | | ></el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['advice:advice:remove']" |
| | | title="删除" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pag"> |
| | | <div class="pag1"> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | :page.sync="queryParams.page" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-table |
| | | v-loading="loading" |
| | | :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="advice" |
| | | width="1249px" |
| | | :show-overflow-tooltip="true" |
| | | /> |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | fixed="right" |
| | | class-name="small-padding fixed-width" |
| | | width="80px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['advice:advice:edit']" |
| | | title="修改" |
| | | ></el-button> |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['advice:advice:remove']" |
| | | title="删除" |
| | | ></el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pag"> |
| | | <div class="pag1"> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | :page.sync="queryParams.page" |
| | | :limit.sync="queryParams.pageSize" |
| | | @pagination="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 添加或修改advice对话框 --> |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="open" |
| | | width="1000px" |
| | | append-to-body |
| | | > |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| | | <el-form-item label="归属科室" prop="deptId"> |
| | | <!-- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属科室" |
| | | style="width: 200px" /> --> |
| | | <el-select |
| | | v-if="DepartmentList.length > 0" |
| | | v-model="form.deptId" |
| | | placeholder="请选择归属科室" |
| | | clearable |
| | | style="width: 200px" |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="dict in DepartmentList" |
| | | :key="dict.deptId" |
| | | :label="dict.deptName || ''" |
| | | :value="dict.deptId" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="检查项目" prop="proName"> |
| | | <el-select |
| | | v-model="form.proId" |
| | |
| | | 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" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="建议标题" prop="title"> |
| | | <el-input v-model="form.title" placeholder="请输入名称标题" /> |
| | | </el-form-item> |
| | |
| | | > |
| | | 快捷标签 |
| | | </span> |
| | | <el-checkbox-group v-model="form.kjbq"> |
| | | <el-checkbox-group v-model="kjbq" @change="handleCheckedCitiesChange"> |
| | | <el-checkbox |
| | | v-for="(item, index) in dataList" |
| | | :key="index" |
| | |
| | | <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-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"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { deptTreeSelect, getDeptListByDictHospId } from "@/api/system/user"; |
| | | import { |
| | | listAdvice, |
| | | getAdvice, |
| | |
| | | updateAdvice, |
| | | } from "@/api/advice/advice"; |
| | | import { listProject } from "@/api/hosp/project"; |
| | | import { getTjAdviceKjbqByFl,addTjAdviceKjbq } from "@/api/system/biaoqianzidian"; |
| | | import { |
| | | getTjAdviceKjbqByFl, |
| | | addTjAdviceKjbq, |
| | | } from "@/api/system/biaoqianzidian"; |
| | | import { getInfo } from "@/api/login"; |
| | | |
| | | export default { |
| | |
| | | } |
| | | }; |
| | | return { |
| | | DepartmentList: [], |
| | | |
| | | deptOptions: undefined, |
| | | projectList: [], |
| | | // 遮罩层 |
| | | loading: true, |
| | |
| | | // advice表格数据 |
| | | adviceList: [], |
| | | dataList: [], |
| | | kjbq: [], |
| | | // 弹出层标题 |
| | | title: "", |
| | | // 是否显示弹出层 |
| | |
| | | proName: null, |
| | | }, |
| | | // 表单参数 |
| | | form: { |
| | | kjbq:[], |
| | | form: {}, |
| | | formss: {}, |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | treeId: [], |
| | | |
| | | // 表单校验 |
| | | rules: { |
| | | proId: [{ required: true, validator: checkPhoneNum, trigger: "blur" }], |
| | |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | this.getlistProject(); |
| | | this.sendhospName(); |
| | | this.getDeptTree(); |
| | | }, |
| | | watch: { |
| | | // 根据名称筛选部门树 |
| | | |
| | | treeId(newVal, oldVal) { |
| | | if (newVal) { |
| | | this.$nextTick(() => { |
| | | document |
| | | .querySelector(".el-tree-node__children .el-tree-node__content") |
| | | .click(); |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | sendhospName() { |
| | | getDeptListByDictHospId({ |
| | | id: 2000, |
| | | }).then((res) => { |
| | | this.DepartmentList = res.data; |
| | | this.form.deptId = String(this.form.deptId); |
| | | }); |
| | | }, |
| | | // 节点单击事件 |
| | | handleNodeClick(data) { |
| | | // this.queryParams.deptId = data.id; |
| | | this.queryParams.deptId = null;; |
| | | this.handleQuery(); |
| | | }, |
| | | |
| | | // 筛选节点 |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | | }, |
| | | getDeptTree() { |
| | | deptTreeSelect().then((response) => { |
| | | this.deptOptions = response.data; |
| | | this.treeId.push(this.deptOptions[0].id); |
| | | this.queryParams.deptId = this.deptOptions[0].id; |
| | | }); |
| | | }, |
| | | /** 查询advice列表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | // let data ={ |
| | | // proName:this.queryParams.proName, |
| | | // page:this.queryParams.page, |
| | | // pageSize:this.queryParams.pageSize, |
| | | // } |
| | | listAdvice(this.queryParams).then((response) => { |
| | | response.data.list.forEach((item, index) => { |
| | | item.newID = |
| | |
| | | }, |
| | | 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.open = true; |
| | | console.log(this.dataList ) |
| | | } |
| | | }); |
| | | }); |
| | | this.getlistProject(); |
| | | this.form.deptId = this.queryParams.deptId; |
| | | this.open = true; |
| | | }, |
| | | /** 修改按钮操作 */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const id = row.id || this.ids; |
| | | this.kjbq = []; |
| | | getAdvice(id).then((response) => { |
| | | this.form = response.data; |
| | | if (response.data.kjbqz != null) { |
| | | this.kjbq = response.data.kjbqz.map(Number); |
| | | } |
| | | this.getlistProject(); |
| | | this.open = true; |
| | | this.form.deptId = this.queryParams.deptId; |
| | | 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; |
| | |
| | | } |
| | | }); |
| | | }, |
| | | handlekjbq(){ |
| | | handlekjbq() { |
| | | this.kjbqopen = true; |
| | | }, |
| | | |
| | |
| | | .pag1 { |
| | | width: 30%; |
| | | } |
| | | .content { |
| | | width: 1000px; |
| | | height: 1000px; |
| | | } |
| | | .head-container { |
| | | width: 200px; |
| | | height: 629px; |
| | | overflow: auto; |
| | | border: 1px solid #ccc; |
| | | position: relative; |
| | | } |
| | | |
| | | </style> |