소스 검색

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

chrislee 2 일 전
부모
커밋
06aaed6469
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  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>