Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
1879398d92
@ -32,7 +32,7 @@ export function sendSimulationCommand(group, memberId, type, data) {
|
|||||||
export function getMemberListCommon(group, role) {
|
export function getMemberListCommon(group, role) {
|
||||||
|
|
||||||
if (!role) {
|
if (!role) {
|
||||||
role = "";
|
role = '';
|
||||||
}
|
}
|
||||||
return request({
|
return request({
|
||||||
url: `/common/simulation/${group}/members?role=${role}`,
|
url: `/common/simulation/${group}/members?role=${role}`,
|
||||||
@ -96,3 +96,18 @@ export function simulationStart(group) {
|
|||||||
method: 'put'
|
method: 'put'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 获取存在的仿真列表 */
|
||||||
|
export function getExistSimulationList(params) {
|
||||||
|
return request({
|
||||||
|
url: `/common/simulation/list`,
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 获取仿真用户信息 */
|
||||||
|
export function getSimulationUserInfo(id) {
|
||||||
|
return request({
|
||||||
|
url: `/common/simulation/${id}/users`,
|
||||||
|
method: 'get'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -163,22 +163,22 @@ export function cancelReplaceBg(group) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 分页查询存在的仿真 */
|
// /** 分页查询存在的仿真 */
|
||||||
export function getExistingSimulation(params) {
|
// export function getExistingSimulation(params) {
|
||||||
return request({
|
// return request({
|
||||||
url: `/manage/simulation/exists`,
|
// url: `/manage/simulation/exists`,
|
||||||
method: 'get',
|
// method: 'get',
|
||||||
params
|
// params
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/** 删除存在的仿真 */
|
// /** 删除存在的仿真 */
|
||||||
export function deleteExistingSimulation(group) {
|
// export function deleteExistingSimulation(group) {
|
||||||
return request({
|
// return request({
|
||||||
url: `/manage/simulation/${group}`,
|
// url: `/manage/simulation/${group}`,
|
||||||
method: 'delete'
|
// method: 'delete'
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
/** 获取任务录制的所有动作(新版)*/
|
/** 获取任务录制的所有动作(新版)*/
|
||||||
export function getScriptAllAction(group) {
|
export function getScriptAllAction(group) {
|
||||||
|
@ -377,8 +377,10 @@ export default {
|
|||||||
query(queryData) {
|
query(queryData) {
|
||||||
this.queryData = queryData;
|
this.queryData = queryData;
|
||||||
// this.pageIndex = 1;
|
// this.pageIndex = 1;
|
||||||
|
if (!this.queryList.paginationHiden) {
|
||||||
this.queryData[this.currentpagerConfig.pageSize] = this.pageSize;
|
this.queryData[this.currentpagerConfig.pageSize] = this.pageSize;
|
||||||
this.queryData[this.currentpagerConfig.pageIndex] = this.pageIndex;
|
this.queryData[this.currentpagerConfig.pageIndex] = this.pageIndex;
|
||||||
|
}
|
||||||
// this.queryList.reload();
|
// this.queryList.reload();
|
||||||
this.choose = null;
|
this.choose = null;
|
||||||
this.commitQuery();
|
this.commitQuery();
|
||||||
@ -512,6 +514,7 @@ export default {
|
|||||||
self.enableQuery();
|
self.enableQuery();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
delete this.queryData.undefined;
|
||||||
if (this.queryList.query instanceof Function) {
|
if (this.queryList.query instanceof Function) {
|
||||||
this.queryList.query(this.queryData).then(response => {
|
this.queryList.query(this.queryData).then(response => {
|
||||||
self.enableQuery();
|
self.enableQuery();
|
||||||
@ -519,7 +522,7 @@ export default {
|
|||||||
this.queryList.afterQuery(response.data);
|
this.queryList.afterQuery(response.data);
|
||||||
}
|
}
|
||||||
const resultData = response.data;
|
const resultData = response.data;
|
||||||
this.$set(this.queryList, 'data', resultData.list);
|
this.$set(this.queryList, 'data', this.queryList.paginationHiden ? resultData : resultData.list);
|
||||||
this.$set(this.queryList, 'total', resultData.total);
|
this.$set(this.queryList, 'total', resultData.total);
|
||||||
if (resultData.pageNum) {
|
if (resultData.pageNum) {
|
||||||
this.pageIndex = resultData.pageNum;
|
this.pageIndex = resultData.pageNum;
|
||||||
|
@ -49,7 +49,8 @@ export default class alarm extends Group {
|
|||||||
|
|
||||||
setStatus(state) {
|
setStatus(state) {
|
||||||
// domid还是写在了alarm里面 待优化
|
// domid还是写在了alarm里面 待优化
|
||||||
const audioDom = document.querySelector('#buzzer');
|
const audioDom = document.querySelector(`#buzzer_${this.model.code}`);
|
||||||
|
if (audioDom) {
|
||||||
if (state && state.on) {
|
if (state && state.on) {
|
||||||
audioDom.play().catch(e=>{throw e})
|
audioDom.play().catch(e=>{throw e})
|
||||||
} else if (state && !state.on) {
|
} else if (state && !state.on) {
|
||||||
@ -57,3 +58,4 @@ export default class alarm extends Group {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -30,7 +30,8 @@ export const MapDeviceType = {
|
|||||||
export const deviceFaultType = {
|
export const deviceFaultType = {
|
||||||
Section: [
|
Section: [
|
||||||
{label: '计轴故障', value: 'FAULT'},
|
{label: '计轴故障', value: 'FAULT'},
|
||||||
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'}
|
{label: '通信车占用', value: 'CBTC_OCCUPIED_FAULT'},
|
||||||
|
{label: 'ARB', value: 'ARB'}
|
||||||
// {label: '计轴干扰', value: 'DISTURBANCE'}
|
// {label: '计轴干扰', value: 'DISTURBANCE'}
|
||||||
],
|
],
|
||||||
Signal: [
|
Signal: [
|
||||||
@ -68,7 +69,8 @@ export const deviceFaultType = {
|
|||||||
export const deviceFaultMap = {
|
export const deviceFaultMap = {
|
||||||
Section: {
|
Section: {
|
||||||
FAULT: '计轴故障',
|
FAULT: '计轴故障',
|
||||||
CBTC_OCCUPIED_FAULT: '通信车占用'
|
CBTC_OCCUPIED_FAULT: '通信车占用',
|
||||||
|
ARB: 'ARB'
|
||||||
},
|
},
|
||||||
Signal: {
|
Signal: {
|
||||||
MAIN_FILAMENT_BROKEN: '熔断'
|
MAIN_FILAMENT_BROKEN: '熔断'
|
||||||
|
@ -891,15 +891,16 @@ const map = {
|
|||||||
updateStationStand: (state, status) => {
|
updateStationStand: (state, status) => {
|
||||||
const holdIndex = state.holdStandList.indexOf(status.code);
|
const holdIndex = state.holdStandList.indexOf(status.code);
|
||||||
const jumpIndex = state.jumpStandList.indexOf(status.code);
|
const jumpIndex = state.jumpStandList.indexOf(status.code);
|
||||||
if ((status.stationHoldTrain || status.centerHoldTrain) && holdIndex < 0) {
|
const device = state.mapDevice[status.code];
|
||||||
state.holdStandList.push(status.code);
|
if ((device.stationHoldTrain || device.centerHoldTrain) && holdIndex < 0) {
|
||||||
} else if (!(status.stationHoldTrain && status.centerHoldTrain) && holdIndex > -1) {
|
state.holdStandList.push(device.code);
|
||||||
|
} else if (!(device.stationHoldTrain || device.centerHoldTrain) && holdIndex > -1) {
|
||||||
state.holdStandList.splice(holdIndex, 1);
|
state.holdStandList.splice(holdIndex, 1);
|
||||||
}
|
}
|
||||||
state.holdStatus = state.holdStandList.length > 0;
|
state.holdStatus = state.holdStandList.length > 0;
|
||||||
if ((status.assignSkip || status.allSkip) && jumpIndex < 0) {
|
if ((device.assignSkip || device.allSkip) && jumpIndex < 0) {
|
||||||
state.jumpStandList.push(status.code);
|
state.jumpStandList.push(device.code);
|
||||||
} else if (!(status.assignSkip && status.allSkip) && jumpIndex > -1) {
|
} else if (!(device.assignSkip || device.allSkip) && jumpIndex > -1) {
|
||||||
state.jumpStandList.splice(jumpIndex, 1);
|
state.jumpStandList.splice(jumpIndex, 1);
|
||||||
}
|
}
|
||||||
state.jumpStatus = state.jumpStandList.length > 0;
|
state.jumpStatus = state.jumpStandList.length > 0;
|
||||||
|
@ -71,17 +71,20 @@ export default {
|
|||||||
const point = {};
|
const point = {};
|
||||||
point.x = e.clientX;
|
point.x = e.clientX;
|
||||||
point.y = e.clientY;
|
point.y = e.clientY;
|
||||||
|
const stationList = [];
|
||||||
if (this.$store.state.map.holdStandList.length) {
|
if (this.$store.state.map.holdStandList.length) {
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
this.$store.state.map.holdStandList.forEach(item => {
|
this.$store.state.map.holdStandList.forEach(item => {
|
||||||
const stand = this.$store.getters['map/getDeviceByCode'](item);
|
const stand = this.$store.getters['map/getDeviceByCode'](item);
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||||
|
if (stationList.indexOf(station.code) === -1) {
|
||||||
|
stationList.push(station.code);
|
||||||
this.menu.push({
|
this.menu.push({
|
||||||
label: station.name,
|
label: station.name,
|
||||||
code: station.code,
|
code: station.code,
|
||||||
handler: this.setCenter
|
handler: this.setCenter
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
@ -94,14 +97,18 @@ export default {
|
|||||||
point.y = e.clientY;
|
point.y = e.clientY;
|
||||||
if (this.$store.state.map.jumpStandList.length) {
|
if (this.$store.state.map.jumpStandList.length) {
|
||||||
this.menu = [];
|
this.menu = [];
|
||||||
|
const stationList = [];
|
||||||
this.$store.state.map.jumpStandList.forEach(item => {
|
this.$store.state.map.jumpStandList.forEach(item => {
|
||||||
const stand = this.$store.getters['map/getDeviceByCode'](item);
|
const stand = this.$store.getters['map/getDeviceByCode'](item);
|
||||||
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
const station = this.$store.getters['map/getDeviceByCode'](stand.stationCode);
|
||||||
|
if (stationList.indexOf(station.code) === -1) {
|
||||||
|
stationList.push(station.code);
|
||||||
this.menu.push({
|
this.menu.push({
|
||||||
label: station.name,
|
label: station.name,
|
||||||
code: station.code,
|
code: station.code,
|
||||||
handler: this.setCenter
|
handler: this.setCenter
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
if (this.$refs && this.$refs.popMenu) {
|
if (this.$refs && this.$refs.popMenu) {
|
||||||
this.$refs.popMenu.resetShowPosition(point);
|
this.$refs.popMenu.resetShowPosition(point);
|
||||||
|
@ -15,6 +15,16 @@
|
|||||||
<el-form-item :label="this.$t('ibp.yCoordinate')">
|
<el-form-item :label="this.$t('ibp.yCoordinate')">
|
||||||
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
<el-input-number v-model="form.y" controls-position="right" :min="1" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="方向">
|
||||||
|
<el-select v-model="form.direction" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, i) in directions"
|
||||||
|
:key="i"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||||
@ -38,7 +48,8 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
alarmWidth: '',
|
alarmWidth: '',
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10,
|
||||||
|
direction: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -47,7 +58,12 @@ export default {
|
|||||||
alarmWidth: [
|
alarmWidth: [
|
||||||
{ required: true, message: this.$t('rules.enterTheAlarmWidth'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.enterTheAlarmWidth'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
directions: [
|
||||||
|
{ name: '全部', value: null},
|
||||||
|
{ name: '上行', value: true},
|
||||||
|
{ name: '下行', value: false},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -64,6 +80,7 @@ export default {
|
|||||||
this.form.alarmWidth = model.width;
|
this.form.alarmWidth = model.width;
|
||||||
this.form.x = model.point.x;
|
this.form.x = model.point.x;
|
||||||
this.form.y = model.point.y;
|
this.form.y = model.point.y;
|
||||||
|
this.form.direction = model.direction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -80,7 +97,8 @@ export default {
|
|||||||
},
|
},
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'Alarm',
|
_type: 'Alarm',
|
||||||
width: this.form.alarmWidth
|
width: this.form.alarmWidth,
|
||||||
|
direction: this.form.direction
|
||||||
};
|
};
|
||||||
this.$emit('createData', alarmModel);
|
this.$emit('createData', alarmModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -97,7 +115,8 @@ export default {
|
|||||||
},
|
},
|
||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
_type: 'Alarm',
|
_type: 'Alarm',
|
||||||
width: this.form.alarmWidth
|
width: this.form.alarmWidth,
|
||||||
|
direction: this.form.direction
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', alarmModel );
|
this.$emit('deleteDataModel', alarmModel );
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -110,7 +129,8 @@ export default {
|
|||||||
code: '',
|
code: '',
|
||||||
alarmWidth: '',
|
alarmWidth: '',
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10
|
y: 10,
|
||||||
|
direction: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
generateCode() {
|
generateCode() {
|
||||||
|
@ -44,6 +44,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="needDirectionItem" label="方向">
|
||||||
|
<el-select v-model="form.direction" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, i) in directions"
|
||||||
|
:key="i"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||||
@ -65,19 +75,17 @@ export default {
|
|||||||
buttonText: this.$t('ibp.createNow'),
|
buttonText: this.$t('ibp.createNow'),
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
operateMeanList: [
|
operateMeanList: [
|
||||||
{ label: '上行扣车', value: 'SXKC' },
|
{ label: '扣车', value: 'KC' },
|
||||||
{ label: '下行扣车', value: 'XXKC' },
|
{ label: '终止扣车', value: 'ZZKC' },
|
||||||
{ label: '上行终止扣车', value: 'SXZZKC' },
|
|
||||||
{ label: '下行终止扣车', value: 'XXZZKC' },
|
|
||||||
{ label: '紧急停车', value: 'JJTC' },
|
{ label: '紧急停车', value: 'JJTC' },
|
||||||
{ label: '取消紧急停车', value: 'QXJJTC' },
|
{ label: '取消紧急停车', value: 'QXJJTC' },
|
||||||
{ label: '报警切除', value: 'BJQC' },
|
{ label: '报警切除', value: 'BJQC' },
|
||||||
{ label: '下行屏蔽门开门', value: 'XXKM' },
|
{ label: '屏蔽门开门', value: 'KM' },
|
||||||
{ label: '上行屏蔽门开门', value: 'SXKM' },
|
|
||||||
{ label: '计轴复位', value: 'AXLE_RESET' },
|
{ label: '计轴复位', value: 'AXLE_RESET' },
|
||||||
{ label: '计轴预复位', value: 'AXLE_PRE_RESET' },
|
{ label: '计轴预复位', value: 'AXLE_PRE_RESET' },
|
||||||
{ label: '计轴预复零', value: 'PRERESET_Z' },
|
{ label: '计轴预复零', value: 'PRERESET_Z' },
|
||||||
],
|
],
|
||||||
|
operateWithoutDirections: ['AXLE_RESET', 'AXLE_PRE_RESET', 'PRERESET_Z'],
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
buttonColor: 'red',
|
buttonColor: 'red',
|
||||||
@ -85,7 +93,8 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
sectionCode: '',
|
sectionCode: '',
|
||||||
mean: ''
|
mean: '',
|
||||||
|
direction: null,
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -99,13 +108,20 @@ export default {
|
|||||||
],
|
],
|
||||||
sectionCode: [
|
sectionCode: [
|
||||||
{ required: true, message: '请选择关联区段', trigger: 'blur' }
|
{ required: true, message: '请选择关联区段', trigger: 'blur' }
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
sectionList: []
|
sectionList: [],
|
||||||
|
directions: [
|
||||||
|
{ name: '全部', value: null},
|
||||||
|
{ name: '上行', value: true},
|
||||||
|
{ name: '下行', value: false},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
needDirectionItem() {
|
||||||
|
return !this.operateWithoutDirections.includes(this.form.mean);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
'$store.state.ibp.rightClickCount': function (val) {
|
'$store.state.ibp.rightClickCount': function (val) {
|
||||||
@ -121,6 +137,7 @@ export default {
|
|||||||
this.form.y = model.point.y;
|
this.form.y = model.point.y;
|
||||||
this.form.mean = model.mean;
|
this.form.mean = model.mean;
|
||||||
this.form.sectionCode = model.sectionCode;
|
this.form.sectionCode = model.sectionCode;
|
||||||
|
this.form.direction = model.direction;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -128,7 +145,7 @@ export default {
|
|||||||
if (this.$route.query.stationCode) {
|
if (this.$route.query.stationCode) {
|
||||||
getSectionListByCenStationCode(this.$route.query.mapId, this.$route.query.stationCode).then(resp => {
|
getSectionListByCenStationCode(this.$route.query.mapId, this.$route.query.stationCode).then(resp => {
|
||||||
this.sectionList = resp.data;
|
this.sectionList = resp.data;
|
||||||
console.log(resp.data);
|
// console.log(resp.data);
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message.error('获取区段列表失败!');
|
this.$message.error('获取区段列表失败!');
|
||||||
});
|
});
|
||||||
@ -142,9 +159,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// consoleChange() {
|
|
||||||
// console.log(this.form.mean === 'PRERESET', this.form.mean );
|
|
||||||
// },
|
|
||||||
onSubmit(form) {
|
onSubmit(form) {
|
||||||
this.$refs[form].validate((valid) => {
|
this.$refs[form].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -159,7 +173,8 @@ export default {
|
|||||||
status: 'off',
|
status: 'off',
|
||||||
width: this.form.buttonWidth,
|
width: this.form.buttonWidth,
|
||||||
mean: this.form.mean,
|
mean: this.form.mean,
|
||||||
sectionCode: this.form.sectionCode
|
sectionCode: this.form.sectionCode,
|
||||||
|
direction: this.form.direction,
|
||||||
};
|
};
|
||||||
this.$emit('createData', buttonModel);
|
this.$emit('createData', buttonModel);
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -180,7 +195,8 @@ export default {
|
|||||||
status: 'off',
|
status: 'off',
|
||||||
width: this.form.buttonWidth,
|
width: this.form.buttonWidth,
|
||||||
mean: this.form.mean,
|
mean: this.form.mean,
|
||||||
sectionCode: this.form.sectionCode
|
sectionCode: this.form.sectionCode,
|
||||||
|
direction: this.form.direction,
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', buttonModel );
|
this.$emit('deleteDataModel', buttonModel );
|
||||||
this.initPage();
|
this.initPage();
|
||||||
@ -196,7 +212,8 @@ export default {
|
|||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
mean: '',
|
mean: '',
|
||||||
sectionCode: ''
|
sectionCode: '',
|
||||||
|
direction: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
generateCode() {
|
generateCode() {
|
||||||
|
@ -25,6 +25,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="方向">
|
||||||
|
<el-select v-model="form.direction" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="(item, i) in directions"
|
||||||
|
:key="i"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
<el-button type="primary" @click="onSubmit('form')">{{ buttonText }}</el-button>
|
||||||
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
<el-button v-show="showDeleteButton" type="danger" @click="deleteDevice">{{ $t('global.delete') }}</el-button>
|
||||||
@ -45,20 +55,18 @@ export default {
|
|||||||
buttonText: this.$t('ibp.createNow'),
|
buttonText: this.$t('ibp.createNow'),
|
||||||
showDeleteButton: false,
|
showDeleteButton: false,
|
||||||
showMeanList: [
|
showMeanList: [
|
||||||
{label: '下行扣车', value: 'xxkcLight'},
|
{label: '扣车灯', value: 'kcLight'},
|
||||||
{label: '上行扣车', value: 'sxkcLight'},
|
{label: '关门灯', value: 'gmLight'},
|
||||||
{label: '下行关门灯', value: 'xxgmLight'},
|
{label: '开门灯', value: 'kmLight'},
|
||||||
{label: '下行开门灯', value: 'xxkmLight'},
|
{label: '紧急停车灯', value: 'jjtcLight'},
|
||||||
{label: '上行关门灯', value: 'sxgmLight'},
|
|
||||||
{label: '上行开门灯', value: 'sxkmLight'},
|
|
||||||
{label: '紧急停车灯', value: 'jjtcLight'}
|
|
||||||
],
|
],
|
||||||
form: {
|
form: {
|
||||||
code: '',
|
code: '',
|
||||||
r: '',
|
r: '',
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
mean: ''
|
mean: '',
|
||||||
|
direction: null
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
code: [
|
code: [
|
||||||
@ -67,7 +75,12 @@ export default {
|
|||||||
r: [
|
r: [
|
||||||
{ required: true, message: '请输入圆形灯半径', trigger: 'blur'}
|
{ required: true, message: '请输入圆形灯半径', trigger: 'blur'}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
directions: [
|
||||||
|
{ name: '全部', value: null},
|
||||||
|
{ name: '上行', value: true},
|
||||||
|
{ name: '下行', value: false},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -85,6 +98,7 @@ export default {
|
|||||||
this.form.x = model.point.x;
|
this.form.x = model.point.x;
|
||||||
this.form.y = model.point.y;
|
this.form.y = model.point.y;
|
||||||
this.form.mean = model.mean;
|
this.form.mean = model.mean;
|
||||||
|
this.form.direction = model.direction
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -103,6 +117,7 @@ export default {
|
|||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
r: this.form.r,
|
r: this.form.r,
|
||||||
mean: this.form.mean,
|
mean: this.form.mean,
|
||||||
|
direction: this.form.direction,
|
||||||
fillColor: '#332C22'
|
fillColor: '#332C22'
|
||||||
};
|
};
|
||||||
this.$emit('createData', lampModel);
|
this.$emit('createData', lampModel);
|
||||||
@ -123,6 +138,7 @@ export default {
|
|||||||
code: this.form.code,
|
code: this.form.code,
|
||||||
r: this.form.r,
|
r: this.form.r,
|
||||||
mean: this.form.mean,
|
mean: this.form.mean,
|
||||||
|
direction: this.form.direction,
|
||||||
fillColor: '#332C22'
|
fillColor: '#332C22'
|
||||||
};
|
};
|
||||||
this.$emit('deleteDataModel', lampModel );
|
this.$emit('deleteDataModel', lampModel );
|
||||||
@ -137,7 +153,8 @@ export default {
|
|||||||
r: '',
|
r: '',
|
||||||
x: 10,
|
x: 10,
|
||||||
y: 10,
|
y: 10,
|
||||||
mean: ''
|
mean: '',
|
||||||
|
direction: null
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
generateCode() {
|
generateCode() {
|
||||||
|
@ -7,9 +7,11 @@
|
|||||||
<el-button v-if="$route.query.noPreLogout" type="primary" @click="quit">退出</el-button>
|
<el-button v-if="$route.query.noPreLogout" type="primary" @click="quit">退出</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
|
|
||||||
<audio id="buzzer" controls loop="loop">
|
<template v-for="alarm in alarmList" >
|
||||||
|
<audio :key="alarm.code" :id="`buzzer_${alarm.code}`" controls loop="loop">
|
||||||
<source :src="buzzerAudio" type="audio/mpeg">
|
<source :src="buzzerAudio" type="audio/mpeg">
|
||||||
</audio>
|
</audio>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -64,7 +66,8 @@ export default {
|
|||||||
stationCode: '',
|
stationCode: '',
|
||||||
banUpOpenScreenDoor: false,
|
banUpOpenScreenDoor: false,
|
||||||
banDownOpenScreenDoor: false,
|
banDownOpenScreenDoor: false,
|
||||||
buzzerAudio:BuzzerAudio
|
buzzerAudio:BuzzerAudio,
|
||||||
|
alarmList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -193,7 +196,8 @@ export default {
|
|||||||
this.setIbp(data, ibpDatas);
|
this.setIbp(data, ibpDatas);
|
||||||
this.$store.dispatch('ibp/setIbpData', ibpDatas);
|
this.$store.dispatch('ibp/setIbpData', ibpDatas);
|
||||||
this.handleBanOpenScreenDoorStatus();
|
this.handleBanOpenScreenDoorStatus();
|
||||||
this.preResetBtn = this.$ibp.$painter.ibpInstanceLevel.SquareButton.children().find(e=>e.model.mean === IbpOperation.PRERESET_Z.event);
|
this.preResetBtn = this.$ibp.$painter.ibpInstanceLevel.SquareButton.children().find(e=>e.model.mean === IbpOperation.PRERESET_Z.event); //计轴预复零按钮
|
||||||
|
this.alarmList = this.$ibp.$painter.ibpInstanceLevel.Alarm.children().map(e=>e.model);
|
||||||
} else {
|
} else {
|
||||||
// 无数据
|
// 无数据
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -1,15 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :query-form="queryForm" :query-list="queryList" />
|
||||||
|
<view-member ref="viewMember" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
import Cookies from 'js-cookie';
|
import Cookies from 'js-cookie';
|
||||||
import { getExistingSimulation, deleteExistingSimulation } from '@/api/simulation';
|
import ViewMember from './viewMember';
|
||||||
|
// import { getExistingSimulation, deleteExistingSimulation } from '@/api/simulation';
|
||||||
|
import { getExistSimulationList, destroySimulation } from '@/api/rtSimulation';
|
||||||
export default {
|
export default {
|
||||||
name: 'SimulationManage',
|
name: 'SimulationManage',
|
||||||
components: {
|
components: {
|
||||||
|
ViewMember
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -44,65 +48,52 @@ export default {
|
|||||||
},
|
},
|
||||||
simulationTypeList: [{label: '仿真', value: 'SIMULATION'}, {label: '课程', value: 'LESSON'}, {label: '考试', value: 'EXAM'}, {label: '剧本编制', value: 'SCRIPT_MAKING'}],
|
simulationTypeList: [{label: '仿真', value: 'SIMULATION'}, {label: '课程', value: 'LESSON'}, {label: '考试', value: 'EXAM'}, {label: '剧本编制', value: 'SCRIPT_MAKING'}],
|
||||||
queryList: {
|
queryList: {
|
||||||
query: getExistingSimulation,
|
query: getExistSimulationList,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
|
paginationHiden: true,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
|
// {
|
||||||
|
// title: this.$t('system.userName'),
|
||||||
|
// prop: 'creator.name'
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
title: this.$t('system.userName'),
|
title: '仿真ID',
|
||||||
prop: 'creator.name'
|
prop: 'id'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '仿真状态',
|
||||||
|
prop: 'state',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => {
|
||||||
|
if (row.state === 1) { return '仿真开始'; } else if (row.state === 0) { return '仿真暂停'; } else if (row.state === 4) { return '仿真错误'; } else { return '未知状态'; }
|
||||||
|
},
|
||||||
|
tagType: (row) => {
|
||||||
|
return 'success';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '仿真倍速',
|
||||||
|
prop: 'speed'
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// title: '类型',
|
||||||
|
// prop: 'type',
|
||||||
|
// type: 'tag',
|
||||||
|
// columnValue: (row) => { return this.$convertField(row.type, this.simulationTypeList, ['value', 'label']); },
|
||||||
|
// tagType: (row) => { return ''; }
|
||||||
|
//
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
title: this.$t('system.mapName'),
|
title: this.$t('system.mapName'),
|
||||||
prop: 'map.name'
|
prop: 'map.name',
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Group',
|
|
||||||
prop: 'group'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('system.isError'),
|
|
||||||
prop: 'error',
|
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.error, 'Whether'); },
|
columnValue: (row) => {
|
||||||
|
return `${row.map.name}( ${row.map.id}- ${row.map.version})`;
|
||||||
|
},
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.error) {
|
return 'success';
|
||||||
case true: return 'success';
|
|
||||||
case false: return 'danger';
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('system.isSuspend'),
|
|
||||||
prop: 'pause',
|
|
||||||
type: 'tag',
|
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.pause, 'Whether'); },
|
|
||||||
tagType: (row) => {
|
|
||||||
switch (row.pause) {
|
|
||||||
case true: return 'success';
|
|
||||||
case false: return 'danger';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: this.$t('system.isDrivingAsplanned'),
|
|
||||||
prop: 'planRunning',
|
|
||||||
type: 'tag',
|
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.planRunning, 'Whether'); },
|
|
||||||
tagType: (row) => {
|
|
||||||
switch (row.runAsPlan) {
|
|
||||||
case true: return 'success';
|
|
||||||
case false: return 'danger';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '类型',
|
|
||||||
prop: 'type',
|
|
||||||
type: 'tag',
|
|
||||||
columnValue: (row) => { return this.$convertField(row.type, this.simulationTypeList, ['value', 'label']); },
|
|
||||||
tagType: (row) => { return ''; }
|
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.prdType'),
|
title: this.$t('system.prdType'),
|
||||||
@ -112,16 +103,21 @@ export default {
|
|||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
title: this.$t('system.simulationGroupId'),
|
// title: this.$t('system.simulationGroupId'),
|
||||||
prop: 'onlineUserIdList',
|
// prop: 'userList',
|
||||||
type: 'basicText',
|
// type: 'basicText',
|
||||||
columnValue: (row) => { return this.listJoiningTogether(row.onlineUserIdList); }
|
// columnValue: (row) => { return this.listJoiningTogether(row.userList); }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
buttons: [
|
buttons: [
|
||||||
|
{
|
||||||
|
name: '仿真用户信息',
|
||||||
|
handleClick: this.viewMember,
|
||||||
|
type: ''
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('system.destory'),
|
name: this.$t('system.destory'),
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
@ -146,15 +142,18 @@ export default {
|
|||||||
this.queryForm.queryObject.prdType.config.data = this.prdTypeList;
|
this.queryForm.queryObject.prdType.config.data = this.prdTypeList;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
listJoiningTogether(sessionList) {
|
// listJoiningTogether(sessionList) {
|
||||||
let sessionId = '';
|
// let sessionId = '';
|
||||||
if (sessionList && sessionList.length > 0) {
|
// if (sessionList && sessionList.length > 0) {
|
||||||
sessionList.forEach((item) => {
|
// sessionList.forEach((item) => {
|
||||||
sessionId = sessionId + item + ',';
|
// sessionId = sessionId + item.name + '(' + item.id + ')' + ',';
|
||||||
});
|
// });
|
||||||
sessionId = sessionId.substring(0, sessionId.length - 1);
|
// sessionId = sessionId.substring(0, sessionId.length - 1);
|
||||||
}
|
// }
|
||||||
return sessionId;
|
// return sessionId;
|
||||||
|
// },
|
||||||
|
viewMember(index, row) {
|
||||||
|
this.$refs.viewMember.doShow(row.id);
|
||||||
},
|
},
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm(this.$t('system.wellDelUserSimulation'), this.$t('global.tips'), {
|
this.$confirm(this.$t('system.wellDelUserSimulation'), this.$t('global.tips'), {
|
||||||
@ -162,7 +161,7 @@ export default {
|
|||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteExistingSimulation(row.group).then(response => {
|
destroySimulation(row.id).then(response => {
|
||||||
this.$message.success(this.$t('system.deleteSuccess'));
|
this.$message.success(this.$t('system.deleteSuccess'));
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
61
src/views/system/existingSimulation/viewMember.vue
Normal file
61
src/views/system/existingSimulation/viewMember.vue
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag title="仿真用户列表" :visible.sync="dialogVisible" width="80%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||||
|
<el-table
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column prop="id" label="用户Id" width="100" />
|
||||||
|
<el-table-column prop="name" label="用户名" width="100" />
|
||||||
|
<el-table-column prop="creator" label="仿真创建者" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.creator? '是':'否' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="wsSubscribeMap" label="订阅路径">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<template v-for="(item, key) in scope.row.wsSubscribeMap">
|
||||||
|
<div :key="key">{{ key + ':' }}
|
||||||
|
<template v-for="(elem, i) in item">
|
||||||
|
<el-tag :key="key+i">{{ elem }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getSimulationUserInfo } from '@/api/rtSimulation';
|
||||||
|
export default {
|
||||||
|
name: 'DictionaryEdit',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
tableData: [],
|
||||||
|
title:'',
|
||||||
|
isAdd:false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(id) {
|
||||||
|
getSimulationUserInfo(id).then(resp => {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
this.tableData = resp.data;
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error('获取仿真用户列表失表:' + error.message);
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
handleClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
Loading…
Reference in New Issue
Block a user