Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
e9ca305560
7
.env.ntyl
Normal file
7
.env.ntyl
Normal file
@ -0,0 +1,7 @@
|
||||
# just a flag
|
||||
NODE_ENV = 'production'
|
||||
VUE_APP_PRO = 'ntyl'
|
||||
|
||||
# base api
|
||||
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'
|
||||
VUE_APP_VOICE_API = 'https://joylink.club/oss/joylink'
|
@ -9,7 +9,7 @@
|
||||
"dev": "node --max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve",
|
||||
"build": "vue-cli-service build --mode production",
|
||||
"test": "vue-cli-service build --mode staging",
|
||||
"local": "vue-cli-service build --mode native",
|
||||
"local": "vue-cli-service build --mode",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"test:unit": "jest --clearCache && vue-cli-service test:unit",
|
||||
|
@ -68,3 +68,10 @@ export function givePermission(data) {
|
||||
data: data
|
||||
});
|
||||
}
|
||||
/** 创建项目权限包 */
|
||||
export function createProjectPackage(projectCode, num) {
|
||||
return request({
|
||||
url: `/api/distribute/${projectCode}/allMap/distribute?num=${num}`,
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ export default {
|
||||
inputQuestionNumber: 'Please input question number',
|
||||
inputQuestionNumberError: 'The number of questions entered must be greater than 0',
|
||||
inputValidNumber: 'Please input valid number',
|
||||
inputNumberError: 'The input value must be greater than the number of questions',
|
||||
inputNumberError: 'The input value must be less than the number of questions',
|
||||
inputScorePerQuestion: 'Please input score per question',
|
||||
selectTestType: 'Please select test type',
|
||||
modifyRules: 'Modify Rules',
|
||||
|
@ -109,7 +109,7 @@ export default {
|
||||
inputQuestionNumber: '请输入题数',
|
||||
inputQuestionNumberError: '输入的题数大于0',
|
||||
inputValidNumber: '请输入有效数字',
|
||||
inputNumberError: '输入值必须大于题数',
|
||||
inputNumberError: '输入值必须小于题数',
|
||||
inputScorePerQuestion: '请输入每题分值',
|
||||
// inputNumericType 请输入数字值
|
||||
// addRules 添加规则
|
||||
|
@ -50,13 +50,8 @@ class StationStand extends Group {
|
||||
this.isShowShape = true;
|
||||
this.create();
|
||||
this.createMouseEvent();
|
||||
// if (isShowThePrdType(model.prdType, style.StationStand.common.functionButtonShow) || model.previewOrMapDraw) {
|
||||
// this.createFunctionButton();
|
||||
// }
|
||||
// if (model.previewOrMapDraw) {
|
||||
// this.setShowMode();
|
||||
// }
|
||||
this.setVisible(model.visible);
|
||||
this.setShowMode();
|
||||
this.setState(model);
|
||||
}
|
||||
create() {
|
||||
|
@ -55,7 +55,7 @@ export const loginInfo = {
|
||||
systemType: '011'
|
||||
},
|
||||
ntyc: {
|
||||
title: '南京铁道职业技术学院城市轨道交通实训平台(专用版)',
|
||||
title: '城轨高级信号系统(云平台专用版)',
|
||||
loginPath: '/login?project=ntyc',
|
||||
loginParam: 'NTYC',
|
||||
titleDistance: '-150px',
|
||||
@ -64,7 +64,7 @@ export const loginInfo = {
|
||||
systemType: '011'
|
||||
},
|
||||
ntyl: {
|
||||
title: '南京铁道职业技术学院城市轨道交通实训平台',
|
||||
title: '城轨高级信号系统(本地专用版)',
|
||||
loginPath: '/login?project=ntyl',
|
||||
loginParam: 'NTYL',
|
||||
titleDistance: '-150px',
|
||||
@ -73,7 +73,7 @@ export const loginInfo = {
|
||||
systemType: '011'
|
||||
},
|
||||
nty: {
|
||||
title: '南京铁道职业技术学院城市轨道交通实训平台(通用版)',
|
||||
title: '城轨高级信号系统(云平台通用版)',
|
||||
loginPath:'/login?project=nty',
|
||||
loginParam: 'NTY',
|
||||
titleDistance: '-150px',
|
||||
@ -137,7 +137,7 @@ export const loginInfo = {
|
||||
systemType: '013'
|
||||
},
|
||||
designntyl: {
|
||||
title: '南京铁道职业技术学院城市轨道交通设计平台',
|
||||
title: '城轨高级信号设计系统(本地专用版)',
|
||||
loginPath:'/design/login?project=ntyl',
|
||||
loginParam: 'NTYL',
|
||||
titleDistance: '-150px',
|
||||
@ -146,7 +146,7 @@ export const loginInfo = {
|
||||
systemType: '011'
|
||||
},
|
||||
designntyc: {
|
||||
title: '南京铁道职业技术学院城市轨道交通设计平台(专用版)',
|
||||
title: '城轨高级信号设计系统(云平台专用版)',
|
||||
loginPath:'/design/login?project=ntyc',
|
||||
loginParam: 'NTYC',
|
||||
titleDistance: '-150px',
|
||||
@ -155,7 +155,7 @@ export const loginInfo = {
|
||||
systemType: '011'
|
||||
},
|
||||
designnty: {
|
||||
title: '南京铁道职业技术学院城市轨道交通设计平台(通用版)',
|
||||
title: '城轨高级信号设计系统(云平台通用版)',
|
||||
loginPath:'/design/login?project=nty',
|
||||
loginParam: 'NTY',
|
||||
titleDistance: '-150px',
|
||||
@ -417,7 +417,7 @@ export const ProjectIcon = {
|
||||
designnty: FaviconNty,
|
||||
ntyc: FaviconNty,
|
||||
designntyc: FaviconNty,
|
||||
nty1: FaviconNty,
|
||||
ntyl: FaviconNty,
|
||||
designntyl: FaviconNty,
|
||||
bjd: FaviconBjd,
|
||||
designbjd: FaviconBjd,
|
||||
@ -439,7 +439,7 @@ export const ProjectCode = {
|
||||
nty: 'NTY',
|
||||
designnty: 'NTY',
|
||||
ntyl: 'NTYL',
|
||||
designnty1: 'NTYL',
|
||||
designntyl: 'NTYL',
|
||||
ntyc: 'NTYC',
|
||||
designntyc: 'NTYC',
|
||||
bjd: 'BJD',
|
||||
@ -448,7 +448,7 @@ export const ProjectCode = {
|
||||
designsdy: 'SDY'
|
||||
};
|
||||
export const BottomColumnOnlyConInfo = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 底部栏仅展示公司信息不展示备案号
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designnty1']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const GetMapListByProjectList = ['xty', 'designxty', 'gzb', 'designgzb', 'xadt', 'designxadt', 'heb', 'designheb', 'designdrts', 'drts', 'nty', 'designnty', 'sdy', 'designsdy', 'ntyc', 'designntyc', 'ntyl', 'designntyl']; // 实训设计平台通过项目code获取地图列表的项目
|
||||
export const CaseHideProjectList = ['heb', 'designheb']; // 案例展示隐藏的项目
|
||||
export const VersionBaseNoShow = ['heb', 'designheb', 'hls', 'designhls', 'drts', 'hyd', 'designhyd']; // 登录页右下角版本开发基于不展示
|
||||
export const MainBodyNoShow = ['heb', 'designheb', 'jyd', 'designjyd', 'tky', 'designtky', 'bxkc', 'designbxkc', 'crsc', 'designcrsc', 'hls', 'designhls', 'hyd', 'designhyd']; // 登录页右下角主体不展示
|
||||
@ -484,7 +484,11 @@ export const goOtherPlatformMenu = { // 导航栏快速切换平台
|
||||
bjd: '/design/login?project=bjd',
|
||||
designbjd: '/login?project=bjd',
|
||||
sdy: '/design/login?project=sdy',
|
||||
designsdy: '/login?project=sdy'
|
||||
designsdy: '/login?project=sdy',
|
||||
ntyl: '/design/login?project=ntyl',
|
||||
designntyl: '/login?project=ntyl',
|
||||
ntyc: '/design/login?project=ntyl',
|
||||
designntyc: '/login?project=ntyc'
|
||||
};
|
||||
export const ProjectList = [
|
||||
{value:'xty', label:'西铁院'},
|
||||
|
@ -52,9 +52,9 @@ export default {
|
||||
// const cityList = resp.sort((a, b) => {
|
||||
// return a.code.localeCompare(b.code);
|
||||
// });
|
||||
const cityList = resp;
|
||||
const cityList = resp || [];
|
||||
this.filterOptions = resp;
|
||||
this.filterSelect = localStore.get(this.localParamName) || cityList[0].code;
|
||||
this.filterSelect = localStore.get(this.localParamName) || (cityList[0] || {}).code;
|
||||
this.$emit('filterSelectChange', this.filterSelect);
|
||||
},
|
||||
filterSelectChange(filterSelect) {
|
||||
|
@ -58,6 +58,7 @@ export default {
|
||||
},
|
||||
getMapByCode() {
|
||||
const project = getSessionStorage('project');
|
||||
console.log(project, GetMapListByProjectList.includes(project));
|
||||
return GetMapListByProjectList.includes(project);
|
||||
}
|
||||
},
|
||||
|
@ -77,7 +77,7 @@ export default {
|
||||
} else {
|
||||
this.ibpStationMap[item.mapId] = [item.stationCode];
|
||||
}
|
||||
this.ibpMap[item.stationCode] = item.id;
|
||||
this.ibpMap[ item.mapId + '-' + item.stationCode] = item.id;
|
||||
});
|
||||
}
|
||||
} catch (e) {
|
||||
@ -108,7 +108,7 @@ export default {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
const param = {
|
||||
mapId: this.$route.params.mapId,
|
||||
ibpId: this.ibpMap[this.formModel.dataStationCode],
|
||||
ibpId: this.ibpMap[this.formModel.dataMapId + '-' + this.formModel.dataStationCode],
|
||||
stationCode: this.formModel.stationCode
|
||||
};
|
||||
copyIbpData(param).then(resp => {
|
||||
|
@ -2,6 +2,7 @@
|
||||
<div>
|
||||
<div :id="ibpId" v-loading="loading" :style="{ width: canvasWidth+'px', height: canvasHeight +'px',background:'#000' }" class="ibp-canvas" />
|
||||
<el-button v-if="showBackButton" class="ibp-button" type="primary" @click="back">{{ $t('global.back') }}</el-button>
|
||||
<el-button v-if="$route.query.noPreLogout" class="ibp-button" type="primary" @click="quit">退出</el-button>
|
||||
<audio id="buzzer" controls loop="loop">
|
||||
<source :src="buzzerAudio" type="audio/mpeg">
|
||||
</audio>
|
||||
@ -264,6 +265,9 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
quit() {
|
||||
window.close();
|
||||
},
|
||||
ibpDestroy() {
|
||||
if (this.$ibp) {
|
||||
this.$ibp.dispose();
|
||||
|
@ -114,18 +114,18 @@ export default {
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed') + ':' + error.message);
|
||||
});
|
||||
} else if (valid && !this.hasRelease) {
|
||||
releaseOrCancel(this.editModel.id, '1').then(response => {
|
||||
this.loading = false;
|
||||
this.$message.success(this.$t('tip.coursePublishSuccessful'));
|
||||
this.doClose();
|
||||
}).catch(() => {
|
||||
}).catch((error) => {
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed'));
|
||||
this.$messageBox(this.$t('tip.coursePublishFailed') + ':' + error.message);
|
||||
});
|
||||
} else {
|
||||
this.loading = false;
|
||||
|
@ -7,7 +7,7 @@
|
||||
:element-loading-text="loadingText"
|
||||
element-loading-background="rgba(0, 0, 0, 0)"
|
||||
>
|
||||
<div v-if="loginTitle && !syncLogin" :class="project.endsWith('heb')?'text-box':'left-logo-box'">
|
||||
<div v-if="loginTitle && !syncLogin" :class="project.endsWith('heb')||project.endsWith('ntyl')?'text-box':'left-logo-box'">
|
||||
<img class="logo" :src="logoImg" :style="{width: logoWidth}">
|
||||
<span>{{ loginTitle==='空串'?'':loginTitle }}</span>
|
||||
</div>
|
||||
@ -16,12 +16,12 @@
|
||||
<el-button class="language_btn" type="text" @click="handleLanguage">{{ language }}</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div v-if="!syncLogin" class="content-box" :style="project.endsWith('heb')?'width: 450px;':''">
|
||||
<div v-if="!syncLogin" class="content-box" :style="project.endsWith('heb')||project.endsWith('ntyl')?'width: 450px;':''">
|
||||
<div v-if="isProject && !syncLogin" class="text-box" :style="{top: titleDistance}">
|
||||
<img v-if="!loginTitle" class="logo" :src="logoImg" style="width: 80px">
|
||||
<span>{{ title }}</span>
|
||||
</div>
|
||||
<div v-if="!project.endsWith('heb')" class="qrcode-main">
|
||||
<div v-if="!project.endsWith('heb') && !project.endsWith('ntyl')" class="qrcode-main">
|
||||
<div class="login-code-box" @click="loginRefresh">
|
||||
<qrcode-vue
|
||||
v-loading="loadingCode"
|
||||
@ -208,8 +208,12 @@ export default {
|
||||
const split = this.$route.path.split('/')[1];
|
||||
if (process.env.VUE_APP_PRO === 'local' && split == 'design') {
|
||||
return split + 'heb';
|
||||
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'design') {
|
||||
return split + 'ntyl';
|
||||
} else if (process.env.VUE_APP_PRO === 'local' && split == 'login') {
|
||||
return 'heb';
|
||||
} else if (process.env.VUE_APP_PRO === 'ntyl' && split == 'login') {
|
||||
return 'ntyl';
|
||||
} else if (split == 'design') {
|
||||
return project ? split + project : split;
|
||||
} else if (split == 'login') {
|
||||
@ -297,7 +301,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
|
||||
if (this.syncLogin || !this.project.endsWith('heb')) {
|
||||
if (!this.syncLogin && !this.project.endsWith('heb') && !this.project.endsWith('ntyl')) {
|
||||
this.loginRefresh();
|
||||
}
|
||||
},
|
||||
|
@ -75,7 +75,7 @@ export default {
|
||||
sectionActive: false,
|
||||
operate: null,
|
||||
concentrationStationList: [],
|
||||
showMode: '03',
|
||||
showMode: '02',
|
||||
localStationShow: false,
|
||||
previewOrMapDraw: false,
|
||||
trainingSetStation: false // 现地实训是否根据设备仅显示设备集中站设备
|
||||
@ -256,7 +256,7 @@ export default {
|
||||
showConfig: {
|
||||
prdType: prdType,
|
||||
previewOrMapDraw: this.previewOrMapDraw,
|
||||
showMode: '03'
|
||||
showMode: '02'
|
||||
},
|
||||
methods: {
|
||||
dataLoaded: this.handleDataLoaded,
|
||||
|
@ -154,17 +154,17 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.physical-view {
|
||||
line-height: 25px;
|
||||
height: 118px;
|
||||
padding-left: 12px;
|
||||
// .physical-view {
|
||||
// line-height: 25px;
|
||||
// height: 118px;
|
||||
// padding-left: 12px;
|
||||
|
||||
.el-checkbox {
|
||||
width: 70px;
|
||||
margin: 0;
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
// .el-checkbox {
|
||||
// width: 70px;
|
||||
// margin: 0;
|
||||
// margin-right: 30px;
|
||||
// }
|
||||
// }
|
||||
/deep/ {
|
||||
.map_card .el-tabs__header .el-tabs__item.is-active {
|
||||
border-bottom-color: #f5f7fa;
|
||||
|
@ -701,17 +701,17 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.physical-view {
|
||||
line-height: 25px;
|
||||
height: 60px;
|
||||
padding-left: 12px;
|
||||
// .physical-view {
|
||||
// line-height: 25px;
|
||||
// height: 60px;
|
||||
// padding-left: 12px;
|
||||
|
||||
.el-checkbox {
|
||||
width: 70px;
|
||||
margin: 0;
|
||||
margin-right: 12px;
|
||||
}
|
||||
}
|
||||
// .el-checkbox {
|
||||
// width: 70px;
|
||||
// margin: 0;
|
||||
// margin-right: 12px;
|
||||
// }
|
||||
// }
|
||||
|
||||
.uploadDemo {
|
||||
position: relative;
|
||||
|
@ -14,8 +14,8 @@
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<create-operate
|
||||
ref="createForm"
|
||||
:create-form="createForm"
|
||||
:add-model="addModel"
|
||||
:create-form="form"
|
||||
:create-rules="rules"
|
||||
@create="create"
|
||||
/>
|
||||
@ -81,9 +81,9 @@ export default {
|
||||
labelWidth: '120px',
|
||||
items: {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
name: this.activeName == 'first' ? this.$t('map.drawData') : '',
|
||||
item: [
|
||||
{ prop: 'code', label: '箭头编码', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.arrowList, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: '箭头编码', type: 'select', optionLabel: 'code', optionValue: 'code', options: this.arrowList, deviceChange: this.deviceChange, isHidden:this.activeName == 'second' },
|
||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
@ -99,29 +99,6 @@ export default {
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
createForm() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items:{
|
||||
all:{
|
||||
name:'',
|
||||
item: [
|
||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '120px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'length', label: '长度:', type: 'number', min:1, placeholder: 'px'},
|
||||
{ prop: 'lineWidth', label: this.$t('map.lineWidth'), type: 'number', min: 1, placeholder: 'px' },
|
||||
{ prop: 'triangleLength', label: '三角长度:', type: 'number', min: 1, placeholder: 'px'},
|
||||
{ prop: 'triangleHeight', label: '三角高度:', type: 'number', min: 1, placeholder: 'px'},
|
||||
{ prop: 'color', label: '颜色', type: 'color' },
|
||||
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -130,15 +107,18 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.$refs.createForm && this.$refs.createForm.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'Arrow'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
});
|
||||
}
|
||||
},
|
||||
clear() {
|
||||
this.addModel = getModel('Arrow');
|
||||
this.$refs.createForm && this.$refs.createForm.resetFields();
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
this.$emit('deviceSelect', '');
|
||||
|
@ -1,44 +1,42 @@
|
||||
<template>
|
||||
<transition name="el-zoom-in-center">
|
||||
<div class="map-control">
|
||||
<div class="border-card">
|
||||
<div class="map-operate">
|
||||
<div style="float: left;width: 280px;overflow: hidden;height: 17px;text-overflow: ellipsis;white-space: nowrap;">
|
||||
<span>{{ $t('map.mapName') }}</span>
|
||||
<el-tooltip class="item" effect="dark" :content="mapInfo.name" placement="top">
|
||||
<b>{{ mapInfo.name }}</b>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-button v-if="isSave" type="text" style="float: right; padding: 3px 0" :disabled="$attrs.mapSaveing" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
|
||||
<el-dropdown class="operate-button" trigger="click">
|
||||
<span class="el-dropdown-link">数据操作</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item><span style="display:block;" :disabled="$attrs.mapSaveing" @click="verifyMapEvent">{{ $t('map.dataVerification') }}</span></el-dropdown-item>
|
||||
<el-dropdown-item><span style="display:block;" :disabled="$attrs.mapSaveing" @click="generateCIEvent">生成联锁</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-button type="text" class="operate-button" @click="dataRelation">{{ $t('map.advanced') }}</el-button>
|
||||
<el-button type="text" class="operate-button" @click="showMap">绘图显隐</el-button>
|
||||
<div class="map-operate">
|
||||
<div class="draftMapName">
|
||||
<span>{{ $t('map.mapName') }}</span>
|
||||
<el-tooltip class="item" effect="dark" :content="mapInfo.name" placement="top">
|
||||
<b>{{ mapInfo.name }}</b>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<el-tabs v-show="projectType" v-model="enabledTab" class="mapEdit" type="card">
|
||||
<el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
|
||||
<component
|
||||
:is="each.menus"
|
||||
:ref="each.name"
|
||||
:selected="selected"
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
@deviceSelect="deviceSelect"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<template v-show="!projectType">
|
||||
<split-screen
|
||||
ref="splitScreen"
|
||||
:selected="selected"
|
||||
/>
|
||||
</template>
|
||||
<el-button type="text" class="operate-button" @click="showMap">绘图显隐</el-button>
|
||||
<el-button type="text" class="operate-button" @click="dataRelation">{{ $t('map.advanced') }}</el-button>
|
||||
<el-dropdown class="operate-button" trigger="click">
|
||||
<span class="el-dropdown-link">数据操作</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item><span :disabled="$attrs.mapSaveing" @click="verifyMapEvent">{{ $t('map.dataVerification') }}</span></el-dropdown-item>
|
||||
<el-dropdown-item><span :disabled="$attrs.mapSaveing" @click="generateCIEvent">生成联锁</span></el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-button v-if="isSave" type="text" style="padding: 3px 0" :disabled="$attrs.mapSaveing" @click="saveMapEvent">{{ $t('map.save') }}</el-button>
|
||||
</div>
|
||||
<el-tabs v-show="projectType" v-model="enabledTab" class="mapEdit" type="card">
|
||||
<el-tab-pane v-for="(each,index) in tabList" :key="index" :label="each.label" class="tab_pane_box" :name="each.name" :lazy="lazy">
|
||||
<component
|
||||
:is="each.menus"
|
||||
:ref="each.name"
|
||||
:selected="selected"
|
||||
v-bind="$attrs"
|
||||
v-on="$listeners"
|
||||
@deviceSelect="deviceSelect"
|
||||
/>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<template v-show="!projectType">
|
||||
<split-screen
|
||||
ref="splitScreen"
|
||||
:selected="selected"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
</transition>
|
||||
</template>
|
||||
@ -211,7 +209,13 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
.draftMapName{
|
||||
width:280px;
|
||||
overflow:hidden;
|
||||
height:17px;
|
||||
text-overflow:ellipsis;
|
||||
white-space:nowrap;
|
||||
}
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
color: #409EFF;
|
||||
@ -222,32 +226,29 @@ export default {
|
||||
.map-control {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
.border-card{
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.operate-button{
|
||||
float: right;
|
||||
padding: 3px 0;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.physical-view {
|
||||
line-height: 25px;
|
||||
height: 118px;
|
||||
padding-left: 12px;
|
||||
// .physical-view {
|
||||
// line-height: 25px;
|
||||
// height: 118px;
|
||||
// padding-left: 12px;
|
||||
|
||||
.el-checkbox {
|
||||
width: 70px;
|
||||
margin: 0;
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
// .el-checkbox {
|
||||
// width: 70px;
|
||||
// margin: 0;
|
||||
// margin-right: 30px;
|
||||
// }
|
||||
// }
|
||||
|
||||
.map-operate{
|
||||
height: 47px;
|
||||
padding: 15px
|
||||
padding: 15px;
|
||||
display:flex;
|
||||
}
|
||||
.mapEdit{
|
||||
height: calc(100% - 47px);
|
||||
|
@ -14,7 +14,7 @@
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<create-operate
|
||||
ref="createForm"
|
||||
:create-form="makeForm"
|
||||
:create-form="form"
|
||||
:add-model="addModel"
|
||||
:create-rules="rules"
|
||||
@create="create"
|
||||
@ -99,9 +99,9 @@ export default {
|
||||
labelWidth: '120px',
|
||||
items: {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
name: this.activeName == 'first' ? this.$t('map.drawData') : '',
|
||||
item: [
|
||||
{ prop: 'code', label: this.$t('map.lineCoding'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.outerFrameList, deviceChange: this.deviceChange },
|
||||
{ prop: 'code', label: this.$t('map.lineCoding'), type: 'select', optionLabel: 'code', optionValue: 'code', options: this.outerFrameList, deviceChange: this.deviceChange, isHidden:this.activeName == 'second' },
|
||||
{ prop: 'width', label: '宽度:', type: 'number', min: 1, placeholder: 'px' },
|
||||
{ prop: 'height', label: '高度:', type: 'number', min: 1, placeholder: 'px' },
|
||||
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
|
||||
@ -115,26 +115,6 @@ export default {
|
||||
};
|
||||
return form;
|
||||
},
|
||||
makeForm() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: {
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
item: [
|
||||
{ prop: 'width', label: '宽度:', type: 'number', min: 1, placeholder: 'px' },
|
||||
{ prop: 'height', label: '高度:', type: 'number', min: 1, placeholder: 'px' },
|
||||
{ prop: 'showConditions', label: this.$t('map.showConditions'), type: 'radio', optionLabel: 'label', optionValue:'value', radioList: this.showConditionsList},
|
||||
{ prop: 'position', label: '坐标:', type: 'coordinate', width: '110px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '20px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '20px' }
|
||||
] }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
isPointsShow() {
|
||||
return this.editModel.points.length > 0;
|
||||
}
|
||||
@ -150,11 +130,14 @@ export default {
|
||||
this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
|
||||
},
|
||||
deviceSelect(selected) {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
|
||||
this.$refs.createForm && this.$refs.createForm.resetFields();
|
||||
if (selected && selected._type.toUpperCase() === 'OutFrame'.toUpperCase()) {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
});
|
||||
}
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
|
@ -278,7 +278,7 @@ export default {
|
||||
this.questionList = [];
|
||||
this.signalList.forEach(item => {
|
||||
const signalModel = deepAssign({}, item); // 深拷贝
|
||||
const section = this.findSection(signalModel); // 关联区段model
|
||||
const section = this.findSection(signalModel); // 查找关联区段model
|
||||
if (section.code && item.sectionCode != section.code) {
|
||||
signalModel.sectionCode = section.code; // 重置信号机所属区段
|
||||
}
|
||||
@ -293,9 +293,6 @@ export default {
|
||||
}
|
||||
}
|
||||
models.push(signalModel);
|
||||
// if (this.editModel.code == signalModel.code) {
|
||||
// this.editModel.sectionCode = signalModel.sectionCode;
|
||||
// }
|
||||
});
|
||||
this.$emit('updateMapModel', models);
|
||||
this.$message.success('数据构建成功!');
|
||||
@ -307,20 +304,42 @@ export default {
|
||||
},
|
||||
// 寻找信号机关联区段
|
||||
findSection(signal) {
|
||||
// 01 向左 02 向右
|
||||
let model = {};
|
||||
if (signal.code == 'S40506' || signal.code == 'X99289' || signal.code == 'S63773') {
|
||||
debugger;
|
||||
}
|
||||
const arrList = [];
|
||||
this.sectionList.forEach(section => {
|
||||
if (!signal.right && section.type != '02' && section.type != '04') {
|
||||
if (section.points[0].x == signal.position.x && Math.abs(section.points[0].y - signal.position.y) <= 20) {
|
||||
model = section;
|
||||
}
|
||||
} else if (signal.right && section.type != '02' && section.type != '04') {
|
||||
if (section.points[section.points.length - 1].x == signal.position.x && Math.abs(section.points[section.points.length - 1].y - signal.position.y) <= 20) {
|
||||
model = section;
|
||||
if (section.type == '01' || section.type == '03') {
|
||||
if ((signal.position.x == section.points[0].x || section.points[section.points.length - 1].x == signal.position.x) && (section.points[0].y == signal.position.y || section.points[section.points.length - 1].y == signal.position.y)) {
|
||||
console.log(section);
|
||||
arrList.push(section);
|
||||
}
|
||||
}
|
||||
});
|
||||
return model;
|
||||
const sectionObj = {
|
||||
left: {},
|
||||
right: {}
|
||||
};
|
||||
arrList.forEach(item => {
|
||||
if (this.handleFindlistByCode(arrList, item.leftSectionCode)) {
|
||||
sectionObj.left = this.handleFindlistByCode(arrList, item.leftSectionCode);
|
||||
}
|
||||
if (this.handleFindlistByCode(arrList, item.rightSectionCode)) {
|
||||
sectionObj.right = this.handleFindlistByCode(arrList, item.rightSectionCode);
|
||||
}
|
||||
});
|
||||
if (signal.right) {
|
||||
return sectionObj.left;
|
||||
}
|
||||
if (!signal.right) {
|
||||
return sectionObj.right;
|
||||
}
|
||||
},
|
||||
handleFindlistByCode(list, code) {
|
||||
const model = list.find(ele => ele.code == code);
|
||||
if (model && model.code) {
|
||||
return model;
|
||||
}
|
||||
},
|
||||
setSignalName() {
|
||||
const models = [];
|
||||
|
@ -14,8 +14,8 @@
|
||||
<el-tab-pane class="view-control" :label="$t('map.newConstruction')" name="second" :lazy="lazy">
|
||||
<create-operate
|
||||
ref="createForm"
|
||||
:create-form="formMake"
|
||||
:add-model="addModel"
|
||||
:create-form="form"
|
||||
:add-model="editModel"
|
||||
:create-rules="createRules"
|
||||
@create="create"
|
||||
/>
|
||||
@ -56,16 +56,6 @@ export default {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
addModel: {
|
||||
code: '',
|
||||
type: 'SplitStation',
|
||||
rightStationName: '',
|
||||
leftStationName: '',
|
||||
position: {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -82,9 +72,9 @@ export default {
|
||||
item: []
|
||||
},
|
||||
draw: {
|
||||
name: this.$t('map.drawData'),
|
||||
name: this.activeName == 'first' ? this.$t('map.drawData') : '',
|
||||
item: [
|
||||
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'code', optionValue: 'code', options: this.splitStationList},
|
||||
{ prop: 'code', label: `${this.$t('map.code')}`, type: 'select', optionLabel: 'code', optionValue: 'code', options: this.splitStationList, isHidden:this.activeName == 'second'},
|
||||
{ prop: 'rightStationName', label: this.$t('map.rightCentralStationName'), type: 'input'},
|
||||
{ prop: 'leftStationName', label: this.$t('map.leftCentralStationName'), type: 'input'},
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
@ -97,25 +87,6 @@ export default {
|
||||
};
|
||||
return form;
|
||||
},
|
||||
formMake() {
|
||||
const form = {
|
||||
labelWidth: '150px',
|
||||
items:{
|
||||
all:{
|
||||
name:'',
|
||||
item: [
|
||||
{ prop: 'rightStationName', label: this.$t('map.rightCentralStationName'), type: 'input'},
|
||||
{ prop: 'leftStationName', label: this.$t('map.leftCentralStationName'), type: 'input'},
|
||||
{ prop: 'position', label: this.$t('map.textPoints'), type: 'coordinate', width: '140px', children: [
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] }
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
return form;
|
||||
},
|
||||
createRules: function () {
|
||||
return {
|
||||
rightStationName: [
|
||||
@ -135,12 +106,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
deviceSelect(selected) {
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.$refs.make && this.$refs.make.resetFields();
|
||||
this.$refs.createForm && this.$refs.createForm.resetFields();
|
||||
if (selected && selected._type === 'SplitStation') {
|
||||
this.activeName = 'first';
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.type = selected._type;
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.dataform && this.$refs.dataform.resetFields();
|
||||
this.editModel = deepAssign(this.editModel, selected);
|
||||
this.editModel.type = selected._type;
|
||||
});
|
||||
}
|
||||
},
|
||||
clearDeviceSelect() {
|
||||
@ -148,17 +121,17 @@ export default {
|
||||
},
|
||||
// 创建对象
|
||||
create() {
|
||||
const uid = getUID(this.addModel.type, this.splitStationList); // 根据类型写 uid 前缀命名
|
||||
const uid = getUID(this.editModel.type, this.splitStationList); // 根据类型写 uid 前缀命名
|
||||
const models = [];
|
||||
const model = {
|
||||
_type: this.addModel.type,
|
||||
type: this.addModel.type,
|
||||
_type: this.editModel.type,
|
||||
type: this.editModel.type,
|
||||
code: uid,
|
||||
rightStationName: this.addModel.rightStationName,
|
||||
leftStationName: this.addModel.leftStationName,
|
||||
rightStationName: this.editModel.rightStationName,
|
||||
leftStationName: this.editModel.leftStationName,
|
||||
position: {
|
||||
x: this.addModel.position.x,
|
||||
y: this.addModel.position.y
|
||||
x: this.editModel.position.x,
|
||||
y: this.editModel.position.y
|
||||
}
|
||||
};
|
||||
models.push(model);
|
||||
|
@ -3,6 +3,7 @@
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<qr-code ref="qrCode" />
|
||||
<qcode ref="qcode" />
|
||||
<project-package ref="projectPackage" @createSuccess="createSuccess" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -12,13 +13,15 @@ import { listPackagePermission, restorePackagePermission, getPackageQrCode, setC
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import Qcode from './Qcode';
|
||||
import ProjectPackage from './projectPackage';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
|
||||
export default {
|
||||
name: 'Author',
|
||||
components: {
|
||||
QrCode,
|
||||
Qcode
|
||||
Qcode,
|
||||
ProjectPackage
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -174,6 +177,7 @@ export default {
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('orderAuthor.createPackage'), handler: this.handleCreatePackage },
|
||||
{ text: '创建项目权限包', handler: this.handleCreateProjectPackage },
|
||||
{ text: this.$t('orderAuthor.receivingPermission'), handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' }
|
||||
]
|
||||
}
|
||||
@ -239,9 +243,18 @@ export default {
|
||||
handlerPermission() {
|
||||
this.$refs.qcode.doShow();
|
||||
},
|
||||
createSuccess(data) {
|
||||
this.$refs.qrCode.doShow({
|
||||
url: data,
|
||||
title: '项目权限包'
|
||||
});
|
||||
},
|
||||
handleCreatePackage() {
|
||||
this.$router.push({ path: `${UrlConfig.orderauthor.createPackage}` });
|
||||
},
|
||||
handleCreateProjectPackage() {
|
||||
this.$refs.projectPackage.doShow();
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('tip.updatePrivilegeTip'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
|
68
src/views/orderauthor/permission/projectPackage.vue
Normal file
68
src/views/orderauthor/permission/projectPackage.vue
Normal file
@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<el-dialog v-dialogDrag title="创建项目权限包" :visible.sync="centerDialogVisible" width="400px" center>
|
||||
<el-form ref="form" :model="formModel" label-width="80px">
|
||||
<el-form-item label="项目:" prop="projectCode">
|
||||
<el-select v-model="formModel.projectCode" placeholder="请选择项目">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量:" prop="num">
|
||||
<el-input-number v-model="formModel.num" :step="1" :min="1" :precision="0" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">立即创建</el-button>
|
||||
<el-button @click="doClose">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ProjectList } from '@/scripts/ProjectConfig';
|
||||
import { createProjectPackage } from '@/api/management/distribute';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
centerDialogVisible: false,
|
||||
formModel: {
|
||||
num: 1,
|
||||
projectCode: ''
|
||||
},
|
||||
options: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
ProjectList.forEach(item => {
|
||||
this.options.push({label: item.label, value: item.value.toUpperCase()});
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.centerDialogVisible = true;
|
||||
this.formModel.projectCode = this.options[0].value;
|
||||
},
|
||||
doClose() {
|
||||
this.centerDialogVisible = false;
|
||||
},
|
||||
onSubmit() {
|
||||
createProjectPackage(this.formModel.projectCode, this.formModel.num).then(resp => {
|
||||
this.$emit('createSuccess', resp.data);
|
||||
this.doClose();
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.doClose();
|
||||
this.$message.error('创建项目权限包失败!');
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -438,11 +438,13 @@ export default {
|
||||
const students = [];
|
||||
for (const index in wb.Sheets) {
|
||||
const dataList = convertSheetToList(wb.Sheets[index], true);
|
||||
const className = dataList[0][2].split(' ')[0].replace(/\s*/g, '').split(':')[1];
|
||||
studentData.className = className;
|
||||
for ( let i = 5; i <= dataList[0].length; i++) {
|
||||
if (dataList[2][i] && dataList[1][i]) {
|
||||
students.push({studentID:dataList[2][i], name: dataList[1][i]});
|
||||
if (dataList.length) {
|
||||
const className = dataList[0][2].split(' ')[0].replace(/\s*/g, '').split(':')[1];
|
||||
studentData.className = className;
|
||||
for ( let i = 5; i <= dataList[0].length; i++) {
|
||||
if (dataList[2][i] && dataList[1][i]) {
|
||||
students.push({studentID:dataList[2][i], name: dataList[1][i]});
|
||||
}
|
||||
}
|
||||
}
|
||||
studentData.students = students;
|
||||
|
@ -15,8 +15,8 @@ const port = 9527; // dev port
|
||||
let publicPath = '';
|
||||
let outputDir = '';
|
||||
(function () {
|
||||
publicPath = process.env.VUE_APP_PRO == 'local' ? '/' : '/cbtc';
|
||||
outputDir = process.env.VUE_APP_PRO == 'local' ? 'dist' : 'dist/cbtc';
|
||||
publicPath = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl' ? '/' : '/cbtc';
|
||||
outputDir = process.env.VUE_APP_PRO == 'local' || process.env.VUE_APP_PRO == 'ntyl' ? 'dist' : 'dist/cbtc';
|
||||
})();
|
||||
|
||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||
|
Loading…
Reference in New Issue
Block a user