DESKTOP-SVI9JE1\muzen 1 سال پیش
والد
کامیت
a5c0299dae

+ 1 - 1
src/components/GanttChart/index.vue

@@ -191,7 +191,7 @@ function onEnd(params) {
       })
     }
   } else {
-    proxy.$modal.msgDanger('暂无权限')
+    proxy.$modal.msgError('暂无权限')
   }
 }
 

+ 9 - 6
src/views/content/insert/index.vue

@@ -52,6 +52,7 @@
 
 <script setup>
 import { useAudioList } from '@/hooks/index'
+import { checkPermi } from '@/utils/permission'
 import GanttChart from '@/components/GanttChart'
 
 const { proxy } = getCurrentInstance();
@@ -118,12 +119,14 @@ const getSearch = () => {
 
 // 拖拽结束
 function onEnd(params) {
-  if (params.from.className !== params.to.className) {
-    proxy.$modal.confirm(`是否要添加?`).then(() => {
-      getRouter({ audioList: JSON.stringify(params.item.__draggable_context.element) })
-    }).catch(() => {
-      params.to.firstChild.remove()
-    })
+  if (checkPermi(['content:insert:add'])) {
+    if (params.from.className !== params.to.className) {
+      proxy.$modal.confirm(`是否要添加?`).then(() => {
+        getRouter({ audioList: JSON.stringify(params.item.__draggable_context.element) })
+      }).catch(() => {})
+    }
+  } else {
+    proxy.$modal.msgError('暂无权限')
   }
 }
 

+ 11 - 7
src/views/content/scene/index.vue

@@ -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('暂无权限')
   }
 }
 

+ 9 - 6
src/views/content/setting/index.vue

@@ -52,6 +52,7 @@
 
 <script setup>
 import { useAudioList } from '@/hooks/index'
+import { checkPermi } from '@/utils/permission'
 import GanttChart from '@/components/GanttChart'
 
 const { proxy } = getCurrentInstance();
@@ -121,12 +122,14 @@ const getSearch = () => {
 
 // 拖拽结束
 function onEnd(params) {
-  if (params.from.className !== params.to.className) {
-    proxy.$modal.confirm(`是否要添加?`).then(() => {
-      getRouter({ audioList: JSON.stringify(params.item.__draggable_context.element) })
-    }).catch(() => {
-      params.to.firstChild.remove()
-    })
+  if (checkPermi(['content:setting:add'])) {
+    if (params.from.className !== params.to.className) {
+      proxy.$modal.confirm(`是否要添加?`).then(() => {
+        getRouter({ audioList: JSON.stringify(params.item.__draggable_context.element) })
+      }).catch(() => {})
+    }
+  }else{
+    proxy.$modal.msgError('暂无权限')
   }
 }