许成详 6 年 前
コミット
e3c8f604e2

+ 130
- 0
src/pages/system/courseManger/courseTag/index.vue ファイルの表示

@@ -0,0 +1,130 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h">
6
+          <el-button size="mini" type="success">新增课程标签</el-button>
7
+        </div>
8
+        <ul>
9
+          <li>
10
+            <span>选择案场:</span>
11
+            <el-select v-model="tableSearch.caseId" placeholder="请选择">
12
+              <el-option
13
+                v-for="item in caseList"
14
+                :key="item.value"
15
+                :label="item.label"
16
+                :value="item.value">
17
+              </el-option>
18
+            </el-select>
19
+          </li>
20
+        </ul>
21
+        <tableSearch value="请输入课程名称" @exportSearchKey="searchList"></tableSearch>
22
+      </div>
23
+      <div class="moreFilter"></div>
24
+    </div>
25
+    <div class="system-table-box">
26
+      <el-table
27
+        :data="tableData"
28
+        stripe
29
+        style="width: 100%">
30
+        <el-table-column
31
+          prop="courseName"
32
+          label="课程名称">
33
+        </el-table-column>
34
+        <el-table-column label="操作">
35
+          <template slot-scope="scope">
36
+            <el-button
37
+              size="mini"
38
+              @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
39
+            <el-button
40
+              size="mini"
41
+              type="danger"
42
+              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
43
+          </template>
44
+        </el-table-column>
45
+      </el-table>
46
+    </div>
47
+    <el-pagination
48
+      @size-change="handleSizeChange"
49
+      @current-change="handleCurrentChange"
50
+      :current-page.sync="currentPage"
51
+      :page-size="10"
52
+      layout="prev, pager, next, jumper"
53
+      :total="100">
54
+    </el-pagination>
55
+  </div>
56
+</template>
57
+
58
+<script>
59
+import tableSearch from '@/components/tableSearch/index'
60
+import { createNamespacedHelpers } from 'vuex'
61
+
62
+const { mapState: mapCaseState } = createNamespacedHelpers('case')
63
+
64
+export default {
65
+  name: '',
66
+  data () {
67
+    return {
68
+      currentPage: 0, // 当前页码
69
+      tableSearch: { // 表格搜索条件
70
+        key: '', // 搜索关键字
71
+        caseId: '', // 案场id
72
+      },
73
+      tableData: [{
74
+        courseName: 'xxx'
75
+      }, {
76
+        courseName: 'xxx'
77
+      }, {
78
+        courseName: 'xxx'
79
+      }, {
80
+        courseName: 'xxx'
81
+      }]
82
+    }
83
+  },
84
+  computed: {
85
+    ...mapCaseState({
86
+      caseList: x => x.caseList,
87
+    })
88
+  },
89
+  components: {
90
+    tableSearch,
91
+  },
92
+  methods: {
93
+    handleSizeChange (val) {
94
+      console.log(`每页 ${val} 条`)
95
+    },
96
+    handleCurrentChange (val) {
97
+      console.log(`当前页: ${val}`)
98
+    },
99
+    handleEdit (index, row) { // 编辑
100
+      console.log(index, row)
101
+    },
102
+    handleDelete (index, row) { // 删除
103
+      console.log(index, row)
104
+      this.$confirm('确认删除此课程?', '提示', {
105
+        confirmButtonText: '确定',
106
+        cancelButtonText: '取消',
107
+        type: 'warning'
108
+      }).then(() => {
109
+        this.$message({
110
+          type: 'success',
111
+          message: '删除成功!'
112
+        })
113
+      }).catch(() => {
114
+        this.$message({
115
+          type: 'info',
116
+          message: '已取消删除'
117
+        })
118
+      })
119
+    },
120
+    searchList (key) { // 搜索列表
121
+      console.log(key)
122
+    }
123
+  }
124
+}
125
+</script>
126
+
127
+<!-- Add "scoped" attribute to limit CSS to this component only -->
128
+<style lang="scss" scoped>
129
+@import "page.scss";
130
+</style>

+ 36
- 0
src/pages/system/courseManger/courseTag/page.scss ファイルの表示

@@ -0,0 +1,36 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+

+ 114
- 0
src/pages/system/courseManger/fiveA/index.vue ファイルの表示

@@ -0,0 +1,114 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-box">
4
+      <el-table
5
+        :data="tableData"
6
+        stripe
7
+        style="width: 100%">
8
+        <el-table-column
9
+          prop="title"
10
+          label="标题">
11
+        </el-table-column>
12
+        <el-table-column
13
+          prop="sort"
14
+          label="排序">
15
+        </el-table-column>
16
+        <el-table-column
17
+          prop="typeImg"
18
+          label="类型图片">
19
+          <template slot-scope="scope">
20
+            <a class="tableImg">
21
+              <img src="" class="centerLabel contain" alt="">
22
+            </a>
23
+          </template>
24
+        </el-table-column>
25
+        <el-table-column label="操作" width="300">
26
+          <template slot-scope="scope">
27
+            <el-button
28
+              size="mini"
29
+              type="success"
30
+              @click="addSubCourseType(scope.$index, scope.row)">添加下级课程类型</el-button>
31
+            <el-button
32
+              size="mini"
33
+              @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
34
+            <el-button
35
+              size="mini"
36
+              type="danger"
37
+              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
38
+          </template>
39
+        </el-table-column>
40
+      </el-table>
41
+    </div>
42
+  </div>
43
+</template>
44
+
45
+<script>
46
+import tableSearch from '@/components/tableSearch/index'
47
+import { createNamespacedHelpers } from 'vuex'
48
+
49
+const { mapState: mapCaseState } = createNamespacedHelpers('case')
50
+
51
+export default {
52
+  name: '',
53
+  data () {
54
+    return {
55
+      tableData: [{
56
+        title: 'xxx',
57
+        sort: 'xxx',
58
+        typeImg: ''
59
+      }, {
60
+        title: 'xxx',
61
+        sort: 'xxx',
62
+        typeImg: ''
63
+      }, {
64
+        title: 'xxx',
65
+        sort: 'xxx',
66
+        typeImg: ''
67
+      }, {
68
+        title: 'xxx',
69
+        sort: 'xxx',
70
+        typeImg: ''
71
+      }]
72
+    }
73
+  },
74
+  computed: {
75
+    ...mapCaseState({
76
+      caseList: x => x.caseList,
77
+    })
78
+  },
79
+  components: {
80
+    tableSearch,
81
+  },
82
+  methods: {
83
+    addSubCourseType (index, row) { // 添加下级课程类型
84
+      console.log(index, row)
85
+    },
86
+    handleEdit (index, row) { // 编辑
87
+      console.log(index, row)
88
+    },
89
+    handleDelete (index, row) { // 删除
90
+      console.log(index, row)
91
+      this.$confirm('确认删除此数据?', '提示', {
92
+        confirmButtonText: '确定',
93
+        cancelButtonText: '取消',
94
+        type: 'warning'
95
+      }).then(() => {
96
+        this.$message({
97
+          type: 'success',
98
+          message: '删除成功!'
99
+        })
100
+      }).catch(() => {
101
+        this.$message({
102
+          type: 'info',
103
+          message: '已取消删除'
104
+        })
105
+      })
106
+    }
107
+  }
108
+}
109
+</script>
110
+
111
+<!-- Add "scoped" attribute to limit CSS to this component only -->
112
+<style lang="scss" scoped>
113
+@import "page.scss";
114
+</style>

+ 36
- 0
src/pages/system/courseManger/fiveA/page.scss ファイルの表示

@@ -0,0 +1,36 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+

+ 5
- 9
src/pages/system/index.vue ファイルの表示

@@ -80,19 +80,15 @@ export default {
80 80
           children: [],
81 81
         }],
82 82
       }, {
83
-        title: '一级菜单3',
83
+        title: '课程管理',
84 84
         pathName: '',
85 85
         children: [{
86
-          title: '二级菜单1',
87
-          pathName: '',
86
+          title: '全龄生活5A',
87
+          pathName: 'fiveA',
88 88
           children: [],
89 89
         }, {
90
-          title: '二级菜单2',
91
-          pathName: '',
92
-          children: [],
93
-        }, {
94
-          title: '二级菜单3',
95
-          pathName: '',
90
+          title: '课程标签',
91
+          pathName: 'courseTag',
96 92
           children: [],
97 93
         }],
98 94
       }, {

+ 17
- 2
src/pages/system/page.js ファイルの表示

@@ -2,13 +2,18 @@
2 2
 import system from './index' // 系统首页
3 3
 
4 4
 import channelList from './channelManager/channelList/index' // 渠道管理
5
-import customerList from './customerManagement/customerList/index' // 会员列表
6
-import roleList from './roleManagement/roleList/index' // 角色列表
7 5
 import caseInfo from './caseManger/caseInfo/index' // 案场信息
8 6
 import keyManger from './caseManger/keyManger/index' // 钥匙管理
9 7
 import caseAreaManger from './caseManger/caseAreaManger/index' // 案场区域管理
10 8
 import caseTableManger from './caseManger/caseTableManger/index' // 案场桌位管理
11 9
 
10
+import fiveA from './courseManger/fiveA/index' // 全龄生活5A
11
+import courseTag from './courseManger/courseTag/index' // 课程标签
12
+
13
+import customerList from './customerManagement/customerList/index' // 会员列表
14
+
15
+import roleList from './roleManagement/roleList/index' // 角色列表
16
+
12 17
 export default {
13 18
   router: [
14 19
     {
@@ -40,6 +45,16 @@ export default {
40 45
         name: 'caseTableManger',
41 46
         component: caseTableManger,
42 47
         children: [],
48
+      }, { // 全龄生活5A
49
+        path: 'fiveA',
50
+        name: 'fiveA',
51
+        component: fiveA,
52
+        children: [],
53
+      }, { // 课程标签
54
+        path: 'courseTag',
55
+        name: 'courseTag',
56
+        component: courseTag,
57
+        children: [],
43 58
       }, {
44 59
         path: 'customerList',
45 60
         name: 'customerList',