| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164 |
- <template>
- <el-drawer
- :title="title"
- :modal-append-to-body="false"
- :modal="false"
- size="35%"
- :visible.sync="dialogVisible"
- >
- <div class="content-container">
- <!-- <vuescroll :ops="ops" style="height: calc(100vh - 310px)">
- <el-timeline>
- <el-timeline-item v-for="item in eventList" :key="item.eventId" :hide-timestamp="false">
- <div class="record-item">
- <p class="time">{{ item.eventTime }}</p>
- <p class="title">{{ item.accountNameFr }}</p>
- <p class="desc">
- {{ item.eventDesc }}
- </p>
- </div>
- </el-timeline-item>
- </el-timeline>
- </vuescroll> -->
- <el-timeline>
- <el-timeline-item v-for="item in eventList" :key="item.eventId" :hide-timestamp="false">
- <div class="record-item">
- <p class="time">{{ item.eventTime }}</p>
- <p class="title">{{ item.accountNameFr }}</p>
- <p class="desc">
- {{ item.eventDesc }}
- </p>
- </div>
- </el-timeline-item>
- </el-timeline>
- <div class="btn-group">
- <el-button class="cancel-btn" @click="dialogVisible = false">关闭</el-button>
- </div>
- </div>
- </el-drawer>
- </template>
- <script>
- import { getTaskEventByTaskId } from '@/api/system/taskEventApi'
- import vuescroll from 'vuescroll'
- export default {
- name: 'AppListComponent',
- components: {
- // eslint-disable-next-line vue/no-unused-components
- vuescroll
- },
- props: {
- title: {
- type: String,
- default: '操作记录'
- }
- },
- data() {
- return {
- ops: {
- bar: {
- keepShow: false,
- background: 'rgba(144, 147, 153, 0.4)',
- onlyShowBarOnScroll: false
- }
- },
- rules: {},
- dialogVisible: false,
- eventList: []
- }
- },
- mounted() {
- },
- methods: {
- // Fetch Event Data
- getEventList(data) {
- getTaskEventByTaskId(data).then((resp) => {
- const { code, data, msg } = resp
- if (code === 0) {
- this.eventList = data
- } else {
- this.$message.error(msg)
- }
- }).catch((error) => {
- console.log(error)
- })
- },
- // Show Event Dialog
- showTaskEvent(taskId) {
- this.eventList = []
- this.dialogVisible = true
- this.getEventList(taskId)
- }
- }
- }
- </script>
- <style lang="scss">
- </style>
- <style lang="scss" scoped>
- .content-container {
- margin: 15px;
- position: relative;
- height: calc(100% - 15px);
- .el-timeline {
- width: 360px;
- margin: 15px auto 0;
- padding: 0 0 0 90px;
- }
- .record-item {
- position: relative;
- top: -44px;
- .time {
- font-size: 12px;
- font-weight: 400;
- color: #A9BDC9;
- position: absolute;
- left: -165px;
- top: 7px;
- }
- .title {
- font-size: 16px;
- font-weight: 400;
- color: #A9BDC9;
- line-height: 54px;
- }
- .desc {
- font-size: 16px;
- font-weight: 400;
- color: #FFFFFF;
- line-height: 2em;
- margin: 0;
- }
- }
- .btn-group {
- margin-left: 30px;
- .el-button {
- margin: 0 0 15px;
- }
- .cancel-btn {
- background: #004F7B;
- border-color: #004F7B;
- color: #FFF;
- &:hover {
- background: #026197;
- border-color: #026197;
- }
- }
- }
- }
- </style>
|