Jelajahi Sumber

内容库缺陷

jiawuxian 1 tahun lalu
induk
melakukan
83c24144fc
2 mengubah file dengan 15 tambahan dan 16 penghapusan
  1. 2 2
      src/views/resumption/rule/index.vue
  2. 13 14
      src/views/safetycheck/rule/index.vue

+ 2 - 2
src/views/resumption/rule/index.vue

@@ -179,7 +179,7 @@
                   icon="el-icon-edit-outline"
                   @click="onManageContent(r.row.id)"
                   v-hasPermi="['resumption:rule:contentmanage']"
-                  v-if="orgId == r.row.orgId"
+                  v-if="orgId == r.row.orgId && r.row.status == 0"
                   >管理内容库</el-button
                 >
                 <el-button
@@ -188,7 +188,7 @@
                   icon="el-icon-view"
                   @click="onManageContent(r.row.id)"
                   v-hasPermi="['resumption:rule:contentmanage']"
-                  v-if="orgId != r.row.orgId"
+                  v-if="orgId != r.row.orgId || r.row.status == 1"
                   >查看内容库</el-button
                 >
                 <el-button

+ 13 - 14
src/views/safetycheck/rule/index.vue

@@ -159,12 +159,13 @@
             ></el-table-column>
             <el-table-column header-align="center" label="操作" width="250">
               <template slot-scope="r">
-                <div v-if="orgId == r.row.orgId">
+                <div>
                   <el-button
                     size="mini"
                     type="text"
                     icon="el-icon-edit-outline"
                     @click="onEdit(r.row.id)"
+                    v-if="orgId == r.row.orgId"
                     v-hasPermi="['safetycheck:rule:edit']"
                     >编辑</el-button
                   >
@@ -173,11 +174,19 @@
                     type="text"
                     icon="el-icon-edit-outline"
                     @click="onManageContent(r.row.id)"
-                    v-if="r.row.status == 0"
+                    v-if="r.row.status == 0 && orgId == r.row.orgId"
                     v-hasPermi="['safetycheck:rule:contentmanage']"
                     >管理内容库</el-button
                   >
-
+                  <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-view"
+                  @click="onManageContent(r.row.id)"
+                  v-if="r.row.status != 0 || orgId != r.row.orgId"
+                  v-hasPermi="['safetycheck:rule:contentmanage']"
+                  >查看内容库</el-button
+                >
                   <el-button
                     type="text"
                     size="mini"
@@ -188,17 +197,7 @@
                     v-hasPermi="['safetycheck:rule:remove']"
                     >删除</el-button
                   >
-                </div>
-                <div v-else>
-                  <el-button
-                    size="mini"
-                    type="text"
-                    icon="el-icon-view"
-                    @click="onManageContent(r.row.id)"
-                    v-hasPermi="['safetycheck:rule:contentmanage']"
-                    >查看内容库</el-button
-                  >
-                </div>
+                </div>                
               </template>
             </el-table-column>
           </el-table>