|
@@ -1,7 +1,8 @@
|
|
|
<template>
|
|
|
<div class='app-container'>
|
|
|
<div class="left">
|
|
|
- <el-button type="primary" plain icon="Plus" @click="getDialog()" v-hasPermi="['content:scene:addScene']">新增场景</el-button>
|
|
|
+ <el-button type="primary" plain icon="Plus" @click="getDialog()"
|
|
|
+ v-hasPermi="['content:scene:addScene']">新增场景</el-button>
|
|
|
<el-input class="search" v-model="data.form.takeName" placeholder="搜索场景名称" clearable>
|
|
|
<template #append>
|
|
|
<el-button icon="Search" @click="getSearch" />
|
|
@@ -51,6 +52,7 @@
|
|
|
|
|
|
<script setup>
|
|
|
import { list, submit, detail, remove } from '@/api/content/scene'
|
|
|
+import { checkPermi } from '@/utils/permission'
|
|
|
import GanttChart from '@/components/GanttChart/index.vue'
|
|
|
|
|
|
const baseUrl = ref(import.meta.env.VITE_APP_BASE_API)
|
|
@@ -103,12 +105,14 @@ function getSearch() {
|
|
|
|
|
|
// 拖拽结束
|
|
|
function onEnd(params) {
|
|
|
- if (params.from.className !== params.to.className) {
|
|
|
- proxy.$modal.confirm(`是否要添加?`).then(() => {
|
|
|
- getRouter({ audioList: JSON.stringify(params.item.__draggable_context.element), disabled: true })
|
|
|
- }).catch(() => {
|
|
|
- params.to.firstChild.remove()
|
|
|
- })
|
|
|
+ if (checkPermi(['content:scene:add'])) {
|
|
|
+ if (params.from.className !== params.to.className) {
|
|
|
+ proxy.$modal.confirm(`是否要添加?`).then(() => {
|
|
|
+ getRouter({ audioList: JSON.stringify(params.item.__draggable_context.element), disabled: true })
|
|
|
+ }).catch(() => {})
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ proxy.$modal.msgError('暂无权限')
|
|
|
}
|
|
|
}
|
|
|
|