From 288e95d673e6b2d8622d5a06f44e5eac264d1603 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Mon, 18 Mar 2024 14:16:34 +0800 Subject: [PATCH] lineModeFlag --- src/components/doctorCheck/CheckItemList.vue | 6 +- src/store/index.js | 5 + src/views/common-settings/ItemType.vue | 412 +++++++++---------- src/views/fee-settings/Item.vue | 24 +- 4 files changed, 217 insertions(+), 230 deletions(-) diff --git a/src/components/doctorCheck/CheckItemList.vue b/src/components/doctorCheck/CheckItemList.vue index a07cfe8..dc5ffc9 100644 --- a/src/components/doctorCheck/CheckItemList.vue +++ b/src/components/doctorCheck/CheckItemList.vue @@ -26,7 +26,7 @@ doctorCheck.RegisterCheckEdit.completeFlag == '2' " :autosize="{ minRows: 1, maxRows: 100 }" - :data-ismultiline="scope.row.isMultiLine" + :data-lineModeFlag="scope.row.lineModeFlag" @input="madeTooltips(scope.$index);computeFun(scope.$index)" v-bind:class="scope.row.class" /> @@ -340,9 +340,9 @@ export default { input.addEventListener('keydown', (event) => { // 如果按下的是回车键 - // console.log('data-ismultiline',input.getAttribute('data-ismultiline')); + // console.log('data-lineModeFlag',input.getAttribute('data-lineModeFlag')); - if (event.keyCode === 13 && input.getAttribute('data-ismultiline') == '0') { + if (event.keyCode === 13 && input.getAttribute('data-lineModeFlag') == '0') { // 阻止回车键的默认行为(换行) event.preventDefault(); // 获取当前输入框的下一个兄弟元素 diff --git a/src/store/index.js b/src/store/index.js index d6548e8..84deeb9 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -257,6 +257,11 @@ export default new Vuex.Store({ { id: "2", displayName: "仅页面节点" }, { id: "3", displayName: "按钮或事件" }, ], + lineModeFlag:[ + { id: "0", displayName: "不换行" }, + { id: "1", displayName: "换行" }, + { id: "2", displayName: "继承项目类别换行属性" }, + ], medicalPackage: [], //所有套餐 customerOrgGroupAll: [], //所有分组,不限单位,不限次数 customerOrg: [], //所有单位,非树结构 diff --git a/src/views/common-settings/ItemType.vue b/src/views/common-settings/ItemType.vue index 15a0929..53684a5 100644 --- a/src/views/common-settings/ItemType.vue +++ b/src/views/common-settings/ItemType.vue @@ -2,204 +2,114 @@
- 常用设置 / - 项目类别 + 常用设置 / + 项目类别
-
-
- - -
- - - - - {{ node.label }} -
-
-
-
+ + + {{ node.label }} +
+ +
- -
- -
- 新增项目类别 -
-
- 新增同级 -
-
- 新增子级 -
-
- 编辑 -
-
- 删除
+ +
+ +
+ 新增项目类别 +
+
+ 新增同级
+
+ 新增子级 +
+
+ 编辑 +
+
+ 删除 +
+
- - 上级部门 - - - - - - - - + + 上级部门 + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 取 消 - 确 定 - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 取 消 + 确 定 +
@@ -214,6 +124,7 @@ import { import { basicsetings, physicalexaminationlist } from "@/request/systemapi"; import { getapi } from "@/api/api"; import { mapState } from "vuex"; +import { objCopy } from "@/utlis/proFunc"; export default { data() { return { @@ -277,18 +188,21 @@ export default { tableHeight: window.innerHeight - 180, //表格动态高度 screenHeight: window.innerHeight, //内容区域高度 form: { + id:'', displayName: "", parentId: "", isMergeAsbitem: "", checkTypeFlag: "", guidTypeId: "", medicalReportTypeId: "", + lineModeFlag: '0', // 是否换行 + lineModeFlagBox: false, // 是否换行box }, value: "", //指引类别选择的数据 dialogVisible: false, guideoptions: [], - row:{}, - isshow:true + row: {}, + isshow: true }; }, created() { @@ -301,32 +215,68 @@ export default { ...mapState(["window"]), }, methods: { + // 将 Box值 转成 数据库数据值 + boxToVal(type) { + // console.log('this.form',this.form) + let val = 'N' + switch (type) { + case 'lineModeFlag': + if (this.form[type + 'Box']) { + val = '1'; + } else { + val = '0'; + } + break; + default: + //赋值 + if (this.form[type + 'Box']) val = 'Y' + break; + } + this.form[type] = val + }, + + // 将 数据库数据值 转成 Box值 + valToBox(type){ + let boxVal = false + switch (type) { + case 'lineModeFlag': + if(this.form[type] == '1') boxVal = true + break; + default: + if(this.form[type] == 'Y') boxVal = true + break; + } + this.form[type + 'Box'] = boxVal + }, + cascaderchang(v) { this.departmentname = v[v.length - 1]; }, + //编辑弹框 rena() { - let id=this.row.id + let id = this.row.id let a = this.$refs.tree.getNode(id).parent.data.displayName; this.departmentname = a; this.title = 2; this.dialogVisible = true; if (this.$refs.ruleForm !== undefined) { - this.$refs.ruleForm.resetFields(); + this.$refs.ruleForm.resetFields(); } basicsetings().then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.guideoptions = res.data.items; } }); physicalexaminationlist().then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.medicalReportType = res.data.items; } }); projecttype(id).then((res) => { - if(res.code!=-1){ - this.form = res.data; + if (res.code != -1) { + objCopy(res.data,this.form) + this.valToBox('lineModeFlag') // 将 数据库数据值 转成 Box值 } }); // getapi(`/api/app/item/in-item-type/${data.id}`).then((res) => { @@ -336,7 +286,7 @@ export default { //获取项目类别数据结构数据 getapi(`/api/app/itemtype/getbycodeparent?ItemTypeId=${id}`).then( (res) => { - if(res.code!=-1){ + if (res.code != -1) { this.itemtypedata = res.data; } } @@ -344,25 +294,25 @@ export default { }, // 删除 deleates() { - let id=this.row.id + let id = this.row.id this.$confirm("是否删除, 是否继续?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning", - cancelButtonClass:"difference", - confirmButtonClass:"commonbutton" + cancelButtonClass: "difference", + confirmButtonClass: "commonbutton" }).then(() => { projecteditid(id).then((res) => { if (res.code != -1) { this.$message.success("删除成功"); this.getlist(); - this.isshow=true + this.isshow = true } }); }) - .catch(()=>{ - this.$message("取消成功"); - }) + .catch(() => { + this.$message("取消成功"); + }) }, append() { // this.form = {}; @@ -370,21 +320,22 @@ export default { // this.form.parentId = data.id; // } Object.assign(this.$data.form, this.$options.data().form); + this.form.parentId = this.row.id; this.dialogVisible = true; if (this.$refs.ruleForm !== undefined) { - this.$refs.ruleForm.resetFields(); + this.$refs.ruleForm.resetFields(); } this.$nextTick(() => { this.$refs.refinput.focus(); }); basicsetings().then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.guideoptions = res.data.items; } }); physicalexaminationlist().then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.medicalReportType = res.data.items; } }); @@ -394,22 +345,22 @@ export default { // this.form = {}; // this.form.parentId = data.parentId; Object.assign(this.$data.form, this.$options.data().form); - this.form.parentId=this.row.parentId + this.form.parentId = this.row.parentId this.dialogVisible = true; this.title = 1; if (this.$refs.ruleForm !== undefined) { - this.$refs.ruleForm.resetFields(); + this.$refs.ruleForm.resetFields(); } this.$nextTick(() => { this.$refs.refinput.focus(); }); basicsetings().then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.guideoptions = res.data.items; } }); physicalexaminationlist().then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.medicalReportType = res.data.items; } }); @@ -426,12 +377,13 @@ export default { checkTypeFlag: this.form.checkTypeFlag, guidTypeId: this.form.guidTypeId, medicalReportTypeId: this.form.medicalReportTypeId, + lineModeFlag: this.form.lineModeFlag }).then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.$message.success("新增成功"); - this.getlist(); - this.dialogVisible = false; - this.isshow=true + this.getlist(); + this.dialogVisible = false; + this.isshow = true } }); } else { @@ -442,12 +394,13 @@ export default { checkTypeFlag: this.form.checkTypeFlag, guidTypeId: this.form.guidTypeId, medicalReportTypeId: this.form.medicalReportTypeId, + lineModeFlag: this.form.lineModeFlag }).then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.$message.success("新增成功"); - this.getlist(); - this.dialogVisible = false; - this.isshow=true + this.getlist(); + this.dialogVisible = false; + this.isshow = true } }); } @@ -461,13 +414,13 @@ export default { checkTypeFlag: this.form.checkTypeFlag, guidTypeId: this.form.guidTypeId, medicalReportTypeId: this.form.medicalReportTypeId, - isMultiLine:this.form.isMultiLine + lineModeFlag: this.form.lineModeFlag }).then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.$message.success("修改成功"); - this.getlist(); - this.dialogVisible = false; - this.isshow=true + this.getlist(); + this.dialogVisible = false; + this.isshow = true } }); } @@ -476,12 +429,12 @@ export default { }, // 点击获取每一列 treeclick(row) { - this.row=row - this.isshow=false + this.row = row + this.isshow = false }, getlist() { projectlist(this.pages).then((res) => { - if(res.code!=-1){ + if (res.code != -1) { this.tableData = res.data; } }); @@ -496,30 +449,37 @@ export default { @import "../../assets/css/global_form.css"; @import "../../assets/css/global_input.css"; @import "../../assets/css/global.css"; + .box { display: flex; flex-direction: column; } + .layeredleftright { width: 100%; display: flex; flex-direction: column; } + :deep .el-form-item { margin-bottom: 14px; } + /* el-dialog的头部样式 */ :deep .el-dialog__header { padding: 11px 20px 11px; } + /* el-dialog的主体样式 */ :deep .el-dialog__body { padding: 0px 20px 0px; } + /* el-divider样式 */ :deep .el-divider--horizontal { margin: 0px 0 12px; } + /* el-dialog的底部样式 */ :deep .el-dialog__footer { padding: 0px 20px 14px; diff --git a/src/views/fee-settings/Item.vue b/src/views/fee-settings/Item.vue index ea4891e..9fbdacf 100644 --- a/src/views/fee-settings/Item.vue +++ b/src/views/fee-settings/Item.vue @@ -632,6 +632,27 @@ + + + + + + + + + + +