提交 3b1e337f authored 作者: lihuihui's avatar lihuihui

修改bug

上级 2e8f1d86
...@@ -215,23 +215,25 @@ export default { ...@@ -215,23 +215,25 @@ export default {
} }
}, },
mounted() { mounted() {
const content = { setTimeout(() => {
2: 'form1', const content = {
4: 'form2', 2: 'form1',
3: 'form3', 4: 'form2',
1: 'form4' 3: 'form3',
} 1: 'form4'
this.form.tempGroup.map(item => { }
this.formAll[content[item.channel]].title = item.title this.form.tempGroup.map(item => {
this.formAll[content[item.channel]].content = item.payload this.formAll[content[item.channel]].title = item.title
}) this.formAll[content[item.channel]].content = item.payload
const numContent = { })
2: 0, const numContent = {
4: 1, 2: 0,
3: 2, 4: 1,
1: 3 3: 2,
} 1: 3
this.tabIndex = numContent[this.form.step3[0]] }
this.tabIndex = numContent[this.form.step3[0]]
}, 1000)
}, },
computed: { computed: {
stepLength () { stepLength () {
......
...@@ -52,7 +52,6 @@ export default { ...@@ -52,7 +52,6 @@ export default {
}) })
}) })
this.allData = response.data.data this.allData = response.data.data
console.log(response.data.data, '=123321111---')
setTimeout(() => { setTimeout(() => {
this.totalUser = response.data.data.find(item => { return item.id === this.form.step2 }).user_total this.totalUser = response.data.data.find(item => { return item.id === this.form.step2 }).user_total
}, 1000) }, 1000)
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
<activity :form="form" v-show="active === 0"></activity> <activity :form="form" v-show="active === 0"></activity>
<target-user :form="form" v-show="active === 1"></target-user> <target-user :form="form" v-show="active === 1"></target-user>
<trigger :form="form" v-show="active === 2"></trigger> <trigger :form="form" v-show="active === 2"></trigger>
<send-content :form="form" @clickPrev="clickPrev" @clickNext="clickNext" v-if="active === 3 || active === 4"></send-content> <send-content :form="form" @clickPrev="clickPrev" @clickNext="clickNext" v-show="active === 3 || active === 4"></send-content>
</div> </div>
<div class="foot-btn-box" v-show="active != 3 && active != 4"> <div class="foot-btn-box" v-show="active != 3 && active != 4">
<div class="content"> <div class="content">
<el-button @click="prevBtn" v-if="active !== 0">上一步</el-button> <el-button @click="prevBtn" v-show="active !== 0">上一步</el-button>
<el-button type="primary" @click="nextBtn">下一步</el-button> <el-button type="primary" @click="nextBtn">下一步</el-button>
</div> </div>
</div> </div>
......
...@@ -82,9 +82,11 @@ export default { ...@@ -82,9 +82,11 @@ export default {
this.getStatisticsData() this.getStatisticsData()
}, },
methods: { methods: {
// 筛选
selectChange() { selectChange() {
this.getStatisticsData() this.getStatisticsData()
}, },
// 获取图标数据
getStatisticsData() { getStatisticsData() {
api api
.getStatisticsData({ date_type: parseInt(this.value) }) .getStatisticsData({ date_type: parseInt(this.value) })
...@@ -98,6 +100,7 @@ export default { ...@@ -98,6 +100,7 @@ export default {
.finally(() => { .finally(() => {
}) })
}, },
// 过滤成echart需要的数据格式
filterData(arr) { filterData(arr) {
const data = [] const data = []
let countData = [] let countData = []
...@@ -114,6 +117,7 @@ export default { ...@@ -114,6 +117,7 @@ export default {
}) })
return data return data
}, },
// 循环要渲染多少个图表
myEcharts() { myEcharts() {
for (let i = 0; i < this.chartList.length; i++) { for (let i = 0; i < this.chartList.length; i++) {
this.chartList[i].map(item => { this.chartList[i].map(item => {
...@@ -121,6 +125,7 @@ export default { ...@@ -121,6 +125,7 @@ export default {
}) })
} }
}, },
// 渲染多个echart图表
getChartData(data) { getChartData(data) {
const myChart = this.$echarts.init(document.getElementById(`main${data.messagebus_id}`)) const myChart = this.$echarts.init(document.getElementById(`main${data.messagebus_id}`))
const chartData = [] const chartData = []
......
...@@ -129,15 +129,18 @@ export default { ...@@ -129,15 +129,18 @@ export default {
this.getGroupList({ page: 1, limit: 9 }) this.getGroupList({ page: 1, limit: 9 })
}, },
methods: { methods: {
// 用户分页
changePage2(n) { changePage2(n) {
this.showDetail(this.groupId, this.groupActive, { page: n, limit: 9 }) this.showDetail(this.groupId, this.groupActive, { page: n, limit: 9 })
}, },
// 用户组分页
changePage(n) { changePage(n) {
this.getGroupList({ page: n, limit: 9 }) this.getGroupList({ page: n, limit: 9 })
this.groupActive = -1 this.groupActive = -1
this.groupId = -1 this.groupId = -1
this.groupUset = [] this.groupUset = []
}, },
// 显示所有的用户组
getGroupList(page) { getGroupList(page) {
api api
.getGroupList(page) .getGroupList(page)
...@@ -147,6 +150,7 @@ export default { ...@@ -147,6 +150,7 @@ export default {
.finally(() => { .finally(() => {
}) })
}, },
// 显示用户组里面所有的用户
showDetail(id, index, page = { page: 1, limit: 9 }) { showDetail(id, index, page = { page: 1, limit: 9 }) {
this.groupActive = index this.groupActive = index
let isId = 0 let isId = 0
...@@ -164,6 +168,7 @@ export default { ...@@ -164,6 +168,7 @@ export default {
.finally(() => { .finally(() => {
}) })
}, },
// 添加用户组
addGroup() { addGroup() {
if (this.addGrounpInput === '') { if (this.addGrounpInput === '') {
this.addGroupPop = false this.addGroupPop = false
...@@ -183,15 +188,16 @@ export default { ...@@ -183,15 +188,16 @@ export default {
} }
}, },
getAddUserList() { getAddUserList() {
api // api
.getAddUserList() // .getAddUserList()
.then(response => { // .then(response => {
// this.userList = response.data // // this.userList = response.data
}) // })
.finally(() => { // .finally(() => {
}) // })
this.addGroupUserPop = true this.addGroupUserPop = true
}, },
// 搜索用户
userListSearch() { userListSearch() {
api api
.userListSearch({ [this.value]: this.userListSearchInput }) .userListSearch({ [this.value]: this.userListSearchInput })
...@@ -203,6 +209,7 @@ export default { ...@@ -203,6 +209,7 @@ export default {
.finally(() => { .finally(() => {
}) })
}, },
// 吧用户添加到组里
userOpenGroup(ssoId) { userOpenGroup(ssoId) {
if (this.groupId === -1) { if (this.groupId === -1) {
this.addGroupUserPop = false this.addGroupUserPop = false
...@@ -217,6 +224,7 @@ export default { ...@@ -217,6 +224,7 @@ export default {
}) })
} }
}, },
// 添加操作日志
addLogs(msg) { addLogs(msg) {
api api
.addLog({ description: msg }) .addLog({ description: msg })
...@@ -225,6 +233,7 @@ export default { ...@@ -225,6 +233,7 @@ export default {
.finally(() => { .finally(() => {
}) })
}, },
// 删除用户组
delGroup(id) { delGroup(id) {
api api
.delGroup(id) .delGroup(id)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论