Procházet zdrojové kódy

Merge branch 'develop/0.0.2(样式修改)' into test

DESKTOP-SVI9JE1\muzen před 1 rokem
rodič
revize
9a8b98d612
1 změnil soubory, kde provedl 6 přidání a 5 odebrání
  1. 6 5
      src/views/scene/presets/index.vue

+ 6 - 5
src/views/scene/presets/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class='app-container'>
     <div class="left">
-      <el-button type="primary" plain icon="Plus" @click="getDialog()"
+      <el-button type="primary" plain icon="Plus" @click="getAddDialog()"
         v-hasPermi="['scene:presets:addScene']">新增场景</el-button>
       <el-input class="search" v-model="data.form.takeName" placeholder="搜索场景名称" clearable>
         <template #append>
@@ -129,15 +129,16 @@ function onEnd(params) {
 const dialogVisible = ref(false)
 // 弹窗标题
 const title = ref('')
+const getAddDialog = () => {
+  dialogVisible.value = true
+  title.value = '新增'
+}
 // 打开弹窗
 function getDialog(row) {
   if (row.auditStatus === 2) {
     if (checkPermi(['scene:presets:editScene'])) {
       dialogVisible.value = true
-      title.value = '新增'
-      if (row.takeId) {
-        getDetail(row.takeId)
-      }
+      getDetail(row.takeId)
     }
   }
 }