|
|
|
@ -46,22 +46,36 @@ |
|
|
|
style="margin-left: 2px;min-width:21px;height:21px;padding:2px;" @click="delSugHead(scope.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"></el-button> |
|
|
|
</div> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div style="width:60px;">诊断:</div> |
|
|
|
<el-select v-model="scope.row.diagnosisId" multiple placeholder="请选择" style="width: 100%;height: 34px;"> |
|
|
|
<div style="display: flex;margin-top: 2px;"> |
|
|
|
<div style="width:60px;">诊断</div> |
|
|
|
<el-select v-model="scope.row.diagnosisIds" multiple placeholder="请选择" style="width: 100%;" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
@change="changeDiagnosis"> |
|
|
|
<el-option v-for="item in diagnosises" :key="item.id" :value="item.id" :label="item.displayName" /> |
|
|
|
</el-select> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '新增解释')" type="success" icon="el-icon-plus" |
|
|
|
style="min-width:21px;height:21px;padding:2px;" @click="addSug(scope.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"></el-button> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '新增指导')" type="danger" icon="el-icon-plus" |
|
|
|
style="margin-left: 2px;min-width:21px;height:21px;padding:2px;" @click="addSug(scope.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"></el-button> |
|
|
|
<el-tooltip content="新增医学解释" placement="top"> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '新增医学解释')" type="success" icon="el-icon-plus" |
|
|
|
style="min-width:21px;height:21px;padding:2px;" @click="addSug(scope.$index, 0)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"> |
|
|
|
</el-button> |
|
|
|
</el-tooltip> |
|
|
|
<el-tooltip content="新增常见原因" placement="top"> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '新增常见原因')" type="danger" icon="el-icon-plus" |
|
|
|
style="margin-left: 2px;min-width:21px;height:21px;padding:2px;" @click="addSug(scope.$index, 1)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"> |
|
|
|
</el-button> |
|
|
|
</el-tooltip> |
|
|
|
<el-tooltip content="新增健康指导" placement="top"> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '新增健康指导')" type="danger" icon="el-icon-plus" |
|
|
|
style="margin-left: 2px;min-width:21px;height:21px;padding:2px;" @click="addSug(scope.$index, 2)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'"> |
|
|
|
</el-button> |
|
|
|
</el-tooltip> |
|
|
|
</div> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div style="width:80px;">医学解释</div> |
|
|
|
<div style="display: flex;margin-top: 2px;"> |
|
|
|
<div style="width:60px;">医学解释</div> |
|
|
|
<el-table :id="'0_sug' + scope.row.id" row-key="displayOrder" style="margin-left: 10px;" |
|
|
|
:data="scope.row.medicalInterpretations" border @row-click="rowClickSug(0)" :show-header="false"> |
|
|
|
:data="scope.row.medicalInterpretations" border @row-click="rowClickSug0" :show-header="false"> |
|
|
|
<el-table-column width="30"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<div>{{ scope2.$index + 1 }}).</div> |
|
|
|
@ -75,21 +89,21 @@ |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="35"> |
|
|
|
<el-table-column label="操作" width="25"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '删除医学解释')" type="danger" |
|
|
|
style="min-width:23px;height:23px;padding:2px;" icon="el-icon-delete" |
|
|
|
@click="delSug(scope.row.details, scope2.$index)" |
|
|
|
style="min-width:21px;height:21px;padding:2px;" icon="el-icon-delete" |
|
|
|
@click="delSug(scope.row.medicalInterpretations, scope2.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
size="small"></el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div style="width:80px;">常见原因</div> |
|
|
|
<div style="display: flex;margin-top: 2px;"> |
|
|
|
<div style="width:60px;">常见原因</div> |
|
|
|
<el-table :id="'1_sug' + scope.row.id" row-key="displayOrder" style="margin-left: 10px;" |
|
|
|
:data="scope.row.commonReasons" border @row-click="rowClickSug(1)" :show-header="false"> |
|
|
|
:data="scope.row.commonReasons" border @row-click="rowClickSug1" :show-header="false"> |
|
|
|
<el-table-column width="30"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<div>{{ scope2.$index + 1 }}).</div> |
|
|
|
@ -103,21 +117,21 @@ |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="35"> |
|
|
|
<el-table-column label="操作" width="25"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '删除医学解释')" type="danger" |
|
|
|
style="min-width:23px;height:23px;padding:2px;" icon="el-icon-delete" |
|
|
|
@click="delSug(scope.row.details, scope2.$index)" |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '删除常见原因')" type="danger" |
|
|
|
style="min-width:21px;height:21px;padding:2px;" icon="el-icon-delete" |
|
|
|
@click="delSug(scope.row.commonReasons, scope2.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
size="small"></el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div style="width:80px;">健康指导</div> |
|
|
|
<div style="display: flex;margin-top: 2px;"> |
|
|
|
<div style="width:60px;">健康指导</div> |
|
|
|
<el-table :id="'2_sug' + scope.row.id" row-key="displayOrder" style="margin-left: 10px;" |
|
|
|
:data="scope.row.guides" border @row-click="rowClickSug(2)" :show-header="false"> |
|
|
|
:data="scope.row.healthGuidances" border @row-click="rowClickSug2" :show-header="false"> |
|
|
|
<el-table-column width="30"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<div>{{ scope2.$index + 1 }}).</div> |
|
|
|
@ -131,20 +145,17 @@ |
|
|
|
</el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" width="35"> |
|
|
|
<el-table-column label="操作" width="25"> |
|
|
|
<template slot-scope="scope2"> |
|
|
|
<el-button v-show="checkPagePriv(pagePriv.privs, '删除健康指导')" type="danger" |
|
|
|
style="min-width:23px;height:23px;padding:2px;" icon="el-icon-delete" |
|
|
|
@click="delSug(scope.row.details, scope2.$index)" |
|
|
|
style="min-width:21px;height:21px;padding:2px;" icon="el-icon-delete" |
|
|
|
@click="delSug(scope.row.healthGuidances, scope2.$index)" |
|
|
|
:disabled="sumDoctorCheck.sumPREdit.completeFlag == '3' || sumDoctorCheck.sumPREdit.isAudit == 'Y'" |
|
|
|
size="small"></el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -167,7 +178,8 @@ export default { |
|
|
|
privs: [] // 页面权限 |
|
|
|
}, |
|
|
|
sumDetails: [], |
|
|
|
sugDetails: [], |
|
|
|
suggestionCurRow:0, //当前操作建议的行 |
|
|
|
diagnosises:[], // 诊断 |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -231,39 +243,34 @@ export default { |
|
|
|
this.sumDoctorCheck.summaryList = []; |
|
|
|
return |
|
|
|
} |
|
|
|
// [ |
|
|
|
// { |
|
|
|
// "id": "3a0c5bbb-dfea-eec1-ed37-78203086987c", |
|
|
|
// "patientRegisterId": "3a0c5b73-0b3a-fe97-88b7-b47b18424136", |
|
|
|
// "summaryTitle": "血常规", |
|
|
|
// "summaryFlag": null, |
|
|
|
// "displayOrder": 0, |
|
|
|
// "details": [ |
|
|
|
// { |
|
|
|
// "sumSummaryHeaderId": "3a0c6589-9b6f-bbb1-bb8b-d6876ea5e4e6", |
|
|
|
// "summaryContent": "重度肥胖", |
|
|
|
// "displayOrder": 1 |
|
|
|
// } |
|
|
|
// ] |
|
|
|
// }, |
|
|
|
// ] |
|
|
|
console.log(`/api/app/sumsummaryheader/getsumsummarylist?PatientRegisterId=${RegisterId}`) |
|
|
|
getapi(`/api/app/sumsummaryheader/getsumsummarylist?PatientRegisterId=${RegisterId}`) |
|
|
|
|
|
|
|
// 旧接口: console.log(`/api/app/sumsummaryheader/getsumsummarylist?PatientRegisterId=${RegisterId}`) |
|
|
|
let body = { |
|
|
|
patientRegisterId: RegisterId, |
|
|
|
isGetExistData: 'Y', |
|
|
|
} |
|
|
|
postapi('/api/app/sumsummaryheader/getsumsummarylist', body) |
|
|
|
.then((res) => { |
|
|
|
console.log("summaryList", res.data); |
|
|
|
if (res.code > -1) { |
|
|
|
let summaryList = [] |
|
|
|
res.data.forEach(e => { |
|
|
|
res.data.forEach((e, i) => { |
|
|
|
let details = [] |
|
|
|
e.details.forEach(e2 => { |
|
|
|
details.push({ summaryContent: ' ' }) |
|
|
|
e.details.forEach((e2, i2) => { |
|
|
|
details.push({ id: `summaryDetails_${i2}`, summaryContent: ' ' }) |
|
|
|
}); |
|
|
|
summaryList.push({ id: e.id, summaryTitle: ' ', details }) |
|
|
|
summaryList.push({ id: `summary_${i}`, summaryTitle: ' ', details }) |
|
|
|
}); |
|
|
|
this.sumDoctorCheck.summaryList = deepCopy(summaryList) |
|
|
|
// 自动高度有问题,需要这样处理一下 |
|
|
|
setTimeout(() => { |
|
|
|
this.sumDoctorCheck.summaryList = deepCopy(res.data); |
|
|
|
this.sumDoctorCheck.summaryList.forEach((e, i) => { |
|
|
|
e.id = `summary_${i}` |
|
|
|
e.details.forEach((e2, i2) => { |
|
|
|
e2.id = `summaryDetails_${i2}` |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, 10); |
|
|
|
// this.sumDoctorCheck.summaryList = res.data; |
|
|
|
// this.textareaResize() |
|
|
|
@ -280,28 +287,43 @@ export default { |
|
|
|
this.sumDoctorCheck.suggestionList = []; |
|
|
|
return; |
|
|
|
}; |
|
|
|
// [ |
|
|
|
// { |
|
|
|
// "id": "3a0c6589-9b6f-bbb1-bb8b-d6876ea5e4e6", |
|
|
|
// "patientRegisterId": "3a0c6589-99bb-5518-a196-4cf094b44e9a", |
|
|
|
// "suggestionTitle": "身高体重", |
|
|
|
// "suggestionFlag": null, |
|
|
|
// "displayOrder": 0, |
|
|
|
// "details": [ |
|
|
|
// { |
|
|
|
// "sumSuggestionHeaderId": "3a0c6589-9b6f-bbb1-bb8b-d6876ea5e4e6", |
|
|
|
// "suggestionContent": "控制饮食,少盐少油少糖少脂;\n加强锻炼。", |
|
|
|
// "displayOrder": 1 |
|
|
|
// } |
|
|
|
// ] |
|
|
|
// }, |
|
|
|
// ] |
|
|
|
console.log(`/api/app/sumsuggestionheader/getsumsuggestionlist?PatientRegisterId=${RegisterId}`) |
|
|
|
getapi(`/api/app/sumsuggestionheader/getsumsuggestionlist?PatientRegisterId=${RegisterId}`) |
|
|
|
|
|
|
|
// { |
|
|
|
// "patientRegisterId": "3a11ee70-02cb-c5e6-a087-79ecdd0356b6", |
|
|
|
// "isGetExistData": "Y" |
|
|
|
// } |
|
|
|
let body = { |
|
|
|
patientRegisterId: RegisterId, |
|
|
|
isGetExistData: 'Y', |
|
|
|
} |
|
|
|
// 旧接口: console.log(`/api/app/sumsuggestionheader/getsumsuggestionlist?PatientRegisterId=${RegisterId}`) |
|
|
|
postapi('/api/app/sumsuggestionheader/getsumsuggestionlist', body) |
|
|
|
.then((res) => { |
|
|
|
console.log("suggestionList", res.data); |
|
|
|
if (res.code != -1) { |
|
|
|
if (res.code > -1) { |
|
|
|
this.sumDoctorCheck.suggestionList = res.data; |
|
|
|
// 处理拖动排序使用 |
|
|
|
this.sumDoctorCheck.suggestionList.forEach((e, i) => { |
|
|
|
e.id = `suggestion_${i}` |
|
|
|
if (e.medicalInterpretations) { |
|
|
|
e.medicalInterpretations.forEach((e0, i0) => { |
|
|
|
e0.sumSuggestionHeaderId = `suggestion_${i}` |
|
|
|
e0.id = `medicalInterpretations_${i0}` |
|
|
|
}); |
|
|
|
} |
|
|
|
if (e.commonReasons) { |
|
|
|
e.commonReasons.forEach((e0, i0) => { |
|
|
|
e0.sumSuggestionHeaderId = `suggestion_${i}` |
|
|
|
e0.id = `commonReasons_${i0}` |
|
|
|
}); |
|
|
|
} |
|
|
|
if (e.healthGuidances) { |
|
|
|
e.healthGuidances.forEach((e0, i0) => { |
|
|
|
e0.sumSuggestionHeaderId = `suggestion_${i}` |
|
|
|
e0.id = `healthGuidances_${i0}` |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
@ -309,13 +331,102 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 诊断选择 |
|
|
|
changeDiagnosis(v){ |
|
|
|
console.log('changeDiagnosis',v) |
|
|
|
let suggestionTitle = [] |
|
|
|
if(v.length == 0){ |
|
|
|
this.sumDoctorCheck.suggestionList[this.suggestionCurRow]['suggestionTitle'] = '' |
|
|
|
return |
|
|
|
} |
|
|
|
//先找到是操作的建议行 |
|
|
|
let lv = `${v}` |
|
|
|
let suggestionList = deepCopy(this.sumDoctorCheck.suggestionList) |
|
|
|
suggestionList.forEach(e => { |
|
|
|
e.diagnosisIds = `${e.diagnosisIds}` |
|
|
|
}); |
|
|
|
let lfind = arrayExistObj(suggestionList,'diagnosisIds',lv) |
|
|
|
if(lfind == -1) return |
|
|
|
this.suggestionCurRow = lfind |
|
|
|
let sumSuggestionHeaderId = this.sumDoctorCheck.suggestionList[lfind].id |
|
|
|
v.forEach(e => { |
|
|
|
let ld = arrayExistObj(this.diagnosises,'id',e) |
|
|
|
if(ld > -1){ |
|
|
|
suggestionTitle.push(this.diagnosises[ld]["displayName"]) |
|
|
|
//添加医学解释 |
|
|
|
let medicalInterpretations = this.diagnosises[ld]['medicalInterpretations'] |
|
|
|
if(medicalInterpretations){ |
|
|
|
if(!this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations']) this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations'] = [] |
|
|
|
medicalInterpretations.forEach(e2 => { |
|
|
|
let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations'],"suggestionContent",e2.suggestionContent) |
|
|
|
if(lf == -1){ |
|
|
|
this.sumDoctorCheck.suggestionList[lfind]['medicalInterpretations'].push({ |
|
|
|
sumSuggestionHeaderId, |
|
|
|
suggestionContent:e2.suggestionContent, |
|
|
|
displayOrder: Math.random(), |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//添加常见原因 |
|
|
|
let commonReasons = this.diagnosises[ld]['commonReasons'] |
|
|
|
if(commonReasons){ |
|
|
|
if(!this.sumDoctorCheck.suggestionList[lfind]['commonReasons']) this.sumDoctorCheck.suggestionList[lfind]['commonReasons'] = [] |
|
|
|
commonReasons.forEach(e2 => { |
|
|
|
let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['commonReasons'],"suggestionContent",e2.suggestionContent) |
|
|
|
if(lf == -1){ |
|
|
|
this.sumDoctorCheck.suggestionList[lfind]['commonReasons'].push({ |
|
|
|
sumSuggestionHeaderId, |
|
|
|
suggestionContent:e2.suggestionContent, |
|
|
|
displayOrder: Math.random(), |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
//添加常见原因 |
|
|
|
let healthGuidances = this.diagnosises[ld]['healthGuidances'] |
|
|
|
if(healthGuidances){ |
|
|
|
if(!this.sumDoctorCheck.suggestionList[lfind]['healthGuidances']) this.sumDoctorCheck.suggestionList[lfind]['healthGuidances'] = [] |
|
|
|
healthGuidances.forEach(e2 => { |
|
|
|
let lf = arrayExistObj(this.sumDoctorCheck.suggestionList[lfind]['healthGuidances'],"suggestionContent",e2.suggestionContent) |
|
|
|
if(lf == -1){ |
|
|
|
this.sumDoctorCheck.suggestionList[lfind]['healthGuidances'].push({ |
|
|
|
sumSuggestionHeaderId, |
|
|
|
suggestionContent:e2.suggestionContent, |
|
|
|
displayOrder: Math.random(), |
|
|
|
}) |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
this.sumDoctorCheck.suggestionList[this.suggestionCurRow]['suggestionTitle'] = `${suggestionTitle}` |
|
|
|
}, |
|
|
|
|
|
|
|
//增加建议明细 |
|
|
|
addSug(index) { |
|
|
|
this.sumDoctorCheck.suggestionList[index].details.push({ |
|
|
|
sumSuggestionHeaderId: this.sumDoctorCheck.suggestionList[index].id, |
|
|
|
addSug(index, contentType) { |
|
|
|
this.suggestionCurRow = index |
|
|
|
|
|
|
|
let lcontentType = 'healthGuidances' |
|
|
|
switch (contentType) { |
|
|
|
case 0: |
|
|
|
lcontentType = 'medicalInterpretations' |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
lcontentType = 'commonReasons' |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
if (!this.sumDoctorCheck.suggestionList[index][lcontentType]) this.sumDoctorCheck.suggestionList[index][lcontentType] = [] |
|
|
|
this.sumDoctorCheck.suggestionList[index][lcontentType].push({ |
|
|
|
sumSuggestionHeaderId: this.sumDoctorCheck.suggestionList[index].id, // 拖拽用到 |
|
|
|
suggestionContent: '', |
|
|
|
displayOrder: Math.random(), |
|
|
|
}) |
|
|
|
console.log('this.sumDoctorCheck.suggestionList', index, this.sumDoctorCheck.suggestionList) |
|
|
|
}, |
|
|
|
|
|
|
|
//删除建议头及明细 |
|
|
|
@ -400,25 +511,47 @@ export default { |
|
|
|
return el |
|
|
|
}, |
|
|
|
|
|
|
|
rowClickSug(row,contentType) { |
|
|
|
console.log('rowClick row', row,contentType) |
|
|
|
rowClickSug0(row) { |
|
|
|
this.rowClickSug(row, 0) |
|
|
|
}, |
|
|
|
rowClickSug1(row) { |
|
|
|
this.rowClickSug(row, 1) |
|
|
|
}, |
|
|
|
rowClickSug2(row) { |
|
|
|
this.rowClickSug(row, 2) |
|
|
|
}, |
|
|
|
|
|
|
|
rowClickSug(row, contentType) { |
|
|
|
console.log('rowClick row', row, contentType) |
|
|
|
let lcontentType = 'healthGuidances' |
|
|
|
switch (contentType) { |
|
|
|
case 0: |
|
|
|
lcontentType = 'medicalInterpretations' |
|
|
|
break; |
|
|
|
case 1: |
|
|
|
lcontentType = 'commonReasons' |
|
|
|
break; |
|
|
|
default: |
|
|
|
break; |
|
|
|
} |
|
|
|
let lfind = arrayExistObj(this.sumDoctorCheck.suggestionList, 'id', row.sumSuggestionHeaderId) |
|
|
|
if (lfind > -1) { |
|
|
|
this.sugDetails = this.sumDoctorCheck.suggestionList[lfind].details |
|
|
|
this.rowDropSugDetail(contentType,row.sumSuggestionHeaderId) |
|
|
|
this.sugDetails = this.sumDoctorCheck.suggestionList[lfind][lcontentType] |
|
|
|
this.rowDropSugDetail(contentType, row.sumSuggestionHeaderId) |
|
|
|
} |
|
|
|
console.log('this.sumDetails', this.sugDetails) |
|
|
|
console.log('this.sumDetails', lfind, this.sugDetails) |
|
|
|
}, |
|
|
|
|
|
|
|
//建议明细拖拽 |
|
|
|
rowDropSugDetail(contentType,id) { |
|
|
|
rowDropSugDetail(contentType, id) { |
|
|
|
this.$nextTick(() => { |
|
|
|
const fEl = document.getElementById(`${contentType}_sug${id}`) // document.querySelector(`#${id} tbody`) querySelector为静态方法不支持动态传参; |
|
|
|
console.log('rowDropSumDetail tbody', fEl, fEl.children) //el.childNodes,el.children |
|
|
|
const el = this.findEl(fEl, 'TBODY') |
|
|
|
console.log('rowDropSumDetail tbody', el) //el.childNodes,el.children |
|
|
|
const that = this; |
|
|
|
Sortable.create(el, { |
|
|
|
if (this.detailsDrag) this.detailsDrag.destroy() |
|
|
|
this.detailsDrag = Sortable.create(el, { |
|
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
|
//拖拽结束 |
|
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
|
|