设备登录配置调整&列车操作列车图标反转调整
This commit is contained in:
parent
928b380811
commit
b1c0ef11a8
@ -515,10 +515,10 @@ export function getStandListByRunLineOrTrainCode(group, params) {
|
|||||||
params
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 上饶列车控制 */
|
/** 沙盘列车控制 */
|
||||||
export function srTrainControl(group, params) {
|
export function sandTableTrainControl(group, params) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/sr/${group}/control`,
|
url: `/api/sandTable/${group}/control`,
|
||||||
method: 'put',
|
method: 'put',
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
<el-button :type="right?'':'primary'" size="mini" icon="el-icon-arrow-left" @click="adjustDirection('left')" />
|
<el-button :type="right?'':'primary'" size="mini" icon="el-icon-arrow-left" @click="adjustDirection('left')" />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3" style="text-align: center;">
|
<el-col :span="3" style="text-align: center;">
|
||||||
<img style="width: 50px" :src="right? rightTrainPic:leftTrainPic">
|
<img style="width: 50px" :src="trainPic">
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="3">
|
<el-col :span="3">
|
||||||
<el-button :type="right?'primary':''" size="mini" icon="el-icon-arrow-right" @click="adjustDirection('right')" />
|
<el-button :type="right?'primary':''" size="mini" icon="el-icon-arrow-right" @click="adjustDirection('right')" />
|
||||||
@ -40,7 +40,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import LeftTrain from '@/assets/left_train.png';
|
import LeftTrain from '@/assets/left_train.png';
|
||||||
import RightTrain from '@/assets/right_train.png';
|
import RightTrain from '@/assets/right_train.png';
|
||||||
import { srTrainControl } from '@/api/simulation';
|
import { sandTableTrainControl } from '@/api/simulation';
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainOperation',
|
name: 'TrainOperation',
|
||||||
data() {
|
data() {
|
||||||
@ -52,6 +52,7 @@ export default {
|
|||||||
groupNumber: '',
|
groupNumber: '',
|
||||||
changeSpeedFlag: false,
|
changeSpeedFlag: false,
|
||||||
right: true,
|
right: true,
|
||||||
|
reversal: false,
|
||||||
train: null,
|
train: null,
|
||||||
marks: {
|
marks: {
|
||||||
0: '0',
|
0: '0',
|
||||||
@ -68,6 +69,15 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
trainPic() {
|
||||||
|
if ((this.right && this.reversal) || (!this.right && !this.reversal)) {
|
||||||
|
return this.leftTrainPic;
|
||||||
|
} else {
|
||||||
|
return this.rightTrainPic;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
this.$store.dispatch('menuOperation/setSelected', {device: {}});
|
||||||
@ -75,6 +85,10 @@ export default {
|
|||||||
},
|
},
|
||||||
doShow(val) {
|
doShow(val) {
|
||||||
const train = this.$store.getters['map/getDeviceByCode'](val.groupNumber);
|
const train = this.$store.getters['map/getDeviceByCode'](val.groupNumber);
|
||||||
|
if (train && train.trainWindowCode) {
|
||||||
|
const trainWindow = this.$store.getters['map/getDeviceByCode'](train.trainWindowCode);
|
||||||
|
this.reversal = trainWindow.reversal;
|
||||||
|
}
|
||||||
this.groupNumber = train.groupNumber;
|
this.groupNumber = train.groupNumber;
|
||||||
this.train = train;
|
this.train = train;
|
||||||
if (this.right != train.right) {
|
if (this.right != train.right) {
|
||||||
@ -90,16 +104,16 @@ export default {
|
|||||||
this.changeSpeedFlag = true;
|
this.changeSpeedFlag = true;
|
||||||
},
|
},
|
||||||
changeSpeed(val) {
|
changeSpeed(val) {
|
||||||
srTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: this.speed }).then(resp => {
|
sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: this.speed }).then(resp => {
|
||||||
}).catch(err => { this.$message.error(err.message); this.speed = this.train.speed; }).finally(() => { this.changeSpeedFlag = false; });
|
}).catch(err => { this.$message.error(err.message); this.speed = this.train.speed; }).finally(() => { this.changeSpeedFlag = false; });
|
||||||
},
|
},
|
||||||
adjustDirection(value) {
|
adjustDirection(value) {
|
||||||
srTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: value === 'right', speed: this.speed }).then(resp => {
|
sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: value === 'right', speed: this.speed }).then(resp => {
|
||||||
this.right = value === 'right';
|
this.right = value === 'right';
|
||||||
}).catch(err => { this.$message.error(err.message); });
|
}).catch(err => { this.$message.error(err.message); });
|
||||||
},
|
},
|
||||||
brakeTrain() {
|
brakeTrain() {
|
||||||
srTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: 0 }).then(resp => {
|
sandTableTrainControl(this.$route.query.group, { groupNumber: this.groupNumber, right: this.right, speed: 0 }).then(resp => {
|
||||||
this.speed = 0;
|
this.speed = 0;
|
||||||
}).catch(err => { this.$message.error(err.message); });
|
}).catch(err => { this.$message.error(err.message); });
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,8 @@ const user = {
|
|||||||
// resourcesUrl: '',
|
// resourcesUrl: '',
|
||||||
// uploadUrl: '',
|
// uploadUrl: '',
|
||||||
ossUrl:'',
|
ossUrl:'',
|
||||||
baseSite: ''
|
baseSite: '',
|
||||||
|
deviceConfig: null
|
||||||
},
|
},
|
||||||
|
|
||||||
mutations: {
|
mutations: {
|
||||||
@ -102,6 +103,9 @@ const user = {
|
|||||||
},
|
},
|
||||||
setBaseSite: (state, baseSite) => {
|
setBaseSite: (state, baseSite) => {
|
||||||
state.baseSite = baseSite;
|
state.baseSite = baseSite;
|
||||||
|
},
|
||||||
|
setDeviceConfig: (state, deviceConfig) => {
|
||||||
|
state.deviceConfig = deviceConfig;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -164,6 +168,7 @@ const user = {
|
|||||||
commit('SET_COMPANYNAME', user.companyName);
|
commit('SET_COMPANYNAME', user.companyName);
|
||||||
commit('SET_COMPANYPROJECTLIST', user.projectCodes);
|
commit('SET_COMPANYPROJECTLIST', user.projectCodes);
|
||||||
commit('SET_THIRDLOGIN', response.data.thirdLogin);
|
commit('SET_THIRDLOGIN', response.data.thirdLogin);
|
||||||
|
commit('setDeviceConfig', JSON.parse(response.data.deviceVO.config || '{}'));
|
||||||
resolve(user);
|
resolve(user);
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
|
@ -253,8 +253,7 @@ export default {
|
|||||||
projectDevice:this.$route.query.projectDevice,
|
projectDevice:this.$route.query.projectDevice,
|
||||||
type:this.$route.query.type,
|
type:this.$route.query.type,
|
||||||
simType:paramVO.type,
|
simType:paramVO.type,
|
||||||
project: this.project,
|
project: this.project
|
||||||
singleClient:true
|
|
||||||
};
|
};
|
||||||
if (config) {
|
if (config) {
|
||||||
if (config.client) { query.client = config.client; }
|
if (config.client) { query.client = config.client; }
|
||||||
|
@ -294,13 +294,12 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
assignUser(group, mapId) {
|
assignUser(group, mapId) {
|
||||||
this.$store.dispatch('GetUserInfo', getToken()).then(res => {
|
|
||||||
getLoginInfo(getToken()).then(resp => {
|
getLoginInfo(getToken()).then(resp => {
|
||||||
const deviceVO = resp.data.deviceVO;
|
const deviceVO = resp.data.deviceVO;
|
||||||
if (deviceVO) {
|
if (deviceVO) {
|
||||||
const config = JSON.parse(deviceVO.config || '{}');
|
const config = JSON.parse(deviceVO.config || '{}');
|
||||||
if (config && config.roleCode) {
|
if (config && config.roleCode) {
|
||||||
const params = [{userId: res.id, memberId:config.roleCode}];
|
const params = [{userId: resp.data.accountVO.id, memberId:config.roleCode}];
|
||||||
assignUsersPlayRoles(params, group).then(() => {
|
assignUsersPlayRoles(params, group).then(() => {
|
||||||
this.enterSimulation(group, mapId, config);
|
this.enterSimulation(group, mapId, config);
|
||||||
}).catch(res=>{
|
}).catch(res=>{
|
||||||
@ -321,7 +320,6 @@ export default {
|
|||||||
this.$message.error('获取用户信息失败');
|
this.$message.error('获取用户信息失败');
|
||||||
this.$store.dispatch('LogOut');
|
this.$store.dispatch('LogOut');
|
||||||
});
|
});
|
||||||
});
|
|
||||||
},
|
},
|
||||||
enterSimulation(group, mapId, config) {
|
enterSimulation(group, mapId, config) {
|
||||||
getSimulationInfoNew(group).then(response=>{
|
getSimulationInfoNew(group).then(response=>{
|
||||||
@ -333,8 +331,7 @@ export default {
|
|||||||
mapId: mapId,
|
mapId: mapId,
|
||||||
simType:paramVO.type,
|
simType:paramVO.type,
|
||||||
project: this.projectCode,
|
project: this.projectCode,
|
||||||
projectDevice:this.$route.query.projectDevice,
|
projectDevice:this.$route.query.projectDevice
|
||||||
singleClient:true
|
|
||||||
};
|
};
|
||||||
if (config) {
|
if (config) {
|
||||||
if (config.client) { query.client = config.client; }
|
if (config.client) { query.client = config.client; }
|
||||||
|
@ -155,7 +155,7 @@ export default {
|
|||||||
return this.$store.state.training.roleDeviceCode;
|
return this.$store.state.training.roleDeviceCode;
|
||||||
},
|
},
|
||||||
menuShow() {
|
menuShow() {
|
||||||
return !this.$route.query.singleClient && !this.$route.query.projectDevice;
|
return !this.$route.query.singleClient;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -61,8 +61,16 @@ export default {
|
|||||||
watch: {
|
watch: {
|
||||||
'$store.state.training.roles': function (val) {
|
'$store.state.training.roles': function (val) {
|
||||||
const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : [];
|
const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : [];
|
||||||
if (!clientIdList || !clientIdList.length) {
|
if (this.$route.query.projectDevice) {
|
||||||
this.initTerminalList();
|
const deviceClientIdList = this.$store.state.user.deviceConfig.clientList || [];
|
||||||
|
this.initTerminalList(deviceClientIdList);
|
||||||
|
if (this.$route.query.client && !this.nowTerminal.id) {
|
||||||
|
this.changeQueryClient();
|
||||||
|
} else {
|
||||||
|
this.initPictureShow();
|
||||||
|
}
|
||||||
|
} else if (!clientIdList || !clientIdList.length) {
|
||||||
|
this.initTerminalList(clientIdList);
|
||||||
if (this.$store.state.trainingNew.trainingDetail && this.$store.state.trainingNew.trainingDetail.client) {
|
if (this.$store.state.trainingNew.trainingDetail && this.$store.state.trainingNew.trainingDetail.client) {
|
||||||
const client = this.findTerminalFromMap(this.$store.state.trainingNew.trainingDetail.client);
|
const client = this.findTerminalFromMap(this.$store.state.trainingNew.trainingDetail.client);
|
||||||
if (client) {
|
if (client) {
|
||||||
@ -74,7 +82,7 @@ export default {
|
|||||||
this.initPictureShow();
|
this.initPictureShow();
|
||||||
}
|
}
|
||||||
} else if (!this.terminalList.length) {
|
} else if (!this.terminalList.length) {
|
||||||
this.initTerminalList();
|
this.initTerminalList([]);
|
||||||
this.changeQueryClient();
|
this.changeQueryClient();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -131,9 +139,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 初始化客户端数据
|
// 初始化客户端数据
|
||||||
initTerminalList() {
|
initTerminalList(clientIdList) {
|
||||||
this.terminalList = [];
|
this.terminalList = [];
|
||||||
const clientIdList = this.$store.state.training.domConfig ? this.$store.state.training.domConfig.clientList : [];
|
|
||||||
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
const mapClientMap = this.$store.state.map.map ? this.$store.state.map.map.mapClientVOMap : {};
|
||||||
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
const mapClientList = mapClientMap ? mapClientMap[this.$route.query.simType] : [];
|
||||||
if (!mapClientList.length) {
|
if (!mapClientList.length) {
|
||||||
|
@ -31,8 +31,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联客户端:" prop="client">
|
<el-form-item label="客户端列表:" prop="client">
|
||||||
<el-select v-model="formIbp.client" placeholder="请选择" size="small">
|
<el-select v-model="formIbp.clientList" multiple placeholder="请选择" size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in clientList"
|
v-for="item in clientList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -41,6 +41,18 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="初始客户端:" prop="client">
|
||||||
|
<el-select v-model="formIbp.client" placeholder="请选择" size="small">
|
||||||
|
<template v-for="item in clientList">
|
||||||
|
<el-option
|
||||||
|
v-if="formIbp.clientList.includes(item.id)"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-form v-show="['IM','CW','DRIVE','DEPOT'].includes(data.type)" ref="formIm" :model="formIm" label-width="100px" :rules="rulesIm">
|
<el-form v-show="['IM','CW','DRIVE','DEPOT'].includes(data.type)" ref="formIm" :model="formIm" label-width="100px" :rules="rulesIm">
|
||||||
<el-form-item label="关联角色:" prop="roleCode">
|
<el-form-item label="关联角色:" prop="roleCode">
|
||||||
@ -53,8 +65,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联客户端:" prop="client">
|
<el-form-item label="客户端列表:" prop="client">
|
||||||
<el-select v-model="formIm.client" placeholder="请选择" size="small">
|
<el-select v-model="formIm.clientList" multiple placeholder="请选择" size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in clientList"
|
v-for="item in clientList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -63,6 +75,18 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="初始客户端:" prop="client">
|
||||||
|
<el-select v-model="formIm.client" placeholder="请选择" size="small">
|
||||||
|
<template v-for="item in clientList">
|
||||||
|
<el-option
|
||||||
|
v-if="formIm.clientList.includes(item.id)"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-form v-show="data.type === 'LW'" ref="formLw" :model="formLw" label-width="100px" :rules="rulesLw">
|
<el-form v-show="data.type === 'LW'" ref="formLw" :model="formLw" label-width="100px" :rules="rulesLw">
|
||||||
<el-form-item label="关联车站:" prop="stationCode">
|
<el-form-item label="关联车站:" prop="stationCode">
|
||||||
@ -85,8 +109,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联客户端:" prop="client">
|
<el-form-item label="客户端列表:" prop="client">
|
||||||
<el-select v-model="formLw.client" placeholder="请选择" size="small">
|
<el-select v-model="formLw.clientList" multiple placeholder="请选择" size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in clientList"
|
v-for="item in clientList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -95,6 +119,18 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="初始客户端:" prop="client">
|
||||||
|
<el-select v-model="formLw.client" placeholder="请选择" size="small">
|
||||||
|
<template v-for="item in clientList">
|
||||||
|
<el-option
|
||||||
|
v-if="formLw.clientList.includes(item.id)"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-form v-show="data.type === 'ISCS_LW' || data.type === 'ISCS_CW'" ref="formIscs" :model="formIscs" label-width="100px" :rules="rulesIscs">
|
<el-form v-show="data.type === 'ISCS_LW' || data.type === 'ISCS_CW'" ref="formIscs" :model="formIscs" label-width="100px" :rules="rulesIscs">
|
||||||
<el-form-item :label="data.type === 'ISCS_LW'?'现地工作站:': '行调工作站'" prop="deviceCode">
|
<el-form-item :label="data.type === 'ISCS_LW'?'现地工作站:': '行调工作站'" prop="deviceCode">
|
||||||
@ -137,8 +173,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关联客户端:" prop="client">
|
<el-form-item label="客户端列表:" prop="client">
|
||||||
<el-select v-model="formIscs.client" placeholder="请选择" size="small">
|
<el-select v-model="formIscs.clientList" multiple placeholder="请选择" size="small">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in clientList"
|
v-for="item in clientList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@ -147,6 +183,18 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="初始客户端:" prop="client">
|
||||||
|
<el-select v-model="formIscs.client" placeholder="请选择" size="small">
|
||||||
|
<template v-for="item in clientList">
|
||||||
|
<el-option
|
||||||
|
v-if="formIscs.clientList.includes(item.id)"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
@ -170,25 +218,29 @@ export default {
|
|||||||
lwList: [],
|
lwList: [],
|
||||||
formIm:{
|
formIm:{
|
||||||
roleCode:'',
|
roleCode:'',
|
||||||
client:''
|
client:'',
|
||||||
|
clientList: []
|
||||||
},
|
},
|
||||||
formIbp: {
|
formIbp: {
|
||||||
part: '',
|
part: '',
|
||||||
deviceCode: '',
|
deviceCode: '',
|
||||||
roleCode:'',
|
roleCode:'',
|
||||||
client:''
|
client:'',
|
||||||
|
clientList: []
|
||||||
},
|
},
|
||||||
formLw: {
|
formLw: {
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
roleCode:'',
|
roleCode:'',
|
||||||
client:''
|
client:'',
|
||||||
|
clientList: []
|
||||||
},
|
},
|
||||||
formIscs: {
|
formIscs: {
|
||||||
deviceCode: '',
|
deviceCode: '',
|
||||||
picture: '',
|
picture: '',
|
||||||
stationCode: '',
|
stationCode: '',
|
||||||
roleCode:'',
|
roleCode:'',
|
||||||
client:''
|
client:'',
|
||||||
|
clientList: []
|
||||||
},
|
},
|
||||||
clientList: [],
|
clientList: [],
|
||||||
pictureList: [
|
pictureList: [
|
||||||
@ -201,6 +253,9 @@ export default {
|
|||||||
],
|
],
|
||||||
client: [
|
client: [
|
||||||
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||||
|
],
|
||||||
|
clientList: [
|
||||||
|
{ required: true, message: '请选择客户端列表', trigger: 'change'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rulesIbp: {
|
rulesIbp: {
|
||||||
@ -215,6 +270,9 @@ export default {
|
|||||||
],
|
],
|
||||||
client: [
|
client: [
|
||||||
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||||
|
],
|
||||||
|
clientList: [
|
||||||
|
{ required: true, message: '请选择客户端列表', trigger: 'change'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rulesLw: {
|
rulesLw: {
|
||||||
@ -226,6 +284,9 @@ export default {
|
|||||||
],
|
],
|
||||||
client: [
|
client: [
|
||||||
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||||
|
],
|
||||||
|
clientList: [
|
||||||
|
{ required: true, message: '请选择客户端列表', trigger: 'change'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
rulesIscs: {
|
rulesIscs: {
|
||||||
@ -237,6 +298,9 @@ export default {
|
|||||||
],
|
],
|
||||||
client: [
|
client: [
|
||||||
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||||
|
],
|
||||||
|
clientList: [
|
||||||
|
{ required: true, message: '请选择客户端列表', trigger: 'change'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
partList: [{label: '左', value: 'LEFT'}, {label: '右', value: 'RIGHT'}, {label: '全部', value: 'WHOLE'}],
|
partList: [{label: '左', value: 'LEFT'}, {label: '右', value: 'RIGHT'}, {label: '全部', value: 'WHOLE'}],
|
||||||
@ -252,19 +316,19 @@ export default {
|
|||||||
initData(row) {
|
initData(row) {
|
||||||
getDeviceDetail(row.id).then(resp => {
|
getDeviceDetail(row.id).then(resp => {
|
||||||
if (resp.data.config && resp.data.type === 'VR_IBP') {
|
if (resp.data.config && resp.data.type === 'VR_IBP') {
|
||||||
this.formIbp = {part: '', deviceCode: '', roleCode:'', client:''};
|
this.formIbp = {part: '', deviceCode: '', roleCode:'', client:'', clientList: []};
|
||||||
const form = JSON.parse(resp.data.config);
|
const form = JSON.parse(resp.data.config);
|
||||||
this.formIbp = Object.assign(this.formIbp, form);
|
this.formIbp = Object.assign(this.formIbp, form);
|
||||||
} else if (resp.data.config && resp.data.type === 'LW') {
|
} else if (resp.data.config && resp.data.type === 'LW') {
|
||||||
this.formLw = {stationCode: '', roleCode:'', client:''};
|
this.formLw = {stationCode: '', roleCode:'', client:'', clientList: []};
|
||||||
const form = JSON.parse(resp.data.config);
|
const form = JSON.parse(resp.data.config);
|
||||||
this.formLw = Object.assign(this.formLw, form);
|
this.formLw = Object.assign(this.formLw, form);
|
||||||
} else if (resp.data.config && ['IM', 'CW', 'DRIVE', 'DEPOT'].includes(resp.data.type)) {
|
} else if (resp.data.config && ['IM', 'CW', 'DRIVE', 'DEPOT'].includes(resp.data.type)) {
|
||||||
this.formIm = { roleCode:'', client:''};
|
this.formIm = { roleCode:'', client:'', clientList: []};
|
||||||
const form = JSON.parse(resp.data.config);
|
const form = JSON.parse(resp.data.config);
|
||||||
this.formIm = Object.assign(this.formIm, form);
|
this.formIm = Object.assign(this.formIm, form);
|
||||||
} else if (resp.data.config && (resp.data.type === 'ISCS_LW' || resp.data.type === 'ISCS_CW')) {
|
} else if (resp.data.config && (resp.data.type === 'ISCS_LW' || resp.data.type === 'ISCS_CW')) {
|
||||||
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:''};
|
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
|
||||||
const form = JSON.parse(resp.data.config);
|
const form = JSON.parse(resp.data.config);
|
||||||
this.formIscs = Object.assign(this.formIscs, form);
|
this.formIscs = Object.assign(this.formIscs, form);
|
||||||
}
|
}
|
||||||
@ -377,10 +441,10 @@ export default {
|
|||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
this.data = {};
|
this.data = {};
|
||||||
this.lwList = [];
|
this.lwList = [];
|
||||||
this.formIbp = {part: '', deviceCode: '', roleCode:'', client:''};
|
this.formIbp = {part: '', deviceCode: '', roleCode:'', client:'', clientList: []};
|
||||||
this.formLw = {stationCode: '', roleCode:'', client:''};
|
this.formLw = {stationCode: '', roleCode:'', client:'', clientList: []};
|
||||||
this.formIm = { roleCode:'', client:''};
|
this.formIm = { roleCode:'', client:'', clientList: []};
|
||||||
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:''};
|
this.formIscs = {deviceCode: '', picture: '', stationCode: '', roleCode:'', client:'', clientList: []};
|
||||||
this.$refs.formIbp.resetFields();
|
this.$refs.formIbp.resetFields();
|
||||||
this.$refs.formLw.resetFields();
|
this.$refs.formLw.resetFields();
|
||||||
this.$refs.formIscs.resetFields();
|
this.$refs.formIscs.resetFields();
|
||||||
|
@ -41,7 +41,8 @@ export default {
|
|||||||
stationCode: '',
|
stationCode: '',
|
||||||
standCode: '',
|
standCode: '',
|
||||||
roleCode:'',
|
roleCode:'',
|
||||||
client:''
|
client:'',
|
||||||
|
clientList: []
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
addr: [
|
addr: [
|
||||||
@ -64,6 +65,9 @@ export default {
|
|||||||
],
|
],
|
||||||
client: [
|
client: [
|
||||||
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
{ required: true, message: '请选择关联客户端', trigger: 'change'}
|
||||||
|
],
|
||||||
|
clientList: [
|
||||||
|
{ required: true, message: '请选择客户端列表', trigger: 'change'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
stationList: [],
|
stationList: [],
|
||||||
@ -96,7 +100,8 @@ export default {
|
|||||||
{ prop: 'standCode', label: '关联站台:', type: 'select', options: this.standList, optionLabel: 'name', optionValue: 'code', deviceChange: this.standCodeChange},
|
{ prop: 'standCode', label: '关联站台:', type: 'select', options: this.standList, optionLabel: 'name', optionValue: 'code', deviceChange: this.standCodeChange},
|
||||||
{ prop: 'psdCode', label: '关联屏蔽门:', type: 'select', options: this.psdList, optionLabel: 'code', optionValue: 'code' },
|
{ prop: 'psdCode', label: '关联屏蔽门:', type: 'select', options: this.psdList, optionLabel: 'code', optionValue: 'code' },
|
||||||
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
||||||
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'name', optionValue: 'id' }
|
{ prop: 'client', label: '初始客户端:', type: 'select', options: this.clientList, optionLabel: 'name', optionValue: 'id' },
|
||||||
|
{ prop: 'clientList', label: '客户端列表:', type: 'select', options: this.clientList, optionLabel: 'name', optionValue: 'id' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
} else if (this.data.type === 'LSW') {
|
} else if (this.data.type === 'LSW') {
|
||||||
@ -106,7 +111,8 @@ export default {
|
|||||||
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' },
|
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' },
|
||||||
{ prop: 'quadrant', label: '屏幕配置:', type: 'select', options: this.screenList, optionLabel: 'label', optionValue: 'value'},
|
{ prop: 'quadrant', label: '屏幕配置:', type: 'select', options: this.screenList, optionLabel: 'label', optionValue: 'value'},
|
||||||
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
||||||
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
|
{ prop: 'client', label: '初始客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' },
|
||||||
|
{ prop: 'clientList', label: '客户端列表:', type: 'select', options: this.clientList, optionLabel: 'name', optionValue: 'id' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
} else if (this.data.type === 'CCTV') {
|
} else if (this.data.type === 'CCTV') {
|
||||||
@ -115,7 +121,8 @@ export default {
|
|||||||
items: [
|
items: [
|
||||||
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' },
|
{ prop: 'deviceCode', label: '教研机:', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code' },
|
||||||
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
||||||
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
|
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' },
|
||||||
|
{ prop: 'clientList', label: '客户端列表:', type: 'select', options: this.clientList, optionLabel: 'name', optionValue: 'id' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
} else if ( this.data.type === 'SANDBOX') {
|
} else if ( this.data.type === 'SANDBOX') {
|
||||||
@ -124,7 +131,8 @@ export default {
|
|||||||
items: [
|
items: [
|
||||||
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'},
|
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'},
|
||||||
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
||||||
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
|
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' },
|
||||||
|
{ prop: 'clientList', label: '客户端列表:', type: 'select', options: this.clientList, optionLabel: 'name', optionValue: 'id' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
} else if (this.data.type === 'ILW') {
|
} else if (this.data.type === 'ILW') {
|
||||||
@ -133,7 +141,8 @@ export default {
|
|||||||
items: [
|
items: [
|
||||||
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'},
|
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'},
|
||||||
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
{ prop: 'roleCode', label: '关联角色:', type: 'select', options: this.roleList, optionLabel: 'label', optionValue: 'value' },
|
||||||
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' }
|
{ prop: 'client', label: '关联客户端:', type: 'select', options: this.clientList, optionLabel: 'label', optionValue: 'value' },
|
||||||
|
{ prop: 'clientList', label: '客户端列表:', type: 'select', options: this.clientList, optionLabel: 'name', optionValue: 'id' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -160,6 +169,7 @@ export default {
|
|||||||
psdCode: data.psdCode,
|
psdCode: data.psdCode,
|
||||||
roleCode:data.roleCode || '',
|
roleCode:data.roleCode || '',
|
||||||
client:data.client || '',
|
client:data.client || '',
|
||||||
|
clientList: data.clientList || [],
|
||||||
addr: data.addr,
|
addr: data.addr,
|
||||||
quantity: data.quantity
|
quantity: data.quantity
|
||||||
};
|
};
|
||||||
@ -211,30 +221,6 @@ export default {
|
|||||||
this.$message.error('获取客户端列表失败');
|
this.$message.error('获取客户端列表失败');
|
||||||
});
|
});
|
||||||
}).catch(() => { this.$message.error('获取线路功能数据失败!'); });
|
}).catch(() => { this.$message.error('获取线路功能数据失败!'); });
|
||||||
// const self = this;
|
|
||||||
// querySimulationMemberByMapId(mapId).then(resp => {
|
|
||||||
// if (resp.data) {
|
|
||||||
// getMapFunctioById(functionId).then(response=>{
|
|
||||||
// if (resp.data) {
|
|
||||||
// const roleList = resp.data[response.data.simType];
|
|
||||||
// const clientListMapIn = ConstConfig.ConstSelect.clientMap;
|
|
||||||
// this.clientListMap = clientListMapIn[response.data.simType];
|
|
||||||
// const covertRoleList = [];
|
|
||||||
// roleList.forEach(member => {
|
|
||||||
// const data = self.handleMember(member, self.stationList);
|
|
||||||
// covertRoleList.push(data);
|
|
||||||
// });
|
|
||||||
// this.clientList = [];
|
|
||||||
// self.roleList = covertRoleList;
|
|
||||||
// const roleCode = this.formData.roleCode;
|
|
||||||
// const role = this.roleList.find(each=>{ return each.value == roleCode; });
|
|
||||||
// if (role) { this.clientList = this.clientListMap[role.memberType] || []; }
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }).catch(() => {
|
|
||||||
// this.$message.error('获取角色列表失败');
|
|
||||||
// });
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$message.error('获取车站列表失败');
|
this.$message.error('获取车站列表失败');
|
||||||
});
|
});
|
||||||
@ -343,7 +329,8 @@ export default {
|
|||||||
quadrant: this.formData.quadrant,
|
quadrant: this.formData.quadrant,
|
||||||
roleCode: this.formData.roleCode,
|
roleCode: this.formData.roleCode,
|
||||||
mapId:this.formData.mapId,
|
mapId:this.formData.mapId,
|
||||||
client: this.formData.client
|
client: this.formData.client,
|
||||||
|
clientList: this.formData.clientList
|
||||||
};
|
};
|
||||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
|
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(() => {
|
setDeviceConfig(data).then(() => {
|
||||||
@ -360,7 +347,8 @@ export default {
|
|||||||
deviceCode: this.formData.deviceCode,
|
deviceCode: this.formData.deviceCode,
|
||||||
roleCode: this.formData.roleCode,
|
roleCode: this.formData.roleCode,
|
||||||
mapId:this.formData.mapId,
|
mapId:this.formData.mapId,
|
||||||
client: this.formData.client
|
client: this.formData.client,
|
||||||
|
clientList: this.formData.clientList
|
||||||
};
|
};
|
||||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
|
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(() => {
|
setDeviceConfig(data).then(() => {
|
||||||
@ -378,7 +366,8 @@ export default {
|
|||||||
psdCode: this.formData.psdCode,
|
psdCode: this.formData.psdCode,
|
||||||
mapId:this.formData.mapId,
|
mapId:this.formData.mapId,
|
||||||
roleCode: this.formData.roleCode,
|
roleCode: this.formData.roleCode,
|
||||||
client: this.formData.client
|
client: this.formData.client,
|
||||||
|
clientList: this.formData.clientList
|
||||||
};
|
};
|
||||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
|
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(() => {
|
setDeviceConfig(data).then(() => {
|
||||||
@ -410,7 +399,8 @@ export default {
|
|||||||
deviceCode: this.formData.deviceCode,
|
deviceCode: this.formData.deviceCode,
|
||||||
roleCode: this.formData.roleCode,
|
roleCode: this.formData.roleCode,
|
||||||
mapId:this.formData.mapId,
|
mapId:this.formData.mapId,
|
||||||
client: this.formData.client
|
client: this.formData.client,
|
||||||
|
clientList: this.formData.clientList
|
||||||
};
|
};
|
||||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
|
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(() => {
|
setDeviceConfig(data).then(() => {
|
||||||
@ -426,7 +416,8 @@ export default {
|
|||||||
const param = {
|
const param = {
|
||||||
deviceCode: this.formData.deviceCode,
|
deviceCode: this.formData.deviceCode,
|
||||||
roleCode: this.formData.roleCode,
|
roleCode: this.formData.roleCode,
|
||||||
client: this.formData.client
|
client: this.formData.client,
|
||||||
|
clientList: this.formData.clientList
|
||||||
};
|
};
|
||||||
const data = {id: this.data.id, project: this.data.project, code: this.data.code, type: this.data.type, config: JSON.stringify(param) };
|
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(() => {
|
setDeviceConfig(data).then(() => {
|
||||||
|
Loading…
Reference in New Issue
Block a user