| | |
| | | this.cameraName = rsp.data.name ? rsp.data.name : ""; |
| | | this.rtsp = rsp.data.rtsp ? rsp.data.rtsp : ""; |
| | | this.type = rsp.data.type ? rsp.data.type : 0; |
| | | this.baseImg = rsp.data.snapshot_url |
| | | } |
| | | } catch { |
| | | this.cameraName = ""; |
| | |
| | | |
| | | // 只对摄像机数据底图进行处理 |
| | | if (this.cameraId.indexOf("stack") < 0) { |
| | | this.baseImg = rsp.data.snapshot_url ? rsp.data.snapshot_url : ""; |
| | | this.baseImg = rsp.data.snapshot_url ? rsp.data.snapshot_url : ""; |
| | | if (!this.baseImg) { |
| | | this.loading = true; |
| | | } else { |
| | |
| | | import request from "@/scripts/httpRequest"; |
| | | import request2 from './index' |
| | | import qs from "qs"; |
| | | |
| | | |
| | | export const createCamera = (camera: any) => { |
| | | return request({ |
| | | return request2({ |
| | | url: "/saas/api-s/camera/add", |
| | | method: "post", |
| | | data: camera |
| | |
| | | }; |
| | | |
| | | export const updateCameraInfo = (camera: any) => { |
| | | return request({ |
| | | return request2({ |
| | | url: "/saas/api-s/camera/update", |
| | | method: "post", |
| | | data: camera |
| | |
| | | let tem = { |
| | | camera: camera, |
| | | sensors: camera.sensors, |
| | | areaid: camera.areaid, |
| | | }; |
| | | tem.camera.clusterId = this.TreeDataPool.clusterId; |
| | | tem.camera.devId = this.TreeDataPool.devId; |
| | | tem.camera.parentUserId = ""; |
| | | tem.camera.enable = false; |
| | | delete tem.camera.sensors; |
| | | |
| | | promiseArr.push(createCamera(tem)); |
| | | } |
| | |
| | | return `${this.snapshot_url}`; |
| | | } else { |
| | | console.log(this.snapshot_url); |
| | | return `/httpImage/${this.snapshot_url}`; |
| | | return `http://${this.snapshot_url}`; |
| | | } |
| | | } else { |
| | | return this.blackImg; |
| | |
| | | @onCollapse="itemCollapse" |
| | | @onShowPic="showCameraPic" |
| | | /> |
| | | <div class="empty" v-if="!node.length">暂无摄像机数据,请添加摄像机!</div> |
| | | <div class="dialog-box-bg" v-show="showDialog" @click="hideDialogBox"></div> |
| | | <div |
| | | class="dialog-box" |
| | |
| | | overflow-y: hidden; |
| | | margin-bottom: 4px; |
| | | } |
| | | .empty { |
| | | line-height: 76px; |
| | | } |
| | | .tree-menu::-webkit-scrollbar { |
| | | /*滚动条整体样式*/ |
| | | width: 4px; /*高宽分别对应横竖滚动条的尺寸*/ |
| | |
| | | this.form.isAI = false; |
| | | } |
| | | this.form.resolution = |
| | | this.form.resolutionWidth + "*" + this.form.resolutionHeight; |
| | | this.form.resolution_width + "*" + this.form.resolution_height; |
| | | }); |
| | | } |
| | | }); |
| | |
| | | ? 0 |
| | | : parseFloat(this.form.longitude); |
| | | this.form.sensors = list; |
| | | this.form.resolutionWidth = Number( |
| | | this.form.resolution_width = Number( |
| | | this.form.resolution.split("*")[0] |
| | | ); |
| | | this.form.resolutionHeight = Number( |
| | | this.form.resolution_height = Number( |
| | | this.form.resolution.split("*")[1] |
| | | ); |
| | | let _this = this; |
| | |
| | | let tem = { |
| | | camera: this.form, |
| | | sensors: this.form.sensors, |
| | | areaid: this.form.areaid, |
| | | }; |
| | | tem.camera.clusterId = sessionStorage.getItem("clusterId"); |
| | | tem.camera.devId = sessionStorage.getItem("devId"); |
| | | delete tem.camera.sensors; |
| | | |
| | | updateCameraInfo(tem) |
| | | .then((rsp) => { |
| | |
| | | let tem = { |
| | | camera: this.form, |
| | | sensors: this.form.sensors, |
| | | areaid: this.form.areaid, |
| | | }; |
| | | 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) { |
| | |
| | | name: this.form.name, |
| | | rtsp: this.form.rtsp, |
| | | id: this.form.id, |
| | | isRunning: this.form.runEnable, |
| | | isRunning: this.form.run_enable, |
| | | cameraType: this.form.type, |
| | | }; |
| | | |
| | |
| | | this.$refs["banner"].setActiveItem(i); |
| | | }, |
| | | getUrl(url) { |
| | | let result = ""; |
| | | |
| | | if (!url) { |
| | | return this.baseImg; |
| | | } else if ( |
| | | url.indexOf("http://apps.smartai.com/httpImage/") === -1 && |
| | | url.indexOf("/images") !== 0 |
| | | ) { |
| | | return "/httpImage/" + url; |
| | | result = this.baseImg; |
| | | return result; |
| | | } |
| | | var reg = /^[0-9]/; |
| | | if (reg.test(url)) { |
| | | result = "http://" + url; |
| | | return result; |
| | | } |
| | | |
| | | return url; |
| | | }, |
| | | }, |
| | |
| | | type: Object, |
| | | }, |
| | | }, |
| | | created() { |
| | | var reg = /^[0-9]/; |
| | | if (reg.test(this.data.pic)) { |
| | | this.pic = "http://" + this.data.pic; |
| | | } |
| | | this.pic = this.data.pic; |
| | | }, |
| | | data() { |
| | | return { |
| | | pic: "", |
| | | }; |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | <li |
| | | v-for="(item, index) in bannerList" |
| | | :key="index" |
| | | @click="toggleBanner(index + 1)" |
| | | @click="toggleBanner(index)" |
| | | > |
| | | <button |
| | | class="inner" |
| | | :class="{ active: activeBanner == index + 1 }" |
| | | :class="{ active: activeBanner == index }" |
| | | ></button> |
| | | </li> |
| | | </ul> |
| | |
| | | router: "/trialCenter", |
| | | }, |
| | | ], //推荐卡片数据 |
| | | activeBanner: 1, //选中的banner |
| | | activeBanner: 0, //选中的banner |
| | | activeCommend: 3, //选中的推荐tabs |
| | | commendData: [], //推荐tab的数据 |
| | | productData: [], |
| | |
| | | this.activeCommend = id; |
| | | this.getRecommend(); |
| | | }, |
| | | |
| | | }, |
| | | beforeRouteLeave(to, from, next) { |
| | | let userInfo = sessionStorage.getItem("userInfo"); |
| | |
| | | >{{ item + " " }}</span |
| | | > |
| | | </p> |
| | | <p> |
| | | 购买数量 |
| | | <span>{{ scope.row.devCount }}</span> |
| | | </p> |
| | | |
| | | <p> |
| | | 服务时长: |
| | | <span>{{ scope.row.serveYear + "年" }}</span> |
| | |
| | | this.activeImg.url = url; |
| | | }, |
| | | confirmNow() { |
| | | this.cartItem.totalPrice = this.computTotalPrice; |
| | | let products = [ |
| | | { |
| | | activateCode: this.cartItem.requestCode, |
| | |
| | | if (res.success) { |
| | | this.orderId = res.data.orderId; |
| | | |
| | | if (this.cartItem.totalPrice == 0) { |
| | | if (this.data.priceBase == 0) { |
| | | resumePay({ orderId: this.orderId, payMethod: 5 }).then((res) => { |
| | | if (res.success) { |
| | | this.$router.push({ |
| | |
| | | } |
| | | }); |
| | | return; |
| | | } else { |
| | | this.showOrder = true; |
| | | } |
| | | |
| | | this.showOrder = true; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | <el-input type="textarea" v-model="item.reserved"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="付款凭证" prop="pic"> |
| | | <el-image |
| | | class="preview" |
| | | v-if="item.appendix" |
| | | :src="`http://${item.appendix}`" |
| | | fit="contain" |
| | | ></el-image> |
| | | <el-upload |
| | | v-else |
| | | class="upload-demo" |
| | | drag |
| | | action="https://jsonplaceholder.typicode.com/posts/" |
| | | :http-request="(param) => definedUpload(param, index)" |
| | | :show-file-list="false" |
| | | accept=".jpg, .jpeg, .png" |
| | | > |
| | | <el-image |
| | | class="preview" |
| | | v-if="item.appendix" |
| | | :src="`http://${item.appendix}`" |
| | | fit="contain" |
| | | ></el-image> |
| | | |
| | | <div class="el-upload__text"> |
| | | <i class="el-icon-plus"></i> |
| | | <span class="words"> |
| | |
| | | </span> |
| | | </div> |
| | | </el-upload> |
| | | <i |
| | | class="el-icon-error remove" |
| | | v-if="item.appendix" |
| | | @click="item.appendix = ''" |
| | | ></i> |
| | | <div> |
| | | <i |
| | | class="el-icon-error remove" |
| | | v-if="item.appendix" |
| | | @click="item.appendix = ''" |
| | | ></i> |
| | | </div> |
| | | </el-form-item> |
| | | <!-- <div class="text-left" v-if="index!=0"> |
| | | <el-button |
| | |
| | | this.certificateForm.list.splice(index, 1); |
| | | }, |
| | | definedUpload(param, index) { |
| | | const fileName = param.file.name; |
| | | const m = fileName.match(/\.(\w+)(#|\?|$)/); |
| | | const fileType = (m && m[1]).toString().toLowerCase(); |
| | | const validType = ["jpg", "jpeg", "png"].includes(fileType); |
| | | if (!validType) { |
| | | this.$notify({ |
| | | message: "上传格式有误", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | let _this = this; |
| | | const fd = new FormData(); |
| | | fd.append("file", param.file); |
| | | console.log(param); |
| | | request({ |
| | | method: "post", |
| | | url: `/saas/api-s/saasFile/upload`, |
| | |
| | | duration: 2500, |
| | | offset: 57, |
| | | }); |
| | | this.certificateSubmitVisible = false; |
| | | this.close(); |
| | | this.$router.push({ |
| | | path: "/personalCenter", |
| | | query: { |
| | | id: 1, |
| | | }, |
| | | }); |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | |
| | | font-size: 12px; |
| | | } |
| | | } |
| | | .el-image { |
| | | width: 120px; |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss"> |
| | |
| | | border: 1px dashed #c0c5cc !important; |
| | | border-radius: 3px; |
| | | background: #e9ebee; |
| | | |
| | | .el-upload__text { |
| | | margin-top: 35px; |
| | | display: flex; |
| | |
| | | } |
| | | </style> |
| | | |
| | | <style lang="scss"> |
| | | .industrySelect.el-select-dropdown.el-popper { |
| | | <style lang="scss" > |
| | | .industrySelect.el-select-dropdown.el-popper ::v-deep { |
| | | margin: 0; |
| | | |
| | | .el-scrollbar { |
| | |
| | | .el-popper.el-cascader__dropdown.selectCascader { |
| | | border: none; |
| | | margin: 0; |
| | | |
| | | width: auto !important; |
| | | * { |
| | | color: #3d3d3d; |
| | | border-color: rgba(255, 255, 2555, 0.1); |
| | | } |
| | | |
| | | .el-cascader-panel { |
| | | height: 158px !important; |
| | | } |
| | | |
| | | .in-active-path { |
| | | span { |
| | | color: #0065ff; |
| | |
| | | proxy: { |
| | | "/api": { |
| | | // target: "http://192.168.20.10:7004", |
| | | target: "http://192.168.20.174:7070", |
| | | // target: "http://192.168.20.174:7070", |
| | | target: "http://192.168.20.235:7070", |
| | | // target: "http://192.168.20.117:7080", |
| | | // secure: false, |
| | | changeOrigin: true, |