From 1a94e4c4d56cdb04da7bab981d9389f87daa0683 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@iotlink.com> Date: 星期一, 03 八月 2020 18:34:36 +0800 Subject: [PATCH] app:修改images引入方式 --- public/images/login/9.png | 0 src/components/canvas/Dialog.vue | 22 ++-- src/components/searching/uploadForModel.vue | 4 public/images/login/11.png | 0 public/images/cameraAccess/image.png | 0 public/images/login/0.png | 0 src/components/searching/uploadDialog.vue | 4 src/components/player/index.vue | 3 public/images/login/8.png | 0 public/images/player/player_poster.gif | 0 public/images/login/10.png | 0 src/components/subComponents/CardItem.vue | 4 public/images/login/7.png | 0 public/images/cameraAccess/loading.gif | 0 public/images/cameraVideo/video-poster.png | 0 src/pages/cameraAccess/components/SeparateRules.vue | 2 public/images/login-net.png | 0 src/pages/cameraAccess/components/LinkageRule.vue | 23 ---- public/images/login/13.png | 0 public/images/cameraAccess/video-poster.png | 0 public/images/login-logo.png | 0 public/images/login/2.png | 0 public/images/login/12.png | 0 src/pages/cameraAccess/components/CameraInfo.vue | 2 public/images/login/1.png | 0 src/components/canvas/index.vue | 4 public/images/login/4.png | 0 public/images/login/3.png | 0 public/images/algo/green.gif | 0 public/images/search/duihao.png | 0 src/assets/img/green.png | 0 public/images/login/14.png | 0 public/images/login/15.png | 0 src/components/searching/UploadImg.vue | 4 src/Pool/TreeData.ts | 3 src/pages/index/ParticleNetwork.vue | 35 +++--- public/images/search/searchLoading.gif | 0 src/assets/img/red.png | 0 src/pages/search/index/Searching.vue | 11 +- src/components/searching/SearchLeft.vue | 5 public/images/login/6.png | 0 public/images/cameraAccess/audio.png | 0 public/images/cameraAccess/files.png | 0 src/pages/cameraAccess/components/DataStackInfo.vue | 8 src/pages/cameraVideo/components/VideoItem.vue | 2 /dev/null | 28 ----- public/images/cameraAccess/video.png | 0 src/pages/algorithmManage/index/App.vue | 124 ++++++++++++------------ src/pages/index/App.vue | 6 public/images/search/nobody.png | 0 public/images/login/5.png | 0 src/assets/img/baseimg.png | 0 52 files changed, 121 insertions(+), 173 deletions(-) diff --git a/src/assets/gif/green.gif b/public/images/algo/green.gif similarity index 100% rename from src/assets/gif/green.gif rename to public/images/algo/green.gif Binary files differ diff --git a/src/assets/img/audio.png b/public/images/cameraAccess/audio.png similarity index 100% rename from src/assets/img/audio.png rename to public/images/cameraAccess/audio.png Binary files differ diff --git a/src/assets/img/files.png b/public/images/cameraAccess/files.png similarity index 100% rename from src/assets/img/files.png rename to public/images/cameraAccess/files.png Binary files differ diff --git a/src/assets/img/image.png b/public/images/cameraAccess/image.png similarity index 100% rename from src/assets/img/image.png rename to public/images/cameraAccess/image.png Binary files differ diff --git a/src/assets/gif/loading.gif b/public/images/cameraAccess/loading.gif similarity index 100% rename from src/assets/gif/loading.gif rename to public/images/cameraAccess/loading.gif Binary files differ diff --git a/src/assets/baseimg.png b/public/images/cameraAccess/video-poster.png similarity index 100% copy from src/assets/baseimg.png copy to public/images/cameraAccess/video-poster.png Binary files differ diff --git a/src/assets/img/video.png b/public/images/cameraAccess/video.png similarity index 100% rename from src/assets/img/video.png rename to public/images/cameraAccess/video.png Binary files differ diff --git a/src/assets/baseimg.png b/public/images/cameraVideo/video-poster.png similarity index 100% copy from src/assets/baseimg.png copy to public/images/cameraVideo/video-poster.png Binary files differ diff --git a/src/assets/img/login-logo.png b/public/images/login-logo.png similarity index 100% rename from src/assets/img/login-logo.png rename to public/images/login-logo.png Binary files differ diff --git a/src/assets/img/login-net.png b/public/images/login-net.png similarity index 100% rename from src/assets/img/login-net.png rename to public/images/login-net.png Binary files differ diff --git a/src/assets/img/login/0.png b/public/images/login/0.png similarity index 100% rename from src/assets/img/login/0.png rename to public/images/login/0.png Binary files differ diff --git a/src/assets/img/login/1.png b/public/images/login/1.png similarity index 100% rename from src/assets/img/login/1.png rename to public/images/login/1.png Binary files differ diff --git a/src/assets/img/login/10.png b/public/images/login/10.png similarity index 100% rename from src/assets/img/login/10.png rename to public/images/login/10.png Binary files differ diff --git a/src/assets/img/login/11.png b/public/images/login/11.png similarity index 100% rename from src/assets/img/login/11.png rename to public/images/login/11.png Binary files differ diff --git a/src/assets/img/login/12.png b/public/images/login/12.png similarity index 100% rename from src/assets/img/login/12.png rename to public/images/login/12.png Binary files differ diff --git a/src/assets/img/login/13.png b/public/images/login/13.png similarity index 100% rename from src/assets/img/login/13.png rename to public/images/login/13.png Binary files differ diff --git a/src/assets/img/login/14.png b/public/images/login/14.png similarity index 100% rename from src/assets/img/login/14.png rename to public/images/login/14.png Binary files differ diff --git a/src/assets/img/login/15.png b/public/images/login/15.png similarity index 100% rename from src/assets/img/login/15.png rename to public/images/login/15.png Binary files differ diff --git a/src/assets/img/login/2.png b/public/images/login/2.png similarity index 100% rename from src/assets/img/login/2.png rename to public/images/login/2.png Binary files differ diff --git a/src/assets/img/login/3.png b/public/images/login/3.png similarity index 100% rename from src/assets/img/login/3.png rename to public/images/login/3.png Binary files differ diff --git a/src/assets/img/login/4.png b/public/images/login/4.png similarity index 100% rename from src/assets/img/login/4.png rename to public/images/login/4.png Binary files differ diff --git a/src/assets/img/login/5.png b/public/images/login/5.png similarity index 100% rename from src/assets/img/login/5.png rename to public/images/login/5.png Binary files differ diff --git a/src/assets/img/login/6.png b/public/images/login/6.png similarity index 100% rename from src/assets/img/login/6.png rename to public/images/login/6.png Binary files differ diff --git a/src/assets/img/login/7.png b/public/images/login/7.png similarity index 100% rename from src/assets/img/login/7.png rename to public/images/login/7.png Binary files differ diff --git a/src/assets/img/login/8.png b/public/images/login/8.png similarity index 100% rename from src/assets/img/login/8.png rename to public/images/login/8.png Binary files differ diff --git a/src/assets/img/login/9.png b/public/images/login/9.png similarity index 100% rename from src/assets/img/login/9.png rename to public/images/login/9.png Binary files differ diff --git a/src/assets/player_poster.gif b/public/images/player/player_poster.gif similarity index 100% rename from src/assets/player_poster.gif rename to public/images/player/player_poster.gif Binary files differ diff --git a/src/assets/duihao.png b/public/images/search/duihao.png similarity index 100% rename from src/assets/duihao.png rename to public/images/search/duihao.png Binary files differ diff --git a/src/assets/nobody.png b/public/images/search/nobody.png similarity index 100% rename from src/assets/nobody.png rename to public/images/search/nobody.png Binary files differ diff --git a/src/assets/gif/searchLoading.gif b/public/images/search/searchLoading.gif similarity index 100% rename from src/assets/gif/searchLoading.gif rename to public/images/search/searchLoading.gif Binary files differ diff --git a/src/Pool/TreeData.ts b/src/Pool/TreeData.ts index 5ec9fc6..0e77acd 100644 --- a/src/Pool/TreeData.ts +++ b/src/Pool/TreeData.ts @@ -377,7 +377,8 @@ obj.iconStatus2 = '1' } if (!i.snapshot_url) { - obj.snapshot_url = require('@/assets/nobody.png') + // obj.snapshot_url = require('@/assets/nobody.png') + obj.snapshot_url = "" } else { obj.snapshot_url = '/httpImage/' + obj.snapshot_url } diff --git a/src/assets/baseimg_cameara.png b/src/assets/baseimg_cameara.png deleted file mode 100644 index 259d4c9..0000000 --- a/src/assets/baseimg_cameara.png +++ /dev/null Binary files differ diff --git a/src/assets/bg/22.jpg b/src/assets/bg/22.jpg deleted file mode 100644 index 23b241b..0000000 --- a/src/assets/bg/22.jpg +++ /dev/null Binary files differ diff --git a/src/assets/bg/player_poster.gif b/src/assets/bg/player_poster.gif deleted file mode 100644 index 0894198..0000000 --- a/src/assets/bg/player_poster.gif +++ /dev/null Binary files differ diff --git a/src/assets/gif/blue.gif b/src/assets/gif/blue.gif deleted file mode 100644 index 22f0162..0000000 --- a/src/assets/gif/blue.gif +++ /dev/null Binary files differ diff --git a/src/assets/baseimg.png b/src/assets/img/baseimg.png similarity index 100% rename from src/assets/baseimg.png rename to src/assets/img/baseimg.png Binary files differ diff --git a/src/assets/img/desktop/circle.png b/src/assets/img/desktop/circle.png deleted file mode 100644 index e2eedce..0000000 --- a/src/assets/img/desktop/circle.png +++ /dev/null Binary files differ diff --git a/src/assets/img/desktop/desktop.png b/src/assets/img/desktop/desktop.png deleted file mode 100644 index 7b9b347..0000000 --- a/src/assets/img/desktop/desktop.png +++ /dev/null Binary files differ diff --git a/src/assets/img/desktop/main.jpg b/src/assets/img/desktop/main.jpg deleted file mode 100644 index 400f79a..0000000 --- a/src/assets/img/desktop/main.jpg +++ /dev/null Binary files differ diff --git a/src/assets/img/desktop/trash.png b/src/assets/img/desktop/trash.png deleted file mode 100644 index c1d758c..0000000 --- a/src/assets/img/desktop/trash.png +++ /dev/null Binary files differ diff --git a/src/assets/bg/green.png b/src/assets/img/green.png similarity index 100% rename from src/assets/bg/green.png rename to src/assets/img/green.png Binary files differ diff --git a/src/assets/img/login.png b/src/assets/img/login.png deleted file mode 100644 index 4b3a4ba..0000000 --- a/src/assets/img/login.png +++ /dev/null Binary files differ diff --git a/src/assets/img/logo.png b/src/assets/img/logo.png deleted file mode 100644 index 048d92f..0000000 --- a/src/assets/img/logo.png +++ /dev/null Binary files differ diff --git a/src/assets/bg/red.png b/src/assets/img/red.png similarity index 100% rename from src/assets/bg/red.png rename to src/assets/img/red.png Binary files differ diff --git a/src/assets/logo.png b/src/assets/logo.png deleted file mode 100644 index f3d2503..0000000 --- a/src/assets/logo.png +++ /dev/null Binary files differ diff --git a/src/components/canvas/Dialog.vue b/src/components/canvas/Dialog.vue index f275172..8245db6 100644 --- a/src/components/canvas/Dialog.vue +++ b/src/components/canvas/Dialog.vue @@ -86,7 +86,7 @@ @click="undo" :disabled="disableSelect" style="position:absolute;left:25px;top:400px;font-size:2rem;cursor:pointer" - ></span> --> + ></span>--> </el-tooltip> <!-- <el-button type="default" @click="undo()">鎾ら攢</el-button> --> </el-col> @@ -112,7 +112,7 @@ class="iconfont icongengxin" @click="refresh" style="position:absolute;left:930px;font-size:2.5rem;cursor:pointer;color:white" - ></span> --> + ></span>--> </el-col> </el-row> </div> @@ -122,7 +122,7 @@ name: "canvasDialog", data() { return { - backImg: require("../../assets/baseimg.png"), + backImg: require("../../assets/img/baseimg.png"), url: "", // canvas鍥剧墖鐨勪簩杩涘埗鏍煎紡杞负dataURL鏍煎紡 type: "0", // 缁樺浘鐘舵�� '0'涓洪�変腑鍒犻櫎锛�'1'涓虹敾绾匡紝鈥�2鈥欎负鐢荤煩褰紝鈥�4鈥欎负鐢荤澶达紝鈥�5鈥欎负鐢诲杈瑰舰 points: [], // 璁板綍缁樺埗澶氳竟褰㈡椂鐨勫悇鐐瑰潗鏍囷紝缁樺埗澶氳竟褰㈡椂鐢变簬涓嶆槸涓�绗斿畬鎴愶紝浠ユ暟缁勬暟鎹仛濮嬬粓闂悎鐨勫浘褰紝鍙屽嚮鍚庡綍鎴愬揩鐓э紝鎶婃暟缁勫唴瀹硅浆绉诲埌鏈�缁堟暟鎹腑锛岀劧鍚庢竻绌烘暟缁� @@ -215,7 +215,7 @@ src: this.c.toDataURL("image/png") }); this.delCursor = { type: -1, index: -1, remarksName: "", id: "" } - + console.log("鐢诲竷鍒濆鍖�"); }, // 鍙栨秷鐢诲竷娓呴櫎鐘舵�佸嚱鏁� @@ -789,8 +789,8 @@ } // console.log("鎾ら攢锛�",this.canvasData); }, - disabledOthers(type){ - console.log("褰撳墠type:",type) + disabledOthers(type) { + console.log("褰撳墠type:", type) switch (type) { case "1": this.disableLine = false @@ -817,14 +817,14 @@ this.disableLine = true this.disableRect = true this.disableArrow = true - this.disablePolygon = false + this.disablePolygon = false this.disableSelect = true break } - console.log("绂佺敤鐩寸嚎锛�",this.disableLine) - console.log("绂佺敤鐭╁舰锛�",this.disableRect) - console.log("绂佺敤绠ご锛�",this.disableArrow) - console.log("绂佺敤澶氳竟褰細",this.disablePolygon) + console.log("绂佺敤鐩寸嚎锛�", this.disableLine) + console.log("绂佺敤鐭╁舰锛�", this.disableRect) + console.log("绂佺敤绠ご锛�", this.disableArrow) + console.log("绂佺敤澶氳竟褰細", this.disablePolygon) }, undisabled() { this.disableLine = false diff --git a/src/components/canvas/index.vue b/src/components/canvas/index.vue index ba2e0d7..fc937e1 100644 --- a/src/components/canvas/index.vue +++ b/src/components/canvas/index.vue @@ -89,7 +89,7 @@ }, data() { return { - blackImg: require("../../assets/baseimg.png"), + blackImg: require("../../assets/img/baseimg.png"), canvasData: { line: [], rect: [], @@ -148,7 +148,7 @@ .then(res => { if (res.data.cameraId === this.currentCameraId) { this.baseImg = res.data.snapshotUrl; - this.$emit('refresh',res.data.snapshotUrl) + this.$emit('refresh', res.data.snapshotUrl) this.$forceUpdate() this.$notify({ type: "success", diff --git a/src/components/player/index.vue b/src/components/player/index.vue index 3b388f9..0f30b78 100644 --- a/src/components/player/index.vue +++ b/src/components/player/index.vue @@ -9,7 +9,6 @@ </template> <script> import Wfs from "./wfs"; -import defPoster from "../../assets/player_poster.gif" export default { name: "CameraPlayer", @@ -42,7 +41,7 @@ }, computed: { poster() { - return defPoster + "?t=" + Math.random() + return "/images/player/player_poster.gif?t=" + Math.random() } }, data() { diff --git a/src/components/searching/SearchLeft.vue b/src/components/searching/SearchLeft.vue index c04226f..53edcee 100644 --- a/src/components/searching/SearchLeft.vue +++ b/src/components/searching/SearchLeft.vue @@ -140,8 +140,8 @@ data() { return { tempUploadImg: "", - tempImg: require("../../assets/nobody.png"), - selectedIcon: require("../../assets/duihao.png"), + tempImg: "/images/search/nobody.png", + selectedIcon: "/images/search/duihao.png", bigPhoto: [], displayUpload: true, clickNum: 0, @@ -211,7 +211,6 @@ if (res.data.smImage.length % 3 !== 0) { // 鐢ㄨ櫄鎷熶汉鍍忚ˉ鍏ㄦ暣琛� const length = res.data.smImage.length % 3 - console.log("鐪嬬湅length鐨勫��", length) this.unrealSmallPath.length = 0 for (var i = 0; i < 3 - length; i++) { this.unrealSmallPath.push(this.tempImg) diff --git a/src/components/searching/UploadImg.vue b/src/components/searching/UploadImg.vue index 4f59cee..35dcc8f 100644 --- a/src/components/searching/UploadImg.vue +++ b/src/components/searching/UploadImg.vue @@ -144,8 +144,8 @@ data() { return { tempUploadImg: "", - tempImg: require("../../assets/nobody.png"), - selectedIcon: require("../../assets/duihao.png"), + tempImg: "/images/search/nobody.png", + selectedIcon: "/images/search/duihao.png", bigPhoto: [], displayUpload: true, clickNum: 0, diff --git a/src/components/searching/uploadDialog.vue b/src/components/searching/uploadDialog.vue index 67ce475..e5f7e6c 100644 --- a/src/components/searching/uploadDialog.vue +++ b/src/components/searching/uploadDialog.vue @@ -124,8 +124,8 @@ data() { return { tempUploadImg: "", - tempImg: require("../../assets/nobody.png"), - selectedIcon: require("../../assets/duihao.png"), + tempImg: "/images/search/nobody.png", + selectedIcon: "/images/search/duihao.png", bigPhoto: [], isShowUpload: false, clickNum: 0, diff --git a/src/components/searching/uploadForModel.vue b/src/components/searching/uploadForModel.vue index dc764fa..7cd6c85 100644 --- a/src/components/searching/uploadForModel.vue +++ b/src/components/searching/uploadForModel.vue @@ -116,8 +116,8 @@ data() { return { tempUploadImg: "", - tempImg: require("../../assets/nobody.png"), - selectedIcon: require("../../assets/duihao.png"), + tempImg: "/images/search/nobody.png", + selectedIcon: "/images/search/duihao.png", bigPhoto: [], displayUpload: true, clickNum: 0, diff --git a/src/components/subComponents/CardItem.vue b/src/components/subComponents/CardItem.vue index df8d6ef..430de0e 100644 --- a/src/components/subComponents/CardItem.vue +++ b/src/components/subComponents/CardItem.vue @@ -547,9 +547,9 @@ }, getUrl(bwtype) { if (bwtype == 1) { - return `url(${require("@/assets/bg/red.png")})` + return `url(${require("@/assets/img/red.png")})` } else { - return `url(${require("@/assets/bg/green.png")})` + return `url(${require("@/assets/img/green.png")})` } }, changeInitialIndex(index) { diff --git a/src/components/subComponents/ParticleNetwork.vue b/src/components/subComponents/ParticleNetwork.vue deleted file mode 100644 index 1989781..0000000 --- a/src/components/subComponents/ParticleNetwork.vue +++ /dev/null @@ -1,351 +0,0 @@ -<template> - <div class="particle-network-animation" :style="`height:${height}px;width:${width}px`"> - <div style="display:none"> - <img ref="conf0" src="../../assets/img/login/0.png" /> - <img ref="conf1" src="../../assets/img/login/1.png" /> - <img ref="conf2" src="../../assets/img/login/2.png" /> - <img ref="conf3" src="../../assets/img/login/3.png" /> - <img ref="conf4" src="../../assets/img/login/4.png" /> - <img ref="conf5" src="../../assets/img/login/5.png" /> - <img ref="conf6" src="../../assets/img/login/6.png" /> - <img ref="conf7" src="../../assets/img/login/7.png" /> - <img ref="conf8" src="../../assets/img/login/8.png" /> - <img ref="conf9" src="../../assets/img/login/9.png" /> - <img ref="conf10" src="../../assets/img/login/10.png" /> - <img ref="conf11" src="../../assets/img/login/11.png" /> - <img ref="conf12" src="../../assets/img/login/12.png" /> - <img ref="conf13" src="../../assets/img/login/13.png" /> - <img ref="conf14" src="../../assets/img/login/14.png" /> - <img ref="conf15" src="../../assets/img/login/15.png" /> - </div> - </div> -</template> - -<script> -export default { - name: "particleNetwork", - data() { - return { - imgNumber: 0, - destoryed: false - }; - }, - props: { - height: { - type: Number, - default: 800 - }, - width: { - type: Number, - default: 1000 - } - }, - mounted() { - this.createCavas(); - }, - beforeDestroy() { - this.destoryed = true - }, - methods: { - createCavas() { - let that = this; - var ParticleNetworkAnimation, PNA; - ParticleNetworkAnimation = PNA = function () { }; - - PNA.prototype.init = function (element) { - // this.$el = $(element); - - this.container = element; - this.canvas = document.createElement("canvas"); - this.sizeCanvas(); - this.container.appendChild(this.canvas); - this.ctx = this.canvas.getContext("2d"); - this.particleNetwork = new ParticleNetwork(this); - - return this; - }; - - PNA.prototype.sizeCanvas = function () { - this.canvas.width = this.container.offsetWidth; - this.canvas.height = this.container.offsetHeight; - }; - - var Particle = function (parent, x, y) { - this.network = parent; - this.imgNumber = that.imgNumber++; - this.canvas = parent.canvas; - this.ctx = parent.ctx; - this.particleColor = returnRandomArrayitem( - this.network.options.particleColors - ); - // 鎺у埗澶у皬 - this.radius = getLimitedRandom(10, 30); - this.opacity = 0; - // this.x = x || Math.random() * this.canvas.width; - // this.y = y || Math.random() * this.canvas.height; - - // 鎺у埗鍒濆鍧愭爣锛屼笉瑕佽秴鍑鸿寖鍥� - this.x = x || getLimitedRandom(50, this.canvas.width - 50); - this.y = y || getLimitedRandom(50, this.canvas.height - 50); - - this.velocity = { - x: (Math.random() - 0.5) * parent.options.velocity, - y: (Math.random() - 0.5) * parent.options.velocity - }; - }; - - Particle.prototype.update = function () { - if (this.opacity < 0.8) { - this.opacity += 0.01; - } else { - this.opacity = 0.8; - } - // 绉诲姩鍒拌竟缂樻椂鍙嶅悜 - if (this.x > this.canvas.width - 50 || this.x < 50) { - this.velocity.x = -this.velocity.x; - } - if (this.y > this.canvas.height - 50 || this.y < 50) { - this.velocity.y = -this.velocity.y; - } - - // 鏇存柊鍧愭爣 - this.x += this.velocity.x; - this.y += this.velocity.y; - }; - - Particle.prototype.draw = function () { - // Draw particle - if (that.destoryed) { - return; - } - this.ctx.beginPath(); - this.ctx.fillStyle = this.particleColor; - this.ctx.globalAlpha = this.opacity; - this.ctx.arc(this.x, this.y, this.radius, 0, 2 * Math.PI); - this.ctx.fill(); - var prop = this.radius; - // let imgOdr = parseInt(Math.random() * 16, 10); - var img = that.$refs["conf" + this.imgNumber]; - // img.src = "../../assets/img/login/" + imgOdr + ".png"; - this.ctx.drawImage( - img, - this.x - this.radius * 0.8, - this.y - this.radius * 0.8, - this.radius * 1.6, - this.radius * 1.6 - ); - }; - - var ParticleNetwork = function (parent) { - this.options = { - velocity: 1, // the higher the faster - density: 1500, // the lower the denser - netLineDistance: 300, - netLineColor: "#477bec", - particleColors: ["#7E8BFA"] // ['#6D4E5C', '#aaa', '#FFC458' ] - }; - this.canvas = parent.canvas; - this.ctx = parent.ctx; - - this.init(); - }; - - ParticleNetwork.prototype.init = function () { - // Create particle objects - this.createParticles(true); - - // Update canvas - this.animationFrame = requestAnimationFrame(this.update.bind(this)); - }; - - ParticleNetwork.prototype.createParticles = function (isInitial) { - // Initialise / reset particles - var me = this; - this.particles = []; - // var quantity = this.canvas.width * this.canvas.height / this.options.density; - var quantity = 17; - - if (isInitial) { - var counter = 0; - clearInterval(this.createIntervalId); - this.createIntervalId = setInterval( - function () { - if (counter < quantity - 1) { - // Create particle object - this.particles.push(new Particle(this)); - } else { - clearInterval(me.createIntervalId); - } - counter++; - }.bind(this), - 250 - ); - } else { - // Create particle objects - for (var i = 0; i < quantity; i++) { - this.particles.push(new Particle(this)); - } - } - }; - - ParticleNetwork.prototype.destory = function (isInitial) { - clearInterval(this.createIntervalId); - }; - ParticleNetwork.prototype.update = function () { - if (this.canvas) { - this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); - this.ctx.globalAlpha = 1; - - // Draw connections - for (var i = 0; i < this.particles.length; i++) { - for (var j = this.particles.length - 1; j > i; j--) { - var distance, - p1 = this.particles[i], - p2 = this.particles[j]; - - // check very simply if the two points are even a candidate for further measurements - distance = Math.min(Math.abs(p1.x - p2.x), Math.abs(p1.y - p2.y)); - if (distance > this.options.netLineDistance) { - continue; - } - - // the two points seem close enough, now let's measure precisely - distance = Math.sqrt( - Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2) - ); - if (distance > this.options.netLineDistance) { - continue; - } - - this.ctx.beginPath(); - this.ctx.strokeStyle = this.options.netLineColor; - this.ctx.globalAlpha = - ((this.options.netLineDistance - distance) / - this.options.netLineDistance) * - p1.opacity * - p2.opacity; - this.ctx.lineWidth = 1.7; - this.ctx.moveTo(p1.x, p1.y); - this.ctx.lineTo(p2.x, p2.y); - this.ctx.stroke(); - } - } - - // Draw particles - for (var i = 0; i < this.particles.length; i++) { - this.particles[i].update(); - this.particles[i].draw(); - } - - if (this.options.velocity !== 0) { - this.animationFrame = requestAnimationFrame(this.update.bind(this)); - } - } else { - cancelAnimationFrame(this.animationFrame); - } - }; - - var getLimitedRandom = function (min, max, roundToInteger) { - var number = Math.random() * (max - min) + min; - if (roundToInteger) { - number = Math.round(number); - } - return number; - }; - - var returnRandomArrayitem = function (array) { - return array[Math.floor(Math.random() * array.length)]; - }; - - var elm = document.getElementsByClassName( - "particle-network-animation" - )[0]; - - this.pna = new ParticleNetworkAnimation(); - this.pna.init(elm); - } - } -}; -</script> - -<style lang="scss"> -.particle-network-animation { - position: fixed; - top: 20%; - left: 0; - right: 0; - // background-color: #171717; -} -.particle-network-animation::before { - z-index: -3; - content: ""; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - background-size: cover; - opacity: 0.2; -} - -.glow { - z-index: -2; - position: fixed; - top: 50%; - left: 50%; - background-image: radial-gradient( - circle closest-side, - rgba(255, 255, 255, 0.025), - transparent - ); -} - -.glow-1 { - width: 150vw; - height: 150vh; - margin-top: -75vh; - margin-left: -75vw; - animation: glow-1-move 25s linear infinite both; -} - -@keyframes glow-1-move { - from { - transform: translate(-100%, 100%); - } - to { - transform: translate(100%, -100%); - } -} -.glow-2 { - width: 100vw; - height: 100vh; - margin-top: -50vh; - margin-left: -50vw; - animation: glow-2-move 25s linear 8.3333333333s infinite both; -} - -@keyframes glow-2-move { - from { - transform: translate(-100%, 0%); - } - to { - transform: translate(100%, 100%); - } -} -.glow-3 { - width: 120vw; - height: 120vh; - margin-top: -60vh; - margin-left: -60vw; - animation: glow-3-move 25s linear 16.6666666667s infinite both; -} - -@keyframes glow-3-move { - from { - transform: translate(100%, 100%); - } - to { - transform: translate(0%, -100%); - } -} -</style> \ No newline at end of file diff --git a/src/pages/algorithmManage/index/App.vue b/src/pages/algorithmManage/index/App.vue index 6b97404..552369a 100644 --- a/src/pages/algorithmManage/index/App.vue +++ b/src/pages/algorithmManage/index/App.vue @@ -66,8 +66,12 @@ <div class="svg-wrap"> <!-- <svg class="icon" aria-hidden="true" style="font-size:7rem;"> <use :xlink:href="`#${item.icon}`" /> - </svg> --> - <img class="baseImg" :src="`data:image/png;base64,${item.iconBlob}`" alt=""> + </svg>--> + <img + class="baseImg" + :src="`data:image/png;base64,${item.iconBlob}`" + alt + /> </div> <div class="alg-name"> <div style="padding:0px 10px 0px 10px;"> @@ -705,7 +709,7 @@ </div> </div> </div> - </div> --> + </div>--> </div> </div> </div> @@ -846,7 +850,7 @@ }, directives: { focus: { - inserted: function(el) { + inserted: function (el) { el.querySelector("input").focus(); } } @@ -869,7 +873,7 @@ //this.activeCode this.actStep++ }, - getCodeDetail() {}, + getCodeDetail() { }, checkMyAlgorith() { this.actDrawerShow = false; this.activeName = "myAlgorithm"; @@ -909,7 +913,7 @@ // }); // }); - this.$confirm('','绠楁硶淇℃伅',{ + this.$confirm('', '绠楁硶淇℃伅', { message: `<div class="installInfo"> <div><span>绠楁硶鍚嶇О锛�</span><span>${file.filename}</span></div> <div><span>瀹夎鐗堟湰锛�</span><span></span></div> @@ -924,7 +928,7 @@ this.isInstall = true; //瀹夎 installSdk(file).then(res => { - if(res.success){ + if (res.success) { debugger this.isInstall = false; //this.$refs['progressBar'].style.width = 100% @@ -933,16 +937,16 @@ type: 'success', message: '瀹夎鎴愬姛,灏嗚烦杞嚦鎴戠殑绠楁硶涓煡鐪�' }); - setTimeout(()=>{ + setTimeout(() => { this.findAllSdk(); this.activeName = 'myAlgorithm'; - },3000) + }, 3000) } }); }).catch(() => { console.log('鍙栨秷瀹夎') }) - + }, onFileAdded(f) { @@ -1036,7 +1040,7 @@ .then(() => { this.deleteTask(data); }) - .catch(err => {}); + .catch(err => { }); }, clickSetAlgo(row, data) { // window.console.log(row, data, "缂栬緫浠诲姟涓煇涓�涓畻娉�"); @@ -1225,7 +1229,7 @@ .then(() => { this.delTaskSdk(task, sdk); }) - .catch(err => {}); + .catch(err => { }); }, selectChange(event, type, data) { if (type === "options1") { @@ -1603,14 +1607,14 @@ this.sceneDialogVisible = true; this.dialogTitle = '缂栬緫鍦烘櫙妯℃澘'; }, - handleDelScene(item){ + handleDelScene(item) { this.$confirm('姝ゆ搷浣滃皢鍒犻櫎璇ュ簲鐢ㄥ満鏅ā鏉�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { - deleteTemplate(item.id).then(res=>{ - if(res && res.success){ + deleteTemplate(item.id).then(res => { + if (res && res.success) { this.updateTemplates(); this.$message({ type: 'success', @@ -1618,7 +1622,7 @@ }); } }) - + }).catch(() => { console.log('鍙栨秷鍒犻櫎'); }); @@ -1646,7 +1650,7 @@ .s-task-manage { width: 100% !important; height: 100%; - + box-sizing: border-box; background-color: rgb(233, 235, 242); padding: 10px; @@ -1693,20 +1697,18 @@ cursor: pointer; } - - -.installInfo{ +.installInfo { text-indent: 2em; font-size: 14px; color: #777; - p{ + p { text-align: center; color: #666; } } .task-manage { height: 100%; - .installModel{ + .installModel { width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.7); @@ -1714,7 +1716,7 @@ top: 0; left: 0; z-index: 100; - .progress-bar{ + .progress-bar { width: 70%; height: 17px; border-radius: 3px; @@ -1722,10 +1724,10 @@ position: absolute; top: 50%; left: 50%; - background: url(../../../assets/gif/green.gif); + background: url("/images/algo/green.gif"); overflow: hidden; - transform: translate(-50%,-50%); - .inner-bar{ + transform: translate(-50%, -50%); + .inner-bar { position: absolute; top: 0; left: 0; @@ -1753,7 +1755,7 @@ // width: 58% !important; // } // } - .edit-rules-box{ + .edit-rules-box { padding: 0 2px 0 13px; } .common { @@ -1834,7 +1836,7 @@ margin-bottom: 30px; .inner { width: 80%; - + box-sizing: border-box; position: relative; font-size: 14px; @@ -1845,12 +1847,12 @@ box-shadow: 0 5px 12px 0 rgba(0, 0, 0, 0.07); border-radius: 4px; margin: auto; - &:hover{ - .mask{ + &:hover { + .mask { display: block; } } - .mask{ + .mask { position: absolute; top: 0; left: 0; @@ -1862,18 +1864,18 @@ z-index: 1; border-radius: 3px; display: none; - .tool{ + .tool { position: absolute; top: 49%; left: 50%; - transform: translate(-50%,-50%); - i{ + transform: translate(-50%, -50%); + i { font-size: 50px; } - i:nth-of-type(1){ + i:nth-of-type(1) { margin-right: 30px; } - i:nth-of-type(2){ + i:nth-of-type(2) { color: red; } } @@ -1885,7 +1887,7 @@ margin: auto; justify-content: center; align-content: center; - align-items: center; + align-items: center; .single, .double, .third, @@ -1920,54 +1922,54 @@ } .single { margin: auto; - .svg-wrap{ + .svg-wrap { top: 50%; left: 50%; - transform: translate(-50%,-50%); + transform: translate(-50%, -50%); box-shadow: none; } } - .double{ - .svg-wrap:nth-of-type(1){ + .double { + .svg-wrap:nth-of-type(1) { top: 50%; transform: translateY(-50%); left: 0; } - .svg-wrap:nth-of-type(2){ + .svg-wrap:nth-of-type(2) { top: 50%; transform: translateY(-50%); right: 0; } } - .third{ - .svg-wrap:nth-of-type(1){ + .third { + .svg-wrap:nth-of-type(1) { top: 0; left: 0; } - .svg-wrap:nth-of-type(2){ + .svg-wrap:nth-of-type(2) { top: 0; right: 0; } - .svg-wrap:nth-of-type(3){ + .svg-wrap:nth-of-type(3) { top: 50%; left: 50%; transform: translateX(-50%); } } - .four{ - .svg-wrap:nth-of-type(1){ + .four { + .svg-wrap:nth-of-type(1) { top: 0; left: 0; } - .svg-wrap:nth-of-type(2){ + .svg-wrap:nth-of-type(2) { top: 0; right: 0; } - .svg-wrap:nth-of-type(3){ + .svg-wrap:nth-of-type(3) { top: 50%; - left: 0; + left: 0; } - .svg-wrap:nth-of-type(4){ + .svg-wrap:nth-of-type(4) { top: 50%; right: 0; } @@ -1983,7 +1985,6 @@ left: 0; } } - } } .store-list { @@ -2009,12 +2010,11 @@ width: 80%; margin: auto; padding-top: 80%; - svg{ + svg { position: absolute; top: 50%; left: 50%; - transform: translate(-50%,-50%); - + transform: translate(-50%, -50%); } } .alg-name { @@ -2097,9 +2097,9 @@ } .text-right { padding-right: 30px; - .tip{ + .tip { color: #999; - line-height: 38px; + line-height: 38px; } } } @@ -2391,22 +2391,22 @@ height: 100%; padding-bottom: 10px; text-align: center; - .svg-wrap{ + .svg-wrap { width: 80%; margin: auto; padding-top: 80%; position: relative; - svg{ + svg { position: absolute; top: 50%; left: 50%; - transform: translate(-50%,-50%); + transform: translate(-50%, -50%); } .baseImg { position: absolute; top: 50%; left: 50%; - transform: translate(-50%,-50%); + transform: translate(-50%, -50%); } } } diff --git a/src/pages/cameraAccess/components/CameraInfo.vue b/src/pages/cameraAccess/components/CameraInfo.vue index 35546d2..e108dd6 100644 --- a/src/pages/cameraAccess/components/CameraInfo.vue +++ b/src/pages/cameraAccess/components/CameraInfo.vue @@ -135,7 +135,7 @@ :isRunning="false" v-if="videoItem !== '' && videoItem !== undefined && videoItem !== null && visibilityState" ></camera-player> - <video v-else poster="../../../assets/baseimg_cameara.png" preload="none"></video> + <video v-else poster="/images/cameraAccess/video-poster.png" preload="none"></video> </el-col> <!-- 绯荤粺杩愯淇℃伅 --> diff --git a/src/pages/cameraAccess/components/DataStackInfo.vue b/src/pages/cameraAccess/components/DataStackInfo.vue index b0709c1..d37e430 100644 --- a/src/pages/cameraAccess/components/DataStackInfo.vue +++ b/src/pages/cameraAccess/components/DataStackInfo.vue @@ -799,19 +799,19 @@ vertical-align: middle; } .snapshot-video { - background: url("../../../assets/img/video.png"); + background: url("/images/cameraAccess/video.png"); background-repeat: round; } .snapshot-image { - background: url("../../../assets/img/image.png"); + background: url("/images/cameraAccess/image.png"); background-repeat: round; } .snapshot-audio { - background: url("../../../assets/img/audio.png"); + background: url("/images/cameraAccess/audio.png"); background-repeat: round; } .snapshot-files { - background: url("../../../assets/img/files.png"); + background: url("/images/cameraAccess/files.png"); background-repeat: round; } } diff --git a/src/pages/cameraAccess/components/LinkageRule.vue b/src/pages/cameraAccess/components/LinkageRule.vue index 2d5e609..f34535c 100644 --- a/src/pages/cameraAccess/components/LinkageRule.vue +++ b/src/pages/cameraAccess/components/LinkageRule.vue @@ -4,28 +4,7 @@ <p style="text-align:left;margin-bottom: 14px;"> <b style="font-size: 14px;line-height: 18px;">宸查�夌畻娉�</b> </p> - <!-- <swiper :options="swiperTaskOption" class="swiper-box-container swiper-no-swiping"> - <span class="task-tip" v-show="tableRuleList.length == 0 ">鏆傛棤绠楁硶锛岃鍦ㄧ嫭绔嬭鍒欎腑閫夋嫨绠楁硶</span> - <swiper-slide v-for="(item, index) in tableRuleList" :key="index"> - <div class="item-card"> - <p style="text-align: right; width:100%; height:25px"></p> - <p style="color: #0066EB;padding-top: 20px;'"> - <b>{{ item.scene_name }}</b> - </p> - </div> - </swiper-slide> - </swiper> - <div class="pre-border" v-show="tableRuleList.length > 4 "> - <div class="icon-btn" slot="button-prev"> - <i class="iconfont iconzuo"></i> - </div> - </div> - <div class="next-border" v-show="tableRuleList.length > 4 "> - <div class="icon-btn" slot="button-next"> - <i class="iconfont iconyou1"></i> - </div> - </div>--> <div> <div class="slide-scene"> <span class="task-tip" v-if="tableRuleList.length == 0 ">鏆傛棤绠楁硶锛岃鍦ㄧ嫭绔嬭鍒欎腑閫夋嫨绠楁硶</span> @@ -583,7 +562,7 @@ </style> <style lang="scss" scoped> .el-loading-spinner { - background: url("../../../assets/gif/loading.gif") no-repeat; + background: url("/images/cameraAccess/loading.gif") no-repeat; top: 50%; margin-top: -21px; width: calc(100% - 260px) !important; diff --git a/src/pages/cameraAccess/components/SeparateRules.vue b/src/pages/cameraAccess/components/SeparateRules.vue index 5d7c676..a92a0dd 100644 --- a/src/pages/cameraAccess/components/SeparateRules.vue +++ b/src/pages/cameraAccess/components/SeparateRules.vue @@ -854,7 +854,7 @@ } } .el-loading-spinner { - background: url("../../../assets/gif/loading.gif") no-repeat; + background: url("/images/cameraAccess/loading.gif") no-repeat; top: 50%; margin-top: -21px; width: calc(100% - 260px) !important; diff --git a/src/pages/cameraVideo/components/VideoItem.vue b/src/pages/cameraVideo/components/VideoItem.vue index f39d7b3..416188f 100644 --- a/src/pages/cameraVideo/components/VideoItem.vue +++ b/src/pages/cameraVideo/components/VideoItem.vue @@ -41,7 +41,7 @@ v-if="videoItem !== '' && videoItem !== undefined && videoItem !== null && TreeDataPool.treeActiveName==='dataStack'" :src="videoItem.rtsp" autoplay="autoplay" - poster="../../../assets/baseimg.png" + poster="/images/cameraVideo/video-poster.png" controls >鎮ㄧ殑娴忚鍣ㄤ笉鏀寔 video 鏍囩銆�</video> </div> diff --git a/src/pages/index/App.vue b/src/pages/index/App.vue index b5a62d2..bb2b52f 100644 --- a/src/pages/index/App.vue +++ b/src/pages/index/App.vue @@ -9,7 +9,7 @@ </div> <div class="left-bg"> <div class="login-logo"> - <img src="../../assets/img/login-logo.png" alt width="105px" height="105px" /> + <img src="/images/login-logo.png" alt width="105px" height="105px" /> </div> <div class="login-com"> <span>鍖椾含璐濇�濈鎶�鏈湁闄愬叕鍙�</span> @@ -52,7 +52,7 @@ <script> import { tologin, getLoginUserData, getServerName } from './api.ts' -import ParticleNetwork from '@/components/ParticleNetwork' +import ParticleNetwork from './ParticleNetwork' import Licence from '@/components/licence' export default { @@ -189,7 +189,7 @@ position: fixed; top: 0; left: 0; - background-image: url("../../assets/img/login-net.png"); + background-image: url("/images/login-net.png"); width: 100%; height: 100%; diff --git a/src/components/ParticleNetwork.vue b/src/pages/index/ParticleNetwork.vue similarity index 89% rename from src/components/ParticleNetwork.vue rename to src/pages/index/ParticleNetwork.vue index c59240a..53a1e12 100644 --- a/src/components/ParticleNetwork.vue +++ b/src/pages/index/ParticleNetwork.vue @@ -1,22 +1,22 @@ <template> <div class="particle-network-animation" :style="`height:${height}px;width:${width}px`"> <div style="display:none"> - <img ref="conf0" src="../assets/img/login/0.png" /> - <img ref="conf1" src="../assets/img/login/1.png" /> - <img ref="conf2" src="../assets/img/login/2.png" /> - <img ref="conf3" src="../assets/img/login/3.png" /> - <img ref="conf4" src="../assets/img/login/4.png" /> - <img ref="conf5" src="../assets/img/login/5.png" /> - <img ref="conf6" src="../assets/img/login/6.png" /> - <img ref="conf7" src="../assets/img/login/7.png" /> - <img ref="conf8" src="../assets/img/login/8.png" /> - <img ref="conf9" src="../assets/img/login/9.png" /> - <img ref="conf10" src="../assets/img/login/10.png" /> - <img ref="conf11" src="../assets/img/login/11.png" /> - <img ref="conf12" src="../assets/img/login/12.png" /> - <img ref="conf13" src="../assets/img/login/13.png" /> - <img ref="conf14" src="../assets/img/login/14.png" /> - <img ref="conf15" src="../assets/img/login/15.png" /> + <img ref="conf0" src="/images/login/0.png" /> + <img ref="conf1" src="/images/login/1.png" /> + <img ref="conf2" src="/images/login/2.png" /> + <img ref="conf3" src="/images/login/3.png" /> + <img ref="conf4" src="/images/login/4.png" /> + <img ref="conf5" src="/images/login/5.png" /> + <img ref="conf6" src="/images/login/6.png" /> + <img ref="conf7" src="/images/login/7.png" /> + <img ref="conf8" src="/images/login/8.png" /> + <img ref="conf9" src="/images/login/9.png" /> + <img ref="conf10" src="/images/login/10.png" /> + <img ref="conf11" src="/images/login/11.png" /> + <img ref="conf12" src="/images/login/12.png" /> + <img ref="conf13" src="/images/login/13.png" /> + <img ref="conf14" src="/images/login/14.png" /> + <img ref="conf15" src="/images/login/15.png" /> </div> </div> </template> @@ -126,7 +126,6 @@ var prop = this.radius // let imgOdr = parseInt(Math.random() * 16, 10); var img = that.$refs['conf' + this.imgNumber] - // img.src = "../../assets/img/login/" + imgOdr + ".png"; this.ctx.drawImage( img, this.x - this.radius * 0.8, @@ -276,7 +275,7 @@ } .particle-network-animation::before { z-index: -3; - content: ''; + content: ""; position: absolute; top: 0; right: 0; diff --git a/src/pages/search/index/Searching.vue b/src/pages/search/index/Searching.vue index 554031e..0a30971 100644 --- a/src/pages/search/index/Searching.vue +++ b/src/pages/search/index/Searching.vue @@ -231,8 +231,7 @@ </div> </div> </hsc-window> - </hsc-window-style-metal> --> - + </hsc-window-style-metal>--> </div> </template> @@ -729,10 +728,10 @@ height: 100%; padding: 0px 20px; box-sizing: border-box; - + //涓存椂 - .el-carousel__item.is-active{ - z-index: 0!important; + .el-carousel__item.is-active { + z-index: 0 !important; } //涓存椂 @@ -894,7 +893,7 @@ width: 100%; height: 100%; .el-loading-spinner-search { - background: url("../../../assets/gif/searchLoading.gif") no-repeat; + background: url("/images/search/searchLoading.gif") no-repeat; } } } diff --git a/src/pages/test/components/cardWindow.vue b/src/pages/test/components/cardWindow.vue deleted file mode 100644 index b19f8ad..0000000 --- a/src/pages/test/components/cardWindow.vue +++ /dev/null @@ -1,362 +0,0 @@ -<template> - <div class="window-view"> - <hsc-window-style-metal class="windown-model"> - <hsc-window - v-for="(item, index) in CardList.details" - :closeButton="true" - @closebuttonclick="closeWindow(index)" - @update:height="resizeHeight" - @update:width="resizeWidth" - :key="index" - style="background:white; height:475px" - :left="center.x + index * 10" - :top="center.y + index * 10" - :resizable="true" - positionHint="center" - :isScrollable="true" - :minWidth="662" - :minHeight="479" - :maxWidth="10000" - :maxHeight="7000" - :height="defaultHeight" - :width="defaultWidth" - > - <div v-if="item.list.length == 1" style="height: calc(100% - 50px)"> - <model-card :data="item.list[0]"></model-card> - </div> - <el-carousel v-else height="calc(100% - 50px);" :autoplay="false"> - <el-carousel-item - v-for="(subitem, subindex) in item.list" - :key="subindex" - height="100%" - > - <model-card - :data="subitem" - :activeName="type" - @changeType="changeType" - :list="item.list" - ></model-card> - </el-carousel-item> - </el-carousel> - <div class="model-bottom"> - <p class="model-bottom-left" @click="upPage(item.list, index)"> - <i class="el-icon-arrow-left"></i> - 涓婁竴涓� - </p> - <p class="model-bottom-right" @click="nextPage(item.list, index)"> - 涓嬩竴涓� - <i class="el-icon-arrow-right"></i> - </p> - </div> - </hsc-window> - </hsc-window-style-metal> - </div> -</template> -<script> -import ModelCard from '@/components/subComponents/ModelCard' -export default { - name: 'cardWindow', - components: { - ModelCard - }, - data() { - return { - center: '', - type: 'pic', - defaultHeight: 432, - defaultWidth: 600 - } - }, - methods: { - resizeWidth(w) { - this.defaultWidth = w - }, - resizeHeight(h) { - this.defaultHeight = h - }, - changeType(str) { - this.type = str - }, - async closeWindow(index) { - let tempPage = JSON.stringify(this.CardList.details[index].ownerPage) - this.CardList.details.splice(index, 1) - if (this.CardList.details.length > 0) { - let len = this.CardList.details.length - let currentObj = this.CardList.details[len - 1] - if (Number(tempPage) === currentObj.ownerPage) { - this.VideoPhotoData.activeCard = currentObj.activeObject.id - } else { - this.VideoPhotoData.page = currentObj.ownerPage - await this.VideoPhotoData.querySearchList() - bus.$emit('changePage', this.VideoPhotoData.page) - this.CardList.datalist = this.VideoPhotoData.cards - this.VideoPhotoData.activeCard = currentObj.activeObject.id - } - } else { - this.VideoPhotoData.activeCard = '' - } - }, - async nextPage(dataInfo, index) { - let id = dataInfo[0].id - let res = this.CardList.getBehindEle(id) - if (res) { - this.$set(this.CardList.details, index, res) - this.VideoPhotoData.activeCard = res.activeObject.id - } else { - if ( - this.VideoPhotoData.total <= - this.VideoPhotoData.page * this.VideoPhotoData.size - ) { - this.$notify({ - title: '娉ㄦ剰', - message: '宸叉棤鏁版嵁鏇存柊!', - type: 'warning' - }) - return - } - this.VideoPhotoData.page += 1 - let detailsLen - let len - if (this.VideoPhotoData.uploadDiaplay) { - await this.VideoPhotoData.findPersonByPage() - bus.$emit('changePage', this.VideoPhotoData.page) - this.CardList.datalist = this.VideoPhotoData.persons - console.log('datalist:', this.CardList.datalist) - detailsLen = this.CardList.details.length - len = this.VideoPhotoData.persons.length - this.VideoPhotoData.activeCard = this.VideoPhotoData.persons[0].activeObject.id - } else { - await this.VideoPhotoData.querySearchList() - bus.$emit('changePage', this.VideoPhotoData.page) - this.CardList.datalist = this.VideoPhotoData.cards - detailsLen = this.CardList.details.length - len = this.VideoPhotoData.cards.length - this.VideoPhotoData.activeCard = this.VideoPhotoData.cards[0].activeObject.id - } - this.$set(this.CardList.details, index, this.CardList.datalist[0]) - this.$notify({ - title: '鏇存柊鏁版嵁', - message: '宸茶烦杞埌涓嬩竴椤碉紒', - type: 'warning' - }) - } - this.autoScrollDown() - // let target = driver.find_elements_by_class_name("my-active-card") - // let target = window.scroll - // console.log(target,'閫夋嫨寰楀厓绱�') - // driver.execute_script("arguments[0].scrollIntoView();", target) - }, - async upPage(dataInfo, index) { - let id = dataInfo[0].id - let res = this.CardList.getFrontEle(id) - if (res) { - this.$set(this.CardList.details, index, res) - this.VideoPhotoData.activeCard = res.activeObject.id - this.autoScrollUp() - } else { - if (this.VideoPhotoData.page === 1) { - this.$notify({ - title: '娉ㄦ剰', - message: '宸叉棤鏁版嵁鏇存柊!', - type: 'warning' - }) - return - } - this.VideoPhotoData.page -= 1 - let detailsLen - let len - if (this.VideoPhotoData.uploadDiaplay) { - await this.VideoPhotoData.findPersonByPage() - bus.$emit('changePage', this.VideoPhotoData.page) - this.CardList.datalist = this.VideoPhotoData.persons - detailsLen = this.CardList.details.length - len = this.VideoPhotoData.persons.length - this.VideoPhotoData.activeCard = this.VideoPhotoData.persons[ - len - 1 - ].activeObject.id - } else { - await this.VideoPhotoData.querySearchList() - bus.$emit('changePage', this.VideoPhotoData.page) - this.CardList.datalist = this.VideoPhotoData.cards - detailsLen = this.CardList.details.length - len = this.VideoPhotoData.cards.length - this.VideoPhotoData.activeCard = this.VideoPhotoData.cards[ - len - 1 - ].activeObject.id - } - this.$set(this.CardList.details, index, this.CardList.datalist[len - 1]) - - this.$notify({ - title: '鏇存柊鏁版嵁', - message: '宸茶烦杞埌涓婁竴椤碉紒', - type: 'warning' - }) - this.autoScrollDown(1) - } - }, - autoScrollDown(arg) { - //arg == 1 琛ㄧず鍚戝墠缈婚〉鐩存帴婊氬埌搴曪紝涓�0鎴栫┖ 琛ㄧず鏈〉鍐呮粴鍔� - if (this.VideoPhotoData.scrollContainDom) { - this.$nextTick(() => { - let dom = document.getElementsByClassName('my-active-card')[0] - let scrollTop = this.VideoPhotoData.scrollContainDom.scrollTop - let offsetHeight = this.VideoPhotoData.scrollContainDom.offsetHeight - if (arg == 1) { - this.VideoPhotoData.scrollContainDom.scrollTop = - scrollTop + offsetHeight + 160 - return - } - if (dom.offsetTop > scrollTop + offsetHeight) { - this.VideoPhotoData.scrollContainDom.scrollTop = - scrollTop + offsetHeight + 80 - return - } - }) - } - }, - autoScrollUp() { - if (this.VideoPhotoData.scrollContainDom) { - this.$nextTick(() => { - let dom = document.getElementsByClassName('my-active-card')[0] - let scrollTop = this.VideoPhotoData.scrollContainDom.scrollTop - let offsetHeight = this.VideoPhotoData.scrollContainDom.offsetHeight - if (dom.offsetTop < scrollTop && scrollTop !== 0) { - this.VideoPhotoData.scrollContainDom.scrollTop = - scrollTop - offsetHeight - } - }) - } - } - } -} -</script> -<style lang="scss"> -.layout { - min-width: 1350px; - overflow: auto; -} -.window-view { - width: 100%; - height: 600px; - // height: 100%; - // min-height: 684px; - overflow: auto; - .router-view { - float: left; - height: 100%; - width: calc(100% - 350px); - } - .windown-model { - .content { - position: absolute; - top: 5px; - z-index: 20000; - .el-tabs__nav { - z-index: 20000; - } - } - .el-carousel { - .el-carousel__container { - height: calc(100% - 10px); - .el-carousel__arrow:hover { - background-color: rgba(102, 102, 102); - } - .el-carousel__arrow--right { - right: 42%; - } - .el-carousel__arrow--left { - left: 42%; - } - } - } - .el-tabs__nav { - //box-shadow: 0 4px 7px 0 rgba(0, 0, 0, 0.07); - padding-left: 20px; - .el-tabs__active-bar { - width: 40px; - margin-left: 20px; - } - .el-tabs__item { - font-size: 18px; - } - } - .titlebar { - background: #fff !important; - height: 10px !important; - padding: 0px; - position: relative; - z-index: 30000; - .button { - font-size: 25px; - margin: 5px; - //position: relative; - //z-index: 5; - top: 10px; - } - } - .button { - background-color: transparent; - border: none; - font-size: medium; - margin: 0; - padding: 0 0.25em; - border-radius: 4pt; - cursor: pointer; - } - .el-carousel__indicators { - display: none; - } - .el-carousel { - height: calc(100% - 50px); - } - .el-carousel__arrow { - bottom: -25px !important; - top: inherit !important; - } - .model-bottom { - width: 100%; - height: 45px; - line-height: 45px; - font-size: 15px; - color: #222222; - .model-bottom-left, - .model-bottom-right { - cursor: pointer; - padding: 0px 10px; - } - .model-bottom-left { - float: left; - } - .model-bottom-right { - float: right; - } - .model-bottom-left:hover { - color: #3d68e1; - } - .model-bottom-right:hover { - color: #3d68e1; - } - } - } -} -.close-tree-log { - position: absolute; - width: 32px; - height: 41px; - float: left; - top: 48px; - box-sizing: border-box; - background: #ffffff; - box-shadow: 0 -3px 36px 0 rgba(0, 0, 0, 0.19); - border-top-right-radius: 3em; - border-bottom-right-radius: 3em; - i { - position: relative; - top: -4px; - left: -5px; - font-size: 24px; - color: #3d68e1; - cursor: pointer; - } -} -</style> diff --git a/src/pages/test/components/layout.vue b/src/pages/test/components/layout.vue deleted file mode 100644 index 8cce0c5..0000000 --- a/src/pages/test/components/layout.vue +++ /dev/null @@ -1,125 +0,0 @@ -<template> - <div class="column"> - <div class="column-left" :style="`height:${screenHeight}px;`"> - <div class="resize-bar"></div> - <div class="resize-line"></div> - <div class="resize-save"> - <left-nav :appName="'Video'" :height="screenHeight - 40"></left-nav> - </div> - </div> - <div class="column-right" :style="`height:${screenHeight}px;`"> - <right-side /> - </div> - - </div> -</template> - -<script> -import LeftNav from "@/components/LeftNav"; -// import CameraVideo from "./components/Video.vue"; -import RightSide from "../index/Searching" - -export default { - name: "layout", - components: { - LeftNav, - RightSide - - }, - data() { - return { - screenHeight: 0, - } - }, - mounted() { - this.screenHeight = document.documentElement.clientHeight - 20; - window.onresize = () => { - return (() => { - this.screenHeight = document.documentElement.clientHeight - 20; - })(); - }; - }, -}; -</script> - -<style lang="scss" scoped> -.column { - overflow: hidden; -} -.column-left { - height: inherit; - background-color: #fff; - position: relative; - float: left; -} -.column-right { - height: 100%; - padding: 16px; - background-color: #eee; - box-sizing: border-box; - overflow: hidden; -} -.heigher-index{ - position:absolute; - top: 0; - z-index: 10; - width: 100%; - height: 100%; -} -.resize-save { - position: absolute; - top: 0; - right: 5px; - bottom: 0; - left: 0; - padding: 16px; - overflow-x: hidden; -} -.resize-bar { - width: 310px; - height: inherit; - resize: horizontal; - cursor: ew-resize; - opacity: 0; - overflow: scroll; - max-width: 500px; //璁惧畾鏈�澶ф媺浼搁暱搴� - min-width: 310px; //璁惧畾鏈�灏忓搴� -} -/* 鎷栨嫿绾� */ -.resize-line { - position: absolute; - right: 0; - top: 0; - bottom: 0; - border-right: 2px solid #eee; - border-left: 1px solid #bbb; - pointer-events: none; -} -.resize-bar:hover ~ .resize-line, -.resize-bar:active ~ .resize-line { - border-left: 1px dashed skyblue; -} -.resize-bar::-webkit-scrollbar { - width: 200px; - height: inherit; -} - -/* Firefox鍙湁涓嬮潰涓�灏忓潡鍖哄煙鍙互鎷変几 */ -@supports (-moz-user-select: none) { - .resize-bar:hover ~ .resize-line, - .resize-bar:active ~ .resize-line { - border-left: 1px solid #bbb; - } - .resize-bar:hover ~ .resize-line::after, - .resize-bar:active ~ .resize-line::after { - content: ""; - position: absolute; - width: 16px; - height: 16px; - bottom: 0; - right: -8px; - // background: url(./resize.svg); - background-size: 100% 100%; - } -} -</style> diff --git a/src/pages/test/index/App.vue b/src/pages/test/index/App.vue deleted file mode 100644 index b2f151a..0000000 --- a/src/pages/test/index/App.vue +++ /dev/null @@ -1,115 +0,0 @@ -<template> - <div class="column"> - <layout></layout> - <div class="heigher-index"> - <card-window></card-window> - </div> - </div> -</template> - -<script> -import CardWindow from "../components/cardWindow"; -import Layout from "../components/layout" -export default { - name: "SearchPage", - components: { - CardWindow, - Layout - }, - data() { - return { - screenHeight: 0, - } - }, - mounted() { - this.screenHeight = document.documentElement.clientHeight - 20; - window.onresize = () => { - return (() => { - this.screenHeight = document.documentElement.clientHeight - 20; - })(); - }; - }, -}; -</script> - -<style lang="scss" scoped> -.column { - overflow: hidden; -} -.column-left { - height: inherit; - background-color: #fff; - position: relative; - float: left; -} -.column-right { - height: 100%; - padding: 16px; - background-color: #eee; - box-sizing: border-box; - overflow: hidden; -} -.heigher-index{ - position:absolute; - top: 0; - z-index: 10; - width: 100%; - height: 100%; -} -.resize-save { - position: absolute; - top: 0; - right: 5px; - bottom: 0; - left: 0; - padding: 16px; - overflow-x: hidden; -} -.resize-bar { - width: 310px; - height: inherit; - resize: horizontal; - cursor: ew-resize; - opacity: 0; - overflow: scroll; - max-width: 500px; //璁惧畾鏈�澶ф媺浼搁暱搴� - min-width: 310px; //璁惧畾鏈�灏忓搴� -} -/* 鎷栨嫿绾� */ -.resize-line { - position: absolute; - right: 0; - top: 0; - bottom: 0; - border-right: 2px solid #eee; - border-left: 1px solid #bbb; - pointer-events: none; -} -.resize-bar:hover ~ .resize-line, -.resize-bar:active ~ .resize-line { - border-left: 1px dashed skyblue; -} -.resize-bar::-webkit-scrollbar { - width: 200px; - height: inherit; -} - -/* Firefox鍙湁涓嬮潰涓�灏忓潡鍖哄煙鍙互鎷変几 */ -@supports (-moz-user-select: none) { - .resize-bar:hover ~ .resize-line, - .resize-bar:active ~ .resize-line { - border-left: 1px solid #bbb; - } - .resize-bar:hover ~ .resize-line::after, - .resize-bar:active ~ .resize-line::after { - content: ""; - position: absolute; - width: 16px; - height: 16px; - bottom: 0; - right: -8px; - // background: url(./resize.svg); - background-size: 100% 100%; - } -} -</style> diff --git a/src/pages/test/index/Searching.vue b/src/pages/test/index/Searching.vue deleted file mode 100644 index 0802c12..0000000 --- a/src/pages/test/index/Searching.vue +++ /dev/null @@ -1,908 +0,0 @@ -<template> - <div class="searching-box"> - <div class="searching-right"> - <div class="searching-right-nav"> - <el-breadcrumb separator-class="el-icon-arrow-right" style="display: inline-block;"> - <el-breadcrumb-item> - <span @click="uploadChange()">妫�绱�</span> - </el-breadcrumb-item> - <el-breadcrumb-item v-if="!VideoPhotoData.uploadType">鍏ㄩ儴</el-breadcrumb-item> - <el-breadcrumb-item v-if="VideoPhotoData.uploadType">浠ュ浘鎼滃浘</el-breadcrumb-item> - </el-breadcrumb> - </div> - <div class="searching-right-content"> - <div class="top"> - <el-tooltip content="浠ュ浘鎼滃浘" placement="bottom" popper-class="atooltip"> - <el-button - @click="showUpload" - type="primary" - icon="el-icon-camera-solid" - size="mini" - circle - :style="VideoPhotoData.uploadDiaplay ? 'margin-right: 20px;' : 'margin-right: 20px;background-color:#cccccc;border-color:#cccccc'" - ></el-button> - </el-tooltip> - <p class="p-label" style="width:16%"> - <b>鏍囩锛�</b> - <el-select - v-model="tagValues" - multiple - @change="searchingBtn" - :disabled="isDisabled" - collapse-tags - size="mini" - style="width:calc(100% - 40px);min-width: 120px;" - placeholder="璇烽�夋嫨" - > - <el-option - v-for="item in VideoPhotoData.tabs" - style="font-size:12px" - :key="item.key" - :label="item.title" - :value="item.value" - :title="item.title" - ></el-option> - </el-select> - </p> - <p class="p-task" style="width:16%"> - <b>鍦烘櫙锛�</b> - <el-select - v-model="taskValues" - multiple - @change="searchingBtn" - :disabled="typeDisable" - collapse-tags - size="mini" - style="width:calc(100% - 40px);min-width: 120px;" - placeholder="璇烽�夋嫨" - > - <!-- <el-option - v-for="item in VideoPhotoData.tasks" - style="font-size:12px" - :key="item.taskid+'x'" - :label="item.del_flag && item.taskname !=='浜鸿劯娴嬫俯'? item.taskname+'锛堝凡鍒犻櫎锛�' : item.taskname" - :value="item.taskid" - :title="item.del_flag && item.taskname !=='浜鸿劯娴嬫俯'? item.taskname+'锛堝凡鍒犻櫎锛�' : item.taskname" - ></el-option>--> - <el-option - v-for="item in VideoPhotoData.tasks" - style="font-size:12px" - :key="item.id+'x'" - :value="item.id" - :label="item.isDelete ? item.name+'锛堝凡鍒犻櫎锛�' : item.name" - :title="item.isDelete ? item.name+'锛堝凡鍒犻櫎锛�' : item.name" - ></el-option> - </el-select> - </p> - <p class="p-level" style="width:18%"> - <b>浜嬩欢绛夌骇锛�</b> - <el-select - v-model="alarmValues" - multiple - @change="searchingBtn" - :disabled="isDisabled" - collapse-tags - size="mini" - style="width:calc(100% - 64px);min-width: 120px;" - placeholder="璇烽�夋嫨" - > - <el-option - v-for="item in VideoPhotoData.dictionary.ALARMLEVEL" - :key="item.id" - :label="item.name" - :value="item.value" - ></el-option> - </el-select> - </p> - <p class="p-date" style="width:19%"> - <el-date-picker - size="mini" - v-model="searchTime" - @change="searchingBtn" - type="datetimerange" - start-placeholder="寮�濮嬫棩鏈�" - end-placeholder="缁撴潫鏃ユ湡" - :default-time="['00:00:00','23:59:59']" - style="width:99%;min-width:200px" - ></el-date-picker> - </p> - <p class="p-input" style="width:19%"> - <el-input - placeholder="璇疯緭鍏ュ唴瀹�" - prefix-icon="el-icon-search" - style="width: calc(100% - 75px);min-width:100px;margin-left:10px;margin-right: 10px;" - v-model="VideoPhotoData.inputValue" - size="mini" - ></el-input> - <el-button type="primary" size="mini" @click="searchingBtn">鎼滅储</el-button> - </p> - <p class="p-clear"> - <b class="clear-searching" @click="clearSearch">閲嶇疆</b> - </p> - </div> - <div ref="mid" style="height:calc(100% - 72px)"> - <!-- <div id="searchMid" class="mid" ref="scrollContain" v-if="!VideoPhotoData.uploadDiaplay"> - <Card - :class="item.activeObject.id === VideoPhotoData.activeCard ? 'my-active-card' : ''" - v-for="(item, index) in VideoPhotoData.cards" - :key="index + 'a'" - :outHeight="'155px'" - :outWidth="cardWidth" - :data="item" - :showType="showType" - @detailsClick="getDetails($event, index)" - @addToBase="toAdd" - ></Card> - </div>--> - <div id="searchMid" class="mid"> - <div class="left-selection" v-if="VideoPhotoData.uploadDiaplay"> - <upload-img ref="uploadImg" @labelDisabled="disabled"></upload-img> - </div> - <div - class="right-section" - ref="scrollContain" - :style="VideoPhotoData.uploadDiaplay ? 'calc(100% - 315px)' : 'width:100%'" - > - <Card - v-for="(item, index) in VideoPhotoData.cards" - :class="item.activeObject.id === VideoPhotoData.activeCard ? 'my-active-card' : ''" - :key="index + 'u'" - :outHeight="'162px'" - :outWidth="VideoPhotoData.uploadDiaplay?searchImgCardWidth:cardWidth" - :data="item" - :showType="showType" - @detailsClick="getDetails($event, index)" - @addToBase="toAdd" - ></Card> - </div> - </div> - </div> - <div class="foot"> - <el-pagination - :current-page="VideoPhotoData.page" - @current-change="changePages" - @size-change="sizeChange" - :page-sizes="VideoPhotoData.pageSizeOption" - :page-size="VideoPhotoData.size" - layout="total, sizes, prev, pager, next, jumper" - :total="VideoPhotoData.total" - ></el-pagination> - </div> - </div> - </div> - <!-- <hsc-window-style-metal class="windown-model"> - <hsc-window - v-for="(item, index) in CardList.addBaseList" - :closeButton="true" - @closebuttonclick="closeWindow(index)" - :key="index" - @update:height="resizeHeight" - @update:width="resizeWidth" - style="background:white; height:475px" - :left="center.x + index * 10" - :top="center.y + index * 10" - :resizable="true" - positionHint="center" - :isScrollable="true" - :minWidth="662" - :minHeight="479" - :maxWidth="10000" - :maxHeight="7000" - :height="defaultHeight" - :width="defaultWidth" - > - <div class="addToBase"> - <div class="topLabel">鍔犲叆搴曞簱</div> - <div class="items"> - <div class="lable"> - <p>榛戝悕鍗� ></p> - </div> - <div class="baseList"> - <el-checkbox-group v-model="VideoPhotoData.selectBlacks" @change="blackAngWhite"> - <div class="base" v-for="(item, index) in VideoPhotoData.blackList" :key="index"> - <el-checkbox - :label="item.value" - :title="item.title" - :disabled="item.disabled" - >{{item.title}}</el-checkbox> - </div> - </el-checkbox-group> - </div> - </div> - <div class="items"> - <div class="lable"> - <p>鐧藉悕鍗� ></p> - </div> - <div class="baseList"> - <el-checkbox-group v-model="VideoPhotoData.selectWhites" @change="blackAngWhite"> - <div class="base" v-for="(item, index) in VideoPhotoData.whiteList" :key="index"> - <el-checkbox - :label="item.value" - :title="item.title" - :disabled="item.disabled" - >{{item.title}}</el-checkbox> - </div> - </el-checkbox-group> - </div> - </div> - <div class="buttons"> - <el-button type="primary" @click="saveAddBase(item, index)">淇濆瓨</el-button> - <el-button type="default" @click="closeWindow(index)">鍙栨秷</el-button> - </div> - </div> - </hsc-window> - </hsc-window-style-metal> --> - - </div> -</template> - -<script> -import Card from "@/components/subComponents/Card"; -import UploadImg from "@/components/searching/UploadImg"; -//import CardWindow from "../components/cardWindow"; -import bus from "./main"; -export default { - components: { - Card, - UploadImg - }, - data() { - return { - cardWidth: "", - center: "", - defaultHeight: 432, - defaultWidth: 600, - isDisabled: false, - typeDisable: false, - showType: "search", - searchImgCardWidth: "", - tagValues: [], - alarmValues: [], - dialogVisible: false, - taskValues: [], - searchTime: [ - this.$moment().format("YYYY-MM-DD 00:00:00"), - this.$moment().format("YYYY-MM-DD HH:mm:ss") - ], - searchText: "", - currentPage: 1, - - }; - }, - - created() { - this.TreeDataPool.readonly = true; - this.TreeDataPool.gbReadonly = true; - this.TreeDataPool.multiple = true; - this.TreeDataPool.clean(); - this.TreeDataPool.fetchTreeData(); - }, - mounted() { - this.$nextTick(() => { - let scrollContain = this.$refs.scrollContain - this.VideoPhotoData.scrollContainDom = scrollContain - let list = this.TreeDataPool.localVedioList.filter(i => { - return i.progress == 100 - }) - this.TreeDataPool.localVedioList = list - }) - window.addEventListener("resize", this.getHeight); - this.getCenter(); - this.getHeight(); - this.blackAngWhite(); - // 瑙嗛鐩戞帶浠诲姟璺宠浆 灞忚斀 20200730 - // if (this.$route.query.from === "video") { - // this.VideoPhotoData.queryTasks = this.taskValues = [ - // this.VideoTaskData.tasks[this.VideoTaskData.activeIndex].taskId - // ]; - // } - - this.searchTime = this.getDateInit(); - this.VideoPhotoData.searchTime = this.getDateInit(); - - // 鏆傛椂鍏抽棴璺宠浆 20200730 - // if (this.$route.query.showType === "findByPic") { - if (0) { - this.VideoPhotoData.uploadDiaplay = true; - console.log("鍒璺宠繃鏉ョ殑浠ュ浘鎼滃浘"); - this.VideoPhotoData.picUrl = this.$route.query.picSmUrl; - this.VideoPhotoData.uploadImg = this.$route.query.picSmUrl; - this.VideoPhotoData.uploadType = true - this.VideoPhotoData.compTargetId = this.$route.query.targetId - this.VideoPhotoData.compTargetType = this.$route.query.compType - this.VideoPhotoData.size = 30 - this.VideoPhotoData.compareTabs = ["esData"]; - this.VideoPhotoData.findPerson2(); // 鏌ユ壘姝や汉 - // this.$nextTick(() => { - // this.$refs.uploadImg.rightSectionDisplay = true; - // }); - } else { - this.searchTime = this.getDateInit(); - this.VideoPhotoData.searchTime = this.getDateInit(); - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } - - this.VideoPhotoData.queryTagList(); - this.VideoPhotoData.queryTaskList(); - this.VideoPhotoData.queryDictionary(); - this.$nextTick(() => { - bus.$on("changePage", page => { - this.currentPage = page; - this.VideoPhotoData.page = page; - }); - }); - }, - destroyed() { - window.removeEventListener("resize", this.getHeight); - this.CardList.details = []; - // this.TreeDataPool.treeActiveName = "camera"; - this.VideoPhotoData.queryAlarmlevel = []; - this.VideoPhotoData.inputValue = ""; - this.VideoPhotoData.queryTabs = []; - this.VideoPhotoData.queryTasks = []; - this.VideoPhotoData.treeNodes = []; - - this.CardList.addBaseList = []; - this.VideoPhotoData.selectBlacks = []; - this.VideoPhotoData.selectWhites = []; - }, - watch: { - "TreeDataPool.showTreeBox"(value) { - this.getHeight(); - if (this.VideoPhotoData.realSmallPath.length > 0) { - this.VideoPhotoData.findPersonByPage(); - } else { - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } - }, - // "TreeDataPool.selectedNodes": function(newValue,oldValue) { - // if (newValue !== oldValue) { - // this.VideoPhotoData.treeNodes = newValue; - // console.log("鐩戝惉鏍戣妭鐐逛腑鐨勫埛鏂版柟娉�", newValue,oldValue); - // this.VideoPhotoData.querySearchList(); - // } - // }, - "TreeDataPool.selectedNodes": { - handler: function (newVal, oldVal) { - if (newVal !== oldVal) { - this.VideoPhotoData.treeNodes = newVal; - if (this.VideoPhotoData.uploadType) { - this.VideoPhotoData.findPersonByPage() - } else { - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } - } - }, - deep: true //娣卞害鐩戝惉 - }, - "DataStackPool.selectedDir": { - handler(nodes, oldNodes) { - if (nodes !== oldNodes) { - // this.VideoPhotoData.treeNodes = nodes.map(i=>{return i.id}); - this.VideoPhotoData.treeNodes = [nodes.id]; - if (this.VideoPhotoData.uploadType) { - this.VideoPhotoData.findPersonByPage() - } else { - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } - } - }, - deep: true - }, - "VideoPhotoData.activeCard": function (value) { - let card = this.$refs.scrollContain.getElementsByClassName("my-active-card"); - - if (card.length > 0) { - let cardHeight = card[0].clientHeight; - let cardTop = card[0].offsetTop; - let scrollTop = this.$refs.scrollContain.scrollTop; - let divHeight = this.$refs.scrollContain.clientHeight; - if ( - cardTop - cardHeight - scrollTop > divHeight || - cardTop - cardHeight - scrollTop < 0 - ) - this.$refs.scrollContain.scrollTo(0, cardTop - cardHeight); - } - }, - "VideoPhotoData.uploadType": function (value) { - console.log("椤甸潰妯″紡锛�", value) - if (value) { - this.typeDisable = true; - } else { - this.typeDisable = false; - this.VideoPhotoData.querySearchList(); - } - }, - "VideoPhotoData.selectBlacks": function (value) { - this.blackAngWhite() - }, - "VideoPhotoData.selectWhites": function (value) { - this.blackAngWhite() - }, - tagValues: function (newValue, oldValue) { - if (newValue.length > 0) { - this.showType = "compare"; - } else { - this.showType = "search"; - } - if (newValue.length !== oldValue.length) { - console.log("tagValue涓殑鍒锋柊鏂规硶"); - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } - }, - "VideoPhotoData.uploadDiaplay": function (value) { - this.getHeight(); - console.log("upload鐨勫�兼槸锛�", value) - if (value) { - if (!this.VideoPhotoData.uploadType) { - console.log("uploadDisplay涓殑鍒锋柊"); - let scrollContain = this.$refs.scrollContain - this.VideoPhotoData.scrollContainDom = scrollContain - this.VideoPhotoData.showType = "search"; - // this.VideoPhotoData.querySearchList(); - //this.setLoadSearch(this.VideoPhotoData.querySearchList()); - this.isDisabled = false; - } else { - //this.VideoPhotoData.scrollContainDom = ''; - this.VideoPhotoData.showType = "findByPic"; - } - } else { - this.VideoPhotoData.uploadType = false; - this.VideoPhotoData.showType = "search"; - } - } - }, - methods: { - resizeWidth(w) { - this.defaultWidth = w; - }, - resizeHeight(h) { - this.defaultHeight = h; - }, - getHeight() { - let w = this.$refs.mid.offsetWidth; - let integer = parseInt(w / 330); - let integerSearchImg = parseInt((w - 300) / 325); - this.handleSizeChange(integer, integerSearchImg); - this.cardWidth = `calc(${100 / integer}% - 20px)`; - this.searchImgCardWidth = `calc(${100 / integerSearchImg}% - 20px)`; - }, - uploadChange() { - this.VideoPhotoData.uploadDiaplay = false; - }, - blackAngWhite() { - if (this.VideoPhotoData.selectBlacks.length > 0) { - for (let i = 0; i < this.VideoPhotoData.whiteList.length; i++) { - //this.VideoPhotoData.whiteList[i].disabled = true - this.$set(this.VideoPhotoData.whiteList[i], 'disabled', true) - } - } - if (this.VideoPhotoData.selectBlacks.length == 0) { - for (let i = 0; i < this.VideoPhotoData.whiteList.length; i++) { - //this.VideoPhotoData.whiteList[i].disabled = false - this.$set(this.VideoPhotoData.whiteList[i], 'disabled', false) - } - } - if (this.VideoPhotoData.selectWhites.length > 0) { - for (let i = 0; i < this.VideoPhotoData.blackList.length; i++) { - // this.VideoPhotoData.blackList[i].disabled = true - this.$set(this.VideoPhotoData.blackList[i], 'disabled', true) - } - } - if (this.VideoPhotoData.selectWhites.length == 0) { - for (let i = 0; i < this.VideoPhotoData.blackList.length; i++) { - //this.VideoPhotoData.blackList[i].disabled = false - this.$set(this.VideoPhotoData.blackList[i], 'disabled', false) - } - } - }, - saveAddBase(item, index) { - if (this.VideoPhotoData.selectBlacks.length === 0 && this.VideoPhotoData.selectWhites.length === 0) { - this.$notify({ - title: "娉ㄦ剰", - message: "璇烽�夋嫨瑕佹坊鍔犵殑搴曞簱", - type: "warning" - }) - return - } - let res = this.VideoPhotoData.addBase(item) - res.then(data => { - console.log("then", data) - if (data.success) { - this.$notify({ - title: "鎴愬姛", - message: data.data, - type: "success" - }) - } else { - this.$notify({ - title: "澶辫触", - message: data.data, - type: "error" - }) - } - this.CardList.addBaseList.splice(index, 1); - this.VideoPhotoData.selectBlacks = [] - this.VideoPhotoData.selectWhites = [] - }) - }, - getDetails(ev, index) { - debugger - //let obj = this.CardList.datalist[index]; - this.CardList.datalist = this.VideoPhotoData.cards; - let obj = this.CardList.datalist[index]; - this.CardList.details = Array.from( - new Set([...this.CardList.details, ...[obj]]) - ); - // this.CardList.details.push(obj); - this.VideoPhotoData.activeCard = obj.activeObject.id; - }, - toAdd(item) { - this.CardList.addBaseList.push(item) - }, - handleClose(done) { - this.$confirm('纭鍏抽棴锛�') - .then(_ => { - done(); - }) - .catch(_ => { }); - }, - showUpload() { - this.VideoPhotoData.uploadDiaplay = !this.VideoPhotoData.uploadDiaplay; - //鍒濆鍖栨暟鎹� - this.VideoPhotoData.clearStatus(); - this.CardList.details = []; - // if (this.VideoPhotoData.uploadDiaplay) { - - // } - //this.VideoPhotoData.uploadImg = require("C:/Users/mdesign/Desktop/cvasdv.jpg"); - }, - getDateInit() { - // 瑕佹眰 榛樿涓�涓湀 - const end = new Date(); - const start = new Date(); - const nowDate = new Date(); - nowDate.setHours(0); - nowDate.setMinutes(0); - nowDate.setSeconds(0); - nowDate.setMilliseconds(0); - start.setTime(nowDate.getTime() - 3600 * 1000 * 24 * 30); - end.setTime(nowDate.getTime() + 3600 * 1000 * 24 - 1); - return [ - this.$moment(start).format("YYYY-MM-DD HH:mm:ss"), - this.$moment(end).format("YYYY-MM-DD HH:mm:ss") - ]; - }, - format(array) { - return [ - this.$moment(array[0]).format("YYYY-MM-DD HH:mm:ss"), - this.$moment(array[1]).format("YYYY-MM-DD HH:mm:ss") - ]; - }, - searchingBtn() { - // let obj = document.getElementById('searchMid'); - // console.log(obj,'target',document) - // let load = this.$loading({ - // target:obj, - // }) - // load.close(); - // console.log(load,'loading') - // this.AuthData.loading = true - this.VideoPhotoData.page = 1; - this.VideoPhotoData.queryTabs = this.tagValues; - //澶勭悊鎼滅储绫诲瀷 - var tempArr = this.taskValues.map(task => task.split(',')); - var tasks = []; - tempArr.forEach(arr => { - tasks = tasks.concat(arr) - }); - this.VideoPhotoData.queryTasks = tasks; - - this.VideoPhotoData.queryAlarmlevel = this.stringToNum(); - this.VideoPhotoData.searchTime = this.format(this.searchTime); - //this.VideoPhotoData.inputValue = this.searchText; - this.VideoPhotoData.showType = this.showType; - if (!this.VideoPhotoData.uploadType) { - console.log("鏌ヨ鏂规硶"); - this.VideoPhotoData.uploadDiaplay = false; - //this.VideoPhotoData.page = this.currentPage; - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } else { - console.log("浠ュ浘鎼滃浘"); - //this.VideoPhotoData.page = this.currentPage; - // this.VideoPhotoData.findPersonByPage(); - this.setLoadSearch(this.VideoPhotoData.findPersonByPage()); - } - }, - stringToNum() { - var arr = []; - this.alarmValues.forEach(element => { - if (element == "-1") { - arr.push(-1); - } - if (element == "1") { - arr.push(1); - } - if (element == "2") { - arr.push(2); - } - if (element == "3") { - arr.push(3); - } - if (element == "4") { - arr.push(4); - } - if (element == "5") { - arr.push(5); - } - }); - // console.log("杈撳嚭鐨勬暟缁勶細", arr); - return arr; - }, - changePages(page) { - this.VideoPhotoData.page = page; - if (!this.VideoPhotoData.uploadType) { - console.log("鍒嗛〉鏀瑰彉锛�") - this.VideoPhotoData.uploadDiaplay = false; - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } else { - // this.VideoPhotoData.findPersonByPage(); - this.setLoadSearch(this.VideoPhotoData.findPersonByPage()); - } - }, - closeWindow(index) { - this.CardList.addBaseList.splice(index, 1); - }, - handleSizeChange(integer, integerSearchImg) { - if (this.VideoPhotoData.uploadDiaplay) { - this.VideoPhotoData.size = integerSearchImg * 10; - //this.VideoPhotoData.findPersonByPage(); - } else { - this.VideoPhotoData.size = integer * 10; - //this.VideoPhotoData.querySearchList(); - } - }, - sizeChange(size) { - if (this.VideoPhotoData.uploadType) { - this.VideoPhotoData.size = size; - this.VideoPhotoData.findPersonByPage(); - } else { - this.VideoPhotoData.uploadDiaplay = false; - this.VideoPhotoData.size = size; - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } - }, - clearSearch() { - this.tagValues = [] - this.taskValues = [] - this.alarmValues = [] - this.VideoPhotoData.queryTabs = []; - this.VideoPhotoData.queryTasks = []; - this.VideoPhotoData.queryAlarmlevel = []; - this.VideoPhotoData.searchTime = this.getDateInit(); - this.VideoPhotoData.inputValue = ""; - this.searchTime = this.getDateInit(); - if (!this.VideoPhotoData.uploadType) { - // this.VideoPhotoData.querySearchList(); - this.setLoadSearch(this.VideoPhotoData.querySearchList()); - } else { - // this.VideoPhotoData.findPersonByPage(); - this.setLoadSearch(this.VideoPhotoData.findPersonByPage()); - } - }, - disabled(data) { - this.isDisabled = data; - }, - getCenter() { - this.center = { - x: document.documentElement.clientWidth / 2 - 250, - y: document.documentElement.clientHeight / 2 - 200 - }; - }, - setLoadSearch(fn) { - this.AuthData.setLoading("searchMid", this); - fn.then(_ => { - this.AuthData.closeLoad(); - }) - } - } -}; -</script> - -<style lang="scss"> -.searching-box { - width: 100%; - height: 100% !important; - float: left; - //position: relative; - .searching-right { - width: 100%; - background-color: #e9ebf2; - height: 100%; - padding: 0px 20px; - box-sizing: border-box; - .searching-right-nav { - height: 50px; - width: 100%; - line-height: 58px; - text-align: left; - font-size: 14px !important; - box-sizing: border-box; - color: rgba(0, 0, 0, 0.78) !important; - } - .searching-right-content { - height: calc(100% - 135px); - width: 100%; - box-sizing: border-box; - .top { - background-image: linear-gradient(-180deg, #ffffff 13%, #e9ebf2 100%); - height: 76px; - width: 100%; - padding: 5px 22px; - box-sizing: border-box; - text-align: left; - // line-height: 55px; - white-space: nowrap; - overflow-x: auto; - overflow-y: hidden; - .p-label, - .p-task, - .p-level, - .p-date, - .p-input, - .p-clear { - display: inline-block; - padding-right: 10px; - box-sizing: border-box; - margin-top: 20px; - b:hover { - color: #2249b4; - } - } - .clear-searching { - cursor: pointer; - text-decoration: underline; - width: 40px; - font-size: 13px; - color: #3d68e1; - } - } - .mid { - width: 100%; - height: 100%; - padding: 10px; - overflow: auto; - position: relative; - .my-card { - float: left; - margin: 0px 14px 10px 0px; - cursor: pointer; - } - } - .foot { - overflow: hidden; - width: 100%; - height: 80px; - line-height: 80px; - padding-top: 24px; - padding-right: 24px; - box-sizing: border-box; - text-align: right; - } - } - } - .el-select__tags { - max-width: 250px !important; - } -} -.el-select-dropdown { - width: 200px !important; -} -.el-tag { - max-width: 85% !important; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; -} -.addToBase { - width: 98%; - height: 450px; - position: relative; - .topLabel { - margin-top: 20px; - height: 40px; - border-bottom: 1px solid #eee; - font-family: PingFangSC-Medium; - font-size: 20px; - font-weight: 600; - line-height: 1rem; - color: #222222; - text-align: left; - margin-left: 15px; - } - .items { - width: 100%; - height: auto; - max-height: 35%; - overflow-y: auto; - margin: 20px 0px; - .lable { - width: 15%; - margin-top: 10px; - float: left; - //font-family: PingFangSC-Medium; - font-size: 14px; - font-weight: 600; - } - .baseList { - width: 85%; - height: 100%; - float: left; - - // display: flex; - // justify-content: flex-start; - .base { - //flex-wrap: wrap; - width: calc(33% - 10px); - padding: 0px 5px; - line-height: 30px; - float: left; - text-align: left; - font-size: 12px !important; - .el-checkbox { - width: 100%; - display: block; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - .el-checkbox__label { - display: inline !important; - } - } - } - } - } - .buttons { - position: absolute; - right: 0px; - bottom: 15px; - } -} -.search { - background-color: #eee; -} -</style> -<style lang="scss" scoped> -#searchMid { - .el-loading-mask { - .el-loading-spinner { - width: 100%; - height: 100%; - .el-loading-spinner-search { - background: url("../../../assets/gif/searchLoading.gif") no-repeat; - } - } - } - .left-selection { - width: 300px; - height: 100%; - float: left; - margin-right: 15px; - } - .right-section { - //width: calc(100% - 315px); - height: 100%; - float: left; - overflow: auto; - position: relative; - } -} -</style> diff --git a/src/pages/test/index/main.ts b/src/pages/test/index/main.ts deleted file mode 100644 index 849c98f..0000000 --- a/src/pages/test/index/main.ts +++ /dev/null @@ -1,34 +0,0 @@ -import Vue from 'vue'; -import ElementUI from 'element-ui'; -import 'element-ui/lib/theme-chalk/index.css'; -import "@/assets/css/element-variables.scss"; -import "../../../assets/css/common.scss" -import "../../../assets/css/overried.scss" - -import "../../../assets/icons/alibaba/iconfont.css"; -import "../../../assets/icons/basic/iconfont.css"; -import "../../../assets/icons/iconfont.css"; -import "../../../assets/icons/symbol.js"; - -import App from './App.vue' -import moment from "moment"; -Vue.prototype.$moment = moment; - -import Mixin from "./mixins"; -Vue.mixin(Mixin); - -Vue.use(ElementUI) - -import * as VueWindow from "@hscmap/vue-window"; -Vue.use(VueWindow); - -Vue.filter('moment', function (value, formatString) { - formatString = formatString || 'YYYY-MM-DD HH:mm:ss'; - return moment(value).format(formatString); - -}); - -export default Vue.prototype.bus = new Vue({ - el: '#app', - render: h => h(App) -}) diff --git a/src/pages/test/index/mixins.ts b/src/pages/test/index/mixins.ts deleted file mode 100644 index 163c814..0000000 --- a/src/pages/test/index/mixins.ts +++ /dev/null @@ -1,28 +0,0 @@ -import VideoPhotoData from "@/Pool/VideoPhotoData"; -import VideoTaskData from "@/Pool/VideoTaskData"; -import TreeDataPool from "@/Pool/TreeData"; -import CardList from "@/Pool/CardList"; -import DataStackPool from "@/Pool/dataStack" -import AuthData from '@/Pool/AuthData'; - -/* eslint-disable */ -const onlyVideoPhotoData = new VideoPhotoData -const onlyVideoTaskData = new VideoTaskData -const onlyTreeDataPool = new TreeDataPool -const onlyDataStack = new DataStackPool -const onlyCardList = new CardList -const onlyAuthData = new AuthData - -const mixin = { - data() { - return { - TreeDataPool: onlyTreeDataPool, - VideoPhotoData: onlyVideoPhotoData, - CardList: onlyCardList, - DataStackPool: onlyDataStack, - VideoTaskData: onlyVideoTaskData, - AuthData: onlyAuthData, - }; - }, -}; -export default mixin; \ No newline at end of file -- Gitblit v1.8.0