|
@@ -91,7 +91,7 @@
|
|
|
animation="300"
|
|
|
tag="div"
|
|
|
class="report-drag-item-wrap_child-wrap"
|
|
|
- @add="handleChildAdd($event,item)"
|
|
|
+ @add="handleChildAdd($event,item,index)"
|
|
|
@remove="handleChildRemove($event,item.child)"
|
|
|
handle=".drag-btn_c"
|
|
|
style="display: flex;gap: 20px;align-items: flex-start;"
|
|
@@ -510,7 +510,7 @@ export default {
|
|
|
// this.activeId=tempCompData.id
|
|
|
},
|
|
|
|
|
|
- handleChildAdd(e,parent){
|
|
|
+ handleChildAdd(e,parent,parentIndex){
|
|
|
console.log('child-onAdd操作------------------->');
|
|
|
// console.log(parent);
|
|
|
const {item,newDraggableIndex}=e
|
|
@@ -519,8 +519,8 @@ export default {
|
|
|
|
|
|
console.log(compData,newDraggableIndex);
|
|
|
|
|
|
- const index=parent.id?this.conList.findIndex(_e=>_e.id===parent.id):newDraggableIndex
|
|
|
- if(index>-1){
|
|
|
+ const index=parentIndex
|
|
|
+ // if(index>-1){
|
|
|
let obj=_.cloneDeep(this.conList[index])
|
|
|
|
|
|
console.log(obj);
|
|
@@ -588,7 +588,7 @@ export default {
|
|
|
console.log(obj);
|
|
|
|
|
|
this.conList.splice(index,1,obj)
|
|
|
- }
|
|
|
+ // }
|
|
|
},
|
|
|
|
|
|
handleParentMove(e){
|
|
@@ -806,6 +806,9 @@ export default {
|
|
|
this.$message.success('保存成功')
|
|
|
}
|
|
|
}
|
|
|
+ if(res.Msg==='报告已发布, 不允许编辑'){
|
|
|
+ this.$router.replace({ path: '/smartReportList' });
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
},
|
|
@@ -823,12 +826,13 @@ export default {
|
|
|
if(this.reportInfo.MsgIsSend==1){//该报告已经推送过模板消息
|
|
|
this.reportPublish({sendMsg:false})
|
|
|
}else{
|
|
|
+ const isPost = this.permissionBtn.checkPermissionBtn(this.permissionBtn.smartReportManageBtn.reportManage_sendMsg)
|
|
|
this.$confirm(
|
|
|
- '发布后,是否推送模板消息?',
|
|
|
+ isPost?'发布后,是否推送模板消息?':'是否立即发布报告?',
|
|
|
'发布提示',
|
|
|
{
|
|
|
- confirmButtonText: '推送',
|
|
|
- cancelButtonText: '不推送',
|
|
|
+ confirmButtonText: isPost?'推送':'发布',
|
|
|
+ cancelButtonText: isPost?'不推送':'取消',
|
|
|
type: 'warning',
|
|
|
distinguishCancelAndClose:true,
|
|
|
|
|
@@ -838,10 +842,12 @@ export default {
|
|
|
// this.isPublishloading = false;
|
|
|
} else if(action==='cancel') {
|
|
|
//cancelButton
|
|
|
- this.reportPublish({sendMsg:false})
|
|
|
+ if(isPost){
|
|
|
+ this.reportPublish({sendMsg:false})
|
|
|
+ }
|
|
|
}else {
|
|
|
//confirmButton
|
|
|
- this.reportPublish({sendMsg:true})
|
|
|
+ this.reportPublish({sendMsg:isPost?true:false})
|
|
|
}
|
|
|
done()
|
|
|
}
|