From f89c922c7f40425d53cfd4a80ab13ce818d9fdab Mon Sep 17 00:00:00 2001
From: ZZJ <10913410+zzj2100@user.noreply.gitee.com>
Date: 星期五, 15 七月 2022 15:41:25 +0800
Subject: [PATCH] 列表样式
---
src/views/hashrate/CameraManage/CameraInfo/index.vue | 114 ++++++++++++++++++++++++++++++--------------------------
1 files changed, 61 insertions(+), 53 deletions(-)
diff --git a/src/views/hashrate/CameraManage/CameraInfo/index.vue b/src/views/hashrate/CameraManage/CameraInfo/index.vue
index b4d7ca1..2b886e1 100644
--- a/src/views/hashrate/CameraManage/CameraInfo/index.vue
+++ b/src/views/hashrate/CameraManage/CameraInfo/index.vue
@@ -77,33 +77,6 @@
<el-form-item label="浜嬩欢澹伴煶">
<div class="flex-wrap">
<el-switch v-model="form.voiceEnable" :width="56"></el-switch>
- <!-- 灞忚斀澹伴煶閫夋嫨,璋冩暣鍒板満鏅� -->
- <!-- <el-select
- v-model="voice"
- placeholder="閫夋嫨澹伴煶"
- size="small"
- value-key="id"
- @change="selSound"
- >
- <el-option
- v-for="item in soundList"
- :key="item.id"
- :label="item.name"
- :value="item"
- ></el-option>
- </el-select>
- <span class="player-btn" @click="togglePlayer" style="cursor:pointer;">
- <i
- v-if="togglePlay"
- class="el-icon-video-play"
- style="font-size:26px; vertical-align:middle; color:#409eff"
- ></i>
- <i
- v-else
- class="el-icon-video-pause"
- style="font-size:26px; vertical-align:middle; color:#409eff"
- ></i>
- </span>-->
</div>
</el-form-item>
</div>
@@ -118,7 +91,7 @@
</el-form-item>
</div>
- <div class="row">
+ <!-- <div class="row">
<el-form-item label="鎵�灞為泦缇�">
<el-select
v-model="form.cluster"
@@ -134,7 +107,7 @@
></el-option>
</el-select>
</el-form-item>
- </div>
+ </div> -->
<!-- 娣诲姞浼犳劅鍣� -->
<CameraInfoEditor
@@ -173,7 +146,7 @@
<div class="title">绠楀姏淇℃伅</div>
<div class="hashrate">
<div class="card">
- <img src="/images/hashrate/瀹炴椂绠楀姏.png" alt="" />
+ <img src="/images/hashrate/realTime2.png" alt="" />
<div class="data">
<div class="label">瀹炴椂绠楀姏</div>
<div class="number">
@@ -184,7 +157,7 @@
</div>
<div class="card">
- <img src="/images/hashrate/杞绠楀姏.png" alt="" />
+ <img src="/images/hashrate/polling.png" alt="" />
<div class="data">
<div class="label">杞绠楀姏</div>
<div class="number">
@@ -195,7 +168,7 @@
</div>
<div class="card">
- <img src="/images/hashrate/鏁版嵁鏍堢畻鍔�.png" alt="" />
+ <img src="/images/hashrate/static.png" alt="" />
<div class="data">
<div class="label">鏁版嵁鏍堢畻鍔�</div>
<div class="number">
@@ -277,6 +250,9 @@
type: Array,
},
},
+ created() {
+ document.querySelector("html").style["min-width"] = "1280px";
+ },
data() {
return {
videoItem: null,
@@ -350,7 +326,7 @@
getSoundList()
.then((res) => {
if (res.success) {
- this.soundList = res.data;
+ this.soundList = res.data.voices;
}
})
.catch((e) => console.log(e));
@@ -396,16 +372,9 @@
this.$refs.addForm.resetFields();
this.voice = null;
- // this.initFormData();
- // this.$refs.addForm.clearValidate();
if (node.type === "4") {
- console.log(getCameraInfo);
-
getCameraInfo(node.id).then((res) => {
if (res.success) {
- // console.log(res, '鑾峰彇鎽勫儚鏈轰俊鎭�')
- console.log(5555555);
-
if (res.data.resolutions) {
let list = res.data.resolutions.map((i) => {
let obj = {};
@@ -473,7 +442,16 @@
this.isGb28182
);
console.log(this.TreeDataPool.selectedNode);
- updateCameraInfo(this.form)
+
+ let tem = {
+ camera: this.form,
+ sensors: this.form.sensors,
+ };
+ tem.camera.clusterId = sessionStorage.getItem("clusterId");
+ tem.camera.devId = sessionStorage.getItem("devId");
+ delete tem.camera.sensors;
+
+ updateCameraInfo(tem)
.then((rsp) => {
if (rsp.success) {
this.$notify({
@@ -498,22 +476,27 @@
});
}
})
- .catch((err) => {
- this.$notify({
- type: "error",
- message: err.msg,
- });
- });
+ .catch((err) => {});
} else {
this.form.areaid = this.addParentId;
- createCamera(this.form)
+
+ let tem = {
+ camera: this.form,
+ sensors: this.form.sensors,
+ };
+ tem.camera.clusterId = sessionStorage.getItem("clusterId");
+ tem.camera.devId = sessionStorage.getItem("devId");
+ tem.camera.parentUserId = "";
+ tem.camera.enable = false;
+ delete tem.camera.sensors;
+ createCamera(tem)
.then((rsp) => {
if (rsp.success) {
this.$notify({
type: "success",
message: "鎽勫儚鏈烘坊鍔犳垚鍔燂紒",
});
- this.TreeDataPool.selectedNode = rsp.data;
+ this.TreeDataPool.selectedNode = rsp.data.camera;
this.TreeDataPool.fetchTreeData();
// 鍚庣杩斿洖缁撴灉涓�0锛屾煡璇㈠悗涓�4
this.TreeDataPool.selectedNode.type = "4";
@@ -547,7 +530,7 @@
cameraType: this.form.type,
};
- console.log(this.videoItem.rtsp);
+ console.log(this.videoItem);
});
},
// * 楠岃瘉蹇呴�夐」
@@ -574,7 +557,18 @@
cancelButtonClass: "comfirm-class-cancle",
confirmButtonClass: "comfirm-class-sure",
}).then(() => {
- delCamera(this.form.id).then((res) => {
+ if (!this.form.id) {
+ this.$notify({
+ type: "warning",
+ message: "灏氭湭娣诲姞鎽勫儚鏈�",
+ });
+ return;
+ }
+ delCamera({
+ id: this.form.id,
+ clusterId: this.TreeDataPool.clusterId,
+ devId: this.TreeDataPool.devId,
+ }).then((res) => {
if (res.success) {
this.initFormData();
this.$notify({
@@ -619,6 +613,20 @@
addDevice(node) {
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();
},
},
@@ -727,7 +735,7 @@
.connect {
margin-bottom: 20px;
display: flex;
- justify-content: end;
+ justify-content: flex-end;
}
.el-button {
@@ -854,7 +862,7 @@
.btns {
display: flex;
- justify-content: end;
+ justify-content: flex-end;
margin-top: 20px;
.delBtn {
--
Gitblit v1.8.0