Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
5a2ff68b15
@ -59,9 +59,9 @@ export function putLessonOffLine(id) {
|
|||||||
/**
|
/**
|
||||||
* 获取地图产品下的课程列表
|
* 获取地图产品下的课程列表
|
||||||
*/
|
*/
|
||||||
export function getCommodityProductLesson(prdCode) {
|
export function getCommodityProductLesson(prdId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/lesson/${prdCode}/list`,
|
url: `/api/lesson/${prdId}/list`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -69,16 +69,6 @@ export function getPermissionList(id) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询仿真权限列表
|
|
||||||
*/
|
|
||||||
export function queryPermissionSimulation(data) {
|
|
||||||
return request({
|
|
||||||
url: `/api/userPermission/${data.mapId}/${data.prdCode}/simulation`,
|
|
||||||
method: 'get'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获取大屏权限列表*/
|
/** 获取大屏权限列表*/
|
||||||
export function queryPermissionScreen() {
|
export function queryPermissionScreen() {
|
||||||
return request({
|
return request({
|
||||||
|
@ -9,9 +9,9 @@ export function getPublishMapTree(cityCode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** 获取产品详细内容*/
|
/** 获取产品详细内容*/
|
||||||
export function getProductDetail(prdCode) {
|
export function getProductDetail(prdId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapPrd/${prdCode}`,
|
url: `/api/mapPrd/${prdId}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -72,9 +72,9 @@ export function getCommodityMapProduct(mapId) {
|
|||||||
/**
|
/**
|
||||||
* 获取地图下的产品详情
|
* 获取地图下的产品详情
|
||||||
*/
|
*/
|
||||||
export function getMapProductDetail(prdCode) {
|
export function getMapProductDetail(prdId) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/mapPrd/${prdCode}`,
|
url: `/api/mapPrd/${prdId}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -69,9 +69,9 @@ export function runDiagramIsStart(group) {
|
|||||||
* 仿真系统CBTC
|
* 仿真系统CBTC
|
||||||
* @param {*} mapId
|
* @param {*} mapId
|
||||||
*/
|
*/
|
||||||
export function simulationNotify({ mapId, code }) {
|
export function simulationNotify({ mapId, mapPrdId }) {
|
||||||
return request({
|
return request({
|
||||||
url: `/api/simulation/${mapId}/${code}`,
|
url: `/api/simulation/${mapId}/${mapPrdId}`,
|
||||||
method: 'get'
|
method: 'get'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -9,15 +9,6 @@ export function getTrainingSystemList(cityCode, params) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export function querySystemByTypeAndPrdCode(params, prodCode) {
|
|
||||||
/** 根据系统类型和地图产品code查询系统的内容(课程、章节、考试)*/
|
|
||||||
return request({
|
|
||||||
url: `/api/mapSystem/queryByTypeAndPrdCode/${prodCode}`,
|
|
||||||
method: 'get',
|
|
||||||
params
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getTrainingSystemListByMapId(mapId) {
|
export function getTrainingSystemListByMapId(mapId) {
|
||||||
/** 根据mapId去获取其子系统 */
|
/** 根据mapId去获取其子系统 */
|
||||||
return request({
|
return request({
|
||||||
|
@ -107,4 +107,10 @@ deviceRender[deviceType.Alarm] = {
|
|||||||
z: 4
|
z: 4
|
||||||
};
|
};
|
||||||
|
|
||||||
|
deviceRender[deviceType.CheckBox] = {
|
||||||
|
_type: deviceType.CheckBox,
|
||||||
|
zlevel: 10,
|
||||||
|
z: 0
|
||||||
|
};
|
||||||
|
|
||||||
export default deviceRender;
|
export default deviceRender;
|
||||||
|
@ -12,7 +12,8 @@ const deviceType = {
|
|||||||
Key: 'Key',
|
Key: 'Key',
|
||||||
TeleTerminal: 'TeleTerminal',
|
TeleTerminal: 'TeleTerminal',
|
||||||
Clock: 'Clock',
|
Clock: 'Clock',
|
||||||
RotateTip: 'RotateTip'
|
RotateTip: 'RotateTip',
|
||||||
|
CheckBox: 'CheckBox'
|
||||||
};
|
};
|
||||||
|
|
||||||
export default deviceType;
|
export default deviceType;
|
||||||
|
@ -303,5 +303,25 @@ class IbpPan {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
renderCheckBox(model) {
|
||||||
|
const type = model._type;
|
||||||
|
const code = model.code;
|
||||||
|
const oDevice = this.ibpDevice[code] || deviceFactory(type, model);
|
||||||
|
const nDevice = deviceFactory(type, Object.assign(oDevice.model || {}, model));
|
||||||
|
delete this.ibpDevice[code];
|
||||||
|
this.$painter.delete(oDevice);
|
||||||
|
if (!model._dispose) {
|
||||||
|
this.ibpDevice[code] = nDevice;
|
||||||
|
this.$painter.add(nDevice);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deleteCheckBox(code) {
|
||||||
|
const oDevice = this.ibpDevice[code];
|
||||||
|
if (oDevice) {
|
||||||
|
delete this.ibpDevice[code];
|
||||||
|
this.$painter.delete(oDevice);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
export default IbpPan;
|
export default IbpPan;
|
||||||
|
@ -27,9 +27,14 @@ class MouseController extends Eventful {
|
|||||||
super();
|
super();
|
||||||
this.$ibp = ibp;
|
this.$ibp = ibp;
|
||||||
this.$zr = ibp.getZr();
|
this.$zr = ibp.getZr();
|
||||||
this.isAllowDragging=ibp.isAllowDragging||false;
|
this.isAllowDragging = ibp.isAllowDragging || false; // 是否在绘图中,仅绘图状态下可拖拽
|
||||||
this.events = ibp.getEvents();
|
this.events = ibp.getEvents();
|
||||||
this._dragging = false;
|
this._dragging = false; // 是否在拖拽状态
|
||||||
|
this.deviceList = [];
|
||||||
|
this.rightClickPoint = {
|
||||||
|
x: 0,
|
||||||
|
y: 0
|
||||||
|
}; // 右键点击坐标
|
||||||
this.initHandler(this.$zr);
|
this.initHandler(this.$zr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,35 +80,29 @@ class MouseController extends Eventful {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setAllowDragging(data) {
|
setAllowDragging(data) {
|
||||||
this.isAllowDragging=data;
|
this.isAllowDragging = data;
|
||||||
}
|
}
|
||||||
|
|
||||||
mousedown(e) {
|
mousedown(e) {
|
||||||
if (eventTool.notLeftMouse(e)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
e.event.preventDefault();
|
e.event.preventDefault();
|
||||||
e.event.stopPropagation();
|
e.event.stopPropagation();
|
||||||
const em = new EventModel(e);
|
const em = new EventModel(e);
|
||||||
this.eventTarget = em.eventTarget;
|
this.eventTarget = em.eventTarget;
|
||||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
this._offsetX = e.offsetX;
|
||||||
this.eventTarget.setCursor('pointer');
|
this._offsetY = e.offsetY;
|
||||||
}
|
|
||||||
this._offsetX=e.offsetX;
|
|
||||||
this._offsetY=e.offsetY;
|
|
||||||
this._x = e.offsetX;
|
this._x = e.offsetX;
|
||||||
this._y = e.offsetY;
|
this._y = e.offsetY;
|
||||||
this._dragging = true;
|
this._dragging = true;
|
||||||
|
if (e.which === 3) {
|
||||||
|
this.handleMouseDownRight(e);
|
||||||
|
} else if (e.which === 1) {
|
||||||
|
this.handleMouseDownLeft(e);
|
||||||
|
} else if (e.which === 2) {
|
||||||
|
this.handleMouseDownWheel(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mousemove(e) {
|
mousemove(e) {
|
||||||
if (eventTool.notLeftMouse(e) ||
|
|
||||||
!this._moveOnMouseMove ||
|
|
||||||
!this._dragging || !this.isAllowDragging
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const oldX = this._x;
|
const oldX = this._x;
|
||||||
const oldY = this._y;
|
const oldY = this._y;
|
||||||
|
|
||||||
@ -112,32 +111,38 @@ class MouseController extends Eventful {
|
|||||||
|
|
||||||
this._x = e.offsetX;
|
this._x = e.offsetX;
|
||||||
this._y = e.offsetY;
|
this._y = e.offsetY;
|
||||||
if (this._dragging) {
|
if (e.which === 3) {
|
||||||
if ((this.eventTarget && this.eventTarget._type === deviceType.Background) || !this.isAllowDragging) {
|
this.handleMouseMoveRight({x: e.offsetX, y: e.offsetY});
|
||||||
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
} else if (e.which === 1) {
|
||||||
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
this.handleMouseMoveLeft(e, dx, dy, oldX, oldY);
|
||||||
return true;
|
|
||||||
} else if (this.isAllowDragging && this.eventTarget) {
|
|
||||||
this.eventTarget.grouper.drift(dx, dy, e);
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mouseup(e) {
|
mouseup(e) {
|
||||||
if (!eventTool.notLeftMouse(e)&&this.isAllowDragging && this.eventTarget) {
|
if (eventTool.notLeftMouse(e) || !this.eventTarget ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.deviceList.length) {
|
||||||
|
this.deviceList.forEach(item => {
|
||||||
|
item.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
||||||
|
});
|
||||||
|
this.deviceList = [];
|
||||||
|
this.$ibp.deleteCheckBox('check_box');
|
||||||
|
this.eventTarget = '';
|
||||||
|
this._dragging = false;
|
||||||
|
this.deviceList = [];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.isAllowDragging) {
|
||||||
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
this.eventTarget.setModel(e.offsetX - this._offsetX, e.offsetY - this._offsetY);
|
||||||
this.eventTarget.dirty();
|
this.eventTarget.dirty();
|
||||||
}
|
}
|
||||||
// debugger;
|
if (this.eventTarget._type === deviceType.Background) {
|
||||||
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
|
||||||
// console.log('111-------');
|
|
||||||
this.eventTarget.setCursor('default');
|
this.eventTarget.setCursor('default');
|
||||||
}
|
}
|
||||||
this.eventTarget = '';
|
this.eventTarget = '';
|
||||||
this._dragging = false;
|
this._dragging = false;
|
||||||
|
this.deviceList = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
contextmenu(e) {
|
contextmenu(e) {
|
||||||
@ -191,6 +196,92 @@ class MouseController extends Eventful {
|
|||||||
|
|
||||||
return newEm;
|
return newEm;
|
||||||
}
|
}
|
||||||
|
/** 处理鼠标右键按下事件 */
|
||||||
|
handleMouseDownRight(e) {
|
||||||
|
this.rightClickPoint.x = e.offsetX;
|
||||||
|
this.rightClickPoint.y = e.offsetY;
|
||||||
|
}
|
||||||
|
/** 处理鼠标左键按下事件 */
|
||||||
|
handleMouseDownLeft(e) {
|
||||||
|
if (this.eventTarget && this.eventTarget._type === deviceType.Background) {
|
||||||
|
this.eventTarget.setCursor('pointer');
|
||||||
|
this.$ibp.deleteCheckBox('check_box');
|
||||||
|
} else if (this.eventTarget && this.eventTarget._type === deviceType.CheckBox) {
|
||||||
|
this.handleBoundingRect(this.eventTarget);
|
||||||
|
} else {
|
||||||
|
this.$ibp.deleteCheckBox('check_box');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** 处理滚轮按下事件 */
|
||||||
|
handleMouseDownWheel(e) {
|
||||||
|
this.deviceList = [];
|
||||||
|
Object.values(this.$ibp.ibpDevice).forEach(item => {
|
||||||
|
if (item.instance._type !== deviceType.Background) {
|
||||||
|
this.deviceList.push(item.instance);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 处理右键拖动事件--- 改变选中区域大小 */
|
||||||
|
handleMouseMoveRight(point2) {
|
||||||
|
const point1 = this.rightClickPoint;
|
||||||
|
const x = Math.min(point1.x, point2.x) + this.$ibp.$options.offsetX;
|
||||||
|
const y = Math.min(point1.y, point2.y) + this.$ibp.$options.offsetY;
|
||||||
|
const width = Math.abs(point1.x - point2.x);
|
||||||
|
const height = Math.abs(point1.y - point2.y);
|
||||||
|
this.$ibp.renderCheckBox({code: 'check_box', _type: 'CheckBox', point: {x: x, y: y}, width: width, height: height });
|
||||||
|
}
|
||||||
|
/** 处理左键拖动事件--- 图形移动 */
|
||||||
|
handleMouseMoveLeft(e, dx, dy, oldX, oldY) {
|
||||||
|
if (!this._moveOnMouseMove || !this._dragging || !this.isAllowDragging) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this.deviceList.length) {
|
||||||
|
this.deviceList.forEach(item => {
|
||||||
|
item.grouper.drift(dx, dy, e);
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (this._dragging) {
|
||||||
|
if ((this.eventTarget && this.eventTarget._type === deviceType.Background) || !this.isAllowDragging) {
|
||||||
|
this._preventDefaultMouseMove && eventTool.stop(e.event);
|
||||||
|
this.trigger(this.events.__Pan, { dx, dy, oldX, oldY, newX: this._x, newY: this._y });
|
||||||
|
return true;
|
||||||
|
} else if (this.isAllowDragging && this.eventTarget) {
|
||||||
|
this.eventTarget.grouper.drift(dx, dy, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/** 通过包围盒筛选选中区域的元素 */
|
||||||
|
handleBoundingRect(eventTarget) {
|
||||||
|
this.deviceList = [];
|
||||||
|
let boundingRect = eventTarget.grouper.getBoundingRect();
|
||||||
|
boundingRect = this.createFakeBoundingRect(eventTarget, boundingRect);
|
||||||
|
const deviceList = Object.values(this.$ibp.ibpDevice);
|
||||||
|
const includeDeviceList = [];
|
||||||
|
deviceList.forEach( item =>{
|
||||||
|
if (item.instance._type !== deviceType.Background) {
|
||||||
|
let deviceBoundingRect = item.instance.grouper.getBoundingRect();
|
||||||
|
deviceBoundingRect = this.createFakeBoundingRect(item.instance, deviceBoundingRect);
|
||||||
|
if (this.whetherInclude(boundingRect, deviceBoundingRect )) {
|
||||||
|
includeDeviceList.push(item.instance);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.deviceList = includeDeviceList;
|
||||||
|
}
|
||||||
|
/** 创建假包围盒对象 */
|
||||||
|
createFakeBoundingRect(instance, boundingRect) {
|
||||||
|
return {
|
||||||
|
x1: instance.model.point.x + boundingRect.x,
|
||||||
|
y1: instance.model.point.y + boundingRect.y,
|
||||||
|
x2: instance.model.point.x + boundingRect.width,
|
||||||
|
y2: instance.model.point.y + boundingRect.height
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/** 判断元素包围盒是否在选中区域 */
|
||||||
|
whetherInclude(boundingRect1, boundingRect2) {
|
||||||
|
return boundingRect1.x1 <= boundingRect2.x1 && boundingRect1.y1 <= boundingRect2.y1 && boundingRect1.x2 >= boundingRect2.x2 && boundingRect1.y2 >= boundingRect2.y2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MouseController;
|
export default MouseController;
|
||||||
|
46
src/ibp/shape/checkBox.js
Normal file
46
src/ibp/shape/checkBox.js
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
import Group from 'zrender/src/container/Group';
|
||||||
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
|
export default class checkBox extends Group {
|
||||||
|
constructor(device) {
|
||||||
|
super();
|
||||||
|
this.model = device.model;
|
||||||
|
this._type = device.model._type;
|
||||||
|
this._code = device.model.code;
|
||||||
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.z = device.model.z;
|
||||||
|
this.create();
|
||||||
|
}
|
||||||
|
|
||||||
|
create() {
|
||||||
|
const model = this.model;
|
||||||
|
this.grouper = new Group({
|
||||||
|
id: model.code,
|
||||||
|
position: [model.point.x, model.point.y]
|
||||||
|
});
|
||||||
|
this.box = new Rect({
|
||||||
|
zlevel: model.zlevel,
|
||||||
|
z: model.z,
|
||||||
|
draggable: false,
|
||||||
|
shape: {
|
||||||
|
x: 0,
|
||||||
|
y: 0,
|
||||||
|
width: this.model.width,
|
||||||
|
height: this.model.height
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
fill: 'rgb(135,206,250,0.2)'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
this.grouper.add(this.box);
|
||||||
|
this.add(this.grouper);
|
||||||
|
}
|
||||||
|
setModel(dx, dy) {
|
||||||
|
this.model.point.x += dx;
|
||||||
|
this.model.point.y += dy;
|
||||||
|
}
|
||||||
|
setSize(width, height) {
|
||||||
|
this.model.width = width;
|
||||||
|
this.model.height = height;
|
||||||
|
}
|
||||||
|
}
|
@ -13,6 +13,7 @@ import Key from './key';
|
|||||||
import TeleTerminal from './teleTerminal';
|
import TeleTerminal from './teleTerminal';
|
||||||
import Clock from './clock';
|
import Clock from './clock';
|
||||||
import RotateTip from './rotateTip';
|
import RotateTip from './rotateTip';
|
||||||
|
import CheckBox from './checkBox';
|
||||||
|
|
||||||
const ibpShape = {};
|
const ibpShape = {};
|
||||||
ibpShape[deviceType.Arrow] = Arrow;
|
ibpShape[deviceType.Arrow] = Arrow;
|
||||||
@ -29,6 +30,7 @@ ibpShape[deviceType.Key] = Key;
|
|||||||
ibpShape[deviceType.TeleTerminal] = TeleTerminal;
|
ibpShape[deviceType.TeleTerminal] = TeleTerminal;
|
||||||
ibpShape[deviceType.Clock] = Clock;
|
ibpShape[deviceType.Clock] = Clock;
|
||||||
ibpShape[deviceType.RotateTip] = RotateTip;
|
ibpShape[deviceType.RotateTip] = RotateTip;
|
||||||
|
ibpShape[deviceType.CheckBox] = CheckBox;
|
||||||
|
|
||||||
function shapefactory(device, ibp) {
|
function shapefactory(device, ibp) {
|
||||||
const type = device.model._type;
|
const type = device.model._type;
|
||||||
|
@ -8,12 +8,13 @@ export default class ibpLine extends Group {
|
|||||||
this._type = device.model._type;
|
this._type = device.model._type;
|
||||||
this._code = device.model.code;
|
this._code = device.model.code;
|
||||||
this.zlevel = device.model.zlevel;
|
this.zlevel = device.model.zlevel;
|
||||||
|
this.model.point = this.model.point1;
|
||||||
this.z = device.model.z;
|
this.z = device.model.z;
|
||||||
this.create();
|
this.create();
|
||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
this.grouper=new Group({
|
this.grouper = new Group({
|
||||||
id: model.code,
|
id: model.code,
|
||||||
position: [model.point1.x, model.point1.y]
|
position: [model.point1.x, model.point1.y]
|
||||||
});
|
});
|
||||||
@ -24,8 +25,8 @@ export default class ibpLine extends Group {
|
|||||||
shape: {
|
shape: {
|
||||||
x1: 0,
|
x1: 0,
|
||||||
y1: 0,
|
y1: 0,
|
||||||
x2: model.point2.x-model.point1.x,
|
x2: model.point2.x - model.point1.x,
|
||||||
y2: model.point2.y-model.point1.y
|
y2: model.point2.y - model.point1.y
|
||||||
},
|
},
|
||||||
style: {
|
style: {
|
||||||
lineWidth: this.model.lineWidth,
|
lineWidth: this.model.lineWidth,
|
||||||
|
@ -189,6 +189,7 @@ export default {
|
|||||||
this.visible = true;
|
this.visible = true;
|
||||||
const token = getToken() || getDesignToken();
|
const token = getToken() || getDesignToken();
|
||||||
getInfo(token).then(response => {
|
getInfo(token).then(response => {
|
||||||
|
debugger;
|
||||||
const user = response.data;
|
const user = response.data;
|
||||||
this.userInfo = {
|
this.userInfo = {
|
||||||
name: user.name,
|
name: user.name,
|
||||||
@ -264,7 +265,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async sendMobileCode() {
|
async sendMobileCode() {
|
||||||
const random = Math.floor((Math.random()*10000)+1);
|
const random = Math.floor((Math.random() * 10000) + 1);
|
||||||
const timeCount = Date.parse(new Date()) / 1000;
|
const timeCount = Date.parse(new Date()) / 1000;
|
||||||
const pass = `${timeCount}${this.nationCode}${this.editInfo.mobile}${random}`;
|
const pass = `${timeCount}${this.nationCode}${this.editInfo.mobile}${random}`;
|
||||||
const param = {
|
const param = {
|
||||||
@ -358,7 +359,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async sendPassWordCode() {
|
async sendPassWordCode() {
|
||||||
if (this.userInfo.mobile) {
|
if (this.userInfo.mobile) {
|
||||||
const random = Math.floor((Math.random()*10000)+1);
|
const random = Math.floor((Math.random() * 10000) + 1);
|
||||||
const timeCount = Date.parse(new Date()) / 1000;
|
const timeCount = Date.parse(new Date()) / 1000;
|
||||||
const pass = `${timeCount}${this.nationCodeInit}${this.userInfo.mobile}${random}`;
|
const pass = `${timeCount}${this.nationCodeInit}${this.userInfo.mobile}${random}`;
|
||||||
const param = {
|
const param = {
|
||||||
|
@ -218,6 +218,7 @@ function handleOperation(state, models) {
|
|||||||
state.stepData.pop();
|
state.stepData.pop();
|
||||||
}
|
}
|
||||||
state.stepData.unshift(list);
|
state.stepData.unshift(list);
|
||||||
|
state.recoverStepData = [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,7 +143,7 @@ export default {
|
|||||||
cityCode: row.cityCode,
|
cityCode: row.cityCode,
|
||||||
mapId: row.mapId,
|
mapId: row.mapId,
|
||||||
name: row.name,
|
name: row.name,
|
||||||
prdCode: row.prdCode
|
prdId: row.prdId
|
||||||
};
|
};
|
||||||
adminPublishLesson(params, row.id).then(response => {
|
adminPublishLesson(params, row.id).then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -13,8 +13,7 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'ScriptOperate',
|
name: 'ScriptOperate',
|
||||||
props: {
|
props: {
|
||||||
title:{type:String, required:true},
|
title:{type:String, required:true}
|
||||||
type:{type:String, required:true}
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -87,7 +87,7 @@ export default {
|
|||||||
endTime: '',
|
endTime: '',
|
||||||
date: ''
|
date: ''
|
||||||
},
|
},
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
numberMessage: '',
|
numberMessage: '',
|
||||||
PermissionType: '',
|
PermissionType: '',
|
||||||
@ -149,7 +149,7 @@ export default {
|
|||||||
changeSelectDate() {
|
changeSelectDate() {
|
||||||
if (this.formModel.date) {
|
if (this.formModel.date) {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
const data = {mapId:this.mapId, proCode:this.prdCode, startTime:this.formModel.date[0], endTime:this.formModel.date[1], type:this.PermissionType};
|
const data = {mapId:this.mapId, prdId:this.prdId, startTime:this.formModel.date[0], endTime:this.formModel.date[1], type:this.PermissionType};
|
||||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||||
data.lessonId = this.formModel.lessonId;
|
data.lessonId = this.formModel.lessonId;
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ export default {
|
|||||||
if (data) {
|
if (data) {
|
||||||
this.formModel.lessonId = data.id;
|
this.formModel.lessonId = data.id;
|
||||||
this.formModel.lessonName = data.name;
|
this.formModel.lessonName = data.name;
|
||||||
this.prdCode = data.prdCode;
|
this.prdId = data.prdId;
|
||||||
this.mapId = data.mapId;
|
this.mapId = data.mapId;
|
||||||
this.PermissionType = data.PermissionType;
|
this.PermissionType = data.PermissionType;
|
||||||
this.setTotalMax();
|
this.setTotalMax();
|
||||||
|
@ -87,7 +87,7 @@ export default {
|
|||||||
endTime: '',
|
endTime: '',
|
||||||
date: ''
|
date: ''
|
||||||
},
|
},
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
numberMessage: '',
|
numberMessage: '',
|
||||||
PermissionType: '',
|
PermissionType: '',
|
||||||
@ -149,7 +149,7 @@ export default {
|
|||||||
changeSelectDate() {
|
changeSelectDate() {
|
||||||
if (this.formModel.date) {
|
if (this.formModel.date) {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
const data = {mapId:this.mapId, proCode:this.prdCode, startTime:`${this.formModel.date[0]} 00:00:00`, endTime:`${this.formModel.date[1]} 23:59:59`, type:this.PermissionType};
|
const data = {mapId:this.mapId, prdId:this.prdId, startTime:`${this.formModel.date[0]} 00:00:00`, endTime:`${this.formModel.date[1]} 23:59:59`, type:this.PermissionType};
|
||||||
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
||||||
data.lessonId = this.formModel.lessonId;
|
data.lessonId = this.formModel.lessonId;
|
||||||
}
|
}
|
||||||
@ -175,7 +175,7 @@ export default {
|
|||||||
if (data) {
|
if (data) {
|
||||||
this.formModel.lessonId = data.id;
|
this.formModel.lessonId = data.id;
|
||||||
this.formModel.lessonName = data.name;
|
this.formModel.lessonName = data.name;
|
||||||
this.prdCode = data.prdCode;
|
this.prdId = data.prdId;
|
||||||
this.mapId = data.mapId;
|
this.mapId = data.mapId;
|
||||||
this.PermissionType = data.PermissionType;
|
this.PermissionType = data.PermissionType;
|
||||||
this.setTotalMax();
|
this.setTotalMax();
|
||||||
@ -219,35 +219,6 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// this.$refs.dataform.validateForm(() => {
|
|
||||||
// const model = {
|
|
||||||
// startTime: `${this.formModel.date[0]} 00:00:00`,
|
|
||||||
// endTime: `${this.formModel.date[1]} 23:59:59`,
|
|
||||||
// amount: this.formModel.total,
|
|
||||||
// permissionType: this.PermissionType
|
|
||||||
// };
|
|
||||||
// if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) {
|
|
||||||
// model['lessonId'] = this.formModel.lessonId;
|
|
||||||
// model['mapId'] = this.mapId;
|
|
||||||
// model['prdCode'] = this.prdCode;
|
|
||||||
// } else if (this.PermissionType == PermissionType.SIMULATION) {
|
|
||||||
// model['mapId'] = this.mapId;
|
|
||||||
// model['prdCode'] = this.prdCode;
|
|
||||||
// }
|
|
||||||
// // 转增
|
|
||||||
// permissionTurnAdd(model).then(response => {
|
|
||||||
// const url = response.data;
|
|
||||||
// this.$emit('QrCodeShow', {
|
|
||||||
// url: url,
|
|
||||||
// title: this.$t('global.transferQrcode')
|
|
||||||
// });
|
|
||||||
// this.dialogVisible = false;
|
|
||||||
// this.$emit('initLoadPage');
|
|
||||||
// this.handleClose();
|
|
||||||
// }).catch(() => {
|
|
||||||
// this.$messageBox(this.$t('error.getTransferQrcodeFailed'));
|
|
||||||
// });
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
|
@ -101,7 +101,7 @@ export default {
|
|||||||
};
|
};
|
||||||
if (this.$route.query.permissionType != '04') {
|
if (this.$route.query.permissionType != '04') {
|
||||||
data['mapId'] = this.$route.query.mapId;
|
data['mapId'] = this.$route.query.mapId;
|
||||||
data['prdCode'] = this.$route.query.prdCode;
|
data['prdId'] = this.$route.query.prdId;
|
||||||
data['lessonId'] = this.$route.query.lessonId;
|
data['lessonId'] = this.$route.query.lessonId;
|
||||||
}
|
}
|
||||||
getCommodityDetailByParams(data).then(response => {
|
getCommodityDetailByParams(data).then(response => {
|
||||||
@ -127,7 +127,7 @@ export default {
|
|||||||
this.active = 0;
|
this.active = 0;
|
||||||
const type = this.$route.query.permissionType;
|
const type = this.$route.query.permissionType;
|
||||||
if (type === PermissionType.LESSON) {
|
if (type === PermissionType.LESSON) {
|
||||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.query.subSystem}`, query: {lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, prdCode: this.$route.query.prdCode}});
|
this.$router.replace({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.query.subSystem}`, query: {lessonId: this.$route.query.lessonId, mapId: this.$route.query.mapId, prdId: this.$route.query.prdId}});
|
||||||
} else if (type === PermissionType.EXAM) {
|
} else if (type === PermissionType.EXAM) {
|
||||||
this.$router.replace({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`});
|
this.$router.replace({ path: `${UrlConfig.trainingPlatform.course}/${this.$route.query.subSystem}`});
|
||||||
} else if (type === PermissionType.SCREEN) {
|
} else if (type === PermissionType.SCREEN) {
|
||||||
|
@ -48,7 +48,7 @@ export default {
|
|||||||
loading: true,
|
loading: true,
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
currentLessonId: '',
|
currentLessonId: '',
|
||||||
currentPrdCode: '',
|
currentPrdId: '',
|
||||||
productList: [],
|
productList: [],
|
||||||
courseModel: {
|
courseModel: {
|
||||||
id: '',
|
id: '',
|
||||||
@ -57,7 +57,7 @@ export default {
|
|||||||
skinCode: '',
|
skinCode: '',
|
||||||
remarks: '',
|
remarks: '',
|
||||||
prdType: '',
|
prdType: '',
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
pmsList: []
|
pmsList: []
|
||||||
},
|
},
|
||||||
jointShow: false,
|
jointShow: false,
|
||||||
@ -108,11 +108,11 @@ export default {
|
|||||||
skinCode: resp.data.mapPrd.skinCode,
|
skinCode: resp.data.mapPrd.skinCode,
|
||||||
remarks: resp.data.mapPrd.remarks,
|
remarks: resp.data.mapPrd.remarks,
|
||||||
prdType: resp.data.mapPrd.prdType,
|
prdType: resp.data.mapPrd.prdType,
|
||||||
prdCode: resp.data.mapPrd.code,
|
prdId: resp.data.mapPrd.id,
|
||||||
pmsList: resp.data.permissionList || [],
|
pmsList: resp.data.permissionList || [],
|
||||||
PermissionType: PermissionType.SIMULATION
|
PermissionType: PermissionType.SIMULATION
|
||||||
};
|
};
|
||||||
this.currentPrdCode = resp.data.mapPrd.code;
|
this.currentPrdId = resp.data.mapPrd.id;
|
||||||
if (resp.data.mapPrd.prdType === '03') {
|
if (resp.data.mapPrd.prdType === '03') {
|
||||||
this.getJointTrainingList();
|
this.getJointTrainingList();
|
||||||
}
|
}
|
||||||
@ -121,7 +121,7 @@ export default {
|
|||||||
this.tryUser = 1;
|
this.tryUser = 1;
|
||||||
const paras = {
|
const paras = {
|
||||||
mapId: this.mapId,
|
mapId: this.mapId,
|
||||||
prdCode: this.courseModel.prdCode,
|
prdId: this.courseModel.prdId,
|
||||||
permissionType: PermissionType.SIMULATION
|
permissionType: PermissionType.SIMULATION
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ export default {
|
|||||||
this.buttonLoading = true;
|
this.buttonLoading = true;
|
||||||
const param = {
|
const param = {
|
||||||
mapId: Number(this.mapId),
|
mapId: Number(this.mapId),
|
||||||
prdCode: this.courseModel.prdCode
|
prdId: this.courseModel.prdId
|
||||||
};
|
};
|
||||||
const res = await postCreateRoom(param);
|
const res = await postCreateRoom(param);
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
@ -212,9 +212,9 @@ export default {
|
|||||||
},
|
},
|
||||||
jumpScheduling() {
|
jumpScheduling() {
|
||||||
this.buttonLoading = true;
|
this.buttonLoading = true;
|
||||||
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
|
const data = { mapId: this.courseModel.mapId, prdId: this.currentPrdId };
|
||||||
schedulingNotify(data).then(resp => {
|
schedulingNotify(data).then(resp => {
|
||||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
|
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
|
||||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
@ -223,10 +223,10 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
jump() {
|
jump() {
|
||||||
const data = { mapId: this.courseModel.mapId, code: this.currentPrdCode };
|
const data = { mapId: this.courseModel.mapId, mapPrdId: this.currentPrdId };
|
||||||
this.buttonLoading = true;
|
this.buttonLoading = true;
|
||||||
simulationNotify(data).then(resp => {
|
simulationNotify(data).then(resp => {
|
||||||
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdCode, goodsId: this.goodsId, try: this.tryUser };
|
const query = { skinCode: this.courseModel.skinCode, group: resp.data, prdType: this.courseModel.prdType, mapId: this.courseModel.mapId, code: this.currentPrdId, goodsId: this.goodsId, try: this.tryUser };
|
||||||
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/demon`, query: query });
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
@ -238,7 +238,7 @@ export default {
|
|||||||
this.buttonLoading = true;
|
this.buttonLoading = true;
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||||
query: { permissionType: PermissionType.SIMULATION, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
query: { permissionType: PermissionType.SIMULATION, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
transfer() {
|
transfer() {
|
||||||
|
@ -396,7 +396,7 @@ export default {
|
|||||||
const resp = await getTrainingDetail(this.trainingId);
|
const resp = await getTrainingDetail(this.trainingId);
|
||||||
if (resp && resp.code == 200) {
|
if (resp && resp.code == 200) {
|
||||||
const detail = resp.data;
|
const detail = resp.data;
|
||||||
const rest = await getProductDetail(detail.prdCode);
|
const rest = await getProductDetail(detail.prdId);
|
||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
const data = rest.data;
|
const data = rest.data;
|
||||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||||
|
@ -388,7 +388,7 @@ export default {
|
|||||||
const resp = await getTrainingDetail(this.trainingId);
|
const resp = await getTrainingDetail(this.trainingId);
|
||||||
if (resp && resp.code == 200) {
|
if (resp && resp.code == 200) {
|
||||||
const detail = resp.data;
|
const detail = resp.data;
|
||||||
const rest = await getProductDetail(detail.prdCode);
|
const rest = await getProductDetail(detail.prdId);
|
||||||
if (rest && rest.code == 200) {
|
if (rest && rest.code == 200) {
|
||||||
const data = rest.data;
|
const data = rest.data;
|
||||||
await this.$store.dispatch('training/setPrdType', data.prdType);
|
await this.$store.dispatch('training/setPrdType', data.prdType);
|
||||||
|
@ -130,7 +130,7 @@ export default {
|
|||||||
loadInitData() {
|
loadInitData() {
|
||||||
const data = {
|
const data = {
|
||||||
mapId: this.$route.query.mapId,
|
mapId: this.$route.query.mapId,
|
||||||
prdCode: this.$route.query.code,
|
prdId: this.$route.query.code,
|
||||||
permissionType: PermissionType.SIMULATION
|
permissionType: PermissionType.SIMULATION
|
||||||
};
|
};
|
||||||
getGoodsTryUse(data).then(res => {
|
getGoodsTryUse(data).then(res => {
|
||||||
|
@ -122,7 +122,7 @@ export default {
|
|||||||
id: resp.data.id,
|
id: resp.data.id,
|
||||||
name: resp.data.name,
|
name: resp.data.name,
|
||||||
pmsList: resp.data.permissionList || [],
|
pmsList: resp.data.permissionList || [],
|
||||||
prdCode: resp.data.prdCode,
|
prdId: resp.data.prdId,
|
||||||
mapId: resp.data.mapId,
|
mapId: resp.data.mapId,
|
||||||
PermissionType: PermissionType.EXAM,
|
PermissionType: PermissionType.EXAM,
|
||||||
treeList: resp.data.examDefinitionList
|
treeList: resp.data.examDefinitionList
|
||||||
@ -140,7 +140,7 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`,
|
||||||
query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
query: { permissionType: PermissionType.EXAM, lessonId: this.courseModel.id, prdId: this.courseModel.prdId, mapId: this.courseModel.mapId, subSystem: this.$route.params.subSystem }
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
checkCourse() {
|
checkCourse() {
|
||||||
|
@ -183,7 +183,7 @@ export default {
|
|||||||
getPublishLessonDetail({ id: this.examDetails.lessonId }).then((res) => {
|
getPublishLessonDetail({ id: this.examDetails.lessonId }).then((res) => {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `${UrlConfig.trainingPlatform.pay}/${this.examDetails.lessonId}`,
|
path: `${UrlConfig.trainingPlatform.pay}/${this.examDetails.lessonId}`,
|
||||||
query: { permissionType: PermissionType.EXAM, lessonId: this.examDetails.lessonId, prdCode: res.data.prdCode, mapId: res.data.mapId }
|
query: { permissionType: PermissionType.EXAM, lessonId: this.examDetails.lessonId, prdId: res.data.prdId, mapId: res.data.mapId }
|
||||||
});
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
this.$messageBox(this.$t('error.obtainCourseDetailsFailed'));
|
||||||
|
@ -98,7 +98,7 @@ export default {
|
|||||||
},
|
},
|
||||||
detail: {
|
detail: {
|
||||||
mapId: '',
|
mapId: '',
|
||||||
prdCode: ''
|
prdId: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -175,7 +175,7 @@ export default {
|
|||||||
loadTrainingList(data) {
|
loadTrainingList(data) {
|
||||||
getLessonDetail({ id: data.lessonId }).then(resp => {
|
getLessonDetail({ id: data.lessonId }).then(resp => {
|
||||||
this.detail.mapId = resp.data.mapId;
|
this.detail.mapId = resp.data.mapId;
|
||||||
this.detail.prdCode = resp.data.prdCode;
|
this.detail.prdId = resp.data.prdId;
|
||||||
this.chapterModel.lessonId = resp.data.id;
|
this.chapterModel.lessonId = resp.data.id;
|
||||||
this.chapterModel.lessonName = resp.data.name;
|
this.chapterModel.lessonName = resp.data.name;
|
||||||
if (data.type === 'Chapter') {
|
if (data.type === 'Chapter') {
|
||||||
|
@ -92,9 +92,9 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('lesson.product'),
|
title: this.$t('lesson.product'),
|
||||||
prop: 'prdCode',
|
prop: 'prdId',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.prdId, this.prdTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -147,7 +147,7 @@ export default {
|
|||||||
},
|
},
|
||||||
async queryFunction(params) {
|
async queryFunction(params) {
|
||||||
params['mapId'] = this.detail.mapId;
|
params['mapId'] = this.detail.mapId;
|
||||||
params['prdCode'] = this.detail.prdCode;
|
params['prdId'] = this.detail.prdId;
|
||||||
const res = await pageQueryTraining(params);
|
const res = await pageQueryTraining(params);
|
||||||
this.trainings.forEach(ele => {
|
this.trainings.forEach(ele => {
|
||||||
res.data.list.forEach(item => {
|
res.data.list.forEach(item => {
|
||||||
|
@ -20,13 +20,13 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('lesson.associatedProducts')" prop="prdCode">
|
<el-form-item :label="this.$t('lesson.associatedProducts')" prop="prdId">
|
||||||
<el-select v-model="courseModel.prdCode" :placeholder="$t('rules.pleaseSelect')" :disabled="isEdit">
|
<el-select v-model="courseModel.prdId" :placeholder="$t('rules.pleaseSelect')" :disabled="isEdit">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item,index) in productList"
|
v-for="(item,index) in productList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.code"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -74,7 +74,7 @@ export default {
|
|||||||
mapIdList: [],
|
mapIdList: [],
|
||||||
courseModel: {
|
courseModel: {
|
||||||
id: '',
|
id: '',
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
product: [],
|
product: [],
|
||||||
mapId: '',
|
mapId: '',
|
||||||
name: '',
|
name: '',
|
||||||
@ -94,7 +94,7 @@ export default {
|
|||||||
mapId: [
|
mapId: [
|
||||||
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
prdCode: [
|
prdId: [
|
||||||
{ required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectAssociatedProduct'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
remarks: [
|
remarks: [
|
||||||
@ -133,7 +133,7 @@ export default {
|
|||||||
this.$refs.form.validate((valid) => {
|
this.$refs.form.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
const model = {
|
const model = {
|
||||||
prdCode: this.courseModel.prdCode,
|
prdId: this.courseModel.prdId,
|
||||||
name: this.courseModel.name,
|
name: this.courseModel.name,
|
||||||
mapId: this.courseModel.mapId,
|
mapId: this.courseModel.mapId,
|
||||||
remarks: this.courseModel.remarks
|
remarks: this.courseModel.remarks
|
||||||
@ -153,7 +153,7 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const model = {
|
const model = {
|
||||||
id: this.courseModel.id,
|
id: this.courseModel.id,
|
||||||
prdCode: this.courseModel.prdCode,
|
prdId: this.courseModel.prdId,
|
||||||
name: this.courseModel.name,
|
name: this.courseModel.name,
|
||||||
mapId: this.courseModel.mapId,
|
mapId: this.courseModel.mapId,
|
||||||
remarks: this.courseModel.remarks
|
remarks: this.courseModel.remarks
|
||||||
@ -174,7 +174,7 @@ export default {
|
|||||||
this.courseModel = {
|
this.courseModel = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
mapId: this.$route.query.mapId,
|
mapId: this.$route.query.mapId,
|
||||||
prdCode: data.prdCode,
|
prdId: data.prdId,
|
||||||
name: data.name,
|
name: data.name,
|
||||||
remarks: data.remarks
|
remarks: data.remarks
|
||||||
};
|
};
|
||||||
|
@ -35,7 +35,7 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
cityCode: ''
|
cityCode: ''
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -68,7 +68,7 @@ export default {
|
|||||||
id: model.id,
|
id: model.id,
|
||||||
name: model.name,
|
name: model.name,
|
||||||
mapId: this.$route.params.mapId,
|
mapId: this.$route.params.mapId,
|
||||||
prdCode: model.prdCode,
|
prdId: model.prdId,
|
||||||
cityCode: model.cityCode
|
cityCode: model.cityCode
|
||||||
};
|
};
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
|
@ -15,13 +15,13 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item :label="this.$t('lesson.productType')" prop="prdCode">
|
<el-form-item :label="this.$t('lesson.productType')" prop="prdId">
|
||||||
<el-select v-model="operateModel.prdCode" style="width: 300px" @change="prdChange">
|
<el-select v-model="operateModel.prdId" style="width: 300px" @change="prdChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in productList"
|
v-for="option in productList"
|
||||||
:key="option.code"
|
:key="option.id"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.code"
|
:value="option.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -147,7 +147,7 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
type: '',
|
type: '',
|
||||||
mapId: this.$route.query.mapId,
|
mapId: this.$route.query.mapId,
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
operateType: [],
|
operateType: [],
|
||||||
maxDuration: 0,
|
maxDuration: 0,
|
||||||
minDuration: 0,
|
minDuration: 0,
|
||||||
@ -167,7 +167,7 @@ export default {
|
|||||||
mapId: [
|
mapId: [
|
||||||
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseEnterMapName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
prdCode: [
|
prdId: [
|
||||||
{ required: true, message: this.$t('rules.enterProductType'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.enterProductType'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
type: [
|
type: [
|
||||||
@ -212,7 +212,7 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
},
|
},
|
||||||
mapIdChoose(mapId) {
|
mapIdChoose(mapId) {
|
||||||
this.operateModel.prdCode = '';
|
this.operateModel.prdId = '';
|
||||||
this.productList = [];
|
this.productList = [];
|
||||||
if (mapId) {
|
if (mapId) {
|
||||||
getCommodityMapProduct(mapId).then((response) => {
|
getCommodityMapProduct(mapId).then((response) => {
|
||||||
@ -221,12 +221,12 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async prdChange(prdCode) {
|
async prdChange(prdId) {
|
||||||
this.trainingTypeMap = {};
|
this.trainingTypeMap = {};
|
||||||
this.operateModel.operateType = [];
|
this.operateModel.operateType = [];
|
||||||
|
|
||||||
const mapIdObj = this.mapIdList.find(elem => { return elem.id === this.operateModel.mapId; }) || {};
|
const mapIdObj = this.mapIdList.find(elem => { return elem.id === this.operateModel.mapId; }) || {};
|
||||||
const prdTypeObj = this.productList.find(elem => { return elem.code === prdCode; }) || {};
|
const prdTypeObj = this.productList.find(elem => { return elem.id === prdId; }) || {};
|
||||||
const res = await getOperateTrainingList({ mapId: mapIdObj.id, productType: prdTypeObj.prdType });
|
const res = await getOperateTrainingList({ mapId: mapIdObj.id, productType: prdTypeObj.prdType });
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.trainingTypeLists = res.data;
|
this.trainingTypeLists = res.data;
|
||||||
@ -280,7 +280,7 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
mapId: this.operateModel.mapId,
|
mapId: this.operateModel.mapId,
|
||||||
name: this.operateModel.name,
|
name: this.operateModel.name,
|
||||||
prdCode: this.operateModel.prdCode,
|
prdId: this.operateModel.prdId,
|
||||||
trainingType: this.operateModel.type,
|
trainingType: this.operateModel.type,
|
||||||
operateType: this.operateModel.operateType
|
operateType: this.operateModel.operateType
|
||||||
};
|
};
|
||||||
@ -298,7 +298,7 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
mapId: this.operateModel.mapId,
|
mapId: this.operateModel.mapId,
|
||||||
name: this.operateModel.name,
|
name: this.operateModel.name,
|
||||||
prdCode: this.operateModel.prdCode,
|
prdId: this.operateModel.prdId,
|
||||||
trainingType: this.operateModel.type,
|
trainingType: this.operateModel.type,
|
||||||
operateType: this.operateModel.operateType,
|
operateType: this.operateModel.operateType,
|
||||||
remarks: this.operateModel.remarks,
|
remarks: this.operateModel.remarks,
|
||||||
@ -319,7 +319,7 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
mapId: this.operateModel.mapId,
|
mapId: this.operateModel.mapId,
|
||||||
name: this.operateModel.name,
|
name: this.operateModel.name,
|
||||||
prdCode: this.operateModel.prdCode,
|
prdId: this.operateModel.prdId,
|
||||||
trainingType: `${this.operateModel.type}`,
|
trainingType: `${this.operateModel.type}`,
|
||||||
operateType: `${this.operateModel.operateType.join(',')}`
|
operateType: `${this.operateModel.operateType.join(',')}`
|
||||||
};
|
};
|
||||||
@ -336,7 +336,7 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
name: this.operateModel.name,
|
name: this.operateModel.name,
|
||||||
type: this.operateModel.type,
|
type: this.operateModel.type,
|
||||||
prdCode: this.operateModel.prdCode,
|
prdId: this.operateModel.prdId,
|
||||||
mapId: this.operateModel.mapId,
|
mapId: this.operateModel.mapId,
|
||||||
operateType: this.operateModel.operateType[0],
|
operateType: this.operateModel.operateType[0],
|
||||||
minDuration: this.operateModel.minDuration,
|
minDuration: this.operateModel.minDuration,
|
||||||
|
@ -44,7 +44,7 @@ export default {
|
|||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
queryObject: {
|
queryObject: {
|
||||||
prdCode: {
|
prdId: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('lesson.product'),
|
label: this.$t('lesson.product'),
|
||||||
change: this.prdChoose,
|
change: this.prdChoose,
|
||||||
@ -91,9 +91,9 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('lesson.product'),
|
title: this.$t('lesson.product'),
|
||||||
prop: 'prdCode',
|
prop: 'prdId',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.prdId, this.prdTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -155,13 +155,13 @@ export default {
|
|||||||
await this.loadInitData();
|
await this.loadInitData();
|
||||||
const json = localStore.get(this.$route.path);
|
const json = localStore.get(this.$route.path);
|
||||||
json.type = '';
|
json.type = '';
|
||||||
json.prdCode = '';
|
json.prdId = '';
|
||||||
json.operateType = '';
|
json.operateType = '';
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
this.mapIdList = [];
|
this.mapIdList = [];
|
||||||
this.queryForm.queryObject.prdCode.config.data = [];
|
this.queryForm.queryObject.prdId.config.data = [];
|
||||||
listPublishMap().then(response => {
|
listPublishMap().then(response => {
|
||||||
this.mapIdList = response.data;
|
this.mapIdList = response.data;
|
||||||
});
|
});
|
||||||
@ -171,7 +171,7 @@ export default {
|
|||||||
productList.forEach(elem => {
|
productList.forEach(elem => {
|
||||||
// 过滤综合演练产品
|
// 过滤综合演练产品
|
||||||
if (elem.prdType != '03') {
|
if (elem.prdType != '03') {
|
||||||
this.queryForm.queryObject.prdCode.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.prdId.config.data.push({ value: elem.code, label: elem.name });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ export default {
|
|||||||
permissionType: '',
|
permissionType: '',
|
||||||
mapId: '',
|
mapId: '',
|
||||||
lessonId: '',
|
lessonId: '',
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
date: '',
|
date: '',
|
||||||
amount: 0,
|
amount: 0,
|
||||||
ownerId: '',
|
ownerId: '',
|
||||||
@ -67,7 +67,7 @@ export default {
|
|||||||
items: [
|
items: [
|
||||||
{ prop: 'permissionType', label: this.$t('permission.permissionType'), type: 'select', required: false, disabled: !this.isAdd, options: this.permissionTypeList, change: true, onChange: this.permissionTypeChange },
|
{ prop: 'permissionType', label: this.$t('permission.permissionType'), type: 'select', required: false, disabled: !this.isAdd, options: this.permissionTypeList, change: true, onChange: this.permissionTypeChange },
|
||||||
{ prop: 'mapId', label: this.$t('permission.mapName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMap, options: this.publishMapList, change: true, onChange: this.mapChange },
|
{ prop: 'mapId', label: this.$t('permission.mapName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMap, options: this.publishMapList, change: true, onChange: this.mapChange },
|
||||||
{ prop: 'prdCode', label: this.$t('permission.mapProductName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMapProduct, options: this.mapProductList, change: true, onChange: this.mapProductChange },
|
{ prop: 'prdId', label: this.$t('permission.mapProductName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowMapProduct, options: this.mapProductList, change: true, onChange: this.mapProductChange },
|
||||||
{ prop: 'lessonId', label: this.$t('permission.lessonName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowLesson, options: this.filterPublisLessonList },
|
{ prop: 'lessonId', label: this.$t('permission.lessonName'), type: 'select', required: false, disabled: !this.isAdd, show: this.isShowLesson, options: this.filterPublisLessonList },
|
||||||
{ prop: 'roleName', label: this.$t('permission.belonger'), type: 'complete', required: false, disabled: !this.isAdd && this.isAdministrator, show: this.isShowRole, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
{ prop: 'roleName', label: this.$t('permission.belonger'), type: 'complete', required: false, disabled: !this.isAdd && this.isAdministrator, show: this.isShowRole, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
||||||
{ prop: 'date', label: this.$t('permission.selectDate'), type: 'daterange', required: false, viewFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss' },
|
{ prop: 'date', label: this.$t('permission.selectDate'), type: 'daterange', required: false, viewFormat: 'yyyy-MM-dd HH:mm:ss', valueFormat: 'yyyy-MM-dd HH:mm:ss' },
|
||||||
@ -85,7 +85,7 @@ export default {
|
|||||||
mapId: [
|
mapId: [
|
||||||
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectMapName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
prdCode: [
|
prdId: [
|
||||||
{ required: true, message: this.$t('rules.selectMapProductName'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.selectMapProductName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
lessonId: [
|
lessonId: [
|
||||||
@ -158,9 +158,9 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var validator = {};
|
var validator = {};
|
||||||
validator[PermissionType.LESSON] = () => { return this.formModel.lessonId && this.formModel.mapId && this.formModel.prdCode; };
|
validator[PermissionType.LESSON] = () => { return this.formModel.lessonId && this.formModel.mapId && this.formModel.prdId; };
|
||||||
validator[PermissionType.EXAM] = () => { return this.formModel.lessonId && this.formModel.mapId && this.formModel.prdCode; };
|
validator[PermissionType.EXAM] = () => { return this.formModel.lessonId && this.formModel.mapId && this.formModel.prdId; };
|
||||||
validator[PermissionType.SIMULATION] = () => { return this.formModel.mapId && this.formModel.prdCode; };
|
validator[PermissionType.SIMULATION] = () => { return this.formModel.mapId && this.formModel.prdId; };
|
||||||
validator[PermissionType.SCREEN] = () => { return true; };
|
validator[PermissionType.SCREEN] = () => { return true; };
|
||||||
|
|
||||||
if (endTime && startTime && this.formModel.permissionType && validator[this.formModel.permissionType]()) {
|
if (endTime && startTime && this.formModel.permissionType && validator[this.formModel.permissionType]()) {
|
||||||
@ -175,10 +175,10 @@ export default {
|
|||||||
if (this.formModel.permissionType == PermissionType.LESSON || this.formModel.permissionType == PermissionType.EXAM) {
|
if (this.formModel.permissionType == PermissionType.LESSON || this.formModel.permissionType == PermissionType.EXAM) {
|
||||||
model['lessonId'] = this.formModel.lessonId;
|
model['lessonId'] = this.formModel.lessonId;
|
||||||
model['mapId'] = this.formModel.mapId;
|
model['mapId'] = this.formModel.mapId;
|
||||||
model['prdCode'] = this.formModel.prdCode;
|
model['prdId'] = this.formModel.prdId;
|
||||||
} else if (this.formModel.permissionType == PermissionType.SIMULATION) {
|
} else if (this.formModel.permissionType == PermissionType.SIMULATION) {
|
||||||
model['mapId'] = this.formModel.mapId;
|
model['mapId'] = this.formModel.mapId;
|
||||||
model['prdCode'] = this.formModel.prdCode;
|
model['prdId'] = this.formModel.prdId;
|
||||||
}
|
}
|
||||||
|
|
||||||
getTotalRemains(model).then(response => {
|
getTotalRemains(model).then(response => {
|
||||||
@ -200,23 +200,23 @@ export default {
|
|||||||
},
|
},
|
||||||
permissionTypeChange() {
|
permissionTypeChange() {
|
||||||
this.formModel.mapId = '';
|
this.formModel.mapId = '';
|
||||||
this.formModel.prdCode = '';
|
this.formModel.prdId = '';
|
||||||
this.formModel.lessonId = '';
|
this.formModel.lessonId = '';
|
||||||
},
|
},
|
||||||
mapChange(mapId) {
|
mapChange(mapId) {
|
||||||
this.formModel.prdCode = '';
|
this.formModel.prdId = '';
|
||||||
this.formModel.lessonId = '';
|
this.formModel.lessonId = '';
|
||||||
this.mapProductList = [];
|
this.mapProductList = [];
|
||||||
getCommodityMapProduct(mapId).then(rest => {
|
getCommodityMapProduct(mapId).then(rest => {
|
||||||
const list = rest.data || [];
|
const list = rest.data || [];
|
||||||
this.mapProductList = list.map(elem => {
|
this.mapProductList = list.map(elem => {
|
||||||
return { value: elem.code, label: elem.name };
|
return { value: elem.id, label: elem.name };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
mapProductChange(prdCode) {
|
mapProductChange(prdId) {
|
||||||
this.formModel.lessonId = '';
|
this.formModel.lessonId = '';
|
||||||
this.filterPublisLessonList = this.publisLessonList.filter(elem => { return elem.mapId == this.formModel.mapId && elem.prdCode == this.formModel.prdCode; });
|
this.filterPublisLessonList = this.publisLessonList.filter(elem => { return elem.mapId == this.formModel.mapId && elem.prdId == this.formModel.prdId; });
|
||||||
},
|
},
|
||||||
// 搜索查询input
|
// 搜索查询input
|
||||||
async querySearchAsync(queryString, cb) {
|
async querySearchAsync(queryString, cb) {
|
||||||
@ -256,7 +256,7 @@ export default {
|
|||||||
permissionType: model.permissionType,
|
permissionType: model.permissionType,
|
||||||
mapId: model.mapId,
|
mapId: model.mapId,
|
||||||
lessonId: model.lessonId,
|
lessonId: model.lessonId,
|
||||||
prdCode: model.prdCode,
|
prdId: model.prdId,
|
||||||
date: [model.startTime, model.endTime],
|
date: [model.startTime, model.endTime],
|
||||||
amount: model.amount,
|
amount: model.amount,
|
||||||
ownerId: this.formModel.ownerId,
|
ownerId: this.formModel.ownerId,
|
||||||
@ -278,7 +278,7 @@ export default {
|
|||||||
permissionType: this.formModel.permissionType,
|
permissionType: this.formModel.permissionType,
|
||||||
mapId: this.isShowMap ? this.formModel.mapId : '',
|
mapId: this.isShowMap ? this.formModel.mapId : '',
|
||||||
lessonId: this.isShowLesson ? this.formModel.lessonId : '',
|
lessonId: this.isShowLesson ? this.formModel.lessonId : '',
|
||||||
prdCode: this.isShowMapProduct ? this.formModel.prdCode : '',
|
prdId: this.isShowMapProduct ? this.formModel.prdId : '',
|
||||||
startTime: this.formModel.date[0],
|
startTime: this.formModel.date[0],
|
||||||
endTime: this.formModel.date[1],
|
endTime: this.formModel.date[1],
|
||||||
amount: this.formModel.amount,
|
amount: this.formModel.amount,
|
||||||
@ -291,7 +291,7 @@ export default {
|
|||||||
permissionType: this.formModel.permissionType,
|
permissionType: this.formModel.permissionType,
|
||||||
mapId: this.isShowMap ? this.formModel.mapId : '',
|
mapId: this.isShowMap ? this.formModel.mapId : '',
|
||||||
lessonId: this.isShowLesson ? this.formModel.lessonId : '',
|
lessonId: this.isShowLesson ? this.formModel.lessonId : '',
|
||||||
prdCode: this.isShowMapProduct ? this.formModel.prdCode : '',
|
prdId: this.isShowMapProduct ? this.formModel.prdId : '',
|
||||||
startTime: this.formModel.date[0],
|
startTime: this.formModel.date[0],
|
||||||
endTime: this.formModel.date[1],
|
endTime: this.formModel.date[1],
|
||||||
amount: this.formModel.amount,
|
amount: this.formModel.amount,
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="100">
|
<el-table-column prop="mapProductCode" :label="$t('permission.mapProductName')" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ computedName(mapProductList, scope.row.prdCode) }}
|
{{ computedName(mapProductList, scope.row.prdId) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="lessonId" :label="$t('permission.lessonName')">
|
<el-table-column prop="lessonId" :label="$t('permission.lessonName')">
|
||||||
@ -171,7 +171,7 @@ export default {
|
|||||||
getPublishLessonList().then(response => {
|
getPublishLessonList().then(response => {
|
||||||
const list = response.data || [];
|
const list = response.data || [];
|
||||||
this.PublisLessonList = list.map(elem => {
|
this.PublisLessonList = list.map(elem => {
|
||||||
return { value: elem.id, label: elem.name, mapId: elem.mapId, prdCode: elem.prdCode };
|
return { value: elem.id, label: elem.name, mapId: elem.mapId, prdId: elem.prdId };
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -194,7 +194,7 @@ export default {
|
|||||||
const index = this.ruleList.findIndex(elem => {
|
const index = this.ruleList.findIndex(elem => {
|
||||||
return item.mapId == elem.mapId &&
|
return item.mapId == elem.mapId &&
|
||||||
item.lessonId == elem.lessonId &&
|
item.lessonId == elem.lessonId &&
|
||||||
item.prdCode == elem.prdCode &&
|
item.prdId == elem.prdId &&
|
||||||
item.permissionType == elem.permissionType;
|
item.permissionType == elem.permissionType;
|
||||||
});
|
});
|
||||||
getCommodityMapProduct(item.mapId).then(rest => {
|
getCommodityMapProduct(item.mapId).then(rest => {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<map-select ref="map" @confirm="handleGenerateEveryDay" />
|
|
||||||
<copy-plan ref="copyPlan" @confirm="handleCopyRunPlan" />
|
<copy-plan ref="copyPlan" @confirm="handleCopyRunPlan" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -11,13 +10,11 @@ import { superAdmin } from '@/router';
|
|||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay, postRunPlanTemplate } from '@/api/runplan';
|
import { runPlanTemplateList, deleteRunPlanTemplate, generateCommonRunPlanEveryDay, postRunPlanTemplate } from '@/api/runplan';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import MapSelect from './mapSelect';
|
|
||||||
import CopyPlan from './copyPlan.vue';
|
import CopyPlan from './copyPlan.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RunPlanTemplate',
|
name: 'RunPlanTemplate',
|
||||||
components: {
|
components: {
|
||||||
MapSelect,
|
|
||||||
CopyPlan
|
CopyPlan
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@ -132,16 +129,16 @@ export default {
|
|||||||
});
|
});
|
||||||
}).catch(() => { });
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
// 选择皮肤关联的地图
|
// 选择地图
|
||||||
handleMapSelect(index, row) {
|
handleMapSelect(index, row) {
|
||||||
this.$refs.map.doShow(row);
|
this.handleGenerateEveryDay(row.id, row.mapId);
|
||||||
},
|
},
|
||||||
// 复制运行图
|
// 复制运行图
|
||||||
handleCopyPlan(index, row) {
|
handleCopyPlan(index, row) {
|
||||||
this.$refs.copyPlan.doShow(row);
|
this.$refs.copyPlan.doShow(row);
|
||||||
},
|
},
|
||||||
// 生成每日运行图
|
// 生成每日运行图
|
||||||
handleGenerateEveryDay({planId, mapId}) {
|
handleGenerateEveryDay(planId, mapId) {
|
||||||
this.$confirm(this.$t('publish.wellGenerateEveryRunPlan'), this.$t('global.tips'), {
|
this.$confirm(this.$t('publish.wellGenerateEveryRunPlan'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
@ -149,7 +146,6 @@ export default {
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
generateCommonRunPlanEveryDay(planId, {mapId}).then(response => {
|
generateCommonRunPlanEveryDay(planId, {mapId}).then(response => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$refs.map.doClose();
|
|
||||||
this.$message.success(this.$t('publish.createCommonSuccess'));
|
this.$message.success(this.$t('publish.createCommonSuccess'));
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
|
@ -1,69 +0,0 @@
|
|||||||
<template>
|
|
||||||
<el-dialog v-dialogDrag :title="title" :visible.sync="show" width="30%" :before-close="doClose">
|
|
||||||
<el-form ref="form" :model="formMdoel" :rules="rules" label-width="140px">
|
|
||||||
<el-form-item :label="$t('publish.selectMap')" prop="mapId">
|
|
||||||
<el-select v-model="formMdoel.mapId">
|
|
||||||
<el-option
|
|
||||||
v-for="item in mapList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<span slot="footer" class="dialog-footer">
|
|
||||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
|
||||||
<el-button type="primary" @click="handleCofirm">{{ $t('global.confirm') }}</el-button>
|
|
||||||
</span>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { getPublishMapListByLineCode } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
show: false,
|
|
||||||
mapList: [],
|
|
||||||
formMdoel: {
|
|
||||||
planId: 0,
|
|
||||||
mapId: ''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
title() {
|
|
||||||
return this.$t('publish.selectMap');
|
|
||||||
},
|
|
||||||
rules() {
|
|
||||||
return {
|
|
||||||
mapId: [
|
|
||||||
{ required: true, message: this.$t('rules.mapInput'), trigger: 'blur' }
|
|
||||||
]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
doShow(row) {
|
|
||||||
this.formMdoel.planId = row.id;
|
|
||||||
this.formMdoel.mapId = '';
|
|
||||||
this.show = true;
|
|
||||||
getPublishMapListByLineCode(row.skinCode).then(resp => {
|
|
||||||
this.mapList = resp.data;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
doClose(done) {
|
|
||||||
this.show = false;
|
|
||||||
},
|
|
||||||
handleCofirm() {
|
|
||||||
this.$refs['form'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.$emit('confirm', this.formMdoel);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
@ -16,13 +16,6 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
|
||||||
:label="$t('map.productCode') + ':'"
|
|
||||||
prop="code"
|
|
||||||
:rules="node && node.data.type ==='Map' ? baseRules.code:{}"
|
|
||||||
>
|
|
||||||
<el-input v-model="addModel.code" :disabled="codeDisabled" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item :label="$t('map.productName') + ':'" prop="name" :rules="baseRules.name">
|
<el-form-item :label="$t('map.productName') + ':'" prop="name" :rules="baseRules.name">
|
||||||
<el-input v-model="addModel.name" />
|
<el-input v-model="addModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -79,7 +72,6 @@ export default {
|
|||||||
skinCode: '',
|
skinCode: '',
|
||||||
name: '',
|
name: '',
|
||||||
remarks: '',
|
remarks: '',
|
||||||
code: '',
|
|
||||||
prdType: '01',
|
prdType: '01',
|
||||||
trainTypes: []
|
trainTypes: []
|
||||||
}
|
}
|
||||||
@ -111,9 +103,6 @@ export default {
|
|||||||
},
|
},
|
||||||
baseRules() {
|
baseRules() {
|
||||||
return {
|
return {
|
||||||
code: [
|
|
||||||
{ required: true, message: this.$t('rules.productCodeEnter'), trigger: 'change' }
|
|
||||||
],
|
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: this.$t('rules.productNameEnter'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.productNameEnter'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
@ -161,7 +150,6 @@ export default {
|
|||||||
this.addModel.name = response.data.name;
|
this.addModel.name = response.data.name;
|
||||||
this.addModel.remarks = response.data.remarks;
|
this.addModel.remarks = response.data.remarks;
|
||||||
this.addModel.prdType = response.data.prdType;
|
this.addModel.prdType = response.data.prdType;
|
||||||
this.addModel.code = response.data.code;
|
|
||||||
this.addModel.skinCode = response.data.skinCode;
|
this.addModel.skinCode = response.data.skinCode;
|
||||||
this.addModel.trainTypes = this.initTrainTypes = response.data.trainTypes;
|
this.addModel.trainTypes = this.initTrainTypes = response.data.trainTypes;
|
||||||
this.addModel.id = response.data.id;
|
this.addModel.id = response.data.id;
|
||||||
@ -191,11 +179,8 @@ export default {
|
|||||||
name: this.addModel.name,
|
name: this.addModel.name,
|
||||||
remarks: this.addModel.remarks,
|
remarks: this.addModel.remarks,
|
||||||
prdType: this.addModel.prdType,
|
prdType: this.addModel.prdType,
|
||||||
code: this.addModel.code,
|
|
||||||
trainTypes: this.isShowTrainTypes ? this.addModel.trainTypes : []
|
trainTypes: this.isShowTrainTypes ? this.addModel.trainTypes : []
|
||||||
};
|
};
|
||||||
checkMapProductCodeExist({ code: this.addModel.code }).then(response => {
|
|
||||||
if (!response.data) {
|
|
||||||
createTrainingCategory(data).then(response => {
|
createTrainingCategory(data).then(response => {
|
||||||
this.initTrainTypes = this.addModel.trainTypes;
|
this.initTrainTypes = this.addModel.trainTypes;
|
||||||
this.$emit('refresh');
|
this.$emit('refresh');
|
||||||
@ -203,12 +188,6 @@ export default {
|
|||||||
}).catch((error) => {
|
}).catch((error) => {
|
||||||
this.$message.error(`${this.$t('tip.productCreationFailed')}, ${error.message}`);
|
this.$message.error(`${this.$t('tip.productCreationFailed')}, ${error.message}`);
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
this.$message(this.$t('tip.productCodeExists'));
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.$message(this.$t('tip.productCodeExists'));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -34,7 +34,7 @@ export default {
|
|||||||
formModel:{
|
formModel:{
|
||||||
mapId:'',
|
mapId:'',
|
||||||
name: '',
|
name: '',
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
type: '',
|
type: '',
|
||||||
id:null
|
id:null
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ export default {
|
|||||||
items: [
|
items: [
|
||||||
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true, options: this.projectList},
|
{ prop: 'customized', label: this.$t('systemGenerate.customized'), type: 'select', required: true, options: this.projectList},
|
||||||
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList, change:true, onChange:this.changeMap},
|
{ prop: 'mapId', label: this.$t('systemGenerate.mapName'), type: 'select', required: true, options: this.mapList, change:true, onChange:this.changeMap},
|
||||||
{ prop: 'prdCode', label: this.$t('systemGenerate.prdName'), type: 'select', required: true, options:this.productList},
|
{ prop: 'prdId', label: this.$t('systemGenerate.prdName'), type: 'select', required: true, options:this.productList},
|
||||||
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},
|
{ prop: 'name', label: this.$t('systemGenerate.name'), type: 'text', required: true},
|
||||||
{ prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true, options: this.typeList}
|
{ prop: 'type', label: this.$t('systemGenerate.type'), type: 'select', required: true, options: this.typeList}
|
||||||
]
|
]
|
||||||
@ -80,7 +80,7 @@ export default {
|
|||||||
type:[
|
type:[
|
||||||
{ required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'}
|
{ required: true, message: this.$t('systemGenerate.selectType'), trigger: 'change'}
|
||||||
],
|
],
|
||||||
prdCode:[
|
prdId:[
|
||||||
{ required: true, message: this.$t('systemGenerate.selectPrdName'), trigger: 'change'}
|
{ required: true, message: this.$t('systemGenerate.selectPrdName'), trigger: 'change'}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -109,8 +109,8 @@ export default {
|
|||||||
changeMap(index) {
|
changeMap(index) {
|
||||||
this.productList = [];
|
this.productList = [];
|
||||||
getCommodityMapProduct(index).then((response) => {
|
getCommodityMapProduct(index).then((response) => {
|
||||||
this.productList = response.data.map(elem => { return { value: elem.code, label: elem.name }; });
|
this.productList = response.data.map(elem => { return { value: elem.id, label: elem.name }; });
|
||||||
this.formModel.prdCode = '';
|
this.formModel.prdId = '';
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
doShow(data) {
|
doShow(data) {
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
<el-form-item :label="this.$t('lesson.trainingName')+':'" prop="name">
|
<el-form-item :label="this.$t('lesson.trainingName')+':'" prop="name">
|
||||||
<el-input v-model="operateModel.name" />
|
<el-input v-model="operateModel.name" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="this.$t('lesson.productType')" prop="prdCode">
|
<el-form-item :label="this.$t('lesson.productType')" prop="prdId">
|
||||||
<el-select v-model="operateModel.prdCode" placeholder="" :disabled="true">
|
<el-select v-model="operateModel.prdId" placeholder="" :disabled="true">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in productTypesList"
|
v-for="option in productTypesList"
|
||||||
:key="option.code"
|
:key="option.code"
|
||||||
@ -111,7 +111,7 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
type: '',
|
type: '',
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
skinCode: '',
|
skinCode: '',
|
||||||
operateType: '',
|
operateType: '',
|
||||||
maxDuration: 0,
|
maxDuration: 0,
|
||||||
@ -179,7 +179,7 @@ export default {
|
|||||||
case 'TrainingType':
|
case 'TrainingType':
|
||||||
if (node.parent) {
|
if (node.parent) {
|
||||||
this.operateModel.type = node.data.id;
|
this.operateModel.type = node.data.id;
|
||||||
this.operateModel.prdCode = node.parent.data.id;
|
this.operateModel.prdId = node.parent.data.id;
|
||||||
this.operateModel.skinCode = node.parent.parent.data.id;
|
this.operateModel.skinCode = node.parent.parent.data.id;
|
||||||
this.productTypesList = [{
|
this.productTypesList = [{
|
||||||
code: node.parent.data.id,
|
code: node.parent.data.id,
|
||||||
@ -199,7 +199,7 @@ export default {
|
|||||||
case 'Training':
|
case 'Training':
|
||||||
if (node.parent && node.parent.parent) {
|
if (node.parent && node.parent.parent) {
|
||||||
this.operateModel.type = node.parent.data.id;
|
this.operateModel.type = node.parent.data.id;
|
||||||
this.operateModel.prdCode = node.parent.parent.data.id;
|
this.operateModel.prdId = node.parent.parent.data.id;
|
||||||
this.operateModel.skinCode = node.parent.parent.parent.data.id;
|
this.operateModel.skinCode = node.parent.parent.parent.data.id;
|
||||||
this.operationList = this.trainingOperateTypeMap[node.parent.data.id] || [];
|
this.operationList = this.trainingOperateTypeMap[node.parent.data.id] || [];
|
||||||
this.productTypesList = [{
|
this.productTypesList = [{
|
||||||
@ -246,7 +246,7 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
type: '',
|
type: '',
|
||||||
prdCode: '',
|
prdId: '',
|
||||||
skinCode: '',
|
skinCode: '',
|
||||||
operateType: '',
|
operateType: '',
|
||||||
maxDuration: 0,
|
maxDuration: 0,
|
||||||
@ -261,7 +261,7 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
name: this.operateModel.name,
|
name: this.operateModel.name,
|
||||||
type: this.operateModel.type,
|
type: this.operateModel.type,
|
||||||
prdCode: this.operateModel.prdCode,
|
prdId: this.operateModel.prdId,
|
||||||
skinCode: this.operateModel.skinCode,
|
skinCode: this.operateModel.skinCode,
|
||||||
operateType: this.operateModel.operateType,
|
operateType: this.operateModel.operateType,
|
||||||
minDuration: this.operateModel.minDuration,
|
minDuration: this.operateModel.minDuration,
|
||||||
@ -285,7 +285,7 @@ export default {
|
|||||||
id: this.operateModel.id,
|
id: this.operateModel.id,
|
||||||
name: this.operateModel.name,
|
name: this.operateModel.name,
|
||||||
type: this.operateModel.type,
|
type: this.operateModel.type,
|
||||||
prdCode: this.operateModel.prdCode,
|
prdId: this.operateModel.prdId,
|
||||||
skinCode: this.operateModel.skinCode,
|
skinCode: this.operateModel.skinCode,
|
||||||
operateType: this.operateModel.operateType,
|
operateType: this.operateModel.operateType,
|
||||||
minDuration: this.operateModel.minDuration,
|
minDuration: this.operateModel.minDuration,
|
||||||
|
@ -94,7 +94,7 @@ export default {
|
|||||||
// 设置实训数据
|
// 设置实训数据
|
||||||
getTrainingDetail(this.trainingId).then(resp => {
|
getTrainingDetail(this.trainingId).then(resp => {
|
||||||
const detail = resp.data;
|
const detail = resp.data;
|
||||||
getProductDetail(detail.prdCode).then(rest => {
|
getProductDetail(detail.prdId).then(rest => {
|
||||||
const data = rest.data;
|
const data = rest.data;
|
||||||
debugger;
|
debugger;
|
||||||
loadMapData(detail.skinCode).then(() => {
|
loadMapData(detail.skinCode).then(() => {
|
||||||
|
@ -27,7 +27,7 @@ export default {
|
|||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
mapId: '',
|
mapId: '',
|
||||||
mapPrdCode: '',
|
mapPrdId: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
duration: ''
|
duration: ''
|
||||||
@ -44,7 +44,7 @@ export default {
|
|||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'mapId', label: this.$t('system.mapName'), type: 'select', required: true, options: this.LessonList, change: true, onChange: this.mapChange, placeholder: this.$t('rules.mapInput') },
|
{ prop: 'mapId', label: this.$t('system.mapName'), type: 'select', required: true, options: this.LessonList, change: true, onChange: this.mapChange, placeholder: this.$t('rules.mapInput') },
|
||||||
{ prop: 'mapPrdCode', label: this.$t('system.productName'), type: 'select', required: true, options: this.mapPrdList, placeholder: this.$t('rules.productInput') },
|
{ prop: 'mapPrdId', label: this.$t('system.productName'), type: 'select', required: true, options: this.mapPrdList, placeholder: this.$t('rules.productInput') },
|
||||||
{ prop: 'userName', label: this.$t('system.userName'), type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: this.$t('system.pleaseInputNames') },
|
{ prop: 'userName', label: this.$t('system.userName'), type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: this.$t('system.pleaseInputNames') },
|
||||||
{ prop: 'duration', label: this.$t('system.trainingUseTime'), type: 'text', rightWidth: true, required: true, message: 's' }
|
{ prop: 'duration', label: this.$t('system.trainingUseTime'), type: 'text', rightWidth: true, required: true, message: 's' }
|
||||||
]
|
]
|
||||||
@ -59,7 +59,7 @@ export default {
|
|||||||
userName: [
|
userName: [
|
||||||
{ required: true, message: this.$t('rules.chooseUser'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.chooseUser'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
mapPrdCode: [
|
mapPrdId: [
|
||||||
{ required: true, message: this.$t('rules.productInput'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.productInput'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
duration: [
|
duration: [
|
||||||
@ -125,13 +125,13 @@ export default {
|
|||||||
},
|
},
|
||||||
async mapChange(val) {
|
async mapChange(val) {
|
||||||
this.mapPrdList = [];
|
this.mapPrdList = [];
|
||||||
this.formModel.mapPrdCode = '';
|
this.formModel.mapPrdId = '';
|
||||||
try {
|
try {
|
||||||
const res = await getCommodityMapProduct(val);
|
const res = await getCommodityMapProduct(val);
|
||||||
const data = res.data;
|
const data = res.data;
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
data.forEach(elem => {
|
data.forEach(elem => {
|
||||||
this.mapPrdList.push({ value: elem.code, label: elem.name });
|
this.mapPrdList.push({ value: elem.id, label: elem.name });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -151,7 +151,7 @@ export default {
|
|||||||
const self = this;
|
const self = this;
|
||||||
const params = {
|
const params = {
|
||||||
mapId: this.formModel.mapId,
|
mapId: this.formModel.mapId,
|
||||||
mapPrdCode: this.formModel.mapPrdCode,
|
mapPrdId: this.formModel.mapPrdId,
|
||||||
userId: this.formModel.userId,
|
userId: this.formModel.userId,
|
||||||
duration: parseInt(this.formModel.duration)
|
duration: parseInt(this.formModel.duration)
|
||||||
};
|
};
|
||||||
@ -170,7 +170,7 @@ export default {
|
|||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
mapId: '',
|
mapId: '',
|
||||||
mapPrdCode: '',
|
mapPrdId: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
duration: ''
|
duration: ''
|
||||||
|
@ -109,7 +109,7 @@ export default {
|
|||||||
const data = response.data;
|
const data = response.data;
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
data.forEach(elem => {
|
data.forEach(elem => {
|
||||||
this.LessonList.push({ value: elem.prdCode, name: elem.name });
|
this.LessonList.push({ value: elem.prdId, name: elem.name });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -104,7 +104,7 @@ export default {
|
|||||||
name: response.data.tree[0].name,
|
name: response.data.tree[0].name,
|
||||||
pmsList: response.data.permissionList || [],
|
pmsList: response.data.permissionList || [],
|
||||||
treeList: response.data.tree,
|
treeList: response.data.tree,
|
||||||
prdCode: this.$route.query.prdCode,
|
prdId: this.$route.query.prdId,
|
||||||
mapId: this.$route.query.mapId,
|
mapId: this.$route.query.mapId,
|
||||||
PermissionType: PermissionType.LESSON
|
PermissionType: PermissionType.LESSON
|
||||||
};
|
};
|
||||||
@ -159,7 +159,7 @@ export default {
|
|||||||
buy() {
|
buy() {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
|
path: `${UrlConfig.trainingPlatform.pay}/${this.courseModel.id}`, query:
|
||||||
{ permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdCode: this.$route.query.prdCode, mapId: this.$route.query.mapId, subSystem: this.$route.params.subSystem }
|
{ permissionType: PermissionType.LESSON, lessonId: this.courseModel.id, prdId: this.$route.query.prdId, mapId: this.$route.query.mapId, subSystem: this.$route.params.subSystem }
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
nodeExpand(obj, node, ele) {
|
nodeExpand(obj, node, ele) {
|
||||||
|
@ -57,8 +57,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
goLesson(row) {
|
goLesson(row) {
|
||||||
localStore.set('teachDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}?lessonId=${row.id}&mapId=${row.mapId}&prdCode=${row.prdCode}`);
|
localStore.set('teachDetail' + this.$route.params.subSystem, `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}?lessonId=${row.id}&mapId=${row.mapId}&prdId=${row.prdId}`);
|
||||||
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdCode: row.prdCode}});
|
this.$router.push({ path: `${UrlConfig.trainingPlatform.teachDetail}/${this.$route.params.subSystem}`, query: {lessonId: row.id, mapId: row.mapId, prdId: row.prdId}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -622,7 +622,7 @@ export default {
|
|||||||
|
|
||||||
this.starting = res.data.state == '02';
|
this.starting = res.data.state == '02';
|
||||||
this.mapId = res.data.mapId;
|
this.mapId = res.data.mapId;
|
||||||
this.prodId = res.data.mapPrdCode;
|
this.prodId = res.data.mapPrdId;
|
||||||
this.roomInfo = {
|
this.roomInfo = {
|
||||||
creatorId: res.data.creatorId,
|
creatorId: res.data.creatorId,
|
||||||
totalNum: Number(res.data.permissionNum) + Number(res.data.audiencePermissionNum),
|
totalNum: Number(res.data.permissionNum) + Number(res.data.audiencePermissionNum),
|
||||||
|
Loading…
Reference in New Issue
Block a user