| | |
| | | <el-table v-if="refreshTable" v-loading="loading" :data="projectList" ref="tableRef" border row-key="proId" |
| | | :expand-row-keys="ListId" :row-class-name="selectSingleRow" |
| | | :tree-props="{ children: 'tjProjectList', hasChildren: 'tjProjectList.length>0', }"> |
| | | <el-table-column label="项目名称" prop="proName" fixed="left" width="150px" :show-overflow-tooltip="true" /> |
| | | <!-- :show-overflow-tooltip="true" --> |
| | | <el-table-column label="项目名称" prop="proName" fixed="left" :width="flexColumnWidth('rwdtypeName')" /> |
| | | <el-table-column label="项目价格(单位/元)" align="center" prop="proPrice" width="75px" |
| | | :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column label="科室名称" align="center" prop="deptName" width="110px" :show-overflow-tooltip="true" /> |
| | | <!-- <el-table-column label="科室名称" align="center" prop="deptName" width="110px" :show-overflow-tooltip="true" /> --> |
| | | <el-table-column label="检查类别" align="center" prop="proCheckType" width="110px" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="默认值" align="center" prop="proDefault" width="110px" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="临床意义" align="center" prop="proMeaning" width="350px" :show-overflow-tooltip="true" /> |
| | | <el-table-column label="检查方式" align="center" prop="proCheckMethod" :show-overflow-tooltip="true" |
| | | width="110px" /> |
| | | <!-- <el-table-column label="检查方式" align="center" prop="proCheckMethod" :show-overflow-tooltip="true" |
| | | width="110px" /> --> |
| | | <el-table-column label="是否空腹" align="center" prop="proCheckMethod" :show-overflow-tooltip="true" width="110px"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.proCheckMethod" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="项目标准值" align="center" prop="proScope" :show-overflow-tooltip="true" width="90px"> |
| | | </el-table-column> |
| | | <el-table-column label="项目类型" align="center" prop="resultType" width="110px" :show-overflow-tooltip="true"> |
| | |
| | | <el-form-item label="临床意义" prop="proMeaning"> |
| | | <el-input v-model="form.proMeaning" placeholder="请输入临床意义" /> |
| | | </el-form-item> |
| | | <el-form-item label="检查方式" prop="proCheckMethod"> |
| | | <el-input v-model="form.proCheckMethod" placeholder="请输入检查方式" /> |
| | | </el-form-item> |
| | | <el-form-item label="空腹" prop="isEat"> |
| | | <el-select v-model="form.isEat" placeholder="请选择是否空腹" style="width: 200px"> |
| | | <el-form-item label="是否空腹" prop="proCheckMethod"> |
| | | <el-select v-model="form.proCheckMethod" placeholder="请选择是否空腹" style="width: 200px"> |
| | | <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="空腹" prop="isEat"> |
| | | <el-select v-model="form.isEat" placeholder="请选择是否空腹" style="width: 200px"> |
| | | <el-option v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> --> |
| | | <el-form-item label="性别" prop="proSex"> |
| | | <el-select v-model="form.proSex" placeholder="请选择体检人性别" style="width: 200px"> |
| | | <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label" |
| | |
| | | </el-form> |
| | | |
| | | <el-table v-loading="loading" ref="tb" :data="sfxmList" @selection-change="handleSelectionChange" border |
| | | height="520px"> |
| | | <el-table-column type="selection" align="center" fixed="left" /> |
| | | <el-table-column label="序号" align="center" prop="newID" |
| | | fixed="left" /> |
| | | <el-table-column label="项目编码" align="center" prop="xmbm" /> |
| | | <el-table-column label="项目名称" align="center" prop="xmmc"/> |
| | | height="520px" style="width: 100%"> |
| | | <el-table-column type="selection" align="center" /> |
| | | <el-table-column label="序号" align="center" prop="newID" /> |
| | | <el-table-column label="项目编码" align="center" prop="xmbm" /> |
| | | <el-table-column label="项目名称" align="center" prop="xmmc" /> |
| | | <el-table-column label="拼音码" align="center" prop="pym" /> |
| | | <!-- <el-table-column label="五笔码" align="center" prop="wbm" /> --> |
| | | <el-table-column label="参考单价" align="center" prop="ckdj" /> |
| | | <el-table-column label="一级最高限价" align="center" prop="yjzgxj" /> |
| | | <el-table-column label="二级最高限价" align="center" prop="ejzgxj" /> |
| | | <el-table-column label="一级最高限价" align="center" prop="yjzgxj" /> |
| | | <el-table-column label="二级最高限价" align="center" prop="ejzgxj" /> |
| | | <el-table-column label="三级最高限价" align="center" prop="sjzgxj" /> |
| | | <el-table-column label="特定最高限价" align="center" prop="tdzgxj" /> |
| | | <el-table-column label="特定最高限价" align="center" prop="tdzgxj" /> |
| | | </el-table> |
| | | |
| | | <div class="pag" v-if="List == true"> |
| | |
| | | dicts: ["sys_normal_disable", "dict_personnel_type", "sys_user_sex", "tj_result_type", "dis_sampling_tab", "sys_dict_specimen", "sys_dict_position", "tj_result_type", "sys_yes_no"], |
| | | components: { Treeselect, IconSelect }, |
| | | data() { |
| | | let checkPhoneNum = (rule, value, callback) => { |
| | | let patter = new RegExp(/^1\s*[3456789]\s*(\d\s*){9}$/); |
| | | if (value == "" && value == undefined && !value) { |
| | | return callback(''); |
| | | } else if (value != undefined && value != "") { |
| | | return callback(); |
| | | } else if (!patter.test(value)) { |
| | | return callback(''); |
| | | } |
| | | }; |
| | | return { |
| | | // 部门树选项 |
| | | deptOptions: undefined, |
| | |
| | | // 表单校验 |
| | | rules: { |
| | | createTime: [ |
| | | { required: true, message: "创建时间不能为空", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | updateTime: [ |
| | | { required: true, message: "修改时间不能为空", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | deleted: [ |
| | | { required: true, message: "删除标记不能为空", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | proName: [ |
| | | { required: true, message: "项目名称不能为空", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | proPrice: [ |
| | | { required: true, message: "项目价格不能为空", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | deptId: [ |
| | | { required: true, message: "科室名称不能为空", trigger: "blur" }, |
| | | { required: true, validator: checkPhoneNum, trigger: "blur" }, |
| | | ], |
| | | // proStandard: [ |
| | | // { required: true, message: "项目标准值不能为空", trigger: "blur" }, |
| | |
| | | |
| | | // 打开input弹框 |
| | | getDetailed() { |
| | | if (this.form.proParentId) { |
| | | if (this.selectList.proName === "主类目") { |
| | | this.dialogTableVisible = false; |
| | | } else { |
| | | this.dialogTableVisible = true; |
| | | this.getlistSfxm() |
| | | } |
| | | }else{ |
| | | |
| | | if (this.form.proParentId == 0) { |
| | | this.dialogTableVisible = false; |
| | | } else if (this.form.proParentId != 0) { |
| | | this.dialogTableVisible = true; |
| | | this.getlistSfxm() |
| | | } else { |
| | | this.$message.error("请选择主项名称"); |
| | | } |
| | | |
| | | |
| | | }, |
| | | |
| | |
| | | /** 查询部门列表 */ |
| | | getDeptList() { |
| | | listDept(this.queryParams).then((response) => { |
| | | console.log(response) |
| | | this.parentNameList = response.data; |
| | | this.deptList = this.handleTree(response.data, "proId"); |
| | | }); |
| | |
| | | let data = { |
| | | deptId: this.queryParams.deptId, |
| | | }; |
| | | this.loading = true |
| | | ProjectTree(data).then((response) => { |
| | | this.projectList = this.handleTree(response.data.list, "proId"); |
| | | this.ListId.push(this.projectList[0].proId) |
| | | this.key = response.data.key |
| | | // if (this.key == "Y") { |
| | | // this.key = response.data.key |
| | | // } else if (response.data.key == "N") { |
| | | // this.key = response.data.key |
| | | // } |
| | | this.loading = false; |
| | | if (response.code == 200) { |
| | | if (response.data.list.length >= 1) { |
| | | this.projectList = this.handleTree(response.data.list, "proId"); |
| | | this.ListId.push(this.projectList[0].proId) |
| | | this.key = response.data.key |
| | | } else { |
| | | this.projectList = [] |
| | | } |
| | | |
| | | |
| | | // if (this.key == "Y") { |
| | | // this.key = response.data.key |
| | | // } else if (response.data.key == "N") { |
| | | // this.key = response.data.key |
| | | // } |
| | | this.loading = false; |
| | | } |
| | | |
| | | }); |
| | | }, |
| | | selectSingleRow({ row, rowIndex }) { |
| | |
| | | this.queryParams.deptId = undefined; |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.handleQuery(); |
| | | }, |
| | | |
| | | |
| | | |
| | | flexColumnWidth(column) { |
| | | if (!column) { |
| | | return; |
| | | } |
| | | let maxlength = 160;//在此处设置默认宽度 |
| | | if (column == 'rwdtypeName') { |
| | | //在此处为了保证表头不换行,可以根据表头名称长度设置默认宽度 |
| | | // column1 就是对应表格中的prop属性值,比如上面的 rwdtypeName |
| | | maxlength = 160; |
| | | } |
| | | for (let i = 0; i < this.projectList.length; i++) { |
| | | if (this.projectList[i][column]) { |
| | | let now_temp = this.projectList[i][column] + ''; |
| | | let flexWidth = 0; |
| | | for (const char of now_temp) { |
| | | if (char >= 'A' && char <= 'Z' || char >= 'a' && char <= 'z') { |
| | | //英文字母 8 像素 |
| | | flexWidth += 8; |
| | | } else if (char >= '\u4e00' && char <= '\u9fa5') { |
| | | //中文文字 15 像素 |
| | | flexWidth += 15; |
| | | } else { |
| | | //其他字符 10 像素 |
| | | flexWidth += 10; |
| | | } |
| | | } |
| | | if (flexWidth > maxlength) { |
| | | maxlength = flexWidth; |
| | | } |
| | | } |
| | | } |
| | | //el-table中 cell 有左右的 padding 个 10 像素 |
| | | return maxlength + 20 + 'px'; |
| | | }, |
| | | |
| | | // 多选框选中数据 |
| | |
| | | const proId = row.proId || this.ids; |
| | | getProject(proId).then((response) => { |
| | | this.form = response.data; |
| | | if (this.form.proParentId === "0") { |
| | | this.showPrise = true; |
| | | this.showRentPrise = false; |
| | | } else { |
| | | this.showPrise = false; |
| | | this.showRentPrise = true; |
| | | } |
| | | this.form.deptId = Number(this.form.deptId) |
| | | if (this.form.proStatus === 0) { |
| | | this.form.proStatus = "启用"; |
| | | } else { |