diff --git a/public/sysConfig.json b/public/sysConfig.json index 236c166..9fd57d7 100644 --- a/public/sysConfig.json +++ b/public/sysConfig.json @@ -1,7 +1,7 @@ { - "apiurl": "http://140.143.162.39:9529", + "apiurl": "http://192.168.2.67:9529", "softName": "神豚体检管理系统", - "pacsApi":"http://140.143.162.39:9529", - "dcmViewers":"http://140.143.162.39:5081", - "pacsApiHttps":"https://app.mzaktj.com:8042", + "pacsApi":"http://192.168.2.74:9529", + "dcmViewers":"https://app.mzaktj.com:4436", + "pacsApiHttps":"https://app.mzaktj.com:8042" } \ No newline at end of file diff --git a/src/views/fee-settings/Device.vue b/src/views/fee-settings/Device.vue index c291d96..5077ad1 100644 --- a/src/views/fee-settings/Device.vue +++ b/src/views/fee-settings/Device.vue @@ -8,23 +8,13 @@
-
+
- +
@@ -32,16 +22,10 @@ class="el-icon-document-remove" v-if="data.parentId == null" > --> - + - {{ node.label }} + {{ node.label }}
@@ -49,89 +33,61 @@
-
+
- + - - + + + + + + - + - + - + @@ -140,46 +96,24 @@
- 新增 + 新增
- 编辑 + 编辑
- 删除 + 删除
- 置顶 + 置顶
- 置底 + 置底
- 排序 + 排序
- 取消 + 取消
@@ -188,127 +122,89 @@ - - + + - + - + - - - - + + + + - - - + + + + + - - - - + + + + + + + + - + + + + + + + + - + - + - + - + - + - + - + - + - + - 取 消 - 确 定 + 取 消 + 确 定
@@ -319,7 +215,7 @@ import Sortable from "sortablejs"; import { mapState } from "vuex"; import { instrumentlist } from "../../request/systemapi"; import { deletapi, getapi, postapi, putapi } from "@/api/api"; -import {dddw } from "../../utlis/proFunc"; +import { dddw } from "../../utlis/proFunc"; export default { data() { return { @@ -327,10 +223,13 @@ export default { dialogVisible: false, title: 1, form: { + id:"", displayName: "", deviceTypeId: "", - deviceProtocolFlag:"", - aeTitle:"" + deviceProtocolFlag: "", + aeTitle: "", + deviceCode:"", + deviceImageType:"0" }, tableData: [], initTableData: [], @@ -343,14 +242,25 @@ export default { value: "id", children: "treeChildren", }, //左侧树形结构需要的数据 - deviceTypeId:"", - deviceProtocolFlag:[{ - id:"0", - displayName:"视频采集图片和导入图片" - },{ - id:"1", - displayName:"dicom" - }] + deviceTypeId: "", + deviceProtocolFlag: [{ + id: "0", + displayName: "视频采集图片和导入图片" + }, { + id: "1", + displayName: "dicom" + }], + deviceImageType: [ + { id: "0", displayName: "非报告图" }, + { id: "1", displayName: "报告图片" }, + ], + rules: { + deviceTypeId: [{ required: true, message: "请填写设备类别", trigger: "blur" }], + displayName: [{ required: true, message: "请填写设备名称", trigger: "blur" }], + deviceProtocolFlag: [{ required: true, message: "请填写设备协议", trigger: "blur" }], + deviceCode: [{ required: true, message: "请填写编码", trigger: "blur" }], + deviceImageType: [{ required: true, message: "请填写图片类别", trigger: "blur" }], + }, }; }, created() { @@ -388,7 +298,7 @@ export default { this.initTableData.forEach((item) => { if ( item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - -1 || + -1 || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1 ) { @@ -414,29 +324,29 @@ export default { }, searchup(data, index) { // if (index > 3) { - const targetTop = this.$refs["tableData"].$el - .querySelectorAll(".el-table__body tr") - [index - 1].getBoundingClientRect().top; - const containerTop = this.$refs["tableData"].$el - .querySelector(".el-table__body") - .getBoundingClientRect().top; - const scrollParent = this.$refs["tableData"].$el.querySelector( - ".el-table__body-wrapper" - ); - scrollParent.scrollTop = targetTop - containerTop; + const targetTop = this.$refs["tableData"].$el + .querySelectorAll(".el-table__body tr") + [index - 1].getBoundingClientRect().top; + const containerTop = this.$refs["tableData"].$el + .querySelector(".el-table__body") + .getBoundingClientRect().top; + const scrollParent = this.$refs["tableData"].$el.querySelector( + ".el-table__body-wrapper" + ); + scrollParent.scrollTop = targetTop - containerTop; // } }, treeclick(data) { this.deviceTypeId = data.id; - postapi("/api/app/Device/GetList",{ - deviceTypeId:this.deviceTypeId + postapi("/api/app/Device/GetList", { + deviceTypeId: this.deviceTypeId }).then((res) => { if (res.code != -1) { - this.initTableData = [...res.data]; + this.initTableData = [...res.data]; this.tableData = res.data; } }); - this.curRow=this.$options.data().curRow + this.curRow = this.$options.data().curRow }, cancellation() { this.$message.info("取消操作"); @@ -501,9 +411,9 @@ export default { if (this.form.id == undefined) { this.$message.warning("请选择操作的数据"); } else { - postapi("/api/app/Device/UpdateManySort",{ - deviceId:this.curRow.id, - sortType:1 + postapi("/api/app/Device/UpdateManySort", { + deviceId: this.curRow.id, + sortType: 1 }).then((res) => { if (res.code != -1) { this.getlist(); @@ -517,9 +427,9 @@ export default { if (this.form.id == undefined) { this.$message.warning("请选择操作的数据"); } else { - postapi("/api/app/Device/UpdateManySort",{ - deviceId:this.curRow.id, - sortType:2 + postapi("/api/app/Device/UpdateManySort", { + deviceId: this.curRow.id, + sortType: 2 }).then((res) => { if (res.code != -1) { this.getlist(); @@ -542,17 +452,17 @@ export default { confirmButtonClass: "commonbutton", }) .then(() => { - postapi("/api/app/Device/Delete",{ - deviceId:this.curRow.id + postapi("/api/app/Device/Delete", { + deviceId: this.curRow.id }).then((res) => { if (res.code != -1) { - this.curRow=this.$options.data().curRow + this.curRow = this.$options.data().curRow this.getlist(); //this.$message.success("删除成功"); } }); }) - .catch(() => {}); + .catch(() => { }); } }, //edlits编辑弹框 @@ -563,8 +473,8 @@ export default { } else { this.title = 2; this.dialogVisible = true; - postapi("/api/app/Device/Get",{ - deviceId:this.form.id + postapi("/api/app/Device/Get", { + deviceId: this.form.id }).then((res) => { if (res.code != -1) { this.form = res.data; @@ -573,21 +483,15 @@ export default { } }, //确定新增或者修改 - addoredit() { - if (this.form.displayName == "") { - this.$message.warning("请输入名称"); - } else if (this.form.deviceTypeId == "") { - this.$message.warning("请选择仪器类别"); - } else if (this.form.deviceProtocolFlag == "") { - this.$message.warning("请选择设备协议"); - }else { - if (this.title == 1) { - postapi("/api/app/Device/Create", { - displayName: this.form.displayName, - deviceTypeId: this.form.deviceTypeId, - deviceProtocolFlag:this.form.deviceProtocolFlag, - aeTitle:this.form.aeTitle - }).then((res) => { + addoredit(formName) { + this.$refs[formName].validate((valid, fields) => { + if (!valid) { + this.$message.warning(fields[Object.keys(fields)[0]][0].message); + return false; + } + + if (this.title == 1) { + postapi("/api/app/Device/Create", this.form).then((res) => { // this.form.displayName = ""; if (res.code != -1) { this.getlist(); @@ -595,13 +499,15 @@ export default { //this.$message.success("新增成功"); } }); - } else if (this.title == 2) { + } else if (this.title == 2) { postapi("/api/app/Device/Update", { - deviceId:this.form.id, + deviceId: this.form.id, displayName: this.form.displayName, deviceTypeId: this.form.deviceTypeId, - deviceProtocolFlag:this.form.deviceProtocolFlag, - aeTitle:this.form.aeTitle + deviceProtocolFlag: this.form.deviceProtocolFlag, + aeTitle: this.form.aeTitle, + deviceCode: this.form.deviceCode, + deviceImageType: this.form.deviceImageType }).then((res) => { if (res.code != -1) { this.getlist(); @@ -609,30 +515,30 @@ export default { //this.$message.success("修改成功"); } }); - } - } + } + }); }, //新增弹框 add() { if (this.deviceTypeId == undefined || this.deviceTypeId == "") { this.$message.warning("请选择仪器类别"); - }else{ - this.dialogVisible = true; - this.title = 1; - this.form=this.$options.data().form - this.form.deviceTypeId = this.deviceTypeId; - this.$nextTick(() => { - this.$refs.refinput.focus(); - }); + } else { + this.dialogVisible = true; + this.title = 1; + this.form = this.$options.data().form + this.form.deviceTypeId = this.deviceTypeId; + this.$nextTick(() => { + this.$refs.refinput.focus(); + }); } }, // getlist() { - postapi("/api/app/Device/GetList",{ - deviceTypeId:this.deviceTypeId + postapi("/api/app/Device/GetList", { + deviceTypeId: this.deviceTypeId }).then((res) => { if (res.code != -1) { - this.initTableData = [...res.data]; + this.initTableData = [...res.data]; this.tableData = res.data; } }); @@ -647,37 +553,46 @@ 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; } + :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; } + .seachinput { width: 250px; margin-right: 110px; } + :deep .seachinput .el-select { width: 100%; } -:deep .el-tree-node>.el-tree-node__children{ + +:deep .el-tree-node>.el-tree-node__children { overflow: visible; }