新增
@@ -543,6 +672,10 @@ import { mapState } from "vuex";
import Sortable from "sortablejs";
import { getapi, postapi, deletapi } from "@/api/api";
import { examinationgender, instrumentlist } from "@/request/systemapi";
+import {
+ getporjectlists
+} from "@/request/commonapi";
+import { deepCopy,objCopy} from "../../utlis/proFunc";
import {
groupsandlist,
projectlist,
@@ -599,6 +732,7 @@ export default {
isshow: true,
values: [],
projectid: [],
+ initprojectid:[],
rules: {
displayName: [
{ required: true, message: "请输入名称", trigger: "blur" },
@@ -621,7 +755,7 @@ export default {
{ required: true, message: "请选择项目结果", trigger: "blur" },
],
isBeforeEat: [
- { required: true, message: "请选择餐前项目", trigger: "blur" },
+ { required: true, message: "请选择餐前项目", trigger: "change" },
],
clinicalMeaning: [
{ required: true, message: "请输入临床意义", trigger: "blur" },
@@ -674,6 +808,13 @@ export default {
isPictureRotate: "",
isCheck: "",
isActive: "",
+ isActiveBox:true,
+ isBeforeEatBox:false,
+ isCheckBox:false,
+ isContinueProcessBox:false,
+ isDiagnosisFunctionBox:false,
+ isItemResultMergerBox:false,
+ isPictureRotateBox:false
},
forSexId: [], //性别
itemTypeId: [], //项目类别
@@ -783,6 +924,43 @@ export default {
curRow: {},
asbitemdata: [], //组合项目
forsexdata: [], //适用性别
+ department:"",
+ quckDepartment:[],
+ treeprops: {
+ label: "displayName",
+ value: "id",
+ children: "treeChildren",
+ },
+ defaultResult: [
+ {
+ value: "1",
+ label: "未见异常",
+ },
+ {
+ value: "2",
+ label: "正常",
+ },
+ {
+ value: "3",
+ label: "阴性",
+ },
+ {
+ value: "4",
+ label: "无",
+ },
+ {
+ value: "5",
+ label: "(—)",
+ },
+ {
+ value: "6",
+ label: "-",
+ },
+ ],
+ diagnosisFunctionBox:false,
+ diagnosisFunctionText:"",
+ disableddiagnosisFunction:true,
+ initfiletelists:[]
};
},
created() {
@@ -793,8 +971,129 @@ export default {
this.rowDrop();
this.gitfleslist();
this.getobtainguidance();
+ this.typeid()
+ },
+ computed: {
+ ...mapState(["window"]),
},
methods: {
+ remoteMethods(keyWords) {
+ if (keyWords) {
+ this.filetelists = [];
+ this.initfiletelists.forEach(item => {
+ if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ ) {
+ this.filetelists.push(item);
+ }
+ });
+ } else {
+ this.filetelists = deepCopy(this.initfiletelists);
+ }
+ },
+ remoteMethod(keyWords) {
+ if (keyWords) {
+ this.projectid = [];
+ this.initprojectid.forEach(item => {
+ if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ ) {
+ this.projectid.push(item);
+ }
+ });
+ } else {
+ this.projectid = deepCopy(this.initprojectid);
+ }
+ },
+ OnsubmitDiagnosis(){
+ this.form.diagnosisFunction=this.diagnosisFunctionText
+ this.diagnosisFunctionText=''
+ this.diagnosisFunctionBox=false
+ this.$message.success("设置诊断函数成功");
+ },
+ changeBox(type) {
+ //赋值
+ if(this.form[type+'Box']){
+ this.$delete(this.form,type)
+ this.$set(this.form,type,"Y")
+ }else{
+ this.$delete(this.form,type)
+ this.$set(this.form,type,"N")
+ }
+ },
+ typeid() {
+ projectlist().then((res) => {
+ this.itemTypeId = res.data;
+ });
+ },
+ treeclick(data) {
+ getapi(`/api/app/asbitem/in-item-type/${data.id}`).then((res) => {
+ this.tableData = res.data;
+ console.log(res.data, "ress");
+ // this.getlist();
+ });
+ },
+ remoteMethodes(keyWords) {
+ if (keyWords) {
+ this.quckDepartment = [];
+ this.initTableData.forEach(item => {
+ if (item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ // || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
+ ) {
+ this.quckDepartment.push(item);
+ }
+ });
+ } else {
+ this.quckDepartment = deepCopy(this.initTableData);
+ }
+ },
+ quckDepartments(e){
+ if(e){
+ let currentKey=""
+ this.quckDepartment.forEach(item=>{
+ if(e==item.id){
+ currentKey=item.itemTypeId
+ }
+ })
+ this.$refs['itemType'].setCurrentKey(currentKey)
+ let selected = this.$refs['itemType'].getCurrentNode();
+ if (this.$refs['itemType'].getNode(selected) && this.$refs['itemType'].getNode(selected).parent) {
+ this.expandParents(this.$refs['itemType'].getNode(selected).parent);
+ }
+ getapi(`/api/app/asbitem/in-item-type/${currentKey}`).then((res) => {
+ this.tableData = res.data;
+ this.tableData.forEach((item,index)=>{
+ if(e==item.id){
+ this.$refs['tableData'].setCurrentRow(item);
+ this.rowick(item)
+ this.tableScrollToRow(this.$refs.tableData, index)
+ }
+ })
+ });
+ }else{
+ this.remoteMethodes()
+ }
+ },
+ expandParents(node) {
+ node.expanded = true;
+ if (node.parent) {
+ this.expandParents(node.parent);
+ }
+ },
+ tableScrollToRow(tableElement, rowIndex){
+ let theTableRows = tableElement.bodyWrapper.querySelectorAll('.el-table__body tbody .el-table__row')
+ let scrollTop = 0
+ for (let i = 0; i < theTableRows.length; i++) {
+ if (i === rowIndex) {
+ break
+ }
+ scrollTop += theTableRows[i].offsetHeight
+ }
+ tableElement.bodyWrapper.scrollTop = scrollTop
+ },
guiderow(row) {
this.guideform = row;
},
@@ -858,48 +1157,50 @@ export default {
},
//获取项目
gitfleslist() {
- getapi("/api/app/item").then((res) => {
+ let pages={
+ Filter: "",
+ Sorting: "",
+ SkipCount: 0,
+ MaxResultCount: 100
+ }
+ getporjectlists(pages).then((res) => {
this.filetelists = res.data.items;
- console.log(res, "我是项目");
+ this.initfiletelists=[...res.data.items]
});
},
//搜索选择
selectitem(v) {
- // this.itemid = v.id;
- // this.rightdata.forEach((item) => {
- // if (v.id != item.id) {
- // } else {
- // this.rightdata.push({ displayName: v.displayName });
- // }
- // });
- // this.rightdata.push({ displayName: v.displayName });
- console.log(v, "sssssssss");
+ console.log(v)
+ this.itemid = v.id;
+ this.rightdata.forEach((item) => {
+ if (v.id = item.id) {
+ this.$message.warning("已有该项目");
+ } else {
+ this.rightdata.push({ displayName: v.displayName,id:v.id });
+ }
+ });
},
Onsubmit() {
let sampleGroupId = this.form.id;
- console.log(sampleGroupId);
let sdate = [];
- console.log(this.rightdata, "2222");
// let sss = { itemId: this.itemid, asbitemId: sampleGroupId };
// sdate.push(sss);
this.rightdata.forEach((element) => {
- console.log("项目元素id", element.id);
- console.log("组合项目id", sampleGroupId);
- sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
- });
- this.leftdata.forEach((element) => {
sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
});
// this.leftdata.forEach((element) => {
+ // sdate.push({ asbitemId: sampleGroupId, itemId: element.id });
+ // });
+ // this.leftdata.forEach((element) => {
// let sss = { sampleGroupId: sampleGroupId, asbitemId: element.id };
// sdate.push(sss);
// });
// sdate.push(sss);
postapi("/api/app/asbitem-detail/many", sdate).then((res) => {
- if (res.code == 0) {
+ if (res.code!=-1) {
this.$message.success("操作成功");
+ this.isdislob = true;
}
- // this.isdislob = true;
});
// console.log(sdate);
// if (sampleGroupId == undefined) {
@@ -913,19 +1214,62 @@ export default {
// });
// }
},
+ dbClickChoosedAsb(row, column, event){
+ let index = this.leftdata.findIndex((arr) => arr.id == row.id);
+ this.leftdata.splice(index, 1);
+ this.rightdata.push(row);
+ this.isdislob = false;
+ },
+ handleSelectionChange(val){
+ this.ary1=val
+ },
+ addAbs(){
+ if(this.ary1.length<1){
+ this.$message.warning('请选择要添加的项目')
+ }else{
+ let temporaryLeft=[]
+ temporaryLeft = this.leftdata.filter(item => !this.ary1.some(ele=>ele.id === item.id));
+ this.leftdata=[...temporaryLeft]
+ this.ary1.forEach(item=>{
+ this.rightdata.push(item);
+ })
+ this.isdislob = false;
+ }
+ },
+ removeAbs(row){
+ let index = this.rightdata.findIndex((arr) => arr.id == row.id);
+ this.rightdata.splice(index, 1);
+ this.leftdata.push(row);
+ this.isdislob = false;
+ },
+ selecteditems(val){
+ this.ary2=val
+ },
+ delAbs(){
+ if(this.ary2.length<1){
+ this.$message.warning('请选择要移除的项目')
+ }else{
+ let temporaryRight=[]
+ temporaryRight = this.rightdata.filter(item => !this.ary2.some(ele=>ele.id === item.id));
+ this.rightdata=[...temporaryRight]
+ this.ary2.forEach(item=>{
+ this.leftdata.push(item);
+ })
+ this.isdislob = false;
+ }
+ },
//右侧双击移动删除
rightdelite(item, index) {
this.isdislob = false;
- this.rightdata.splice(this.num, 1);
+ this.rightdata.splice(index, 1);
this.leftdata.push(item);
- this.isdislob = false;
- this.updatedate();
+ // this.updatedate();
},
//右侧点击选中
rightindex(item, index) {
this.nums = index;
this.leftobj = item;
- console.log(this.leftobj);
+ // console.log(this.leftobj);
},
//左侧添加按钮
addobj() {
@@ -981,7 +1325,7 @@ export default {
gitprojectcategory() {
getapi("/api/app/item-type/by-code-all").then((res) => {
this.projectid = res.data;
- console.log("res项目类别", res);
+ this.initprojectid=[...res.data]
});
},
//ary1 需要追加的数据 ary2目标数组
@@ -1005,10 +1349,12 @@ export default {
console.log(v);
//`/api/app/diagnosis/in-item-type/${v}`3a0c50b9-9621-61b7-fc93-1cfab1ec0478
- getapi(`/api/app/item/in-item-type/${v}`).then((res) => {
+ if(v){
+ getapi(`/api/app/item/in-item-type/${v}`).then((res) => {
console.log(res);
this.leftdata = res.data;
});
+ }
},
bindidclose() {
this.form = {};
@@ -1020,6 +1366,10 @@ export default {
Sortable.create(tbody, {
handle: ".move",
animation: 300,
+ onChoose({oldIndex}){
+ _this.$refs['tableData'].setCurrentRow(_this.tableData[oldIndex]);
+ _this.rowick(_this.tableData[oldIndex])
+ },
onEnd({ newIndex, oldIndex }) {
_this.isshow = false;
const currRow = _this.tableData.splice(oldIndex, 1)[0];
@@ -1039,7 +1389,7 @@ export default {
cancellation() {
this.$message.info("操作取消");
this.isshow = true;
- this.getlist();
+ this.tableData=this.initTableData
},
//确定排序
assertion() {
@@ -1053,7 +1403,7 @@ export default {
combination({ itemList: result }).then((res) => {
this.$message.success("操作成功");
this.isshow = true;
- this.getlist();
+ // this.getlist();
});
},
//置底
@@ -1063,9 +1413,10 @@ export default {
this.$message.warning("请选择操作的数据");
} else {
samplesetlow(this.form.id, 2).then((res) => {
- console.log(res, "3333");
- this.getlist();
- this.$message.success("操作成功");
+ if(res.code!=-1){
+ this.getlist();
+ this.$message.success("操作成功");
+ }
});
}
},
@@ -1076,8 +1427,10 @@ export default {
this.$message.warning("请选择操作的数据");
} else {
samplesetlow(this.form.id, 1).then((res) => {
- this.$message.success("操作成功");
- this.getlist();
+ if(res.code!=-1){
+ this.$message.success("操作成功");
+ this.getlist();
+ }
});
}
},
@@ -1097,6 +1450,7 @@ export default {
if (res.code == 1) {
this.$message.success("删除成功");
this.getlist();
+ this.form = {};
}
});
});
@@ -1114,9 +1468,48 @@ export default {
} else {
this.dialogVisible = true;
this.title = 2;
+ if (this.$refs.ruleForm !== undefined){
+ this.$refs.ruleForm.resetFields()
+ }
asbitemgetid(this.form.id).then((res) => {
- this.form = res.data;
+ if (res.data.isItemResultMerger == 'Y') {
+ this.form.isItemResultMergerBox = true;
+ } else {
+ this.form.isItemResultMergerBox = false;
+ }
+ if (res.data.isBeforeEat == 'Y') {
+ this.form.isBeforeEatBox = true;
+ } else {
+ this.form.isBeforeEatBox = false;
+ }
+ if (res.data.isDiagnosisFunction == 'Y') {
+ this.form.isDiagnosisFunctionBox = true;
+ } else {
+ this.form.isDiagnosisFunctionBox = false;
+ }
+ if (res.data.isContinueProcess == 'Y') {
+ this.form.isContinueProcessBox = true;
+ } else {
+ this.form.isContinueProcessBox = false;
+ }
+ if (res.data.isPictureRotate == 'Y') {
+ this.form.isPictureRotateBox = true;
+ } else {
+ this.form.isPictureRotateBox = false;
+ }
+ if (res.data.isCheck == 'Y') {
+ this.form.isCheckBox = true;
+ } else {
+ this.form.isCheckBox = false;
+ }
+ if (res.data.isActive == 'Y') {
+ this.form.isActiveBox = true;
+ } else {
+ this.form.isActiveBox = false;
+ }
+ objCopy(res.data, this.form);
});
+ console.log(this.form)
//性别
// examinationgender().then((res) => {
// this.forSexId = res.data;
@@ -1166,10 +1559,11 @@ export default {
isActive: this.form.isActive,
};
newcombination(obj).then((res) => {
- this.$message.success("新增成功");
- this.getlist();
- this.form = {};
- this.dialogVisible = false;
+ if(res.data!=-1){
+ this.$message.success("新增成功");
+ this.getlist();
+ this.dialogVisible = false;
+ }
});
} else if (this.title == 2) {
let obj = {
@@ -1193,9 +1587,16 @@ export default {
isActive: this.form.isActive,
};
updateombination(this.form.id, obj).then((res) => {
- this.$message.success("修改成功");
- this.getlist();
- this.dialogVisible = false;
+ if(res.code!=-1){
+ this.$message.success("修改成功");
+ this.tableData.forEach((item,index)=>{
+ if(res.data.id==item.id){
+ this.$set(this.tableData,index,res.data)
+ }
+ })
+ this.curRow={...res.data}
+ this.dialogVisible = false;
+ }
});
}
}
@@ -1205,10 +1606,14 @@ export default {
addll() {
this.dialogVisible = true;
this.title = 1;
+ if (this.$refs.ruleForm !== undefined){
+ this.$refs.ruleForm.resetFields()
+ }
+ Object.assign(this.$data.form, this.$options.data().form)
+ console.log(this.form)
this.$nextTick(() => {
this.$refs.refinput.focus();
});
-
//性别
examinationgender().then((res) => {
console.log(res);
@@ -1233,25 +1638,25 @@ export default {
this.curRow = { ...res.data };
this.form = res.data;
});
+ this.values=row.itemTypeId
getapi(
`/api/app/asbitem-detail/asbitem-detail-in-item?AsbitemId=${row.id}`
).then((res) => {
- this.rightdata = res.data;
- console.log(res, "右侧");
- let dq = res.data;
- if (dq.length > 0) {
- this.rightdata = [];
- dq.forEach((element) => {
- let bb = { displayName: element.displayName, id: element.id };
- this.rightdata.push(bb);
- });
- }
+ this.rightdata = [...res.data];
+ getapi(`/api/app/item/in-item-type/${row.itemTypeId}`).then((res) => {
+ // this.leftdata = [...res.data];
+ let dq=res.data
+ let bq=[]
+ bq = res.data.filter(item => !this.rightdata.some(ele=>ele.id === item.id));
+ this.leftdata = [...bq];
+ });
});
},
getlist() {
groupsandlist(this.pages).then((res) => {
this.initTableData = [...res.data.items];
this.tableData = res.data.items;
+ this.quckDepartment=res.data.items;
console.log(res);
});
},
@@ -1259,6 +1664,12 @@ export default {
};
diff --git a/src/views/fee-settings/Item.vue b/src/views/fee-settings/Item.vue
index f7aa875..b23f79a 100644
--- a/src/views/fee-settings/Item.vue
+++ b/src/views/fee-settings/Item.vue
@@ -36,7 +36,7 @@
:data="tableData"
style="width: 100%"
row-key="id"
- :height="window.pageHeight < 600 ? 440 : window.pageHeight - 160"
+ :height="window.pageHeight < 600 ? 185 : window.pageHeight - 160"
class="el-table__body-wrapper tbody"
highlight-current-row
@row-click="rowick"
@@ -430,9 +430,12 @@
border=""
:data="reusttableData"
@row-click="reustclick"
+ row-key="id"
highlight-current-row
style="width: 100%"
:height="window.pageHeight < 600 ? 280 : window.pageHeight - 320"
+ ref="reusttableData"
+ class="el-table__body-wrappers tbodys"
>
@@ -444,7 +447,7 @@
-
+
@@ -454,19 +457,47 @@
-
+
-
+
+
+
+
+
+
+
+
- {{ scope.row.lastModifierName}}
+ {{ scope.row.creatorName}}
-
+
+
+
+ {{ scope.row.lastModifierName}}
+
+
{{ scope.row.lastModificationTime | dateFormat }}
@@ -482,6 +513,28 @@
删除
+
+ 置顶
+
+
+ 置底
+
+
+ 排序
+
+
+ 取消
+