| | |
| | | }
|
| | | })
|
| | | .catch((e) => {
|
| | | _this.$notify.warning(e.data);
|
| | | _this.$notify.warning(e.msg);
|
| | | clearInterval(timer);
|
| | | app.upgradeLoading = false;
|
| | | });
|
| | |
| | | }); |
| | | this.resolutionList = list; |
| | | this.sensors = res.data.sensors; |
| | | console.log(list); |
| | | } |
| | | |
| | | this.$nextTick(() => { |
| | |
| | | }, |
| | | // 添加设备 |
| | | addDevice(node) { |
| | | console.log("1111"); |
| | | this.isAdd = true; |
| | | this.addParentId = node; |
| | | this.resolutionList = [ |
| | | { |
| | | label: "本机分辨率", |
| | | value: "0*0", |
| | | }, |
| | | { |
| | | label: "1920*1080", |
| | | value: "1920*1080", |
| | | }, |
| | | { |
| | | label: "2688*1520", |
| | | value: "2688*1520", |
| | | }, |
| | | ]; |
| | | this.initFormData(); |
| | | }, |
| | | }, |
| | |
| | | label="时长" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | v-if="form.type != 2" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="uploadTime" |
| | |
| | | </svg>-->
|
| | | <img
|
| | | class="baseImg"
|
| | | :src="item.rules[0].icon_blob && item.rules[0].icon_blob.indexOf(',')>0?item.rules[0].icon_blob:`data:image/png;base64,${item.rules[0].icon_blob}`"
|
| | | :src="
|
| | | item.rules[0].icon_blob &&
|
| | | item.rules[0].icon_blob.indexOf(',') > 0
|
| | | ? item.rules[0].icon_blob
|
| | | : `data:image/png;base64,${item.rules[0].icon_blob}`
|
| | | "
|
| | | alt
|
| | | />
|
| | | </div>
|
| | | </div>
|
| | | <div class="double" v-else-if="item.rules.length==2">
|
| | | <div class="svg-wrap" v-for="(rule,index) in item.rules" :key="index">
|
| | | <div
|
| | | class="svg-wrap"
|
| | | v-for="(rule, index) in item.rules"
|
| | | :key="index"
|
| | | >
|
| | | <!-- <svg class="icon" aria-hidden="true" style="font-size:2rem;">
|
| | | <use :xlink:href="`#${rule.icon}`" />
|
| | | </svg>-->
|
| | | <img
|
| | | class="baseImg"
|
| | | :src="item.rules[index].icon_blob &&item.rules[index].icon_blob.indexOf(',')>0?item.rules[index].icon_blob:`data:image/png;base64,${rule.icon_blob}`"
|
| | | :src="
|
| | | item.rules[index].icon_blob &&
|
| | | item.rules[index].icon_blob.indexOf(',') > 0
|
| | | ? item.rules[index].icon_blob
|
| | | : `data:image/png;base64,${rule.icon_blob}`
|
| | | "
|
| | | alt
|
| | | />
|
| | | </div>
|
| | | </div>
|
| | | <div class="third" v-else-if="item.rules.length==3">
|
| | | <div class="svg-wrap" v-for="(rule,index) in item.rules" :key="'t'+index">
|
| | | <div
|
| | | class="svg-wrap"
|
| | | v-for="(rule, index) in item.rules"
|
| | | :key="'t' + index"
|
| | | >
|
| | | <!-- <svg class="icon" aria-hidden="true" style="font-size:2rem;">
|
| | | <use :xlink:href="`#${rule.icon}`" />
|
| | | </svg>-->
|
| | | <img
|
| | | class="baseImg"
|
| | | :src="item.rules[index].icon_blob &&item.rules[index].icon_blob.indexOf(',')>0?item.rules[index].icon_blob:`data:image/png;base64,${rule.icon_blob}`"
|
| | | :src="
|
| | | item.rules[index].icon_blob &&
|
| | | item.rules[index].icon_blob.indexOf(',') > 0
|
| | | ? item.rules[index].icon_blob
|
| | | : `data:image/png;base64,${rule.icon_blob}`
|
| | | "
|
| | | alt
|
| | | />
|
| | | </div>
|
| | | </div>
|
| | | <div class="four" v-else-if="item.rules.length==4">
|
| | | <div class="svg-wrap" v-for="(rule,index) in item.rules" :key="'f'+index">
|
| | | <div
|
| | | class="svg-wrap"
|
| | | v-for="(rule, index) in item.rules"
|
| | | :key="'f' + index"
|
| | | >
|
| | | <!-- <svg class="icon" aria-hidden="true" style="font-size:2rem;">
|
| | | <use :xlink:href="`#${rule.icon}`" />
|
| | | </svg>-->
|
| | | <img
|
| | | class="baseImg"
|
| | | :src="item.rules[index].icon_blob && item.rules[index].icon_blob.indexOf(',')>0?item.rules[index].icon_blob:`data:image/png;base64,${rule.icon_blob}`"
|
| | | :src="
|
| | | item.rules[index].icon_blob &&
|
| | | item.rules[index].icon_blob.indexOf(',') > 0
|
| | | ? item.rules[index].icon_blob
|
| | | : `data:image/png;base64,${rule.icon_blob}`
|
| | | "
|
| | | alt
|
| | | />
|
| | | </div>
|
| | |
| | | </template>
|
| | |
|
| | | <script>
|
| | | import {chunkArr} from '@/scripts/util';
|
| | | import { chunkArr } from "@/scripts/util";
|
| | | export default {
|
| | | props: [
|
| | | // 'swiperOption',
|
| | | 'sceneData'
|
| | | "sceneData",
|
| | | ],
|
| | |
|
| | | data() {
|
| | |
| | | spaceBetween: 0,
|
| | | pagination: {
|
| | | el: ".swiper-pagination",
|
| | | clickable: true
|
| | | clickable: true,
|
| | | },
|
| | | navigation: {
|
| | | nextEl: ".swiper-next-border",
|
| | | prevEl: ".swiper-pre-border"
|
| | | prevEl: ".swiper-pre-border",
|
| | | },
|
| | | observer: true,//修改swiper自己或子元素时,自动初始化swiper
|
| | | observeParents: true,//修改swiper的父元素时,自动初始化swiper
|
| | | },
|
| | | mySwiper: {}
|
| | | }
|
| | | mySwiper: {},
|
| | | };
|
| | | },
|
| | | mounted() {
|
| | | // this.mySwiper = this.$refs.sceneSwiper.swiper;
|
| | |
|
| | | },
|
| | |
|
| | | computed: {
|
| | | slides() {
|
| | | return chunkArr(this.mockSceneData, 5);
|
| | | }
|
| | | }
|
| | | },
|
| | | },
|
| | | };
|
| | | </script>
|
| | |
|
| | |
| | | position: absolute;
|
| | | bottom: 10px;
|
| | | left: 0;
|
| | | word-break: break-all;
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | <div class="cap">
|
| | | <div class="cap-bar">
|
| | | <!-- <div class="inner-bar" :style="`width: ${100-percent}%;`"></div> -->
|
| | | <el-progress v-if="percent>25" type="circle" :percentage="100-percent" stroke-width="10"></el-progress>
|
| | | <el-progress v-if="percent<=25&&percent>0" type="circle" :percentage="100-percent" status="warning" stroke-width="10"></el-progress>
|
| | | <el-progress v-if="percent == 0" type="circle" :percentage="100-percent" status="exception" stroke-width="10"></el-progress>
|
| | | <el-progress
|
| | | v-if="percent > 25"
|
| | | type="circle"
|
| | | :percentage="100 - percent"
|
| | | stroke-width="10"
|
| | | ></el-progress>
|
| | | <el-progress
|
| | | v-if="percent <= 25 && percent > 0"
|
| | | type="circle"
|
| | | :percentage="100 - percent"
|
| | | status="warning"
|
| | | stroke-width="10"
|
| | | ></el-progress>
|
| | | <el-progress
|
| | | v-if="percent == 0"
|
| | | type="circle"
|
| | | :percentage="100 - percent"
|
| | | status="exception"
|
| | | stroke-width="10"
|
| | | ></el-progress>
|
| | | </div>
|
| | | <div class="cap-text">
|
| | | <span class="useable">磁盘可用: {{ percent }}%</span>
|
| | |
| | | <el-button type="primary" @click="deleteData">数据清理</el-button>
|
| | | </div>
|
| | |
|
| | |
|
| | | <div class="clear-list">
|
| | | <span class="t">请选择要清理的数据范围</span>
|
| | | <el-date-picker popper-class="clean-time-picker"
|
| | | <el-date-picker
|
| | | popper-class="clean-time-picker"
|
| | | style="width: 100%"
|
| | | v-model="dataRange"
|
| | | value-format="yyyy-MM-dd"
|
| | |
| | |
|
| | | <div class="warm">
|
| | | <i class="iconfont icontishi-zhuyi"></i>
|
| | | <span class="text">请注意,按以上日期范围删除的数据不可恢复,立即生效,请谨慎操作!</span>
|
| | | <span class="text"
|
| | | >请注意,按以上日期范围删除的数据不可恢复,立即生效,请谨慎操作!</span
|
| | | >
|
| | | </div>
|
| | | </div>
|
| | | </template>
|
| | |
| | | var day=end.getDate();
|
| | | month=month<10?"0"+month:month;
|
| | | day=day<10?"0"+day:day;
|
| | | const endTime = year+"-"+month+"-"+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]
|
| | | const startTime = year2 + "-" + month2 + "-" + day2;
|
| | | this.dataRange = [startTime, endTime];
|
| | | },
|
| | | data() {
|
| | | return {
|
| | |
| | | day.setTime(day.getTime() - 24 * 60 * 60 * 1000);
|
| | | return time.getTime() > day;
|
| | | },
|
| | | shortcuts: [{
|
| | | text: '最近一周',
|
| | | 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: '最近一个月',
|
| | | 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: '最近三个月',
|
| | | 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]);
|
| | | }
|
| | | }]
|
| | | picker.$emit("pick", [start, end]);
|
| | | },
|
| | | },
|
| | | ],
|
| | | },
|
| | | loading: false,
|
| | | loadingText: '',
|
| | | loadingText: "",
|
| | | dataRange: [],
|
| | | };
|
| | | },
|
| | | props:["free","full"],
|
| | | computed: {
|
| | | percent(){
|
| | | return Math.round(this.free/this.full *100)
|
| | | }
|
| | | return Math.round((this.free / this.full) * 100);
|
| | | },
|
| | | },
|
| | | methods: {
|
| | | deleteData() {
|
| | | if (this.dataRange.length==0) {
|
| | | this.$message.warning("请先选择日期")
|
| | | return
|
| | | if (!this.dataRange || this.dataRange.length == 0) {
|
| | | this.$message.warning("请先选择日期");
|
| | | return;
|
| | | }
|
| | | const [showStartTime, showEndTime] = this.dataRange
|
| | | const [showStartTime, showEndTime] = this.dataRange;
|
| | | const h = this.$createElement;
|
| | | const icon = this.$msgbox( {
|
| | | title: "",
|
| | |
| | | "display: flex; flex-direction: column; justify-content: center; align-items: center;",
|
| | | },
|
| | | [
|
| | | h("span", { class: "icon iconfont warn-icon" }, '\ue71c'),
|
| | | h("span", { class: "icon iconfont warn-icon" }, "\ue71c"),
|
| | | h("span", { class: "warn-title" }, "提示 "),
|
| | | h("span", { class: "warn-dec" }, `${showStartTime} 至 ${showEndTime} 产生的全部数据将被删除,此操作立即生效,不可恢复,是否删除?`),
|
| | | h(
|
| | | "span",
|
| | | { class: "warn-dec" },
|
| | | `${showStartTime} 至 ${showEndTime} 产生的全部数据将被删除,此操作立即生效,不可恢复,是否删除?`
|
| | | ),
|
| | | ]
|
| | | ),
|
| | | showCancelButton: true,
|
| | |
| | | })
|
| | |
|
| | | .then(() => {
|
| | | this.loading = true
|
| | | this.loadingText = "正在删除数据,请稍候!"
|
| | | this.loading = true;
|
| | | this.loadingText = "正在删除数据,请稍候!";
|
| | | deleteData({
|
| | | startTime: showStartTime,
|
| | | endTime: showEndTime,
|
| | | })
|
| | | |
| | | .then((resp) => {
|
| | | if (resp.success) {
|
| | | this.loading = false
|
| | | this.loading = false;
|
| | | this.$message.success(`清理成功,已清理 ${resp.data} 条数据`);
|
| | | this.$emit("refreshPercent")
|
| | | this.$emit("refreshPercent");
|
| | | }
|
| | | })
|
| | | .catch((err) => {
|
| | | this.$message.error("删除失败,"+err.msg);
|
| | | this.loading = false
|
| | | this.loading = false;
|
| | | });
|
| | | })
|
| | | .catch(() => { });
|
| | |
| | | <style lang="scss">
|
| | | .all {
|
| | | width: 100%;
|
| | | background-color: #FBFAFF;
|
| | | background-color: #fbfaff;
|
| | | }
|
| | | .container {
|
| | | background-color: #FBFAFF;
|
| | | background-color: #fbfaff;
|
| | | }
|
| | |
|
| | | .clear {
|
| | |
| | | border-left: 4px solid #f2f2f7;
|
| | |
|
| | | .clear-list {
|
| | | background: #F2F2F7;
|
| | | background: #f2f2f7;
|
| | | border-radius: 8px;
|
| | | height: 114px;
|
| | | display: flex;
|
| | |
| | | font-size: 16px;
|
| | |
|
| | | &:first-child {
|
| | | border-bottom: 1px solid #E1E0E6;
|
| | | border-bottom: 1px solid #e1e0e6;
|
| | | }
|
| | |
|
| | | .cap {
|
| | |
| | | background-size:cover;
|
| | | display: inline-block;
|
| | | margin: auto;
|
| | | content: '';
|
| | | content: "";
|
| | | }
|
| | | }
|
| | | svg {
|
| | |
| | | width: 127px;
|
| | | height: 32px;
|
| | | font-size: 12px;
|
| | | background: #F2F2F7;
|
| | | background: #f2f2f7;
|
| | | border-radius: 20px;
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | </style>
|
| | |
|
| | | <style scoped lang="scss">
|
| | |
| | | width: 624px !important;
|
| | |
|
| | | .el-picker-panel__sidebar {
|
| | | background: #EEF5FF;
|
| | | background: #eef5ff;
|
| | | button {
|
| | | margin: 10px 0;
|
| | | }
|
| | |
| | |
|
| | | tbody {
|
| | | tr:first-child {
|
| | | background: #EEF5FF;
|
| | | background: #eef5ff;
|
| | | }
|
| | | }
|
| | | }
|