|
@@ -43,7 +43,7 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="opt-box">
|
|
|
+ <div class="opt-box" >
|
|
|
<!-- 我的看板 -->
|
|
|
<el-select
|
|
|
v-model="selectBoardId"
|
|
@@ -72,16 +72,16 @@
|
|
|
v-if="navType === 3"
|
|
|
></el-cascader>
|
|
|
|
|
|
- <div class="right-opt-box">
|
|
|
+ <div class="right-opt-box" v-if="boardInfo">
|
|
|
<el-button
|
|
|
v-if="navType === 1&&permissionBtn.isShowBtn('BIBoardPermission','BIBoard_setcommon')"
|
|
|
type="text"
|
|
|
@click="showSetCommon = true"
|
|
|
>设置公共</el-button
|
|
|
>
|
|
|
- <el-button type="text" @click="showSetShare = true" v-if="navType !== 3&&permissionBtn.isShowBtn('BIBoardPermission','BIBoard_setshare')">设置共享</el-button>
|
|
|
+ <el-button type="text" @click="showSetShare = true" v-if="navType !== 3&&permissionBtn.isShowBtn('BIBoardPermission','BIBoard_setshare')&¤tBoardIsSelf">设置共享</el-button>
|
|
|
<el-button type="text" @click="handleGoEdit" v-if="navType !== 3&&permissionBtn.isShowBtn('BIBoardPermission','BIBoard_edit')">编辑</el-button>
|
|
|
- <el-button type="text" style="color: #f00" v-if="navType !== 3&&permissionBtn.isShowBtn('BIBoardPermission','BIBoard_delete')&¤tBoardIsSelf">删除</el-button>
|
|
|
+ <el-button type="text" style="color: #f00" v-if="navType !== 3&&permissionBtn.isShowBtn('BIBoardPermission','BIBoard_delete')&¤tBoardIsSelf" @click="handleDeleteBoard">删除</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 看板内容模块 -->
|
|
@@ -119,7 +119,7 @@ export default {
|
|
|
boardInfo: null,//看板详情数据
|
|
|
boardDataList: [],//看板数据
|
|
|
|
|
|
- selectBoardId: 0,//当前选择的看板id
|
|
|
+ selectBoardId: '',//当前选择的看板id
|
|
|
myBoardList: [],
|
|
|
shareBoardList: [],
|
|
|
commonBoardList: [],
|
|
@@ -147,6 +147,31 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
|
|
|
+ // 删除看板
|
|
|
+ async handleDeleteBoard(){
|
|
|
+ await this.$confirm('删除后不可恢复,是否确认删除?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ })
|
|
|
+ const res=await apiBiBoard.deleteBoard({
|
|
|
+ BiDashboardId:this.boardInfo.BiDashboardId
|
|
|
+ })
|
|
|
+ if(res.Ret!==200) return
|
|
|
+ this.$message.success('删除成功')
|
|
|
+ this.selectBoardId =''
|
|
|
+ this.boardDataList = []
|
|
|
+ this.boardDetail = null
|
|
|
+ if (this.navType === 1) {
|
|
|
+ this.getMyBoardList()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.navType === 2) {
|
|
|
+ this.getShareBoardList()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
// 获取看板详情
|
|
|
async getBoardDetail() {
|
|
|
const res = await apiBiBoard.boardDetail({ DashboardId: this.selectBoardId })
|
|
@@ -238,7 +263,7 @@ export default {
|
|
|
if (this.navType === e) return
|
|
|
this.navType = e
|
|
|
|
|
|
- this.selectBoardId = 0
|
|
|
+ this.selectBoardId = ''
|
|
|
this.boardDataList = []
|
|
|
this.boardDetail = null
|
|
|
if (this.navType === 1) {
|