vbea 1 год назад
Родитель
Сommit
0975406d39

+ 2 - 1
Strides-Admin/src/views/limit2/detail.vue

@@ -131,6 +131,7 @@
         <plans
           :id="form.groupCreditPk"
           :groupPk="form.groupPk"
+          :canEdit="!form.onlyView"
           :canDelete="form.canDelete"
           v-if="form.groupCreditPk"
           @refresh="getLimitInfo"/>
@@ -156,7 +157,7 @@
         <div
           class="flex1"
           style="margin-left: 20px;"
-          v-if="isEdit">
+          v-if="isEdit && !form.onlyView">
           <span
             class="add-text"
             :title='"CREATED BY " + form.createdBy + " ON " + form.createdOn'>

+ 14 - 4
Strides-Admin/src/views/limit2/plans.vue

@@ -4,7 +4,8 @@
       <el-button
         type="primary"
         icon="el-icon-plus"
-        @click="showAddPlan">
+        @click="showAddPlan"
+        v-if="canEdit">
         Individual Plan
       </el-button>
     </div>
@@ -20,14 +21,18 @@
         align="center"
         label="Date Created"
         prop="createTime"
-        min-width="120"/>
+        min-width="150"/>
       <el-table-column
         align="center"
         label="Assigned Users"
         prop="assignedUsers"
         min-width="150">
         <template slot-scope="{row}">
-          <span class="link-type" @click="assignPlan(row)">{{row.assignedUsers}}</span>
+          <span
+            v-if="canEdit"
+            class="link-type"
+            @click="assignPlan(row)">{{row.assignedUsers}}</span>
+          <span v-else>{{row.assignedUsers}}</span>
         </template>
       </el-table-column>
       <el-table-column
@@ -38,7 +43,8 @@
       <el-table-column
         align="center"
         label="Action"
-        min-width="80">
+        min-width="80"
+        v-if="canEdit">
         <template slot-scope="{row, $index}">
           <el-dropdown
             class="action-dropdown"
@@ -116,6 +122,10 @@ export default {
       type: Number|String,
       default: ""
     },
+    canEdit: {
+      type: Boolean,
+      default: true
+    },
     canDelete: {
       type: Boolean,
       default: false