设备登录调整
This commit is contained in:
parent
e0eb8f30dc
commit
a543aa79d1
@ -99,3 +99,19 @@ export function getDevicesByType(type) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 添加/修改车站综合监控配置 */
|
||||
export function setIscsLwConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/iscslw`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 添加/修改中心综合监控配置 */
|
||||
export function setIscsCwConfig(id, data) {
|
||||
return request({
|
||||
url: `/api/device/${id}/config/iscscw`,
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
@ -2,9 +2,9 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// 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.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
|
@ -16,7 +16,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="select-box">
|
||||
<el-select v-model="currentSystem" placeholder="请选择" size="mini" @change="changeCurrentSystem">
|
||||
<el-select v-if="!projectDevice" v-model="currentSystem" placeholder="请选择" size="mini" @change="changeCurrentSystem">
|
||||
<el-option
|
||||
v-for="item in systemList"
|
||||
:key="item.value"
|
||||
@ -25,13 +25,14 @@
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="back-box" @click="back">返回主页面</div>
|
||||
<div class="back-box" @click="back">{{ projectDevice? '退出': '返回主页面' }}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getByGroupStationList } from '@/api/jmap/map';
|
||||
import merge from 'webpack-merge';
|
||||
import { getSessionStorage } from '@/utils/auth';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -271,6 +272,9 @@ export default {
|
||||
computed: {
|
||||
group() {
|
||||
return this.$route.query.group;
|
||||
},
|
||||
projectDevice() {
|
||||
return getSessionStorage('projectDevice');
|
||||
}
|
||||
},
|
||||
async created () {
|
||||
@ -300,6 +304,11 @@ export default {
|
||||
});
|
||||
}
|
||||
});
|
||||
if (this.projectDevice && this.projectDevice.type === 'ISCS_LW') {
|
||||
this.currentSystem = 'local';
|
||||
} else if (this.projectDevice && this.projectDevice.type === 'ISCS_CW') {
|
||||
this.currentSystem = 'center';
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(item) {
|
||||
@ -315,24 +324,42 @@ export default {
|
||||
this.selectChildIndex = 0;
|
||||
if (item.children.length) {
|
||||
this.type = item.children[0].type;
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.children[0].type}`, query: {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
const query = {currentSystem:this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group };
|
||||
if (this.projectDevice) {
|
||||
query.projectDevice = this.$route.query.projectDevice;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.children[0].type}`, query: query });
|
||||
}
|
||||
}
|
||||
},
|
||||
selectChildren(item, index) { // 选择子菜单
|
||||
this.selectChildIndex = index;
|
||||
this.type = item.type;
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.type}`, query: {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
const query = {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group };
|
||||
if (this.projectDevice) {
|
||||
query.projectDevice = this.$route.query.projectDevice;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${item.type}`, query: query });
|
||||
},
|
||||
selectStation(item, index) { // 选择子菜单
|
||||
this.selectStationIndex = index;
|
||||
if (!this.type) {
|
||||
this.type = this.$route.params.mode;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${this.type}`, query: {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group } });
|
||||
const query = {currentSystem: this.currentSystem, stationName: this.stationList[this.selectStationIndex].name, stationId: this.stationList[this.selectStationIndex].id, group: this.group };
|
||||
if (this.projectDevice) {
|
||||
query.projectDevice = this.$route.query.projectDevice;
|
||||
}
|
||||
this.$router.push({ path: `/displayIscs/system/config/${this.type}`, query: query });
|
||||
},
|
||||
back() {
|
||||
this.$router.push({ path: `/trainingPlatform` });
|
||||
if (this.projectDevice) {
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
this.$router.push({ path: `/trainingPlatform` });
|
||||
}
|
||||
},
|
||||
changeCurrentSystem() {
|
||||
this.$router.push({
|
||||
|
Loading…
Reference in New Issue
Block a user