|
@@ -3,7 +3,7 @@
|
3
|
3
|
<div class="app-container calendar-list-container">
|
4
|
4
|
<div v-show="visible.secondLayer">
|
5
|
5
|
<div class="app-container">
|
6
|
|
- <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="名稱" v-model="listQuery.name">
|
|
6
|
+ <el-input @keyup.enter.native="handleFilter" style="width: 200px;" class="filter-item" placeholder="名稱" v-model="query.secondLayer.name">
|
7
|
7
|
</el-input>
|
8
|
8
|
<el-button class="filter-item" type="primary" v-waves icon="el-icon-search" @click="handleFilter">搜尋</el-button>
|
9
|
9
|
<el-button class="filter-item" @click="handleCreate" type="primary" icon="el-icon-edit">創建</el-button>
|
|
@@ -96,7 +96,7 @@ export default {
|
96
|
96
|
createFormData: null
|
97
|
97
|
}
|
98
|
98
|
},
|
99
|
|
- props: ['room'],
|
|
99
|
+ // props: ['room'],
|
100
|
100
|
created() {
|
101
|
101
|
this.SetVisible(2)
|
102
|
102
|
this.getList()
|
|
@@ -106,16 +106,20 @@ export default {
|
106
|
106
|
},
|
107
|
107
|
computed: {
|
108
|
108
|
...mapGetters([
|
109
|
|
- 'visible'
|
|
109
|
+ 'visible',
|
|
110
|
+ 'data',
|
|
111
|
+ 'query'
|
110
|
112
|
])
|
111
|
113
|
},
|
112
|
114
|
methods: {
|
113
|
115
|
...mapActions([
|
114
|
|
- 'SetVisible'
|
|
116
|
+ 'SetVisible',
|
|
117
|
+ 'SetData',
|
|
118
|
+ 'SetQuery'
|
115
|
119
|
]),
|
116
|
120
|
getList() {
|
117
|
121
|
this.listLoading = true
|
118
|
|
- fetchWechatGameMaster(this.room, this.listQuery).then(response => {
|
|
122
|
+ fetchWechatGameMaster(this.data.secondLayer, this.query.secondLayer).then(response => {
|
119
|
123
|
this.list = response.data.rows
|
120
|
124
|
this.total = response.data.count
|
121
|
125
|
this.listLoading = false
|
|
@@ -130,7 +134,7 @@ export default {
|
130
|
134
|
createData() {
|
131
|
135
|
this.$refs['createForm'].validate((valid) => {
|
132
|
136
|
if (valid) {
|
133
|
|
- const room = Object.assign({}, this.room)
|
|
137
|
+ const room = Object.assign({}, this.data.secondLayer)
|
134
|
138
|
const createFormData = Object.assign({}, this.createFormData.value)
|
135
|
139
|
console.log('eqwewq', createFormData)
|
136
|
140
|
createWechatGameMaster(room, createFormData).then(() => {
|
|
@@ -154,15 +158,15 @@ export default {
|
154
|
158
|
})
|
155
|
159
|
},
|
156
|
160
|
handleFilter() {
|
157
|
|
- this.listQuery.page = 1
|
|
161
|
+ this.SetQuery({layer:2, query: {page: 1, name: this.query.secondLayer.name}})
|
158
|
162
|
this.getList()
|
159
|
163
|
},
|
160
|
164
|
handleSizeChange(val) {
|
161
|
|
- this.listQuery.limit = val
|
|
165
|
+ this.SetQuery({layer:2, query: {limit: val, name: this.query.secondLayer.name}})
|
162
|
166
|
this.getList()
|
163
|
167
|
},
|
164
|
168
|
handleCurrentChange(val) {
|
165
|
|
- this.listQuery.page = val
|
|
169
|
+ this.SetQuery({layer:2, query: {page: val, name: this.query.secondLayer.name}})
|
166
|
170
|
this.getList()
|
167
|
171
|
},
|
168
|
172
|
handleDialogClose() {
|
|
@@ -178,7 +182,7 @@ export default {
|
178
|
182
|
page: 1,
|
179
|
183
|
name: query,
|
180
|
184
|
}
|
181
|
|
- fetchWeChatMemberList(this.room, temp).then(response => {
|
|
185
|
+ fetchWeChatMemberList(this.data.secondLayer, temp).then(response => {
|
182
|
186
|
if (!response.data.rows) return
|
183
|
187
|
this.agentLIstOptions = response.data.rows.map(v => ({
|
184
|
188
|
key: v.WeChatUser.name,
|