From 0357cd11e6cd7ce095ab72eb41c563cccb0f9617 Mon Sep 17 00:00:00 2001 From: ZZJ <zzjdsg2300@163.com> Date: 星期四, 11 十一月 2021 15:42:41 +0800 Subject: [PATCH] 暂存 --- src/pages/syslog/views/pollingLog.vue | 76 +++++++++++++++++++++++++++++++++++++ 1 files changed, 75 insertions(+), 1 deletions(-) diff --git a/src/pages/syslog/views/pollingLog.vue b/src/pages/syslog/views/pollingLog.vue index db7f82b..895c3cf 100644 --- a/src/pages/syslog/views/pollingLog.vue +++ b/src/pages/syslog/views/pollingLog.vue @@ -36,7 +36,7 @@ </div> </div> <div class="second"> - <span>鏃ユ湡鏃堕棿锛�</span> + <span class="title">鏃ユ湡鏃堕棿锛�</span> <el-date-picker v-model="dateRange" size="small" @@ -46,6 +46,7 @@ start-placeholder="寮�濮嬫棩鏈�" @change="dateChange" end-placeholder="缁撴潫鏃ユ湡" + :picker-options="pickerOptions" > </el-date-picker> </div> @@ -59,7 +60,11 @@ :header-cell-style="{ background: '#f8f8f8', color: '#222222' }" @selection-change="handleSelectionChange" style="width: 100%" + border > + <template slot="empty"> + <img :src="png" class="empty_img" alt="" /> + </template> <el-table-column :align="'center'" label="搴忓彿" type="index" width="50"> </el-table-column> <el-table-column @@ -137,6 +142,7 @@ export default { data() { return { + png: "", loading: false, loadingText: "", tableData: [], @@ -161,6 +167,37 @@ procID: "", procName: "", pickNum: 0, + pickerOptions: { + shortcuts: [ + { + text: "鏈�杩戜竴鍛�", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); + picker.$emit("pick", [start, end]); + }, + }, + { + text: "鏈�杩戜竴涓湀", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); + picker.$emit("pick", [start, end]); + }, + }, + { + text: "鏈�杩戜笁涓湀", + onClick(picker) { + const end = new Date(); + const start = new Date(); + start.setTime(start.getTime() - 3600 * 1000 * 24 * 90); + picker.$emit("pick", [start, end]); + }, + }, + ], + }, }; }, mounted() { @@ -229,6 +266,7 @@ queryScheduleLog(data).then((res) => { this.tableData = res.data.logs; this.total = res.data.total; + this.png = require("../../../../public/images/syslog/娌℃暟鎹�.png"); }); }, dateChange(val) { @@ -250,6 +288,8 @@ this.timeEnd = this.getTimeStr(date); this.dateRange = [this.timeStart, this.timeEnd]; }, + handleSelectionChange() {}, + handleClose() {}, }, }; </script> @@ -374,8 +414,15 @@ } .second { display: flex; + align-items: center; margin: 15px 0 20px 0; padding: 0 20px; + .title { + margin-right: 10px; + min-width: fit-content; + font-weight: bold; + font-size: 12px; + } .bar { display: flex; align-items: baseline; @@ -398,16 +445,43 @@ padding: 12px; background-color: white; + .empty_img { + margin: 80px auto; + width: 164px; + } + .tableBox { + border: none; + &::before, + &::after { + display: none; + } + + tr { + &.current-row td { + background-color: #4e94ff !important; + color: #fff; + } + &:hover td { + background-color: rgb(242, 242, 247); + } + } th { padding: 0 !important; height: 40px; line-height: 40px; + border-color: #fff !important; + border-right: 2px solid #fff; + border-radius: 4px; + font-size: 12px; + background: #f2f2f7; } td { padding: 0 !important; height: 34px; line-height: 34px; + border: none; + font-size: 12px; } } } -- Gitblit v1.8.0