Merge remote-tracking branch 'origin/test_dispaly' into test
This commit is contained in:
commit
d9b6b3fb2c
@ -80,8 +80,9 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.project = getSessionStorage('project');
|
this.project = getSessionStorage('project');
|
||||||
if (this.project) {
|
const linkIcon = loginInfo[this.project] ? loginInfo[this.project].linkIcon : (ProjectIcon[this.project] || '');
|
||||||
document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project];
|
if (this.project && linkIcon) {
|
||||||
|
document.querySelector("link[rel*='icon']").href = linkIcon;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -146,3 +146,50 @@ export function updateMapFunctionSubset(data) {
|
|||||||
data
|
data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 根据模板生成地图功能 */
|
||||||
|
export function generateMapFunctionByTemplate(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapFunction/generate/from/template`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 创建模板线路功能 */
|
||||||
|
export function createTemplateMapFunction(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapFunction/template`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 修改模板线路功能 */
|
||||||
|
export function updateTemplateMapFunction(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapFunction/template/${data.id}`,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 删除模板线路功能 */
|
||||||
|
export function deleteTemplateMapFunction(id) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapFunction/template/${id}`,
|
||||||
|
method: 'delete'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 查询模板线路功能列表 */
|
||||||
|
export function queryTemplateMapFunctionList(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapFunction/template/list`,
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 分页查询模板线路功能列表 */
|
||||||
|
export function queryTemplateMapFunPaged(params) {
|
||||||
|
return request({
|
||||||
|
url: `/api/mapFunction/template/paged`,
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -18,5 +18,7 @@ export default {
|
|||||||
getLoginQrCode: 'Failed to get login qr code, please refresh and try again',
|
getLoginQrCode: 'Failed to get login qr code, please refresh and try again',
|
||||||
language: 'Language',
|
language: 'Language',
|
||||||
clickSwitchLanguage: 'Click switch language',
|
clickSwitchLanguage: 'Click switch language',
|
||||||
accountName: 'Account name'
|
accountName: 'Account name',
|
||||||
|
registerAccount: 'Register account',
|
||||||
|
forgetPassword: 'Forget password?'
|
||||||
};
|
};
|
||||||
|
@ -18,5 +18,7 @@ export default {
|
|||||||
getLoginQrCode: '获取登录二维码失败,请刷新重试',
|
getLoginQrCode: '获取登录二维码失败,请刷新重试',
|
||||||
language: '语言',
|
language: '语言',
|
||||||
clickSwitchLanguage: '点击切换语言',
|
clickSwitchLanguage: '点击切换语言',
|
||||||
accountName: '账户名'
|
accountName: '账户名',
|
||||||
|
registerAccount: '注册账号',
|
||||||
|
forgetPassword: '忘记密码?'
|
||||||
};
|
};
|
||||||
|
@ -169,7 +169,7 @@ export default class Station extends Group {
|
|||||||
return item.includes('lineCode=16');
|
return item.includes('lineCode=16');
|
||||||
});
|
});
|
||||||
const pic = store.state.map.picture;
|
const pic = store.state.map.picture;
|
||||||
if ((queryCtc && model.createControlMode) || (pic == 'trafficTerminal' && queryCtcLineCode)) {
|
if ((queryCtc || (pic == 'trafficTerminal' && queryCtcLineCode)) && model.createControlMode) {
|
||||||
this.createCtcControlMode();
|
this.createCtcControlMode();
|
||||||
} else if (this.style.Station.StationControl.special) {
|
} else if (this.style.Station.StationControl.special) {
|
||||||
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
|
if (model.visible && model.createControlMode) { // model.createControlMode 控制模式
|
||||||
|
@ -74,6 +74,16 @@ export const menuOperate = {
|
|||||||
// 添加备用车 (大铁线路 车次号 非车组号)
|
// 添加备用车 (大铁线路 车次号 非车组号)
|
||||||
operation: OperationEvent.Section.addSpareTrain.menu.operation,
|
operation: OperationEvent.Section.addSpareTrain.menu.operation,
|
||||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN
|
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN
|
||||||
|
},
|
||||||
|
defectiveShunting:{
|
||||||
|
// 分路不良
|
||||||
|
operation: OperationEvent.Section.defectiveShunting.menu.operation,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING
|
||||||
|
},
|
||||||
|
cancelDefectiveShunting:{
|
||||||
|
// 取消分路不良
|
||||||
|
operation: OperationEvent.Section.cancelDefectiveShunting.menu.operation,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Signal:{
|
Signal:{
|
||||||
|
@ -33,6 +33,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import OperationHandler from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
export default {
|
export default {
|
||||||
name: 'DefectivePasswordBox',
|
name: 'DefectivePasswordBox',
|
||||||
components: {
|
components: {
|
||||||
@ -60,13 +61,16 @@ export default {
|
|||||||
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
return this.dialogShow ? OperationEvent.Command.cancel.menu.domId : '';
|
||||||
},
|
},
|
||||||
domIdConfirm() {
|
domIdConfirm() {
|
||||||
return this.dialogShow ? OperationEvent.Switch.defectiveShunting.twoConfirm.domId : '';
|
const domId = OperationHandler.getDomIdByOperation(this.operation);
|
||||||
|
return this.dialogShow ? domId : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
doShow(operate) {
|
doShow(operate) {
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
if (operate.operation == OperationEvent.Section.cancelDefectiveShunting.menu.operation) {
|
||||||
|
this.name = '取消分路不良';
|
||||||
|
} else if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
||||||
this.name = '取消分路不良';
|
this.name = '取消分路不良';
|
||||||
} else {
|
} else {
|
||||||
this.name = '分路不良';
|
this.name = '分路不良';
|
||||||
|
@ -63,7 +63,9 @@ export default {
|
|||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
this.selected = selected;
|
this.selected = selected;
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
if (operate.operation == OperationEvent.Section.cancelDefectiveShunting.menu.operation) {
|
||||||
|
this.title = '取消分路不良';
|
||||||
|
} else if (operate.operation == OperationEvent.Switch.cancelDefectiveShunting.menu.operation) {
|
||||||
this.title = '取消分路不良';
|
this.title = '取消分路不良';
|
||||||
} else {
|
} else {
|
||||||
this.title = '分路不良';
|
this.title = '分路不良';
|
||||||
@ -118,6 +120,10 @@ export default {
|
|||||||
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
|
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case OperationEvent.Section.cancelDefectiveShunting.menu.operation: {
|
||||||
|
operate.cmdType = CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case OperationEvent.Switch.cancelDefectiveShunting.menu.operation: {
|
case OperationEvent.Switch.cancelDefectiveShunting.menu.operation: {
|
||||||
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING;
|
operate.cmdType = CMD.Section.CMD_SECTION_CANCEL_DEFECTIVE_SHUNTING;
|
||||||
break;
|
break;
|
||||||
|
@ -319,6 +319,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
|
this.$store.dispatch('menuOperation/setButtonOperation', null);
|
||||||
this.routeDataMap = null;
|
this.routeDataMap = null;
|
||||||
this.routeButtonCodeList = [];
|
this.routeButtonCodeList = [];
|
||||||
},
|
},
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
<set-fault ref="setFault" pop-class="datie-02__systerm" />
|
||||||
<add-spare-train ref="addSpareTrain" />
|
<add-spare-train ref="addSpareTrain" />
|
||||||
<draw-select ref="drawSelect" />
|
<draw-select ref="drawSelect" />
|
||||||
|
<fork-directive ref="forkDirective" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -20,6 +21,7 @@ import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
|
|||||||
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
|
||||||
import AddSpareTrain from './dialog/addSpareTrain';
|
import AddSpareTrain from './dialog/addSpareTrain';
|
||||||
import DrawSelect from './dialog/drawSelect';
|
import DrawSelect from './dialog/drawSelect';
|
||||||
|
import ForkDirective from './dialog/forkDirective';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SectionMenu',
|
name: 'SectionMenu',
|
||||||
@ -29,7 +31,8 @@ export default {
|
|||||||
TrainAddPlan,
|
TrainAddPlan,
|
||||||
SetFault,
|
SetFault,
|
||||||
AddSpareTrain,
|
AddSpareTrain,
|
||||||
DrawSelect
|
DrawSelect,
|
||||||
|
ForkDirective
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -55,6 +58,20 @@ export default {
|
|||||||
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN,
|
cmdType: CMD.Section.CMD_TRAIN_LOAD_TRIP_NUMBER_TRAIN,
|
||||||
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
||||||
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
isShow: (section, work) => ['01', '02', '03'].includes(section.type)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '分路不良',
|
||||||
|
handler: this.forkDirective,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||||
|
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
||||||
|
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'ctcWork'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '空闲',
|
||||||
|
handler: this.cancleForkDirective,
|
||||||
|
cmdType: CMD.Section.CMD_SECTION_DEFECTIVE_SHUNTING,
|
||||||
|
isDisabled: (section, station, work) => station.controlMode === 'Interlock' && work === 'ctcWork',
|
||||||
|
isShow: (section, work) => ['01', '02', '03'].includes(section.type) && work === 'ctcWork'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
menuForce: [
|
menuForce: [
|
||||||
@ -138,6 +155,22 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 分路不良
|
||||||
|
forkDirective() {
|
||||||
|
commitOperate(menuOperate.Section.defectiveShunting, {sectionCode:this.selected.code, shuntingTypeList: ['SECTION_SHUNTING']}, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 区段确认空闲,取消分路不良
|
||||||
|
cancleForkDirective() {
|
||||||
|
commitOperate(menuOperate.Section.cancelDefectiveShunting, {sectionCode:this.selected.code, shuntingTypeList: []}, 0).then(({valid, operate})=>{
|
||||||
|
if (valid) {
|
||||||
|
this.$refs.forkDirective.doShow(operate, this.selected);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
// 设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
commitOperate(menuOperate.Common.setFault, { code: this.selected.code }, 0).then(({valid, operate})=>{
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
ref="keMenu"
|
ref="keMenu"
|
||||||
class="navbar"
|
class="navbar"
|
||||||
router
|
router
|
||||||
|
background-color="#00172E"
|
||||||
:default-active="activePath"
|
:default-active="activePath"
|
||||||
mode="horizontal"
|
mode="horizontal"
|
||||||
background-color="#545c64"
|
|
||||||
text-color="#fff"
|
text-color="#fff"
|
||||||
active-text-color="#ffd04b"
|
active-text-color="#ffd04b"
|
||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
@ -35,7 +35,7 @@
|
|||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
<el-submenu v-else :key="idx" :index="item.path" :show-timeout="100">
|
<el-submenu v-else :key="idx" :index="item.path" popper-append-to-body :show-timeout="100">
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<span v-if="item.meta" slot="title">{{ $t(item.meta.i18n) }}</span>
|
<span v-if="item.meta" slot="title">{{ $t(item.meta.i18n) }}</span>
|
||||||
</template>
|
</template>
|
||||||
@ -222,9 +222,39 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
$height: 61px;
|
$height: 61px;
|
||||||
|
.el-menu.el-menu--horizontal{
|
||||||
|
border-bottom: solid 1px #01468B;
|
||||||
|
}
|
||||||
|
.el-menu {
|
||||||
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
}
|
||||||
|
.el-menu-item{
|
||||||
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
&:hover{
|
||||||
|
background-color: #00172E;
|
||||||
|
}
|
||||||
|
&:focus{
|
||||||
|
background-color: #00172E;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/deep/ {
|
||||||
|
.el-submenu {
|
||||||
|
&:hover{
|
||||||
|
background: #00172E;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-submenu__title{
|
||||||
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
&:hover{
|
||||||
|
background: #00172E;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-menu-item.is-active{
|
||||||
|
background: #00172E;
|
||||||
|
}
|
||||||
|
}
|
||||||
.rightGroup{
|
.rightGroup{
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0 20px;
|
padding: 0 20px;
|
||||||
@ -280,9 +310,11 @@ export default {
|
|||||||
line-height: 36px;
|
line-height: 36px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
&:hover {
|
||||||
|
background: #00172E;
|
||||||
|
|
||||||
}
|
}
|
||||||
.targetDiv :hover {
|
|
||||||
background-color: #434A50;
|
|
||||||
}
|
}
|
||||||
.helpDiv {
|
.helpDiv {
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
@ -72,10 +72,10 @@ export default {
|
|||||||
return this.$store.state.app.dialogMessage;
|
return this.$store.state.app.dialogMessage;
|
||||||
},
|
},
|
||||||
companyInfo() {
|
companyInfo() {
|
||||||
return loginInfo[getSessionStorage('project')].bottomColumn;
|
return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomColumn : '';
|
||||||
},
|
},
|
||||||
bottomIcon() {
|
bottomIcon() {
|
||||||
return loginInfo[getSessionStorage('project')].bottomIcon;
|
return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomIcon : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
|
@ -126,6 +126,7 @@ const SimulationPlatform = () => import('@/views/trainingPlatform/simulation');
|
|||||||
|
|
||||||
const PublishMap = () => import('@/views/publish/publishMap/index');
|
const PublishMap = () => import('@/views/publish/publishMap/index');
|
||||||
const SubsystemManage = () => import('@/views/publish/publishMap/subsystem');
|
const SubsystemManage = () => import('@/views/publish/publishMap/subsystem');
|
||||||
|
const MapFunTemManage = () => import('@/views/publish/publishMap/mapFunctionTemplate/index');
|
||||||
const SystemSubsetManage = () => import('@/views/publish/publishMap/systemSubset');
|
const SystemSubsetManage = () => import('@/views/publish/publishMap/systemSubset');
|
||||||
const IscsDataManage = () => import('@/views/publish/publishMap/iscsDataManage/index');
|
const IscsDataManage = () => import('@/views/publish/publishMap/iscsDataManage/index');
|
||||||
const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史
|
const PublishMapDetail = () => import('@/views/publish/publishMap/list'); // 发布历史
|
||||||
@ -1875,6 +1876,11 @@ export const asyncRouter = [
|
|||||||
component: SubsystemManage,
|
component: SubsystemManage,
|
||||||
hidden: true
|
hidden: true
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'mapFunTem',
|
||||||
|
component: MapFunTemManage,
|
||||||
|
hidden: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'systemSubset',
|
path: 'systemSubset',
|
||||||
component: SystemSubsetManage,
|
component: SystemSubsetManage,
|
||||||
|
@ -2482,6 +2482,13 @@ export const OperationEvent = {
|
|||||||
// operation: '428',
|
// operation: '428',
|
||||||
// domId: '_Tips-Section-Defective-Shunting-MenuButton'
|
// domId: '_Tips-Section-Defective-Shunting-MenuButton'
|
||||||
// },
|
// },
|
||||||
|
},
|
||||||
|
// 取消分路不良 大铁线路
|
||||||
|
cancelDefectiveShunting:{
|
||||||
|
menu: {
|
||||||
|
operation: '429',
|
||||||
|
domId: '_Tips-Section-CancelDefectiveShunting-Menu{TOP}'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -179,7 +179,6 @@ const user = {
|
|||||||
commit('SET_TOKEN', '');
|
commit('SET_TOKEN', '');
|
||||||
commit('SET_ID', '');
|
commit('SET_ID', '');
|
||||||
commit('SET_ROLES', []);
|
commit('SET_ROLES', []);
|
||||||
removeToken();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 登出系统
|
// 登出系统
|
||||||
@ -191,6 +190,7 @@ const user = {
|
|||||||
dispatch('disconnect').then(()=>{
|
dispatch('disconnect').then(()=>{
|
||||||
dispatch('FedLogOut').then(resp => {
|
dispatch('FedLogOut').then(resp => {
|
||||||
logout(token).then(() => {
|
logout(token).then(() => {
|
||||||
|
removeToken();
|
||||||
resolve();
|
resolve();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
@ -215,6 +215,7 @@ const user = {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
dispatch('FedLogOut').then(resp => {
|
dispatch('FedLogOut').then(resp => {
|
||||||
logout(token).then(() => {
|
logout(token).then(() => {
|
||||||
|
removeToken();
|
||||||
resolve();
|
resolve();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error);
|
reject(error);
|
||||||
@ -234,7 +235,6 @@ const user = {
|
|||||||
},
|
},
|
||||||
disconnect({commit}, params) {
|
disconnect({commit}, params) {
|
||||||
commit('Disconnect', params);
|
commit('Disconnect', params);
|
||||||
removeToken();
|
|
||||||
},
|
},
|
||||||
setBaseUrl ({commit}, baseUrl) {
|
setBaseUrl ({commit}, baseUrl) {
|
||||||
commit('setBaseUrl', baseUrl);
|
commit('setBaseUrl', baseUrl);
|
||||||
|
@ -5,13 +5,13 @@ const TokenKey = 'Admin-Token';
|
|||||||
|
|
||||||
// 设置教学,实训,仿真系统token, 设置城市轨道交通设计平台token
|
// 设置教学,实训,仿真系统token, 设置城市轨道交通设计平台token
|
||||||
export function getToken() {
|
export function getToken() {
|
||||||
return SessionStorage.getItem(TokenKey);
|
return localStorage.getItem(TokenKey);
|
||||||
}
|
}
|
||||||
export function setToken(token) {
|
export function setToken(token) {
|
||||||
return SessionStorage.setItem(TokenKey, token);
|
return localStorage.setItem(TokenKey, token);
|
||||||
}
|
}
|
||||||
export function removeToken() {
|
export function removeToken() {
|
||||||
return SessionStorage.removeItem(TokenKey);
|
return localStorage.removeItem(TokenKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 操作sessionStorage
|
// 操作sessionStorage
|
||||||
|
@ -22,6 +22,7 @@ const service = axios.create({
|
|||||||
// request拦截器108
|
// request拦截器108
|
||||||
service.interceptors.request.use(config => {
|
service.interceptors.request.use(config => {
|
||||||
if (getToken()) {
|
if (getToken()) {
|
||||||
|
config.headers['Authorization'] = `Bearer ${getToken()}`; // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
config.headers['X-Token'] = getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
|
config.headers['X-Token'] = getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-popover> -->
|
</el-popover> -->
|
||||||
<div class="popover_box active" @click="registerUser">
|
<div class="popover_box active" @click="registerUser">
|
||||||
注册账号
|
{{ $t('login.registerAccount') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -71,7 +71,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-if="!localProject" style="display: inline-block;width: 100%;">
|
<div v-if="!localProject" style="display: inline-block;width: 100%;">
|
||||||
<div class="popover_box active" style="bottom: 50px;" @click="forgetPassword">
|
<div class="popover_box active" style="bottom: 50px;" @click="forgetPassword">
|
||||||
忘记密码?
|
{{ $t('login.forgetPassword') }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
<el-menu
|
<el-menu
|
||||||
:default-active="defaultIndex"
|
:default-active="defaultIndex"
|
||||||
class="el-menu-vertical-demo lessonManageMenu"
|
class="el-menu-vertical-demo lessonManageMenu"
|
||||||
background-color="#545c64"
|
|
||||||
text-color="#fff"
|
text-color="#fff"
|
||||||
router
|
router
|
||||||
active-text-color="#ffd04b"
|
active-text-color="#ffd04b"
|
||||||
@ -86,7 +85,15 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
|
.el-menu {
|
||||||
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
}
|
||||||
|
.el-menu-item{
|
||||||
|
&:hover{
|
||||||
|
background: #00172E;
|
||||||
|
}
|
||||||
|
}
|
||||||
.teachMenu{width: 18px;height: 18px;margin-right: 8px;}
|
.teachMenu{width: 18px;height: 18px;margin-right: 8px;}
|
||||||
.lessonIcon{font-size: 16px;}
|
.lessonIcon{font-size: 16px;}
|
||||||
.lessonManageOther{
|
.lessonManageOther{
|
||||||
|
@ -37,20 +37,21 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="背景:" prop="bgUrl">
|
<el-form-item label="背景:" prop="bgUrl">
|
||||||
<div style="display: flex;align-items: flex-start;">
|
<div class="eachButton uploadLogo">
|
||||||
<el-select v-model="ruleForm.bgUrl" size="mini" clearable>
|
<img v-if="ruleForm.bgUrl" :src="computedLoginLogo" :alt="computedLoginLogo" class="loginLogo">
|
||||||
<el-option
|
<i class="el-icon-plus avatar-uploader-icon el-icon-other" />
|
||||||
v-for="item in bgUrlList"
|
<input id="upload_file" ref="files" type="file" class="file_box" accept="image/jpeg,image/png" @change="uploadLogo">
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
<img :src="ossUrl+ruleForm.bgUrl" style="width: 200px;margin-left: 15px;">
|
|
||||||
</div>
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="分组:" prop="subset">
|
||||||
|
<el-input v-model="ruleForm.subset" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
<el-card style="padding: 10px;">
|
<el-card style="padding: 10px;">
|
||||||
<el-table
|
<el-table
|
||||||
:data="endTableData"
|
:data="endTableData"
|
||||||
@ -131,7 +132,7 @@ import { queryPaperList } from '@/api/management/exam';
|
|||||||
import { getTrainingDetailNew } from '@/api/jmap/training';
|
import { getTrainingDetailNew } from '@/api/jmap/training';
|
||||||
import ChooseTraining from './chooseTraining';
|
import ChooseTraining from './chooseTraining';
|
||||||
import { ClientList, TrainingTypeList } from '@/scripts/ConstDic';
|
import { ClientList, TrainingTypeList } from '@/scripts/ConstDic';
|
||||||
|
import { getUploadUrl } from '@/api/projectConfig';
|
||||||
export default {
|
export default {
|
||||||
name: 'EditSubsystem',
|
name: 'EditSubsystem',
|
||||||
components: {
|
components: {
|
||||||
@ -143,6 +144,7 @@ export default {
|
|||||||
title: '',
|
title: '',
|
||||||
trainingName: '',
|
trainingName: '',
|
||||||
mapSystemId: '',
|
mapSystemId: '',
|
||||||
|
loginProLogoImg: '',
|
||||||
memberList: [],
|
memberList: [],
|
||||||
examList: [],
|
examList: [],
|
||||||
lpfDataList: [],
|
lpfDataList: [],
|
||||||
@ -179,29 +181,17 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
type: '',
|
type: '',
|
||||||
desc: '',
|
desc: '',
|
||||||
bgUrl: ''
|
bgUrl: '',
|
||||||
|
subset: ''
|
||||||
},
|
},
|
||||||
memberMetroList: [],
|
memberMetroList: [],
|
||||||
memberRailwayList: [],
|
memberRailwayList: [],
|
||||||
memberEmergencyList: [],
|
memberEmergencyList: []
|
||||||
bgUrlList: [
|
|
||||||
{ label: '运行图编制', value: '/logo/chartPreparation.png' },
|
|
||||||
{ label: '调度仿真', value: '/logo/dispatchingPlan.png' },
|
|
||||||
{ label: '考试', value: '/logo/exam.png' },
|
|
||||||
{ label: '综合演练', value: '/logo/joinRoom.png' },
|
|
||||||
{ label: '场景实训', value: '/logo/sceneTraining.png' },
|
|
||||||
{ label: '派班', value: '/logo/schedulingSimulation.png' },
|
|
||||||
{ label: '单操仿真', value: '/logo/singleTraining.png' },
|
|
||||||
{ label: '车站仿真', value: '/logo/stationSimulation.png' },
|
|
||||||
{ label: '车辆段', value: '/logo/trainDepot.png' },
|
|
||||||
{ label: '实训设计', value: '/logo/trainingDesign.png' },
|
|
||||||
{ label: '模拟驾驶', value: '/logo/simulatedDriving.png' }
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
ossUrl() {
|
computedLoginLogo() {
|
||||||
return this.$store.state.user.ossUrl;
|
return this.loginProLogoImg ? this.$store.state.user.ossUrl + this.loginProLogoImg : '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
@ -259,6 +249,8 @@ export default {
|
|||||||
this.ruleForm.name = row.name;
|
this.ruleForm.name = row.name;
|
||||||
this.ruleForm.desc = row.desc || '';
|
this.ruleForm.desc = row.desc || '';
|
||||||
this.ruleForm.bgUrl = row.bgUrl || '';
|
this.ruleForm.bgUrl = row.bgUrl || '';
|
||||||
|
this.loginProLogoImg = row.bgUrl || '';
|
||||||
|
this.ruleForm.subset = row.subset || '';
|
||||||
this.ruleForm.type = row.paramVO.type;
|
this.ruleForm.type = row.paramVO.type;
|
||||||
this.typeChange(this.ruleForm.type);
|
this.typeChange(this.ruleForm.type);
|
||||||
this.frontTableData.forEach(item => {
|
this.frontTableData.forEach(item => {
|
||||||
@ -378,7 +370,8 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
type: '',
|
type: '',
|
||||||
desc: '',
|
desc: '',
|
||||||
bgUrl: ''
|
bgUrl: '',
|
||||||
|
subset: ''
|
||||||
};
|
};
|
||||||
this.frontTableData = [
|
this.frontTableData = [
|
||||||
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
|
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
|
||||||
@ -425,6 +418,7 @@ export default {
|
|||||||
name: this.ruleForm.name,
|
name: this.ruleForm.name,
|
||||||
desc: this.ruleForm.desc,
|
desc: this.ruleForm.desc,
|
||||||
bgUrl: this.ruleForm.bgUrl,
|
bgUrl: this.ruleForm.bgUrl,
|
||||||
|
subset: this.ruleForm.subset,
|
||||||
paramVO: {
|
paramVO: {
|
||||||
type: this.ruleForm.type,
|
type: this.ruleForm.type,
|
||||||
itemMap:itemMap,
|
itemMap:itemMap,
|
||||||
@ -461,13 +455,99 @@ export default {
|
|||||||
this.trainingName = data.name;
|
this.trainingName = data.name;
|
||||||
const training = this.endTableData.find(item => item.type === 'trainingChoose');
|
const training = this.endTableData.find(item => item.type === 'trainingChoose');
|
||||||
training.value = data.id;
|
training.value = data.id;
|
||||||
|
},
|
||||||
|
uploadLogo() {
|
||||||
|
const pic = document.getElementById('upload_file');
|
||||||
|
if (!pic.files || !pic.files[0]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const file = pic.files[0];
|
||||||
|
const mineType = file.type;
|
||||||
|
const fileSize = file.size;
|
||||||
|
if (mineType != 'image/png' && mineType != 'image/jpeg') {
|
||||||
|
this.$message.error('仅支持png和jpeg格式的图片');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (fileSize / (1024 * 1024) > 1) {
|
||||||
|
this.$message.error('图片应该小于1M');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const fileArray = file.name.split('.');
|
||||||
|
const fileType = fileArray[fileArray.length - 1] || '';
|
||||||
|
if (!fileType) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
directory:'funBg',
|
||||||
|
fileName:'favicon_' + this.ruleForm.name + Math.ceil(Math.random() * 1000) + '.' + fileType,
|
||||||
|
method:'PUT'
|
||||||
|
};
|
||||||
|
const that = this;
|
||||||
|
getUploadUrl(params).then((response) => {
|
||||||
|
const url = response.data;
|
||||||
|
if (url) {
|
||||||
|
// var formData = new FormData();
|
||||||
|
// formData.append('body', file);
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('PUT', url);
|
||||||
|
xhr.setRequestHeader('Content-Type', 'multipart/form-data');
|
||||||
|
xhr.send(file);
|
||||||
|
xhr.onreadystatechange = function() {
|
||||||
|
if (xhr.readyState === 4 && xhr.status == 200) {
|
||||||
|
that.ruleForm.bgUrl = '/funBg/' + params.fileName;
|
||||||
|
that.loginProLogoImg = '/funBg/' + params.fileName + '?' + Math.random() * 1000;
|
||||||
|
} else if (xhr.status != 200) {
|
||||||
|
that.$message.error('上传失败,请稍后再试');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="scss">
|
||||||
.dialog-footer {
|
.dialog-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
.loginLogo{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.el-icon-other{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 98px;
|
||||||
|
font-size: 16px;
|
||||||
|
position: absolute;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.eachButton{
|
||||||
|
margin-left:10px;
|
||||||
|
width:200px;
|
||||||
|
height:100px;
|
||||||
|
border:1px #ccc dashed;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.uploadLogo {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
// float: right;
|
||||||
|
margin-right: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
opacity: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -66,7 +66,7 @@ export default {
|
|||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '80px',
|
||||||
reset: true,
|
reset: true,
|
||||||
leftSpan: 17,
|
leftSpan: 15,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
name: {
|
name: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
@ -223,7 +223,8 @@ export default {
|
|||||||
{ text: '地图排序', handler: this.mapSort },
|
{ text: '地图排序', handler: this.mapSort },
|
||||||
{ text: '导出', handler: this.localExport, show: () => { return this.$store.state.user.roles.includes(superAdmin); }},
|
{ text: '导出', handler: this.localExport, show: () => { return this.$store.state.user.roles.includes(superAdmin); }},
|
||||||
{ text: '导入', handler: this.localImport, fileType: 'file', show: () => { return this.$store.state.user.roles.includes(superAdmin); }},
|
{ text: '导入', handler: this.localImport, fileType: 'file', show: () => { return this.$store.state.user.roles.includes(superAdmin); }},
|
||||||
{ text: '一键校验', handler: this.allCheck }
|
{ text: '一键校验', handler: this.allCheck },
|
||||||
|
{ text: '线路功能模板', handler: this.templateLineFunctionShow }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -416,6 +417,9 @@ export default {
|
|||||||
this.$message.error('一键校验地图数据失败:' + e.message);
|
this.$message.error('一键校验地图数据失败:' + e.message);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
templateLineFunctionShow() {
|
||||||
|
this.$router.push({path:'/systemManagement/lineDataManage/mapFunTem'});
|
||||||
|
},
|
||||||
localExport() {
|
localExport() {
|
||||||
this.$refs['localMap'].doShow();
|
this.$refs['localMap'].doShow();
|
||||||
},
|
},
|
||||||
|
438
src/views/publish/publishMap/mapFunctionTemplate/edit.vue
Normal file
438
src/views/publish/publishMap/mapFunctionTemplate/edit.vue
Normal file
@ -0,0 +1,438 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
:before-close="close"
|
||||||
|
:visible.sync="visible"
|
||||||
|
center
|
||||||
|
fullscreen
|
||||||
|
>
|
||||||
|
<div style="padding: 0 150px">
|
||||||
|
<el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="120px" size="small">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="模板名称:" prop="templateName">
|
||||||
|
<el-input v-model="ruleForm.templateName" style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="线路功能名称:" prop="name">
|
||||||
|
<el-input v-model="ruleForm.name" style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="系统:" prop="type">
|
||||||
|
<el-select v-model="ruleForm.type" placeholder="请选择类型">
|
||||||
|
<el-option label="地铁CBTC" value="METRO" />
|
||||||
|
<el-option label="大铁CTC" value="RAILWAY" />
|
||||||
|
<el-option label="应急调度" value="EMERGENCY" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="默认成员类型:" prop="defaultMemberType">
|
||||||
|
<el-select v-model="ruleForm.defaultMemberType" size="mini" clearable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in memberTypeList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="描述:" prop="desc">
|
||||||
|
<el-input
|
||||||
|
v-model="ruleForm.desc"
|
||||||
|
type="textarea"
|
||||||
|
:rows="4"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="背景:" prop="bgUrl">
|
||||||
|
<div class="eachButton uploadLogo">
|
||||||
|
<img v-if="ruleForm.bgUrl" :src="computedLoginLogo" :alt="computedLoginLogo" class="loginLogo">
|
||||||
|
<i class="el-icon-plus avatar-uploader-icon el-icon-other" />
|
||||||
|
<input id="upload_file" ref="files" type="file" class="file_box" accept="image/jpeg,image/png" @change="uploadLogo">
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="分组:" prop="subset">
|
||||||
|
<el-input v-model="ruleForm.subset" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-card style="padding: 10px;">
|
||||||
|
<el-table
|
||||||
|
:data="endTableData"
|
||||||
|
border
|
||||||
|
size="mini"
|
||||||
|
style="width: 100%;margin-top: 10px;max-height: 300px;overflow: scroll;"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="label"
|
||||||
|
label="后端配置项"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="value"
|
||||||
|
label="value"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-checkbox v-if="scope.row.type === 'checkbox'" v-model="scope.row.value" />
|
||||||
|
<el-select
|
||||||
|
v-else-if="scope.row.type === 'select'"
|
||||||
|
v-model="scope.row.value"
|
||||||
|
size="mini"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in scope.row.optionList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<el-card style="padding: 10px;margin-top: 20px;">
|
||||||
|
<el-table
|
||||||
|
:data="frontTableData"
|
||||||
|
border
|
||||||
|
size="mini"
|
||||||
|
style="width: 100%;margin-top: 10px;max-height: 300px;overflow: scroll;"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="label"
|
||||||
|
label="前端配置项"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="value"
|
||||||
|
label="value"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-checkbox v-if="scope.row.type === 'checkbox'" v-model="scope.row.value" />
|
||||||
|
<el-select
|
||||||
|
v-else-if="scope.row.type === 'select'"
|
||||||
|
v-model="scope.row.value"
|
||||||
|
size="mini"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in scope.row.optionList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="close">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="commit">确 定</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { createTemplateMapFunction, updateTemplateMapFunction } from '@/api/trainingPlatform';
|
||||||
|
import { ClientList, TrainingTypeList } from '@/scripts/ConstDic';
|
||||||
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
|
import { getUploadUrl } from '@/api/projectConfig';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'EditSubsystem',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
visible: false,
|
||||||
|
title: '',
|
||||||
|
loginProLogoImg: '',
|
||||||
|
memberTypeList: ConstConfig.ConstSelect.roleTypeList,
|
||||||
|
frontTableData: [
|
||||||
|
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'singleClient', label: '是否单客户端', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: ClientList},
|
||||||
|
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
|
||||||
|
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
||||||
|
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'hasMemberManage', label: '是否有成员管理', value: false, type: 'checkbox' }
|
||||||
|
],
|
||||||
|
endTableData: [
|
||||||
|
// { key: 'DEFAULT_MEMBER', label: '默认仿真成员', value: '', type: 'select', optionList: [] },
|
||||||
|
// { key: 'LPF', label: '大客流', value: '', type: 'select', optionList: [] },
|
||||||
|
{ key: 'REAL_DEVICE', label: '真实设备', value: '', type: 'checkbox' }
|
||||||
|
// { key: 'TRAINING', label: '加载实训', value: '', type: 'trainingChoose' },
|
||||||
|
// { key: 'EXAM', label: '加载考试', value: '', type: 'select', optionList: [] }
|
||||||
|
],
|
||||||
|
rules: {
|
||||||
|
templateName: [
|
||||||
|
{ required: true, message: '请输入模板线路功能名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入线路功能名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
type: [
|
||||||
|
{ required: true, message: '请选择线路功能类型', trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
ruleForm: {
|
||||||
|
templateName: '',
|
||||||
|
templateId: '',
|
||||||
|
defaultMemberType: '',
|
||||||
|
name: '',
|
||||||
|
type: '',
|
||||||
|
desc: '',
|
||||||
|
bgUrl: '',
|
||||||
|
subset: ''
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
computedLoginLogo() {
|
||||||
|
return this.loginProLogoImg ? this.$store.state.user.ossUrl + this.loginProLogoImg : '';
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
doShow(row) {
|
||||||
|
if (row && row.id) {
|
||||||
|
this.ruleForm.templateId = row.id;
|
||||||
|
this.ruleForm.templateName = row.name;
|
||||||
|
this.ruleForm.defaultMemberType = row.assistantParam.defaultMemberType;
|
||||||
|
this.loginProLogoImg = row.mapFunctionParam.bgUrl;
|
||||||
|
this.ruleForm.name = row.mapFunctionParam.name;
|
||||||
|
this.ruleForm.desc = row.mapFunctionParam.desc || '';
|
||||||
|
this.ruleForm.bgUrl = row.mapFunctionParam.bgUrl || '';
|
||||||
|
this.ruleForm.subset = row.mapFunctionParam.subset || '';
|
||||||
|
this.ruleForm.type = row.mapFunctionParam.paramVO.type;
|
||||||
|
this.frontTableData.forEach(item => {
|
||||||
|
item.value = row.mapFunctionParam.paramVO.domConfig[item.key];
|
||||||
|
});
|
||||||
|
this.endTableData.forEach(item => {
|
||||||
|
if (row.mapFunctionParam.paramVO.itemMap && row.mapFunctionParam.paramVO.itemMap[item.key]) {
|
||||||
|
if (row.mapFunctionParam.paramVO.itemMap[item.key] === 'true') {
|
||||||
|
item.value = true;
|
||||||
|
} else if (row.mapFunctionParam.paramVO.itemMap[item.key] === 'false') {
|
||||||
|
item.value = false;
|
||||||
|
} else {
|
||||||
|
item.value = row.mapFunctionParam.paramVO.itemMap[item.key] === null ? '' : row.mapFunctionParam.paramVO.itemMap[item.key];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.title = '修改模板线路功能';
|
||||||
|
} else {
|
||||||
|
this.title = '创建模板线路功能';
|
||||||
|
}
|
||||||
|
this.visible = true;
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.ruleForm = {
|
||||||
|
templateId: '',
|
||||||
|
templateName: '',
|
||||||
|
defaultMemberType: '',
|
||||||
|
name: '',
|
||||||
|
type: '',
|
||||||
|
desc: '',
|
||||||
|
bgUrl: '',
|
||||||
|
subset: ''
|
||||||
|
};
|
||||||
|
this.loginProLogoImg = '';
|
||||||
|
this.frontTableData = [
|
||||||
|
{ key: 'singleMember', label: '是否单角色', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'singleClient', label: '是否单客户端', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'client', label: '初始客户端', value: '', type: 'select', optionList: ClientList},
|
||||||
|
{ key: 'hasTraining', label: '是否有实训', value: false, type: 'checkbox'},
|
||||||
|
{ key: 'trainingType', label: '实训类型', value: '', type: 'select', optionList: TrainingTypeList },
|
||||||
|
{ key: 'hasExam', label: '是否有考试', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'trainingDesign', label: '是否实训设计', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'hasLpf', label: '是否有大客流', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'hasVoice', label: '是否有语音指令', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'joint', label: '是否综合演练', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'hasDeviceManage', label: '是否有设备管理', value: false, type: 'checkbox' },
|
||||||
|
{ key: 'hasMemberManage', label: '是否有成员管理', value: false, type: 'checkbox' }
|
||||||
|
];
|
||||||
|
this.endTableData = [
|
||||||
|
// { key: 'DEFAULT_MEMBER', label: '默认仿真成员', value: '', type: 'select', optionList: [] },
|
||||||
|
// { key: 'LPF', label: '大客流', value: '', type: 'select', optionList: this.lpfDataList },
|
||||||
|
{ key: 'REAL_DEVICE', label: '真实设备', value: '', type: 'checkbox' }
|
||||||
|
// { key: 'TRAINING', label: '加载实训', value: '', type: 'trainingChoose' },
|
||||||
|
// { key: 'EXAM', label: '加载考试', value: '', type: 'select', optionList: this.examList }
|
||||||
|
];
|
||||||
|
this.visible = false;
|
||||||
|
this.$refs.ruleForm.resetFields();
|
||||||
|
},
|
||||||
|
commit() {
|
||||||
|
this.$refs.ruleForm.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
const itemMap = {
|
||||||
|
DEFAULT_MEMBER: '',
|
||||||
|
LPF: '',
|
||||||
|
TRAINING: '',
|
||||||
|
EXAM: ''
|
||||||
|
};
|
||||||
|
this.endTableData.forEach(item => {
|
||||||
|
itemMap[item.key] = item.value === '' ? null : item.value;
|
||||||
|
});
|
||||||
|
const domConfig = {};
|
||||||
|
this.frontTableData.forEach(item => {
|
||||||
|
domConfig[item.key] = item.value;
|
||||||
|
});
|
||||||
|
if (!domConfig.trainingType) {
|
||||||
|
delete domConfig.trainingType;
|
||||||
|
}
|
||||||
|
const data = {
|
||||||
|
name: this.ruleForm.templateName,
|
||||||
|
assistantParam: {
|
||||||
|
defaultMemberType: this.ruleForm.defaultMemberType
|
||||||
|
},
|
||||||
|
mapFunctionParam: {
|
||||||
|
name: this.ruleForm.name,
|
||||||
|
desc: this.ruleForm.desc,
|
||||||
|
bgUrl: this.ruleForm.bgUrl,
|
||||||
|
subset: this.ruleForm.subset,
|
||||||
|
paramVO: {
|
||||||
|
type: this.ruleForm.type,
|
||||||
|
itemMap:itemMap,
|
||||||
|
domConfig: domConfig
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (this.title === '创建模板线路功能') {
|
||||||
|
createTemplateMapFunction(data).then(resp => {
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('tableReload');
|
||||||
|
this.$message.success('创建模板线路功能成功!');
|
||||||
|
this.close();
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('创建模板线路功能失败!');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
data.id = this.ruleForm.templateId;
|
||||||
|
updateTemplateMapFunction(data).then(resp => {
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit('tableReload');
|
||||||
|
this.close();
|
||||||
|
this.$message.success('修改模板线路功能成功!');
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('修改模板线路功能失败!');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
uploadLogo() {
|
||||||
|
const pic = document.getElementById('upload_file');
|
||||||
|
if (!pic.files || !pic.files[0]) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const file = pic.files[0];
|
||||||
|
const mineType = file.type;
|
||||||
|
const fileSize = file.size;
|
||||||
|
if (mineType != 'image/png' && mineType != 'image/jpeg') {
|
||||||
|
this.$message.error('仅支持png和jpeg格式的图片');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (fileSize / (1024 * 1024) > 1) {
|
||||||
|
this.$message.error('图片应该小于1M');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const fileArray = file.name.split('.');
|
||||||
|
const fileType = fileArray[fileArray.length - 1] || '';
|
||||||
|
if (!fileType) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const params = {
|
||||||
|
directory:'funBg',
|
||||||
|
fileName:'favicon_' + this.ruleForm.templateName + '.' + fileType,
|
||||||
|
method:'PUT'
|
||||||
|
};
|
||||||
|
const that = this;
|
||||||
|
getUploadUrl(params).then((response) => {
|
||||||
|
const url = response.data;
|
||||||
|
if (url) {
|
||||||
|
// var formData = new FormData();
|
||||||
|
// formData.append('body', file);
|
||||||
|
const xhr = new XMLHttpRequest();
|
||||||
|
xhr.open('PUT', url);
|
||||||
|
xhr.setRequestHeader('Content-Type', 'multipart/form-data');
|
||||||
|
xhr.send(file);
|
||||||
|
xhr.onreadystatechange = function() {
|
||||||
|
if (xhr.readyState === 4 && xhr.status == 200) {
|
||||||
|
that.ruleForm.bgUrl = '/funBg/' + params.fileName;
|
||||||
|
that.loginProLogoImg = '/funBg/' + params.fileName + '?' + Math.random() * 1000;
|
||||||
|
} else if (xhr.status != 200) {
|
||||||
|
that.$message.error('上传失败,请稍后再试');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 参数:directory:MINIO文件夹
|
||||||
|
// fileName:存储文件名
|
||||||
|
// method:生成链接的请求方式
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.dialog-footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.loginLogo{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
.el-icon-other{
|
||||||
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
height: 100%;
|
||||||
|
line-height: 98px;
|
||||||
|
font-size: 16px;
|
||||||
|
position: absolute;
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.eachButton{
|
||||||
|
margin-left:10px;
|
||||||
|
width:200px;
|
||||||
|
height:100px;
|
||||||
|
border:1px #ccc dashed;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
.uploadLogo {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
// float: right;
|
||||||
|
margin-right: 3px;
|
||||||
|
cursor: pointer;
|
||||||
|
input {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
opacity: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
153
src/views/publish/publishMap/mapFunctionTemplate/index.vue
Normal file
153
src/views/publish/publishMap/mapFunctionTemplate/index.vue
Normal file
@ -0,0 +1,153 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
|
<edit-subsystem ref="editSubsystem" @tableReload="reloadTable" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { queryTemplateMapFunPaged, deleteTemplateMapFunction } from '@/api/trainingPlatform';
|
||||||
|
import EditSubsystem from './edit';
|
||||||
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
|
const simTypeMap = {
|
||||||
|
METRO: '地铁CBTC',
|
||||||
|
RAILWAY: '大铁CTC',
|
||||||
|
EMERGENCY: '应急调度'
|
||||||
|
};
|
||||||
|
export default {
|
||||||
|
name: 'PublishMap',
|
||||||
|
components: {
|
||||||
|
EditSubsystem
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pagerConfig: {
|
||||||
|
pageSize: 'pageSize',
|
||||||
|
pageIndex: 'pageNum'
|
||||||
|
},
|
||||||
|
queryForm: {
|
||||||
|
labelWidth: '80px',
|
||||||
|
reset: true,
|
||||||
|
leftSpan: 16,
|
||||||
|
queryObject: {
|
||||||
|
name: {
|
||||||
|
type: 'text',
|
||||||
|
label: '名称'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
queryList: {
|
||||||
|
query: this.queryFunction,
|
||||||
|
selectCheckShow: false,
|
||||||
|
indexShow: true,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '模板名称',
|
||||||
|
prop: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '线路功能名称',
|
||||||
|
prop: 'name',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return row.mapFunctionParam.name; },
|
||||||
|
tagType: () => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '分组',
|
||||||
|
prop: 'subset',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return row.mapFunctionParam.subset; },
|
||||||
|
tagType: () => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '系统',
|
||||||
|
prop: 'simType',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return simTypeMap[row.mapFunctionParam.paramVO.type]; },
|
||||||
|
tagType: () => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '默认扮演成员类型',
|
||||||
|
prop: 'DEFAULT_MEMBER',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.assistantParam ? row.assistantParam.defaultMemberType : '', ConstConfig.ConstSelect.roleTypeList, ['value', 'label']); },
|
||||||
|
tagType: () => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '真实设备',
|
||||||
|
prop: 'REAL_DEVICE',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return row.mapFunctionParam.paramVO && row.mapFunctionParam.paramVO.itemMap && row.mapFunctionParam.paramVO.itemMap.REAL_DEVICE ? '是' : '否'; },
|
||||||
|
tagType: () => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '描述',
|
||||||
|
prop: 'desc',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return row.mapFunctionParam.desc; },
|
||||||
|
tagType: () => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
title: '操作',
|
||||||
|
width: '300',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: '更新',
|
||||||
|
handleClick: this.updateRow
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '删除',
|
||||||
|
handleClick: this.deleteRow
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
actions: [
|
||||||
|
{ text: '新建', handler: this.handleAddSubsystem },
|
||||||
|
{ text: '返回', handler: this.goBack }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
queryFunction(params) {
|
||||||
|
params['detail'] = true;
|
||||||
|
return queryTemplateMapFunPaged(params);
|
||||||
|
},
|
||||||
|
deleteRow(index, row) {
|
||||||
|
this.$confirm('删除线路功能,是否继续?', '提 示', {
|
||||||
|
confirmButtonText: '确 定',
|
||||||
|
cancelButtonText: '取 消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteTemplateMapFunction(row.id).then(resp => {
|
||||||
|
this.reloadTable();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error(`删除模板线路功能失败:${error.message}`);
|
||||||
|
});
|
||||||
|
}).catch( () => { });
|
||||||
|
},
|
||||||
|
updateRow(index, row) {
|
||||||
|
this.$refs.editSubsystem.doShow(row);
|
||||||
|
},
|
||||||
|
handleAddSubsystem() {
|
||||||
|
this.$refs.editSubsystem.doShow();
|
||||||
|
},
|
||||||
|
reloadTable() {
|
||||||
|
this.queryList.reload();
|
||||||
|
},
|
||||||
|
goBack() {
|
||||||
|
this.$router.go(-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
/deep/
|
||||||
|
.el-button+.el-button{
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -10,13 +10,19 @@
|
|||||||
center
|
center
|
||||||
>
|
>
|
||||||
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="ruleForm" :model="form" :rules="rules" label-width="120px">
|
||||||
<el-form-item label="系统:" prop="simTypes">
|
<el-form-item label="功能模板:" prop="templateIds">
|
||||||
<el-select v-model="form.simTypes" multiple placeholder="请选择生成仿真类型">
|
<el-select v-model="form.templateIds" multiple clearable placeholder="请选择生成功能模板">
|
||||||
<el-option label="地铁CBTC" value="METRO" />
|
<el-option
|
||||||
<el-option label="大铁CTC" value="RAILWAY" />
|
v-for="item in templateList"
|
||||||
<el-option label="应急调度" value="EMERGENCY" />
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="同名覆写:" prop="overwrite">
|
||||||
|
<el-checkbox v-model="form.overwrite" />
|
||||||
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button @click="doCloseGenerate">取 消</el-button>
|
<el-button @click="doCloseGenerate">取 消</el-button>
|
||||||
@ -27,7 +33,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { queryMapFunctionPaged, deleteMapFunction, generateMapFunctionNew, deleteAllMapFunction } from '@/api/trainingPlatform';
|
import { queryMapFunctionPaged, deleteMapFunction, deleteAllMapFunction, queryTemplateMapFunctionList, generateMapFunctionByTemplate } from '@/api/trainingPlatform';
|
||||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
import EditSubsystem from './editSubsystem';
|
import EditSubsystem from './editSubsystem';
|
||||||
const simTypeMap = {
|
const simTypeMap = {
|
||||||
@ -35,25 +41,6 @@ const simTypeMap = {
|
|||||||
RAILWAY: '大铁CTC',
|
RAILWAY: '大铁CTC',
|
||||||
EMERGENCY: '应急调度'
|
EMERGENCY: '应急调度'
|
||||||
};
|
};
|
||||||
// const clientMap = {
|
|
||||||
// C_ATS: '中心ATS工作站',
|
|
||||||
// C_ATS_BS: '中心ATS大屏',
|
|
||||||
// C_PA: '中心PA系统',
|
|
||||||
// C_CCTV: '中心视频监控系统',
|
|
||||||
// L_ATS: '现地ATS工作站',
|
|
||||||
// LCW: '本地控制工作站',
|
|
||||||
// L_CCTV: '现地视频监控系统',
|
|
||||||
// L_PA: '现地PA系统',
|
|
||||||
// GPC: '调度台终端',
|
|
||||||
// IPC: '联锁工作站',
|
|
||||||
// STPC: '车务终端',
|
|
||||||
// DMP: '车务管理终端',
|
|
||||||
// ISCS: 'ISCS',
|
|
||||||
// IBP: 'IBP',
|
|
||||||
// PSL: 'PSL',
|
|
||||||
// RUN_PLAN_DESIGN: '运行图编制',
|
|
||||||
// DRIVE: '列车驾驶'
|
|
||||||
// };
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PublishMap',
|
name: 'PublishMap',
|
||||||
components: {
|
components: {
|
||||||
@ -61,20 +48,21 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
title: '一键生成线路功能',
|
title: '一键生成线路功能',
|
||||||
visible: false,
|
visible: false,
|
||||||
|
templateList: [],
|
||||||
rules: {
|
rules: {
|
||||||
type: [
|
templateIds: [
|
||||||
{ required: true, message: '请选择生成仿真系统类型', trigger: 'change' }
|
{ required: true, message: '请选择模板线路功能', trigger: 'change' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
simTypes: []
|
templateIds: [],
|
||||||
|
overwrite: false
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '80px',
|
||||||
@ -185,11 +173,6 @@ export default {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
isShow() {
|
|
||||||
return this.$store.getters['roles'].indexOf('05');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
created() {
|
created() {
|
||||||
this.mapList = [];
|
this.mapList = [];
|
||||||
getPublishMapListOnline().then(resp => {
|
getPublishMapListOnline().then(resp => {
|
||||||
@ -213,6 +196,7 @@ export default {
|
|||||||
},
|
},
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
params['mapId'] = this.$route.query.mapId;
|
params['mapId'] = this.$route.query.mapId;
|
||||||
|
params['detail'] = true;
|
||||||
return queryMapFunctionPaged(params);
|
return queryMapFunctionPaged(params);
|
||||||
},
|
},
|
||||||
deleteRow(index, row) {
|
deleteRow(index, row) {
|
||||||
@ -229,19 +213,30 @@ export default {
|
|||||||
}).catch( () => { });
|
}).catch( () => { });
|
||||||
},
|
},
|
||||||
generateMapSystem() {
|
generateMapSystem() {
|
||||||
|
if (!this.templateList.length) {
|
||||||
|
queryTemplateMapFunctionList({detail: false}).then(resp => {
|
||||||
|
this.templateList = resp.data || [];
|
||||||
|
}).catch(() => {
|
||||||
|
this.$message.error('获取模板线路功能列表失败!');
|
||||||
|
});
|
||||||
|
}
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
systemSubset() {
|
systemSubset() {
|
||||||
this.$router.push({ path:'/systemManagement/lineDataManage/systemSubset', query:{ mapId: this.$route.query.mapId, lineCode: this.$route.query.lineCode }});
|
this.$router.push({ path:'/systemManagement/lineDataManage/systemSubset', query:{ mapId: this.$route.query.mapId, lineCode: this.$route.query.lineCode }});
|
||||||
},
|
},
|
||||||
doCloseGenerate() {
|
doCloseGenerate() {
|
||||||
this.form.simTypes = [];
|
this.form = {
|
||||||
|
templateIds: [],
|
||||||
|
overwrite: false
|
||||||
|
};
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
},
|
},
|
||||||
generateCommit() {
|
generateCommit() {
|
||||||
this.$refs.ruleForm.validate((valid) => {
|
this.$refs.ruleForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
generateMapFunctionNew(this.$route.query.mapId, this.form).then(resp => {
|
const data = { templateIds: this.form.templateIds, mapIds: [this.$route.query.mapId], overwrite: this.form.overwrite };
|
||||||
|
generateMapFunctionByTemplate(data).then(resp => {
|
||||||
if (resp.data && resp.data.length) {
|
if (resp.data && resp.data.length) {
|
||||||
let message = '';
|
let message = '';
|
||||||
resp.data.forEach(item => {
|
resp.data.forEach(item => {
|
||||||
|
@ -66,7 +66,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
queryMapFunctionList({mapId: this.$route.query.mapId}).then(resp => {
|
queryMapFunctionList({mapId: this.$route.query.mapId, detail: false}).then(resp => {
|
||||||
this.functionList = resp.data;
|
this.functionList = resp.data;
|
||||||
this.functionList.forEach(item => {
|
this.functionList.forEach(item => {
|
||||||
if (item.subset && this.subsetList.includes(item.subset)) {
|
if (item.subset && this.subsetList.includes(item.subset)) {
|
||||||
|
193
src/views/system/companyManage/selectUser.vue
Normal file
193
src/views/system/companyManage/selectUser.vue
Normal file
@ -0,0 +1,193 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog title="权限分发到指定用户" append-to-body :visible.sync="dialogVisible" width="1400px" :before-close="doClose" center :close-on-click-modal="false">
|
||||||
|
<QueryListPage ref="queryListPage1" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import { getUserList } from '@/api/management/user';
|
||||||
|
import { getCompanyList } from '@/api/company';
|
||||||
|
export default {
|
||||||
|
name:'SelectUser',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible:false,
|
||||||
|
pagerConfig: {
|
||||||
|
pageSize: 'pageSize',
|
||||||
|
pageIndex: 'pageNum'
|
||||||
|
},
|
||||||
|
companyMap: {},
|
||||||
|
companyList: [],
|
||||||
|
countTypeList:[
|
||||||
|
{label:'个人账户', value:'1'},
|
||||||
|
{label:'企业账户', value:'2'},
|
||||||
|
{label:'企业账户下子账户', value:'3'}
|
||||||
|
],
|
||||||
|
queryForm: {
|
||||||
|
labelWidth: '80px',
|
||||||
|
leftSpan: 20,
|
||||||
|
reset: true,
|
||||||
|
queryObject: {
|
||||||
|
name: {
|
||||||
|
type: 'text',
|
||||||
|
label: this.$t('system.name')
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: 'text',
|
||||||
|
label: 'id'
|
||||||
|
},
|
||||||
|
account:{
|
||||||
|
type: 'text',
|
||||||
|
label: '账号'
|
||||||
|
},
|
||||||
|
parentAccount:{
|
||||||
|
type: 'text',
|
||||||
|
label: '父账号'
|
||||||
|
},
|
||||||
|
roles: {
|
||||||
|
type: 'select',
|
||||||
|
label: this.$t('system.roles'),
|
||||||
|
config: {
|
||||||
|
data: this.$ConstSelect.roleList
|
||||||
|
}
|
||||||
|
},
|
||||||
|
nickname: {
|
||||||
|
type: 'text',
|
||||||
|
label: '昵称'
|
||||||
|
},
|
||||||
|
mobile: {
|
||||||
|
type: 'text',
|
||||||
|
label: '手机号'
|
||||||
|
},
|
||||||
|
email: {
|
||||||
|
type: 'text',
|
||||||
|
label: '邮箱'
|
||||||
|
},
|
||||||
|
companyId: {
|
||||||
|
type: 'select',
|
||||||
|
label: '组织',
|
||||||
|
config: {
|
||||||
|
data: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
type:{
|
||||||
|
type: 'select',
|
||||||
|
label: '类型',
|
||||||
|
config: {
|
||||||
|
data: []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
queryList: {
|
||||||
|
query: getUserList,
|
||||||
|
selectCheckShow: false,
|
||||||
|
height: '420',
|
||||||
|
indexShow: true,
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: 'id',
|
||||||
|
prop: 'id',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '账号',
|
||||||
|
prop: 'account',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '父账号',
|
||||||
|
prop: 'parentAccount',
|
||||||
|
width: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('system.name'),
|
||||||
|
prop: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('system.nickname'),
|
||||||
|
prop: 'nickname'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '类型',
|
||||||
|
prop: 'type',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.getCountType(row.type); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('global.mobile'),
|
||||||
|
prop: 'mobile'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('global.email'),
|
||||||
|
prop: 'email'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '组织',
|
||||||
|
prop: 'companyId',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => { return this.getCompanyName(row.companyId); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: this.$t('system.roles'),
|
||||||
|
prop: 'roles',
|
||||||
|
type: 'tagMore',
|
||||||
|
columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
||||||
|
tagType: (row) => { return 'success'; }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
title: this.$t('global.operate'),
|
||||||
|
width: '90',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: '选择',
|
||||||
|
handleClick: this.selectUser
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.companyMap = {};
|
||||||
|
this.companyList = [];
|
||||||
|
getCompanyList().then(resp => {
|
||||||
|
if (resp && resp.data && resp.data.length) {
|
||||||
|
resp.data.forEach(item => {
|
||||||
|
this.companyMap[item.id] = item.name;
|
||||||
|
this.companyList.push({label: item.name, value: parseInt(item.id)});
|
||||||
|
});
|
||||||
|
this.queryForm.queryObject.companyId.config.data = this.companyList;
|
||||||
|
this.queryForm.queryObject.type.config.data = this.countTypeList;
|
||||||
|
}
|
||||||
|
}).catch((error) => {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods:{
|
||||||
|
doShow() {
|
||||||
|
this.dialogVisible = true;
|
||||||
|
},
|
||||||
|
doClose() {
|
||||||
|
this.dialogVisible = false;
|
||||||
|
},
|
||||||
|
getCountType(type) {
|
||||||
|
const countType = this.countTypeList.find(each=>{ return each.value == type; });
|
||||||
|
return countType ? countType.label : '';
|
||||||
|
},
|
||||||
|
getCompanyName(companyId) {
|
||||||
|
return this.companyMap[companyId];
|
||||||
|
},
|
||||||
|
selectUser(index, row) {
|
||||||
|
this.$emit('setUserInfo', row);
|
||||||
|
this.doClose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -1,67 +1,70 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog v-dialogDrag title="绑定组织成员" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
|
<el-dialog v-dialogDrag title="绑定组织成员" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<el-form ref="form" :model="formModel" :rules="rules" label-width="100px;">
|
||||||
|
<el-form-item label="组织" prop="orgName">
|
||||||
|
<el-input v-model="formModel.orgName" disabled style="width: 200px" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户" prop="uid">
|
||||||
|
<el-input v-model="allName" placeholder="请添加" disabled style="width: 200px">
|
||||||
|
<el-button slot="append" type="primary" icon="el-icon-search" @click="searchUser" />
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="角色" prop="role">
|
||||||
|
<el-select v-model="formModel.role" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="item in schoolRoleList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doConfirm">{{ $t('global.confirm') }}</el-button>
|
<el-button type="primary" @click="doConfirm">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
|
<select-user ref="selectUser" @setUserInfo="setUserInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getBindUserRoles, getManageUserList } from '@/api/management/user';
|
import { getBindUserRoles } from '@/api/management/user';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
|
import SelectUser from './selectUser';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name:'SelectUserRole',
|
name:'SelectUserRole',
|
||||||
|
components: {
|
||||||
|
SelectUser
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
userList: [],
|
schoolRoleList: ConstConfig.ConstSelect.schoolRoleList,
|
||||||
|
userInfo: {},
|
||||||
formModel: {
|
formModel: {
|
||||||
keyId: '',
|
keyId: '',
|
||||||
orgName: '',
|
orgName: '',
|
||||||
orgId: '',
|
orgId: '',
|
||||||
uid: '',
|
uid: '',
|
||||||
role:''
|
role:''
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
},
|
||||||
computed: {
|
rules: {
|
||||||
form() {
|
|
||||||
const form = {
|
|
||||||
labelWidth: '150px',
|
|
||||||
items: [
|
|
||||||
{ prop: 'orgName', label: '组织', type: 'text', disabled:true, rightWidth:true },
|
|
||||||
{ prop: 'uid', label: '用户', type: 'select', options: this.userList},
|
|
||||||
{ prop: 'role', label: '角色', type: 'select', options: ConstConfig.ConstSelect.schoolRoleList}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
return form;
|
|
||||||
},
|
|
||||||
rules() {
|
|
||||||
const crules = {
|
|
||||||
uid: [
|
uid: [
|
||||||
{ required: true, message: '请选择用户', trigger: 'change' }
|
{ required: true, message: '请选择用户', trigger: 'change' }
|
||||||
],
|
],
|
||||||
role: [
|
role: [
|
||||||
{ required: true, message: '请选择角色', trigger: 'change' }
|
{ required: true, message: '请选择角色', trigger: 'change' }
|
||||||
]
|
]
|
||||||
|
}
|
||||||
};
|
};
|
||||||
return crules;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
created() {
|
computed: {
|
||||||
getManageUserList().then(resp => {
|
allName() {
|
||||||
if (resp && resp.data && resp.data.length) {
|
return this.formModel.uid ? this.userInfo.nickname + '(' + this.userInfo.name + ')' : '';
|
||||||
resp.data.forEach(item => {
|
|
||||||
this.userList.push({label: item.name, value: item.id});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}).catch((error) => {
|
|
||||||
console.error(error);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
doShow(row) {
|
doShow(row) {
|
||||||
@ -74,6 +77,7 @@ export default {
|
|||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
|
this.userInfo = {};
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
keyId: '',
|
keyId: '',
|
||||||
orgName: '',
|
orgName: '',
|
||||||
@ -81,25 +85,20 @@ export default {
|
|||||||
uid: '',
|
uid: '',
|
||||||
role:''
|
role:''
|
||||||
};
|
};
|
||||||
},
|
this.$refs.form.resetFields();
|
||||||
getUserName(id) {
|
|
||||||
let name = '';
|
|
||||||
const findItem = this.userList.find(item => {
|
|
||||||
return item.value == id;
|
|
||||||
});
|
|
||||||
if (findItem) {
|
|
||||||
name = findItem.label;
|
|
||||||
}
|
|
||||||
return name;
|
|
||||||
},
|
},
|
||||||
doConfirm() {
|
doConfirm() {
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.form.validate(() => {
|
||||||
const formModel = Object.assign({}, this.formModel);
|
const data = {
|
||||||
delete formModel.orgName;
|
keyId: this.formModel.keyId,
|
||||||
getBindUserRoles(formModel).then(res=>{
|
orgId: this.formModel.orgId,
|
||||||
|
uid: this.formModel.uid,
|
||||||
|
role: this.formModel.role
|
||||||
|
};
|
||||||
|
getBindUserRoles(data).then(res => {
|
||||||
const nodeData = {
|
const nodeData = {
|
||||||
keyId: this.formModel.keyId + 'USER' + this.formModel.uid,
|
keyId: this.formModel.keyId + 'USER' + this.formModel.uid,
|
||||||
name: this.getUserName(this.formModel.uid),
|
name: this.userInfo.nickname + '(' + this.userInfo.name + ')',
|
||||||
orgRole: this.formModel.role,
|
orgRole: this.formModel.role,
|
||||||
type: 'USER',
|
type: 'USER',
|
||||||
userId: this.formModel.uid
|
userId: this.formModel.uid
|
||||||
@ -110,8 +109,23 @@ export default {
|
|||||||
this.$message.error('绑定组织成员失败: ' + error.message);
|
this.$message.error('绑定组织成员失败: ' + error.message);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
},
|
||||||
|
setUserInfo(user) {
|
||||||
|
this.userInfo = user;
|
||||||
|
this.formModel.uid = user.id;
|
||||||
|
},
|
||||||
|
searchUser() {
|
||||||
|
this.$refs.selectUser.doShow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-input-group__append button.el-button{
|
||||||
|
border-bottom-left-radius: 0;
|
||||||
|
border-top-left-radius: 0;
|
||||||
|
background: #409EFF;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
getRelatedFunctionList(mapId) {
|
getRelatedFunctionList(mapId) {
|
||||||
queryMapFunctionList({mapId: mapId}).then(resp => {
|
queryMapFunctionList({mapId: mapId, detail: true}).then(resp => {
|
||||||
this.functionList = resp.data;
|
this.functionList = resp.data;
|
||||||
console.log(resp);
|
console.log(resp);
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
<el-menu
|
<el-menu
|
||||||
:default-active="defaultIndex"
|
:default-active="defaultIndex"
|
||||||
class="el-menu-vertical-demo"
|
class="el-menu-vertical-demo"
|
||||||
background-color="#545c64"
|
|
||||||
text-color="#fff"
|
text-color="#fff"
|
||||||
active-text-color="#ffd04b"
|
active-text-color="#ffd04b"
|
||||||
>
|
>
|
||||||
@ -86,16 +85,27 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
.el-menu{
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
.el-menu-item{
|
||||||
|
&:hover{
|
||||||
|
background: #00172E;
|
||||||
|
}
|
||||||
|
&:focus{
|
||||||
|
background-color: #00172E;
|
||||||
|
}
|
||||||
|
}
|
||||||
.mapListName{
|
.mapListName{
|
||||||
padding: 10px 0 10px 17px;
|
padding: 10px 0 10px 17px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: #545c64;
|
background: #01468B;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: left;
|
justify-content: left;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
position: sticky;
|
position: sticky;
|
||||||
position: -webkit-sticky;
|
position: -webkit-sticky;
|
||||||
border-bottom: 3px solid #8c8a89;
|
border-bottom: 1px solid #00172E;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
}
|
}
|
||||||
@ -103,16 +113,27 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: scroll;
|
overflow-y: scroll;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
background: #545c64;
|
background: linear-gradient(to bottom, #01468B, #00172E);
|
||||||
|
&::-webkit-scrollbar{
|
||||||
|
background: #06284a;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-thumb{
|
||||||
|
background: #0c0909;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-track{
|
||||||
|
background: #06284a;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.map-list-main{
|
.map-list-main{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display:flex;
|
display:flex;
|
||||||
flex-direction:column;
|
flex-direction:column;
|
||||||
}
|
}
|
||||||
/deep/.el-menu{
|
/deep/{
|
||||||
|
.el-menu{
|
||||||
border-right-width: 0;
|
border-right-width: 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -62,5 +62,6 @@ export default {
|
|||||||
left:0;
|
left:0;
|
||||||
top:0;
|
top:0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
background: #00172E;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div style="height: 100%;width: 100%;padding-bottom: 20px;">
|
<div class="sim-box">
|
||||||
<div style="height: 50px;text-align: center;line-height: 50px;font-size: 26px;font-weight: bolder;">{{ mapName }}</div>
|
<div style="height: 50px;text-align: center;line-height: 50px;font-size: 26px;font-weight: bolder;color: #fff;">{{ mapName }}</div>
|
||||||
<el-tabs v-model="activeName" style="height: calc(100% - 30px);margin: 0 10px;overflow-y: auto;" type="border-card">
|
<el-tabs v-model="activeName" class="tabs-box" type="border-card">
|
||||||
<el-tab-pane label="功能" name="first" style="height: 100%;">
|
<el-tab-pane label="功能" name="first" style="height: 100%;">
|
||||||
<el-collapse v-model="collapse" accordion>
|
<el-collapse v-model="collapse" accordion>
|
||||||
<template v-for="item in subsetList">
|
<template v-for="item in subsetList">
|
||||||
@ -248,7 +248,7 @@ export default {
|
|||||||
this.$refs.selectRole.doShow(row.id);
|
this.$refs.selectRole.doShow(row.id);
|
||||||
},
|
},
|
||||||
initMapSystem() {
|
initMapSystem() {
|
||||||
queryMapFunctionList({mapId: this.$route.params.mapId}).then(resp => {
|
queryMapFunctionList({mapId: this.$route.params.mapId, detail: true}).then(resp => {
|
||||||
this.systemList = resp.data;
|
this.systemList = resp.data;
|
||||||
this.systemList.forEach(item => {
|
this.systemList.forEach(item => {
|
||||||
if (item.subset && this.subsetList.includes(item.subset)) {
|
if (item.subset && this.subsetList.includes(item.subset)) {
|
||||||
@ -343,6 +343,72 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
/deep/{
|
||||||
|
.el-collapse-item__header {
|
||||||
|
background: #00172E;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.el-collapse-item__content{
|
||||||
|
background: #00172E;
|
||||||
|
}
|
||||||
|
.el-tabs__nav-scroll{
|
||||||
|
background: #00172E;
|
||||||
|
}
|
||||||
|
.el-tabs--border-card>.el-tabs__header .el-tabs__item{
|
||||||
|
color: #fff;
|
||||||
|
border: solid 1px #01468B;
|
||||||
|
}
|
||||||
|
.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active{
|
||||||
|
background: #01468B;
|
||||||
|
}
|
||||||
|
.el-form-item__label {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.el-tabs--border-card{
|
||||||
|
border: solid 1px #01468B;
|
||||||
|
}
|
||||||
|
.el-collapse-item__header{
|
||||||
|
border-bottom: solid 1px #01468B;
|
||||||
|
}
|
||||||
|
.el-collapse{
|
||||||
|
border-top: solid 1px #01468B;
|
||||||
|
border-bottom: solid 1px #01468B;
|
||||||
|
}
|
||||||
|
.el-collapse-item__wrap{
|
||||||
|
border-bottom: solid 1px #01468B;
|
||||||
|
}
|
||||||
|
.el-table th.el-table__cell{
|
||||||
|
background-color: #01468B;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.el-table--border, .el-table--group{
|
||||||
|
border-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.el-card{
|
||||||
|
border: solid 1px #01468B;
|
||||||
|
}
|
||||||
|
.tabs-box{
|
||||||
|
height: calc(100% - 30px);
|
||||||
|
margin: 0 10px;
|
||||||
|
overflow-y: auto;
|
||||||
|
background: transparent;
|
||||||
|
&::-webkit-scrollbar{
|
||||||
|
background: #06284a;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-thumb{
|
||||||
|
background: #0c0909;
|
||||||
|
}
|
||||||
|
&::-webkit-scrollbar-track{
|
||||||
|
background: #06284a;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.sim-box{
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
padding-bottom: 20px;
|
||||||
|
background: #00172E;
|
||||||
|
}
|
||||||
.box-card {
|
.box-card {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
height: 220px;
|
height: 220px;
|
||||||
@ -350,10 +416,12 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
background: transparent;
|
||||||
}
|
}
|
||||||
.bg-img-box {
|
.bg-img-box {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
height: 220px;
|
height: 220px;
|
||||||
|
background-color: #fff;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
}
|
}
|
||||||
@ -371,6 +439,7 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
left: 45%;
|
left: 45%;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
|
background: transparent;
|
||||||
}
|
}
|
||||||
.card-box-title {
|
.card-box-title {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@ -386,6 +455,7 @@ export default {
|
|||||||
display:-webkit-box;
|
display:-webkit-box;
|
||||||
-webkit-line-clamp:3;
|
-webkit-line-clamp:3;
|
||||||
-webkit-box-orient:vertical;
|
-webkit-box-orient:vertical;
|
||||||
|
background: transparent;
|
||||||
}
|
}
|
||||||
.box-card .el-tooltip__popper {
|
.box-card .el-tooltip__popper {
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
Loading…
Reference in New Issue
Block a user