综合演练添加车站值班员
This commit is contained in:
parent
1ca70a08b8
commit
7af49deb90
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
|||||||
let BASE_API;
|
let BASE_API;
|
||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
|
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
|
||||||
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
|
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
|
||||||
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
:user-role="userRole"
|
:user-role="userRole"
|
||||||
:is-admin="isAdmin"
|
:is-admin="isAdmin"
|
||||||
:show-station="showStation"
|
:show-station="showStation"
|
||||||
:station-list="stationList"
|
:station-list="centralizedstationList"
|
||||||
:device-code="deviceCode"
|
:device-code="deviceCode"
|
||||||
:show-select-station="showSelectStation"
|
:show-select-station="showSelectStation"
|
||||||
:data-error="dataError"
|
:data-error="dataError"
|
||||||
@ -48,7 +48,7 @@
|
|||||||
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
<menu-system-time ref="menuSystemTime" :offset="offset" :group="group" />
|
||||||
<menu-train-list v-if="prdType=='02'" @setCenter="setCenter" />
|
<menu-train-list v-if="prdType=='02'" @setCenter="setCenter" />
|
||||||
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
|
<members-manage ref="membersManage" :is-admin="isAdmin" @addSimulationMember="addSimulationMember" /> <!-- 成员管理 -->
|
||||||
<add-member ref="addMember" />
|
<add-member ref="addMember" :station-list="stationList" />
|
||||||
<Jl3d-Device
|
<Jl3d-Device
|
||||||
v-if="deviceif"
|
v-if="deviceif"
|
||||||
v-show="deviceShow"
|
v-show="deviceShow"
|
||||||
@ -120,7 +120,7 @@ export default {
|
|||||||
panelShow: true,
|
panelShow: true,
|
||||||
ibpPart: '',
|
ibpPart: '',
|
||||||
showStation: '',
|
showStation: '',
|
||||||
stationList: [],
|
centralizedstationList: [],
|
||||||
showSelectStation: false, // 宁波线集中站 显示
|
showSelectStation: false, // 宁波线集中站 显示
|
||||||
mapViewLoadedOver: false,
|
mapViewLoadedOver: false,
|
||||||
dataError: false,
|
dataError: false,
|
||||||
@ -136,7 +136,8 @@ export default {
|
|||||||
]),
|
]),
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'map',
|
'map',
|
||||||
'bigScreenConfig'
|
'bigScreenConfig',
|
||||||
|
'stationList'
|
||||||
]),
|
]),
|
||||||
width() {
|
width() {
|
||||||
return this.$store.state.app.width;
|
return this.$store.state.app.width;
|
||||||
@ -209,7 +210,7 @@ export default {
|
|||||||
},
|
},
|
||||||
'$store.state.map.map': function (map) {
|
'$store.state.map.map': function (map) {
|
||||||
if (map) {
|
if (map) {
|
||||||
this.setStationList(map); // 获取集中站列表
|
this.setCentralizedstationList(map); // 获取集中站列表
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'$store.state.socket.simulationRoleList':function(list) {
|
'$store.state.socket.simulationRoleList':function(list) {
|
||||||
@ -572,19 +573,19 @@ export default {
|
|||||||
this.$jlmap.setCenter(showStation);
|
this.$jlmap.setCenter(showStation);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setStationList(map) {
|
setCentralizedstationList(map) {
|
||||||
this.stationList = [];
|
this.centralizedstationList = [];
|
||||||
(map.stationList || []).forEach(item => {
|
(map.stationList || []).forEach(item => {
|
||||||
if (item.centralized) {
|
if (item.centralized) {
|
||||||
this.stationList.push({value: item.code, name: item.name});
|
this.centralizedstationList.push({value: item.code, name: item.name});
|
||||||
this.centralizedStationMap[item.code] = item.code;
|
this.centralizedStationMap[item.code] = item.code;
|
||||||
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
|
item.chargeStationCodeList && item.chargeStationCodeList.length && item.chargeStationCodeList.forEach(ele => {
|
||||||
this.centralizedStationMap[ele] = item.code;
|
this.centralizedStationMap[ele] = item.code;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (this.stationList.length && !this.showStation) {
|
if (this.centralizedstationList.length && !this.showStation) {
|
||||||
this.showStation = this.stationList[0].value;
|
this.showStation = this.centralizedstationList[0].value;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setBigScreenMode() {
|
setBigScreenMode() {
|
||||||
|
@ -19,6 +19,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="formModel.type === 'STATION_SUPERVISOR'" label="值班车站:" prop="deviceCode">
|
||||||
|
<el-select v-model="formModel.deviceCode" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in filterStationList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="仿真成员名称:" prop="name">
|
<el-form-item label="仿真成员名称:" prop="name">
|
||||||
<el-input v-model="formModel.name" size="small" placeholder="请输入成员名称" />
|
<el-input v-model="formModel.name" size="small" placeholder="请输入成员名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -34,19 +44,34 @@
|
|||||||
import { addSimulationMember } from '@/api/jointSimulation';
|
import { addSimulationMember } from '@/api/jointSimulation';
|
||||||
export default {
|
export default {
|
||||||
name: 'AddMember',
|
name: 'AddMember',
|
||||||
|
props: {
|
||||||
|
stationList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
type: '',
|
type: '',
|
||||||
name: ''
|
name: '',
|
||||||
|
deviceCode: ''
|
||||||
},
|
},
|
||||||
|
filterStationList: [],
|
||||||
rules: {
|
rules: {
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: '请选择显示位置', trigger: 'change' }
|
{ required: true, message: '请选择显示位置', trigger: 'change' }
|
||||||
|
],
|
||||||
|
deviceCode: [
|
||||||
|
{ required: true, message: '请选择值班车站', trigger: 'change' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
typeList: [{label: '行调', value: 'DISPATCHER'}, {label: '通号', value: 'MAINTAINER'}]
|
typeList: [
|
||||||
|
{label: '行调', value: 'DISPATCHER'},
|
||||||
|
{label: '通号', value: 'MAINTAINER'},
|
||||||
|
{label: '车站值班员', value: 'STATION_SUPERVISOR'}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -56,7 +81,12 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initData(row) {
|
initData(row) {
|
||||||
|
this.filterStationList = [];
|
||||||
|
this.stationList.forEach(item => {
|
||||||
|
if (!item.depot) {
|
||||||
|
this.filterStationList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
doShow(row) {
|
doShow(row) {
|
||||||
this.initData(row);
|
this.initData(row);
|
||||||
@ -64,6 +94,7 @@ export default {
|
|||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
this.$refs.form.validate(() => {
|
this.$refs.form.validate(() => {
|
||||||
|
if (this.formModel.type !== 'STATION_SUPERVISOR') { delete this.formModel.deviceCode; }
|
||||||
addSimulationMember(this.formModel, this.$route.query.group).then(() => {
|
addSimulationMember(this.formModel, this.$route.query.group).then(() => {
|
||||||
this.$message.success('添加仿真角色成员成功!');
|
this.$message.success('添加仿真角色成员成功!');
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
@ -75,7 +106,9 @@ export default {
|
|||||||
handleClose() {
|
handleClose() {
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
type: ''
|
type: '',
|
||||||
|
name: '',
|
||||||
|
deviceCode: ''
|
||||||
};
|
};
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
}
|
}
|
||||||
|
@ -162,7 +162,7 @@ export default {
|
|||||||
depotDispatcherList.push(this.memberData[item.id]);
|
depotDispatcherList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'STATION_SUPERVISOR':
|
case 'STATION_SUPERVISOR':
|
||||||
this.memberData[item.id].labelName = '值班员-' + device.name;
|
this.memberData[item.id].labelName = '值班员-' + (item.name || device.name);
|
||||||
stationSupervisorList.push(this.memberData[item.id]);
|
stationSupervisorList.push(this.memberData[item.id]);
|
||||||
break;
|
break;
|
||||||
case 'DRIVER':
|
case 'DRIVER':
|
||||||
|
@ -20,6 +20,16 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item v-if="formModel.type === 'STATION_SUPERVISOR'" label="值班车站:" prop="deviceCode">
|
||||||
|
<el-select v-model="formModel.deviceCode" placeholder="请选择" size="small">
|
||||||
|
<el-option
|
||||||
|
v-for="item in filterStationList"
|
||||||
|
:key="item.code"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.code"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="仿真成员名称:" prop="name">
|
<el-form-item label="仿真成员名称:" prop="name">
|
||||||
<el-input v-model="formModel.name" placeholder="请输入成员名称" />
|
<el-input v-model="formModel.name" placeholder="请输入成员名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -35,23 +45,35 @@
|
|||||||
import { addSimulationMember } from '@/api/jointSimulation';
|
import { addSimulationMember } from '@/api/jointSimulation';
|
||||||
export default {
|
export default {
|
||||||
name: 'AddMember',
|
name: 'AddMember',
|
||||||
|
props: {
|
||||||
|
stationList: {
|
||||||
|
type: Array,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
lodaing:false,
|
lodaing:false,
|
||||||
formModel: {
|
formModel: {
|
||||||
type: '',
|
type: '',
|
||||||
name:''
|
name:'',
|
||||||
|
deviceCode: ''
|
||||||
},
|
},
|
||||||
|
filterStationList: [],
|
||||||
rules: {
|
rules: {
|
||||||
type: [
|
type: [
|
||||||
{ required: true, message: '请选择成员类型', trigger: 'change' }
|
{ required: true, message: '请选择成员类型', trigger: 'change' }
|
||||||
|
],
|
||||||
|
deviceCode: [
|
||||||
|
{ required: true, message: '请选择值班车站', trigger: 'change' }
|
||||||
]
|
]
|
||||||
// name:[
|
|
||||||
// { required: true, message: '请输入成员名称', trigger: 'blur' }
|
|
||||||
// ]
|
|
||||||
},
|
},
|
||||||
typeList: [{label: '行调', value: 'DISPATCHER'}, {label: '通号', value: 'MAINTAINER'}]
|
typeList: [
|
||||||
|
{label: '行调', value: 'DISPATCHER'},
|
||||||
|
{label: '通号', value: 'MAINTAINER'},
|
||||||
|
{label: '车站值班员', value: 'STATION_SUPERVISOR'}
|
||||||
|
]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -61,12 +83,19 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(row) {
|
doShow(row) {
|
||||||
|
this.filterStationList = [];
|
||||||
|
this.stationList.forEach(item => {
|
||||||
|
if (!item.depot) {
|
||||||
|
this.filterStationList.push(item);
|
||||||
|
}
|
||||||
|
});
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.lodaing = true;
|
this.lodaing = true;
|
||||||
|
if (this.formModel.type !== 'STATION_SUPERVISOR') { delete this.formModel.deviceCode; }
|
||||||
addSimulationMember(this.formModel, this.$route.query.group).then((res) => {
|
addSimulationMember(this.formModel, this.$route.query.group).then((res) => {
|
||||||
this.$message.success('添加仿真角色成员成功!');
|
this.$message.success('添加仿真角色成员成功!');
|
||||||
this.$emit('addScriptMember', res.data);
|
this.$emit('addScriptMember', res.data);
|
||||||
@ -83,7 +112,8 @@ export default {
|
|||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
type: '',
|
type: '',
|
||||||
name:''
|
name:'',
|
||||||
|
deviceCode: ''
|
||||||
};
|
};
|
||||||
this.$refs.form.resetFields();
|
this.$refs.form.resetFields();
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<add-script-member ref="addScriptMember" @addScriptMember="addScriptMember" />
|
<add-script-member ref="addScriptMember" :station-list="stationList" @addScriptMember="addScriptMember" />
|
||||||
<condition-manage ref="conditionManage" @clearConditionActionId="clearConditionActionId" />
|
<condition-manage ref="conditionManage" @clearConditionActionId="clearConditionActionId" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -92,6 +92,7 @@ import {covertMemberData} from '@/views/newMap/displayNew/utils';
|
|||||||
import GetActionNew from './getAction';
|
import GetActionNew from './getAction';
|
||||||
import AllScriptRole from './allScriptRole';
|
import AllScriptRole from './allScriptRole';
|
||||||
import { getToken } from '@/utils/auth';
|
import { getToken } from '@/utils/auth';
|
||||||
|
import { mapGetters } from 'vuex';
|
||||||
import ConditionManage from './conditionManage';
|
import ConditionManage from './conditionManage';
|
||||||
import {executeScriptNew, dumpScriptDataNew, saveScriptDataNew, saveScriptScenesNew, updateMapLocationNew, simulationPause, startReplaceBg, confirmReplaceBg, cancelReplaceBg} from '@/api/simulation';
|
import {executeScriptNew, dumpScriptDataNew, saveScriptDataNew, saveScriptScenesNew, updateMapLocationNew, simulationPause, startReplaceBg, confirmReplaceBg, cancelReplaceBg} from '@/api/simulation';
|
||||||
export default {
|
export default {
|
||||||
@ -141,6 +142,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
|
...mapGetters('map', [
|
||||||
|
'stationList'
|
||||||
|
]),
|
||||||
memberId() {
|
memberId() {
|
||||||
return this.$store.state.scriptRecord.updateRoleId;
|
return this.$store.state.scriptRecord.updateRoleId;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user