diff --git a/ruoyi-ui/src/api/business/alarmRule.js b/ruoyi-ui/src/api/business/alarmRule.js index e6108c2..cfa990c 100644 --- a/ruoyi-ui/src/api/business/alarmRule.js +++ b/ruoyi-ui/src/api/business/alarmRule.js @@ -83,3 +83,11 @@ export function getModeFunctionParametersByModeFunctionId(modeFunctionId) { }) } +export function getDeviceByModel(data) { + return request({ + url: '/business/device/getDeviceByModel', + method: 'get', + params:data + }) +} + diff --git a/ruoyi-ui/src/layout/boardIndex.vue b/ruoyi-ui/src/layout/boardIndex.vue index 1026848..59174d1 100644 --- a/ruoyi-ui/src/layout/boardIndex.vue +++ b/ruoyi-ui/src/layout/boardIndex.vue @@ -1,6 +1,6 @@ @@ -291,8 +293,6 @@ export default { } .table { - - /deep/ .el-table { background-color: #0000; } @@ -322,4 +322,12 @@ export default { width: 6.5vw; overflow: hidden; } +/deep/ .el-dialog:not(.is-fullscreen) { + margin-top: 1vh !important; +} +.dialog{ + .container{ + height: 86vh; + } +} diff --git a/ruoyi-ui/src/views/board/index/index.vue b/ruoyi-ui/src/views/board/index/index.vue index da99adf..56f0a52 100644 --- a/ruoyi-ui/src/views/board/index/index.vue +++ b/ruoyi-ui/src/views/board/index/index.vue @@ -120,7 +120,10 @@ {{ item.no }}
- {{ item.type }} + {{ item.alarmInfoType === '1' ? '设备报警' : '' }} + {{ item.alarmInfoType === '2' ? '监控单元报警' : '' }} + {{ item.alarmInfoType === '3' ? '离线报警' : '' }} + {{ item.alarmInfoType === '4' ? '电子围栏' : '' }}
{{ item.location }} @@ -136,14 +139,15 @@
- 导出告警信息 + 导出告警信息
@@ -389,6 +393,9 @@ let polygons = [] let circles = [] const vw = (document.documentElement.clientWidth || document.body.clientWidth) / 100 +let time1 = null +let time2 = null + const isJSON = (str) => { try { JSON.parse(str); @@ -478,7 +485,8 @@ export default { y: "center", width: '100px', textStyle: { - color: '#fff' + color: '#fff', + fontSize: 0.6 * vw } }, tooltip: { @@ -489,7 +497,7 @@ export default { { type: "pie", radius: ["45%", "76%"], - center: ["35%", "50%"], + center: ["25%", "50%"], encode: { itemName: "group", value: "占比", @@ -507,7 +515,7 @@ export default { { type: "pie", radius: ["75%", "90%"], - center: ["35%", "50%"], + center: ["25%", "50%"], encode: { itemName: "group", value: "占比", @@ -575,9 +583,9 @@ export default { // let data = await axios.get(`http://124.223.15.102:3333/componentLib/getMap?id=${this.code}`) let {msg} = await getMapData({areaCode: this.code}) let data - if(isJSON(msg)){ + if (isJSON(msg)) { data = JSON.parse(msg) - }else{ + } else { data = '' } let mapData = this.code === 100000 ? ChinaMapData : data @@ -952,9 +960,9 @@ export default { // let data = await axios.get(`http://124.223.15.102:3333/componentLib/getMap?id=${this.code}`) let {msg} = await getMapData({areaCode: this.code}) let data - if(isJSON(msg)){ + if (isJSON(msg)) { data = JSON.parse(msg) - }else{ + } else { data = '' } mapData = this.cityJson[params.dataIndex].properties.adcode === 100000 ? ChinaMapData : data @@ -997,9 +1005,9 @@ export default { let {msg} = await getMapData({areaCode: this.code}) let data - if(isJSON(msg)){ + if (isJSON(msg)) { data = JSON.parse(msg) - }else{ + } else { data = '' } mapData = this.code === 100000 ? ChinaMapData : data @@ -1030,12 +1038,12 @@ export default {
` }); - marker.on('click', async () => { - if (markerIds.includes(e.deviceId)) { - return - } else { - markerIds.push(e.deviceId) - } + marker.on('rightclick', async () => { + // if (markerIds.includes(e.deviceId)) { + // return + // } else { + // markerIds.push(e.deviceId) + // } const {data} = await selectMonitorElectronic(e.deviceId) data.map(e => e.hwFenceAreaList).flat(1).forEach(e => { if (e.areaShapeFlag === '1') { @@ -1065,12 +1073,12 @@ export default {
` }); - marker.on('click', async () => { - if (markerIds.includes(e.deviceId)) { - return - } else { - markerIds.push(e.deviceId) - } + marker.on('rightclick', async () => { + // if (markerIds.includes(e.deviceId)) { + // return + // } else { + // markerIds.push(e.deviceId) + // } const {data} = await selectMonitorElectronic(e.deviceId) data.map(e => e.hwFenceAreaList).flat(1).forEach(e => { if (e.areaShapeFlag === '1') { @@ -1091,18 +1099,31 @@ export default { map.add(marker); markers.push(marker) }, - setMarker2(e) { + setMarker2(e, bl) { + if (!bl) { + if (time1) { + clearInterval(time1) + } + time1 = null + time1 = setInterval(() => { + this.setMarker2(e, true) + }, 5000) + } map.remove(markers) map.remove(polygons) map.remove(circles) markers = [] e.forEach(v => { + console.log(v) + console.log(this.options) let arr = this.options.filter(r => r.value.deviceId === v) || [] if (arr.length > 0) { this.setMarker1(arr[0].value) } }) - map.setFitView(markers) + if(!bl){ + map.setFitView(markers) + } }, getDeviceInfo() { this.$router.push({path: '/board/equipment', query: {monitorUnitId: this.monitorUnitId}}) @@ -1159,16 +1180,24 @@ export default { }) map.setFitView(markers) }, - async searchMap1(name) { + async searchMap1(name, e) { + // if(!e){ + if (time2) { + clearInterval(time2) + } + time2 = null + time2 = setInterval(async () => { + const {data} = await selectDeviceByName({name: name}) + this.markerData = data + }, 5000) + // } + const {data} = await selectDeviceByName({name: name}) this.value = [] map.remove(markers) map.remove(polygons) map.remove(circles) markers = [] this.loading = true; - const {data} = await selectDeviceByName({name: name}) - this.markerData = data - console.log(data) this.loading = false; let option = [] data.forEach(e => { @@ -1260,7 +1289,16 @@ export default { padding: 0 12px; position: absolute; top: 17%; - left: 15%; + right: 76.3%; + font-size: 0.8vw; + + p { + display: block; + max-width: 10vw; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } } .chart1Table { @@ -1341,7 +1379,7 @@ export default { .exTable { position: absolute; - top: 46%; + bottom: 50%; left: 76.3%; width: 21%; /*transform: translateX(-50%);*/ diff --git a/ruoyi-ui/src/views/board/senso/index.vue b/ruoyi-ui/src/views/board/senso/index.vue index a2f4c3e..179a212 100644 --- a/ruoyi-ui/src/views/board/senso/index.vue +++ b/ruoyi-ui/src/views/board/senso/index.vue @@ -551,15 +551,14 @@ export default { position: relative; color: #1fabf3; font-size: 1.5vh; - height: 100%; + width: 50%; + height: 50%; white-space: nowrap; display: inline-block; - height: 100%; - margin-right: 12px; vertical-align: top; .info1 { - position: relative; + display: inline-block; line-height: 8.5vh; color: #fffc; font-size: 15px; @@ -568,7 +567,7 @@ export default { } .info2 { - position: relative; + display: inline-block; line-height: 8.5vh; color: #fff } @@ -584,5 +583,6 @@ export default { position: absolute; left: 60vh; height: 100%; + width: 33%; } diff --git a/ruoyi-ui/src/views/business/alarmRule/index.vue b/ruoyi-ui/src/views/business/alarmRule/index.vue index 463d6fa..b80cb2f 100644 --- a/ruoyi-ui/src/views/business/alarmRule/index.vue +++ b/ruoyi-ui/src/views/business/alarmRule/index.vue @@ -22,7 +22,7 @@ - + - - + + + + + + + + + + + + + - - - + + - - - + + + - - - - - - + + - - - - - - - - - - - - - - - - - - - - + + + @@ -285,20 +274,15 @@ - - - - - - - - - - - - - + + + + + + " + + + + + + + + + + + + @@ -461,8 +457,17 @@ diff --git a/ruoyi-ui/src/views/business/monitorUnit/index.vue b/ruoyi-ui/src/views/business/monitorUnit/index.vue index 9a2dcfb..288c81b 100644 --- a/ruoyi-ui/src/views/business/monitorUnit/index.vue +++ b/ruoyi-ui/src/views/business/monitorUnit/index.vue @@ -112,7 +112,7 @@ - + - + +
只能上传jpg/png文件,且不超过500kb
diff --git a/ruoyi-ui/src/views/business/monitorUnitType/index.vue b/ruoyi-ui/src/views/business/monitorUnitType/index.vue index 7ae1fbb..e98a7d3 100644 --- a/ruoyi-ui/src/views/business/monitorUnitType/index.vue +++ b/ruoyi-ui/src/views/business/monitorUnitType/index.vue @@ -9,7 +9,7 @@ @keyup.enter.native="handleQuery" />
- + - + @@ -118,7 +118,7 @@ - + - + - + - + @@ -171,7 +171,7 @@ - + - + - + @@ -227,6 +227,7 @@ :class="{hide: this.fileList.length >= 1}" > +
只能上传jpg/png文件,且不超过500kb
@@ -311,7 +312,7 @@ export default { open: false, sceneModes: [], tenants: [], - editedDisable: true, + editedDisable: false, confirmDisabled: false, // 查询参数 queryParams: { @@ -345,9 +346,9 @@ export default { sceneModeId: [ {required: true, message: "场景类型不能为空", trigger: "change"} ], - defaultFlag: [ - {required: true, message: "默认标识不能为空", trigger: "change"} - ], + // defaultFlag: [ + // {required: true, message: "默认标识不能为空", trigger: "change"} + // ], authMode: [ {required: true, message: "认证方式不能为空", trigger: "change"} ], @@ -453,7 +454,7 @@ export default { /** 修改按钮操作 */ handleUpdate(row) { this.reset(); - this.editedDisable = true; + // this.editedDisable = true; this.confirmDisabled = false; const sceneId = row.sceneId || this.ids getScene(sceneId).then(response => { diff --git a/ruoyi-ui/src/views/system/dict/index.vue b/ruoyi-ui/src/views/system/dict/index.vue index 6ca5457..b6ed788 100644 --- a/ruoyi-ui/src/views/system/dict/index.vue +++ b/ruoyi-ui/src/views/system/dict/index.vue @@ -344,4 +344,4 @@ export default { } } }; - \ No newline at end of file + diff --git a/ruoyi-ui/src/views/system/role/index.vue b/ruoyi-ui/src/views/system/role/index.vue index 9cb1be5..f4c418a 100644 --- a/ruoyi-ui/src/views/system/role/index.vue +++ b/ruoyi-ui/src/views/system/role/index.vue @@ -10,7 +10,16 @@ @keyup.enter.native="handleQuery" />
- + + + + - + @@ -160,7 +169,17 @@ - + + + + + + @@ -216,7 +235,7 @@ - + @@ -267,6 +286,7 @@ import { deptTreeSelect } from "@/api/system/role"; import {treeselect as menuTreeselect, roleMenuTreeselect} from "@/api/system/menu"; +import {getTenants} from "@/api/system/user"; export default { name: "Role", @@ -287,6 +307,8 @@ export default { total: 0, // 角色表格数据 roleList: [], + //租户列表 + tenants: [], // 弹出层标题 title: "", // 是否显示弹出层 @@ -335,7 +357,9 @@ export default { status: undefined }, // 表单参数 - form: {}, + form: { + roleKey:'iot' + }, defaultProps: { children: "children", label: "label" @@ -345,9 +369,12 @@ export default { roleName: [ {required: true, message: "角色名称不能为空", trigger: "blur"} ], - roleKey: [ - {required: true, message: "权限字符不能为空", trigger: "blur"} + tenantId:[ + {required: true, message: "所属租户不能为空", trigger: "blur"} ], + // roleKey: [ + // {required: true, message: "权限字符不能为空", trigger: "blur"} + // ], roleSort: [ {required: true, message: "角色顺序不能为空", trigger: "blur"} ] @@ -356,9 +383,18 @@ export default { }; }, created() { + this.getTenants(); this.getList(); }, methods: { + /** 获取租户信息列表 */ + getTenants() { + getTenants().then(response => { + if (response.data !== undefined) { + this.tenants = response.data; + } + }); + }, /** 查询角色列表 */ getList() { this.loading = true; @@ -440,7 +476,7 @@ export default { this.form = { roleId: undefined, roleName: undefined, - roleKey: undefined, + roleKey: "iot", roleSort: 0, status: "0", menuIds: [],