| | |
| | | // }); |
| | | let taskNames = []; |
| | | this.tasks = []; |
| | | rsp.data.forEach((d: any) => { |
| | | rsp.data.aggs.forEach((d: any) => { |
| | | if (taskNames.indexOf(d.name) < 0) { |
| | | taskNames.push(d.name); |
| | | this.tasks.push(d) |
| | |
| | | //联系我们 |
| | | export const saveConnectUs = (data) => { |
| | | return request({ |
| | | url: "/saas/api-i/saasIndex/saveConnectUs", |
| | | url: "/cloud/api-i/saasIndex/saveConnectUs", |
| | | method: "post", |
| | | data, |
| | | }); |
| | |
| | | // 检索页面数据列表 |
| | | export const getSearchList = (query: any) => { |
| | | return request({ |
| | | url: "/data/api-v/es/esSearch", |
| | | url: "/saas/api-s/es/search", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | |
| | | // 检索页面标签查询 |
| | | export const getTagList = (query: any) => { |
| | | return request({ |
| | | url: "/data/api-v/es/tagList", |
| | | url: "/saas/api-s/es/tagList", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | |
| | | // 检索页面任务列表查询 |
| | | export const getTaskList = (query: any) => { |
| | | return request({ |
| | | url: "/data/api-v/task/aggregateTaskList", |
| | | method: "get", |
| | | params: query |
| | | }); |
| | | }; |
| | | |
| | | // 字典查询(布防等级) |
| | | export const getAlarmLevel = (query: any) => { |
| | | return request({ |
| | | url: "/saas/api-s/dictionary/findByType", |
| | | method: "get", |
| | | url: "/saas/api-s/es/aggTaskList", |
| | | method: "post", |
| | | data: query |
| | | }); |
| | | }; |
| | | |
| | | // 获取标签字典 |
| | | // param:type |
| | | |
| | | export const getAlarmLevel = (query: any) => { |
| | | return request({ |
| | | url: '/saas/api-s/dictionary/findByType', |
| | | method: "get", |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // |
| | | export const findPerson = (query: any) => { |
| | | return request({ |
| | | url: "/data/api-v/es/queryEsCompareData", |
| | | url: "/saas/api-s/es/queryEsCompareData", |
| | | method: "post", |
| | | data: query |
| | | }); |
New file |
| | |
| | | /** |
| | | * I think element-ui's default theme color is too light for long-term use. |
| | | * So I modified the default color and you can modify it to your liking. |
| | | **/ |
| | | |
| | | /* theme color */ |
| | | // $--color-primary: #3D68E1; |
| | | $--color-primary: #0064FF; |
| | | $--color-success: #13ce66; |
| | | $--color-warning: #ff8725; |
| | | $--color-danger: #f52323; |
| | | $--color-info: #EAEAEA; |
| | | $--color-themeBlue: #0064FF; |
| | | |
| | | $--button-font-weight: 400; |
| | | |
| | | // $--color-text-regular: #1f2d3d; |
| | | |
| | | $--border-color-light: #dfe4ed; |
| | | $--border-color-lighter: #e6ebf5; |
| | | |
| | | $--table-border:1px solid #dfe6ec; |
| | | |
| | | /* icon font path, required */ |
| | | $--font-path: '~element-ui/lib/theme-chalk/fonts'; |
| | | |
| | | @import "~element-ui/packages/theme-chalk/src/index"; |
| | | |
| | | // the :export directive is the magic sauce for webpack |
| | | // https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass |
| | | :export { |
| | | theme: $--color-primary; |
| | | } |
| | |
| | | background: #ffffff; |
| | | box-shadow: 0px 4px 12px rgba(0, 51, 128, 0.18); |
| | | border-radius: 8px; |
| | | z-index: 2; |
| | | |
| | | .tele, |
| | | .advice { |
| | |
| | | <span class="label">法律声明</span> |
| | | <span class="label">隐私政策</span> |
| | | <span class="label">廉正举报</span> |
| | | <span class="label">联系我们</span> |
| | | <span class="label" @click="$router.push('/connectUs')">联系我们</span> |
| | | <span class="label">加入我们</span> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | <div class="right"> |
| | | <div class="link"><router-link to="/">首页</router-link></div> |
| | | <div class="link">联系我们</div> |
| | | <div class="link" @click="$router.push('/connectUs')">联系我们</div> |
| | | <div class="link">关于我们</div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | .link { |
| | | margin-right: 20px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | |
| | | <router-link to="/"> |
| | | <img class="logo" src="/images/index/LOGO.png" alt="" /> |
| | | </router-link> |
| | | <router-link to="/"> |
| | | <div class="title">工业物联网平台</div> |
| | | </router-link> |
| | | <div class="label"><router-link to="/">首页</router-link></div> |
| | | <div class="title" @click="$router.push('/')">工业物联网平台</div> |
| | | <div class="label" @click="$router.push('/')">首页</div> |
| | | <div class="label">云服务</div> |
| | | <div class="label"> |
| | | <router-link to="/manageCenter">管理中心</router-link> |
| | | </div> |
| | | <div class="label"> |
| | | <router-link to="/product">应用商城</router-link> |
| | | </div> |
| | | <div class="label" @click="$router.push('/manageCenter')">管理中心</div> |
| | | <div class="label" @click="$router.push('/product')">应用商城</div> |
| | | </div> |
| | | |
| | | <!-- 左侧 --> |
| | |
| | | </el-input> |
| | | |
| | | <!-- 未登录情况 --> |
| | | <div class="headerLogin" v-if="!userInfo"> |
| | | <router-link to="/login"> 登录</router-link> |
| | | <div |
| | | class="headerLogin" |
| | | v-if="!userInfo" |
| | | @click="$router.push('/login')" |
| | | > |
| | | 登录 |
| | | </div> |
| | | <div class="register" v-if="!userInfo"> |
| | | <router-link to="/register"> 免费注册 </router-link> |
| | | <div |
| | | class="register" |
| | | v-if="!userInfo" |
| | | @click="$router.push('/register')" |
| | | > |
| | | 免费注册 |
| | | </div> |
| | | |
| | | <!-- 已登录情况 --> |
| | |
| | | } |
| | | .tree-menu { |
| | | // max-width: 350px; |
| | | min-height: 92px; |
| | | overflow-x: auto; |
| | | overflow-y: hidden; |
| | | margin-bottom: 4px; |
| | |
| | | !this.readonly && |
| | | !this.gb28181 |
| | | ) { |
| | | const btn = document.createElement("i"); |
| | | const btn = document.createElement("a"); |
| | | btn.id = `${treeid}_${treeNode.id}_btn`; |
| | | btn.classList.add("addIcon"); |
| | | btn.classList.add("iconfont"); |
| | | btn.title = "新增"; |
| | | // btn.innerText = '删除'; |
| | | btn.addEventListener("click", (e) => { |
| | | e.stopPropagation(); |
| | |
| | | !treeNode.children && |
| | | !this.gb28181 |
| | | ) { |
| | | const btn = document.createElement("i"); |
| | | const btn = document.createElement("a"); |
| | | btn.id = `${treeid}_${treeNode.id}_btn`; |
| | | btn.classList.add("delIcon"); |
| | | btn.classList.add("iconfont"); |
| | | btn.title = "删除"; |
| | | // btn.innerText = '删除'; |
| | | btn.addEventListener("click", (e) => { |
| | | e.stopPropagation(); |
| | |
| | | treeNode.isParent && |
| | | !this.readonly |
| | | ) { |
| | | const btn = document.createElement("i"); |
| | | const btn = document.createElement("a"); |
| | | btn.id = `${treeid}_${treeNode.id}_btn`; |
| | | btn.classList.add("editIcon"); |
| | | btn.classList.add("iconfont"); |
| | | btn.title = "编辑"; |
| | | // btn.innerText = '删除'; |
| | | btn.addEventListener("click", (e) => { |
| | | e.stopPropagation(); |
| | |
| | | !this.readonly && |
| | | !this.gb28181 |
| | | ) { |
| | | const btn = document.createElement("i"); |
| | | const btn = document.createElement("a"); |
| | | btn.id = `${treeid}_${treeNode.id}_btn`; |
| | | btn.classList.add("iconfont"); |
| | | btn.classList.add("addCameraIcon"); |
| | | btn.title = "添加摄像机"; |
| | | // btn.innerText = '删除'; |
| | | btn.addEventListener("click", (e) => { |
| | | e.stopPropagation(); |
| | |
| | | !this.readonly && |
| | | !this.gb28181 |
| | | ) { |
| | | const btn = document.createElement("i"); |
| | | const btn = document.createElement("a"); |
| | | btn.id = `${treeid}_${treeNode.id}_btn`; |
| | | btn.classList.add("iconfont"); |
| | | btn.classList.add("importIcon"); |
| | | btn.title = "导入摄像机"; |
| | | // btn.innerText = '删除'; |
| | | btn.addEventListener("click", (e) => { |
| | | e.stopPropagation(); |
| | |
| | | !item.querySelector(".icontupian1") && |
| | | treeNode.type == "camera" |
| | | ) { |
| | | const btn = document.createElement("i"); |
| | | const btn = document.createElement("a"); |
| | | btn.id = `${treeid}_${treeNode.id}_btn`; |
| | | btn.classList.add("iconfont"); |
| | | btn.classList.add("icontupian1"); |
| | | btn.classList.add("primary"); |
| | | btn.classList.add("icon-fix"); |
| | | btn.title = "查看底图"; |
| | | // btn.innerText = '删除'; |
| | | btn.addEventListener("click", (e) => { |
| | | e.stopPropagation(); |
| | |
| | | text-align: left; |
| | | white-space: nowrap; |
| | | outline: 0; |
| | | |
| | | .iconfont { |
| | | padding: 0; |
| | | padding-top: 3px; |
| | | } |
| | | } |
| | | .ztree li ul { |
| | | margin: 0; |
| | |
| | | color: #5f5f5f; |
| | | } |
| | | |
| | | .ztree li i.icon-fix { |
| | | .ztree li a.icon-fix { |
| | | font-size: 15px; |
| | | margin-left: 3px; |
| | | margin-right: 5px; |
| | |
| | | top: 2px; |
| | | } |
| | | |
| | | .ztree li i.primary { |
| | | .ztree li a.primary { |
| | | color: #3d68e1; |
| | | } |
| | | .ztree li i.danger { |
| | | .ztree li a.danger { |
| | | color: #f7493c; |
| | | } |
| | | |
| | |
| | | background-position: 0 -14px; |
| | | } |
| | | .ztree li span.button.chk.checkbox_false_part { |
| | | background-position: 0 -28px; |
| | | background-position: -14px 0; |
| | | } |
| | | .ztree li span.button.chk.checkbox_false_part_focus { |
| | | background-position: 0 -42px; |
| | |
| | | background-position: -14px -14px; |
| | | } |
| | | .ztree li span.button.chk.checkbox_true_part { |
| | | background-position: -14px -28px; |
| | | background-position: -14px 0; |
| | | } |
| | | .ztree li span.button.chk.checkbox_true_part_focus { |
| | | background-position: -14px -42px; |
New file |
| | |
| | | <template> |
| | | <el-input |
| | | :placeholder="placeholder" |
| | | class="PwInput" |
| | | :type="[flag ? 'text' : 'password']" |
| | | v-model="inputVal" |
| | | @input="input" |
| | | autocomplete="off" |
| | | > |
| | | <i slot="prefix" class="iconfont" v-if="showPreIcon"></i> |
| | | |
| | | <i |
| | | slot="suffix" |
| | | class="iconfont showPass" |
| | | autocomplete="auto" |
| | | @click="flag = !flag" |
| | | > |
| | | {{ flag ? "" : "" }} |
| | | </i> |
| | | </el-input> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | value: {}, |
| | | showPreIcon: {}, |
| | | placeholder: { |
| | | default: "请输入密码", |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | flag: false, |
| | | inputVal: this.value, |
| | | }; |
| | | }, |
| | | methods: { |
| | | input() { |
| | | this.$emit("input", this.inputVal); |
| | | }, |
| | | }, |
| | | watch: { |
| | | value(val) { |
| | | this.inputVal = val; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" > |
| | | .PwInput { |
| | | .showPass { |
| | | margin-top: 8px; |
| | | font-size: 24px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <i |
| | | class="el-icon-download jsmodern-video-download" |
| | | @click="downLoad" |
| | | style="margin: 9px 0 0 15px" |
| | | ></i> |
| | | </section> |
| | | |
| | |
| | | } |
| | | |
| | | .video-error { |
| | | text-align: center; |
| | | position: absolute; |
| | | top: 35%; |
| | | left: 30%; |
| | |
| | | |
| | | import VueAwesomeSwiper from "vue-awesome-swiper"; |
| | | import ToggleButton from 'vue-js-toggle-button'; |
| | | import ImageShow from './scripts/component.js' |
| | | import {ImageShow,PwInput} from './scripts/component.js' |
| | | |
| | | import "swiper/dist/css/swiper.css"; |
| | | import './assets/css/element-variables.scss' |
| | | |
| | | |
| | | |
| | |
| | | Vue.use(VueAwesomeSwiper as any); |
| | | Vue.use(ToggleButton) |
| | | Vue.use(ImageShow) |
| | | Vue.use(PwInput) |
| | | |
| | | |
| | | |
| | |
| | | // 引入组件 |
| | | import ImageShow from "@/components/subComponents/ImageShow.vue"; |
| | | import PwInput from "@/components/subComponents/PwInput.vue"; |
| | | // 创建个空对象 |
| | | // 设置安装方法 |
| | | ImageShow.install = function(Vue) { |
| | | Vue.component("ImageShow", ImageShow); |
| | | }; |
| | | |
| | | PwInput.install = function(Vue) { |
| | | Vue.component("PwInput", PwInput); |
| | | }; |
| | | // 导出对象 |
| | | export default ImageShow; |
| | | export { ImageShow, PwInput }; |
| | |
| | | case 500: |
| | | errJson = error.response.data |
| | | break |
| | | // case 501: |
| | | // errJson.status = error.response.status; |
| | | // errJson.message = "服务未实现(501)"; |
| | | // break; |
| | | // case 502: |
| | | // errJson.status = error.response.status; |
| | | // errJson.message = "网络错误(502)"; |
| | | // break; |
| | | // case 503: |
| | | // errJson.status = error.response.status; |
| | | // errJson.message = "服务不可用(503)"; |
| | | // break; |
| | | // case 504: |
| | | // errJson.status = error.response.status; |
| | | // errJson.message = "网络超时(504)"; |
| | | // break; |
| | | // case 505: |
| | | // errJson.status = error.response.status; |
| | | // errJson.message = "HTTP版本不受支持(505)"; |
| | | // break; |
| | | |
| | | default: |
| | | errJson.status = error.response.status |
| | | errJson.message = `连接出错(${error.response.status})!` |
| | |
| | | if(error.response&&error.response.data&&!error.response.data.success ) { |
| | | errJson.message =error.response.data.msg |
| | | } |
| | | |
| | | if(error.response.status == 401) { |
| | | return |
| | | } |
| | | |
| | | Notification({ |
| | | title: '错误', |
| | |
| | | return validMap.indexOf(str.trim()) >= 0; |
| | | } |
| | | |
| | | /* 校验6到20位字母和数字的用户名,不能以数字开头 */ |
| | | /* 校验5到20位字母和数字的用户名,不能以数字开头 */ |
| | | export function validUser(str) { |
| | | const reg = /^[a-zA-Z0-9]{5,20}$/; |
| | | const reg = /^[a-zA-Z][a-zA-Z0-9]{4,20}$/; |
| | | return reg.test(str); |
| | | } |
| | | |
| | | /* 6到14位的数字和字母以及标点符号的至少两种组合 */ |
| | | export function validPassword(str) { |
| | | const reg = |
| | | /^(?!^[0-9]+$)(?!^[a-z]+$)(?!^[A-Z]+$)(?!^[\x21-\x2f\x3a-\x40\x5b-\x60\x7B-\x7F]+$)[a-z0-9A-Z\x21-\x2f\x3a-\x40\x5b-\x60\x7B-\x7F]{6,14}$/; |
| | | const reg = /^(?!^[0-9]+$)(?!^[a-z]+$)(?!^[A-Z]+$)(?!^[\x21-\x2f\x3a-\x40\x5b-\x60\x7B-\x7F]+$)[a-z0-9A-Z\x21-\x2f\x3a-\x40\x5b-\x60\x7B-\x7F]{6,14}$/; |
| | | return reg.test(str); |
| | | } |
| | | |
| | | /* 合法uri */ |
| | | export function validURL(url) { |
| | | const reg = |
| | | /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/; |
| | | const reg = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/; |
| | | return reg.test(url); |
| | | } |
| | | |
| | |
| | | * @returns {boolean} |
| | | */ |
| | | export function validEmail(rule, value, callback) { |
| | | const re = |
| | | /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
| | | const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
| | | if (re.test(value)) { |
| | | return callback(); |
| | | } |
| | | return callback(new Error("输入的邮箱错误")); |
| | | } |
| | | export function emailNotRequired(rule, value, callback) { |
| | | const re = |
| | | /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
| | | const re = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; |
| | | if (value != "") { |
| | | if (re.test(value)) { |
| | | return callback(); |
| | |
| | | return callback(new Error("输入不可以为空")); |
| | | } |
| | | |
| | | const re = |
| | | /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/; |
| | | const re = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/; |
| | | if (re.test(value)) { |
| | | return callback(); |
| | | } |
| | |
| | | if (value == "" || typeof value == undefined) { |
| | | callback(new Error("请输入端口值")); |
| | | } else { |
| | | const re = |
| | | /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/; |
| | | const re = /^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/; |
| | | const rsCheck = re.test(value); |
| | | if (!rsCheck) { |
| | | callback(new Error("请输入在[0-65535]之间的端口值")); |
| | |
| | | |
| | | //校验域名 |
| | | export function vaildHost(str) { |
| | | let re = |
| | | /^(?=^.{3,255}$)(http(s)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*$/; |
| | | let re = /^(?=^.{3,255}$)(http(s)?:\/\/)?(www\.)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:\d+)*(\/\w+\.\w+)*$/; |
| | | return re.test(str); |
| | | } |
| | |
| | | }, |
| | | //获取验证码 |
| | | getCode() { |
| | | let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username; |
| | | this.codeDisabled = true; |
| | | this.getValidStr(); |
| | | this.timer = setInterval(this.getValidStr, 1000); |
| | | getVerifyCode({ |
| | | phoneNum: this.formData.phoneNum, |
| | | username: loginName, |
| | | }).then(() => { |
| | | this.gotCode = true; |
| | | }); |
| | |
| | | <el-select |
| | | v-model="every" |
| | | placeholder="请选择" |
| | | popper-class="industrySelect" |
| | | popper-class="equipmentSelect" |
| | | > |
| | | <el-option |
| | | v-for="item in periodOptions" |
| | |
| | | <el-select |
| | | v-model="cronValueObj.week" |
| | | placeholder="请选择" |
| | | popper-class="industrySelect" |
| | | popper-class="equipmentSelect" |
| | | > |
| | | <el-option |
| | | v-for="item in weeks" |
| | |
| | | <el-select |
| | | v-model="cronValueObj.day" |
| | | placeholder="请选择" |
| | | popper-class="industrySelect" |
| | | popper-class="equipmentSelect" |
| | | > |
| | | <el-option |
| | | v-for="item in days" |
| | |
| | | </style> |
| | | |
| | | <style lang="scss"> |
| | | .industrySelect.el-select-dropdown.el-popper { |
| | | .equipmentSelect.el-select-dropdown.el-popper { |
| | | margin: 0; |
| | | |
| | | .el-scrollbar { |
| | |
| | | duration: 2500, |
| | | offset: 57, |
| | | }); |
| | | this.$emit("close"); |
| | | this.$emit("reflash"); |
| | | } else { |
| | | this.$notify({ |
| | | type: "error", |
| | |
| | | }, |
| | | |
| | | async submit() { |
| | | let res = {}; |
| | | if (this.addObj.type == "cluster") { |
| | | const res = await addCluster({ |
| | | res = await addCluster({ |
| | | clusterPwd: this.auth_password, |
| | | clusterId: this.addObj.id, |
| | | }); |
| | | } else { |
| | | const res = await addDeviceToUser({ |
| | | res = await addDeviceToUser({ |
| | | clusterPwd: this.auth_password, |
| | | deviceId: this.addObj.id, |
| | | clusterId: this.addObj.cid, |
| | | }); |
| | | } |
| | | |
| | | if (res && res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "添加成功", |
| | | }); |
| | | this.close(); |
| | | } |
| | | }, |
| | | showBox(type, id, cid) { |
| | | console.log(cid); |
| | | this.auth_password = ""; |
| | | this.showPasswordBox = true; |
| | | this.addObj = { |
| | | type, |
| | |
| | | import AMapLoader from "@amap/amap-jsapi-loader"; |
| | | import InfoCard from "@/views/equipmentManagement/equipmentList/components/InfoCard"; |
| | | import FormList from "@/views/equipmentManagement/equipmentList/components/FormList"; |
| | | |
| | | import bus from "@/plugin/bus"; |
| | | |
| | | export default { |
| | | created() { |
| | | window._AMapSecurityConfig = { |
| | |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.searchingBtn(); |
| | | //DOM初始化完成进行地图初始化 |
| | | this.initMap(""); |
| | | bus.$on("refleshNode", (node) => { |
| | | this.nodes = node; |
| | | this.initNode(); |
| | | }); |
| | | }, |
| | | beforeDestroy() { |
| | | bus.$off("refleshNode"); |
| | | }, |
| | | |
| | | components: { |
| | | InfoCard, //设备信息弹层 |
| | | FormList, //表格 |
| | |
| | | center: [116.06157, 39.66157], //地图中心 |
| | | activeNode: null, //选中的地图节点 |
| | | geocoder: {}, |
| | | myMaker: null, |
| | | }; |
| | | }, |
| | | |
| | |
| | | }, |
| | | //初始化节点 |
| | | initNode() { |
| | | if (this.myMaker) { |
| | | this.myMaker.destroy(); |
| | | } |
| | | this.nodes.filter((item, index) => { |
| | | //查询行政位置 |
| | | this.geocoder.getAddress([item.lon, item.lat], (status, result) => { |
| | |
| | | }); |
| | | |
| | | this.map.add(marker); |
| | | this.myMaker = marker; |
| | | }); |
| | | }); |
| | | }, |
| | |
| | | this.isFull = false; |
| | | } |
| | | this.initMap(status); |
| | | }, |
| | | |
| | | // 查询列表 |
| | | searchingBtn() { |
| | | let param = { |
| | | page: 1, |
| | | size: 999, |
| | | // startTime: this.searchTime[0], |
| | | // endTime: this.searchTime[1], |
| | | inputText: "", |
| | | }; |
| | | findDevList(param) |
| | | .then((res) => { |
| | | this.nodes = res.data.list; |
| | | this.initMap(""); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | import UnbindBox from "@/views/equipmentManagement/equipmentDetail/components/UnbindBox"; |
| | | import QuitClusterBox from "@/views/equipmentManagement/equipmentList/components/QuitClusterBox"; |
| | | import JoinClusterBox from "@/views/equipmentManagement/equipmentList/components/JoinClusterBox"; |
| | | |
| | | import bus from "@/plugin/bus"; |
| | | |
| | | export default { |
| | | components: { |
| | | AddBox, |
| | |
| | | if (res.data.total <= this.size) { |
| | | this.page = 1; |
| | | } |
| | | |
| | | bus.$emit("refleshNode", this.dataList); |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | |
| | | |
| | | //解绑按钮 |
| | | Untying(row) { |
| | | console.log(row); |
| | | this.unbindId = row.devId; |
| | | this.isShowUnbind = true; |
| | | }, |
| | |
| | | //关闭新增弹窗 |
| | | closeAddBox() { |
| | | this.isShowAdd = false; |
| | | this.searchingBtn(); |
| | | }, |
| | | // 关闭解绑弹窗 |
| | | closeUnbindBox() { |
| | |
| | | |
| | | //解绑成功回调 |
| | | reflash() { |
| | | console.log("1111"); |
| | | this.isShowUnbind = false; |
| | | this.searchingBtn(); |
| | | }, |
| | |
| | | padding: 60px 0 30px 0; |
| | | font-size: 14px; |
| | | border-bottom: 1px solid #e9ebee; |
| | | background-color: #fff; |
| | | |
| | | .left, |
| | | .right, |
| | |
| | | methods: { |
| | | checkpermission() { |
| | | const userInfo = JSON.parse(sessionStorage.getItem("userInfo")); |
| | | if (!userInfo) { |
| | | this.$router.push("/login"); |
| | | } |
| | | const val = userInfo.permissions.find((item) => { |
| | | return item == "deviceMng"; |
| | | }); |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | console.log("------------"); |
| | | this.getCluster(); |
| | | this.TreeDataPool.readonly = false; |
| | | |
| | |
| | | const res = await getClusterDevList(); |
| | | if (res && res.success) { |
| | | this.clusterData = res.data.clusterList; |
| | | if (res.data.clusterList <= 0 && res.data.devList <= 0) { |
| | | this.$confirm( |
| | | "系统检测到您还未添加设备, 请在设备管理页面维护", |
| | | "提示", |
| | | { |
| | | confirmButtonText: "跳转", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | } |
| | | ) |
| | | .then(() => { |
| | | this.$router.push("/manageCenter"); |
| | | }) |
| | | .catch(() => {}); |
| | | } |
| | | |
| | | res.data.clusterList.forEach((item) => { |
| | | this.clusterArr.push({ |
| | | label: item.cluster_name, |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <Connect v-if="showConnect"></Connect> |
| | | <Connect></Connect> |
| | | |
| | | <!-- 页尾 --> |
| | | <Footer></Footer> |
| | |
| | | //添加滚动监听 |
| | | scrollListener() { |
| | | //页面滑动触发事件 (滚动条移动则调用是否显示返回顶部按钮事件) |
| | | var a = document.documentElement.clientHeight; // 滚动容器的可视高 |
| | | var b = document.documentElement.scrollTop; // 滚动条距离顶部的高度 |
| | | var c = document.documentElement.scrollHeight; // 滚动容器的整个高度 |
| | | |
| | | if (document.documentElement.scrollTop < 1100) { |
| | | this.showConnect = false; |
| | | } else { |
| | | if (c === a + b) { |
| | | //当滚动容器的可视高+滚动容器滚动了的高度(滚动条顶部距离滚动容器顶部的距离) = 滚动容器的整个高度时,说明滚动条到底了 |
| | | this.showConnect = true; |
| | | } else { |
| | | this.showConnect = false; |
| | | } |
| | | |
| | | //检查滚动条是否在顶部,控制返回顶部按钮的隐藏和显示 |
| | | }, |
| | | }, |
| | | beforeRouteLeave(to, from, next) { |
| | | let userInfo = sessionStorage.getItem("userInfo"); |
| | | if ( |
| | | !userInfo && |
| | | to.path !== "/login" && |
| | | to.path !== "/register" && |
| | | to.path !== "/connectUs" |
| | | ) { |
| | | next({ path: "/login" }); |
| | | } else { |
| | | next(); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | > |
| | | <el-form-item prop="loginName"> |
| | | <el-input |
| | | v-model="user.loginName" |
| | | v-model.trim="user.loginName" |
| | | placeholder="请输入手机号 / 用户名" |
| | | > |
| | | <i slot="prefix" class="iconfont"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="password" class="password-form-item"> |
| | | <el-input |
| | | <PwInput v-model="user.password" :showPreIcon="true"> </PwInput> |
| | | <!-- <el-input |
| | | show-password |
| | | @keyup.enter.native="userLogin" |
| | | v-model="user.password" |
| | | autocomplete="off" |
| | | placeholder="请输入密码" |
| | | > |
| | | <i slot="prefix" class="iconfont"></i> |
| | | </el-input> |
| | | </el-input> --> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | |
| | | this.codeDisabled = true; |
| | | this.getValidStr(); |
| | | this.timer = setInterval(this.getValidStr, 1000); |
| | | makeVerifyCode({ phoneNum: this.phone.phoneNum, type:0 }) |
| | | makeVerifyCode({ phoneNum: this.phone.phoneNum, type: 0 }) |
| | | .then(() => { |
| | | this.gotCode = true; |
| | | }) |
| | |
| | | |
| | | <div class="centerTitle"> |
| | | <div class="heart"> |
| | | <div class="welcome">{{ userName }},欢迎您贝思科管理中心.</div> |
| | | <div class="welcome">{{ userName }}, 欢迎您回到贝思科管理中心。</div> |
| | | <div class="time">{{ timeMsg }}</div> |
| | | </div> |
| | | </div> |
| | |
| | | .Content { |
| | | position: relative; |
| | | width: 1280px; |
| | | min-height: calc(100vh - 148px); |
| | | margin: 0 auto; |
| | | |
| | | .searchCard { |
| | |
| | | publishStatus: 1, |
| | | productType: 0, |
| | | }; |
| | | findAllCenterProduct(param) |
| | | .then((res) => { |
| | | this.data.data = res.data.list[0]; |
| | | this.showData = true; |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "查询产品失败", |
| | | duration: 2500, |
| | | offset: 57, |
| | | }); |
| | | }); |
| | | findAllCenterProduct(param).then((res) => { |
| | | this.data.data = res.data.list[0]; |
| | | this.showData = true; |
| | | }); |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item prop="password"> |
| | | <el-input show-password v-model="user.password" placeholder="密码"> |
| | | </el-input> |
| | | <PwInput show-password v-model="user.password" placeholder="密码"> |
| | | </PwInput> |
| | | </el-form-item> |
| | | <el-form-item prop="repassword"> |
| | | <el-input |
| | | show-password |
| | | v-model="user.repassword" |
| | | placeholder="确认密码" |
| | | > |
| | | </el-input> |
| | | <PwInput show-password v-model="user.repassword" placeholder="确认密码"> |
| | | </PwInput> |
| | | </el-form-item> |
| | | <el-form-item prop="phoneNum"> |
| | | <div class="phoneNum"> |
| | | <div class="phoneNum" :class="{ isFocus: phoneFocus }"> |
| | | <el-input |
| | | placeholder="手机号" |
| | | v-model="user.phoneNum" |
| | | class="input-with-select" |
| | | @focus="phoneFocus = true" |
| | | @blur="phoneFocus = false" |
| | | > |
| | | <div slot="prepend" class="teleSlot">+86(中国)</div> |
| | | </el-input> |
| | | <div slot="prepend" class="teleSlot">+86(中国)</div> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item prop="verifyCode"> |
| | |
| | | isWrong: false, |
| | | countdown: 60, |
| | | gotCode: false, |
| | | phoneFocus: false, |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | &.is-error ::v-deep .el-input__inner:focus { |
| | | border-color: #ff4b33; |
| | | } |
| | | |
| | | .PwInput { |
| | | ::v-deep .iconfont { |
| | | margin-right: 5px; |
| | | font-size: 18px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | ::v-deep .el-input__inner { |
| | | padding: 10px 20px; |
| | | border-color: #c0c5cc; |
| | | |
| | | &:focus { |
| | | border-color: #0065ff; |
| | | } |
| | | |
| | | &::-webkit-input-placeholder { |
| | | font-size: 14px; |
| | |
| | | } |
| | | |
| | | .phoneNum { |
| | | ::v-deep .el-input-group__prepend { |
| | | margin: 0 4px; |
| | | padding: 0pt; |
| | | background-color: rgba($color: #fff, $alpha: 0); |
| | | border-right: none; |
| | | border-color: #c0c5cc; |
| | | } |
| | | |
| | | position: relative; |
| | | ::v-deep .el-input__inner { |
| | | border-left: none; |
| | | padding-left: 120px; |
| | | } |
| | | |
| | | .teleSlot { |
| | | position: absolute; |
| | | top: 7px; |
| | | width: 103px; |
| | | height: 28px; |
| | | line-height: 28px; |
| | |
| | | <div class="phoneNum"> |
| | | <el-input |
| | | placeholder="请输入注册手机号" |
| | | v-model="formData.phoneNum" |
| | | v-model.trim="formData.phoneNum" |
| | | class="input-with-select" |
| | | > |
| | | </el-input> |
| | |
| | | </el-form-item> |
| | | |
| | | <el-form-item prop="password"> |
| | | <el-input |
| | | <PwInput |
| | | show-password |
| | | v-model="formData.password" |
| | | placeholder="请设置6-14位登录密码" |
| | | > |
| | | </el-input> |
| | | </PwInput> |
| | | <div class="iconfont"></div> |
| | | </el-form-item> |
| | | |
| | | <el-form-item prop="repassword"> |
| | | <el-input |
| | | <PwInput |
| | | show-password |
| | | v-model="formData.repassword" |
| | | placeholder="确认密码" |
| | | > |
| | | </el-input> |
| | | </PwInput> |
| | | <div class="iconfont"></div> |
| | | </el-form-item> |
| | | |
| | |
| | | v-model="info.type" |
| | | style="float: left; margin-top: 15px" |
| | | > |
| | | <el-radio :label="1">个人开发者</el-radio> |
| | | <el-radio :label="1">个人</el-radio> |
| | | <el-radio :label="2">公司</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | |
| | | <el-form-item label="联系人" prop="contact" v-show="info.type == '2'"> |
| | | <el-input v-model="info.contact" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="邮箱"> |
| | | <el-form-item label="邮箱" prop="email"> |
| | | <el-input |
| | | v-model="info.email" |
| | | clearable |
| | |
| | | ></el-option> |
| | | </el-select> |
| | | </p> |
| | | <p class="p-level" style="width: 18%"> |
| | | <p class="p-level" style="width: 18%; margin-right: 20px"> |
| | | <b>事件等级:</b> |
| | | <!-- <el-select |
| | | <el-select |
| | | v-model="alarmValues" |
| | | multiple |
| | | @change="searchingBtn" |
| | |
| | | :label="item.name" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> --> |
| | | </el-select> |
| | | </p> |
| | | <p class="p-date" style="width: 19%; vertical-align: top"> |
| | | <p class="p-date" style="width: 22%; vertical-align: top"> |
| | | <el-date-picker |
| | | size="mini" |
| | | v-model="searchTime" |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | <style lang="scss" > |
| | | .searching-box { |
| | | width: 100%; |
| | | height: 100% !important; |
| | |
| | | right: 0px; |
| | | bottom: 15px; |
| | | } |
| | | } |
| | | .search { |
| | | background-color: #eee; |
| | | } |
| | | </style> |
| | | <style lang="scss" scoped> |
| | |
| | | |
| | | import bus from "@/plugin/bus"; |
| | | // import TreeMenu from "@/components/treeMenu/index"; |
| | | import TreeMenu from "./giantTree/index"; |
| | | import TreeMenu from "@/components/giantTree/index"; |
| | | import LocalVedioList from "./LocalVedioList"; |
| | | import FileUpload from "./FileUpload/index"; |
| | | import XLSX from "xlsx"; |
| | |
| | | <i |
| | | class="el-icon-download jsmodern-video-download" |
| | | @click="downLoad" |
| | | style="margin: 9px 0 0 15px" |
| | | ></i> |
| | | </section> |
| | | |
| | |
| | | } |
| | | |
| | | .video-error { |
| | | text-align: center; |
| | | position: absolute; |
| | | top: 35%; |
| | | left: 30%; |
| | |
| | | "/api": { |
| | | // target: "http://192.168.20.10:7004", |
| | | target: "http://192.168.20.174:7070", |
| | | // target: "http://192.168.20.117:7080", |
| | | // secure: false, |
| | | changeOrigin: true, |
| | | }, |