ISCS设备登录调整&&广播系统调整

This commit is contained in:
fan 2022-09-21 13:15:14 +08:00
parent 572643f80a
commit d3a06586ba
6 changed files with 148 additions and 46 deletions

View File

@ -24,8 +24,8 @@ export function handlerUrl(data) {
if (process.env.NODE_ENV === 'development') {
// const data = null;
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'http://192.168.3.233/rtss-server';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.233/rtss-server';
// BASE_API = 'http://114.116.51.125/jlcloud';
// BASE_API = 'http://192.168.3.90:9100'; // 周寅
// BASE_API = 'http://192.168.3.94:9000'; // 旭强

View File

@ -62,12 +62,42 @@
</el-row>
<el-row>
<el-col :span="5"><div class="broadcast-atc-button">ATC广播</div></el-col>
<el-col :span="3"><div v-if="checkHasDevice('LCD')" class="broadcast-use-button" :style="{color: enableAreaList.includes('LCD')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('LCD')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div v-if="checkHasDevice('UP_STAND')" class="broadcast-use-button" :style="{color: enableAreaList.includes('UP_STAND')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('UP_STAND')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div v-if="checkHasDevice('DOWN_STAND')" class="broadcast-use-button" :style="{color: enableAreaList.includes('DOWN_STAND')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('DOWN_STAND')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div v-if="checkHasDevice('ADMINISTRATIVE_AREA')" class="broadcast-use-button" :style="{color: enableAreaList.includes('ADMINISTRATIVE_AREA')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('ADMINISTRATIVE_AREA')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div v-if="checkHasDevice('GATE')" class="broadcast-use-button" :style="{color: enableAreaList.includes('GATE')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('GATE')? '启用':'未启用' }}</div></el-col>
<el-col :span="3"><div v-if="checkHasDevice('TRANSFER_CHANNEL')" class="broadcast-use-button" :style="{color: enableAreaList.includes('TRANSFER_CHANNEL')? '#2EFF74':'#CDCDCD'}">{{ this.enableAreaList.includes('TRANSFER_CHANNEL')? '启用':'未启用' }}</div></el-col>
<el-col :span="3">
<div v-if="checkHasDevice('LCD')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('LCD')? '#2EFF74':'#CDCDCD'}">
{{ this.atcBroadcast.includes('LCD')? '启用':'未启用' }}
</div>
<div v-else style="width: 10px;height: 10px;" />
</el-col>
<el-col :span="3">
<div v-if="checkHasDevice('UP_STAND')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('UP_STAND')? '#2EFF74':'#CDCDCD'}">
{{ this.atcBroadcast.includes('UP_STAND')? '启用':'未启用' }}
</div>
<div v-else style="width: 10px;height: 10px;" />
</el-col>
<el-col :span="3">
<div v-if="checkHasDevice('DOWN_STAND')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('DOWN_STAND')? '#2EFF74':'#CDCDCD'}">
{{ this.atcBroadcast.includes('DOWN_STAND')? '启用':'未启用' }}
</div>
<div v-else style="width: 10px;height: 10px;" />
</el-col>
<el-col :span="3">
<div v-if="checkHasDevice('ADMINISTRATIVE_AREA')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('ADMINISTRATIVE_AREA')? '#2EFF74':'#CDCDCD'}">
{{ this.atcBroadcast.includes('ADMINISTRATIVE_AREA')? '启用':'未启用' }}
</div>
<div v-else style="width: 10px;height: 10px;" />
</el-col>
<el-col :span="3">
<div v-if="checkHasDevice('GATE')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('GATE')? '#2EFF74':'#CDCDCD'}">
{{ this.atcBroadcast.includes('GATE')? '启用':'未启用' }}
</div>
<div v-else style="width: 10px;height: 10px;" />
</el-col>
<el-col :span="3">
<div v-if="checkHasDevice('TRANSFER_CHANNEL')" class="broadcast-use-button" :style="{color: atcBroadcast.includes('TRANSFER_CHANNEL')? '#2EFF74':'#CDCDCD'}">
{{ this.atcBroadcast.includes('TRANSFER_CHANNEL')? '启用':'未启用' }}
</div>
<div v-else style="width: 10px;height: 10px;" />
</el-col>
</el-row>
</div>
<div class="pre-taped-broadcast">
@ -200,8 +230,8 @@
<el-row>
<el-col :span="12"><div style="height: 80px;text-align: center; background: #000088;color: #fff;line-height: 80px">ATC广播</div></el-col>
<el-col :span="12">
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;">启用</div>
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%; margin-top: 5px">停用</div>
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%;" @click="enableAtcBroadcast">启用</div>
<div class="broadcast-mode-button" style="top: 5px; left: 10%;width: 80%; margin-top: 5px" @click="stopAtcBroadcast">停用</div>
</el-col>
</el-row>
</div>
@ -239,6 +269,7 @@ export default {
delayTime: ''
},
enableAreaList: [],
atcBroadcast: [],
bgmResources: '',
videoMode: 'RECORDING',
messageIndex: 0,
@ -322,7 +353,7 @@ export default {
if (device) {
this.$set(this.deviceMap[device.position], 'state', item.state);
const div = document.getElementById(device.position);
if (this.$route.query.stationId === item.stationCode && !['0', '12', '13'].includes(item.state)) {
if (this.$route.query.stationId === item.stationCode && !['0', '12', '13'].includes(item.state) && this.atcBroadcast.includes(item.position)) {
const audio = document.getElementById('voice');
audio.src = this.$store.state.user.resourcesUrl + item.url;
audio.play();
@ -409,7 +440,6 @@ export default {
checkHasDevice(position) {
const device = this.iscsDeviceList.find(item => item.position === position);
this.deviceMap[position] = device;
console.log(device, position, this.iscsDeviceList, '------');
return !!device;
},
getResourcesList() {
@ -428,6 +458,21 @@ export default {
this.enableAreaList = ['LCD', 'UP_STAND', 'DOWN_STAND', 'ADMINISTRATIVE_AREA', 'GATE', 'TRANSFER_CHANNEL'];
}
},
enableAtcBroadcast() {
this.enableAreaList.forEach(item => {
if (!this.atcBroadcast.includes(item)) {
this.atcBroadcast.push(item);
}
});
},
stopAtcBroadcast() {
this.enableAreaList.forEach(item => {
const index = this.atcBroadcast.findIndex(elem => item === elem);
if (index > -1) {
this.atcBroadcast.splice(index, 1);
}
});
},
playBgm() {
const iscsDeviceCodes = [];
this.enableAreaList.forEach(item => {

View File

@ -484,12 +484,34 @@ export default {
this.$router.push({ path: `/bigSplitScreen/${resp.data.map.id}`, query: {...query, prdType:resp.data.prodType} });
}
} else if (this.$route.query.type === 'ISCS_LW' || this.$route.query.type === 'ISCS_CW') {
this.$router.push({ path: `/displayIscs/system`, query: {
group: res.data.group,
lineCode: resp.data.map.lineCode,
mapId:resp.data.map.id,
projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type} });
const config = JSON.parse(res.data.deviceVO.config);
if (config.picture === 'paMain') {
// displayIscs/system/stationConfig/paMain?stationName=&stationId=Station25166&group=20-120-196-193&mapId=196&lineCode=02
this.$router.push({ path: `displayIscs/system/stationConfig/paMain`, query: {
stationId: config.stationCode,
group: res.data.group,
mapId:resp.data.map.id,
lineCode: resp.data.map.lineCode,
projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type
} });
} else if (config.picture === 'pidsMain') {
this.$router.push({ path: `displayIscs/system/stationConfig/pidsMain`, query: {
stationId: config.stationCode,
group: res.data.group,
mapId:resp.data.map.id,
lineCode: resp.data.map.lineCode,
projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type
} });
} else {
this.$router.push({ path: `/displayIscs/system`, query: {
group: res.data.group,
lineCode: resp.data.map.lineCode,
mapId:resp.data.map.id,
projectDevice: this.$route.query.projectDevice,
type: this.$route.query.type} });
}
} else if (this.$route.query.type == 'CCTV') {
if (RealCctvList.includes(this.project)) {
this.$router.push({

View File

@ -55,6 +55,26 @@
/>
</el-select>
</el-form-item>
<el-form-item label="系统" prop="picture">
<el-select v-model="formIscs.picture" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in pictureList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="车站" prop="stationCode">
<el-select v-model="formIscs.stationCode" placeholder="请选择" size="small" clearable>
<el-option
v-for="item in stationList"
:key="item.code"
:label="item.name"
:value="item.code"
/>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
@ -64,7 +84,7 @@
</template>
<script>
import { getDeviceDetail, setVrIbpConfig, setLwConfig, getDevicesByType, setIscsLwConfig, setIscsCwConfig } from '@/api/project';
import { getDeviceDetail, getDevicesByType, setIscsCwConfig, setDeviceConfig } from '@/api/project';
import { getAllMapOnline, getStationListNeedAttendant } from '@/api/jmap/map';
export default {
name: 'EditConfig',
@ -83,8 +103,14 @@ export default {
stationCode: ''
},
formIscs: {
deviceCode: ''
deviceCode: '',
picture: '',
stationCode: ''
},
pictureList: [
{ label: '广播系统', value: 'paMain' },
{ label: '乘客信息', value: 'pidsMain' }
],
rulesIbp: {
part: [
{ required: true, message: '请选择显示位置', trigger: 'change' }
@ -104,7 +130,7 @@ export default {
]
},
partList: [{label: '左', value: 'LEFT'}, {label: '右', value: 'RIGHT'}, {label: '全部', value: 'WHOLE'}],
stationList: [],
stationList: []
};
},
computed: {
@ -148,24 +174,23 @@ export default {
}).catch(() => {
this.$message.error('获取设备列表失败!');
});
} else {
getAllMapOnline().then(res => {
if (res.data && res.data.length) {
this.mapList = res.data;
this.formLw.mapId = this.mapList[0].id;
this.mapIdChange(this.mapList[0].id);
}
}).catch(() => {
this.$message.error('获取地图列表失败!');
});
}
getAllMapOnline().then(res => {
if (res.data && res.data.length) {
this.mapList = res.data;
this.formLw.mapId = this.mapList[0].id;
this.mapIdChange(this.mapList[0].id);
}
}).catch(() => {
this.$message.error('获取地图列表失败!');
});
},
doSave() {
const self = this;
if (this.data.type === 'VR_IBP') {
this.$refs.formIbp.validate(() => {
setVrIbpConfig(this.data.id, this.formIbp).then(response => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formIbp) };
setDeviceConfig(data).then(response => {
self.$message.success('设置虚拟IBP设备配置成功');
self.handleClose();
self.$emit('reloadTable');
@ -175,7 +200,8 @@ export default {
});
} else if (this.data.type === 'LW') {
this.$refs.formLw.validate(() => {
setLwConfig(this.data.id, this.formLw).then(response => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formLw) };
setDeviceConfig(data).then(response => {
self.$message.success('设置现地工作站配置成功');
self.handleClose();
self.$emit('reloadTable');
@ -185,7 +211,8 @@ export default {
});
} else if (this.data.type === 'ISCS_LW') {
this.$refs.formIscs.validate(() => {
setIscsLwConfig(this.data.id, this.formIscs).then(response => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formIscs) };
setDeviceConfig(data).then(response => {
self.$message.success('设置现地综合监控配置成功');
self.handleClose();
self.$emit('reloadTable');
@ -195,7 +222,8 @@ export default {
});
} else if (this.data.type === 'ISCS_CW') {
this.$refs.formIscs.validate(() => {
setIscsCwConfig(this.data.id, this.formIscs).then(response => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(this.formIscs) };
setIscsCwConfig(data).then(response => {
self.$message.success('设置中心综合监控配置成功');
self.handleClose();
self.$emit('reloadTable');

View File

@ -32,7 +32,7 @@
</template>
<script>
import { getDeviceDetail, setIbpConfig} from '@/api/project';
import { getDeviceDetail, setDeviceConfig} from '@/api/project';
// import { deepAssign } from '@/utils/index';
import { getAllMapOnline, getStationListNeedAttendant } from '@/api/jmap/map';
@ -112,8 +112,9 @@ export default {
},
doSave() {
this.checkCount = 0;
const form = JSON.parse(this.jsonConfig);
setIbpConfig(this.data.id, form).then(resp => {
// const form = JSON.parse(this.jsonConfig);
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: this.jsonConfig };
setDeviceConfig(data).then(resp => {
this.$message.success('设置IBP网关映射配置成功');
this.handleClose();
this.$emit('reloadTable');

View File

@ -9,7 +9,7 @@
</template>
<script>
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig, setPlcConfig, setSandboxConfig, setIlwConfig } from '@/api/project';
import { getDevicesByType, getDeviceDetail, setDeviceConfig } from '@/api/project';
import { getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode } from '@/api/jmap/map';
export default {
@ -197,7 +197,8 @@ export default {
deviceCode: this.formData.deviceCode,
quadrant: this.formData.quadrant
};
setLswConfig(this.data.id, param).then(() => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
setDeviceConfig(data).then(() => {
self.$message.success('设置大屏工作站配置成功');
self.handleClose();
self.$emit('reloadTable');
@ -210,7 +211,8 @@ export default {
const param = {
deviceCode: this.formData.deviceCode
};
setCctvConfig(this.data.id, param).then(() => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
setDeviceConfig(data).then(() => {
self.$message.success('设置CCTV工作站配置成功');
self.handleClose();
self.$emit('reloadTable');
@ -224,7 +226,8 @@ export default {
deviceCode: this.formData.deviceCode,
psdCode: this.formData.psdCode
};
setVrPsdConfig(this.data.id, param).then(() => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
setDeviceConfig(data).then(() => {
self.$message.success('设置虚拟屏蔽门工作站配置成功');
self.handleClose();
self.$emit('reloadTable');
@ -238,7 +241,8 @@ export default {
addr: this.formData.addr,
quantity: this.formData.quantity
};
setPlcConfig(this.data.id, param).then(() => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
setDeviceConfig(data).then(() => {
self.$message.success('设置PLC配置成功');
self.handleClose();
self.$emit('reloadTable');
@ -251,7 +255,8 @@ export default {
const param = {
deviceCode: this.formData.deviceCode
};
setSandboxConfig(this.data.id, param).then(() => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
setDeviceConfig(data).then(() => {
self.$message.success('设置电子沙盘配置成功');
self.handleClose();
self.$emit('reloadTable');
@ -264,7 +269,8 @@ export default {
const param = {
deviceCode: this.formData.deviceCode
};
setIlwConfig(this.data.id, param).then(() => {
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
setDeviceConfig(data).then(() => {
self.$message.success('设置联锁工作站配置成功');
self.handleClose();
self.$emit('reloadTable');