Merge remote-tracking branch 'origin/test'

This commit is contained in:
joylink_zhangsai 2021-03-25 20:09:03 +08:00
commit ac6c3c5836
108 changed files with 6910 additions and 906 deletions

View File

@ -204,18 +204,10 @@ export function getClassListPage(params) {
params
});
}
/** 分页获取自己创建的班级 */
export function getClassListPageSelf(params) {
/** 查询班级列表不分页 */
export function getClassListUnPage() {
return request({
url: `/api/company/paged/cls/self`,
method: 'get',
params
});
}
/** 查询个人创建的班级列表 */
export function getClassListUnPageSelf() {
return request({
url: `/api/company/list/cls/self`,
url: `/api/company/list/cls`,
method: 'get'
});
}
@ -302,3 +294,18 @@ export function userRuleGetScore(orgId, schoolYear, term) {
method: 'get'
});
}
/** 将规则应用到班级 */
export function applyRuleToClass(ruleId, data) {
return request({
url: `/api/company/orgScoringRule/${ruleId}/apply`,
method: 'post',
data
});
}
/** 查询规则能够应用到的组织 */
export function getCanApplyToList(ruleId) {
return request({
url: `/api/company/orgScoringRule/${ruleId}/canApplyTo`,
method: 'get'
});
}

View File

@ -103,17 +103,17 @@ export function getExamClassList(lessonId) {
});
}
/** 获取自己发布的课程列表 */
export function getLessonListSelf(params) {
export function getLessonProjectList(params) {
return request({
url: '/api/lesson/paged/self',
url: '/api/lesson/paged/byLoginProject',
method: 'get',
params
});
}
/** 获取自己发布课程列表不分页 */
export function getLessonListsSelfNoPage() {
export function getLessonProjectListNoPage() {
return request({
url: '/api/lesson/unPaged/self',
url: '/api/lesson/list/byLoginProject',
method: 'get'
});
}

View File

@ -271,3 +271,10 @@ export function getSectionListByMapId(id) {
method: 'get'
});
}
/** 查询地图下集中站下的区段 */
export function getSectionListByCenStationCode(id, stationCode) {
return request({
url: `/api/map/${id}/deviceStation/${stationCode}/sections`,
method: 'get'
});
}

View File

@ -93,16 +93,24 @@ export function updateExamRules(data) {
data: data
});
}
/** 查询本项目下自己创建的考试列表 */
export function getExamListSelf(params) {
/** 查询本项目下的考试列表 */
export function getExamListProject(params) {
return request({
url: `/api/exam/paged/org/self`,
url: `/api/exam/paged/loginProject`,
method: 'get',
params
});
}
/** 查询本项目下自己创建的考试列表不分页 */
export function getExamListProjectUnpage(params) {
return request({
url: `/api/exam/list/loginProject`,
methods: 'get',
params
});
}
/** 查询班级关联的自己创建的试卷 */
export function getExanListSelfByClassId(params) {
export function getExamListSelfByClassId(params) {
return request({
url: `/api/exam/list/org/self`,
method: 'get',

View File

@ -87,14 +87,6 @@ export function getRpListByMapId(mapId) {
});
}
/** 获取地图原始站间运行等级 */
export function getMapStationRun(mapId) {
return request({
url: `/api/runPlan/draft/${mapId}/stationRunLevel`,
method: 'get'
});
}
/** 分页获取用户站间运行等级 */
export function getMapStationRunUser(mapId) {
return request({
@ -147,14 +139,6 @@ export function checkServiceNumberExist({ planId, serviceNumber }) {
});
}
// /** 查询交路列表*/
// export function getRoutingList(planId) {
// return request({
// url: `/api/runPlan/draft/${planId}/routingList`,
// method: 'get'
// });
// }
/** 查询用户交路数据 (新版)*/
export function listUserRoutingData(mapId) {
return request({
@ -165,9 +149,9 @@ export function listUserRoutingData(mapId) {
}
/** 根据交路查询交路区段列表*/
export function querySectionListByRouting({ planId, routingCode }) {
export function querySectionListByRouting(routingCode) {
return request({
url: `/api/runPlan/draft/${planId}/${routingCode}/routingSectionList`,
url: `/api/runPlan/draft/${routingCode}/routingSectionList`,
method: 'get'
});
}
@ -258,15 +242,6 @@ export function updatePlanTrip(data) {
/** 根据车次号查询交路 */
export function getRoutingBySDTNumber(params) {
// 旧版
// return request({
// url: `/api/runPlan/draft/${params.planId}/routing`,
// method: 'get',
// params: {
// SDTNumber: params.SDTNumber
// }
// });
// 新版
return request({
url: `/api/runPlan/draft/${params.planId}/userRouting`,
method: 'get',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

View File

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

View File

@ -141,6 +141,7 @@
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
<template v-if="item.remote">
<el-select
:ref="'select_'+item.prop"
v-model="formModel[item.prop]"
:placeholder="item.placeholder"
:disabled="item.disabled"
@ -160,6 +161,7 @@
</template>
<template v-else-if="item.allowCreate">
<el-select
:ref="'select_'+item.prop"
v-model="formModel[item.prop]"
:placeholder="item.placeholder"
:disabled="item.disabled"
@ -179,6 +181,7 @@
</template>
<template v-else-if="item.multiple">
<el-select
:ref="'select_'+item.prop"
v-model="formModel[item.prop]"
:placeholder="item.placeholder"
:disabled="item.disabled"
@ -196,6 +199,7 @@
</template>
<template v-else-if="item.change">
<el-select
:ref="'select_'+item.prop"
v-model="formModel[item.prop]"
filterable
:clearable="!!item.clearable"
@ -216,6 +220,7 @@
</template>
<template v-else>
<el-select
:ref="'select_'+item.prop"
v-model="formModel[item.prop]"
filterable
:no-data-text="item.noDataText?item.noDataText:'无数据'"
@ -239,6 +244,7 @@
<template v-else-if="checkFieldType(item, 'datetime') || checkFieldType(item, 'date') || checkFieldType(item, 'daterange') || checkFieldType(item, 'datetimerange')">
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required" style="width: 100%;">
<el-date-picker
:ref="'select_'+item.prop"
v-model="formModel[item.prop]"
align="right"
:type="item.type"
@ -253,6 +259,7 @@
<template v-else-if="checkFieldType(item, 'time')">
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
<el-time-select
:ref="'select_'+item.prop"
v-model="formModel[item.prop]"
:placeholder="item.placeholder"
:disabled="item.disabled"
@ -263,6 +270,7 @@
<template v-else-if="checkFieldType(item, 'timePicker')">
<el-form-item :key="item.prop" :prop="item.prop" :label="item.label" :required="item.required">
<el-time-picker
:ref="'select_'+item.prop"
v-model="formModel[item.prop]"
:placeholder="item.placeholder"
:disabled="item.disabled"
@ -410,6 +418,30 @@ export default {
if (item.deviceChange) {
item.deviceChange(data);
}
},
allSelectBlur() {
const that = this;
const list = ['datetime', 'date', 'daterange', 'datetimerange', 'time', 'timePicker'];
this.form.items.forEach(each=>{
if (each.hasOwnProperty('show')) {
if ((list.includes(each.type) || this.checkFieldType(each, 'select')) && each.show) {
// that.$refs['select_' + each.prop][0].blur();
if (this.checkFieldType(each, 'select')) {
that.$refs['select_' + each.prop][0].blur();
} else {
that.$refs['select_' + each.prop][0].hidePicker();
}
}
} else {
if (list.includes(each.type) || this.checkFieldType(each, 'select')) {
if (this.checkFieldType(each, 'select')) {
that.$refs['select_' + each.prop][0].blur();
} else {
that.$refs['select_' + each.prop][0].hidePicker();
}
}
}
});
}
}
};

View File

@ -336,7 +336,7 @@ deviceRender[deviceType.IscsImage] = {
deviceRender[deviceType.OrdinaryDoor] = {
_type: deviceType.OrdinaryDoor,
zlevel: 1,
z: 4
z: 5
};
// 福州门禁
deviceRender[deviceType.FuzhouDoor] = {

View File

@ -53,13 +53,13 @@ export default class Button extends Group {
y: textRect.y - model.verticalPadding,
image: buttonImg,
width: textRect.width + 2 * model.levelPadding,
height: textRect.height + 2 * model.verticalPadding
height: textRect.height + 2 * model.verticalPadding,
}
});
this.grouper.add(this.imageButton);
this.on('mousedown', (e) => { this.imageButton && this.imageButton.setStyle({image: buttonActive}); });
this.on('mouseup', (e) => { this.imageButton && this.imageButton.setStyle({image: buttonImg}); });
} else if (Vue.prototype.$iscs.lineCode == '02') {
} else if (['02','09'].includes(Vue.prototype.$iscs.lineCode)) {
this.textButtonRect = new Rect({
zlevel: model.zlevel,
z: model.z,
@ -68,7 +68,8 @@ export default class Button extends Group {
x: textRect.x - model.levelPadding,
y: textRect.y - model.verticalPadding,
width: textRect.width + 2 * model.levelPadding,
height: textRect.height + 2 * model.verticalPadding
height: textRect.height + 2 * model.verticalPadding,
fill: model.fillColor||'rgba(0,0,0,0)'
},
style: {
lineWidth: 0,
@ -121,7 +122,8 @@ export default class Button extends Group {
x: textRect.x - model.levelPadding + 6,
y: textRect.y - model.verticalPadding + 6,
width: textRect.width + 2 * model.levelPadding - 12,
height: textRect.height + 2 * model.verticalPadding - 12
height: textRect.height + 2 * model.verticalPadding - 12,
fill: model.fillColor||'rgba(0,0,0,0)'
},
style: {
lineWidth: 2,
@ -149,8 +151,8 @@ export default class Button extends Group {
}
this.grouper.add(this.buttonText);
this.add(this.grouper);
this.on('mouseout', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColor || '#FFF'}); });
this.on('mouseover', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColorActive || '#000'}); });
this.on('mouseout', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColor||'#FFF', fill: model.fillColor||'rgba(0,0,0,0)'}); });
this.on('mouseover', (e) => { this.buttonText && this.buttonText.setStyle({textFill: model.textColorActive||'#000',fill: model.fillColorActive||'rgba(0,0,0,0)'}); });
}
setState(model) {
this.textButtonRect.setStyle('fill', model.backgroundColor);

View File

@ -63,17 +63,19 @@ export default class line extends Group {
stroke: this.model.fillColor
}
});
if (fillColor) {
this.iscsLine.setStyle('fill', fillColor);
}
// if (fillColor) {
// this.iscsLine.setStyle('fill', fillColor);
// }
if (model.isGradual) {
if (!model.isFillGradual) {
if (fillColor) {
this.iscsLine.setStyle('fill', fillColor);
}
} else {
this.iscsLine.setStyle('stroke', fillColor);
}
// if (!model.isFillGradual) {
// if (fillColor) {
// this.iscsLine.setStyle('fill', fillColor);
// }
// } else {
this.iscsLine.setStyle('stroke', fillColor);
// }
} else {
this.iscsLine.setStyle('fill', fillColor||'rgba(0,0,0,0)');
}
if (model.classify == 'dashed') {
this.iscsLine.setStyle('lineDash', [8, 6]);
@ -101,7 +103,7 @@ export default class line extends Group {
},
style: {
lineWidth: 0,
fill: model.fillColor
fill: model.fillColor||'rgba(0,0,0,0)'
}
});
this.grouper.add(this.arrows);
@ -129,7 +131,7 @@ export default class line extends Group {
},
style: {
lineWidth: 0,
fill: model.fillColor
fill: model.fillColor||'rgba(0,0,0,0)'
}
});
this.grouper.add(this.arrows);

View File

@ -9,6 +9,7 @@ export default class OrdinaryDoor extends Group {
this.model = device.model;
this.zlevel = device.model.zlevel;
this.z = device.model.z;
this.z2 = device.model.z2;
this._type = device.model._type;
this._code = device.model.code;
this.create();
@ -21,6 +22,7 @@ export default class OrdinaryDoor extends Group {
this.sector1 = new Sector({
zlevel: this.zlevel,
z: this.z,
z2: this.z2||0,
shape: {
cx: 0,
cy: this.model.r,
@ -56,6 +58,7 @@ export default class OrdinaryDoor extends Group {
this.sector2 = new Sector({
zlevel: this.zlevel,
z: this.z,
z2: this.z2,
shape: {
cx: this.model.r * 2,
cy: this.model.r,
@ -75,6 +78,7 @@ export default class OrdinaryDoor extends Group {
this.maskLine = new Line({
zlevel: this.zlevel,
z: this.z,
z2: this.z2,
shape: {
x1: 1,
y1: this.model.r,
@ -92,6 +96,7 @@ export default class OrdinaryDoor extends Group {
this.bottomRect = new Rect({
zlevel: this.zlevel,
z: this.z,
z2: this.z2,
shape: {
x: 0,
y: this.model.r,

View File

@ -47,6 +47,37 @@ import iscsSensor from '@/assets/iscs_picture/iscs-sensor.png';
import iscsDangwei from '@/assets/iscs_picture/iscs-dangwei.png';
import iscsDibian from '@/assets/iscs_picture/iscs-dibian.png';
import iscsPt1 from '@/assets/iscs_picture/iscs-pt1.png';
import checkNormal from '@/assets/iscs_picture/check_normal.png';
import checkArrowLeft from '@/assets/iscs_picture/check_arrow_left.png';
import checkArrowRight from '@/assets/iscs_picture/check_arrow_right.png';
import checkArrowDouble from '@/assets/iscs_picture/check_arrow_double.png';
import checkFlowCumulative from '@/assets/iscs_picture/check_flow_cumulative.png';
import checkSell from '@/assets/iscs_picture/check_sell.png';
import checkSell2 from '@/assets/iscs_picture/check_sell2.png';
import bgShowRoom from '@/assets/iscs_picture/bg-showroom.jpg';
import bgStand from '@/assets/iscs_picture/bg-stand.jpg';
import bgFasPlatformA from '@/assets/iscs_picture/fas_platform_a_bg.png';
import bgFasPlatformB from '@/assets/iscs_picture/fas_platform_b_bg.png';
import basAnnulus from '@/assets/iscs_picture/bas_annulus.png';
import basEnvironmental from '@/assets/iscs_picture/bas_environmental.png';
import basLowPressure from '@/assets/iscs_picture/bas_low_pressure.png';
import basInterface from '@/assets/iscs_picture/bas_interface.png';
import basEntity from '@/assets/iscs_picture/bas_entity.png';
import smokeDetectorRed from '@/assets/iscs_picture/smokeDetector_red.png';
import smokeDetectorBlue from '@/assets/iscs_picture/smokeDetector_blue.png';
import smokeDetectorGreen from '@/assets/iscs_picture/smokeDetector_green.png';
import fireDamperRed from '@/assets/iscs_picture/fireDamper_red.png';
import fireDamperBlue from '@/assets/iscs_picture/fireDamper_blue.png';
import fireDamperGreen from '@/assets/iscs_picture/fireDamper_green.png';
import alarmLampRed from '@/assets/iscs_picture/alarmLamp_red.png';
import alarmLampBlue from '@/assets/iscs_picture/alarmLamp_blue.png';
import alarmLampGreen from '@/assets/iscs_picture/alarmLamp_green.png';
import bgStationA from '@/assets/iscs_picture/bg-station-A.png'
import bgStationB from '@/assets/iscs_picture/bg-station-B.png'
import bgStationC from '@/assets/iscs_picture/bg-station-C.png'
import bgStationD from '@/assets/iscs_picture/bg-station-D.png'
import bgStationE from '@/assets/iscs_picture/bg-station-E.png'
import bgStationF from '@/assets/iscs_picture/bg-station-F.png'
const pictureObj = {
'psdLeft': psdLeft,
@ -93,7 +124,38 @@ const pictureObj = {
iscsSensor,
iscsDangwei,
iscsDibian,
iscsPt1
iscsPt1,
checkNormal,
checkArrowLeft,
checkArrowRight,
checkArrowDouble,
checkFlowCumulative,
checkSell,
checkSell2,
bgShowRoom,
bgStand,
basAnnulus,
basEnvironmental,
basLowPressure,
basInterface,
basEntity,
bgFasPlatformA,
bgFasPlatformB,
smokeDetectorRed,
smokeDetectorBlue,
smokeDetectorGreen,
fireDamperRed,
fireDamperBlue,
fireDamperGreen,
alarmLampRed,
alarmLampBlue,
alarmLampGreen,
bgStationA,
bgStationB,
bgStationC,
bgStationD,
bgStationE,
bgStationF
};
export default class Picture extends Group {
constructor(device) {

View File

@ -36,6 +36,11 @@ export function deviceFactory(type, elem) {
export function parser(data) {
var iscsDevice = {};
if (data) {
Object.values(data).forEach(list => {
if (list instanceof Array) {
list.sort((a, b) => parseInt(a.code.split('_')[1]) - parseInt(b.code.split('_')[1]));
}
})
zrUtil.each(data.manualAlarmButtonList || [], elem => {
iscsDevice[elem.code] = deviceFactory(deviceType.ManualAlarmButton, elem);
}, this);

View File

@ -20,7 +20,8 @@ const user = {
companyId: '',
companyAdmin: false,
companyName: '',
companyProject: ''
companyProject: '',
baseUrl:''
},
mutations: {
@ -77,6 +78,9 @@ const user = {
},
Disconnect: ()=>{
disconnect();
},
setBaseUrl: (state, baseUrl) => {
state.baseUrl = baseUrl;
}
},
@ -204,6 +208,9 @@ const user = {
disconnect({commit}, params) {
commit('Disconnect', params);
removeToken();
},
setBaseUrl ({commit}, baseUrl) {
commit('setBaseUrl', baseUrl);
}
}
};

View File

@ -3,11 +3,11 @@ export const requestAnimationFrame = window.requestAnimationFrame ||
window.mozRequestAnimationFrame ||
window.oRequestAnimationFrame ||
window.msRequestAnimationFrame ||
function (callback) { callback.timter = window.setTimeout(callback, 1000 / 60); };
function (callback) { callback.timer = window.setTimeout(callback, 1000 / 60); };
export const cancelRequestAnimFrame = window.cancelAnimationFrame ||
window.webkitCancelRequestAnimationFrame ||
window.mozCancelRequestAnimationFrame ||
window.oCancelRequestAnimationFrame ||
window.msCancelRequestAnimationFrame ||
function (callback) { window.clearTimeout(callback); };
function (callback) { window.clearTimeout(callback.timer); };

View File

@ -2,7 +2,6 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://api.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
// BASE_API = 'http://192.168.8.129:9000'; // 旭强

View File

@ -24,6 +24,12 @@ service.interceptors.request.use(config => {
if (getToken()) {
config.headers['X-Token'] = getToken(); // 让每个请求携带自定义token 请根据实际情况自行修改
}
// 用于/demo/index 文件中baseUrl 判断(后端要求不管本地还是正式,都要可以访问实训/临时使用)
if (store.state.user.baseUrl) {
config.baseURL = store.state.user.baseUrl;
}
if (config.time) {
config.timeout = config.time; // 让每个请求携带自定义token 请根据实际情况自行修改
}

View File

@ -99,6 +99,7 @@ import md5 from 'js-md5';
import QrcodeVue from 'qrcode.vue';
import { getLoginWmurl, checkLoginStatus } from '@/api/login';
import { LoginParams } from '@/utils/login';
// import {setSessionStorage } from '@/utils/auth';
export default {
components: { QrcodeVue },
data() {
@ -121,17 +122,30 @@ export default {
tipsMsg: '',
pwdDisplay: true,
trainingList: [
// {
// title: '(TA1601)',
// id: '613144'
// },
// {
// title: '(W0304)',
// id: '612112'
// },
// {
// title: '(S0304-S0301)',
// id: '610065'
// }
{
title: '区段封锁(TA1601)',
id: '613144'
title: '站台扣车(车站五05-下行站台)',
id: '4991355'
},
{
title: '道岔封锁(W0304)',
id: '612112'
title: '道岔封锁(W0904)',
id: '4993548'
},
{
title: '进路选排(S0304-S0301)',
id: '610065'
title: '进路选排(S0916-S0901)',
id: '4991607'
}
],
loginForm: {
@ -167,7 +181,7 @@ export default {
this.loading = false;
} else {
this.show = false;
this.src = 'http://localhost:9527/cbtc/trainingPlatform';
this.src = 'https://test.joylink.club/cbtc/trainingPlatform';
this.$nextTick(_ => {
if (result.type == 'DEMO_RESULT' && result.hasOwnProperty('score')) {
this.$confirm(`得分:${result.score}`, '结果', {
@ -188,12 +202,17 @@ export default {
},
destroyed() {
window.removeEventListener('message');
this.$store.dispatch('setBaseUrl', '');
},
methods: {
doClick(el) {
if (this.token && this.userId) {
// &noPreLogout=true
this.src = `http://localhost:9527/cbtc/demoTraining/teach?lessonId=195&mapId=59&lineCode=02&prdType=01&trainingId=${el.id}&token=${this.token}`;
// window.location.origin +
// setSessionStorage('project', 'DEFAULT');
// lessonId=101&mapId=49&prdType=01
// lessonId=195&mapId=59&lineCode=02&prdType=01
this.src = `https://test.joylink.club/cbtc/demoTraining/teach?lessonId=101&mapId=49&lineCode=02&prdType=01&trainingId=${el.id}&token=${this.token}&project=DEFAULT`;
this.loading = true;
setTimeout(()=>{
this.show = true;
@ -209,6 +228,8 @@ export default {
},
loginRefresh() {
// this.loadingCode = true;
// this.$store.dispatch('setBaseUrl', 'https://api.joylink.club/jlcloud');
this.$store.dispatch('setBaseUrl', 'https://test.joylink.club/jlcloud');
const self = this;
const params = LoginParams['LianKeTang'];
params.project = 'DEFAULT';
@ -253,6 +274,7 @@ export default {
//
self.clearTimer(self.checkLogin);
this.$store.dispatch('GetInfo', getToken()).then(res => {
// setSessionStorage('project', 'DEFAULT');
this.loginLoading = false;
this.dialogVisible = false;
this.token = getToken();
@ -280,6 +302,8 @@ export default {
// secret: "joylink"
this.$refs.loginForm.validate(valid => {
if (valid) {
// this.$store.dispatch('setBaseUrl', 'https://api.joylink.club/jlcloud');
this.$store.dispatch('setBaseUrl', 'https://test.joylink.club/jlcloud');
const model = Object.assign({}, this.loginForm);
model.password = md5(model.password);
model.type = 'class';
@ -289,6 +313,7 @@ export default {
this.$store.dispatch('Login', model).then(() => {
this.$store.dispatch('SetAccount', model.username);
this.$store.dispatch('GetInfo', getToken()).then(res => {
// setSessionStorage('project', 'DEFAULT');
this.loginLoading = false;
this.dialogVisible = false;
this.token = getToken();
@ -345,6 +370,7 @@ export default {
}
},
quit() {
this.$store.dispatch('setBaseUrl', '');
this.$store.dispatch('LogOut').then(() => {
location.reload(); // vue-router bug
});

View File

@ -34,8 +34,8 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="form.mean === 'PRERESET'" label="关联区段">
<el-select v-model="form.sectionCode" placeholder="请选择">
<el-form-item v-if="form.mean === 'PRERESET'" label="关联区段" prop="sectionCode">
<el-select v-model="form.sectionCode" filterable placeholder="请选择">
<el-option
v-for="item in sectionList"
:key="item.code"
@ -54,7 +54,7 @@
</template>
<script>
import {getSectionListByStationCode, getSectionListByMapId } from '@/api/jmap/map';
import {getSectionListByCenStationCode, getSectionListByMapId } from '@/api/jmap/map';
export default {
name: 'ButtonDraft',
components: {
@ -94,6 +94,9 @@ export default {
],
buttonWidth: [
{ required: true, message: this.$t('ibp.enterTheButtonWidth'), trigger: 'blur' }
],
sectionCode: [
{ required: true, message: '请选择关联区段', trigger: 'blur' }
]
},
sectionList: []
@ -121,7 +124,7 @@ export default {
},
mounted() {
if (this.$route.query.stationCode) {
getSectionListByStationCode(this.$route.query.mapId, this.$route.query.stationCode).then(resp => {
getSectionListByCenStationCode(this.$route.query.mapId, this.$route.query.stationCode).then(resp => {
this.sectionList = resp.data;
console.log(resp.data);
}).catch(() => {

View File

@ -33,7 +33,7 @@
<script>
import { DeviceMenu } from '@/scripts/ConstDic';
import { removeSessionStorage } from '@/utils/auth';
import { getPublishMapListOnline, getStationListNeedAttendant } from '@/api/jmap/map';
import { getPublishMapListOnline, getStationListNeedAttendant, getPublishMapInfo } from '@/api/jmap/map';
export default {
name: 'UserMapList',
@ -58,7 +58,7 @@ export default {
mapPublishList: [],
pageTreeMap: {
'01': [],
'114': [
'49': [
{
// 线 线 线 线
name: '电力监控系统',
@ -321,11 +321,29 @@ export default {
type: 'interface'
},
{
name: '站厅层公共区段',
name: '站厅层C端',
mode: 'fas02',
id: 'stationHallFour',
type: 'interface'
}
},
{
name: '站厅层D端',
mode: 'fas02',
id: 'stationHallFive',
type: 'interface'
},
{
name: '站厅层E端',
mode: 'fas02',
id: 'stationHallSix',
type: 'interface'
},
{
name: '站厅层F端',
mode: 'fas02',
id: 'stationHallSeven',
type: 'interface'
},
]
},
{
@ -928,7 +946,9 @@ export default {
case 'system' :
break;
case 'interface':
this.$router.push({ path: `/iscs/design/edit`, query: {mode: obj.mode, system: data.parent.data.id, part: obj.id, mapId: this.mapId} });
getPublishMapInfo(this.mapId).then(resp => {
this.$router.push({ path: `/iscs/design/edit`, query: {mode: obj.mode, system: data.parent.data.id, part: obj.id, mapId: this.mapId, lineCode: resp.data.lineCode} });
})
break;
}
},

View File

@ -22,12 +22,12 @@
<el-form-item label="选中文字颜色:" prop="textColorActive">
<el-color-picker v-model="form.textColorActive" size="small" />
</el-form-item>
<!-- <el-form-item label="背景颜色:" prop="textColor">
<el-form-item label="背景颜色:" prop="textColor">
<el-color-picker v-model="form.fillColor" size="small" />
</el-form-item>
<el-form-item label="选中背景颜色:" prop="textColor">
<el-color-picker v-model="form.fillColorActive" size="small" />
</el-form-item> -->
</el-form-item>
<el-form-item label="文字大小:" prop="fontSize">
<el-input-number v-model="form.fontSize" size="small" controls-position="right" :min="1" />
</el-form-item>
@ -90,9 +90,9 @@ export default {
context: '',
function: '',
textColor: '',
// fillColor: '#D1C2C2',
// fillColorActive: '#847b7b',
textColorActive: '#000'
textColorActive: '#000',
fillColor: 'rgba(0,0,0,0)',
fillColorActive: 'rgba(0,0,0,0)'
},
rules: {
context: [
@ -127,6 +127,8 @@ export default {
this.form.fontSize = model.fontSize;
this.form.textColor = model.textColor || '#fff';
this.form.textColorActive = model.textColorActive || '#000';
this.form.fillColor = model.fillColor;
this.form.fillColorActive = model.fillColorActive;
}
}
},
@ -169,7 +171,9 @@ export default {
function: this.form.function,
fontSize: this.form.fontSize,
textColor: this.form.textColor,
textColorActive: this.form.textColorActive
textColorActive: this.form.textColorActive,
fillColor: this.form.fillColor,
fillColorActive: this.form.fillColorActive
};
this.$emit('createDataModel', rectModel);
this.initPage();
@ -190,7 +194,9 @@ export default {
verticalPadding: this.form.verticalPadding,
context: this.form.context,
function: this.form.function,
fontSize: this.form.fontSize
fontSize: this.form.fontSize,
fillColor: this.form.fillColor,
fillColorActive: this.form.fillColorActive
};
this.$emit('deleteDataModel', rectModel);
},
@ -209,7 +215,9 @@ export default {
context: '',
function: '',
textColor: '',
textColorActive: '#000'
textColorActive: '#000',
fillColor: '',
fillColorActive: ''
};
}
}

View File

@ -5,7 +5,7 @@
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="线段宽度:" prop="lineWidth">
<el-input-number v-model="form.lineWidth" controls-position="right" :min="0" :max="50" size="small" />
<el-input-number v-model="form.lineWidth" controls-position="right" :min="0" :max="1000" size="small" />
</el-form-item>
<el-form-item label="类型:" prop="type">
<el-select v-model="form.classify" placeholder="请选择类型" size="small">
@ -13,9 +13,9 @@
<el-option label="虚线:" value="dashed" />
</el-select>
</el-form-item>
<el-form-item label="是否线段颜色渐变:">
<el-checkbox v-model="form.isFillGradual" size="small" />
</el-form-item>
<!--<el-form-item label="是否线段颜色渐变:">-->
<!--<el-checkbox v-model="form.isFillGradual" size="small" />-->
<!--</el-form-item>-->
<el-form-item label="是否渐变:">
<el-checkbox v-model="form.isGradual" size="small" />
</el-form-item>
@ -140,7 +140,7 @@ export default {
classify:'solid',
code: '',
z2: 0,
isFillGradual: false,
// isFillGradual: false,
lineWidth: '',
fillColor: '#fff',
fillBackground: '',
@ -182,7 +182,7 @@ export default {
this.isUpdate = true;
this.form.code = model.code;
this.form.z2 = model.z2 || 0;
this.form.isFillGradual = model.isFillGradual || false;
// this.form.isFillGradual = model.isFillGradual || false;
this.form.lineWidth = model.lineWidth;
this.form.fillColor = model.fillColor;
this.form.fillBackground = model.fillBackground || '';
@ -216,7 +216,7 @@ export default {
code: this.isUpdate ? this.form.code : getUID('IscsLine', this.iscs.iscsLineList),
_type: 'IscsLine',
z2: this.form.z2,
isFillGradual: this.form.isFillGradual,
// isFillGradual: this.form.isFillGradual,
lineWidth: this.form.lineWidth,
fillColor: this.form.fillColor,
fillBackground: this.form.fillBackground,
@ -267,7 +267,7 @@ export default {
this.form = {
code: '',
lineWidth: '',
isFillGradual: false,
// isFillGradual: false,
fillColor: '#fff',
fillBackground: '',
arrowShow: 'none',

View File

@ -60,8 +60,8 @@ export default {
{ name: '车尾', value: 'psdRight' },
{ name: '车厢', value: 'psdSystem' },
{ name: '人防门', value: 'envPersonDoor'},
{ name: '色FIRE', value: 's'},
{ name: '色FIRE', value: 'a'},
{ name: '报警按钮蓝', value: 's'},
{ name: '报警按钮红', value: 'a'},
{ name: 'APF', value: 'APF'},
{ name: '手动阀', value: 'hand'},
{ name: '蓝色-阀门', value: 'fmBlue'},
@ -100,7 +100,38 @@ export default {
{ name: '烟杆传感器', value: 'iscsSensor' },
{ name: '抵挡图', value: 'iscsDangwei' },
{ name: '地变图', value: 'iscsDibian' },
{ name: 'PT1', value: 'iscsPt1' }
{ name: 'PT1', value: 'iscsPt1' },
{ name: '受检左侧箭头', value: 'checkArrowLeft' },
{ name: '受检右侧箭头', value: 'checkArrowRight' },
{ name: '受检两侧箭头', value: 'checkArrowDouble' },
{ name: '受检流量累计', value: 'checkFlowCumulative' },
{ name: '受检正常', value: 'checkNormal' },
{ name: '受检售票', value: 'checkSell' },
{ name: '受检售票2', value: 'checkSell2' },
{ name: '站厅背景', value: 'bgShowRoom' },
{ name: '站台背景', value: 'bgStand' },
{ name: '站台A端背景', value: 'bgFasPlatformA' },
{ name: '站台B端背景', value: 'bgFasPlatformB' },
{ name: '环空电控', value: 'basAnnulus' },
{ name: '环控机控', value: 'basEnvironmental' },
{ name: '智能低压', value: 'basLowPressure' },
{ name: '接口机', value: 'basInterface' },
{ name: '实体机', value: 'basEntity' },
{ name: '烟感探测器红', value: 'smokeDetectorRed' },
{ name: '烟感探测器绿', value: 'smokeDetectorGreen' },
{ name: '烟感探测器蓝', value: 'smokeDetectorBlue' },
{ name: '防火阀红', value: 'fireDamperRed' },
{ name: '防火阀绿', value: 'fireDamperGreen' },
{ name: '防火阀蓝', value: 'fireDamperBlue' },
{ name: '温感器红', value: 'alarmLampRed' },
{ name: '温感器绿', value: 'alarmLampGreen' },
{ name: '温感器蓝', value: 'alarmLampBlue' },
{ name: '站厅A', value: 'bgStationA' },
{ name: '站厅B', value: 'bgStationB' },
{ name: '站厅C', value: 'bgStationC' },
{ name: '站厅D', value: 'bgStationD' },
{ name: '站厅E', value: 'bgStationE' },
{ name: '站厅F', value: 'bgStationF' },
],
rules: {

View File

@ -75,7 +75,7 @@
<template v-for="(item, i) in addModel.columnWidthList">
<el-table-column :key="i" :label="'列'+(i + 1)" :prop="'column'+ (i + 1)" width="140px">
<template slot-scope="scope">
<el-input v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" size="small" />
<el-input v-model="addModel.tableData[scope.$index]['column'+ (i + 1)]" size="small" type="textarea" :rows="1" />
<div style="display:flex;justify-content:space-around;align-items: center;">
<div>背景</div>
<el-color-picker v-model="addModel.tableData[scope.$index]['bg'+(i+1)]" size="small" show-alpha />

View File

@ -1,11 +1,11 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="120px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="code:" prop="code">
<!-- <el-form-item label="code:" prop="code">
<el-select v-model="form.code">
<el-option v-for="(item, index) in iscsTextList" :key="index" :label="item.code" :value="item.code" disabled />
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="文字内容:" prop="context">
<el-input v-model="form.context" type="textarea" size="small" />
</el-form-item>
@ -79,9 +79,9 @@ export default {
verticalPadding: 0
},
rules: {
code: [
{ required: true, message: '请输入文字编号', trigger: 'blur' }
],
// code: [
// { required: true, message: '', trigger: 'blur' }
// ],
context: [
{ required: true, message: '请输入文字内容', trigger: 'blur' }
],

View File

@ -1,6 +1,9 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" :min="0" size="small" />
</el-form-item>
<el-form-item label="宽度:" prop="width">
<el-input-number v-model="form.width" controls-position="right" :min="1" size="small" />
</el-form-item>
@ -33,6 +36,7 @@ export default {
data() {
return {
form:{
z2: '0',
code: '',
width: 100,
height: 40,
@ -59,6 +63,7 @@ export default {
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.z2 = model.z2;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.height = model.height;
@ -79,6 +84,7 @@ export default {
},
code: this.isUpdate ? this.form.code : getUID('AfcDoorUnite', this.iscs.arcDoorUniteList),
_type: 'AfcDoorUnite',
z2: this.form.z2,
rotationAngle: this.form.rotationAngle,
width: this.form.width,
height: this.form.height
@ -96,6 +102,7 @@ export default {
x: this.form.x,
y: this.form.y
},
z2: this.form.z2,
code: this.form.code,
_type: 'AfcDoorUnite',
rotationAngle: this.form.rotationAngle,
@ -110,6 +117,7 @@ export default {
this.showDeleteButton = false;
this.form = {
code: '',
z2: '0',
width: 100,
height: 40,
rotationAngle: 0,

View File

@ -73,6 +73,14 @@
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
<el-tab-pane label="图片" name="IscsPicture">
<iscs-picture
ref="iscsPicture"
style="width: 100%;height: 100%;"
@createDataModel="createDataModel"
@deleteDataModel="deleteDataModel"
/>
</el-tab-pane>
</el-tabs>
</el-card>
@ -87,6 +95,7 @@ import IscsRect from '../icscComponents/rect';
import IscsButton from '../icscComponents/button';
import OrdinaryDoor from '../iscsCommonElem/ordinaryDoor';
import FuzhouDoor from '../iscsCommonElem/fuzhouDoor';
import IscsPicture from '../icscComponents/picture';
import CommunicationButcher from '../iscsCommonElem/communicationButcher';
import AfcDoorUnite from './afcDoorUnite';
@ -99,6 +108,7 @@ export default {
IscsButton,
OrdinaryDoor,
FuzhouDoor,
IscsPicture,
CommunicationButcher,
AfcDoorUnite
},

View File

@ -1,6 +1,9 @@
<template>
<div style="overflow-y: scroll;height: calc(100% - 46px); width: 100%;">
<el-form ref="form" :rules="rules" :model="form" label-width="80px" style="width: 100%;padding: 10px 50px;">
<el-form-item label="图层:" prop="z2">
<el-input-number v-model="form.z2" controls-position="right" size="small" />
</el-form-item>
<el-form-item label="类型:" prop="width">
<el-select v-model="form.doorType" placeholder="请选择">
<el-option
@ -41,6 +44,7 @@ export default {
return {
form:{
code: '',
z2: '',
doorType: '1',
r: 1,
rotationAngle: 0,
@ -72,6 +76,7 @@ export default {
this.showDeleteButton = true;
this.isUpdate = true;
this.form.code = model.code;
this.form.z2 = model.z2;
this.form.x = model.point.x;
this.form.y = model.point.y;
this.form.r = model.r;
@ -90,6 +95,7 @@ export default {
x: this.form.x,
y: this.form.y
},
z2: this.form.z2,
code: this.isUpdate ? this.form.code : getUID('OrdinaryDoor', this.iscs.ordinaryDoorList),
_type: 'OrdinaryDoor',
rotationAngle: this.form.rotationAngle,
@ -109,6 +115,7 @@ export default {
x: this.form.x,
y: this.form.y
},
z2: this.form.z2,
code: this.form.code,
_type: 'OrdinaryDoor',
rotationAngle: this.form.rotationAngle,
@ -123,6 +130,7 @@ export default {
this.showDeleteButton = false;
this.form = {
code: '',
z2: '',
doorType: '1',
r: 1,
rotationAngle: 0,

View File

@ -0,0 +1,125 @@
<template>
<div v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.6)" style="width:100%;height:100%;">
<div class="fasIndex" :style="{'background':bacground}">
<div class="fasIndex_header">{{ title }}</div>
<div>
<iscsSystem ref="iscsPlate" />
</div>
<!-- <div class="psdSystem_footer">
<div class="prevButton">{{}}</div>
<div class="nextButton">{{}}</div>
</div> -->
</div>
</div>
</template>
<script>
import iscsSystem from '../canvas/iscsCanvas';
import {getIscsData} from '@/api/iscs';
export default {
name:'Fas',
components:{
iscsSystem
},
data() {
return {
title:'',
bacground:'rgba(66,90,116,1)',
loading:false,
width:window.innerWidth,
scaleRate:window.innerWidth / 2200,
height: 1000
};
},
computed:{
stationName() {
return this.$route.query.stationName;
},
stationId() {
return this.$route.query.stationId;
}
// height() {
// return 970;
// }
},
watch:{
$route() {
this.mode = this.$route.params.mode;
this.getInitData();
}
},
created() {
this.mode = this.$route.params.mode;
},
mounted() {
this.getInitData();
},
methods:{
getInitData() {
const params = {
// lineCode: this.$route.query.lineCode,
mapId: this.$route.query.mapId,
system: 'fas',
totalSystem :'fas02',
userInterface : this.mode
};
if (this.mode == 'gas') {
this.title = this.stationName + ' 气体灭火系统';
this.scaleRate = window.innerWidth / 1920;
this.height = 970;
} else if (this.mode == 'sensing') {
this.title = '';
this.scaleRate = window.innerWidth / 1920;
this.height = 800;
} else if (this.mode == 'section') {
this.title = this.stationName + ' 火灾报警系统 区间层';
this.scaleRate = window.innerWidth / 1920;
this.height = 900;
} else if (this.mode == 'linkage') {
this.title = this.stationName + ' 火灾报警系统 FAS联动';
this.scaleRate = window.innerWidth / 1920;
this.height = 900;
} else if (this.mode == 'stationHall') {
this.title = '';
params.userInterface = 'stationHallOne';
params.system = 'stationHall';
this.scaleRate = window.innerWidth / 1920;
this.height = 850;
} else if (this.mode == 'platform') {
params.userInterface = 'platformOne';
params.system = 'platform';
this.scaleRate = window.innerWidth / 1920;
this.height = 850;
}
this.loading = true;
this.$refs.iscsPlate.show({}, this.width, this.height, this.scaleRate);
getIscsData(params).then(resp=>{
if (resp.data) {
this.loading = false;
const data = JSON.parse(resp.data.graphData);
this.$refs.iscsPlate.show(data, this.width, this.height, this.scaleRate);
document.querySelector('.fasIndex').scrollTop = 0;
}
});
}
}
};
</script>
<style lang="scss" scoped>
.fasIndex_header{
text-align: center;
margin-top: 15px;
color: #d8e9a5;
font-size: 25px;
}
.fasIndex{
display: inline-block;
width:100%;
height:100%;
overflow-x: hidden;
overflow-y: auto;
vertical-align: top;
}
.SubstationIn{
display: inline-block;
}
</style>

View File

@ -3,8 +3,11 @@
<psd-system v-if="mode=='psdSystem'" />
<substation v-else-if="mode=='substation'" />
<schedule v-else-if="mode=='schedule'" />
<normal v-else-if="mode=='environmentThree'" />
<normal v-else-if="mode=='environmentFour'" />
<normal v-else-if="mode.includes('environment')" />
<fas v-else-if="fasList.includes(mode)" />
<signal-system v-else-if="mode === 'signal'" />
<!-- environmentThree -->
<!-- <normal v-else-if="mode=='environmentFour'" />
<normal v-else-if="mode=='environmentFive'" />
<normal v-else-if="mode=='environmentSix'" />
<normal v-else-if="mode=='environmentSeven'" />
@ -13,8 +16,10 @@
<normal v-else-if="mode=='environmentTen'" />
<normal v-else-if="mode=='environmentThirteen'" />
<normal v-else-if="mode=='environmentEleven'" />
<normal v-else-if="mode=='environmentTwelve'" />
<big-screen v-else-if="mode === 'signal'" />
<normal v-else-if="mode=='environmentTwelve'" /> -->
<!-- <big-screen v-else-if="mode === 'signal'" /> -->
<!-- <big-screen v-else-if="mode === 'signal'" /> -->
<ticket-or-entrance v-else-if="mode === 'autoTicket'" />
<!-- -->
</div>
</template>
@ -23,7 +28,11 @@ import PsdSystem from './psdSystem/index.vue';
import Substation from './powerMonitor/substation.vue';
import Normal from './environment/index.vue';
import Schedule from './schedule';
import BigScreen from '@/views/designPlatform/bigScreen';
import Fas from './fas/index.vue';
import SignalSystem from './signalSystem/index.vue';
// import BigScreen from '@/views/designPlatform/bigScreen';
import TicketOrEntrance from './ticketOrEntrance/index';
// import BigScreen from '@/views/designPlatform/bigScreen';
import { getSimulationInfoNew } from '@/api/simulation';
import { getByGroupStationList } from '@/api/jmap/map';
import { loadRunPlanData } from '@/utils/loaddata';
@ -33,12 +42,16 @@ export default {
PsdSystem,
Substation,
Normal,
BigScreen
// BigScreen,
SignalSystem,
Fas,
TicketOrEntrance
},
data() {
return {
mode: 'index',
deviceList: []
deviceList: [],
fasList:['sensing', 'gas', 'section', 'linkage', 'stationHall', 'platform']
};
},
computed: {

View File

@ -0,0 +1,102 @@
<template>
<div v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.6)" style="width:100%;height:100%;">
<div class="fasIndex" :style="{'background':bacground}">
<div class="fasIndex_header">{{ title }}</div>
<div>
<iscsSystem ref="iscsPlate" />
</div>
<!-- <div class="psdSystem_footer">
<div class="prevButton">{{}}</div>
<div class="nextButton">{{}}</div>
</div> -->
</div>
</div>
</template>
<script>
import iscsSystem from '../canvas/iscsCanvas';
import {getIscsData} from '@/api/iscs';
export default {
name:'Fas',
components:{
iscsSystem
},
data() {
return {
title:'',
bacground:'rgba(66,90,116,1)',
loading:false,
width:window.innerWidth,
scaleRate:window.innerWidth / 2200,
height: 1000
};
},
computed:{
stationName() {
return this.$route.query.stationName;
},
stationId() {
return this.$route.query.stationId;
}
// height() {
// return 970;
// }
},
watch:{
$route() {
this.mode = this.$route.params.mode;
this.getInitData();
}
},
created() {
this.mode = this.$route.params.mode;
},
mounted() {
this.getInitData();
},
methods:{
getInitData() {
const params = {
// lineCode: this.$route.query.lineCode,
mapId: this.$route.query.mapId,
system: 'signalSystem',
totalSystem :'signalSystem02',
userInterface : this.mode
};
if (this.mode == 'signal') {
this.title = this.stationName + ' 信号系统';
this.scaleRate = window.innerWidth / 1920;
this.height = 900;
}
this.loading = true;
this.$refs.iscsPlate.show({}, this.width, this.height, this.scaleRate);
getIscsData(params).then(resp=>{
if (resp.data) {
this.loading = false;
const data = JSON.parse(resp.data.graphData);
this.$refs.iscsPlate.show(data, this.width, this.height, this.scaleRate);
document.querySelector('.fasIndex').scrollTop = 0;
}
});
}
}
};
</script>
<style lang="scss" scoped>
.fasIndex_header{
text-align: center;
margin-top: 15px;
color: #d8e9a5;
font-size: 25px;
}
.fasIndex{
display: inline-block;
width:100%;
height:100%;
overflow-x: hidden;
overflow-y: auto;
vertical-align: top;
}
.SubstationIn{
display: inline-block;
}
</style>

View File

@ -0,0 +1,98 @@
<template>
<div v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.6)" style="width:100%;height:100%;">
<div class="fasIndex" :style="{'background':bacground}">
<div class="fasIndex_header">{{ title }}</div>
<div>
<iscsSystem ref="iscsPlate" />
</div>
</div>
</div>
</template>
<script>
import iscsSystem from '../canvas/iscsCanvas';
import {getIscsData} from '@/api/iscs';
export default {
name:'TicketOrEntrance',
components:{
iscsSystem
},
data() {
return {
title:'',
bacground:'rgba(0,0,0,0)',
loading:false,
width:window.innerWidth,
scaleRate:window.innerWidth / 2200,
height: 1000
};
},
computed:{
stationName() {
return this.$route.query.stationName;
},
stationId() {
return this.$route.query.stationId;
}
// height() {
// return 970;
// }
},
watch:{
$route() {
this.mode = this.$route.params.mode;
this.getInitData();
}
},
created() {
this.mode = this.$route.params.mode;
},
mounted() {
this.getInitData();
},
methods:{
getInitData() {
const params = {
// lineCode: this.$route.query.lineCode,
mapId: this.$route.query.mapId,
system: 'afc',
totalSystem :'afc02',
userInterface : this.mode
};
if (this.mode == 'autoTicket') {
this.title = this.stationName + ' 自动售检票系统';
this.scaleRate = window.innerWidth / 1920;
this.height = 800;
}
this.loading = true;
this.$refs.iscsPlate.show({}, this.width, this.height, this.scaleRate);
getIscsData(params).then(resp=>{
if (resp.data) {
this.loading = false;
const data = JSON.parse(resp.data.graphData);
this.$refs.iscsPlate.show(data, this.width, this.height, this.scaleRate);
document.querySelector('.fasIndex').scrollTop = 0;
}
});
}
}
};
</script>
<style lang="scss" scoped>
.fasIndex_header{
text-align: center;
margin-top: 15px;
color: #d8e9a5;
font-size: 25px;
}
.fasIndex{
display: inline-block;
width:100%;
height:100%;
overflow-x: hidden;
overflow-y: auto;
vertical-align: top;
}
.SubstationIn{
display: inline-block;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
<template>
<div>
<div :id="iscsId" v-loading="loading" :style="{ width: canvasWidth +'px', height: canvasHeight +'px',background:'#45607B' }" class="iscs-canvas" />
<div :id="iscsId" v-loading="loading" :style="{ width: canvasWidth +'px', height: canvasHeight +'px',background:'#425a74' }" class="iscs-canvas" />
<el-button v-if="showBackButton" class="iscs-button" type="primary" @click="back">{{ $t('global.back') }}</el-button>
</div>
</template>
@ -126,8 +126,9 @@ export default {
// this.setIscs(parserData, data);
// this.$store.dispatch('iscs/setIscsData', data);
getIscsData(params).then(resp => {
// resp.data = {graphData: require('./data.json')}
if (resp.data) {
const data = JSON.parse(resp.data.graphData);
const data = resp.data.graphData instanceof Object ? resp.data.graphData : JSON.parse(resp.data.graphData);
const parserData = parser(data, {width: this.canvasWidth, height: this.canvasHeight});
this.setIscs(parserData, data);
this.$store.dispatch('iscs/setIscsData', data);
@ -179,7 +180,8 @@ export default {
} else if (this.selected._type != 'CheckBox') {
this.copyModel = this.copyModelInfo(this.selected, 10);
const type1 = this.selected._type.charAt(0).toLowerCase() + this.selected._type.slice(1);
this.copyModel.code = getUID(this.selected._type, this.iscs[type1 + 'List'] || []);
const list = this.iscs[type1 + 'List'] || [];
this.copyModel.code = getUID(this.selected._type, list);
} else {
this.copyModel = {};
}

File diff suppressed because it is too large Load Diff

View File

@ -144,10 +144,12 @@ export default {
};
},
mounted() {
getPostByProjectCode(this.projectCode).then(resp => {
this.postId = resp.data.id;
});
this.handleCurrentChange();
if (this.project) {
getPostByProjectCode(this.projectCode).then(resp => {
this.postId = resp.data.id;
});
this.handleCurrentChange();
}
},
methods: {
commitComment() {

View File

@ -29,7 +29,7 @@ export default {
'$route': function() {
},
'$store.state.map.mapViewLoadedCount': function (val) {
window.parent.postMessage(Object.assign({}, {type: 'DEMO_MAP_LOADED'}), 'http://localhost:9527/cbtc/demo');
window.parent.postMessage(Object.assign({}, {type: 'DEMO_MAP_LOADED'}), 'https://test.joylink.club/cbtc/demo');
}
},
async mounted() {
@ -58,7 +58,7 @@ export default {
}
},
exitSimulation(result = {}) {
window.parent.postMessage(Object.assign(result, {type: 'DEMO_RESULT'}), 'http://localhost:9527/cbtc/demo');
window.parent.postMessage(Object.assign(result, {type: 'DEMO_RESULT'}), 'https://test.joylink.club/cbtc/demo');
}
}
};

View File

@ -155,13 +155,16 @@ export default {
EventBus.$on('quitScene', () => {
this.practiceDisabled = false;
});
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
if (this.project) {
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
// this.$message.error('');
console.log('获取留言板信息失败');
});
}
},
methods:{
menuClick() {

View File

@ -139,13 +139,16 @@ export default {
}
},
mounted() {
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
this.$message.error('获取留言板信息失败');
});
if (this.project) {
getPostByProjectCode(ProjectCode[this.project]).then(resp => {
if (resp.data) {
this.messageBoard = true;
}
}).catch(() => {
// this.$message.error('');
console.log('获取留言板信息失败');
});
}
},
methods: {
tipInfo(opt) {

View File

@ -125,28 +125,32 @@ export default {
handleClick: this.sectionDetail
}
]
},
{
type: 'button',
title: this.$t('map.operation'),
width: '300',
buttons: [
{
name: this.$t('map.preview'),
handleClick: this.routingPreview
}
// {
// name: this.$t('map.compile'),
// handleClick: this.editObj
// },
// {
// name: this.$t('map.deleteObj'),
// handleClick: this.deleteObj,
// type: 'danger'
// },
// {
// name: '',
// handleClick: this.generateData,
// type: 'danger'
// }
]
}
// {
// type: 'button',
// title: this.$t('map.operation'),
// width: '300',
// buttons: [
// {
// name: this.$t('map.compile'),
// handleClick: this.editObj
// },
// {
// name: this.$t('map.deleteObj'),
// handleClick: this.deleteObj,
// type: 'danger'
// },
// {
// name: '',
// handleClick: this.generateData,
// type: 'danger'
// }
// ]
// }
]
}
};
@ -271,6 +275,10 @@ export default {
// });
// }
// },
routingPreview(index, row) {
this.$emit('routingSelected', row);
this.doClose();
},
sectionDetail(index, row) {
const sectionDict = {};
const stationDict = {};

View File

@ -35,7 +35,8 @@ export default {
},
data() {
return {
enabledTab: 'Route'
enabledTab: 'Route',
oldsection:[]
// routeData: null
};
},
@ -59,9 +60,10 @@ export default {
},
routingSelected: function (data) {
// this.routeData = data;
if (this.$refs && this.$refs.routeEdit) {
this.$refs.routeEdit.editData(data);
}
// if (this.$refs && this.$refs.routeEdit) {
// this.$refs.routeEdit.editData(data);
// }
this.changeSectionSelected(data.parkSectionCodeList, true);
},
previewRouteEvent: function () {
if (this.$refs && this.$refs.routeDetail) {
@ -84,6 +86,50 @@ export default {
},
batchSectionListFocus(flag) {
// this.$refs.routeEdit.batchSectionListFocus(flag);
this.changeSectionSelected(this.oldsection, flag);
},
changeSectionSelected(selectedList, flag) {
if (selectedList && selectedList.length > 0) {
if (flag) {
if (this.oldsection.length > 0) {
this.oldsection.forEach((sectionInfo)=>{
const section = this.$store.getters['map/getDeviceByCode'](sectionInfo.sectionCode);
section.instance.drawBatchSelected(section, '');
});
this.oldsection = [];
}
selectedList.forEach(each=>{
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
const list = section.logicSectionCodeList;
// if()
// relSwitchCode
if (list && list.length > 0) {
list.forEach(logicSectionCode=>{
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
this.oldsection.push(logicSection);
logicSection.instance.drawBatchSelected(section, 'routingSection');
});
} else {
this.oldsection.push({sectionCode:section.code});
section.instance.drawBatchSelected(section, 'routingSection');
}
});
this.$jlmap.setCenter(selectedList[0].sectionCode);
} else {
selectedList.forEach(each=>{
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
const list = section.logicSectionCodeList;
if (list && list.length > 0) {
list.forEach(logicSectionCode=>{
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
logicSection.instance.drawBatchSelected(section, '');
});
} else {
section.instance.drawBatchSelected(section, '');
}
});
}
}
}
}
};

View File

@ -215,7 +215,6 @@ export default {
{ prop: 'zcCode', label: this.$t('map.zcCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.zcList, isHidden: !this.isZcCode, disabled:true },
{ prop: 'chargeStationCodeList', label: '管理车站列表:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.chargeStation, isHidden: !this.isZcCode },
{ prop: 'relStationCodeList', label: '联锁站关联车站:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.relStationList, isHidden: !this.idCiStation},
{ prop: 'routingStationList', label: '生成交路的车站:', type: 'multiSelectHover', optionLabel: 'name', optionValue: 'code', options: this.stationList, hover: this.hover, buttonType: 'routingStation', buttonShowType: this.routingStationButtonShow },
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' },
{ prop: 'jp', label: '车站简称:', type: 'input' }
]
@ -257,9 +256,6 @@ export default {
},
isReentry() {
return this.editModel.reentry;
},
routingStationButtonShow() {
return this.field === 'routingStation';
}
},
methods: {
@ -306,11 +302,6 @@ export default {
return !data.centralized && data.code != this.editModel.code && !(beCentralizedStation[data.code] && beCentralizedStation[data.code] != this.editModel.code);
});
this.controlled = !!beCentralizedStation[selected.code];
} else if (selected && selected._type === 'Station' && this.field == 'routingStation') {
this.activeName = 'first';
if (!this.editModel.routingStationList.includes(selected.code) && this.editModel.code != selected.code) {
this.editModel.routingStationList.push(selected.code);
}
} else if (selected && selected._type === 'Section' && this.field == 'standSection') {
this.$set(this.rowData, 'sectionCode', selected.code);
}

View File

@ -24,7 +24,7 @@
</template>
<script>
import { getLessonListsSelfNoPage } from '@/api/jmap/lesson';
import { getLessonProjectListNoPage } from '@/api/jmap/lesson';
import { getClassAssociatedLessons, setClassAssociatedLessons } from '@/api/company';
export default {
@ -58,7 +58,7 @@ export default {
async doShow(row) {
try {
this.lessonList = [];
const resp = await getLessonListsSelfNoPage();
const resp = await getLessonProjectListNoPage();
this.lessonList = resp.data;
const rest = await getClassAssociatedLessons(row.id);
this.classModel.id = row.id;

View File

@ -49,7 +49,7 @@ export default {
this.title = '编辑班级名称';
} else {
this.isEdit = false;
this.title = '创建课程';
this.title = '新建班级';
}
this.dialogShow = true;
},
@ -62,16 +62,28 @@ export default {
this.$emit('refresh');
this.doClose();
this.$message.success('修改班级成功!');
}).catch(() => {
this.$message.error('修改班级失败!');
}).catch((error) => {
if (error.code == 11013) {
this.$message.error('修改班级失败:名称重复!');
} else if (error.code == 10003) {
this.$message.error('修改班级失败:没有权限修改班级!');
} else {
this.$message.error('修改班级失败!');
}
});
} else {
createClass({name: this.classModel.className}).then(response => {
this.$emit('refresh');
this.doClose();
this.$message.success('创建班级成功!');
}).catch(() => {
this.$message.error('创建班级失败!');
}).catch((error) => {
if (error.code == 11013) {
this.$message.error('创建班级失败:名称重复!');
} else if (error.code == 10003) {
this.$message.error('创建班级失败:没有权限修改班级!');
} else {
this.$message.error('创建班级失败!');
}
});
}

View File

@ -13,7 +13,7 @@
</template>
<script>
import { getClassListPageSelf, deleteDeptInfo } from '@/api/company';
import { getClassListPage, deleteDeptInfo } from '@/api/company';
import CreateClass from './createClass';
import BindLessons from './bindLessons';
export default {
@ -38,11 +38,25 @@ export default {
name: {
type: 'text',
label: '班级名称:'
},
creatorName: {
type: 'text',
label: '创建人:'
}
// self: {
// type: 'select',
// label: ':',
// config: {
// data: [
// { label: '', value: true },
// { label: '', value: false }
// ]
// }
// }
}
},
classQueryList: {
query: getClassListPageSelf,
query: getClassListPage,
selectCheckShow: false,
indexShow: true,
columns: [
@ -59,6 +73,10 @@ export default {
title: '创建日期',
prop: 'createTime'
},
{
title: '创建人',
prop: 'creatorName'
},
{
type: 'button',
title: this.$t('global.operate'),
@ -67,7 +85,10 @@ export default {
{
name: '编辑班级',
handleClick: this.handleUpdateClass,
type: 'primary'
type: 'primary',
showControl: (row) => {
return row.creatorId == this.userId;
}
},
{
name: '学生管理',
@ -87,7 +108,10 @@ export default {
{
name: '删除',
handleClick: this.handleDeleteClass,
type: 'danger'
type: 'danger',
showControl: (row) => {
return row.creatorId == this.userId;
}
}
]
}
@ -99,6 +123,11 @@ export default {
}
};
},
computed: {
userId() {
return this.$store.state.user.id;
}
},
methods: {
handleUpdateClass(index, row) {
this.$refs.createClass.doShow(row);
@ -130,7 +159,7 @@ export default {
this.$router.go(-1);
},
handleStudentDetail( index, row ) {
this.$router.push({ path: '/info/studentManage', query: { classId: row.id, className: row.name} });
this.$router.push({ path: '/info/studentManage', query: { classId: row.id, className: row.name, creatorId: row.creatorId} });
},
handleBindLesson(index, row) {
this.$refs.bindLessons.doShow(row);

View File

@ -1,15 +1,15 @@
<template>
<el-dialog v-dialogDrag title="新建学生" :visible.sync="dialogShow" width="400px" :before-close="doClose">
<el-form ref="form" :model="studentModel" :rules="rules" label-width="120px" size="mini">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" width="400px" :before-close="doClose">
<el-form ref="form111" :model="studentModel" :rules="rules" label-width="120px" size="mini">
<el-form-item label="学生姓名:" prop="name">
<el-input v-model="studentModel.name" style="width: 220px;" />
</el-form-item>
<el-form-item label="学号:" prop="account">
<el-input v-model="studentModel.account" style="width: 220px;" />
<el-input v-model="studentModel.account" style="width: 220px;" :disabled="title==='修改学生'" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" :loading="loading" @click="create">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
@ -47,17 +47,20 @@ export default {
},
methods: {
doShow(row) {
if (row) {
this.studentModel.name = row.name;
this.studentModel.account = row.account;
this.title = '修改学生';
} else {
this.title = '新建学生';
this.dialogShow = true;
}
this.$nextTick(() => {
this.$refs.form111 && this.$refs.form111.resetFields();
if (row) {
this.studentModel.name = row.name;
this.studentModel.account = row.account;
this.title = '修改学生';
} else {
this.title = '新建学生';
}
});
this.dialogShow = true;
},
create() {
this.$refs.form.validate((valid) => {
this.$refs.form111.validate((valid) => {
if (valid) {
const model = {
account: this.studentModel.account,
@ -67,14 +70,13 @@ export default {
this.$emit('refresh');
this.doClose();
this.$message.success('创建学生成功!');
}).catch(() => {
this.$message.error('创建学生失败');
}).catch((error) => {
this.$message.error('创建学生失败' + error.message );
});
}
});
},
doClose() {
this.$refs.form.resetFields();
this.dialogShow = false;
}
}

View File

@ -57,20 +57,26 @@ export default {
// {
// name: '',
// handleClick: this.updateStudentInfo,
// type: 'primary'
// type: 'primary',
// showControl: (row) => {
// return this.$route.query.creatorId == this.$store.state.user.id;
// }
// },
{
name: '移出班级',
handleClick: this.removeStudent,
type: 'danger'
type: 'danger',
showControl: (row) => {
return this.$route.query.creatorId == this.$store.state.user.id;
}
}
]
}
],
actions: [
{ text: '添加学生', handler: this.createStudent },
{ text: '添加学生', handler: this.createStudent, show: this.$route.query.creatorId == this.$store.state.user.id },
{ text: '导入模板下载', handler: this.exportTemplate },
{ text: '导入学生', handler: this.importResults, fileType: 'file' },
{ text: '导入学生', handler: this.importResults, fileType: 'file', show: this.$route.query.creatorId == this.$store.state.user.id },
{ text: '返回', handler: this.goBack }
]
}
@ -99,9 +105,9 @@ export default {
const obj = document.getElementById('queryFormFilesInput');
if (!obj || !obj.files) return;
const f = obj.files[0];
this.handleImportResults(f);
this.handleImportResults(f, obj);
},
handleImportResults(file) {
handleImportResults(file, who) {
if (file) {
setTimeout(() => {
const that = this;
@ -125,19 +131,26 @@ export default {
for (const index in wb.Sheets) {
const dataList = convertSheetToList(wb.Sheets[index], true);
if (dataList.length) {
const accountMap = {};
for ( let i = 1; i <= dataList[0].length; i++) {
const studentId = dataList[0][i];
const name = dataList[1][i];
const reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
const studentIdJudge = !!studentId && !reg.test(studentId);
if (studentIdJudge && name) {
if (accountMap[dataList[0][i]]) {
throw new Error(`学号为:《${studentId}》的数据重复请检查导入的Excel`);
}
accountMap[dataList[0][i]] = dataList[1][i];
students.push({account:dataList[0][i], name: dataList[1][i]});
} else {
if (!studentId && !name) {
break;
} else if (!name) {
who.value = '';
throw new Error(`学号为:《${studentId}》的数据学生姓名为空!`);
} else if (!studentIdJudge) {
who.value = '';
throw new Error(`学号为:《${studentId}》的数据学号格式不正确!`);
}
}
@ -147,9 +160,11 @@ export default {
that.loadingStudentInfo = true;
importCompanyMember(that.$route.query.classId, students).then(resp => {
that.$message.success('学生信息导入成功!');
who.value = '';
that.loadingStudentInfo = false;
}).catch((error) => {
that.$message.error('学生信息导入失败:' + error.message);
who.value = '';
that.loadingStudentInfo = false;
});
} catch (error) {

View File

@ -19,7 +19,7 @@
</template>
<script>
import { getLessonListsSelfNoPage } from '@/api/jmap/lesson';
import { getLessonProjectListNoPage } from '@/api/jmap/lesson';
import { createLessonFromPublish } from '@/api/jmap/lessondraft';
export default {
@ -53,7 +53,7 @@ export default {
doShow() {
this.lessonList = [];
this.mapData = {};
getLessonListsSelfNoPage().then(response => {
getLessonProjectListNoPage().then(response => {
this.lessonList = response.data.map(elem => {
this.mapData[elem.id] = elem.mapId;
return { code: elem.id, name: elem.name };

View File

@ -49,8 +49,9 @@
<script>
import { createLesson } from '@/api/jmap/lessondraft';
import { getPublishMapListOnline } from '@/api/jmap/map';
import { getMapListByProjectCode } from '@/api/jmap/map';
import Cookies from 'js-cookie';
import { getSessionStorage } from '@/utils/auth';
export default {
name: 'EditLesson',
@ -100,11 +101,14 @@ export default {
]
};
return baseRules;
},
project() {
return getSessionStorage('project');
}
},
mounted() {
this.mapIdList = [];
getPublishMapListOnline().then(response => {
getMapListByProjectCode(this.project).then(response => {
this.mapIdList = response.data;
});
},

View File

@ -12,6 +12,9 @@
<el-form-item :label="$t('lesson.publishCourseName')" prop="name">
<el-input v-model="editModel.name" />
</el-form-item>
<el-form-item label="是否覆盖同名课程:" prop="coverSameNameLesson">
<el-checkbox v-model="editModel.coverSameNameLesson" />
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
@ -34,7 +37,8 @@ export default {
id: '',
name: '',
mapId: '',
prdType: ''
prdType: '',
coverSameNameLesson: false
}
};
},

View File

@ -13,7 +13,7 @@
<script>
import { getClassGradeList } from '@/api/management/userexam';
import { getClassListUnPageSelf } from '@/api/company';
import { getClassListUnPage } from '@/api/company';
import XLSX from 'xlsx';
export default {
name: 'GradeList',
@ -86,7 +86,7 @@ export default {
},
created() {
const list = this.$route.query.clsIds.split('-');
getClassListUnPageSelf().then(response => {
getClassListUnPage().then(response => {
const classList = [];
response.data && response.data.forEach(item => {
if (list.includes(item.id + '')) {

View File

@ -11,9 +11,9 @@
</template>
<script>
import { getLessonListsSelfNoPage } from '@/api/jmap/lesson';
import { getClassListUnPageSelf } from '@/api/company';
import { getExamListSelf, deleteExam } from '@/api/management/exam';
import { getLessonProjectListNoPage } from '@/api/jmap/lesson';
import { getClassListUnPage } from '@/api/company';
import { getExamListProject, deleteExam } from '@/api/management/exam';
import localStore from 'storejs';
export default {
@ -41,7 +41,21 @@ export default {
config: {
data: []
}
},
creatorName: {
type: 'text',
label: '创建人:'
}
// self: {
// type: 'select',
// label: ':',
// config: {
// data: [
// { label: '', value: true },
// { label: '', value: false }
// ]
// }
// }
// clsId: {
// type: 'select',
// label: ':',
@ -52,7 +66,7 @@ export default {
}
},
examQueryList: {
query: getExamListSelf,
query: getExamListProject,
selectCheckShow: false,
indexShow: true,
columns: [
@ -65,7 +79,7 @@ export default {
prop: 'lessonId',
type: 'tag',
columnValue: (row) => {
return this.$convertField(row.lessonId, this.lessonList, ['id', 'name']);
return this.$convertField(row.lessonId, this.lessonList || [], ['id', 'name']);
},
tagType: (row) => { }
},
@ -73,26 +87,34 @@ export default {
title: '班级',
prop: 'clsIds',
type: 'tagMore',
columnValue: (row) => { return this.$convertField(row.clsIds, this.classList, ['id', 'name'], true); },
columnValue: (row) => { return this.$convertField(row.clsIds || [], this.classList || [], ['id', 'name'], true); },
tagType: (row) => { return 'success'; }
},
{
title: '满分',
prop: 'fullPoint'
prop: 'fullPoint',
width: '80'
},
{
title: '及格分',
prop: 'passingPoint'
prop: 'passingPoint',
width: '80'
},
{
title: '时长',
prop: 'duration',
type: 'tag',
width: '80',
columnValue: (row) => {
return Math.floor(row.duration / 60);
},
tagType: (row) => { }
},
{
title: '创建人',
prop: 'creatorName',
width: '150'
},
{
type: 'button',
title: this.$t('global.operate'),
@ -109,7 +131,10 @@ export default {
{
name: '删除',
handleClick: this.handleDeleteExam,
type: 'danger'
type: 'danger',
showControl: (row) => {
return row.creatorId == this.userId;
}
}
]
}
@ -121,18 +146,20 @@ export default {
}
};
},
mounted() {
getLessonListsSelfNoPage().then(response => {
computed: {
userId() {
return this.$store.state.user.id;
}
},
created() {
getLessonProjectListNoPage().then(response => {
this.lessonList = response.data;
this.lessonList.forEach(item => {
this.examQueryForm.queryObject.lessonId.config.data.push({ value: item.id, label: item.name });
});
});
getClassListUnPageSelf().then(response => {
getClassListUnPage().then(response => {
this.classList = response.data;
// this.classList.forEach(item => {
// this.examQueryForm.queryObject.clsId.config.data.push({ value: item.id, label: item.name });
// });
});
},
methods: {

View File

@ -13,7 +13,7 @@
<script>
import { getPublishMapListOnline } from '@/api/jmap/map';
import { getLessonListSelf, forceDeleteLesson } from '@/api/jmap/lesson';
import { getLessonProjectList, forceDeleteLesson } from '@/api/jmap/lesson';
import EditLessonInfo from './editLessonInfo';
import localStore from 'storejs';
export default {
@ -38,11 +38,25 @@ export default {
name: {
type: 'text',
label: '课程名称:'
},
creatorName: {
type: 'text',
label: '创建人:'
}
// self: {
// type: 'select',
// label: ':',
// config: {
// data: [
// { label: '', value: true },
// { label: '', value: false }
// ]
// }
// }
}
},
lessonQueryList: {
query: getLessonListSelf,
query: getLessonProjectList,
selectCheckShow: false,
indexShow: true,
columns: [
@ -65,6 +79,10 @@ export default {
title: this.$t('lesson.courseDescription'),
prop: 'remarks'
},
{
title: '创建人',
prop: 'creatorName'
},
{
type: 'button',
title: this.$t('global.operate'),
@ -73,7 +91,10 @@ export default {
{
name: '修改课程',
handleClick: this.handleEditLessonInfo,
type: 'primary'
type: 'primary',
showControl: (row) => {
return row.creatorId == this.userId;
}
},
{
name: '考试管理',
@ -83,7 +104,10 @@ export default {
{
name: '删除',
handleClick: this.handleDeleteLesson,
type: 'danger'
type: 'danger',
showControl: (row) => {
return row.creatorId == this.userId;
}
}
]
}
@ -94,6 +118,11 @@ export default {
}
};
},
computed: {
userId() {
return this.$store.state.user.id;
}
},
mounted() {
this.mapIdList = [];
getPublishMapListOnline().then(response => {

View File

@ -0,0 +1,98 @@
<template>
<el-dialog v-dialogDrag title="应用规则" :visible.sync="dialogShow" width="30%" :before-do-close="doClose">
<div>
<el-form
ref="form"
label-position="right"
:rules="rules"
:model="editModel"
label-width="140px"
@submit.native.prevent
>
<el-form-item label="班级:" prop="orgIds">
<el-tooltip class="item" effect="dark" content="此处班级经过规则中涉及到的课程和考试筛选处理" placement="top-start">
<i class="el-icon-info" />
</el-tooltip>
<el-select v-model="editModel.orgIds" multiple placeholder="请选择">
<el-option
v-for="item in classList"
:key="item.id"
:label="item.name"
:value="parseInt(item.id)"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" :loading="loading" @click="doSave">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</template>
<script>
import { applyRuleToClass, getCanApplyToList } from '@/api/company';
export default {
name: 'PublishLesson',
data() {
return {
dialogShow: false,
loading: false,
disabled: true,
classList: [],
editModel: {
id: '',
orgIds: []
}
};
},
computed: {
rules() {
return {
orgIds: [
{ required: true, message: '请选择班级', trigger: 'change' }
]
};
}
},
methods: {
doShow(model) {
getCanApplyToList(model.id).then(resp => {
this.classList = resp.data;
if (!this.classList.length) {
this.$messageBox('暂无可应用的班级,请未班级排课或者修改规则后操作!');
}
}).catch(error => {
this.$message.error('获取可应用的班级列表失败:' + error.message);
});
this.editModel = {
id: model.id,
orgIds: model.orgIds
};
this.dialogShow = true;
},
doClose() {
this.$refs.form.resetFields();
this.dialogShow = false;
this.$emit('refresh');
},
doSave() {
this.loading = true;
this.$refs['form'].validate((valid) => {
if (valid) {
applyRuleToClass(this.editModel.id, this.editModel.orgIds).then(response => {
this.loading = false;
this.$message.success('应用成功!');
this.doClose();
}).catch((error) => {
this.loading = false;
this.$message.error('应用失败' + ':' + error.message);
});
}
});
}
}
};
</script>

View File

@ -9,23 +9,13 @@
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="8">
<el-form-item label="班级" prop="orgId">
<el-tooltip class="item" effect="dark" content="因班级与课程、试卷关联,故修改班级时会将课程试卷相关规则清除,请谨慎修改!" placement="top">
<i class="el-icon-question" />
</el-tooltip>
<el-select v-model="form.orgId" placeholder="请选择班级" :disabled="isDetail" @change="classChange">
<el-option
v-for="item in classList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" placeholder="请输入内容" style="width: 200px;" :disabled="isDetail" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="学年" prop="schoolYear">
<el-select v-model="form.schoolYear" placeholder="请选择学年" :disabled="isDetail" @change="schoolChange">
<el-select v-model="form.schoolYear" placeholder="请选择学年" :disabled="isDetail">
<el-option
v-for="item in schoolYearList"
:key="item.value"
@ -37,7 +27,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="学期" prop="term">
<el-select v-model="form.term" placeholder="请选择学年" :disabled="isDetail" @change="termChange">
<el-select v-model="form.term" placeholder="请选择学年" :disabled="isDetail">
<el-option
v-for="item in termList"
:key="item.value"
@ -52,61 +42,88 @@
</div>
</el-card>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>平时成绩</span>
</div>
<div style="width: 100%;">
<div style="display: flex;flex-wrap:wrap;width: 100%;">
<div style="width: 50%;padding: 20px;">
<el-tag>考勤</el-tag>
<el-table :data="attendanceData" style="margin-top: 10px;" border>
<el-table-column prop="startDate" label="开始日期" />
<el-table-column prop="endDate" label="截止日期" />
<el-table-column prop="days4FullMarks" label="考勤天数" />
<el-table-column prop="weight" label="权重" />
<el-table-column label="操作" width="100">
<!--<div style="width: 50%;padding: 20px;">-->
<!--<el-tag>考勤</el-tag>-->
<!--<el-table :data="attendanceData" style="margin-top: 10px;" border>-->
<!--<el-table-column prop="startDate" label="开始日期" />-->
<!--<el-table-column prop="endDate" label="截止日期" />-->
<!--<el-table-column prop="days4FullMarks" label="考勤天数" />-->
<!--<el-table-column prop="fullMarks" label="满分" />-->
<!--<el-table-column label="操作" width="100">-->
<!--<template slot-scope="scope">-->
<!--<el-button :disabled="isDetail" type="text" size="small" @click="editUsual(scope.row,scope.$index, 'attendance')">编辑</el-button>-->
<!--<el-button :disabled="isDetail" type="text" size="small" @click="deleteUsual(scope.row, scope.$index, 'attendance')">删除</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table>-->
<!--</div>-->
<!--<div style="width: 50%;padding: 20px;">-->
<!--<el-tag>日常测验</el-tag>-->
<!--<el-table :data="examsData" style="margin-top: 10px;" border>-->
<!--<el-table-column prop="examId" label="试卷">-->
<!--<template slot-scope="scope">-->
<!--<el-tag>{{ getExamName(scope.row.examId) }}</el-tag>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column prop="fullMarks" label="满分" />-->
<!--<el-table-column label="操作" width="100">-->
<!--<template slot-scope="scope">-->
<!--<el-button :disabled="isDetail" type="text" size="small" @click="editUsual(scope.row,scope.$index, 'exam')">编辑</el-button>-->
<!--<el-button :disabled="isDetail" type="text" size="small" @click="deleteUsual(scope.row, scope.$index, 'exam')">删除</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
<!--</el-table>-->
<!--</div>-->
<div style="width: 100%;padding: 20px;">
<el-tag>规则</el-tag>
<el-table :data="scoringDate" style="margin-top: 10px;" border>
<el-table-column prop="type" label="类型">
<template slot-scope="scope">
<el-button :disabled="isDetail" type="text" size="small" @click="editUsual(scope.row,scope.$index, 'attendance')">编辑</el-button>
<el-button :disabled="isDetail" type="text" size="small" @click="deleteUsual(scope.row, scope.$index, 'attendance')">删除</el-button>
<el-tag>{{ getRuleType(scope.row.type) }}</el-tag>
</template>
</el-table-column>
</el-table>
</div>
<div style="width: 50%;padding: 20px;">
<el-tag>日常测验</el-tag>
<el-table :data="examsData" style="margin-top: 10px;" border>
<el-table-column prop="examId" label="试卷">
<el-table-column prop="examId" label="测验试卷">
<template slot-scope="scope">
<el-tag>{{ getExamName(scope.row.examId) }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="weight" label="权重" />
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button :disabled="isDetail" type="text" size="small" @click="editUsual(scope.row,scope.$index, 'exam')">编辑</el-button>
<el-button :disabled="isDetail" type="text" size="small" @click="deleteUsual(scope.row, scope.$index, 'exam')">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div style="width: 100%;padding: 20px;">
<el-tag>学习时长</el-tag>
<el-table :data="learningTimeData" style="margin-top: 10px;" border>
<el-table-column prop="lessonIds" label="学习课程">
<template slot-scope="scope">
<template v-for="lessonId in scope.row.lessonIds">
<el-tag :key="lessonId">{{ getLessonName(lessonId) }}</el-tag>
<template v-if="scope.row.lessonIds && scope.row.lessonIds.length">
<template v-for="lessonId in scope.row.lessonIds">
<el-tag :key="lessonId">{{ getLessonName(lessonId) }}</el-tag>
</template>
</template>
<el-tag v-else>-</el-tag>
</template>
</el-table-column>
<el-table-column prop="startTime" label="开始时间" />
<el-table-column prop="endTime" label="截止时间" />
<el-table-column prop="duration4FullMarks" label="学习时长" />
<el-table-column prop="weight" label="权重" width="100" />
<el-table-column prop="startDate" label="开始时间">
<template slot-scope="scope">
<el-tag> {{ scope.row.startDate || '-' }} </el-tag>
</template>
</el-table-column>
<el-table-column prop="endDate" label="截止时间">
<template slot-scope="scope">
<el-tag> {{ scope.row.endDate || '-' }} </el-tag>
</template>
</el-table-column>
<el-table-column prop="duration4FullMarks" label="学习时长(分钟)">
<template slot-scope="scope">
<el-tag> {{ scope.row.duration4FullMarks || '-' }} </el-tag>
</template>
</el-table-column>
<el-table-column prop="days4FullMarks" label="考勤天数">
<template slot-scope="scope">
<el-tag> {{ scope.row.days4FullMarks || '-' }} </el-tag>
</template>
</el-table-column>
<el-table-column prop="fullMarks" label="满分" width="100" />
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button :disabled="isDetail" type="text" size="small" @click="editUsual(scope.row,scope.$index, 'learningTime')">编辑</el-button>
<el-button :disabled="isDetail" type="text" size="small" @click="deleteUsual(scope.row, scope.$index, 'learningTime')">删除</el-button>
<el-button :disabled="isDetail" type="text" size="small" @click="editUsual(scope.row,scope.$index)">编辑</el-button>
<el-button :disabled="isDetail" type="text" size="small" @click="deleteUsual(scope.row, scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
@ -114,17 +131,17 @@
</div>
<div v-if="!isDetail" style="padding: 20px;width: 100%;border-top: 2px #ccc solid;">
<div style="display: flex;justify-content: space-between;">
<el-tag>{{ isUsualEdit? '编辑平时成绩规则:': '生成平时成绩规则:' }}</el-tag>
<el-button v-if="!isUsualEdit" type="text" @click="generateUsual">生成</el-button>
<div v-if="isUsualEdit">
<el-tag>{{ isFinalEdit? '编辑成绩规则:': '生成成绩规则:' }}</el-tag>
<el-button v-if="!isFinalEdit" type="text" @click="generateUsual">生成</el-button>
<div v-if="isFinalEdit">
<el-button type="text" @click="updateUsual">修改</el-button>
<el-button type="text" @click="cancelUsual">取消</el-button>
</div>
</div>
<el-form v-if="!isDetail" ref="usualScoringForm" :model="usualScoringForm" :rules="usualScoringRules" label-width="120px" style="margin-top: 10px;">
<el-form v-if="!isDetail" ref="finalScoringForm" :model="finalScoringForm" :rules="finalScoringRules" label-width="120px" style="margin-top: 10px;">
<el-row>
<el-form-item label="考核类型" prop="type">
<el-select v-model="usualScoringForm.type" placeholder="请选择班级">
<el-select v-model="finalScoringForm.type" placeholder="请选择班级">
<el-option
v-for="item in assessList"
:key="item.value"
@ -136,17 +153,9 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item v-if="usualScoringForm.type === 'learningTime'" label="开始时间" prop="startTime">
<el-form-item v-if="finalScoringForm.type === 'ATTENDANCE' || finalScoringForm.type === 'LEARNING_TIME'" label="开始日期" prop="startDate">
<el-date-picker
v-model="usualScoringForm.startTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
/>
</el-form-item>
<el-form-item v-if="usualScoringForm.type === 'attendance'" label="开始日期" prop="startDate">
<el-date-picker
v-model="usualScoringForm.startDate"
v-model="finalScoringForm.startDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期"
@ -154,17 +163,9 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="usualScoringForm.type === 'learningTime'" label="截止时间" prop="endTime">
<el-form-item v-if="finalScoringForm.type === 'ATTENDANCE'||finalScoringForm.type === 'LEARNING_TIME'" label="截止日期" prop="endDate">
<el-date-picker
v-model="usualScoringForm.endTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择日期时间"
/>
</el-form-item>
<el-form-item v-if="usualScoringForm.type === 'attendance'" label="截止日期" prop="endDate">
<el-date-picker
v-model="usualScoringForm.endDate"
v-model="finalScoringForm.endDate"
type="date"
placeholder="选择日期"
value-format="yyyy-MM-dd"
@ -174,89 +175,10 @@
</el-row>
<el-row>
<el-col :span="12">
<el-form-item v-if="usualScoringForm.type === 'attendance'" label="考勤天数(天)" prop="days4FullMarks">
<el-input-number v-model="usualScoringForm.days4FullMarks" :precision="0" :min="1" controls-position="right" />
<el-form-item v-if="finalScoringForm.type === 'ATTENDANCE'" label="考勤天数(天)" prop="days4FullMarks">
<el-input-number v-model="finalScoringForm.days4FullMarks" :precision="0" :min="1" controls-position="right" />
</el-form-item>
<el-form-item v-if="usualScoringForm.type === 'exam'" label="测验试卷" prop="examId">
<el-select v-model="usualScoringForm.examId" placeholder="请选择试卷">
<el-option
v-for="item in examList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="usualScoringForm.type === 'attendance' || usualScoringForm.type === 'exam'" label="权重" prop="weight">
<el-input-number v-model="usualScoringForm.weight" :precision="0" :step="1" :min="1" :max="100" controls-position="right" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item v-if="usualScoringForm.type === 'learningTime'" label="学习课程" prop="lessonIds">
<el-select v-model="usualScoringForm.lessonIds" multiple placeholder="请选择课程">
<el-option
v-for="item in lessonList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="usualScoringForm.type === 'learningTime'" label="学习时长(分钟)" prop="duration4FullMarks">
<el-input-number v-model="usualScoringForm.duration4FullMarks" :precision="0" :min="1" controls-position="right" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item v-if="usualScoringForm.type === 'learningTime'" label="权重" prop="weight">
<el-input-number v-model="usualScoringForm.weight" :precision="0" :step="1" :min="1" :max="100" controls-position="right" />
</el-form-item>
</el-row>
</el-form>
</div>
</div>
</el-card>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>期末成绩</span>
</div>
<div style="width: 100%;">
<div style="width: 50%;padding: 20px;">
<el-tag>期末成绩规则</el-tag>
<el-table :data="finalScoringData" style="margin-top: 10px;" border>
<el-table-column prop="examId" label="试卷">
<template slot-scope="scope">
<el-tag>{{ getExamName(scope.row.examId) }}</el-tag>
</template>
</el-table-column>
<el-table-column prop="weight" label="权重" />
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button :disabled="isDetail" type="text" size="small" @click="editFinal(scope.row, scope.$index)">编辑</el-button>
<el-button :disabled="isDetail" type="text" size="small" @click="deleteFinal(scope.row, scope.$index)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div v-if="!isDetail" style="padding: 20px;width: 100%;border-top: 2px #ccc solid;">
<div style="display: flex;justify-content: space-between;">
<el-tag>{{ isFinalEdit? '编辑期末成绩规则:': '生成期末成绩规则:' }}</el-tag>
<el-button v-if="!isFinalEdit" type="text" @click="generateFinal">生成</el-button>
<div v-if="isFinalEdit">
<el-button type="text" @click="updateFinal">修改</el-button>
<el-button type="text" @click="cancelFinal">取消</el-button>
</div>
</div>
<el-form v-if="!isDetail" ref="finalScoringForm" :model="finalScoringForm" :rules="finalScoringRules" label-width="120px" style="margin-top: 10px;">
<el-row>
<el-col :span="12">
<el-form-item label="测验试卷" prop="examId">
<el-form-item v-if="finalScoringForm.type === 'EXAM_RESULTS'" label="测验试卷" prop="examId">
<el-select v-model="finalScoringForm.examId" placeholder="请选择试卷">
<el-option
v-for="item in examList"
@ -268,11 +190,35 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="权重" prop="weight">
<el-input-number v-model="finalScoringForm.weight" :precision="0" :step="1" :min="1" :max="100" controls-position="right" />
<el-form-item v-if="finalScoringForm.type === 'ATTENDANCE' || finalScoringForm.type === 'EXAM_RESULTS'" label="满分" prop="fullMarks">
<el-input-number v-model="finalScoringForm.fullMarks" :precision="0" :step="1" :min="1" :max="100" controls-position="right" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item v-if="finalScoringForm.type === 'LEARNING_TIME'" label="学习课程" prop="lessonIds">
<el-select v-model="finalScoringForm.lessonIds" multiple placeholder="请选择课程">
<el-option
v-for="item in lessonList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item v-if="finalScoringForm.type === 'LEARNING_TIME'" label="学习时长(分钟)" prop="duration4FullMarks">
<el-input-number v-model="finalScoringForm.duration4FullMarks" :precision="0" :min="1" controls-position="right" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item v-if="finalScoringForm.type === 'LEARNING_TIME'" label="满分" prop="fullMarks">
<el-input-number v-model="finalScoringForm.fullMarks" :precision="0" :step="1" :min="1" :max="100" controls-position="right" />
</el-form-item>
</el-row>
</el-form>
</div>
</div>
@ -287,32 +233,29 @@
</template>
<script>
import { getClassListUnPageSelf, createRule, updateRule, getRuleDetailById, getRuleDetailByInfo } from '@/api/company';
import { getExanListSelfByClassId } from '@/api/management/exam';
import { getLessonListSelfByClassId } from '@/api/jmap/lesson';
import { createRule, updateRule, getRuleDetailById } from '@/api/company';
import { getExamListProjectUnpage } from '@/api/management/exam';
import { getLessonProjectListNoPage } from '@/api/jmap/lesson';
export default {
name: 'CreateRule',
data() {
return {
isUsualEdit: false,
usualEditIndex: 0,
isFinalEdit: false,
finalEditIndex: 0,
classList: [],
tableData: [],
lessonList: [],
examList: [],
schoolYearList: [],
termList: [{label: '上学期', value: 1}, {label: '下学期', value: 2}],
assessList: [{ label: '考勤', value: 'attendance' }, { label: '时长', value: 'learningTime'}, { label: '测验', value: 'exam' }],
assessList: [{ label: '考勤', value: 'ATTENDANCE' }, { label: '时长', value: 'LEARNING_TIME'}, { label: '测验', value: 'EXAM_RESULTS' }],
form: {
orgId: '',
name: '',
schoolYear: '',
term: ''
},
rules: {
orgId:[
{ required: true, message: '请选择关联班级', trigger: 'change' }
name:[
{ required: true, message: '请填写规则名称', trigger: 'blur' }
],
schoolYear: [
{ required: true, message: '请选择学年', trigger: 'change' }
@ -321,25 +264,17 @@ export default {
{ required: true, message: '请选择学期', trigger: 'change' }
]
},
usualScoringForm: {
type: 'attendance',
startTime: '',
endTime: '',
finalScoringForm: {
type: 'ATTENDANCE',
startDate: '',
endDate: '',
days4FullMarks: 1,
weight: 1,
fullMarks: 1,
lessonIds: [],
duration4FullMarks: 1,
examId: ''
},
usualScoringRules: {
startTime:[
{ required: true, message: '请选择开始时间', trigger: 'change' }
],
endTime:[
{ required: true, message: '请选择截止时间', trigger: 'change' }
],
finalScoringRules: {
startDate: [
{ required: true, message: '请选择开始日期', trigger: 'change' }
],
@ -358,26 +293,11 @@ export default {
examId: [
{ required: true, message: '请选择测试试卷', trigger: 'blur' }
],
weight: [
{ required: true, message: '请填写权重', trigger: 'blur' }
fullMarks: [
{ required: true, message: '请填写满分分数', trigger: 'blur' }
]
},
finalScoringForm: {
examId: '',
weight: 1
},
finalScoringRules: {
examId: [
{ required: true, message: '请选择测试试卷', trigger: 'blur' }
],
weight: [
{ required: true, message: '请填写权重', trigger: 'blur' }
]
},
attendanceData:[],
learningTimeData: [],
examsData: [],
finalScoringData: []
scoringDate: []
};
},
computed: {
@ -397,9 +317,6 @@ export default {
}
},
created() {
getClassListUnPageSelf().then(resp => {
this.classList = resp.data;
});
if (this.$route.query.ruleId) {
getRuleDetailById(this.$route.query.ruleId).then(resp => {
this.initData(resp.data);
@ -412,252 +329,224 @@ export default {
for (let i = 2015; i < nowYear + 1; i++) {
this.schoolYearList.unshift({ label: `${i}-${i + 1}学年`, value: `${i}-${i + 1}`});
}
getLessonProjectListNoPage().then(resp => {
this.lessonList = resp.data;
}).catch(() => {
this.$message.error('获取课程列表失败!');
});
getExamListProjectUnpage().then(resp=> {
this.examList = resp.data;
}).catch(() => {
this.$message.error('获取试卷列表失败!');
});
},
methods: {
initData(data) {
this.form = { orgId: data.orgId + '', schoolYear: data.schoolYear, term: data.term };
this.classChange(data.orgId);
if (data.usualScoringRule) {
this.examsData = data.usualScoringRule.exams || [];
this.learningTimeData = data.usualScoringRule.learningTimeList || [];
if (data.usualScoringRule.attendance) {
this.attendanceData = [data.usualScoringRule.attendance];
}
}
if (data.finalScoringRule) {
this.finalScoringData = data.finalScoringRule.exams || [];
}
this.form = { name: data.name, schoolYear: data.schoolYear, term: data.term };
this.scoringDate = data.scoringRules || [];
},
generateUsual() {
this.$refs.usualScoringForm.validate((valid) => {
this.$refs.finalScoringForm.validate((valid) => {
if (valid) {
const that = this;
if (this.usualScoringForm.type === 'attendance' && this.attendanceData.length) {
this.$confirm('检测到已由考勤规则,考勤规则唯一,继续操作将替换规则,是否继续?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
that.attendanceData = [{ startDate: that.usualScoringForm.startDate, endDate: that.usualScoringForm.endDate,
days4FullMarks: that.usualScoringForm.days4FullMarks, weight: that.usualScoringForm.weight }];
this.$refs.usualScoringForm.resetFields();
}).catch(() => { });
} else if (this.usualScoringForm.type === 'attendance') {
this.attendanceData = [{ startDate: this.usualScoringForm.startDate, endDate: this.usualScoringForm.endDate,
days4FullMarks: this.usualScoringForm.days4FullMarks, weight: this.usualScoringForm.weight }];
this.$refs.usualScoringForm.resetFields();
} else if (this.usualScoringForm.type === 'learningTime') {
this.learningTimeData.push({
startTime: this.usualScoringForm.startTime,
endTime: this.usualScoringForm.endTime,
lessonIds: this.usualScoringForm.lessonIds,
duration4FullMarks: this.usualScoringForm.duration4FullMarks,
weight: this.usualScoringForm.weight
if (this.finalScoringForm.type === 'ATTENDANCE') {
let attendanceFlag = false; let attendanceIndex = 0;
this.scoringDate.forEach((item, index) => {
if (item.type === 'ATTENDANCE') {
attendanceFlag = true;
attendanceIndex = index;
}
});
this.$refs.usualScoringForm.resetFields();
} else if (this.usualScoringForm.type === 'exam') {
this.examsData.push({
examId: this.usualScoringForm.examId,
weight: this.usualScoringForm.weight
if (attendanceFlag) {
const that = this;
this.$confirm('检测到已由考勤规则,考勤规则唯一,继续操作将替换规则,是否继续?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
const model = {
type: that.finalScoringForm.type,
startDate: that.finalScoringForm.startDate,
endDate: that.finalScoringForm.endDate,
days4FullMarks: that.finalScoringForm.days4FullMarks,
fullMarks: that.finalScoringForm.fullMarks
};
this.$set(this.scoringDate, attendanceIndex, model);
this.$refs.finalScoringForm.resetFields();
}).catch(() => { });
} else {
this.scoringDate.push({ type: this.finalScoringForm.type, startDate: this.finalScoringForm.startDate, endDate: this.finalScoringForm.endDate,
days4FullMarks: this.finalScoringForm.days4FullMarks, fullMarks: this.finalScoringForm.fullMarks });
this.$refs.finalScoringForm.resetFields();
}
} else if (this.finalScoringForm.type === 'LEARNING_TIME') {
this.scoringDate.push({
type: this.finalScoringForm.type,
startDate: this.finalScoringForm.startDate,
endDate: this.finalScoringForm.endDate,
lessonIds: this.finalScoringForm.lessonIds,
duration4FullMarks: this.finalScoringForm.duration4FullMarks,
fullMarks: this.finalScoringForm.fullMarks
});
this.$refs.usualScoringForm.resetFields();
this.$refs.finalScoringForm.resetFields();
} else if (this.finalScoringForm.type === 'EXAM_RESULTS') {
this.scoringDate.push({
type: this.finalScoringForm.type,
examId: this.finalScoringForm.examId,
fullMarks: this.finalScoringForm.fullMarks
});
this.$refs.finalScoringForm.resetFields();
}
}
});
},
cancelUsual() {
this.$refs.usualScoringForm.resetFields();
this.isUsualEdit = false;
},
updateUsual() {
this.$refs.usualScoringForm.validate((valid) => {
if (valid) {
if (this.usualScoringForm.type === 'attendance') {
this.attendanceData = [{ startDate: this.usualScoringForm.startDate, endDate: this.usualScoringForm.endDate,
days4FullMarks: this.usualScoringForm.days4FullMarks, weight: this.usualScoringForm.weight }];
} else if (this.usualScoringForm.type === 'learningTime') {
const model = {
startTime: this.usualScoringForm.startTime,
endTime: this.usualScoringForm.endTime,
lessonIds: this.usualScoringForm.lessonIds,
duration4FullMarks: this.usualScoringForm.duration4FullMarks,
weight: this.usualScoringForm.weight
};
this.$set(this.learningTimeData, this.usualEditIndex, model);
} else if (this.usualScoringForm.type === 'exam') {
const model = {
examId: this.usualScoringForm.examId,
weight: this.usualScoringForm.weight
};
this.$set(this.examsData, this.usualEditIndex, model);
}
this.isUsualEdit = false;
this.$refs.usualScoringForm.resetFields();
}
});
},
cancelFinal() {
this.$refs.finalScoringForm.resetFields();
this.isFinalEdit = false;
},
updateFinal() {
updateUsual() {
this.$refs.finalScoringForm.validate((valid) => {
if (valid) {
this.$set(this.finalScoringData, this.finalEditIndex, { examId: this.finalScoringForm.examId, weight: this.finalScoringForm.weight });
this.$refs.finalScoringForm.resetFields();
if (this.finalScoringForm.type === 'ATTENDANCE') {
const model = {
type: this.finalScoringForm.type,
startDate: this.finalScoringForm.startDate,
endDate: this.finalScoringForm.endDate,
days4FullMarks: this.finalScoringForm.days4FullMarks,
fullMarks: this.finalScoringForm.fullMarks };
this.$set(this.scoringDate, this.finalEditIndex, model);
} else if (this.finalScoringForm.type === 'LEARNING_TIME') {
const model = {
type: this.finalScoringForm.type,
startDate: this.finalScoringForm.startDate,
endDate: this.finalScoringForm.endDate,
lessonIds: this.finalScoringForm.lessonIds,
duration4FullMarks: this.finalScoringForm.duration4FullMarks,
fullMarks: this.finalScoringForm.fullMarks
};
this.$set(this.scoringDate, this.finalEditIndex, model);
} else if (this.finalScoringForm.type === 'EXAM_RESULTS') {
const model = {
type: this.finalScoringForm.type,
examId: this.finalScoringForm.examId,
fullMarks: this.finalScoringForm.fullMarks
};
this.$set(this.scoringDate, this.finalEditIndex, model);
}
this.isFinalEdit = false;
this.$refs.finalScoringForm.resetFields();
}
});
},
editFinal(row, index) {
editUsual(row, index) {
this.$refs.finalScoringForm.resetFields();
this.isFinalEdit = true;
this.finalEditIndex = index;
this.finalScoringForm.examId = row.examId;
this.finalScoringForm.weight = row.weight;
},
deleteFinal(row, index) {
this.finalScoringData.splice(index, 1);
},
editUsual(row, index, type) {
this.$refs.usualScoringForm.resetFields();
this.isUsualEdit = true;
this.usualEditIndex = index;
if (type === 'learningTime') {
this.usualScoringForm.type = 'learningTime';
this.usualScoringForm.startTime = row.startTime;
this.usualScoringForm.endTime = row.endTime;
this.usualScoringForm.lessonIds = row.lessonIds;
this.usualScoringForm.duration4FullMarks = row.duration4FullMarks;
this.usualScoringForm.weight = row.weight;
} else if (type === 'exam') {
this.usualScoringForm.type = 'exam';
this.usualScoringForm.weight = row.weight;
} else if (type === 'attendance') {
this.usualScoringForm.type = 'attendance';
this.usualScoringForm.startDate = row.startDate;
this.usualScoringForm.endDate = row.endDate;
this.usualScoringForm.days4FullMarks = row.days4FullMarks;
this.usualScoringForm.weight = row.weight;
this.finalScoringForm.type = row.type;
if (row.type === 'LEARNING_TIME') {
this.finalScoringForm.startDate = row.startDate;
this.finalScoringForm.endDate = row.endDate;
this.finalScoringForm.lessonIds = row.lessonIds;
this.finalScoringForm.duration4FullMarks = row.duration4FullMarks;
this.finalScoringForm.fullMarks = row.fullMarks;
} else if (row.type === 'EXAM_RESULTS') {
this.finalScoringForm.examId = row.examId;
this.finalScoringForm.fullMarks = row.fullMarks;
} else if (row.type === 'ATTENDANCE') {
this.finalScoringForm.startDate = row.startDate;
this.finalScoringForm.endDate = row.endDate;
this.finalScoringForm.days4FullMarks = row.days4FullMarks;
this.finalScoringForm.fullMarks = row.fullMarks;
}
},
deleteUsual(row, index, type) {
if (type === 'learningTime') {
this.learningTimeData.splice(index, 1);
} else if (type === 'exam') {
this.examsData.splice(index, 1);
} else if (type === 'attendance') {
this.attendanceData = [];
}
},
generateFinal() {
this.$refs.finalScoringForm.validate((valid) => {
if (valid) {
this.finalScoringData.push({ examId: this.finalScoringForm.examId, weight: this.finalScoringForm.weight });
this.$refs.finalScoringForm.resetFields();
}
});
deleteUsual(row, index) {
this.scoringDate.splice(index, 1);
},
createRule() {
this.$refs.form.validate((valid) => {
if (valid) {
const model = {
orgId: this.form.orgId,
name: this.form.name,
schoolYear: this.form.schoolYear,
term: this.form.term
term: this.form.term,
scoringRules: this.scoringDate
};
if (this.finalScoringData && this.finalScoringData.length) {
model.finalScoringRule = { exams: this.finalScoringData };
}
if ((this.attendanceData && this.attendanceData.length) || (this.learningTimeData && this.learningTimeData.length) || (this.examsData && this.examsData.length)) {
model.usualScoringRule = {};
if (this.attendanceData && this.attendanceData.length) {
model.usualScoringRule.attendance = this.attendanceData[0];
let tip = '';
const that = this;
let attendanceLength = 0;
let attendanceScore = 0;
let learningTimeLength = 0;
let learningTimeScore = 0;
let examLength = 0;
let examScore = 0;
this.scoringDate.forEach(item => {
if (item.type === 'ATTENDANCE') {
attendanceLength += 1;
attendanceScore += item.fullMarks;
} else if (item.type === 'LEARNING_TIME') {
learningTimeLength += 1;
learningTimeScore += item.fullMarks;
} else if (item.type === 'EXAM_RESULTS') {
examLength += 1;
examScore += item.fullMarks;
}
if (this.learningTimeData && this.learningTimeData.length) {
model.usualScoringRule.learningTimeList = this.learningTimeData;
});
if (this.scoringDate.length) {
if (attendanceLength) {
tip = tip + `考勤规则${attendanceLength}条,满分${attendanceScore}分;<br/>`;
}
if (this.examsData && this.examsData.length) {
model.usualScoringRule.learningTimeList = this.learningTimeData;
if (learningTimeLength) {
tip = tip + `学习时长规则${learningTimeLength}条,满分${learningTimeScore}分;<br/>`;
}
if (examLength) {
tip = tip + `测验规则${examLength}条,满分${examScore}分;<br/>`;
}
}
if (this.$route.query.type === 'update') {
model.id = this.$route.query.ruleId;
updateRule(model).then(resp => {
this.$message.success( '修改规则成功!');
}).catch((e) => {
this.$message.error(`修改规则失败:${e.message}`);
});
this.$confirm(`此操作将修改规则:《${model.name}》<br/>` + tip + `共计${attendanceScore + learningTimeScore + examScore}分,是否确定修改?`, this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
updateRule(model).then(resp => {
this.$message.success( '修改规则成功!');
}).catch((e) => {
this.$message.error(`修改规则失败:${e.message}`);
});
}).catch(() => { });
} else {
createRule(model).then(resp => {
this.$message.success( '创建规则成功!');
this.$refs.form.resetFields();
this.attendanceData = [];
this.learningTimeData = [];
this.examsData = [];
this.finalScoringData = [];
}).catch((e) => {
this.$message.error(`创建规则失败:${e.message}`);
});
this.$confirm(`此操作将创建规则:《${model.name}》<br/>` + tip + `共计${attendanceScore + learningTimeScore + examScore}分,是否确定创建?`, this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
dangerouslyUseHTMLString: true,
type: 'warning'
}).then(() => {
createRule(model).then(resp => {
this.$message.success( '创建规则成功!');
that.$refs.form.resetFields();
that.scoringDate = [];
}).catch((e) => {
this.$message.error(`创建规则失败:${e.message}`);
});
}).catch(() => { });
}
}
});
},
goBack() {
this.$router.go(-1);
},
classChange(val) {
this.learningTimeData = [];
this.examsData = [];
this.finalScoringData = [];
getLessonListSelfByClassId({ clsId: val }).then(resp => {
this.lessonList = resp.data;
}).catch(() => {
this.$message.error('获取课程列表失败!');
});
getExanListSelfByClassId({ clsId:val }).then(resp=> {
this.examList = resp.data;
}).catch(() => {
this.$message.error('获取试卷列表失败!');
});
if (this.form.orgId && this.form.schoolYear && this.form.term && this.$route.query.type === 'add') {
this.checkDataDuplication();
}
},
schoolChange(val) {
if (this.form.orgId && this.form.schoolYear && this.form.term && this.$route.query.type === 'add') {
this.checkDataDuplication();
}
},
termChange(val) {
if (this.form.orgId && this.form.schoolYear && this.form.term && this.$route.query.type === 'add') {
this.checkDataDuplication();
}
},
checkDataDuplication() {
const that = this;
getRuleDetailByInfo(this.form).then(resp => {
if (resp.data) {
this.$confirm('检测到已有本班级下相同学年学期数据,是否对数据进行修改?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(() => {
that.$router.replace({ path: '/info/createRule', query: { type: 'update', ruleId: resp.data.id }});
that.initData(resp.data);
}).catch(() => { });
}
});
},
getExamName(examId) {
if (!examId) {
return '-';
}
const ele = this.examList.find(exam => {
return exam.id == examId;
});
if (ele) {
return ele.name;
} else { return examId; }
} else { return '-'; }
},
getLessonName(lessonId) {
const ele = this.lessonList.find(lesson => {
@ -666,6 +555,17 @@ export default {
if (ele) {
return ele.name;
} else { return lessonId; }
},
getRuleType(type) {
if (type === 'ATTENDANCE') {
return '考勤';
} else if (type === 'EXAM_RESULTS') {
return '测验';
} else if (type === 'LEARNING_TIME') {
return '学习时长';
} else {
return '';
}
}
}
};

View File

@ -7,12 +7,17 @@
:query-list="ruleQueryList"
style="width:90%;margin: 0 auto;"
/>
<apply-class ref="applyClass" @refresh="refresh" />
</div>
</template>
<script>
import { getClassListUnPageSelf, getRuleListSelfPaged, deleteRuleSelf } from '@/api/company';
import { getClassListUnPage, getRuleListSelfPaged, deleteRuleSelf } from '@/api/company';
import ApplyClass from './applyClass';
export default {
name: 'RuleManage',
components: {
ApplyClass
},
data() {
return {
pagerConfig: {
@ -54,12 +59,16 @@ export default {
selectCheckShow: false,
indexShow: true,
columns: [
{
title: '名称',
prop: 'name'
},
{
title: '班级',
prop: 'orgId',
type: 'tag',
prop: 'orgIds',
type: 'tagMore',
columnValue: (row) => {
return this.$convertField(row.orgId, this.classList, ['id', 'name']);
return this.$convertField(row.orgIds, this.classList, ['id', 'name'], true);
},
tagType: (row) => { }
},
@ -88,12 +97,14 @@ export default {
{
name: '应用',
handleClick: this.handleApply,
type: 'primary'
type: 'primary',
showControl: (row) => { return !(row.orgIds && row.orgIds.length); }
},
{
name: '修改',
handleClick: this.handleUpdate,
type: 'primary'
type: 'primary',
showControl: (row) => { return !(row.orgIds && row.orgIds.length); }
},
{
name: '详情',
@ -114,8 +125,7 @@ export default {
]
},
academicYearList: [],
classList: [],
ruleData: [{ content: '平时考勤30%考试成绩70%', createDate: '2021.03.11', className: '测试班级' }]
classList: []
};
},
mounted() {
@ -124,9 +134,8 @@ export default {
for (let i = 2015; i < nowYear + 1; i++) {
this.academicYearList.unshift({ label: `${i}-${i + 1}学年`, value: `${i}-${i + 1}` });
this.ruleQueryForm.queryObject.schoolYear.config.data = this.academicYearList;
}
getClassListUnPageSelf().then(resp => {
getClassListUnPage().then(resp => {
this.classList = resp.data;
this.classList.forEach(item => {
this.ruleQueryForm.queryObject.orgId.config.data.push({ label: item.name, value: item.id });
@ -138,7 +147,7 @@ export default {
this.$router.push({ path: '/info/createRule', query: { type: 'detail', ruleId: row.id } });
},
handleApply(index, row) {
this.$router.push({ path: '/info/totalGrade', query: { orgId: row.orgId, schoolYear: row.schoolYear, term: row.term } });
this.$refs.applyClass.doShow(row);
},
handleUpdate(index, row) {
this.$router.push({ path: '/info/createRule', query: { type: 'update', ruleId: row.id } });

View File

@ -1,7 +1,7 @@
<template>
<div>
<div class="title_content">评价结果</div>
<el-card class="box-card" style="padding: 22px 10px 0 10px;">
<el-card class="box-card" style="padding: 22px 2px 0 2px;">
<el-form ref="form" :model="form" :rules="rules">
<el-row>
<el-col :span="6">
@ -64,16 +64,20 @@
label="学号"
/>
<el-table-column
prop="usualScore"
label="平时成绩"
prop="attendanceScore"
label="考勤得分"
/>
<el-table-column
prop="finalScore"
label="期末成绩"
prop="learningTimeScore"
label="学习时长得分"
/>
<el-table-column
prop="examScore"
label="测验得分"
/>
<el-table-column label="评价结果">
<template slot-scope="scope">
<span> {{ (scope.row.usualScore ||0) + ( scope.row.finalScore || 0 ) }} </span>
<span> {{ (scope.row.attendanceScore ||0) + ( scope.row.examScore || 0 ) + ( scope.row.learningTimeScore || 0 ) }} </span>
</template>
</el-table-column>
</el-table>
@ -82,7 +86,7 @@
</template>
<script>
import { getClassListUnPageSelf, userRuleGetScore } from '@/api/company';
import { getClassListUnPage, userRuleGetScore } from '@/api/company';
import XLSX from 'xlsx';
export default {
name: 'GradeList',
@ -115,15 +119,15 @@ export default {
for (let i = 2015; i < nowYear + 1; i++) {
this.academicYearList.unshift({ label: `${i}-${i + 1}学年`, value: `${i}-${i + 1}` });
}
getClassListUnPageSelf().then(resp => {
getClassListUnPage().then(resp => {
this.classList = resp.data;
});
this.form.orgId = (this.$route.query.orgId + '') || '';
this.form.schoolYear = this.$route.query.schoolYear || '';
this.form.term = this.$route.query.term ? parseInt(this.$route.query.term) : '';
if (this.form.orgId && this.form.schoolYear && this.form.term) {
this.queryFunction();
}
// if (this.form.orgId && this.form.schoolYear && this.form.term) {
// this.queryFunction();
// }
},
methods: {
exportGrade() {

View File

@ -104,27 +104,29 @@ export default {
}
},
handleCommit() {
this.$refs.form.validate(() => {
if (this.$route.query.planId || this.loadRunPlanId) {
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.formModel.serviceNumber }).then(resp => {
if (resp.data) {
this.$emit('dispatchDialog', {
name: 'offLine',
params: {
type: 'warning',
operate: 'AddPlanningTrain',
width: 460,
message: this.$t('tip.serviceNumberExistHint')
}
});
this.$refs.form.validate((valid) => {
if (valid) {
if (this.$route.query.planId || this.loadRunPlanId) {
checkServiceNumberExist({ planId: this.$route.query.planId || this.loadRunPlanId, serviceNumber: this.formModel.serviceNumber }).then(resp => {
if (resp.data) {
this.$emit('dispatchDialog', {
name: 'offLine',
params: {
type: 'warning',
operate: 'AddPlanningTrain',
width: 460,
message: this.$t('tip.serviceNumberExistHint')
}
});
this.doClose();
} else {
this.handleConfirm(true);
}
});
} else {
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
this.doClose();
} else {
this.handleConfirm(true);
}
});
} else {
this.$messageBox(this.$t('tip.chooseToOpenTheRunGraph'));
}
}
});
// if (this.serviceNumber.length >= 2 && this.serviceNumber.length <= 3) {

View File

@ -74,6 +74,7 @@
</el-row>
<el-row>
<el-table
v-loading="tableLoading"
:data="routingList"
border
highlight-current-row
@ -129,7 +130,7 @@
{{ '经停转换轨 / 站台轨'+$t('global.colon') }}
</el-row>
<el-row>
<el-table :data="addModel.arriveConfigList" border :height="230">
<el-table v-loading="routeLoading" :data="addModel.arriveConfigList" border :height="230">
<el-table-column prop="stationCode" :label="this.$t('planMonitor.station')" width="160">
<template slot-scope="scope">
{{ formatName(scope.row.stationCode) }}
@ -180,7 +181,7 @@
</template>
<script>
import { listUserRoutingData, addPlanTrip, getMapStationRunUser, getStationStopTime } from '@/api/runplan';
import { listUserRoutingData, addPlanTrip, getMapStationRunUser, getStationStopTime, querySectionListByRouting } from '@/api/runplan';
import { getRunplanConfig } from '@/api/jmap/mapdraft';
import { formatTime, formatName } from '@/jmapNew/theme/parser/util';
@ -192,6 +193,8 @@ export default {
return {
dialogShow: false,
loading: false,
tableLoading:false,
routeLoading:false,
isPlan: false,
// showDefault: true,
stopStationMap: {},
@ -213,7 +216,7 @@ export default {
tripNumber: '',
planId: '',
serviceNumber: '',
startTbFront: false,
startTbFront: false,
endTbFront: false
},
tripNumberList: [{ value: '', label: this.$t('planMonitor.automatic') }],
@ -261,9 +264,10 @@ export default {
this.addModel.serviceNumber = params.serviceNumber;
this.addModel.planId = this.$route.query.planId;
this.addModel.arriveConfigList = [];
const mapId = this.$route.query.mapId;
const mapId = this.$route.query.mapId;
if (mapId) {
this.tableLoading = true;
getRunplanConfig(mapId).then(resp => {
const data = resp.data;
this.reentryData = data.config.reentryData;
@ -281,8 +285,17 @@ export default {
endStationFilterMap[routing.endStationCode] = {text:formatName(routing.endStationCode), value:routing.endStationCode};
}
});
this.startStationFilters = Object.values(startStationFilterMap);
this.endStationFilters = Object.values(endStationFilterMap);
this.startStationFilters = Object.values(startStationFilterMap).sort((a, b)=>{
const startStationA = this.$store.getters['map/getDeviceByCode'](a.value);
const startStationB = this.$store.getters['map/getDeviceByCode'](b.value);
return startStationA.kmRange - startStationB.kmRange;
});
this.endStationFilters = Object.values(endStationFilterMap).sort((a, b)=>{
const endStationA = this.$store.getters['map/getDeviceByCode'](a.value);
const endStationB = this.$store.getters['map/getDeviceByCode'](b.value);
return endStationA.kmRange - endStationB.kmRange;
});
this.tableLoading = false;
});
getMapStationRunUser(mapId).then(resp =>{
@ -324,10 +337,10 @@ export default {
compuntedRunTime(list, index, runLevel) {
let runTime = 0;
if ((index == 0 && String(this.addModel.startTbFront) != 'undefined') ||
(index == list.length-1 && String(this.addModel.endTbFront) != 'undefined')) {
return 0
}
if ((index == 0 && String(this.addModel.startTbFront) != 'undefined') ||
(index == list.length - 1 && String(this.addModel.endTbFront) != 'undefined')) {
return 0;
}
if (index < list.length - 1) {
const stopStationObj = this.stopStationMap[[list[index].sectionCode, list[index + 1].sectionCode].toString()];
@ -371,14 +384,14 @@ export default {
elem.speedLevelTime = realRunlevel;
elem.speedLevel = runLevelObj.label;
let fronTime = 0;
if (index == 0 && String(this.addModel.startTbFront) == 'false') {
const data = this.reentryData[elem.stationCode]||{};
fronTime = data.tbTo || 0;
} else if (index == list.length - 2 && String(this.addModel.endTbFront) == 'false') {
const data = this.reentryData[list[index+1].stationCode]||{};
fronTime = data.tbTo || 0;
}
let fronTime = 0;
if (index == 0 && String(this.addModel.startTbFront) == 'false') {
const data = this.reentryData[elem.stationCode] || {};
fronTime = data.tbTo || 0;
} else if (index == list.length - 2 && String(this.addModel.endTbFront) == 'false') {
const data = this.reentryData[list[index + 1].stationCode] || {};
fronTime = data.tbTo || 0;
}
tempTime = tempTime + fronTime + elem.stopTime + elem.speedLevelTime;
});
@ -387,19 +400,23 @@ export default {
}
},
handleClick(row, column, event) {
this.routeLoading = true;
const arriveConfigList = [];
row.parkSectionCodeList.forEach((parkSectionCode, index)=>{
arriveConfigList.push({arriveTime:'', departureTime:'', sectionCode:parkSectionCode.sectionCode, stationCode:parkSectionCode.stationCode});
querySectionListByRouting(row.id).then(resp=>{
resp.data.forEach((parkSectionCode, index)=>{
arriveConfigList.push({arriveTime:'', departureTime:'', sectionCode:parkSectionCode.sectionCode, stationCode:parkSectionCode.stationCode});
});
this.$set(this.addModel, 'arriveConfigList', arriveConfigList);
this.addModel.startStationCode = row.startStationCode;
this.addModel.endStationCode = row.endStationCode;
this.addModel.endSectionCode = row.endSectionCode;
this.addModel.startSectionCode = row.startSectionCode;
this.addModel.routingCode = row.id;
this.addModel.startTbFront = row.startTbFront;
this.addModel.endTbFront = row.endTbFront;
this.computedDetailList('routingCode');
this.routeLoading = false;
});
this.$set(this.addModel, 'arriveConfigList', arriveConfigList);
this.addModel.startStationCode = row.startStationCode;
this.addModel.endStationCode = row.endStationCode;
this.addModel.endSectionCode = row.endSectionCode;
this.addModel.startSectionCode = row.startSectionCode;
this.addModel.routingCode = row.code;
this.addModel.startTbFront = row.startTbFront;
this.addModel.endTbFront = row.endTbFront;
this.computedDetailList('routingCode');
},
handleCommit() {
if (this.isPlan) {

View File

@ -110,7 +110,7 @@ export default {
startTime: formatTime(trainInfo.stationTimeList[0].secondTime + 7200),
endStationCode: resp.data.endStationCode,
endTime: formatTime(trainInfo.stationTimeList[lastIndex - 1].secondTime + 7200),
routingCode : resp.data.code,
routingCode : resp.data.id,
endSectionCode:resp.data.endSectionCode,
startSectionCode:resp.data.startSectionCode,
arriveConfigList: [],

View File

@ -1,5 +1,5 @@
<template>
<el-dialog
<!-- <el-dialog
v-dialogDrag
class="planEdit__tool gernarate-plan-train"
:title="title"
@ -10,17 +10,19 @@
:modal="false"
top="10vh"
:close-on-click-modal="false"
>
<data-form ref="dataform" v-loading="dataLoading" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer">
<el-button size="small" @click="doClose">{{ $t('global.cancel') }}</el-button>
<el-button type="primary" size="small" :loading="loading" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
> -->
<div v-loading="dataLoading" style="width:500px;padding:20px 0px;height:100%">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer gerneratePlanDialog">
<!-- <el-button size="small" @click="doClose">{{ $t('global.cancel') }}</el-button> -->
<el-button type="primary" size="medium" :loading="loading" @click="handleCommit">{{ $t('global.confirm') }}</el-button>
</span>
</el-dialog>
</div>
<!-- </el-dialog> -->
</template>
<script>
import { generatePlanTrain, listUserRoutingData } from '@/api/runplan';
import { generatePlanTrain, listUserRoutingData, querySectionListByRouting } from '@/api/runplan';
export default {
props: {
loadRunPlanId: {
@ -32,10 +34,11 @@ export default {
},
data() {
return {
dialogShow: false,
// dialogShow: false,
dataLoading:false,
routingList: [],
routingMap: {},
loading: false,
oldsection:[],
runningRoutingMap:{},
runLevelList: [
{ value: 1, label: '等级一' },
@ -45,14 +48,12 @@ export default {
{ value: 5, label: '等级五' }
],
formModel: {
gernarateType:'01',
gernarateType:'02',
serviceNumber:'', //
beginTime: '', //
overTime: '', //
runLevel:'', //
departureInterval:180, //
// inboundRouting:'', // code
// outboundRouting:'', // code
beginTime: '06:00:00', //
overTime: '22:00:00', //
runLevel:3, //
departureInterval:300, //
outAndIn:false, //
runningRouting1: '', // code1
runningRouting2: '', // code2
@ -62,7 +63,6 @@ export default {
rules: {
serviceNumber:[
{required: true, validator: this.validateServiceNumber, trigger: 'blur'},
// {required: true, validator: this.validateServiceNumber, trigger: 'change'}
{required: true, validator: this.validateServiceNo, trigger: 'change'}
],
beginTime: [
@ -77,26 +77,18 @@ export default {
departureInterval:[
{ required: true, message: '请填写发车间隔', trigger: 'blur' }
],
// inboundRouting: [
// { required: true, message: '', trigger: 'change' }
// ],
runningRouting: [
{ required: true, message: '请选择环路', trigger: 'blur' },
{ required: true, message: '请选择环路', trigger: 'change' }
]
// outboundRouting: [
// { required: true, message: '', trigger: 'change' }
// ]
},
// outboundRouteList: [],
runningRouteList: []
// inboundRouteList: []
};
},
computed: {
title() {
return '生成计划';
},
// title() {
// return '';
// },
form() {
return {
labelWidth: '140px',
@ -111,12 +103,10 @@ export default {
{ prop: 'overTime', label: '结束时间', type: 'timePicker', selectableRange:'02:00:00-23:59:59'},
{ prop: 'runLevel', label: '运行等级', type: 'select', options: this.runLevelList },
{ prop: 'departureInterval', label: '发车间隔', type: 'number', show:this.formModel.gernarateType == '02', min:0, step:1, precisionFlag:true, precision:0, message:'s'},
// { prop: 'outboundRouting', label: '', type: 'select', options: this.outboundRouteList, clearable: true, change:true, onChange: this.onOutboundRouteChange, noDataText:''},
{ prop: 'runningRouting1', label: '环路交路1', type: 'select', show:false},
{ prop: 'runningRouting2', label: '环路交路2', type: 'select', show:false},
{ prop: 'outAndIn', label: '自动生成出入库', type: 'switchBox', show:true, activeColor:'#409eff', inactiveColor:'#dcdfe6' },
{ prop: 'runningRouting', label:'交路', type: 'select', options: this.runningRouteList, noDataText:'请先设置交路', clearable: true, change:true, onChange:this.onRunningRouteChange}
// { prop: 'inboundRouting', label: '', type: 'select', options: this.inboundRouteList, noDataText:'', clearable: true, change:true, onChange:this.onInboundRouteChange}
]
};
}
@ -130,42 +120,29 @@ export default {
this.dataLoading = true;
listUserRoutingData(mapId).then(response => {
const list = response.data;
this.routingList = list.map(elem => { return { value: elem.code, label: elem.name, routingType:elem.routingType, startSectionCode: elem.startSectionCode, endSectionCode: elem.endSectionCode }; });
console.time();
list.forEach(elem=>{
// this.routingList.push({value: elem.code, label: elem.name, routingType:elem.routingType});
// this.routingMap[elem.id] = {parkSectionCodeList:elem.parkSectionCodeList};
if (elem.routingType === 'LOOP') {
// const name = elem.name;
// let temp = '';
if (elem.right) {
// temp = name.split('-')[0];
// const data = ;
const data = runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode];
if (!data) { runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode] = {}; }
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].label = elem.name;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].value = elem.startSectionCode + '-' + elem.endSectionCode;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].runningRouting1 = elem.code;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].runningRouting1 = elem.code;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].startSectionCode = elem.startSectionCode;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].endSectionCode = elem.endSectionCode;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].runningRouting1 = elem.id;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].startStationCode = elem.startStationCode;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].endStationCode = elem.endStationCode;
} else {
// temp = name.split('-')[1];
// const data = ;
const data = runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode];
if (!data) { runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode] = {}; }
// runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].label = elem.name;
runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].value = elem.endSectionCode + '-' + elem.startSectionCode;
runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].runningRouting2 = elem.code;
runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].startSectionCode = elem.startSectionCode;
runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].endSectionCode = elem.endSectionCode;
runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].runningRouting2 = elem.id;
}
}
});
this.runningRoutingMap = runningRoutingMap;
// this.onOutboundRouteChange();
this.onRunningRouteChange();
// this.onInboundRouteChange();
this.dataLoading = false;
}).catch(_ => {
console.log(_);
@ -173,7 +150,7 @@ export default {
this.$messageBox(`获取交路列表失败`);
});
}
this.dialogShow = true;
// this.dialogShow = true;
},
validateServiceNumber(rule, value, callback) {
if (typeof value == 'string' && value.trim().length == 0) {
@ -218,61 +195,39 @@ export default {
this.formModel.runningRouting2 = '';
}
// if (!this.outboundRouteList.find(route => route.value == this.formModel.outboundRouting)) {
// this.formModel.outboundRouting = '';
// }
// if (!this.inboundRouteList.find(route => route.value == this.formModel.inboundRouting)) {
// this.formModel.inboundRouting = '';
// }
this.$nextTick(_ => {
this.$refs.dataform && this.$refs.dataform.clearValidate();
});
},
// onOutboundRouteChange(outboundRouting = '') {
// const outboundRoute = this.routingList.find(route => route.value == this.formModel.outboundRouting);
// const inboundRoute = this.routingList.find(route => route.value == this.formModel.inboundRouting);
// if (this.formModel.runningRouting) {
// this.runningRouteList = this.covertRouting(Object.values(this.runningRoutingMap), route => {
// return route.runningRouting1 && route.runningRouting2 && (
// outboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
// inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode)
// );
// });
// } else {
// this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => {
// return route.runningRouting1 && route.runningRouting2 && (
// outboundRoute && !inboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
// !outboundRoute && inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode) ||
// outboundRoute && inboundRoute && (
// outboundRoute.endSectionCode != inboundRoute.startSectionCode && JSON.stringify([route.startSectionCode, route.endSectionCode].sort()) == JSON.stringify([outboundRoute.endSectionCode, inboundRoute.startSectionCode].sort()) ||
// outboundRoute.endSectionCode == inboundRoute.startSectionCode && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode)
// ) ||
// !inboundRoute && !outboundRoute
// );
// });
// }
// if (!outboundRouting) {
// this.outboundRouteList = this.covertRouting(this.routingList, route => {
// return route.routingType == 'OUTBOUND';
// });
// }
// this.checkRouteCurrentValue();
// },
onRunningRouteChange(runningRouting = '') {
const temp = this.runningRoutingMap[runningRouting];
if (this.oldsection.length > 0) {
this.changeSectionSelected(this.oldsection, false);
}
if (temp) {
this.formModel.runningRouting1 = temp.runningRouting1;
this.formModel.runningRouting2 = temp.runningRouting2;
}
// if (this.routingMap[temp.runningRouting1] && this.routingMap[temp.runningRouting2]) {
// }
//
this.$emit('mapLoading', true);
querySectionListByRouting(temp.runningRouting1).then(resp=>{
querySectionListByRouting(temp.runningRouting2).then(res=>{
const parkSectionCodeList = resp.data;
// this.routingMap[temp.runningRouting1].parkSectionCodeList;
parkSectionCodeList.push(...res.data);
// this.routingMap[temp.runningRouting2].parkSectionCodeList
this.changeSectionSelected(parkSectionCodeList, true);
this.oldsection = parkSectionCodeList;
this.$emit('mapLoading', false);
}).catch(error => {
console.log(error.message + '根据交路查询交路区段列表失败');
});
}).catch(error => {
console.log(error.message + '根据交路查询交路区段列表失败');
});
// const outboundRoute = this.routingList.find(route => route.value == this.formModel.outboundRouting);
// const inboundRoute = this.routingList.find(route => route.value == this.formModel.inboundRouting);
// const runningRoute = Object.values(this.runningRoutingMap).find(route => route.value == this.formModel.runningRouting);
}
if (!this.formModel.runningRouting) {
let list = Object.values(this.runningRoutingMap).filter(route=>{ return route.runningRouting1 && route.runningRouting2; });
@ -284,85 +239,32 @@ export default {
return startStationA.kmRange == startStationB.kmRange ? endStationCodeA.kmRange - endStationCodeB.kmRange : startStationA.kmRange - startStationB.kmRange;
});
this.runningRouteList = list;
// this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => route.runningRouting1 && route.runningRouting2
// && (outboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
// inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode) ||
// ! inboundRoute && !outboundRoute)
// );
}
// this.outboundRouteList = this.covertRouting(this.routingList, route => {
// return route.routingType == 'OUTBOUND' && (
// runningRoute
// ? [runningRoute.startSectionCode, runningRoute.endSectionCode].includes(route.endSectionCode)
// : true
// );
// });
// this.inboundRouteList = this.covertRouting(this.routingList, route => {
// return route.routingType == 'INBOUND' && (
// runningRoute
// ? [runningRoute.startSectionCode, runningRoute.endSectionCode].includes(route.startSectionCode)
// : true
// );
// });
this.checkRouteCurrentValue();
},
// onInboundRouteChange(inboundRouting = '') {
// const outboundRoute = this.routingList.find(route => route.value == this.formModel.outboundRouting);
// const inboundRoute = this.routingList.find(route => route.value == this.formModel.inboundRouting);
// if (this.formModel.runningRouting) {
// this.runningRouteList = this.covertRouting(Object.values(this.runningRoutingMap), route => {
// return route.runningRouting1 && route.runningRouting2 && (
// outboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
// inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode)
// );
// });
// } else {
// this.runningRouteList = Object.values(this.runningRoutingMap).filter(route => {
// return route.runningRouting1 && route.runningRouting2 && (
// outboundRoute && !inboundRoute && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode) ||
// !outboundRoute && inboundRoute && [route.startSectionCode, route.endSectionCode].includes(inboundRoute.startSectionCode) ||
// outboundRoute && inboundRoute && (
// outboundRoute.endSectionCode != inboundRoute.startSectionCode && JSON.stringify([route.startSectionCode, route.endSectionCode].sort()) == JSON.stringify([outboundRoute.endSectionCode, inboundRoute.startSectionCode].sort()) ||
// outboundRoute.endSectionCode == inboundRoute.startSectionCode && [route.startSectionCode, route.endSectionCode].includes(outboundRoute.endSectionCode)
// ) ||
// !inboundRoute && !outboundRoute
// );
// });
// }
// if (!inboundRouting) {
// this.inboundRouteList = this.covertRouting(this.routingList, route => {
// return route.routingType == 'INBOUND';
// });
// }
// this.checkRouteCurrentValue();
// },
doClose() {
this.loading = false;
// this.$refs.dataform.validateField('runningRouting');
this.$refs.dataform.resetForm();
this.$refs.dataform.allSelectBlur();
this.changeSectionSelected(this.oldsection, false);
// this.$refs.dataform.clearValidate();
// blur
this.formModel = {
gernarateType:'01',
gernarateType:'02',
serviceNumber:'', //
beginTime: '', //
overTime: '', //
runLevel:'', //
departureInterval:180, //
beginTime: '06:00:00', //
overTime: '22:00:00', //
runLevel:3, //
departureInterval:300, //
outAndIn:false, //
// inboundRouting:'', // code
// outboundRouting:'', // code
runningRouting1: '', // code1
runningRouting2: '', // code2
runningRouting:''
};
this.dialogShow = false;
this.$emit('close');
// this.dialogShow = false;
},
covertRouting(list, cb = e => true) {
return list.filter(route=> cb(route));
@ -395,9 +297,58 @@ export default {
this.$messageBox(error.message);
});
});
},
changeSectionSelected(selectedList, flag) {
if (selectedList && selectedList.length > 0) {
if (flag) {
// if (this.oldsection.length > 0) {
// this.oldsection.forEach((sectionInfo)=>{
// const section = this.$store.getters['map/getDeviceByCode'](sectionInfo.sectionCode);
// section.instance.drawBatchSelected(section, '');
// });
// this.oldsection = [];
// }
selectedList.forEach(each=>{
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
const list = section.logicSectionCodeList;
// if()
// relSwitchCode
if (list && list.length > 0) {
list.forEach(logicSectionCode=>{
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
this.oldsection.push(logicSection);
logicSection.instance.drawBatchSelected(section, 'routingSection');
});
} else {
this.oldsection.push({sectionCode:section.code});
section.instance.drawBatchSelected(section, 'routingSection');
}
});
this.$jlmap.setCenter(selectedList[0].sectionCode);
} else {
selectedList.forEach(each=>{
const section = this.$store.getters['map/getDeviceByCode'](each.sectionCode);
const list = section.logicSectionCodeList;
if (list && list.length > 0) {
list.forEach(logicSectionCode=>{
const logicSection = this.$store.getters['map/getDeviceByCode'](logicSectionCode);
logicSection.instance.drawBatchSelected(section, '');
});
} else {
section.instance.drawBatchSelected(section, '');
}
});
}
}
}
}
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.gerneratePlanDialog{
display: inline-block;
margin-top: 20px;
margin-left: 150px;
}
</style>

View File

@ -402,7 +402,7 @@ export default {
tripNumber: this.tripNumber,
startTime: formatTime(trainInfo.stationTimeList[0].secondTime + 7200),
endTime: formatTime(trainInfo.stationTimeList[lastIndex].secondTime + 7200),
routingCode : resp.data.code,
routingCode : resp.data.id,
arriveConfigList: [],
startTbFront: resp.data.startTbFront,
endTbFront: resp.data.endTbFront
@ -436,6 +436,9 @@ export default {
});
newstationTimeList.forEach((newstationTime, index)=>{
if (resp.data.startTbFront == false) {
index += 1;
}
const newModel = {
sectionCode:resp.data.parkSectionCodeList[index].sectionCode,
stationCode:newstationTime.stationCode,

View File

@ -105,7 +105,7 @@ export default {
] },
{ prop: 'runningRouting1', label: '环路交路1', type: 'select', show:false},
{ prop: 'runningRouting2', label: '环路交路2', type: 'select', show:false},
{prop:'runningRouting', label:'环路', type: 'select', options:this.covertRouting(), noDataText:'请先设置交路', change:true, onChange:this.changeRoute}
{ prop:'runningRouting', label:'环路', type: 'select', options:this.covertRouting(), noDataText:'请先设置交路', change:true, onChange:this.changeRoute}
// { prop: 'startStationCode', label: '', type: 'select', options: this.stationList },
// { prop: 'endStationCode', label: '', type: 'select', options: this.stationList }
]
@ -142,7 +142,7 @@ export default {
if (!data) { runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode] = {}; }
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].label = elem.name;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].value = elem.startSectionCode + '-' + elem.endSectionCode;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].runningRouting1 = elem.code;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].runningRouting1 = elem.id;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].startStationCode = elem.startStationCode;
runningRoutingMap[elem.startSectionCode + '-' + elem.endSectionCode].endStationCode = elem.endStationCode;
} else {
@ -152,7 +152,7 @@ export default {
if (!data) { runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode] = {}; }
// runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].label = elem.name;
runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].value = elem.endSectionCode + '-' + elem.startSectionCode;
runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].runningRouting2 = elem.code;
runningRoutingMap[elem.endSectionCode + '-' + elem.startSectionCode].runningRouting2 = elem.id;
}
}
});

View File

@ -1,10 +1,13 @@
<template>
<el-dialog :title="title" :visible.sync="dialogShow" custom-class="content-route" width="100%" :fullscreen="true" top="0px" :before-close="close" :z-index="2000" :append-to-body="true">
<div class="content-box">
<jlmap-visual ref="jlmapVisual" @onMenu="onContextmenu" @onSelect="clickEvent" />
<div v-if="type=='generateRouting'">
<gernarate-plan ref="gernaratePlanTrain" @close="closeDialog" @mapLoading="mapLoading" />
</div>
<jlmap-visual ref="jlmapVisual" v-loading="loadingMap" @onMenu="onContextmenu" @onSelect="clickEvent" />
<!-- :style="{height: $store.state.app.height-54+'px' }" -->
<div class="routeMap">
<route-config v-if="type=='routeMap'" ref="routeConfig" />
<div v-if="type=='routeMap'" class="routeMap">
<route-config ref="routeConfig" />
<!-- <runplan-config v-if="type=='runplanParams'" ref="runPlanConfig" /> -->
</div>
</div>
@ -16,13 +19,15 @@ import JlmapVisual from '@/views/newMap/jlmapNew/index';
import { loadMapDataById } from '@/utils/loaddata';
import { EventBus } from '@/scripts/event-bus';
import RouteConfig from './routeConfig';
import GernaratePlan from '../menus/gernaratePlanTrain';
// import RunplanConfig from './runplanConfig';
export default {
name: 'RouteMap',
components: {
JlmapVisual,
RouteConfig
RouteConfig,
GernaratePlan
// RunplanConfig
},
props:{
@ -34,7 +39,8 @@ export default {
dialogShow: false,
oldDevice: null,
oldsection:[],
isFirst:true
isFirst:true,
loadingMap:false
};
},
watch: {
@ -52,18 +58,16 @@ export default {
this.type = type;
if (this.type == 'routeMap') {
this.title = '交路配置';
} else if (this.type == 'generateRouting') {
this.title = '生成计划';
}
// else if (this.type == 'runplanParams') {
// this.title = '';
// }
this.dialogShow = true;
await this.setWindowSize();
if (this.isFirst) {
this.loadInitPage();
}
this.isFirst = false;
// if (this.type == 'runplanParams') { this.$refs.runPlanConfig.doShow(); }
if (this.type == 'generateRouting') { this.$refs.gernaratePlanTrain.doShow(); }
},
//
getDeviceByEm(em) {
@ -100,8 +104,14 @@ export default {
},
setWindowSize() {
this.$nextTick(() => {
const width = this.$store.state.app.width * 0.7;
const height = this.$store.state.app.height - 54;
let width;
if (this.type == 'generateRouting') {
width = this.$store.state.app.width - 500;
} else {
width = this.$store.state.app.width * 0.7;
}
const height = this.$store.state.app.height - 49;
this.$store.dispatch('config/resize', { width, height });
});
},
@ -134,6 +144,13 @@ export default {
this.dialogShow = false;
if (this.type == 'routeMap') { this.$refs.routeConfig.createRouteEvent(); }
// if (this.type == 'runplanParams') { this.$refs.runPlanConfig.clear(); }
if (this.type == 'generateRouting') { this.$refs.gernaratePlanTrain.doClose(); }
},
closeDialog() {
this.dialogShow = false;
},
mapLoading(status) {
this.loadingMap = status;
}
}
};
@ -177,5 +194,11 @@ export default {
}
}
.el-dialog.is-fullscreen.content-route .el-dialog__header{
padding-top: 15px !important;
.el-dialog__headerbtn{
top:15px;
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More