|
@@ -89,9 +89,10 @@
|
|
|
<el-button
|
|
|
type="text"
|
|
|
@click="handleGoEdit"
|
|
|
- v-if="navType !== 3&&permissionBtn.isShowBtn('BIBoardPermission','BIBoard_edit')"
|
|
|
+ v-if="canEdit"
|
|
|
>{{boardInfo.IsEditing?boardInfo.Editor.Editor+'编辑中...':'编辑'}}</el-button>
|
|
|
- <el-button type="text" style="color: #f00" v-if="navType !== 3&&permissionBtn.isShowBtn('BIBoardPermission','BIBoard_delete')&¤tBoardIsSelf" @click="handleDeleteBoard">删除</el-button>
|
|
|
+ <el-button type="text" style="color: #f00" v-if="canDelete" @click="handleDeleteBoard">删除</el-button>
|
|
|
+ <el-button type="text" v-if="navType === 1&&[5,6].includes(boardInfo.State)" @click="handleBackSetCommon">撤销</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 看板内容模块 -->
|
|
@@ -120,6 +121,14 @@ export default {
|
|
|
if(!this.boardInfo) return false
|
|
|
const localAdminId=localStorage.getItem('AdminId')
|
|
|
return localAdminId==this.boardInfo.SysAdminId
|
|
|
+ },
|
|
|
+ canEdit(){
|
|
|
+ if(!this.boardInfo) return false
|
|
|
+ return this.navType !== 3&&this.permissionBtn.isShowBtn('BIBoardPermission','BIBoard_edit')&&this.boardInfo.State===1
|
|
|
+ },
|
|
|
+ canDelete(){
|
|
|
+ if(!this.boardInfo) return false
|
|
|
+ return this.navType !== 3&&this.permissionBtn.isShowBtn('BIBoardPermission','BIBoard_delete')&&this.currentBoardIsSelf&&this.boardInfo.State===1
|
|
|
}
|
|
|
},
|
|
|
data() {
|
|
@@ -162,6 +171,18 @@ export default {
|
|
|
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 撤回设置公共
|
|
|
+ handleBackSetCommon(){
|
|
|
+ apiBiBoard.cancelBoardCommon({
|
|
|
+ BiDashboardId:this.boardInfo.BiDashboardId,
|
|
|
+ }).then(res=>{
|
|
|
+ if(res.Ret===200){
|
|
|
+ this.$message.success('撤销成功')
|
|
|
+ this.getBoardDetail()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
async handleGoEdit() {
|
|
|
if(this.boardInfo.IsEditing&&this.boardInfo.Editor.AdminId!==Number(localStorage.getItem('AdminId'))){
|
|
|
this.$message.warning(`${this.boardInfo.Editor.Editor}${this.$t('Slides.editing_progress_msg') }...`)
|
|
@@ -258,12 +279,13 @@ export default {
|
|
|
if (res.Ret === 200) {
|
|
|
const myArr = res.Data.MyList || []
|
|
|
const otherArr = res.Data.OtherList || []
|
|
|
- const temarr = [...myArr, ...otherArr]
|
|
|
+ const boardIds = []
|
|
|
this.shareBoardList = [
|
|
|
{
|
|
|
label: '我共享的',
|
|
|
value: 'my_share',
|
|
|
children: myArr.map(item => {
|
|
|
+ boardIds.push(item.BiDashboardId)
|
|
|
return {
|
|
|
label: item.BiDashboardName,
|
|
|
value: item.BiDashboardId
|
|
@@ -275,6 +297,7 @@ export default {
|
|
|
value: 'other_share',
|
|
|
children: otherArr.map(item => {
|
|
|
const cArr=item.DashboardList.map(_i=>{
|
|
|
+ boardIds.push(_i.BiDashboardId)
|
|
|
return{
|
|
|
label: _i.BiDashboardName,
|
|
|
value: _i.BiDashboardId,
|
|
@@ -290,8 +313,8 @@ export default {
|
|
|
]
|
|
|
// 编辑了分类回调 不更新选择的看板仅仅更新公共看板列表数据
|
|
|
if(['update','init'].includes(type)) return
|
|
|
- if (temarr.length > 0) {
|
|
|
- this.selectBoardId = temarr[0].BiDashboardId
|
|
|
+ if (boardIds.length > 0) {
|
|
|
+ this.selectBoardId = boardIds[0]
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -336,7 +359,7 @@ export default {
|
|
|
|
|
|
this.selectBoardId = ''
|
|
|
this.boardDataList = []
|
|
|
- this.boardDetail = null
|
|
|
+ this.boardInfo = null
|
|
|
if (this.navType === 1) {
|
|
|
this.getMyBoardList()
|
|
|
return
|