| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <template>
- <el-drawer
- title="操作日志"
- size="40%"
- :append-to-body="false"
- :destroy-on-close="true"
- :visible="true"
- :modal-append-to-body="false"
- :before-close="handleClose"
- :wrapperClosable="false"
- ref="drawer_close">
- <div v-loading="loading" style="margin-top: 20px;" class="block">
- <el-timeline>
- <el-timeline-item v-for="item in list" :timestamp="item.addtime" placement="top">
- <p style="display:flex;flex-direction: row">
- <span style="display: flex;flex-direction: column">
- <span :style="`margin-right:5px;width: 40px;height: 40px;display: inline-block;border: 50%;background:url(${item.user.icon_url});background-size: contain;background-position: center;`"></span>
- <div style="flex: 1"></div>
- </span>
- <span style="flex: 1;line-height: 30px;word-break:break-all">
- <a style="color: #006eff;margin-right: 5px;" target="_blank" :href="`${item.root_url}/rooter/user/${item.user.uid}`">{{item.user.nickname}}</a>{{item.content}}
- </span>
- </p>
- </el-timeline-item>
- </el-timeline>
- <el-pagination
- v-if="search.total>search.pagesize"
- background
- style="margin-left: 30px;margin-top: 30px"
- layout="total,prev, pager, next"
- @current-change="page_event"
- :page-size="search.pagesize"
- :total="search.total">
- </el-pagination>
- </div>
- </el-drawer>
- </template>
- <script>
- export default {
- props: {
- action: {
- },
- pro: {
- },
- back:{
- type:Object
- },
- },
- data() {
- return {
- search: {
- pagesize: 15,
- page:0,
- total:0,
- },
- loading:true,
- list: []
- };
- },
- computed: {},
- watch: {},
- created() {},
- mounted() {
- this.getList();
- },
- methods: {
- handleClose:function()
- {
- this.back.drawer_obj.pub_log=false;
- this.back.drawer_obj.id="";
- },
- async getList() {
- this.loading = true;
- let data = this.search;
- data.pro = this.pro;
- data.action = this.action;
- let res = await this.$post("/uapi/pub/info/user/behavior_log/list",data);
- this.loading = false;
- if (res.status == 1) {
- this.list = res.data.list;
- this.search.total = res.data.total;
- }
- },
- page_event(page) {
- this.search.page = page;
- this.getList();
- },
- }
- };
- </script>
- <style scoped>
- .el-tag {
- cursor: pointer;
- }
- </style>
|