Browse Source

优化操作列的按钮显示逻辑,确保在禁用状态下不显示新建和修改工艺按钮

chrislee 1 day ago
parent
commit
06aaed6469
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/views/modules/tech/project-tech-submit.vue

+ 4 - 3
src/views/modules/tech/project-tech-submit.vue

@@ -112,13 +112,14 @@
         <el-table-column prop="notes" header-align="center" align="center" min-width="140"
           :show-tooltip-when-overflow="true" label="备注">
         </el-table-column>
-        <el-table-column v-if="!disabled" fixed="right" prop="disposal" header-align="center" align="center" width="150"
+        <el-table-column fixed="right" prop="disposal" header-align="center" align="center" width="150"
           :show-tooltip-when-overflow="true" label="操作">
           <template slot-scope="scope">
-            <el-button type="text" v-if="scope.row.techId == null || scope.row.techId == 0"
+            <el-button type="text" v-if="!disabled && (scope.row.techId == null || scope.row.techId == 0)"
               @click="handleCrafts(0, scope.row.productId)">新建工艺</el-button>
             <template v-else>
-              <el-button type="text" @click="handleCrafts(scope.row.techId, scope.row.productId)">修改工艺</el-button>
+              <el-button v-if="!disabled" type="text"
+                @click="handleCrafts(scope.row.techId, scope.row.productId)">修改工艺</el-button>
               <el-button type="text" @click="exportCraft(scope.row)">导出</el-button>
             </template>
           </template>