pengjun 2 years ago
parent
commit
55a06631f7
  1. 55
      src/components/itemSet/ReferenceRange.vue
  2. 952
      src/views/fee-settings/Asbitem.vue
  3. 406
      src/views/fee-settings/Item.vue

55
src/components/itemSet/ReferenceRange.vue

@ -126,7 +126,7 @@
></el-input> </el-form-item
></el-col>
<el-col :span="8">
<el-form-item label="偏低诊断" prop="lowerDiagnosisId">
<el-form-item label="偏低诊断" prop="">
<el-select v-model="form.lowerDiagnosisId" placeholder="请选择" filterable :filter-method="remoteMethods" default-first-option clearable @change="quckEditdigoisce">
<el-option
v-for="item in diagnosis"
@ -138,7 +138,7 @@
</el-select> </el-form-item
></el-col>
<el-col :span="8">
<el-form-item label="偏高诊断" prop="upperDiagnosisId">
<el-form-item label="偏高诊断" prop="">
<el-select v-model="form.upperDiagnosisId" placeholder="请选择" filterable :filter-method="remoteMethodes" default-first-option clearable @change="quckEditdigoisces">
<el-option
v-for="item in diagnosies"
@ -384,31 +384,32 @@ export default {
this.$refs["form"].validate((v) => {
let that=this
if (v) {
if(that.form.referenceRangeValue.includes('-')){
let before=/^\d+\.?\d?$/.test(that.form.referenceRangeValue.match(/(\S*)-/)[1])
let after=/^\d+\.?\d?$/.test(that.form.referenceRangeValue.match(/-(\S*)/)[1])
if(before && after){
if(that.form.criticalRangeValue!="" && that.form.criticalRangeValue!=undefined){
if(that.form.criticalRangeValue.includes('-')){
let criticalBefore=/^\d+\.?\d?$/.test(that.form.criticalRangeValue.match(/(\S*)-/)[1])
let criticalAfter=/^\d+\.?\d?$/.test(that.form.criticalRangeValue.match(/-(\S*)/)[1])
if(criticalBefore && criticalAfter){
that.confirmationRequest()
}else{
return that.$message.warning("警告范围值-符号前后必须是数字");
}
}else{
return that.$message.warning("警告范围值必须以-符号隔开");
}
}else{
that.confirmationRequest()
}
}else{
return that.$message.warning("参考范围值-符号前后必须是数字");
}
}else{
return that.$message.warning("参考范围值必须以-符号隔开");
}
that.confirmationRequest()
// if(that.form.referenceRangeValue.includes('-')){
// let before=/^\d+\.?\d?$/.test(that.form.referenceRangeValue.match(/(\S*)-/)[1])
// let after=/^\d+\.?\d?$/.test(that.form.referenceRangeValue.match(/-(\S*)/)[1])
// if(before && after){
// if(that.form.criticalRangeValue!="" && that.form.criticalRangeValue!=undefined){
// if(that.form.criticalRangeValue.includes('-')){
// let criticalBefore=/^\d+\.?\d?$/.test(that.form.criticalRangeValue.match(/(\S*)-/)[1])
// let criticalAfter=/^\d+\.?\d?$/.test(that.form.criticalRangeValue.match(/-(\S*)/)[1])
// if(criticalBefore && criticalAfter){
// that.confirmationRequest()
// }else{
// return that.$message.warning("-");
// }
// }else{
// return that.$message.warning("-");
// }
// }else{
// that.confirmationRequest()
// }
// }else{
// return that.$message.warning("-");
// }
// }else{
// return that.$message.warning("-");
// }
}
});
},

952
src/views/fee-settings/Asbitem.vue
File diff suppressed because it is too large
View File

406
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"
>
<!-- <el-table-column label="编号" prop="id"></el-table-column>
<el-table-column label="项目编号" prop="itemId"></el-table-column> -->
@ -444,7 +447,7 @@
</el-table-column>
<el-table-column label="小结前加名称" width="120">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isNameIntoSummary" true-label="Y" false-label="N"/>
<el-checkbox v-model="scope.row.isNameIntoSummary" true-label="Y" false-label="N" disabled/>
</template>
</el-table-column>
<el-table-column label="结果状态" width="100">
@ -454,19 +457,47 @@
</el-table-column>
<el-table-column label="结果进入小结" width="120">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.isResultIntoSummary" true-label="Y" false-label="N"/>
<el-checkbox v-model="scope.row.isResultIntoSummary" true-label="Y" false-label="N" disabled/>
</template>
</el-table-column>
<el-table-column label="最后修改者" width="100">
<el-table-column label="操作">
<template>
<el-tag
class="moves"
style="
cursor: move;
margin-left: 15px;
background-color: rgb(245, 245, 245);
border: none;
"
draggable="true"
>
<i
class="el-icon-d-caret"
style="
width: 1rem;
height: 1rem;
color: rgb(113, 113, 113);
"
></i>
</el-tag>
</template>
</el-table-column>
<el-table-column label="创建者" width="100">
<template slot-scope="scope">
{{ scope.row.lastModifierName}}
{{ scope.row.creatorName}}
</template>
</el-table-column>
<!-- <el-table-column label="创建时间" width="200">
<el-table-column label="创建时间" width="200">
<template slot-scope="scope">
{{ scope.row.creationTime | dateFormat }}
</template>
</el-table-column> -->
</el-table-column>
<el-table-column label="修改者" width="100">
<template slot-scope="scope">
{{ scope.row.lastModifierName}}
</template>
</el-table-column>
<el-table-column label="修改时间" width="200">
<template slot-scope="scope">
{{ scope.row.lastModificationTime | dateFormat }}
@ -482,6 +513,28 @@
<div style="margin-top: 5px">
<el-button type="" @click="delemtdelite" style="width:100%;">删除</el-button>
</div>
<div style="margin-top: 5px">
<el-button type="" @click="resulttopping" style="width:100%;">置顶</el-button>
</div>
<div style="margin-top: 5px">
<el-button type="" @click="resulttoppings" style="width:100%;">置底</el-button>
</div>
<div style="margin-top: 5px">
<el-button
type=""
:disabled="isshows"
@click="assertions"
style="width:100%;"
>排序</el-button>
</div>
<div style="margin-top: 5px">
<el-button
type=""
:disabled="isshows"
@click="resultcancellation"
style="width:100%;"
>取消</el-button>
</div>
<!-- <div style="margin-top: 5px">
<el-button type="primary" @click="templatecategory"
>模板类别</el-button
@ -685,22 +738,56 @@
>
<div style="display: flex">
<div style="width: 95%">
<el-table :data="diagnosticdata" :height="window.pageHeight < 600 ? 280 : window.pageHeight - 320" border highlight-current-row @row-click="diagnosick">
<el-table :data="diagnosticdata" :height="window.pageHeight < 600 ? 280 : window.pageHeight - 320" border highlight-current-row @row-click="diagnosick" row-key="id" ref="diagnosticdata" class="el-table__body-wrapperes tbodyes">
<el-table-column label="结果" prop="result"></el-table-column>
<el-table-column label="诊断" width="200">
<template slot-scope="scope">
{{getChangeDiagnosies(scope.row.diagnosisId)}}
</template>
</el-table-column>
<el-table-column
label="最后修改者"
prop="lastModifierName"
></el-table-column>
<el-table-column label="修改时间" prop="lastModificationTime">
<el-table-column label="创建者" width="100">
<template slot-scope="scope">
{{ scope.row.creatorName}}
</template>
</el-table-column>
<el-table-column label="创建时间" width="200">
<template slot-scope="scope">
{{ scope.row.creationTime | dateFormat }}
</template>
</el-table-column>
<el-table-column label="修改者" width="100">
<template slot-scope="scope">
{{ scope.row.lastModifierName}}
</template>
</el-table-column>
<el-table-column label="修改时间" width="200">
<template slot-scope="scope">
{{ scope.row.lastModificationTime | dateFormat }}
</template>
</el-table-column>
<el-table-column label="操作">
<template>
<el-tag
class="movess"
style="
cursor: move;
margin-left: 15px;
background-color: rgb(245, 245, 245);
border: none;
"
draggable="true"
>
<i
class="el-icon-d-caret"
style="
width: 1rem;
height: 1rem;
color: rgb(113, 113, 113);
"
></i>
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
<div style="margin-top: 5px; margin-left: 15px;width:10%;">
@ -711,6 +798,28 @@
<div style="margin-top: 5px">
<el-button type="" @click="deleteDiagnosis" style="width:100%;">删除</el-button>
</div>
<div style="margin-top: 5px">
<el-button type="" @click="diagnosistopping" style="width:100%;">置顶</el-button>
</div>
<div style="margin-top: 5px">
<el-button type="" @click="diagnosistoppings" style="width:100%;">置底</el-button>
</div>
<div style="margin-top: 5px">
<el-button
type=""
:disabled="isshowes"
@click="assertiones"
style="width:100%;"
>排序</el-button>
</div>
<div style="margin-top: 5px">
<el-button
type=""
:disabled="isshowes"
@click="diagnosiscancellation"
style="width:100%;"
>取消</el-button>
</div>
</div>
</div>
<el-divider></el-divider>
@ -882,6 +991,7 @@ export default {
diagnosticediting: false, //
diagnosdialogVisible: false, //
diagnosticdata: [], //
initdiagnosticdata:[],
projectdata: [], //
projectdialogVisible: false,
itemId: [], //id
@ -944,6 +1054,7 @@ export default {
rurestdialogVisible: false,
isshow: true,
reusttableData: [],
initReusttableData:[],
tableData: [],
initTableData: [],
pages: {
@ -1227,7 +1338,9 @@ export default {
diagnostiele:1,
curRows:{},
curRowes:{},
fssubdexDete:""
fssubdexDete:"",
isshows:true,
isshowes:true
};
},
created() {
@ -1283,6 +1396,7 @@ export default {
if(res.code!=-1){
this.$message.success("新增成功");
this.fssubdex = "";
this.curRow.referenceRangeTypeFlag=this.referencerangevalue
}
});
}else{
@ -1295,15 +1409,23 @@ export default {
if(res.code!=-1){
this.$message.success("修改成功");
this.fssubdex = "";
this.curRow.referenceRangeTypeFlag=this.referencerangevalue
}
});
}
}else{
this.$message.warning("内容不能为空");
}
}else{
postapi("/api/app/item/updateitemreferencerangetypeflag", {
itemId:this.form.id,
referenceRangeTypeFlag:this.referencerangevalue
}).then((res) => {
if(res.code!=-1){
this.curRow.referenceRangeTypeFlag=this.referencerangevalue
}
});
}
this.curRow.referenceRangeTypeFlag=this.referencerangevalue
this.referencerangevalue="0"
},
async blurInput(id, name, value) {
var isdate = false; //
@ -1415,6 +1537,7 @@ export default {
postapi(`/api/app/itemresultmatch/getlistinitmeid`,{itemId:this.form.id}).then(
(res) => {
this.diagnosticdata = res.data;
this.initdiagnosticdata=[...res.data]
}
);
},
@ -1446,6 +1569,9 @@ export default {
this.diagnosdialogVisible = true;
this.putDiagnosis()
this.diageoisaddId()
this.$nextTick(()=>{
this.rowDropes()
})
},
quckEditdigoisce(e){
if(!e){
@ -1745,11 +1871,13 @@ export default {
resultlist() {
getapi(`/api/app/item-result-template/in-item-id/${this.form.id}`).then(
(res) => {
this.reusttableData = res.data;
this.reusttableData = res.data
this.initReusttableData=[...res.data]
}
);
},
resulttemplate() {
let that=this
this.form = { ...this.curRow };
if (this.form.id == undefined) {
this.$message.warning("请选择操作的数据");
@ -1757,8 +1885,11 @@ export default {
this.rurestdialogVisible = true;
getapi(`/api/app/item-result-template/in-item-id/${this.form.id}`).then(
(res) => {
this.reusttableData = res.data;
console.log(this.reusttableData)
this.reusttableData = res.data
this.initReusttableData=[...res.data]
this.$nextTick(()=>{
that.rowDrops()
})
}
);
getapi("/api/app/result-status").then((res) => {
@ -1834,10 +1965,11 @@ export default {
}
getapi(`/api/app/item/in-item-type/${currentKey}`).then((res) => {
this.tableData = res.data;
this.tableData.forEach(item=>{
this.tableData.forEach((item,index)=>{
if(e==item.id){
this.$refs['tableData'].setCurrentRow(item);
this.rowick(item)
this.tableScrollToRow(this.$refs.tableData, index)
}
})
});
@ -1872,42 +2004,61 @@ export default {
}
}
},
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
},
//
cancellation() {
this.$message.info("取消操作");
this.isshow = true;
this.getlist();
this.tableData=this.initTableData
},
//
assertion() {
const result = [];
let result = [];
this.tableData.forEach((item, index) => {
// index 0 displayOrder
console.log(item.id);
// const currentDisplayOrder = this.tableData.length -1
const currentDisplayOrder = this.initTableData[index].displayOrder;
// let currentDisplayOrder = this.tableData.length -1
let currentDisplayOrder = this.initTableData[index].displayOrder;
if (item.displayOrder != currentDisplayOrder) {
// displayOrder
result.push({ id: item.id, displayOrder: currentDisplayOrder });
}
});
projectdreog({ itemList: result }).then((res) => {
this.$message.success("操作成功");
this.isshow = true;
this.getlist();
if(res.code!=-1){
this.$message.success("操作成功");
this.isshow = true;
}
// this.getlist();
});
},
//
rowDrop() {
this.$nextTick(() => {
const tbody = document.querySelector(".el-table__body-wrapper tbody");
const _this = this;
let tbody = document.querySelector(".el-table__body-wrapper tbody");
let _this = this;
Sortable.create(tbody, {
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;
const currRow = _this.tableData.splice(oldIndex, 1)[0];
console.log(newIndex, oldIndex)
let currRow = _this.tableData.splice(oldIndex, 1)[0];
_this.tableData.splice(newIndex, 0, currRow);
_this.tableData.map((item, index) => {
if (index == newIndex && index == oldIndex) {
@ -1921,6 +2072,183 @@ export default {
});
});
},
//
assertions() {
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 });
}
});
putapi("/api/app/itemresulttemplate/updatesortmany",{ itemList: result }).then((res) => {
if(res.code!=-1){
this.$message.success("操作成功");
this.isshows = true;
}
// this.getlist();
});
},
//
rowDrops() {
this.$nextTick(() => {
let tbody = document.querySelector(".el-table__body-wrappers tbody");
let _this = this;
Sortable.create(tbody, {
handle: ".moves",
animation: 300,
onChoose({oldIndex}){
_this.$refs['reusttableData'].setCurrentRow(_this.reusttableData[oldIndex]);
_this.reustclick(_this.reusttableData[oldIndex])
},
onEnd({ newIndex, oldIndex }) {
_this.isshows = false;
let currRow = _this.reusttableData.splice(oldIndex, 1)[0];
_this.reusttableData.splice(newIndex, 0, currRow);
_this.reusttableData.map((item, index) => {
if (index == newIndex && index == oldIndex) {
// console.log(item, "");
} else if (index == oldIndex) {
} else if (index == newIndex) {
}
});
console.log(_this.reusttableData.map((item) => item.displayOrder));
console.log(_this.initReusttableData.map((item) => item.displayOrder));
},
});
});
},
//
resultcancellation(){
this.$message.info("取消操作");
this.isshows = true;
this.reusttableData=this.initReusttableData
},
//
resulttopping(){
this.rusetform = { ...this.curRows };
if (this.rusetform.id == undefined) {
this.$message.warning("请点击选择操作的数据");
} else {
putapi(
`/api/app/itemresulttemplate/updatemanysort?id=${this.rusetform.id}&SortType=1`
).then((res) => {
if(res.code!=-1){
this.$message.success("操作成功");
this.resultlist();
}
});
}
},
//
resulttoppings(){
this.rusetform = { ...this.curRows };
if (this.rusetform.id == undefined) {
this.$message.success("请点击选择操作的数据");
} else {
putapi(
`/api/app/itemresulttemplate/updatemanysort?id=${this.rusetform.id}&SortType=2`
).then((res) => {
if(res.code!=-1){
this.$message.success("操作成功");
this.resultlist();
}
});
}
},
//
assertiones() {
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 });
}
});
putapi("/api/app/itemresultmatch/updatesortmany",{ itemList: result }).then((res) => {
if(res.code!=-1){
this.$message.success("操作成功");
this.isshowes = true;
}
// this.getlist();
});
},
//
rowDropes() {
this.$nextTick(() => {
let tbody = document.querySelector(".el-table__body-wrapperes tbody");
let _this = this;
Sortable.create(tbody, {
handle: ".movess",
animation: 300,
onChoose({oldIndex}){
_this.$refs['diagnosticdata'].setCurrentRow(_this.diagnosticdata[oldIndex]);
_this.diagnosick(_this.diagnosticdata[oldIndex])
},
onEnd({ newIndex, oldIndex }) {
_this.isshowes = false;
let currRow = _this.diagnosticdata.splice(oldIndex, 1)[0];
_this.diagnosticdata.splice(newIndex, 0, currRow);
_this.diagnosticdata.map((item, index) => {
if (index == newIndex && index == oldIndex) {
// console.log(item, "");
} else if (index == oldIndex) {
} else if (index == newIndex) {
}
});
console.log(_this.diagnosticdata.map((item) => item.displayOrder));
},
});
});
},
//
diagnosistopping(){
this.editdigoisceditingform={ ...this.curRowes }
if (this.editdigoisceditingform.id == undefined) {
this.$message.warning("请点击选择操作的数据");
} else {
putapi(
`/api/app/itemresultmatch/updatesortmany?id=${this.editdigoisceditingform.id}&SortType=1`
).then((res) => {
if(res.code!=-1){
this.$message.success("操作成功");
this.resultlist();
}
});
}
},
//
diagnosistoppings(){
this.editdigoisceditingform={ ...this.curRowes }
if (this.editdigoisceditingform.id == undefined) {
this.$message.warning("请点击选择操作的数据");
} else {
putapi(
`/api/app/itemresultmatch/updatesortmany?id=${this.editdigoisceditingform.id}&SortType=2`
).then((res) => {
if(res.code!=-1){
this.$message.success("操作成功");
this.resultlist();
}
});
}
},
//
diagnosiscancellation(){
this.$message.info("取消操作");
this.isshowes = true;
this.diagnosticdata=this.initdiagnosticdata
},
//
toppings() {
this.form = { ...this.curRow };
@ -1928,8 +2256,10 @@ export default {
this.$message.success("请点击选择操作的数据");
} else {
projttitem(this.form.id, 2).then((res) => {
this.$message.success("操作成功");
this.getlist();
if(res.code!=-1){
this.$message.success("操作成功");
this.getlist();
}
});
}
},
@ -1940,8 +2270,10 @@ export default {
this.$message.warning("请点击选择操作的数据");
} else {
projttitem(this.form.id, 1).then((res) => {
this.$message.success("操作成功");
this.getlist();
if(res.code!=-1){
this.$message.success("操作成功");
this.getlist();
}
});
}
},
@ -2221,3 +2553,9 @@ export default {
padding: 0 11px;
}
</style>
<style lang="scss">
.chosen td{
background-color: blue!important;
color: #fff;
}
</style>
Loading…
Cancel
Save