Browse Source

样式和复制功能的权限控制调整

zhoujump 1 tháng trước cách đây
mục cha
commit
a6d2bd2013

+ 1 - 0
src/views/exhibitorManage/exhibitorList.vue

@@ -240,6 +240,7 @@ export default Vue.extend({
             color: #DC2626;
           }
           &.disable{
+            cursor: not-allowed;
             color: grey;
           }
         }

+ 26 - 6
src/views/preRegManage/list.vue

@@ -32,6 +32,14 @@ export default Vue.extend({
       }, 500)
     },
     edit(row) {
+      if (row.is_use) {
+        this.$notify({
+          title: '提示',
+          message: '此表单已经发布,无法修改',
+          type: 'warning'
+        })
+        return
+      }
       this.$router.push({ path: '/preRegister/edit/' + row.id })
     },
     copy(row) {
@@ -47,6 +55,14 @@ export default Vue.extend({
       })
     },
     del(row) {
+      if (row.is_use) {
+        this.$notify({
+          title: '提示',
+          message: '此表单已经发布,无法修改',
+          type: 'warning'
+        })
+        return
+      }
       this.$confirm('确定删除表单"' + row.template_name + '"吗?此操作无法撤销!', '删除表单', {
         confirmButtonText: '确定',
         cancelButtonText: '取消',
@@ -84,7 +100,7 @@ export default Vue.extend({
         this.formList = res.data.data
         this.loading = false
       })
-    },
+    }
   }
 })
 </script>
@@ -92,11 +108,11 @@ export default Vue.extend({
 <template>
   <div class="main-box">
     <div class="head">
-      <el-input v-permission="'preReg.search'" v-model="searchWord" prefix-icon="el-icon-search" placeholder="搜索表单名称" class="input" @input="search">
+      <el-input v-model="searchWord" v-permission="'preReg.search'" prefix-icon="el-icon-search" placeholder="搜索表单名称" class="input" @input="search">
         <el-button v-if="searchWord" slot="append" icon="el-icon-delete" @click="searchWord='';search()" />
       </el-input>
       <el-button v-permission="'preReg.creat'" icon="el-icon-plus" type="primary" @click="handleCreate">创建表单</el-button>
-<!--      <el-button icon="el-icon-copy-document">批量复制</el-button>-->
+      <!--      <el-button icon="el-icon-copy-document">批量复制</el-button>-->
     </div>
     <div class="body">
       <el-table v-loading="loading" :data="formList" height="100%" class="table">
@@ -132,10 +148,10 @@ export default Vue.extend({
           width="200"
         >
           <template slot-scope="scope">
-            <span v-permission="'preReg.handelEdit'" class="button" @click="edit(scope.row)">编辑</span>
+            <span v-permission="'preReg.handelEdit'" :class="['button',scope.row.is_use?'disable':'']" @click="edit(scope.row)">编辑</span>
             <span v-permission="'preReg.handelCopy'" class="button" @click="copy(scope.row)">复制</span>
             <span v-permission="'preReg.handelDisable'" class="button" @click="setStatus(scope.row)">{{ scope.row.status?'启用':'禁用' }}</span>
-            <span v-permission="'preReg.handelDelete'" class="button del" @click="del(scope.row)">删除</span>
+            <span v-permission="'preReg.handelDelete'" :class="['button','del',scope.row.is_use?'disable':'']" @click="del(scope.row)">删除</span>
           </template>
         </el-table-column>
       </el-table>
@@ -150,10 +166,10 @@ export default Vue.extend({
       <el-pagination
         v-permission="'preReg.changePage'"
         background
-        @current-change="current_page=$event;getList()"
         :page-size="page_size"
         layout="prev, pager, next"
         :total="total"
+        @current-change="current_page=$event;getList()"
       />
     </div>
   </div>
@@ -189,6 +205,10 @@ export default Vue.extend({
           &.del{
             color: #DC2626;
           }
+          &.disable{
+            cursor: not-allowed;
+            color: grey;
+          }
         }
         .status{
           padding: 0 12px;