소스 검색

工艺路线隐藏按钮

qinhb 10 달 전
부모
커밋
2cf852fcfd
1개의 변경된 파일11개의 추가작업 그리고 6개의 파일을 삭제
  1. 11 6
      src/views/base/craftManagement/route/index.vue

+ 11 - 6
src/views/base/craftManagement/route/index.vue

@@ -9,7 +9,6 @@
       v-model:page="page"
       @row-save="createRow"
       @row-update="updateRow"
-      @row-del="deleteRow"
       @search-change="searchChange"
       @search-reset="resetChange"
       @size-change="dataList"
@@ -44,11 +43,19 @@
           link
           type="primary"
           icon="el-icon-edit"
-          :disabled="false"
+          v-if="row.usable === 0"
           @click="doEdit(row, index)"
           >编辑</el-button
         >
         <el-button
+            link
+            type="danger"
+            icon="el-icon-edit"
+            v-if="row.usable === 0"
+            @click="deleteRow(row, index)"
+        >删除</el-button
+        >
+        <el-button
           link
           icon="el-icon-copy-document"
           :disabled="false"
@@ -106,7 +113,6 @@
 <script setup>
 import { ref, getCurrentInstance } from "vue";
 import { useCrud } from "@/hooks/userCrud";
-import ButtonPermKeys from "@/common/configs/buttonPermission";
 import dictDataUtil from "@/common/configs/dictDataUtil";
 import { useDictionaryStore } from "@/store";
 import { copyRoute } from "@/api/craft/route/index";
@@ -114,9 +120,6 @@ import { copyRoute } from "@/api/craft/route/index";
 // 数据字典相关
 const { dicts } = useDictionaryStore();
 
-const testDebunce = () => {
-  console.log("执行了事件");
-};
 
 // 传入一个url,后面不带/
 const { form, data, option, search, page, toDeleteIds, Methords, Utils } =
@@ -229,6 +232,8 @@ const bindProcess = (row) => {
 option.value = Object.assign(option.value, {
   selection: true,
   labelWidth: 110,
+  menuWidth: 250,
+  delBtn: false,
   searchLabelWidth: 110,
   editBtn: false,
   column: [