提交 855fe884 编写于 作者: X xinlaa

员工详情接口调试

上级 b1859d77
<script>
import { getPushResult } from "@/api/groupMessage";
export default {
components: {},
props: {
type: {
type: Number | String,
default: "1"
},
total: {
type: Number | String,
default: 0
}
},
data() {
return {
// 查询参数
query: {
pageNum: 1,
pageSize: 10,
messageId: undefined,
status: 0
},
loading: false,
list: []
};
},
watch: {},
computed: {},
created() {
this.query.messageId = this.$route.query.id;
this.query.status = this.type;
this.getList();
},
mounted() {},
methods: {
/** 查询 */
getList(page) {
page && (this.query.pageNum = page);
this.loading = true;
getPushResult(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.loading = false;
this.$emit("update:total", +total);
})
.catch(() => {
this.loading = false;
});
}
}
};
</script>
<template>
<div>
<el-table v-loading="loading" :data="list">
<el-table-column label="发送员工" align="center" prop="userName" />
<el-table-column label="发送客户" align="center" prop="customers">
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList"
/>
</div>
</template>
<style lang="less" scoped></style>
<script>
import { getPushResult } from "@/api/groupMessage";
import TabContent from "./TabContent";
export default {
components: {},
components: {
TabContent
},
props: {},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
messageId: "",
status: 0
},
// 表格数据
list: [],
form: {},
activeName: "1",
activeName: "0",
total1: 0,
total2: 0
total0: 0
};
},
watch: {},
computed: {},
created() {
this.id = this.$route.query.id;
this.id && this.getList();
},
created() {},
mounted() {},
methods: {
getList(page) {
this.query = {
messageId: this.id,
status: 0
};
page && (this.query.pageNum = page);
this.loading = true;
getPushResult(this.query)
.then(({ rows, total }) => {
this.list = rows;
this.total = +total;
this.loading = false;
this.ids = [];
})
.catch(() => {
this.loading = false;
});
}
notice() {}
}
};
</script>
<template>
<div>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane :label="`待发送(${total1})`" name="1">
<div class="ar">
<el-button type="primary">发布动态</el-button>
</div>
<el-table
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange"
>
<el-table-column label="发送员工" align="center" prop="title" />
<el-table-column label="发送客户" align="center" prop="operTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList"
/>
<!-- <el-button class="notice" type="primary" @click="notice"
>通知员工发送</el-button
> -->
<el-tabs v-model="activeName">
<el-tab-pane :label="`待发送(${total0})`" name="0">
<TabContent type="0" :total.sync="total0"></TabContent>
</el-tab-pane>
<el-tab-pane :label="`已发送(${total2})`" name="2">
<el-table
v-loading="loading"
:data="list"
@selection-change="handleSelectionChange"
>
<el-table-column label="发送员工" align="center" prop="title" />
<el-table-column label="发送客户" align="center" prop="operTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.operTime) }}</span>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="query.pageNum"
:limit.sync="query.pageSize"
@pagination="getList"
/>
<el-tab-pane :label="`已发送(${total1})`" name="1">
<TabContent type="1" :total.sync="total1"></TabContent>
</el-tab-pane>
</el-tabs>
</div>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册