| | |
| | | <template>
|
| | | <div class="all">
|
| | | <div class="all" ref="curPage">
|
| | | <div class="general-set">
|
| | | <div class="general-center" ref="left">
|
| | | <div
|
| | |
| | | v-for="(item, i) in menuArr"
|
| | | :key="i"
|
| | | >
|
| | | <span class="iconfont">{{ item.icon }}</span>
|
| | | <span class="iconfont" :style="`font-size:${item.size}px;`">{{ item.icon }}</span>
|
| | | <span class="title">{{ item.name }}</span>
|
| | | </div>
|
| | | </div>
|
| | |
| | | drag
|
| | | action="https://jsonplaceholder.typicode.com/posts/"
|
| | | :http-request="uploadSound"
|
| | | v-show="showUpload"
|
| | | v-if="showUpload"
|
| | | :show-file-list="false"
|
| | | >
|
| | | <i class="el-icon-upload"></i>
|
| | |
| | | </el-upload>
|
| | | <div class="add-group">
|
| | | <div class="add-btn">
|
| | | <span class="icon iconfont" @click="showUpload = !showUpload"
|
| | | <span class="icon iconfont" @click.stop="showUpload = !showUpload"
|
| | | ></span
|
| | | >
|
| | | </div>
|
| | |
| | | <script>
|
| | | import { saveAlarmConfig, getDevInfo } from "@/api/system";
|
| | | import { uploadSound, getSoundList, deleteSound } from "@/api/event";
|
| | | import config from "../../../../package.json";
|
| | | // import config from "../../../../package.json";
|
| | |
|
| | | export default {
|
| | | data() {
|
| | |
| | | max: 0,
|
| | | },
|
| | | menuArr: [
|
| | | { name: "设备信息", icon: "\ue933" },
|
| | | { name: "事件录像时长", icon: "\ue6f3" },
|
| | | { name: "事件声音", icon: "\ue6e1" },
|
| | | { name: "个性化设置", icon: "\ue756" },
|
| | | { name: "设备信息", icon: "\ue933" ,size:18},
|
| | | { name: "事件录像时长", icon: "\ue6f3" ,size:20},
|
| | | { name: "事件声音", icon: "\ue6e1" ,size:16},
|
| | | { name: "个性化设置", icon: "\ue756" ,size:18},
|
| | | ],
|
| | | soundList: [],
|
| | | activePage: 0,
|
| | |
| | | _this.curPlayingIndex = null;
|
| | | }
|
| | | });
|
| | | const url = localStorage.getItem("backgroundPic")
|
| | | if (url) {
|
| | | const arr = url.split("/")
|
| | | this.activeBg= this.tableBGList.findIndex((x) => {
|
| | | return x.url.includes(arr[arr.length-1])
|
| | | })
|
| | | }else{
|
| | | this.activeBg= 0
|
| | | }
|
| | | const e = this.$refs.curPage
|
| | | e.addEventListener("click", (e) => {
|
| | | if (this.showUpload) {
|
| | | this.showUpload = false;
|
| | | }
|
| | | });
|
| | | },
|
| | | beforeDestroy() {
|
| | | this.$refs.curPage.removeEventListener("click")
|
| | | },
|
| | | computed: {
|
| | | min_video_len() {
|
| | |
| | | this.deviceInfo.deviceDesc = basic.deviceDesc;
|
| | | this.deviceInfo.masterVersion = basic.masterVersion;
|
| | | this.deviceInfo.channelCount = basic.channelCount;
|
| | | this.deviceInfo.webVersion = "V" + config.version;
|
| | | this.deviceInfo.webVersion = "V2.0.0";
|
| | | this.deviceInfo.disks = "( " + info.disk + ") ";
|
| | | this.deviceInfo.memory =
|
| | | (info.mem.total / 1024 / 1024 / 1024).toFixed(2) + "GB";
|
| | |
| | | uploadSound(param).then(
|
| | | (res) => {
|
| | | this.$message.success("上传成功");
|
| | | this.showUpload = false
|
| | | this.getSounds();
|
| | | },
|
| | | (err) => {
|
| | |
| | | cursor: pointer;
|
| | | display: flex;
|
| | | .iconfont {
|
| | | margin-right: 12px;
|
| | | margin-right: 8px;
|
| | | }
|
| | | .title {
|
| | | font-size: 16px;
|
| | | font-size: 15px;
|
| | | }
|
| | | }
|
| | | .menu-item-active {
|
| | |
| | | .bg-img {
|
| | | margin-right: 12px;
|
| | | cursor: pointer;
|
| | | width: 120px;
|
| | | // width: 120px;
|
| | | height: 80px;
|
| | | border: 2px solid transparent;
|
| | | img {
|
| | | width: 120px;
|
| | | border-radius: 5px;
|
| | |
|
| | | height: 100%;
|
| | | }
|
| | | }
|