pengjun 3 days ago
parent
commit
533790f24c
  1. 3
      src/components/common/AcceptTemplate.vue
  2. 63
      src/components/common/PreAsbitem.vue
  3. 58
      src/views/basic-dictionary/acceptTempPlateList.vue

3
src/components/common/AcceptTemplate.vue

@ -123,7 +123,7 @@ export default {
//
mounted() {
this.getAcceptTempPalte(this.refParams.id)
},
computed: {
@ -176,6 +176,7 @@ export default {
postapi(url, this.form)
.then(res => {
if (res.code > -1) {
this.$message.success({showClose:true,message:'操作成功!'})
if (!this.form.id && res.data?.id) this.form.id = res.data.id
}
})

63
src/components/common/PreAsbitem.vue

@ -4,25 +4,23 @@
<!--未选组合项目-->
<div style="display: block; width:260px;">
<div>
<span style="padding: 5px;font-size: 14px;font-weight: 400;color: #232748;font-family: NotoSansSC-Regular;margin-bottom: 10px;">项目类别</span>
<span
style="padding: 5px;font-size: 14px;font-weight: 400;color: #232748;font-family: NotoSansSC-Regular;margin-bottom: 10px;">项目类别</span>
<el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" popper-class="example" @change="getAsbItemByItemType" size="small" ref="itemTypeIds">
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" popper-class="example"
@change="getAsbItemByItemType" size="small" ref="itemTypeIds">
</el-cascader>
</div>
<div class="box">
<el-table :data="dict.asbItem" size="small" highlight-current-row
:height="window.pageHeight < 600 ? 190 : Math.floor((window.pageHeight - 230) / 2)"
@row-dblclick="dbClickChoosedAsb" row-key="id" border
@selection-change="selectLeft"
@row-dblclick="dbClickChoosedAsb" row-key="id" border @selection-change="selectLeft"
@row-click="chooseAsbItem">
<!--
<el-table-column type="selection" align="center" ></el-table-column>
-->
<el-table-column type="index" align="center" min-width="40" label="序号" />
<el-table-column
label="未选组合项目" min-width="170"
prop="displayName" align="center"
></el-table-column>
<el-table-column label="未选组合项目" min-width="170" prop="displayName" align="center"></el-table-column>
</el-table>
</div>
</div>
@ -30,15 +28,15 @@
<!--中间操作按钮-->
<div style="display: flex;margin: 0px 10px 0px;flex-direction: column;justify-content: center;">
<div>
<el-button class="commonbutton" @click="addAbs(asbItemChoosed,'choosed')" >添加 <i class="el-icon-arrow-right"></i></el-button>
<el-button class="commonbutton" @click="addAbs(asbItemChoosed, 'choosed')">添加 <i
class="el-icon-arrow-right"></i></el-button>
</div>
<div style="margin-top: 10px">
<el-button class="difference" @click="addAbs(asbItemChoosed, 'all')">全部添加</el-button>
</div>
<div style="margin-top: 10px">
<el-button class="commonbutton"
@click="delAbs(medicalPackageAsbitemsChoosed,'choosed')">移除 <i class="el-icon-arrow-left"></i
></el-button>
<el-button class="commonbutton" @click="delAbs(medicalPackageAsbitemsChoosed, 'choosed')">移除 <i
class="el-icon-arrow-left"></i></el-button>
</div>
<div style="margin-top: 10px">
<el-button class="difference" @click="delAbs(medicalPackageAsbitemsChoosed, 'all')">全部移除</el-button>
@ -48,29 +46,23 @@
<!--已选组合项目-->
<div :style="'display: block; width:' + (window.pageWidth - 310 - 280 - 120 - 45 - 110) + 'px;'">
<div style="height:32px;">
<span style="padding: 5px;font-size: 14px;font-weight: 400;color: #232748;font-family: NotoSansSC-Regular;margin-bottom: 10px;">快速选择</span>
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small"
filterable default-first-option :filter-method="filterMethod"
clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)"
<span
style="padding: 5px;font-size: 14px;font-weight: 400;color: #232748;font-family: NotoSansSC-Regular;margin-bottom: 10px;">快速选择</span>
<el-select v-model="asbItemId" placeholder="快速选择组合项目" size="small" filterable default-first-option
:filter-method="filterMethod" clearable @clear="quickAsb = deepCopy(dict.asbItemQuick)"
@change="quickChoosedAsb" ref="quickAsbOCX">
<el-option v-for="item in quickAsb" :key="item.id" :value="item.id" :label="item.displayName" />
</el-select>
</div>
<div class="box">
<el-table :data="medicalPackageAsbitems" size="small" border
@selection-change="selectRight" highlight-current-row
:height="window.pageHeight < 600 ? 190:Math.floor((window.pageHeight - 230) / 2)"
@row-dblclick="removeAbs"
@row-click="removeAsbItem" ref="tablemedicalPackageAsbitems">
<el-table :data="medicalPackageAsbitems" size="small" border @selection-change="selectRight"
highlight-current-row :height="window.pageHeight < 600 ? 190 : Math.floor((window.pageHeight - 230) / 2)"
@row-dblclick="removeAbs" @row-click="removeAsbItem" ref="tablemedicalPackageAsbitems">
<!--
<el-table-column type="selection"></el-table-column>
-->
<el-table-column type="index" min-width="40" align="center" label="序号" />
<el-table-column
label="已选组合项目"
min-width="120"
prop="displayName"
></el-table-column>
<el-table-column label="已选组合项目" min-width="120" prop="displayName"></el-table-column>
</el-table>
</div>
</div>
@ -478,16 +470,16 @@ export default {
let body = {
asbitemId: this.asbitemId,
mutualExclusionAsbitemIds:[]
preCheckAsbitemIds: []
}
this.medicalPackageAsbitems.forEach(e => {
body.mutualExclusionAsbitemIds.push(e.asbitemId)
body.preCheckAsbitemIds.push(e.asbitemId)
})
// /api/app/medical-package-detail/many
postapi('/api/app/AsbitemMutualExclusion/UpdateAsbitemMutualExclusion',body
postapi('/api/app/PreCheckAsbitem/UpdatePreCheckAsbitem', body
).then(res => {
if (res.code > -1) {
this.$message.success({ showClose: true, message: '操作成功!' })
@ -512,13 +504,15 @@ export default {
//
getPreAsbitems(asbitemId) {
if (asbitemId) {
postapi('/api/app/AsbitemMutualExclusion/GetAsbitemMutualExclusionByAsbitemId',{asbitemId}).then((res) => {
postapi('/api/app/PreCheckAsbitem/GetPreCheckAsbitemByAsbitemId', { asbitemId }).then((res) => {
if (res.code != -1) {
this.medicalPackageAsbitems = res.data.details;
this.medicalPackageAsbitems = res.data;
if (this.medicalPackageAsbitems.length > 0) {
this.medicalPackageAsbitems.forEach(e => {
e.asbitemId = e.mutualExclusionAsbitemId
e.displayName = e.mutualExclusionAsbitemName
e.asbitemId = e.preCheckAsbitemId
e.displayName = e.preCheckAsbitemName
});
}
this.getAsbItemByItemType()
}
});
@ -543,10 +537,7 @@ export default {
};
</script>
<style scoped>
.box {
margin-top: 5px;
}
</style>

58
src/views/basic-dictionary/acceptTempPlateList.vue

@ -12,7 +12,7 @@
<div id="printTest">
<el-table :data="tableData" row-key="id" class="el-table__body-wrapper tbody" @row-click="rowick"
@row-dblclick="dblClick" highlight-current-row
:height="window.pageHeight < 600 ? 480 : window.pageHeight - 130" ref="tableData">
:height="window.pageHeight < 600 ? 480 : window.pageHeight - 130" ref="refIdAcceptTempPlate">
<el-table-column prop="id" label="编号" width="300">
</el-table-column>
<el-table-column prop="displayName" label="名称" width="">
@ -88,6 +88,7 @@ import {
} from "../../request/systemapi";
import { postapi } from "@/api/api";
import AcceptTemplate from "@/components/common/AcceptTemplate.vue";
import { arrayExistObj } from "@/utlis/proFunc";
export default {
components: {
@ -132,11 +133,12 @@ export default {
//id
rowick(row) {
this.clickTime1 = new Date().getTime();
setTimeout(() => {
if (this.clickTime1 > this.clickTime2) {
this.curRow = { ...row };
}
}, 400);
this.curRow = row
// setTimeout(() => {
// if (this.clickTime1 > this.clickTime2) {
// this.curRow = { ...row };
// }
// }, 400);
},
dblClick(row) {
this.clickTime2 = new Date().getTime();
@ -266,10 +268,12 @@ export default {
//
btnDel() {
this.form = { ...this.curRow };
if (this.form.id == undefined) {
if (!this.curRow.id) {
this.$message.warning("请选择删除的数据");
} else {
return
}
this.$confirm("是否确认删除,是否继续", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -278,20 +282,21 @@ export default {
confirmButtonClass: "commonbutton"
})
.then(() => {
deletecol(this.form.id).then((res) => {
if (res.code != -1) {
this.curRow = this.$options.data().curRow
this.getlist();
//this.$message.success('')
return postapi('/api/app/InformedConsentTemplate/Delete',{informedConsentTemplateId:this.curRow.id})
})
.then(res => {
if(res.code > -1){
this.$message.success({showClose:true,message:'操作成功!'})
let lfind = arrayExistObj(this.tableData,'id',this.curRow.id)
if(lfind > -1){
this.tableData.splice(lfind,1)
this.curRow = {}
}
}
});
})
.catch(() => { });
// deletecol(this.form.id).then((res) => {
// console.log("");
// this.getlist();
// });
}
},
//btnEdit
btnEdit() {
@ -311,10 +316,23 @@ export default {
//
getlist(id) {
console.log('getlist',id)
this.tableData = []
this.curRow = {}
postapi('/api/app/InformedConsentTemplate/GetList')
.then(res => {
if (res.code > -1) {
this.tableData = res.data;
// id
if(id){
let lfind = arrayExistObj(this.tableData,'id',id)
if(lfind > -1){
this.curRow = this.tableData[lfind]
this.$refs.refIdAcceptTempPlate.setCurrentRow(this.curRow);
}
// this.$refs.multipleTable.toggleRowSelection(row);
// this.$refs.multipleTable.clearSelection();
}
}
})
},

Loading…
Cancel
Save