From 715191acb8dd5bccb3f7935c25128a990ed2b5c9 Mon Sep 17 00:00:00 2001 From: mark <mark18340872469@163.com> Date: 星期四, 29 九月 2022 14:43:48 +0800 Subject: [PATCH] 点位信息维护 的样式调整 --- src/views/dataPush/components/point.vue | 51 ++++++++++++++++++++++++++++----------------------- 1 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/views/dataPush/components/point.vue b/src/views/dataPush/components/point.vue index 86afa06..9b502a5 100644 --- a/src/views/dataPush/components/point.vue +++ b/src/views/dataPush/components/point.vue @@ -19,7 +19,13 @@ <span>娣诲姞鐐逛綅</span> </div> <div class="switchBox"> - <el-switch v-model="value1" @change="changeAll($event)" active-text="鎬荤偣浣嶅紑" inactive-text="鎬荤偣浣嶅叧"> + <el-switch + v-model="value1" + width="60" + @change="changeAll($event)" + active-text="鎬荤偣浣嶅紑" + inactive-text="鎬荤偣浣嶅叧" + > </el-switch> </div> </div> @@ -32,9 +38,9 @@ :fit="true" :default-sort="{ prop: 'createTime', order: 'descending' }" > - <el-table-column prop="cameraName" label="鐐逛綅鍚嶇О" show-overflow-tooltip></el-table-column> + <el-table-column prop="cameraName" label="鐐逛綅鍚嶇О" width="130px" show-overflow-tooltip></el-table-column> <el-table-column prop="channelCode" label="鎶ヨ閫氶亾缂栫爜" show-overflow-tooltip></el-table-column> - <el-table-column prop="companyCode" label="浼佷笟缂栫爜" show-overflow-tooltip></el-table-column> + <el-table-column prop="companyCode" label="浼佷笟缂栫爜" width="130px" show-overflow-tooltip></el-table-column> <el-table-column prop="scenes" label="鎺ㄩ�佸満鏅�" show-overflow-tooltip></el-table-column> <el-table-column prop="updatedAt" label="鎺ㄩ�佹椂闂�" width="100px" show-overflow-tooltip> <template slot-scope="scope">{{ scope.row.startTime }}-{{ scope.row.endTime }}</template> @@ -135,7 +141,7 @@ </el-form-item> </el-form> <div class="right"> - <div class="button searchBtn" @click="saveUser">淇濆瓨</div> + <div class="button searchBtn" @click="save">淇濆瓨</div> <div class="button resetBtn" @click="resetUser">閲嶇疆</div> <div class="button resetBtn" style="margin-left:20px" @click="goback">杩斿洖</div> </div> @@ -147,7 +153,7 @@ import { traverse } from "./point" import { getClusterDevList } from "@/api/clusterManage" import { camerasList, camerasCreate, camerasConfig, camerasSwitch, camerasUpdate, camerasDelete } from "@/api/report" - +import "./point.scss" export default { data() { return { @@ -218,9 +224,7 @@ updatedAt: "", id: "" }, - dataList: [], - tip: 1, // 鍖哄垎淇濆瓨杩樻槸缂栬緫 浣嗘槸鐜板湪娌℃湁缂栬緫 rules: { CameraName: [{ required: true, message: "璇烽�夋嫨璁惧鍚嶇О", trigger: "change" }], @@ -244,8 +248,6 @@ this.aaaaa() }, - // const rsp: any = await getLocalCameraTree(params) - // console.log(rsp, "rsp") methods: { async changeAll(val) { console.log(val) @@ -305,13 +307,16 @@ this.ruleForm.id = row.id }, async aaaaa() { + // 杩涘叆椤甸潰鍓嶇殑鍒濆鍖� let res = await camerasConfig() + // 鎬诲紑鍏� if (res && res.success) { res.data.enable === 0 ? (this.value1 = false) : (this.value1 = true) console.log(this.value1) } let clusterId = "" let clusterReq = await getClusterDevList() + // 鏌ヨ if (clusterReq && clusterReq.success) { if (clusterReq.data.clusterList.length > 0) { clusterId = clusterReq.data.clusterList[0].cluster_id @@ -319,6 +324,7 @@ } console.log(clusterId) let camereReq = await getLocalCameraTree({ clusterId: clusterId }) + // 杩欎釜鏄� 娣诲姞鏃剁殑鐐逛綅 鏄粠鎽勫儚鏈洪〉闈� 鏉ョ殑 let array = [] this.cameraOptions = traverse(camereReq.data.treeMenu, array) }, @@ -327,10 +333,11 @@ this.tip = 1 this.resetUser() }, //y - saveUser() { + save() { this.$refs["ruleForm"].validate((valid) => { if (valid) { if (this.tip !== 1) { + // tip1 鏄坊鍔� 鍏朵粬鏄紪杈� let obj = this.cameraOptions.find((item) => item.name === this.ruleForm.CameraName) console.log(obj, "dddddddd") let params = { @@ -458,16 +465,6 @@ // </style> <style scoped lang="scss"> -::deep .el-switch { - color: #f52323; - .el-switch__core { - height: 32px !important; - } - .el-switch__core::after { - height: 30px !important; - width: 30px !important; - } -} .sub-account { padding: 20px; .head-name { @@ -628,13 +625,14 @@ } .btns { + display: flex; + margin: 20px 0; + text-align: center; + justify-content: space-between; .switchBox { display: flex; align-items: center; } - display: flex; - margin: 20px 0; - text-align: center; .add { margin-right: 20px; width: 126px; @@ -764,6 +762,13 @@ </style> <style> +/* .el-switch__core { + height: 32px !important; +} +.el-switch__core::after { + height: 30px !important; + width: 30px !important; +} */ .el-date-table td.start-date span, .el-date-table td.end-date span { background-color: #0065ff; -- Gitblit v1.8.0