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