添加电子沙盘设备
This commit is contained in:
parent
f645433696
commit
394fa0ec18
@ -175,3 +175,11 @@ export function setPlcConfig(id, data) {
|
|||||||
data: data
|
data: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 添加/修改SANDBOX配置 */
|
||||||
|
export function setSandboxConfig(id, data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/device/${id}/config/sandbox`,
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -232,7 +232,8 @@ export default {
|
|||||||
{label: '虚拟CCTV', value: 'CCTV'},
|
{label: '虚拟CCTV', value: 'CCTV'},
|
||||||
{label: 'PLC网关', value: 'PLC_GATEWAY'},
|
{label: 'PLC网关', value: 'PLC_GATEWAY'},
|
||||||
{label: '端头控制盒', value: 'PSL'},
|
{label: '端头控制盒', value: 'PSL'},
|
||||||
{label: 'PSC控制柜', value: 'PSC'}
|
{label: 'PSC控制柜', value: 'PSC'},
|
||||||
|
{label: '虚拟电子沙盘', value: 'SANDBOX'}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -2,9 +2,9 @@ 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.3.5:9000'; // 袁琪
|
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
|
@ -218,19 +218,20 @@ export default {
|
|||||||
},
|
},
|
||||||
bgImg() {
|
bgImg() {
|
||||||
const bgImgAll = process.env.VUE_APP_PRO === 'local' || this.$route.query.project == 'heb' ? '' : bgImg;
|
const bgImgAll = process.env.VUE_APP_PRO === 'local' || this.$route.query.project == 'heb' ? '' : bgImg;
|
||||||
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
|
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX'];
|
||||||
const imgMap = {
|
const imgMap = {
|
||||||
ISCS_LW: bgIscsImg,
|
ISCS_LW: bgIscsImg,
|
||||||
ISCS_CW: bgIscsImg,
|
ISCS_CW: bgIscsImg,
|
||||||
VR_IBP: bgIbpImg,
|
VR_IBP: bgIbpImg,
|
||||||
CCTV: bgCctvImg,
|
CCTV: bgCctvImg,
|
||||||
VR_PSD: bgPsdImg,
|
VR_PSD: bgPsdImg,
|
||||||
LSW: bgLswImg
|
LSW: bgLswImg,
|
||||||
|
SANDBOX: bgLswImg
|
||||||
};
|
};
|
||||||
return synchronousLogin.includes(this.$route.query.type) ? imgMap[this.$route.query.type] : bgImgAll;
|
return synchronousLogin.includes(this.$route.query.type) ? imgMap[this.$route.query.type] : bgImgAll;
|
||||||
},
|
},
|
||||||
syncLogin() {
|
syncLogin() {
|
||||||
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD'];
|
const synchronousLogin = ['VR_IBP', 'LSW', 'CCTV', 'ISCS_LW', 'ISCS_CW', 'VR_PSD', 'SANDBOX'];
|
||||||
return this.$route.query.type ? synchronousLogin.includes(this.$route.query.type) : false;
|
return this.$route.query.type ? synchronousLogin.includes(this.$route.query.type) : false;
|
||||||
},
|
},
|
||||||
loadingText() {
|
loadingText() {
|
||||||
@ -469,6 +470,14 @@ export default {
|
|||||||
query.psdCode = JSON.parse(res.data.deviceVO.config).psdCode;
|
query.psdCode = JSON.parse(res.data.deviceVO.config).psdCode;
|
||||||
}
|
}
|
||||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||||
|
} else if (this.$route.query.type === 'SANDBOX') {
|
||||||
|
const sandboxQuery = {
|
||||||
|
mapid: query.mapId,
|
||||||
|
group: query.group,
|
||||||
|
project: getSessionStorage('project'),
|
||||||
|
token: getToken()
|
||||||
|
};
|
||||||
|
this.$router.push({ path: `/jlmap3d/sandbox`, query: sandboxQuery });
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
this.$router.push({ path: `/jointTrainingNew`, query: query });
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig, setPlcConfig } from '@/api/project';
|
import { getDevicesByType, getDeviceDetail, setLswConfig, setCctvConfig, setVrPsdConfig, setPlcConfig, setSandboxConfig } from '@/api/project';
|
||||||
import { getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode } from '@/api/jmap/map';
|
import { getAllMapOnline, getStationListNeedAttendant, getPsdListByStandCode, getStandListByStationCode } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -101,6 +101,13 @@ 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' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
} else if ( this.data.type === 'SANDBOX') {
|
||||||
|
form = {
|
||||||
|
labelWidth: '150px',
|
||||||
|
items: [
|
||||||
|
{ prop: 'deviceCode', label: '教研机', type: 'select', options: this.deviceList, optionLabel: 'code', optionValue: 'code'}
|
||||||
|
]
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return form;
|
return form;
|
||||||
}
|
}
|
||||||
@ -232,6 +239,19 @@ export default {
|
|||||||
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
} else if (this.data.type === 'SANDBOX') {
|
||||||
|
this.$refs.dataForm.validateForm(() => {
|
||||||
|
const param = {
|
||||||
|
deviceCode: this.formData.deviceCode
|
||||||
|
};
|
||||||
|
setSandboxConfig(this.data.id, param).then(() => {
|
||||||
|
self.$message.success('设置电子沙盘配置成员');
|
||||||
|
self.handleClose();
|
||||||
|
self.$emit('reloadTable');
|
||||||
|
}).catch(error => {
|
||||||
|
self.$message.error(this.$t('tip.modifyTheFailure') + error.message);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
|||||||
this.$refs.editConfig.doShow(row);
|
this.$refs.editConfig.doShow(row);
|
||||||
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD' || row.type === 'PSL' || row.type === 'PSC') {
|
} else if (row.type === 'SWITCH' || row.type === 'SIGNAL' || row.type === 'PSD' || row.type === 'PSL' || row.type === 'PSC') {
|
||||||
this.$refs.editConfigGateway.doShow(row);
|
this.$refs.editConfigGateway.doShow(row);
|
||||||
} else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD' || row.type === 'PLC_GATEWAY') {
|
} else if (row.type == 'LSW' || row.type == 'CCTV' || row.type == 'VR_PSD' || row.type === 'PLC_GATEWAY' || row.type === 'SANDBOX') {
|
||||||
this.$refs.editConfigScreen.doShow(row);
|
this.$refs.editConfigScreen.doShow(row);
|
||||||
} else if (row.type === 'IBP') {
|
} else if (row.type === 'IBP') {
|
||||||
this.$refs.editConfigIbp.doShow(row);
|
this.$refs.editConfigIbp.doShow(row);
|
||||||
|
Loading…
Reference in New Issue
Block a user