|
|
|
@ -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> |