拖旺项目:聊城公交辅助决策系统
master
2022-05-05 2bb706cc9371e7cb568193db863477d1271c1cba
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<template>
  <div class="page-container page-safety colorfff">
    <div class="nav">
      <img
          class="nav-icon"
          :src="require('@/assets/safety/location.png')"
          alt=""
      />
      <div class="nav-content">
        <span>安全管理 </span>
        <i class="el-icon el-icon-arrow-right"></i>
        <span> 访问信息</span>
      </div>
    </div>
    <div class="content">
      <div class="table-container">
        <el-table
            stripe
            style="width: 100%"
            header-row-class-name="table-header"
            :height="'calc(100vh - 340px)'"
            :data="visitList"
            highlight-current-row
            class="bs"
        >
          <el-table-column
              align="center"
              prop="deptName"
              label="访问部门"
          >
            <template slot-scope="scope">{{scope.row.deptName ? scope.row.deptName : '总公司'}}</template>
          </el-table-column>
          <el-table-column
              align="center"
              prop="visitor"
              label="访问人"
          ></el-table-column>
          <el-table-column
              align="center"
              prop="visitorTime"
              label="访问时间"
          ></el-table-column>
        </el-table>
        <div class="pagination-block">
          <el-pagination
              layout="prev, pager, next"
              :total="total"
              background
              :current-page="filterForm.pageNum"
              :page-size="filterForm.pageSize"
              @current-change="pageChange"
          ></el-pagination>
        </div>
      </div>
    </div>
  </div>
</template>
 
<script>
export default {
  name: "articleVisitList",
  data() {
    return {
      filterForm: {
        pageSize: 20,
        pageNum: 1,
      },
      total: 0,
      visitList: [],
    };
  },
  created() {
    this.getOtherQuota();
  },
  activated() {
    if (this.$route.query.type) {
      this.filterForm.type = this.$route.query.type;
    } else {
      this.filterForm.type = "";
    }
    this.getList();
  },
  methods: {
    getList() {
      this.$axios
          .get(this.$exportBase + 'v3/safety/pageVisit', {
            params: {
              limit: this.filterForm.pageSize,
              page: this.filterForm.pageNum,
              safetyInfoId: this.$route.query.id
            },
          })
          .then((res) => {
            this.visitList = res.data.list;
            this.total = Number(res.data.total);
          });
    },
    pageChange(page) {
      this.filterForm.pageNum = page;
      this.getList();
    },
  },
};
</script>
 
<style lang="less" scoped>
@import url("../../assets/css/common.css");
@orange: #1cd1d3;
@blue: #3e89d3;
.page-container {
  padding: 20px 30px;
  padding-bottom: 0;
  .nav {
    display: flex;
    font-size: 14px;
    width: 100%;
    height: 20px;
    align-items: center;
    .nav-icon {
      width: 18px;
      margin-left: 11px;
      flex-shrink: 0;
      margin-right: 11px;
    }
    .nav-content {
      flex: 1;
    }
  }
  .content {
    margin-top: 16px;
    .table-container {
      margin: 0 72px;
      .pagination-block {
        text-align: center;
        margin-top: 20px;
      }
    }
  }
 }
.action-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 14px;
  margin-left: 50px;
  padding-top: 5px;
  padding-right: 73px;
  height: 37px;
  .action-item {
    padding: 8px 30px;
    border-left: 2px solid;
    border-right: 2px solid;
    opacity: 0.8;
  }
  .orange {
    border-color: @orange;
    background-color: rgba(28, 209, 211, 0.1);
  }
  .blue {
    border-color: @blue;
    background-color: rgba(62, 137, 211, 0.1);
  }
}
/deep/.el-table {
  margin-top: 40px;
  background: none !important;
}
</style>
<style lang="less">
.page-safety .el-table tr {
  background: #161e2f !important;
  height: 40px;
}
.page-safety .el-table td.el-table__cell {
  border-bottom: none !important;
  padding: 0 !important;
  color: #fff;
}
.page-safety
.el-table--striped
.el-table__body
tr.el-table__row--striped
td.el-table__cell {
  background: #182237 !important;
}
.page-safety .table-header th {
  height: 54px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.85);
}
.page-safety .el-table::before {
  height: 0 !important;
}
.page-safety .table-header {
  background: none;
}
.page-safety .el-table th.el-table__cell.is-leaf {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.page-safety .el-table__empty-block {
  background: rgba(60, 129, 255, 0.04);
}
.page-safety .el-table__body tr.current-row > td.el-table__cell {
  background: rgba(60, 129, 255, 0.1) !important;
}
.page-safety
.el-table--striped
.el-table__body
tr.current-row.el-table__row--striped
td.el-table__cell {
  background: rgba(60, 129, 255, 0.1) !important;
}
.page-safety
.el-table--enable-row-hover
.el-table__body
tr:hover
> td.el-table__cell {
  background: rgba(60, 129, 255, 0.1) !important;
}
.page-safety {
  .pagination-block {
    .el-pagination.is-background .btn-next,
    .el-pagination.is-background .btn-prev,
    .el-pagination.is-background .el-pager li {
      background: none;
      border: 1px solid rgba(255, 255, 255, 0.2);
      color: rgba(255, 255, 255, 0.65);
    }
    .el-pagination.is-background .el-pager li:not(.disabled).active {
      background: #0179d0 !important;
    }
  }
  .el-table--enable-row-hover .el-table__body tr:hover {
    border: 1px solid rgba(0, 114, 194, 0.5);
  }
  .el-table--striped .el-table__body tr.current-row.el-table__row--striped {
    border: 1px solid rgba(0, 114, 194, 0.5);
  }
}
</style>