From 0611cb8ea1fe07bfb3312aeebad54a95bf425f8f Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期一, 22 十一月 2021 15:44:24 +0800
Subject: [PATCH] 网关接口
---
src/pages/vindicate/views/systemClean.vue | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 157 insertions(+), 19 deletions(-)
diff --git a/src/pages/vindicate/views/systemClean.vue b/src/pages/vindicate/views/systemClean.vue
index 2dc13a9..50476c8 100644
--- a/src/pages/vindicate/views/systemClean.vue
+++ b/src/pages/vindicate/views/systemClean.vue
@@ -43,6 +43,25 @@
<script>
import { deleteData } from "@/api/system";
export default {
+ created(){
+ const end = new Date();
+ const start = new Date();
+ start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+ var year=end.getFullYear();
+ var month=end.getMonth()+1;
+ var day=end.getDate();
+ month=month<10?"0"+month:month;
+ day=day<10?"0"+day:day;
+ const endTime = year+"-"+month+"-"+day
+
+ var year2=start.getFullYear();
+ var month2=start.getMonth()+1;
+ var day2=start.getDate();
+ month2=month2<10?"0"+month2:month2;
+ day2=day2<10?"0"+day2:day2;
+ const startTime = year2+"-"+month2+"-"+day2
+ this.dataRange = [startTime,endTime]
+ },
data() {
return {
pickerOptions: {
@@ -51,10 +70,35 @@
day.setTime(day.getTime() - 24 * 60 * 60 * 1000);
return time.getTime() > day;
},
+ 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]);
+ }
+ }]
},
loading: false,
loadingText: '',
- dataRange: []
+ dataRange: [],
};
},
props:["free","full"],
@@ -70,12 +114,26 @@
return
}
const [showStartTime, showEndTime] = this.dataRange
- this.$confirm(`${showStartTime} 鑷� ${showEndTime} 浜х敓鐨勫叏閮ㄦ暟鎹皢琚垹闄わ紝姝ゆ搷浣滅珛鍗崇敓鏁堬紝涓嶅彲鎭㈠锛屾槸鍚﹀垹闄わ紵`, "鎻愮ず",{
- type:"warning",
- cancelButtonClass: "comfirm-class-cancle",
- confirmButtonClass: "comfirm-class-sure",
- }
- )
+ const h = this.$createElement;
+ const icon = this.$msgbox( {
+ title: "",
+ message: h(
+ "div",
+ {
+ style:
+ "display: flex; flex-direction: column; justify-content: center; align-items: center;",
+ },
+ [
+ h("span", { class: "icon iconfont warn-icon" }, '\ue71c'),
+ h("span", { class: "warn-title" }, "鎻愮ず "),
+ h("span", { class: "warn-dec" }, `${showStartTime} 鑷� ${showEndTime} 浜х敓鐨勫叏閮ㄦ暟鎹皢琚垹闄わ紝姝ゆ搷浣滅珛鍗崇敓鏁堬紝涓嶅彲鎭㈠锛屾槸鍚﹀垹闄わ紵`),
+ ]
+ ),
+ showCancelButton: true,
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ })
+
.then(() => {
this.loading = true
this.loadingText = "姝e湪鍒犻櫎鏁版嵁锛岃绋嶅�欙紒"
@@ -83,6 +141,7 @@
startTime: showStartTime,
endTime: showEndTime,
})
+
.then((resp) => {
if (resp.success) {
this.loading = false
@@ -112,8 +171,8 @@
.clear {
position: relative;
padding: 10px;
- border-top:2px solid #E1E0E6 ;
- border-left:2px solid #E1E0E6 ;
+ border-top: 4px solid #f2f2f7;
+ border-left: 4px solid #f2f2f7;
.clear-list {
background: #F2F2F7;
@@ -147,18 +206,14 @@
}
&::after {
position: relative;
- top: -68%;
- content: '\e6e8';
- width: 25px;
- height: 25px;
+ top: -77%;
+ background-image: url(/images/vindicate/鍐呭瓨.png);
+ width: 38px;
+ height: 35px;
+ background-size:cover;
display: inline-block;
margin: auto;
- font-family: "iconfont" !important;
- font-size: 25px;
- font-style: normal;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
-
+ content: '';
}
}
svg {
@@ -235,3 +290,86 @@
</style>
+
+<style scoped lang="scss">
+.warn-icon {
+ color: #fe6d68;
+ font-size: 40px;
+ margin-top: 11px;
+ }
+ .warn-title {
+ font-weight: bold;
+ font-size: 16px;
+ margin: 6px;
+ line-height: 22px;
+ }
+ .warn-dec {
+ font-weight: bold;
+ font-size: 14px;
+ color: #828282;
+ line-height: 20px;
+ }
+ .el-message-box__headerbtn {
+ top: 12px;
+ }
+ .el-message-box__headerbtn .el-message-box__close {
+ color: #333333;
+ font-weight: bold;
+ }
+ .el-message-box__btns {
+ display: flex;
+ justify-content: center;
+ margin-top: 20px;
+ .el-button:focus,
+ .el-button:hover {
+ background-color: none;
+ border: none;
+ }
+ button {
+ width: 175px;
+ height: 40px;
+ border-radius: 25px;
+ span {
+ font-size: 16px;
+ font-weight: 700;
+ }
+ &:hover {
+ border: 1px solid var(--colorCard) !important;
+ }
+ }
+ button:first-child {
+ background-color: #e0e0e0;
+ span {
+ color: #333333;
+ }
+ }
+ button:last-child {
+ background-color: var(--colorCard) !important;
+ border: 1px solid var(--colorCard) !important;
+ span {
+ color: #fff;
+ }
+ }
+ }
+</style>
+
+<style lang="scss">
+.clean-time-picker {
+ top: 208px !important;
+ left: 343px !important;
+ width: 624px !important;
+
+ .el-picker-panel__sidebar {
+ background: #EEF5FF;
+ button {
+ margin: 10px 0;
+ }
+ }
+
+ tbody {
+ tr:first-child {
+ background: #EEF5FF;
+ }
+ }
+ }
+</style>
--
Gitblit v1.8.0