refactor(vue.config.js): 清理并更新代理配置
移除未使用的TestApi代理配置,简化/json代理的目标地址,并修正平台代理的目标地址
This commit is contained in:
parent
250c5e379d
commit
0768c8b8cc
|
|
@ -157,20 +157,20 @@
|
|||
<img src="../../assets/images/toLeft.png" style="padding-top: 60%" />
|
||||
<p class="main-item-p">下行</p>
|
||||
<p style="font-size: 18px">
|
||||
{{ pileNumMap[searchForm.area].length2 }}米
|
||||
{{ pileNumMap[searchForm.area]?.length2 || 0 }}米
|
||||
</p>
|
||||
</div>
|
||||
<div style="height: calc(50% - 30px); text-align: center">
|
||||
<img src="../../assets/images/toRight.png" style="padding-top: 25%" />
|
||||
<p class="main-item-p">上行</p>
|
||||
<p style="font-size: 18px">
|
||||
{{ pileNumMap[searchForm.area].length1 }}米
|
||||
{{ pileNumMap[searchForm.area]?.length1 || 0 }}米
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div ref="scrollContainer" style="width: calc(100% - 250px); height: 670px; overflow: auto">
|
||||
<div class="device-View" :style="{
|
||||
width: `${pileNumMap[searchForm.area].width}px`,
|
||||
width: `${pileNumMap[searchForm.area]?.width || 0}px`,
|
||||
}">
|
||||
<div style="width: 100%; height: 60px">
|
||||
<div class="dot-container">
|
||||
|
|
@ -407,6 +407,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</transition>
|
||||
<!-- 预案处置弹窗 -->
|
||||
<transition name="el-zoom-in-top">
|
||||
<div class="plan-item1" v-if="warnDetailShow">
|
||||
<div style="
|
||||
|
|
@ -432,7 +433,7 @@
|
|||
">
|
||||
状态同步中
|
||||
</div>
|
||||
<div @click="warnClose()" style="
|
||||
<div @click="warnDetailClose()" style="
|
||||
float: right;
|
||||
width: 20px;
|
||||
text-align: center;
|
||||
|
|
@ -446,8 +447,7 @@
|
|||
</div>
|
||||
<!-- <el-button type="primary" @click="handleCommitPlanClick(2)" size="mini"
|
||||
style="float: right">一键发送</el-button> -->
|
||||
<el-button type="primary" @click="warningOpen()" size="mini"
|
||||
style="float: right">一键发送</el-button>
|
||||
<el-button type="primary" @click="warningOpen()" size="mini" style="float: right">一键发送</el-button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -716,8 +716,7 @@
|
|||
</div>
|
||||
<!-- <el-button type="primary" @click="handleCommitPlanClick(1)" size="mini"
|
||||
style="float: right">一键发送</el-button> -->
|
||||
<el-button type="primary" @click="warningOpen()" size="mini"
|
||||
style="float: right">一键发送</el-button>
|
||||
<el-button type="primary" @click="warningOpen()" size="mini" style="float: right">一键发送</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin: 10px 20px; border-bottom: 1px solid #4694ff33"></div>
|
||||
|
|
@ -1685,7 +1684,7 @@
|
|||
<script>
|
||||
import * as echarts from 'echarts'
|
||||
import cookies from 'js-cookie'
|
||||
var dataList = {}
|
||||
let dataList = {}
|
||||
import {
|
||||
addOrModDevice,
|
||||
iotControl,
|
||||
|
|
@ -1986,9 +1985,9 @@ export default {
|
|||
|
||||
if (topic === produceTopic) {
|
||||
// 处理指定主题下的消息
|
||||
var msgData = data.toString();
|
||||
let msgData = data.toString();
|
||||
console.log("msgData", msgData);
|
||||
var msgData1 = JSON.parse(msgData);
|
||||
let msgData1 = JSON.parse(msgData);
|
||||
console.log("msgData1", msgData1);
|
||||
this.warning(msgData1)
|
||||
// msgData.pt = msgData.Pt;
|
||||
|
|
@ -2027,10 +2026,12 @@ export default {
|
|||
warningOpen() {
|
||||
const deviceTypeList = ["11", "13", "14", "19"]
|
||||
deviceTypeList.forEach(item => {
|
||||
fireAlarm({ deviceType: item,
|
||||
fireAlarm({
|
||||
deviceType: item,
|
||||
alarmStatus: "火警",
|
||||
pileNumShow: this.warningData.PILENUMSHOW,
|
||||
direction: this.warningData.DIRECTION}).then((res) => {
|
||||
direction: this.warningData.DIRECTION
|
||||
}).then((res) => {
|
||||
console.log("res", res)
|
||||
})
|
||||
})
|
||||
|
|
@ -2054,7 +2055,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
|
||||
dateTimeFormat,
|
||||
init() {
|
||||
var that = this
|
||||
let that = this
|
||||
//sessionStorage.setItem("indexBreadcrumbList", JSON.stringify(["/control","/"]))
|
||||
setInterval(() => {
|
||||
that.nowTime = that.getNowTime()
|
||||
|
|
@ -2076,7 +2077,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.statsticWhole()
|
||||
},
|
||||
scrollClick(index) {
|
||||
var that = this
|
||||
let that = this
|
||||
if (index == 1) {
|
||||
that.$refs.scrollContainer.scrollLeft =
|
||||
that.$refs.scrollContainer.scrollLeft - 800
|
||||
|
|
@ -2086,7 +2087,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
statsticWhole() {
|
||||
var that = this
|
||||
let that = this
|
||||
statsticWhole().then((res) => {
|
||||
if (res.status == 200) {
|
||||
if (res.data.retCode == 0) {
|
||||
|
|
@ -2101,7 +2102,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
},
|
||||
tunnelClick(id) {
|
||||
var that = this
|
||||
let that = this
|
||||
/*if(that.searchForm.area == id){
|
||||
return;
|
||||
}*/
|
||||
|
|
@ -2112,19 +2113,19 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.deviceClose()
|
||||
}
|
||||
|
||||
var form = that.pileNumMap[that.searchForm.area]
|
||||
var km1 = form.left.replace('K', '').replace('+', '.')
|
||||
var km2 = form.right.replace('K', '').replace('+', '.')
|
||||
let form = that.pileNumMap[that.searchForm.area]
|
||||
let km1 = form.left.replace('K', '').replace('+', '.')
|
||||
let km2 = form.right.replace('K', '').replace('+', '.')
|
||||
console.log('form', form)
|
||||
var num = that.pileNumMap[that.searchForm.area].n
|
||||
var average = (Number(km2) - Number(km1)) / num
|
||||
let num = that.pileNumMap[that.searchForm.area].n
|
||||
let average = (Number(km2) - Number(km1)) / num
|
||||
that.pileNumList = []
|
||||
for (var i = 0; i < num; i++) {
|
||||
for (let i = 0; i < num; i++) {
|
||||
let a = (Number(km1) + i * average).toFixed(3)
|
||||
that.pileNumList.push('K' + a.replace('.', '+'))
|
||||
}
|
||||
that.pileNumList.push(form.right)
|
||||
/*var a = (Number(km1) + average).toFixed(3)
|
||||
/*let a = (Number(km1) + average).toFixed(3)
|
||||
that.pileNumList = [form.left,'K'+a.replace(".", "+"),form.right]*/
|
||||
console.log('that.pileNumList', that.pileNumList)
|
||||
that.scale = (form.width - 304) / 1000 / (Number(km2) - Number(km1))
|
||||
|
|
@ -2141,7 +2142,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
},
|
||||
loadTable() {
|
||||
var that = this
|
||||
let that = this
|
||||
deviceList1(that.searchForm).then((res) => {
|
||||
console.log(res, 'reeessss')
|
||||
if (res.status == 200) {
|
||||
|
|
@ -2174,14 +2175,14 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
},
|
||||
loadMarker() {
|
||||
var that = this
|
||||
let that = this
|
||||
that.componentsList = []
|
||||
that.componentsOldList = []
|
||||
that.deviceIdOptions = []
|
||||
that.tableData.forEach((item, index) => {
|
||||
// console.log(item, 'iiittteeemmm')
|
||||
if (item.pileNumShow) {
|
||||
var json = item
|
||||
let json = item
|
||||
let imgForm = window.config.drapLeftElMap[item.deviceType]
|
||||
if (!imgForm) {
|
||||
return
|
||||
|
|
@ -2191,7 +2192,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
item.deviceType == 13
|
||||
? imgForm['url' + item.direction]
|
||||
: imgForm.url
|
||||
var x = 0,
|
||||
let x = 0,
|
||||
y = 0
|
||||
if (item.deviceType == 13) { //车道指示灯 根据状态 展示不同方向的图片 direction 2是下行左箭头 1是上行右箭头
|
||||
console.log(item, item.direction, 'xxxxxxxxxx')
|
||||
|
|
@ -2313,7 +2314,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
// console.log(json, 'ooooooooooooooooooooooooooooooooooooooo')
|
||||
if (item.task) {
|
||||
var j = JSON.parse(item.task)
|
||||
let j = JSON.parse(item.task)
|
||||
if (item.deviceType == '11') {
|
||||
if (j.command != -1) {
|
||||
json.imgUrl = imgForm['url' + j.command]
|
||||
|
|
@ -2332,7 +2333,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
console.log(json, 'jjjjjjjjjjjjjjjjjjjjjjjjjj')
|
||||
if (j.body) {
|
||||
var b = JSON.parse(j.body)
|
||||
let b = JSON.parse(j.body)
|
||||
if (item.deviceType == '12') {
|
||||
//that.$set(that.dataForm, 'light', b.light)
|
||||
json.opacity = b.light / 100
|
||||
|
|
@ -2365,7 +2366,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
|
||||
deviceTypeClick(item) {
|
||||
console.log('pppppppppppppppppppp', item)
|
||||
var that = this
|
||||
let that = this
|
||||
that.deviceClose()
|
||||
if (item.id == '12' || item.id == '17') {
|
||||
window.open(item.url)
|
||||
|
|
@ -2382,7 +2383,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
if (res.status == 200) {
|
||||
if (res.data.retCode == 0) {
|
||||
res.data.result.forEach((item,i)=>{
|
||||
var form = {
|
||||
let form = {
|
||||
...item,
|
||||
templateHtml:that.domRender(item.textInfo),
|
||||
}
|
||||
|
|
@ -2408,7 +2409,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
loadDevice2(deviceType) {
|
||||
var that = this
|
||||
let that = this
|
||||
deviceList({
|
||||
deviceType: deviceType,
|
||||
area: that.searchForm.area,
|
||||
|
|
@ -2418,7 +2419,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
if (res.data.retCode == 0) {
|
||||
that.deviceData2 = res.data.result
|
||||
if (deviceType != '15') {
|
||||
var ids = []
|
||||
let ids = []
|
||||
that.deviceData2.forEach((item) => {
|
||||
ids.push(item.deviceId)
|
||||
})
|
||||
|
|
@ -2432,7 +2433,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
},
|
||||
typeClick(id) {
|
||||
var that = this
|
||||
let that = this
|
||||
if (that.searchForm.deviceType == id) {
|
||||
id = ''
|
||||
}
|
||||
|
|
@ -2440,24 +2441,24 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.loadTable()
|
||||
},
|
||||
handle2D() {
|
||||
var that = this
|
||||
let that = this
|
||||
that.main2DShow = true
|
||||
that.patrolShow = false
|
||||
that.deviceClose()
|
||||
},
|
||||
handle3D() {
|
||||
var that = this
|
||||
let that = this
|
||||
if (that.searchForm.area == '2') {
|
||||
that.main2DShow = false
|
||||
deviceList({ area: that.searchForm.area, editable: '2' }).then(
|
||||
(res) => {
|
||||
if (res.status == 200) {
|
||||
if (res.data.retCode == 0) {
|
||||
var data = res.data.result
|
||||
var model13 = []
|
||||
let data = res.data.result
|
||||
let model13 = []
|
||||
data.forEach((item) => {
|
||||
if (item.task) {
|
||||
var j = JSON.parse(item.task)
|
||||
let j = JSON.parse(item.task)
|
||||
if (j.command != -1) {
|
||||
if (item.deviceType == '13' && item.modelId) {
|
||||
let model13 = {}
|
||||
|
|
@ -2527,7 +2528,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
handlePatrol() {
|
||||
var that = this
|
||||
let that = this
|
||||
that.patrolShow = !that.patrolShow
|
||||
//that.setCameraRoaming(tunnelRightList)
|
||||
},
|
||||
|
|
@ -2552,8 +2553,8 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
patrolClick(val) {
|
||||
var that = this
|
||||
var params = {
|
||||
let that = this
|
||||
let params = {
|
||||
movingState: 'pause',
|
||||
}
|
||||
switch (val) {
|
||||
|
|
@ -2585,7 +2586,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
async handleLinkClient() {
|
||||
var that = this
|
||||
let that = this
|
||||
that.passrecordList = []
|
||||
const params = window.config.mapParams
|
||||
try {
|
||||
|
|
@ -2644,10 +2645,10 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
async addInfoWindow(modelId, item) {
|
||||
var that = this
|
||||
var taskName = ''
|
||||
let that = this
|
||||
let taskName = ''
|
||||
if (item.task) {
|
||||
var j = JSON.parse(item.task)
|
||||
let j = JSON.parse(item.task)
|
||||
taskName = that.filedFomatter(
|
||||
j.command,
|
||||
that.taskEnum[item.deviceType].taskList
|
||||
|
|
@ -2689,7 +2690,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
async setLaneStatusIndicator(model13) {
|
||||
var that = this
|
||||
let that = this
|
||||
try {
|
||||
let params = model13
|
||||
//成功返回
|
||||
|
|
@ -2697,7 +2698,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
} catch (e) { }
|
||||
},
|
||||
async updateTrafficSignal(phase) {
|
||||
var that = this
|
||||
let that = this
|
||||
const params = {
|
||||
effectSignalVisible: false,
|
||||
}
|
||||
|
|
@ -2720,7 +2721,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
} catch (e) { }
|
||||
},
|
||||
async updateVMSInfo(data) {
|
||||
var that = this
|
||||
let that = this
|
||||
try {
|
||||
let params = data
|
||||
let res = await window.MetaDigieeApi.VMS.updateVMSInfo(params)
|
||||
|
|
@ -2731,7 +2732,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
async setVehicleTrackState() {
|
||||
var that = this
|
||||
let that = this
|
||||
try {
|
||||
const params = {
|
||||
modelId: ['mec0'],
|
||||
|
|
@ -2762,7 +2763,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
loadData() {
|
||||
var that = this
|
||||
let that = this
|
||||
connectWebsocket(
|
||||
// 测试地址
|
||||
window.config.wsUrl,
|
||||
|
|
@ -2801,7 +2802,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
},
|
||||
handleWarnClick(index) {
|
||||
console.log(index, 'xxxxxxxxxxxxxxxxxxx')
|
||||
var that = this
|
||||
let that = this
|
||||
clearTimeout(that.statusTimer)
|
||||
that.statusTimer = null
|
||||
|
||||
|
|
@ -2832,18 +2833,18 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.warnShow = true
|
||||
},
|
||||
loadWarnList() {
|
||||
var that = this
|
||||
let that = this
|
||||
// latestWarnList().then((res) => {
|
||||
// if (res.status == 200) {
|
||||
// if (res.data.retCode == 0) {
|
||||
// that.warnList = res.data.result
|
||||
// that.statsticInfo.warn_count_todo = res.data.total
|
||||
//
|
||||
// var warnList = res.data.result
|
||||
// let warnList = res.data.result
|
||||
// that.warnMap = {}
|
||||
// var arr1 = []
|
||||
// var arr2 = []
|
||||
// var arr3 = []
|
||||
// let arr1 = []
|
||||
// let arr2 = []
|
||||
// let arr3 = []
|
||||
// warnList.forEach((item) => {
|
||||
// if (item.area == 1) {
|
||||
// arr1.push(item)
|
||||
|
|
@ -2872,11 +2873,11 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
if (that.warnList.length > 0) {
|
||||
that.warnShow = true;
|
||||
}
|
||||
var warnList = res.data.result
|
||||
let warnList = res.data.result
|
||||
that.warnMap = {}
|
||||
var arr1 = []
|
||||
var arr2 = []
|
||||
var arr3 = []
|
||||
let arr1 = []
|
||||
let arr2 = []
|
||||
let arr3 = []
|
||||
warnList.forEach(item => {
|
||||
if (item.area == 1) {
|
||||
arr1.push(item)
|
||||
|
|
@ -2911,7 +2912,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
console.log(this.textInfoList, "cscscscs");
|
||||
},
|
||||
loadWarnMarker(data) {
|
||||
var that = this
|
||||
let that = this
|
||||
that.componentsWarnList = []
|
||||
that.componentsOldWarnList = []
|
||||
that.warnIdOptions = []
|
||||
|
|
@ -2922,9 +2923,9 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
if (item.pileNumShow) {
|
||||
that.warnIdOptions.push(item.id)
|
||||
let imgForm = window.config.drapWarnElMap[item.type]
|
||||
var json = item
|
||||
let json = item
|
||||
json.imgUrl = imgForm.url
|
||||
var x = 0,
|
||||
let x = 0,
|
||||
y = 0
|
||||
|
||||
json.position = {
|
||||
|
|
@ -2970,15 +2971,18 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
)
|
||||
}, 1000)
|
||||
},
|
||||
|
||||
// 报警弹窗关闭
|
||||
warnClose() {
|
||||
that.warnShow = false
|
||||
that.warnDetailShow = false
|
||||
that.warnForm = {}
|
||||
that.warnControl = null
|
||||
this.warnShow = false
|
||||
this.warnDetailShow = false
|
||||
this.warnForm = {}
|
||||
this.warnControl = null
|
||||
// this.warnDetailClose()
|
||||
},
|
||||
|
||||
// 预案处置弹窗关闭
|
||||
warnDetailClose() {
|
||||
console.log("warnDetailClose")
|
||||
this.warnForm = {}
|
||||
this.warnControl = null
|
||||
// this.warnShow = false
|
||||
|
|
@ -2995,6 +2999,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
// this.dataForm.deviceId = this.deviceDataId.toString()
|
||||
// this.deviceStatusBatch()
|
||||
},
|
||||
|
||||
planDetailClose() {
|
||||
console.log("planDetailClose")
|
||||
this.planDetailShow = false
|
||||
|
|
@ -3012,7 +3017,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
this.planDetailClose()
|
||||
},
|
||||
warnClick(row) {
|
||||
var that = this
|
||||
let that = this
|
||||
that.warnForm = JSON.parse(JSON.stringify(row))
|
||||
if (that.warnForm.area != that.searchForm.area) {
|
||||
that.tunnelClick(that.warnForm.area)
|
||||
|
|
@ -3020,7 +3025,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.warnControl = that.warnForm
|
||||
},
|
||||
planDisposalClick(item) {
|
||||
var that = this
|
||||
let that = this
|
||||
that.warnDetailClose()
|
||||
that.planShow = true
|
||||
planList({ status: '1', area: item.area, planType: item.type }).then(
|
||||
|
|
@ -3035,8 +3040,9 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
)
|
||||
},
|
||||
// 告警弹窗点击预案处置按钮
|
||||
warnPlanClick(row) {
|
||||
var that = this
|
||||
let that = this
|
||||
// if (that.statusTimer) {
|
||||
// clearTimeout(that.statusTimer)
|
||||
// that.statusTimer = null
|
||||
|
|
@ -3066,21 +3072,13 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
).then((res) => {
|
||||
that.loading = false
|
||||
if (res.status == 200) {
|
||||
// if (res.data.retCode == 0) {
|
||||
|
||||
// that.planDetailMap = {
|
||||
// 11: [],
|
||||
// 13: [],
|
||||
// 14: [],
|
||||
//
|
||||
// 19: [],
|
||||
// }
|
||||
var km1 = that.planForm.PILENUMSHOW.replace('K', '').replace('+', '.')
|
||||
let km1 = that.planForm.PILENUMSHOW.replace('K', '').replace('+', '.')
|
||||
res.data.data.forEach((item) => {
|
||||
const deviceType = item.deviceType;
|
||||
if (this.planDetailMap.hasOwnProperty(deviceType)) {
|
||||
var km2 = item.pileNumShow.replace('K', '').replace('+', '.')
|
||||
var obj = {
|
||||
let km2 = item.pileNumShow.replace('K', '').replace('+', '.')
|
||||
let obj = {
|
||||
id: item.deviceId,
|
||||
pileNumShow: item.pileNumShow,
|
||||
deviceType: item.deviceType,
|
||||
|
|
@ -3142,19 +3140,19 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.main2DShow = true
|
||||
that.deviceClose()
|
||||
}
|
||||
var form = that.pileNumMap[that.searchForm.area]
|
||||
var km1 = form.left.replace('K', '').replace('+', '.')
|
||||
var km2 = form.right.replace('K', '').replace('+', '.')
|
||||
let form = that.pileNumMap[that.searchForm.area]
|
||||
km1 = form.left.replace('K', '').replace('+', '.')
|
||||
let km2 = form.right.replace('K', '').replace('+', '.')
|
||||
console.log('form', form)
|
||||
var num = that.pileNumMap[that.searchForm.area].n
|
||||
var average = (Number(km2) - Number(km1)) / num
|
||||
let num = that.pileNumMap[that.searchForm.area].n
|
||||
let average = (Number(km2) - Number(km1)) / num
|
||||
that.pileNumList = []
|
||||
for (var i = 0; i < num; i++) {
|
||||
for (let i = 0; i < num; i++) {
|
||||
let a = (Number(km1) + i * average).toFixed(3)
|
||||
that.pileNumList.push('K' + a.replace('.', '+'))
|
||||
}
|
||||
that.pileNumList.push(form.right)
|
||||
/*var a = (Number(km1) + average).toFixed(3)
|
||||
/*let a = (Number(km1) + average).toFixed(3)
|
||||
that.pileNumList = [form.left,'K'+a.replace(".", "+"),form.right]*/
|
||||
console.log('that.pileNumList', that.pileNumList)
|
||||
that.scale = (form.width - 304) / 1000 / (Number(km2) - Number(km1))
|
||||
|
|
@ -3186,11 +3184,11 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
// })
|
||||
},
|
||||
handleCommitPlanClick(index) {
|
||||
var that = this
|
||||
let that = this
|
||||
console.log(index, that.planForm, ' ///////////////////')
|
||||
var json = {}
|
||||
let json = {}
|
||||
// if (that.deviceIds15.length > 0) {
|
||||
// var obj = {
|
||||
// let obj = {
|
||||
// deviceType: '15',
|
||||
// command: '15_01',
|
||||
// deviceId: that.deviceIds15.toString(),
|
||||
|
|
@ -3198,7 +3196,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
// textInfoList: [{ id: that.templateObj, fillInfo: '' }],
|
||||
// }),
|
||||
// }
|
||||
// var url = '/json/iot/iotControlBatch'
|
||||
// let url = '/json/iot/iotControlBatch'
|
||||
// iotControl(obj, url).then((res) => { })
|
||||
// }
|
||||
if (index == 2) {
|
||||
|
|
@ -3278,14 +3276,14 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
}
|
||||
if (that.mediaObj.id) {
|
||||
var extens = []
|
||||
let extens = []
|
||||
getEmployeeList().then((res) => {
|
||||
if (res.status == 200) {
|
||||
if (res.data.code == 200) {
|
||||
res.data.data.employeeList.forEach((item) => {
|
||||
extens.push(item.exten)
|
||||
})
|
||||
var obj = {
|
||||
let obj = {
|
||||
name: that.mediaObj.name,
|
||||
extenNums: extens.toString(),
|
||||
AudioSourceType: that.mediaObj.type,
|
||||
|
|
@ -3312,7 +3310,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
planClick(row) {
|
||||
var that = this
|
||||
let that = this
|
||||
that.dataForm = {}
|
||||
that.planLoading = false
|
||||
that.planSuccess = false
|
||||
|
|
@ -3327,7 +3325,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
planDetail({ planId: row.planId }).then((res) => {
|
||||
if (res.status == 200) {
|
||||
if (res.data.retCode == 0) {
|
||||
var p = JSON.parse(res.data.result.plan)
|
||||
let p = JSON.parse(res.data.result.plan)
|
||||
for (let key in p) {
|
||||
that.planDetailData.push({
|
||||
type: key,
|
||||
|
|
@ -3344,7 +3342,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
},
|
||||
// verifyClick(row) {
|
||||
// var that = this
|
||||
// let that = this
|
||||
// that
|
||||
// .$confirm('已确认?', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
|
|
@ -3369,8 +3367,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
// })
|
||||
// },
|
||||
verifyClick(row) {
|
||||
var that = this
|
||||
.$confirm('已确认?', '提示', {
|
||||
this.$confirm('已确认?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning',
|
||||
|
|
@ -3387,21 +3384,22 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
// }
|
||||
// }
|
||||
// })
|
||||
that.warnShow = false
|
||||
|
||||
this.warnShow = false
|
||||
this.warnDetailShow = false
|
||||
})
|
||||
.catch(() => {
|
||||
that.$message.info('已取消删除')
|
||||
that.warnShow = false
|
||||
this.$message.info('已取消删除')
|
||||
this.warnShow = false
|
||||
this.warnDetailShow = false
|
||||
})
|
||||
},
|
||||
handleDeviceRunClick() {
|
||||
var that = this
|
||||
let that = this
|
||||
that.loadDevice()
|
||||
that.deviceRunShow = true
|
||||
},
|
||||
loadDevice() {
|
||||
var that = this
|
||||
let that = this
|
||||
deviceList({
|
||||
deviceType: that.deviceType,
|
||||
area: that.searchForm.area,
|
||||
|
|
@ -3417,12 +3415,12 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
},
|
||||
deviceRunClick(row) {
|
||||
var that = this
|
||||
let that = this
|
||||
|
||||
that.curControl = row
|
||||
},
|
||||
async handleClick(row, i) {
|
||||
var that = this
|
||||
let that = this
|
||||
if (row.deviceType == '55' || row.deviceType == '56') {
|
||||
return ''
|
||||
}
|
||||
|
|
@ -3449,7 +3447,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
if (that.dataForm.deviceType == '15') {
|
||||
console.log("that.dataFormBody", that.dataFormBody)
|
||||
if (that.dataForm.task) {
|
||||
var j = JSON.parse(that.dataForm.task)
|
||||
let j = JSON.parse(that.dataForm.task)
|
||||
console.log("j.dataFormBody", j.dataFormBody)
|
||||
that.$set(that.dataForm, 'taskName', j.command)
|
||||
if (j.body) {
|
||||
|
|
@ -3478,13 +3476,13 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.dataForm.deviceType == '42'
|
||||
) {
|
||||
that.$set(that.dataForm, 'iotKeys', [])
|
||||
var arr = that.dataForm.iotKey.split('|')
|
||||
let arr = that.dataForm.iotKey.split('|')
|
||||
arr.forEach((item) => {
|
||||
var arr1 = item.split(':')
|
||||
var name = window.config.pumpMap[arr1[0]]
|
||||
var arr2 = arr1[1].split(',')
|
||||
let arr1 = item.split(':')
|
||||
let name = window.config.pumpMap[arr1[0]]
|
||||
let arr2 = arr1[1].split(',')
|
||||
arr2.forEach((item2, i) => {
|
||||
var json = {}
|
||||
let json = {}
|
||||
if (arr1[0] == 'ps' || arr1[0] == 'hs') {
|
||||
json.show = false
|
||||
} else {
|
||||
|
|
@ -3652,13 +3650,13 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
},
|
||||
/*initTimer(){
|
||||
var that = this
|
||||
let that = this
|
||||
that.statusTimer = setInterval(_ => {
|
||||
that.deviceStatus()
|
||||
}, 2000)
|
||||
},*/
|
||||
deviceClose() {
|
||||
var that = this
|
||||
let that = this
|
||||
console.log('clear')
|
||||
if (that.statusTimer) {
|
||||
clearTimeout(that.statusTimer)
|
||||
|
|
@ -3672,7 +3670,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.deviceStatusBatch()
|
||||
},
|
||||
deviceStatus() {
|
||||
var that = this
|
||||
let that = this
|
||||
deviceStatus({
|
||||
deviceId: that.dataForm.deviceId,
|
||||
deviceType: that.dataForm.deviceType,
|
||||
|
|
@ -3683,7 +3681,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
|
||||
if (res.data.result.task) {
|
||||
that.$set(that.dataForm, 'task', res.data.result.task)
|
||||
var j = JSON.parse(that.dataForm.task)
|
||||
let j = JSON.parse(that.dataForm.task)
|
||||
|
||||
that.$set(that.dataForm, 'taskName', j.command)
|
||||
|
||||
|
|
@ -3723,10 +3721,10 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
const [name, values] = item.split(':')
|
||||
const name1 = window.config.pumpMap[name]
|
||||
const [name2, values2] = str2[i].split(':')
|
||||
var arr = values.split(',')
|
||||
var arr2 = values2.split(',')
|
||||
let arr = values.split(',')
|
||||
let arr2 = values2.split(',')
|
||||
|
||||
var arr3 = []
|
||||
let arr3 = []
|
||||
|
||||
arr.forEach((item2, i2) => {
|
||||
if (name == 'ps' || name == 'hs') {
|
||||
|
|
@ -3789,7 +3787,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
},
|
||||
deviceStatusBatch(index) {
|
||||
var that = this
|
||||
let that = this
|
||||
deviceStatusBatch({
|
||||
deviceId: that.dataForm.deviceId,
|
||||
deviceType: that.dataForm.deviceType,
|
||||
|
|
@ -3805,7 +3803,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
|
||||
if (item.task) {
|
||||
that.$set(that.dataForm, 'task', item.task)
|
||||
var j = JSON.parse(item.task)
|
||||
let j = JSON.parse(item.task)
|
||||
|
||||
if (index == 2) {
|
||||
that.planDeviceType.forEach((p1) => {
|
||||
|
|
@ -3894,7 +3892,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
},
|
||||
loadinfoBoardTemplate(index, list, modelId) {
|
||||
console.log("index", index)
|
||||
var that = this
|
||||
let that = this
|
||||
getProgramTree({ name: this.filterText }).then((res) => {
|
||||
console.log("this.treeData", res.data.data)
|
||||
console.log("res.code", res.data.code)
|
||||
|
|
@ -3927,7 +3925,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
this.infoBoardTemplateList = newArray
|
||||
// res.data.data.forEach((item, i) => {
|
||||
//
|
||||
// var form = {
|
||||
// let form = {
|
||||
// ...item,
|
||||
// templateHtml: that.domRender(item.textInfo),
|
||||
// }
|
||||
|
|
@ -3945,17 +3943,17 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
res.data.result.forEach((item, i) => {
|
||||
list.forEach((item1) => {
|
||||
if (item.id == item1.id) {
|
||||
var str = that.domRender(
|
||||
let str = that.domRender(
|
||||
item.textInfo,
|
||||
item1.fillInfo,
|
||||
item.id,
|
||||
1
|
||||
)
|
||||
var html = ''
|
||||
var backColor = ''
|
||||
var fontColor = ''
|
||||
var fontFormat = ''
|
||||
var fontFormatUpDown = ''
|
||||
let html = ''
|
||||
let backColor = ''
|
||||
let fontColor = ''
|
||||
let fontFormat = ''
|
||||
let fontFormatUpDown = ''
|
||||
let fontSize = item.fontSize.split('*')[0]
|
||||
switch (item.backColor) {
|
||||
case '红色':
|
||||
|
|
@ -4033,13 +4031,13 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
res.data.result.forEach((item, i) => {
|
||||
list.forEach((item1) => {
|
||||
if (item.id == item1.id) {
|
||||
var str = that.domRender(
|
||||
let str = that.domRender(
|
||||
item.textInfo,
|
||||
item1.fillInfo,
|
||||
item.id,
|
||||
1
|
||||
)
|
||||
var fontColor = ''
|
||||
let fontColor = ''
|
||||
let fontSize = Number(item.fontSize.split('*')[0])
|
||||
switch (item.fontColor) {
|
||||
case '红色':
|
||||
|
|
@ -4080,7 +4078,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
} else {
|
||||
// that.infoBoardTemplateList = []
|
||||
// res.data.result.forEach((item, i) => {
|
||||
// var form = {
|
||||
// let form = {
|
||||
// ...item,
|
||||
// templateHtml: that.domRender(item.textInfo),
|
||||
// }
|
||||
|
|
@ -4094,7 +4092,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
})
|
||||
},
|
||||
templateDisplay(index, m) {
|
||||
var that = this
|
||||
let that = this
|
||||
if (m == 3) {
|
||||
that.updateVMSInfo(that.templateHtmlList[index])
|
||||
} else {
|
||||
|
|
@ -4137,15 +4135,15 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
console.log(this.tempMap, 'this.tempMap')
|
||||
},
|
||||
handleCommitClick(index) {
|
||||
var that = this
|
||||
var url = ''
|
||||
let that = this
|
||||
let url = ''
|
||||
that.deviceLoading = true
|
||||
/*if(that.statusTimer){
|
||||
clearTimeout(that.statusTimer)
|
||||
that.statusTimer = null
|
||||
}*/
|
||||
console.log(that.dataForm.command, 'cccccccccccccc')
|
||||
var json = {
|
||||
let json = {
|
||||
//deviceId: that.dataForm.deviceId,
|
||||
deviceType: that.dataForm.deviceType,
|
||||
command: that.dataForm.command,
|
||||
|
|
@ -4155,7 +4153,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
console.log('111')
|
||||
//批量控制
|
||||
if (that.multipleSelection.length > 0) {
|
||||
var deviceIds = []
|
||||
let deviceIds = []
|
||||
that.multipleSelection.forEach((item) => {
|
||||
deviceIds.push(item.deviceId)
|
||||
})
|
||||
|
|
@ -4176,16 +4174,16 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
json.body = JSON.stringify(that.dataFormBody)
|
||||
} else if (that.dataForm.deviceType == '15') {
|
||||
json.command = '15_01'
|
||||
var ids = Object.keys(this.tempMap)
|
||||
var arr = []
|
||||
let ids = Object.keys(this.tempMap)
|
||||
let arr = []
|
||||
that.textInfoList.forEach((item1) => {
|
||||
var a = {
|
||||
let a = {
|
||||
id: item1,
|
||||
fillInfo: '',
|
||||
}
|
||||
ids.forEach((item) => {
|
||||
if (item == item1) {
|
||||
var fillInfos = Object.values(this.tempMap[item])
|
||||
let fillInfos = Object.values(this.tempMap[item])
|
||||
a.fillInfo = fillInfos.join(';')
|
||||
}
|
||||
})
|
||||
|
|
@ -4401,7 +4399,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
that.dataForm.status = res.data.result.status
|
||||
that.dataForm.task = res.data.result.task
|
||||
if (that.dataForm.task) {
|
||||
var j = JSON.parse(that.dataForm.task)
|
||||
let j = JSON.parse(that.dataForm.task)
|
||||
that.$set(that.dataForm, 'taskName', j.command)
|
||||
//that.$set(that.dataForm,'command',j.command)
|
||||
|
||||
|
|
@ -4441,10 +4439,10 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
const [name, values] = item.split(':')
|
||||
const name1 = window.config.pumpMap[name]
|
||||
const [name2, values2] = str2[i].split(':')
|
||||
var arr = values.split(',')
|
||||
var arr2 = values2.split(',')
|
||||
let arr = values.split(',')
|
||||
let arr2 = values2.split(',')
|
||||
|
||||
var arr3 = []
|
||||
let arr3 = []
|
||||
|
||||
arr.forEach((item2, i2) => {
|
||||
if (name == 'ps' || name == 'hs') {
|
||||
|
|
@ -4472,7 +4470,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
}
|
||||
|
||||
if (j.body) {
|
||||
var b = JSON.parse(j.body)
|
||||
let b = JSON.parse(j.body)
|
||||
if (that.dataForm.deviceType == '12') {
|
||||
that.$set(that.dataForm, 'light', b.light)
|
||||
} else if (that.dataForm.deviceType == '15') {
|
||||
|
|
@ -4518,7 +4516,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
},
|
||||
// 点击画布的时候, 取消选择组件
|
||||
laryerMouseDown() {
|
||||
var that = this
|
||||
let that = this
|
||||
that.curControl = null
|
||||
},
|
||||
distanceFromNine(num) {
|
||||
|
|
@ -4534,9 +4532,9 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
return distance
|
||||
},
|
||||
liuliangLine(data) {
|
||||
var that = this
|
||||
var myChart1 = echarts.init(document.getElementById('liuliangLineId'))
|
||||
var sdata = []
|
||||
let that = this
|
||||
let myChart1 = echarts.init(document.getElementById('liuliangLineId'))
|
||||
let sdata = []
|
||||
data.x.forEach((item) => {
|
||||
sdata.push(item.substring(6, 8) + '日' + item.substring(8, 10) + '时')
|
||||
})
|
||||
|
|
@ -4719,7 +4717,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
? '0' + new Date().getSeconds()
|
||||
: new Date().getSeconds()
|
||||
|
||||
var days = new Date().getDay()
|
||||
let days = new Date().getDay()
|
||||
switch (days) {
|
||||
case 1:
|
||||
days = '星期一'
|
||||
|
|
@ -4753,15 +4751,15 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
return item ? item.name : value
|
||||
},
|
||||
domRender(str, fillInfo, id, index) {
|
||||
var that = this
|
||||
let that = this
|
||||
let strData = str
|
||||
//var reg = /\{.*?\}/g
|
||||
//let reg = /\{.*?\}/g
|
||||
let charCount = str.split('{}').length - 1
|
||||
var arr = []
|
||||
let arr = []
|
||||
if (fillInfo) {
|
||||
arr = fillInfo.split(';')
|
||||
}
|
||||
for (var i = 0; i < charCount; i++) {
|
||||
for (let i = 0; i < charCount; i++) {
|
||||
if (arr.length > 0) {
|
||||
if (index) {
|
||||
strData = strData.replace('{}', arr[i])
|
||||
|
|
@ -4790,7 +4788,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
var that = this
|
||||
let that = this
|
||||
if (that.warnTimer) {
|
||||
clearInterval(that.warnTimer)
|
||||
that.warnTimer = null
|
||||
|
|
@ -5139,6 +5137,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
border-radius: 15px;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.plan-item1 {
|
||||
width: 480px;
|
||||
height: 683px;
|
||||
|
|
@ -5151,6 +5150,7 @@ const deviceTypeList = ["11","13","14","19"]
|
|||
border-radius: 15px;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.control-item {
|
||||
width: 380px;
|
||||
height: 683px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue