diff --git a/src/views/fee-settings/Asbitem.vue b/src/views/fee-settings/Asbitem.vue index e2e22b7..0540600 100644 --- a/src/views/fee-settings/Asbitem.vue +++ b/src/views/fee-settings/Asbitem.vue @@ -3,10 +3,10 @@
组合项目
-
+
- +
-
+
-
+
@@ -83,10 +84,10 @@ - +
- 项目类别 - 搜索选择 + 搜索选择
{{ item.displayName }}
--> - - + +
- +
-
+
添加
-
+
移除
- +
- - + +
-
- 确定 - 取消 -
- + - + + - + + - + + +
创建新增
删除
+
+ 保存 +
@@ -264,7 +293,7 @@ - + + + @@ -280,16 +318,17 @@ - + - + - + - + @@ -588,12 +627,11 @@ - + @@ -615,7 +653,7 @@ - + @@ -626,7 +664,7 @@ -
+
新增
取消
+
+ 确定项目 +
+
+ 取消项目 +
@@ -672,11 +716,9 @@ 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 { + getporjectlists, groupsandlist, projectlist, invoicetypelist, @@ -723,7 +765,9 @@ export default { }, //指引信息的数据对象 organizationUnitdata: [], //体检中心 guidetitledialogVisible: false, - guidanceinformationdata: [], + formdata:{ + guidanceinformationdata: [] + }, activeName: "first", isdislob: true, filetelists: [], @@ -792,22 +836,22 @@ export default { form: { displayName: "", shortName: "", - forSexId: "", + forSexId: "U", itemTypeId: "", - price: "", - deviceTypeId: "", + price: "0", + deviceTypeId: null, invoiceItemTypeId: "", - isItemResultMerger: "", - isBeforeEat: "", + isItemResultMerger: "N", + isBeforeEat: "N", clinicalMeaning: "", - defaultResult: "", - queueTime: "", - isDiagnosisFunction: "", + defaultResult: "未见异常", + queueTime: "0", + isDiagnosisFunction: "N", diagnosisFunction: "", - isContinueProcess: "", - isPictureRotate: "", - isCheck: "", - isActive: "", + isContinueProcess: "N", + isPictureRotate: "N", + isCheck: "N", + isActive: "Y", isActiveBox:true, isBeforeEatBox:false, isCheckBox:false, @@ -960,23 +1004,53 @@ export default { diagnosisFunctionBox:false, diagnosisFunctionText:"", disableddiagnosisFunction:true, - initfiletelists:[] + initfiletelists:[], + initItemTypeId:"", + guidelinesRules:{ + organizationUnitId: [ + { required: true, message: "请选择体检中心", trigger: "change" }, + ], + forSexId: [ + { required: true, message: "请选择性别", trigger: "change" }, + ], + guide: [ + { required: true, message: "请输入指引信息", trigger: "blur" }, + ] + } }; }, created() { - this.getlist(); + // this.getlist(); this.gitprojectcategory(); }, mounted() { this.rowDrop(); this.gitfleslist(); - this.getobtainguidance(); this.typeid() }, computed: { ...mapState(["window"]), }, methods: { + removeAsbItem(row){ + this.ary2=[row] + }, + chooseAsbItem(row){ + this.ary1=[row] + }, + changeUpdate(e){ + this.$delete(this.form,'displayName') + this.$set(this.form,'displayName',e) + }, + projectCancellation(){ + if(this.form.id==undefined || this.form.id==""){ + this.$message.warning('请选择组合项目') + this.isdislob=true + }else{ + this.rowick(this.form) + this.isdislob=true + } + }, remoteMethods(keyWords) { if (keyWords) { this.filetelists = []; @@ -1026,13 +1100,25 @@ export default { typeid() { projectlist().then((res) => { this.itemTypeId = res.data; + this.itemTypeId=this.formatData(this.itemTypeId) + console.log(this.itemTypeId) }); }, + formatData(dataList){ + for(let i=0;i { this.tableData = res.data; - console.log(res.data, "ress"); - // this.getlist(); + this.initTableData=[...res.data] }); }, remoteMethodes(keyWords) { @@ -1056,6 +1142,7 @@ export default { this.quckDepartment.forEach(item=>{ if(e==item.id){ currentKey=item.itemTypeId + this.initItemTypeId=item.itemTypeId } }) this.$refs['itemType'].setCurrentKey(currentKey) @@ -1097,19 +1184,29 @@ export default { guiderow(row) { this.guideform = row; }, + tableRowClassName({ row, rowIndex }) { + row.index = rowIndex; + }, //指引信息删除 deleteguidelines() { - console.log(this.guideform.asbitemId); - if (this.guideform.asbitemId == "") { + if(this.curRow.id==undefined || this.curRow.id==""){ + this.$message.warning("请先选择组合项目") + }else{ + if (this.guideform.asbitemId == "" || this.guideform.asbitemId==undefined) { this.$message.warning("请选择删除的数据"); } else { - deletapi( - `/api/app/asbitem-guide?OrganizationUnitId=${this.guideform.organizationUnitId}&AsbitemId=${this.guideform.AsbitemId}&ForSexId=${this.guideform.forSexId}` - ).then((res) => { - this.$message.warning(res.message); - console.log(res); - }); - console.log(this.guideform); + this.$confirm("此操作确定后将永久删除该记录, 是否继续?", "提示", { + confirmButtonText: "是", + cancelButtonText: "否", + type: "warning", + }).then(() => { + this.formdata.guidanceinformationdata.splice(this.guideform.index, 1); + }).catch((err) => { + if(err == 'cancel'){ + this.$message.info("已取消删除"); + } + }); + } } }, //确定新增或者修改指引ruleForm @@ -1143,17 +1240,59 @@ export default { }, //创建弹框 createabulletbox() { - this.guidetitledialogVisible = true; - this.guideform = {}; - this.guidetitle = 1; - this.publicapi(); + // this.guidetitledialogVisible = true; + // this.guideform = {}; + // this.guidetitle = 1; + // this.publicapi(); + console.log(this.curRow.id) + if(this.curRow.id==undefined || this.curRow.id==""){ + this.$message.warning("请先选择组合项目") + }else{ + this.formdata.guidanceinformationdata.push({ + organizationUnitId: "", + asbitemId:this.curRow.id, + forSexId: "", + guide: "", + }); + } + }, + saveguidelines(){ + this.$refs["guidanceinformation"].validate((valid, fields) => { + if (!valid){ + this.$message.warning(fields[Object.keys(fields)[0]][0].message); + return false; + } + + if(this.curRow.id==undefined || this.curRow.id==""){ + this.$message.warning("请先选择组合项目") + }else{ + let sampleGroupId = this.curRow.id; + let sdate = []; + this.formdata.guidanceinformationdata.forEach((element) => { + sdate.push({ organizationUnitId: element.organizationUnitId, forSexId: element.forSexId,guide:element.guide }); + }); + postapi("/api/app/asbitemguide/createasbitemguidemany", { + asbitemId:sampleGroupId, + deatils:sdate + }).then((res) => { + if(res.code!=-1){ + this.$message.success("保存成功"); + } + }) + } + }) }, //获取指引信息guidanceinformationdata - getobtainguidance() { - getapi("/api/app/asbitem-guide").then((res) => { - this.guidanceinformationdata = res.data; - console.log(res, "指引信息"); + getobtainguidance(e) { + if(e!=undefined || e!=""){ + getapi( `/api/app/asbitemguide/getlistinasbitemid?AsbitemId=${e}`).then((res) => { + if(res.data!=-1){ + this.formdata.guidanceinformationdata = [...res.data]; + } }); + }else{ + this.$message.warning("请先选择组合项目") + } }, //获取项目 gitfleslist() { @@ -1170,15 +1309,30 @@ export default { }, //搜索选择 selectitem(v) { - 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 }); + if(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 }); + // } + // }); + if(this.rightdata.length<1){ + this.rightdata.push({ displayName: v.displayName,id:v.id }); + this.isdislob=false + }else{ + for(let i=0;i { - if (res.code!=-1) { - this.$message.success("操作成功"); - this.isdislob = true; - } - }); + console.log({ + asbitemI:sampleGroupId, + details:sdate + }) + if(sampleGroupId== undefined || sampleGroupId==""){ + this.$message.warning("请选择组合项目"); + this.isdislob=true + }else{ + postapi("/api/app/asbitemdetail/createasbitemdetailmany", { + asbitemId:sampleGroupId, + details:sdate + }).then((res) => { + if(res.code!=-1){ + this.$message.success("操作成功"); + this.isdislob = true; + } + }) + } // console.log(sdate); // if (sampleGroupId == undefined) { // this.$message.warning("请选择列表"); @@ -1291,22 +1457,26 @@ export default { }, //q全移去 allclear() { - this.isdislob = false; if (this.rightdata.length > 0) { - this.ary1 = this.rightdata; - this.ary2 = this.leftdata; - this.updatedate(); - this.rightdata = []; + this.rightdata.forEach(item=>{ + this.leftdata.push(item); + }) + this.rightdata=[] + this.isdislob = false; + }else{ + this.$message.warning('没有可移除的项目') } }, //全添加 addall() { - this.isdislob = false; if (this.leftdata.length > 0) { - this.ary1 = this.leftdata; - this.ary2 = this.rightdata; - this.updatedate(); - this.leftdata = []; + this.leftdata.forEach(item=>{ + this.rightdata.push(item); + }) + this.leftdata=[] + this.isdislob = false; + }else{ + this.$message.warning('没有可添加的项目') } }, //左侧双击事件 @@ -1327,6 +1497,11 @@ export default { this.projectid = res.data; this.initprojectid=[...res.data] }); + groupsandlist(this.pages).then((res) => { + this.initTableData = [...res.data.items]; + this.quckDepartment=res.data.items; + console.log(res); + }); }, //ary1 需要追加的数据 ary2目标数组 updatedate() { @@ -1346,14 +1521,14 @@ export default { }, //项目类别选择 ischangs(v) { - console.log(v); - - //`/api/app/diagnosis/in-item-type/${v}`3a0c50b9-9621-61b7-fc93-1cfab1ec0478 if(v){ getapi(`/api/app/item/in-item-type/${v}`).then((res) => { - console.log(res); - this.leftdata = res.data; + let bq=[] + bq = res.data.filter(item => !this.rightdata.some(ele=>ele.id === item.id)); + this.leftdata = [...bq]; }); + }else{ + this.remoteMethod() } }, bindidclose() { @@ -1414,7 +1589,7 @@ export default { } else { samplesetlow(this.form.id, 2).then((res) => { if(res.code!=-1){ - this.getlist(); + this.getItemIdList(); this.$message.success("操作成功"); } }); @@ -1429,7 +1604,7 @@ export default { samplesetlow(this.form.id, 1).then((res) => { if(res.code!=-1){ this.$message.success("操作成功"); - this.getlist(); + this.getItemIdList(); } }); } @@ -1447,10 +1622,11 @@ export default { }).then(() => { deletescombinationprojectid(this.form.id).then((res) => { console.log(res); - if (res.code == 1) { + if (res.code!=-1) { this.$message.success("删除成功"); - this.getlist(); - this.form = {}; + this.getItemIdList(); + Object.assign(this.$data.form, this.$options.data().form) + this.curRow=this.$options.data().curRow } }); }); @@ -1472,6 +1648,7 @@ export default { this.$refs.ruleForm.resetFields() } asbitemgetid(this.form.id).then((res) => { + this.form=res.data if (res.data.isItemResultMerger == 'Y') { this.form.isItemResultMergerBox = true; } else { @@ -1507,9 +1684,7 @@ export default { } else { this.form.isActiveBox = false; } - objCopy(res.data, this.form); }); - console.log(this.form) //性别 // examinationgender().then((res) => { // this.forSexId = res.data; @@ -1519,9 +1694,9 @@ export default { this.forSexId = res.data; }); //项目类别 - projectlist().then((res) => { - this.itemTypeId = res.data; - }); + // projectlist().then((res) => { + // this.itemTypeId = res.data; + // }); //仪器类别 instrumentlist().then((res) => { this.deviceTypeId = res.data.items; @@ -1559,10 +1734,14 @@ export default { isActive: this.form.isActive, }; newcombination(obj).then((res) => { - if(res.data!=-1){ + if(res.code!=-1){ this.$message.success("新增成功"); - this.getlist(); + this.getItemIdList(); this.dialogVisible = false; + this.$nextTick(()=>{ + this.$refs['tableData'].setCurrentRow(res.data); + this.rowick(res.data) + }) } }); } else if (this.title == 2) { @@ -1602,15 +1781,25 @@ export default { } }); }, + getItemIdList(){ + getapi(`/api/app/asbitem/in-item-type/${this.initItemTypeId}`).then((res) => { + if(res.code!=-1){ + this.tableData = res.data; + } + }); + }, //新增弹框 addll() { - this.dialogVisible = true; + if(this.initItemTypeId==undefined || this.initItemTypeId==""){ + this.$message.warning("请选择项目类别") + }else{ + 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.form.itemTypeId=this.initItemTypeId this.$nextTick(() => { this.$refs.refinput.focus(); }); @@ -1620,10 +1809,10 @@ export default { this.forSexId = res.data; console.log(this.forSexId); }); - //项目类别 - projectlist().then((res) => { - this.itemTypeId = res.data; - }); + // //项目类别 + // projectlist().then((res) => { + // this.itemTypeId = res.data; + // }); //仪器类别 instrumentlist().then((res) => { this.deviceTypeId = res.data.items; @@ -1632,8 +1821,10 @@ export default { invoicetypelist().then((res) => { this.invoiceItemTypeId = res.data.items; }); + } }, rowick(row) { + this.curRow={...row} asbitemgetid(row.id).then((res) => { this.curRow = { ...res.data }; this.form = res.data; @@ -1645,12 +1836,13 @@ export default { 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]; }); }); + this.getobtainguidance(this.curRow.id); + this.publicapi() }, getlist() { groupsandlist(this.pages).then((res) => { @@ -1680,11 +1872,9 @@ export default { padding: 0; } .mainleftbox { - width: 200px; - height: 240px; + width: 300px; border: 1px solid #ccc; margin-left: 3%; - overflow-y: scroll; } .Selectbutton { margin-left: 3%; @@ -1696,7 +1886,7 @@ export default { .mainbox { display: flex; justify-content: center; - margin-top: 20px; + margin-top: 5px; } .weixuan { text-align: center; @@ -1705,7 +1895,6 @@ export default { } .leftbox { width: 200px; - height: 240px; border: 1px solid #ccc; } .instrumentcategory { @@ -1761,10 +1950,16 @@ export default { :deep .el-input-group__append { padding: 0 11px; } +:deep .el-tabs__header{ + margin-bottom: 5px; +} .my-el-form-item :deep .el-form-item__content{ line-height: 0!important; } .my-el-form-item :deep .el-input__icon{ line-height: 0!important; } +.guidelines :deep .el-form-item{ + margin-bottom: 0; +} diff --git a/src/views/fee-settings/Item.vue b/src/views/fee-settings/Item.vue index b23f79a..aa0b7f8 100644 --- a/src/views/fee-settings/Item.vue +++ b/src/views/fee-settings/Item.vue @@ -9,7 +9,7 @@
- +
-
+
-
+
@@ -105,7 +106,7 @@ - + @@ -125,8 +126,7 @@ :props="{ value: 'id', label: 'displayName', - children: 'treeChildren', - checkStrictly: true, + children: 'treeChildren' }" > - + @@ -912,7 +912,7 @@ - + @@ -933,7 +933,7 @@ - + @@ -1077,11 +1077,11 @@ export default { displayName: "", englishShortName: "", itemTypeId: "", - price: "", - priceItemId: "", - unitId: "", - defaultResult: "", - referenceRangeTypeFlag: "", + price: "0", + priceItemId: null, + unitId: null, + defaultResult: "未见异常", + referenceRangeTypeFlag: "0", isProduceSummary: "", isNameIntoSummary: "", isDiagnosisFunction: "", @@ -1089,7 +1089,7 @@ export default { isCalculationItem: "", calculationFunction: "", isContinueProcess: "", - resultTemplateTypeFlag: "", + resultTemplateTypeFlag: null, inputCheck: "", isActive: "" }, @@ -1340,11 +1340,12 @@ export default { curRowes:{}, fssubdexDete:"", isshows:true, - isshowes:true + isshowes:true, + initItemTypeId:"" }; }, created() { - this.getlist(); + // this.getlist(); this.getmedicalconclusionlist(); }, mounted() { @@ -1357,7 +1358,6 @@ export default { methods: { //启用诊断函数 enablediagnostics(v) { - console.log(v); if (v == "N") { this.disableddiagnosisFunction = true; } else { @@ -1432,9 +1432,6 @@ export default { for (var i = 0; i < this.newssdate.length; i++) { if (this.newssdate[i].id == id) { isdate = true; - console.log("888"); - console.log(this.newssdate[i][name]); - this.newssdate[i][name] = value; } } @@ -1449,17 +1446,29 @@ export default { // }, treeclick(data) { + this.initItemTypeId=data.id getapi(`/api/app/item/in-item-type/${data.id}`).then((res) => { this.tableData = res.data; - console.log(res.data, "ress"); + this.initTableData=[...res.data] // this.getlist(); }); }, typeid() { projectlist().then((res) => { this.itemTypeId = res.data; + this.itemTypeId=this.formatData(this.itemTypeId) }); }, + formatData(dataList){ + for(let i=0;i { @@ -1611,7 +1620,6 @@ export default { }, //项目模板置顶 toppingqq() { - console.log(this.rusetform.id); if (this.rusetform.id == undefined) { this.$message.warning("请选择操作的数据"); } else { @@ -1654,7 +1662,6 @@ export default { getapi(`/api/app/item-result-template/${row.id}`).then((res) => { this.curRows = res.data; }); - console.log(row); }, //项目结果模板新增弹框 resultediting() { @@ -1779,7 +1786,6 @@ export default { }); Object.assign(this.$data.rusetform, this.$options.data().rusetform) this.rusetform.itemId = this.form.id; - console.log(this.rusetform) }, quckRusetform(e){ if(!e){ @@ -1788,10 +1794,10 @@ export default { }, //获取项目类别列表 getmedicalconclusionlist() { - // postapi("/api/app/diagnosis/getlistinsuggestion").then((res) => { - // this.Selectacategory = res.data; - // this.quckDepartment=res.data - // }); + getporjectlists(this.pages).then((res) => { + this.initTableData = [...res.data.items]; + this.quckDepartment=res.data.items; + }); }, onchange(id) { // this.form.customerOrgId = id; @@ -1803,7 +1809,6 @@ export default { this.form.itemTypeId = item; }); } - console.log(this.form.customerOrgId); }, gettypelist(listdata) { listdata.forEach((items) => { @@ -1816,15 +1821,12 @@ export default { }, isselctvalue(v) { this.pages.TypeId = v; - console.log(v); - console.log(this.pages.TypeId); this.getlist(); }, handleSelect(item) { this.pages.Filter = item.displayName; this.item = item; this.formid = item.id; - console.log(this.item); //console.log(item); // quersmedicalid(item.id).then((res) => { // console.log(res); @@ -1833,7 +1835,6 @@ export default { }, getlistM(rowsid) { getporjectlists(this.pages).then((res) => { - console.log("数据", res); this.initTableData = [...res.data.items]; this.tableData = res.data.items; this.quckDepartment=res.data.items; @@ -1956,6 +1957,7 @@ export default { this.quckDepartment.forEach(item=>{ if(e==item.id){ currentKey=item.itemTypeId + this.initItemTypeId=item.itemTypeId } }) this.$refs['itemType'].setCurrentKey(currentKey) @@ -2026,7 +2028,6 @@ export default { let result = []; this.tableData.forEach((item, index) => { // index 从0开始的, displayOrder从大到小排 - console.log(item.id); // let currentDisplayOrder = this.tableData.length -1 let currentDisplayOrder = this.initTableData[index].displayOrder; if (item.displayOrder != currentDisplayOrder) { @@ -2051,13 +2052,11 @@ export default { handle: ".move", animation: 300, onChoose({oldIndex}){ - console.log(oldIndex) _this.$refs['tableData'].setCurrentRow(_this.tableData[oldIndex]); _this.rowick(_this.tableData[oldIndex]) }, onEnd({ newIndex, oldIndex }) { _this.isshow = false; - console.log(newIndex, oldIndex) let currRow = _this.tableData.splice(oldIndex, 1)[0]; _this.tableData.splice(newIndex, 0, currRow); _this.tableData.map((item, index) => { @@ -2068,6 +2067,7 @@ export default { } }); console.log(_this.tableData.map((item) => item.displayOrder)); + console.log(_this.initTableData.map((item) => item.displayOrder)); }, }); }); @@ -2077,10 +2077,8 @@ export default { let result = []; this.reusttableData.forEach((item, index) => { // index 从0开始的, displayOrder从大到小排 - console.log(item.id); // let currentDisplayOrder = this.tableData.length -1 let currentDisplayOrder = this.initReusttableData[index].displayOrder; - console.log(currentDisplayOrder) if (item.displayOrder != currentDisplayOrder) { // 如果它的displayOrder和它当前所在的位置不同代表挪动过位置 result.push({ id: item.id, displayOrder: currentDisplayOrder }); @@ -2117,8 +2115,6 @@ export default { } else if (index == newIndex) { } }); - console.log(_this.reusttableData.map((item) => item.displayOrder)); - console.log(_this.initReusttableData.map((item) => item.displayOrder)); }, }); }); @@ -2166,10 +2162,8 @@ export default { let result = []; this.diagnosticdata.forEach((item, index) => { // index 从0开始的, displayOrder从大到小排 - console.log(item.id); // let currentDisplayOrder = this.tableData.length -1 let currentDisplayOrder = this.initdiagnosticdata[index].displayOrder; - console.log(currentDisplayOrder) if (item.displayOrder != currentDisplayOrder) { // 如果它的displayOrder和它当前所在的位置不同代表挪动过位置 result.push({ id: item.id, displayOrder: currentDisplayOrder }); @@ -2206,7 +2200,6 @@ export default { } else if (index == newIndex) { } }); - console.log(_this.diagnosticdata.map((item) => item.displayOrder)); }, }); }); @@ -2258,7 +2251,7 @@ export default { projttitem(this.form.id, 2).then((res) => { if(res.code!=-1){ this.$message.success("操作成功"); - this.getlist(); + this.getItemTypeIdList(); } }); } @@ -2272,7 +2265,7 @@ export default { projttitem(this.form.id, 1).then((res) => { if(res.code!=-1){ this.$message.success("操作成功"); - this.getlist(); + this.getItemTypeIdList(); } }); } @@ -2291,8 +2284,9 @@ export default { .then(() => { projectdeleft(this.form.id).then((res) => { this.$message.success("删除成功"); - this.getlist(); - this.form = {}; + this.getItemTypeIdList(); + Object.assign(this.$data.form, this.$options.data().form) + this.curRow=this.$options.data().curRow }); }) .catch(() => {}); @@ -2305,11 +2299,11 @@ export default { // console.log(res); // this.form = res.data; }); - console.log(row); }, //编辑弹框 editpopup() { this.form = { ...this.curRow }; + console.log(this.form) if (this.form.id == undefined) { this.$message.warning("请选择操作的数据"); } else { @@ -2321,12 +2315,8 @@ export default { this.$refs.form.resetFields() } posjrctid(this.form.id).then((res) => { - this.form = res.data; - // this.unitId.forEach((item)=>{ - // if(res.data.unitId==item.id){ - // this.unitIdName=item.displayName - // } - // }) + if(res.code!=-1){ + this.form = res.data; if (res.data.isProduceSummary == 'Y') { this.isProduceSummaryBox = true; } else { @@ -2357,7 +2347,7 @@ export default { } else { this.isActiveBox = false; } - console.log(this.form); + } }); } }, @@ -2405,8 +2395,12 @@ export default { addproject(this.form).then((res) => { if (res.code == 1) { this.$message.success("新增成功"); - this.getlist(); + this.getItemTypeIdList(); this.dialogVisible = false; + this.$nextTick(()=>{ + this.$refs['tableData'].setCurrentRow(res.data); + this.rowick(res.data) + }) } }); } else if (this.title == 2) { @@ -2427,7 +2421,10 @@ export default { }, //新增弹框 add() { - this.form.price = Number(this.form.price); + if(this.initItemTypeId==undefined || this.initItemTypeId==""){ + this.$message.warning('请选择项目类别') + }else{ + this.form.price = Number(this.form.price); // this.form={} this.title = 1; this.dialogVisible = true; @@ -2445,12 +2442,17 @@ export default { isBox.forEach(item=>{ this.form[item] = 'Y'; }) + let isNotBox=["isDiagnosisFunction","isCalculationItem","isContinueProcess"] + isNotBox.forEach(item=>{ + this.form[item] = 'N'; + }) + this.form.itemTypeId=this.initItemTypeId // this.unitIdName="" - console.log(this.form) this.$nextTick(() => { this.$refs.refinput.focus(); }); this.addorgropdata(); + } }, //新增或者编辑弹框需要的下拉框接口数据 addorgropdata() { @@ -2474,7 +2476,6 @@ export default { //结果模板 getapi("/api/app/item-result-template").then((res) => { this.resulttemp = res.data.items; - console.log(res, "结果模板"); }); }, getlist() { @@ -2484,6 +2485,13 @@ export default { // this.tableData = res.data.items; // }); }, + getItemTypeIdList(){ + getapi(`/api/app/item/in-item-type/${this.initItemTypeId}`).then((res) => { + if(res.code!=-1){ + this.tableData = res.data; + } + }); + }, tcdate(date) { for (var i = 0; i < date.length; i++) { if (date[i].treeChildren.length == 0) {