فهرست منبع

Update vipActiveList.vue

lex-xin 4 سال پیش
والد
کامیت
92bdc145e9
1فایلهای تغییر یافته به همراه10 افزوده شده و 46 حذف شده
  1. 10 46
      src/views/categroyManager/vipActiveList.vue

+ 10 - 46
src/views/categroyManager/vipActiveList.vue

@@ -118,28 +118,15 @@
                            label="操作">
                            label="操作">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div>
               <div>
-                <!--   v-if="scope.row.enable > 0" -->
                 <el-button type="text"
                 <el-button type="text"
                            v-permission="'vipGroupActivity/update'"
                            v-permission="'vipGroupActivity/update'"
                            @click="reset(scope.row)">修改</el-button>
                            @click="reset(scope.row)">修改</el-button>
-                <!-- <el-button type='text'
-                @click="remove(scope.row)">删除</el-button>-->
-                <el-popover placement="top"
-                            width="160"
-                            v-permission="'vipGroupActivity/delete'"
-                            :ref="scope.$index">
-                  <p>确定删除?</p>
-                  <div style="text-align: right; margin: 0">
-                    <el-button size="mini"
-                               type="text"
-                               @click="scope._self.$refs[scope.$index].doClose()">取消</el-button>
-                    <el-button type="primary"
-                               size="mini"
-                               @click="remove(scope)">确定</el-button>
-                  </div>
-                  <el-button type="text"
-                             slot="reference">删除</el-button>
-                </el-popover>
+                <el-popconfirm
+                  title="确定删除?"
+                  @confirm="remove(scope)"
+                >
+                  <el-button type="text" slot="reference">删除</el-button>
+                </el-popconfirm>
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -154,7 +141,7 @@
     </div>
     </div>
     <el-dialog title="修改VIP活动"
     <el-dialog title="修改VIP活动"
                width="650px"
                width="650px"
-               :before-close="closeVipform"
+               :before-close="closeVipForm"
                :visible.sync="dialogVisible">
                :visible.sync="dialogVisible">
       <div>
       <div>
         <el-form :label-position="labelPosition"
         <el-form :label-position="labelPosition"
@@ -600,33 +587,12 @@ export default {
   },
   },
   methods: {
   methods: {
     async init () {
     async init () {
-      // if (this.$route.query.searchForm) {
-      //   this.$route.query.searchForm instanceof Object
-      //     ? (this.searchForm = this.$route.query.searchForm)
-      //     : (this.searchForm = JSON.parse(this.$route.query.searchForm));
-      // }
-      // if (this.$route.query.rules) {
-      //   this.$route.query.rules instanceof Object
-      //     ? (this.rules = this.$route.query.rules)
-      //     : (this.rules = JSON.parse(this.$route.query.rules));
-      // }
-      // getEmployeeOrgan().then(res => {
-      //   if (res.code == 200) {
-      //     this.organList = res.data;
-      //   }
-      // });
       // 获取类型
       // 获取类型
       await this.$store.dispatch('setVipGroupCategory')
       await this.$store.dispatch('setVipGroupCategory')
       // 获取分部
       // 获取分部
       await this.$store.dispatch('setBranchs')
       await this.$store.dispatch('setBranchs')
       this.getList();
       this.getList();
       // 首先获取课程形式
       // 首先获取课程形式
-      // 获取分部id
-      // vipGroupCategory().then(res => {
-      //   if (res.code == 200) {
-      //     this.courseStatusList = res.data;
-      //   }
-      // });
     },
     },
     loadNumber (event) {
     loadNumber (event) {
       var el = event.currentTarget;
       var el = event.currentTarget;
@@ -638,9 +604,7 @@ export default {
       } else {
       } else {
         return true;
         return true;
       }
       }
-
     },
     },
-
     onCheckAllBranch () {
     onCheckAllBranch () {
       // 适用所有分部
       // 适用所有分部
       this.resetForm.organ = [];
       this.resetForm.organ = [];
@@ -910,9 +874,9 @@ export default {
         }
         }
       });
       });
     },
     },
-    remove (scope) {
+    async remove (scope) {
       let id = scope.row.id;
       let id = scope.row.id;
-      removeVipActive({ id }).then(res => {
+      await removeVipActive({ id }).then(res => {
         if (res.code == 200) {
         if (res.code == 200) {
           this.$message.success("恭喜您删除成功");
           this.$message.success("恭喜您删除成功");
           this.getList();
           this.getList();
@@ -926,7 +890,7 @@ export default {
         path: "/vipClassSet/vipNewActive?type=create"
         path: "/vipClassSet/vipNewActive?type=create"
       });
       });
     },
     },
-    closeVipform () {
+    closeVipForm () {
       this.$refs["vipform"].resetFields();
       this.$refs["vipform"].resetFields();
       this.dialogVisible = false;
       this.dialogVisible = false;
     }
     }