瀏覽代碼

1108 17:10

11
mo 5 年之前
父節點
當前提交
4f45192c76
共有 3 個文件被更改,包括 35 次插入10 次删除
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/js/chunk-21a5b3d9.44c42426.js
  3. 35 10
      src/views/vipClass/vipList.vue

文件差異過大導致無法顯示
+ 0 - 0
dist/index.html


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/chunk-21a5b3d9.44c42426.js


+ 35 - 10
src/views/vipClass/vipList.vue

@@ -29,17 +29,21 @@
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-input v-model="searchForm.search" placeholder="课程名称"></el-input>
+          <el-input v-model="searchForm.search"
+                    placeholder="课程名称"></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button @click="getList" type="danger">搜索</el-button>
-          <el-button @click="onReSet" type="primary">重置</el-button>
+          <el-button @click="getList"
+                     type="danger">搜索</el-button>
+          <el-button @click="onReSet"
+                     type="primary">重置</el-button>
         </el-form-item>
       </el-form>
       <!-- 查询列表 -->
       <!-- tab -->
       <div class="tableWrap">
-        <el-table style="width: 100%" :header-cell-style="{background:'#EDEEF0',color:'#444'}"
+        <el-table style="width: 100%"
+                  :header-cell-style="{background:'#EDEEF0',color:'#444'}"
                   :data='tableData'>
           <el-table-column align='center'
                            prop="id"
@@ -75,7 +79,8 @@
               </div>
             </template>
           </el-table-column>
-          <el-table-column align='center' prop="vipGroupActivityName"
+          <el-table-column align='center'
+                           prop="vipGroupActivityName"
                            label="活动方案">
           </el-table-column>
           <el-table-column align='center'
@@ -127,9 +132,27 @@
                            @click="gotoVipDetail(scope.row.id)">查看</el-button>
                 <!-- 
                 <el-button type="text">启动</el-button> -->
-                <el-button type="text"
+                <!-- <el-button type="text"
                            v-if="scope.row.status <3"
-                           @click='closeVip(scope.row.id)'>关闭</el-button>
+                           @click='closeVip(scope.row.id)'>关闭</el-button> -->
+                <el-popover placement="top"
+                            width="160"
+                            v-if="scope.row.status <3"
+                            :ref="scope.$index">
+                  <p style='margin-bottom:10px;'>确定删除该vip课?</p>
+                  <el-input v-model="scope.row.stopReason"
+                            placeholder="请输入关闭原因"></el-input>
+                  <div style="text-align: right; margin-top: 20px">
+                    <el-button size="mini"
+                               type="text"
+                               @click="scope._self.$refs[scope.$index].doClose()">取消</el-button>
+                    <el-button type="primary"
+                               size="mini"
+                               @click="closeVip(scope)">确定</el-button>
+                  </div>
+                  <el-button type="text"
+                             slot="reference">删除</el-button>
+                </el-popover>
               </div>
             </template>
           </el-table-column>
@@ -189,7 +212,7 @@ export default {
     })
   },
   methods: {
-    onReSet() {
+    onReSet () {
       this.searchForm = {
         teacherId: null,
         activityId: null,
@@ -212,10 +235,12 @@ export default {
     gotoVipDetail (id) {
       this.$router.push({ path: '/business/vipDetail', query: { id } })
     },
-    closeVip (id) {
-      closeVip({ vipGroupId: id }).then(res => {
+    closeVip (scope) {
+      let id = scope.row.id;
+      closeVip({ vipGroupId: id, stopReason: scope.row.stopReason }).then(res => {
         if (res.code == 200) {
           this.$message.success('停止课程成功')
+          scope._self.$refs[scope.$index].doClose()
           this.getList();
         }
       })

部分文件因文件數量過多而無法顯示