Browse Source

fix: 修改监审目录更多

shiyanyu 1 day ago
parent
commit
f8a9a4b094
1 changed files with 125 additions and 79 deletions
  1. 125 79
      src/views/costAudit/baseInfo/catalogManage/index.vue

+ 125 - 79
src/views/costAudit/baseInfo/catalogManage/index.vue

@@ -197,9 +197,12 @@
         <el-table-column label="操作" width="360" fixed="right" align="center">
           <template slot-scope="scope">
             <div>
-              <!-- 前4个按钮保持展示 -->
               <el-button
-                v-if="$permission.getUserInfo().dataScope === 0"
+                v-if="
+                  $permission.getUserInfo().dataScope === 0 &&
+                  scope.row.status != 0 &&
+                  scope.row.nodeType !== 'nr'
+                "
                 v-region-permission="{
                   category: 'catalogManage',
                   action: 'edit',
@@ -211,7 +214,11 @@
                 修改类别
               </el-button>
               <el-button
-                v-if="$permission.getUserInfo().dataScope === 0"
+                v-if="
+                  $permission.getUserInfo().dataScope === 0 &&
+                  scope.row.status != 0 &&
+                  scope.row.nodeType !== 'nr'
+                "
                 v-region-permission="{
                   category: 'catalogManage',
                   action: 'add',
@@ -223,7 +230,12 @@
                 添加子类
               </el-button>
               <el-button
-                v-if="$permission.getUserInfo().dataScope === 0"
+                v-if="
+                  $permission.getUserInfo().dataScope === 0 &&
+                  !scope.row.auditType &&
+                  scope.row.status != 0 &&
+                  scope.row.nodeType !== 'nr'
+                "
                 v-region-permission="{
                   category: 'catalogManage',
                   action: 'add',
@@ -235,7 +247,11 @@
                 添加内容
               </el-button>
               <el-button
-                v-if="$permission.getUserInfo().dataScope === 0"
+                v-if="
+                  $permission.getUserInfo().dataScope === 0 &&
+                  scope.row.nodeType == 'nr' &&
+                  scope.row.status != 0
+                "
                 v-region-permission="{
                   category: 'catalogManage',
                   action: 'edit',
@@ -246,81 +262,111 @@
               >
                 修改内容
               </el-button>
-
-              <!-- 当操作按钮超过4个时,其余按钮收纳到“更多” -->
-              <template v-if="shouldUseMore(scope.row)">
-                <el-dropdown trigger="click" class="ml10">
-                  <el-button type="text" size="mini">
-                    更多
-                    <i class="el-icon-arrow-down el-icon--right"></i>
-                  </el-button>
-                  <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item
-                      @click.native="
-                        handleDropdownCommand('infoMaintain', scope.row)
-                      "
-                    >
-                      信息维护
-                    </el-dropdown-item>
-                    <el-dropdown-item
-                      v-if="$permission.getUserInfo().dataScope === 0"
-                      v-region-permission="{
-                        category: 'catalogManage',
-                        action: 'edit',
-                      }"
-                      divided
-                      @click.native="handleDropdownCommand('status', scope.row)"
-                    >
-                      {{ scope.row.status === 1 ? '停用' : '启用' }}
-                    </el-dropdown-item>
-                    <el-dropdown-item
-                      v-if="$permission.getUserInfo().dataScope === 0"
-                      v-region-permission="{
-                        category: 'catalogManage',
-                        action: 'delete',
-                      }"
-                      class="dropdown-delete"
-                      @click.native="handleDropdownCommand('delete', scope.row)"
-                    >
-                      删除
-                    </el-dropdown-item>
-                  </el-dropdown-menu>
-                </el-dropdown>
-              </template>
-
-              <!-- 不超过4个时,仍按原方式平铺显示 -->
-              <template v-else>
-                <el-button
-                  type="text"
-                  size="mini"
-                  @click="handleDropdownCommand('infoMaintain', scope.row)"
-                >
-                  信息维护
-                </el-button>
-                <el-button
-                  v-if="$permission.getUserInfo().dataScope === 0"
-                  v-region-permission="{
-                    category: 'catalogManage',
-                    action: 'edit',
-                  }"
-                  type="text"
-                  @click.native="handleDropdownCommand('status', scope.row)"
-                >
-                  {{ scope.row.status === 1 ? '停用' : '启用' }}
-                </el-button>
-                <el-button
-                  v-if="$permission.getUserInfo().dataScope === 0"
-                  v-region-permission="{
-                    category: 'catalogManage',
-                    action: 'delete',
-                  }"
-                  type="text"
-                  class="delete-btn"
-                  @click.native="handleDropdownCommand('delete', scope.row)"
-                >
-                  删除
+              <el-button
+                v-if="scope.row.nodeType === 'nr' && scope.row.status !== 0"
+                type="text"
+                size="mini"
+                @click="handleDropdownCommand('infoMaintain', scope.row)"
+              >
+                信息维护
+              </el-button>
+              <el-button
+                v-if="
+                  $permission.getUserInfo().dataScope === 0 &&
+                  scope.row.nodeType == 'nr' &&
+                  scope.row.status == 0
+                "
+                v-region-permission="{
+                  category: 'catalogManage',
+                  action: 'edit',
+                }"
+                type="text"
+                @click.native="handleDropdownCommand('status', scope.row)"
+              >
+                {{ scope.row.status === 1 ? '停用' : '启用' }}
+              </el-button>
+              <el-button
+                v-if="
+                  $permission.getUserInfo().dataScope === 0 &&
+                  scope.row.nodeType == 'lx' &&
+                  scope.row.status == 0
+                "
+                v-region-permission="{
+                  category: 'catalogManage',
+                  action: 'edit',
+                }"
+                type="text"
+                @click.native="handleDropdownCommand('status', scope.row)"
+              >
+                {{ scope.row.status === 1 ? '停用' : '启用' }}
+              </el-button>
+              <el-button
+                v-if="
+                  $permission.getUserInfo().dataScope === 0 &&
+                  scope.row.nodeType == 'nr'
+                "
+                v-region-permission="{
+                  category: 'catalogManage',
+                  action: 'delete',
+                }"
+                type="text"
+                class="delete-btn"
+                @click.native="handleDropdownCommand('delete', scope.row)"
+              >
+                删除
+              </el-button>
+              <!-- 第四个以后的按钮放入更多下拉菜单 -->
+              <el-dropdown
+                v-if="
+                  $permission.getUserInfo().dataScope === 0 &&
+                  scope.row.status != 0 &&
+                  scope.row.nodeType !== 'nr'
+                "
+                v-region-permission="{
+                  category: 'catalogManage',
+                  action: 'edit',
+                }"
+                trigger="click"
+                class="ml10"
+              >
+                <el-button type="text" size="mini">
+                  更多
+                  <i class="el-icon-arrow-down el-icon--right"></i>
                 </el-button>
-              </template>
+                <el-dropdown-menu slot="dropdown">
+                  <el-dropdown-item
+                    v-if="scope.row.nodeType == 'nr'"
+                    v-region-permission="{
+                      category: 'catalogManage',
+                      action: 'edit',
+                    }"
+                    @click.native="
+                      handleDropdownCommand('infoMaintain', scope.row)
+                    "
+                  >
+                    信息维护
+                  </el-dropdown-item>
+                  <el-dropdown-item
+                    v-region-permission="{
+                      category: 'catalogManage',
+                      action: 'edit',
+                    }"
+                    divided
+                    @click.native="handleDropdownCommand('status', scope.row)"
+                  >
+                    {{ scope.row.status === 1 ? '停用' : '启用' }}
+                  </el-dropdown-item>
+                  <el-dropdown-item
+                    v-region-permission="{
+                      category: 'catalogManage',
+                      action: 'delete',
+                    }"
+                    @click.native="handleDropdownCommand('delete', scope.row)"
+                  >
+                    删除
+                  </el-dropdown-item>
+                </el-dropdown-menu>
+              </el-dropdown>
             </div>
           </template>
         </el-table-column>