|
@@ -1435,12 +1435,14 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 移动的为指标层 四级
|
|
|
- handleMoveChart(b,a,i,e){
|
|
|
- let PrevChartInfoId=0,NextChartInfoId=0,targetIndex=0, list=a.parent.childNodes.map(_ => _.data)
|
|
|
+ async handleMoveChart(b,a,i,e){
|
|
|
+ let PrevChartInfoId=0,NextChartInfoId=0,targetIndex=0,ParentClassifyId=0, list=a.parent.childNodes.map(_ => _.data)
|
|
|
if(i==='inner'){
|
|
|
+ ParentClassifyId=a.data.ChartClassifyId;
|
|
|
PrevChartInfoId=0
|
|
|
NextChartInfoId=a.data.Children.length>1?a.data.Children[1].ChartInfoId:0
|
|
|
}else{
|
|
|
+ ParentClassifyId=a.data.ParentId;
|
|
|
list.forEach((item,index)=>{
|
|
|
if(item.ChartInfoId===b.data.ChartInfoId){
|
|
|
targetIndex=index
|
|
@@ -1459,18 +1461,26 @@ export default {
|
|
|
NextChartInfoId=list[targetIndex+1].ChartInfoId
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- dataBaseInterface.chartMove({
|
|
|
- ChartClassifyId: a.data.ChartClassifyId,
|
|
|
- ChartInfoId: b.data.ChartInfoId,
|
|
|
- PrevChartInfoId: PrevChartInfoId,
|
|
|
- NextChartInfoId:NextChartInfoId
|
|
|
- }).then((res) => {
|
|
|
- if (res.Ret === 200) {
|
|
|
- this.$message.success(this.$t('MsgPrompt.move_success_msg'));
|
|
|
- }
|
|
|
- this.getTreeData();
|
|
|
+ const res = this.classifyShowType == 'public'
|
|
|
+ ? await chartBaseV2Interface.movePublicClassify({
|
|
|
+ ClassifyId: 0,
|
|
|
+ NextClassifyId:0,
|
|
|
+ PrevClassifyId:0,
|
|
|
+ ParentClassifyId,
|
|
|
+ ChartInfoId: b.data.ChartInfoId,
|
|
|
+ PrevChartInfoId: PrevChartInfoId,
|
|
|
+ NextChartInfoId:NextChartInfoId,
|
|
|
+ })
|
|
|
+ : await dataBaseInterface.chartMove({
|
|
|
+ ChartClassifyId: a.data.ChartClassifyId,
|
|
|
+ ChartInfoId: b.data.ChartInfoId,
|
|
|
+ PrevChartInfoId: PrevChartInfoId,
|
|
|
+ NextChartInfoId:NextChartInfoId
|
|
|
});
|
|
|
+ if (res.Ret === 200) {
|
|
|
+ this.$message.success(this.$t('MsgPrompt.move_success_msg'));
|
|
|
+ }
|
|
|
+ this.getTreeData();
|
|
|
},
|
|
|
|
|
|
/* 拖拽覆盖添加背景色 */
|