许成详 6 years ago
parent
commit
d8dd1332b2

+ 139
- 0
src/pages/system/cmsManger/bannerManger/index.vue View File

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

+ 36
- 0
src/pages/system/cmsManger/bannerManger/page.scss View File

@@ -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
+

+ 19
- 0
src/pages/system/cmsManger/index.vue View File

@@ -0,0 +1,19 @@
1
+<template>
2
+  <div class="mainPage">
3
+    <router-view></router-view>
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+export default {
9
+  name: '',
10
+  data () {
11
+    return {}
12
+  },
13
+  components: {}
14
+}
15
+</script>
16
+
17
+<!-- Add "scoped" attribute to limit CSS to this component only -->
18
+<style lang="scss" scoped>
19
+</style>

+ 134
- 0
src/pages/system/cmsManger/indexMsg/index.vue View File

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

+ 36
- 0
src/pages/system/cmsManger/indexMsg/page.scss View File

@@ -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
+

+ 179
- 0
src/pages/system/cmsManger/majorProjects/index.vue View File

@@ -0,0 +1,179 @@
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="name"
32
+          label="名称">
33
+        </el-table-column>
34
+        <el-table-column
35
+          prop="title"
36
+          label="标题">
37
+        </el-table-column>
38
+        <el-table-column
39
+          prop="caseName"
40
+          label="对应案场">
41
+        </el-table-column>
42
+        <el-table-column
43
+          prop="creatTime"
44
+          label="创建时间">
45
+        </el-table-column>
46
+        <el-table-column label="操作" width="450">
47
+          <template slot-scope="scope">
48
+            <el-button v-if="!scope.row.isShow"
49
+              size="mini"
50
+              type="primary"
51
+              @click="showItem(scope.$index, scope.row)">前台展示</el-button>
52
+            <el-button v-if="scope.row.isShow"
53
+              size="mini"
54
+              type="danger"
55
+              @click="cancelShowItem(scope.$index, scope.row)">取消前台展示</el-button>
56
+            <el-button
57
+              size="mini"
58
+              type="warning"
59
+              @click="editItem(scope.$index, scope.row)">编辑</el-button>
60
+            <el-button
61
+              size="mini"
62
+              @click="copyItemUrl(scope.$index, scope.row)">复制专题链接</el-button>
63
+            <el-button
64
+              size="mini"
65
+              type="danger"
66
+              @click="deleteItem(scope.$index, scope.row)">删除</el-button>
67
+          </template>
68
+        </el-table-column>
69
+      </el-table>
70
+    </div>
71
+    <el-pagination
72
+      @size-change="handleSizeChange"
73
+      @current-change="handleCurrentChange"
74
+      :current-page.sync="currentPage"
75
+      :page-size="10"
76
+      layout="prev, pager, next, jumper"
77
+      :total="100">
78
+    </el-pagination>
79
+  </div>
80
+</template>
81
+
82
+<script>
83
+import tableSearch from '@/components/tableSearch/index'
84
+import { createNamespacedHelpers } from 'vuex'
85
+
86
+const { mapState: mapCaseState } = createNamespacedHelpers('case')
87
+
88
+export default {
89
+  name: '',
90
+  data () {
91
+    return {
92
+      currentPage: 0, // 当前页码
93
+      tableSearch: { // 表格搜索条件
94
+        key: '', // 搜索关键字
95
+        caseId: '', // 案场id
96
+      },
97
+      tableData: [{
98
+        name: 'xxx',
99
+        title: 'xxx',
100
+        caseName: 'xxx',
101
+        creatTime: 'xxx',
102
+        isShow: false
103
+      }, {
104
+        name: 'xxx',
105
+        title: 'xxx',
106
+        caseName: 'xxx',
107
+        creatTime: 'xxx',
108
+        isShow: false
109
+      }, {
110
+        name: 'xxx',
111
+        title: 'xxx',
112
+        caseName: 'xxx',
113
+        creatTime: 'xxx',
114
+        isShow: false
115
+      }, {
116
+        name: 'xxx',
117
+        title: 'xxx',
118
+        caseName: 'xxx',
119
+        creatTime: 'xxx',
120
+        isShow: false
121
+      }]
122
+    }
123
+  },
124
+  computed: {
125
+    ...mapCaseState({
126
+      caseList: x => x.caseList,
127
+    })
128
+  },
129
+  components: {
130
+    tableSearch,
131
+  },
132
+  methods: {
133
+    handleSizeChange (val) {
134
+      console.log(`每页 ${val} 条`)
135
+    },
136
+    handleCurrentChange (val) {
137
+      console.log(`当前页: ${val}`)
138
+    },
139
+    showItem (index, row) { // 前台显示
140
+      console.log(index, row)
141
+    },
142
+    cancelShowItem (index, row) { // 取消前台显示
143
+      console.log(index, row)
144
+    },
145
+    editItem (index, row) { // 编辑
146
+      console.log(index, row)
147
+    },
148
+    copyItemUrl (index, row) { // 复制专题链接
149
+      console.log(index, row)
150
+    },
151
+    deleteItem (index, row) { // 删除
152
+      console.log(index, row)
153
+      this.$confirm('确认删除此项目专题?', '提示', {
154
+        confirmButtonText: '确定',
155
+        cancelButtonText: '取消',
156
+        type: 'warning'
157
+      }).then(() => {
158
+        this.$message({
159
+          type: 'success',
160
+          message: '删除成功!'
161
+        })
162
+      }).catch(() => {
163
+        this.$message({
164
+          type: 'info',
165
+          message: '已取消删除'
166
+        })
167
+      })
168
+    },
169
+    searchList (key) { // 搜索列表
170
+      console.log(key)
171
+    }
172
+  }
173
+}
174
+</script>
175
+
176
+<!-- Add "scoped" attribute to limit CSS to this component only -->
177
+<style lang="scss" scoped>
178
+@import "page.scss";
179
+</style>

+ 36
- 0
src/pages/system/cmsManger/majorProjects/page.scss View File

@@ -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
+

+ 150
- 0
src/pages/system/cmsManger/newsManger/index.vue View File

@@ -0,0 +1,150 @@
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
+        <tableSearch @exportSearchKey="searchList"></tableSearch>
9
+      </div>
10
+      <div class="moreFilter"></div>
11
+    </div>
12
+    <div class="system-table-box">
13
+      <el-table
14
+        :data="tableData"
15
+        stripe
16
+        style="width: 100%">
17
+        <el-table-column
18
+          prop="img"
19
+          label="图片">
20
+        </el-table-column>
21
+        <el-table-column
22
+          prop="title"
23
+          label="标题">
24
+        </el-table-column>
25
+        <el-table-column
26
+          prop="position"
27
+          label="位置">
28
+        </el-table-column>
29
+        <el-table-column
30
+          prop="isShow"
31
+          label="是否显示">
32
+        </el-table-column>
33
+        <el-table-column
34
+          prop="toIndex"
35
+          label="推荐至首页">
36
+        </el-table-column>
37
+        <el-table-column label="操作">
38
+          <template slot-scope="scope">
39
+            <el-button
40
+              size="mini"
41
+              type="warning"
42
+              @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
43
+            <el-button
44
+              size="mini"
45
+              type="danger"
46
+              @click="handleDelete(scope.$index, scope.row)">删除</el-button>
47
+          </template>
48
+        </el-table-column>
49
+      </el-table>
50
+    </div>
51
+    <el-pagination
52
+      @size-change="handleSizeChange"
53
+      @current-change="handleCurrentChange"
54
+      :current-page.sync="currentPage"
55
+      :page-size="10"
56
+      layout="prev, pager, next, jumper"
57
+      :total="100">
58
+    </el-pagination>
59
+  </div>
60
+</template>
61
+
62
+<script>
63
+import tableSearch from '@/components/tableSearch/index'
64
+import { createNamespacedHelpers } from 'vuex'
65
+
66
+const { mapState: mapCaseState } = createNamespacedHelpers('case')
67
+
68
+export default {
69
+  name: '',
70
+  data () {
71
+    return {
72
+      currentPage: 0, // 当前页码
73
+      tableSearch: { // 表格搜索条件
74
+        key: '', // 搜索关键字
75
+        caseId: '', // 案场id
76
+      },
77
+      tableData: [{
78
+        img: 'xxx',
79
+        title: 'xxx',
80
+        position: 'xxx',
81
+        isShow: 'xxx',
82
+        toIndex: 'xxx'
83
+      }, {
84
+        img: 'xxx',
85
+        title: 'xxx',
86
+        position: 'xxx',
87
+        isShow: 'xxx',
88
+        toIndex: 'xxx'
89
+      }, {
90
+        img: 'xxx',
91
+        title: 'xxx',
92
+        position: 'xxx',
93
+        isShow: 'xxx',
94
+        toIndex: 'xxx'
95
+      }, {
96
+        img: 'xxx',
97
+        title: 'xxx',
98
+        position: 'xxx',
99
+        isShow: 'xxx',
100
+        toIndex: 'xxx'
101
+      }]
102
+    }
103
+  },
104
+  computed: {
105
+    ...mapCaseState({
106
+      caseList: x => x.caseList,
107
+    })
108
+  },
109
+  components: {
110
+    tableSearch,
111
+  },
112
+  methods: {
113
+    handleSizeChange (val) {
114
+      console.log(`每页 ${val} 条`)
115
+    },
116
+    handleCurrentChange (val) {
117
+      console.log(`当前页: ${val}`)
118
+    },
119
+    handleEdit (index, row) { // 编辑
120
+      console.log(index, row)
121
+    },
122
+    handleDelete (index, row) { // 删除
123
+      console.log(index, row)
124
+      this.$confirm('确认删除此资讯?', '提示', {
125
+        confirmButtonText: '确定',
126
+        cancelButtonText: '取消',
127
+        type: 'warning'
128
+      }).then(() => {
129
+        this.$message({
130
+          type: 'success',
131
+          message: '删除成功!'
132
+        })
133
+      }).catch(() => {
134
+        this.$message({
135
+          type: 'info',
136
+          message: '已取消删除'
137
+        })
138
+      })
139
+    },
140
+    searchList (key) { // 搜索列表
141
+      console.log(key)
142
+    }
143
+  }
144
+}
145
+</script>
146
+
147
+<!-- Add "scoped" attribute to limit CSS to this component only -->
148
+<style lang="scss" scoped>
149
+@import "page.scss";
150
+</style>

+ 36
- 0
src/pages/system/cmsManger/newsManger/page.scss View File

@@ -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
+

+ 20
- 0
src/pages/system/index.vue View File

@@ -95,6 +95,26 @@ export default {
95 95
           pathName: 'goodsSpecManger',
96 96
           children: [],
97 97
         }],
98
+      }, {
99
+        title: 'CMS管理',
100
+        pathName: '',
101
+        children: [{
102
+          title: '轮播图管理',
103
+          pathName: 'bannerManger',
104
+          children: [],
105
+        }, {
106
+          title: '售楼处项目专题',
107
+          pathName: 'majorProjects',
108
+          children: [],
109
+        }, {
110
+          title: '首页消息',
111
+          pathName: 'indexMsg',
112
+          children: [],
113
+        }, {
114
+          title: '资讯管理',
115
+          pathName: 'newsManger',
116
+          children: [],
117
+        }],
98 118
       }, {
99 119
         title: '渠道管理',
100 120
         pathName: '',

+ 31
- 0
src/pages/system/page.js View File

@@ -15,6 +15,12 @@ import goodsManger from './goodsManger/index' // 商品管理
15 15
 import goodsTypeManger from './goodsManger/goodsTypeManger/index' // 商品类型管理
16 16
 import goodsSpecManger from './goodsManger/goodsSpecManger/index' // 商品规格管理
17 17
 
18
+import cmsManger from './cmsManger/index' // cms管理
19
+import bannerManger from './cmsManger/bannerManger/index' // 轮播图管理
20
+import majorProjects from './cmsManger/majorProjects/index' // 售楼处项目专题
21
+import indexMsg from './cmsManger/indexMsg/index' // 首页消息
22
+import newsManger from './cmsManger/newsManger/index' // 资讯管理
23
+
18 24
 import channelManger from './channelManager/index' // 渠道管理
19 25
 import channelList from './channelManager/channelList/index' // 渠道列表
20 26
 
@@ -83,6 +89,31 @@ export default {
83 89
           component: goodsSpecManger,
84 90
           children: []
85 91
         }],
92
+      }, { // cms管理
93
+        path: 'cmsManger',
94
+        name: 'cmsManger',
95
+        component: cmsManger,
96
+        children: [{ // 轮播图管理
97
+          path: 'bannerManger',
98
+          name: 'bannerManger',
99
+          component: bannerManger,
100
+          children: []
101
+        }, { // 售楼处项目专题
102
+          path: 'majorProjects',
103
+          name: 'majorProjects',
104
+          component: majorProjects,
105
+          children: []
106
+        }, { // 首页消息
107
+          path: 'indexMsg',
108
+          name: 'indexMsg',
109
+          component: indexMsg,
110
+          children: []
111
+        }, { // 资讯管理
112
+          path: 'newsManger',
113
+          name: 'newsManger',
114
+          component: newsManger,
115
+          children: []
116
+        }],
86 117
       }, { // 渠道管理
87 118
         path: 'channelManger',
88 119
         name: 'channelManger',