Merge branch 'master' of https://git.qcloud.com/joylink/jl-nclient
This commit is contained in:
commit
01b871fa77
@ -165,8 +165,8 @@ export default {
|
|||||||
},
|
},
|
||||||
beforeQuery: {
|
beforeQuery: {
|
||||||
type: Function,
|
type: Function,
|
||||||
default() {
|
default(val) {
|
||||||
return () => {};
|
return val;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
canQuery: {
|
canQuery: {
|
||||||
@ -447,12 +447,12 @@ export default {
|
|||||||
}
|
}
|
||||||
// 对所有的数据进行trim操作
|
// 对所有的数据进行trim操作
|
||||||
for (const item in resultData) {
|
for (const item in resultData) {
|
||||||
if (resultData[item].trim) {
|
if (resultData[item] && resultData[item].trim) {
|
||||||
resultData[item] = resultData[item].trim();
|
resultData[item] = resultData[item].trim();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 查询前数据处理
|
// 查询前数据处理
|
||||||
resultData = this.beforeQuery ? this.beforeQuery(resultData) : resultData;
|
resultData = this.beforeQuery(resultData);
|
||||||
return resultData;
|
return resultData;
|
||||||
},
|
},
|
||||||
query() {
|
query() {
|
||||||
|
@ -44,6 +44,17 @@
|
|||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
:sortable="column.sortable"
|
:sortable="column.sortable"
|
||||||
/>
|
/>
|
||||||
|
<el-table-column
|
||||||
|
v-else-if="checkColumnTyep(column, 'basicText')"
|
||||||
|
:key="index"
|
||||||
|
:label="column.title"
|
||||||
|
:width="column.width"
|
||||||
|
:sortable="column.sortable"
|
||||||
|
>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span class="hideOutContent">{{ column.columnValue(scope.row, scope.$index) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
v-else-if="checkColumnTyep(column, 'tag')"
|
v-else-if="checkColumnTyep(column, 'tag')"
|
||||||
:key="index"
|
:key="index"
|
||||||
|
@ -406,20 +406,6 @@ class SkinStyle extends defaultStyle {
|
|||||||
this[deviceType.Train] = {
|
this[deviceType.Train] = {
|
||||||
trainBody: {
|
trainBody: {
|
||||||
trainBodyLineWidth: 0.1, // 车身line宽
|
trainBodyLineWidth: 0.1, // 车身line宽
|
||||||
trainBodyOnMouseOver: {
|
|
||||||
train: true,
|
|
||||||
textTrainNumber: false,
|
|
||||||
textTrainServer: false,
|
|
||||||
textTrainTarget: false,
|
|
||||||
textTrainTargetNumber: false
|
|
||||||
}, // 车身鼠标悬浮事件
|
|
||||||
trainBodyOnMouseOut: {
|
|
||||||
train: true,
|
|
||||||
textTrainNumber: false,
|
|
||||||
textTrainServer: false,
|
|
||||||
textTrainTarget: false,
|
|
||||||
textTrainTargetNumber: false
|
|
||||||
}, // 车身鼠标移出事件
|
|
||||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||||
specialTrainType: [], // 特殊列车类型需设置显示格式
|
specialTrainType: [], // 特殊列车类型需设置显示格式
|
||||||
lrPadding: 4, // 两边间隔
|
lrPadding: 4, // 两边间隔
|
||||||
|
@ -368,20 +368,6 @@ class SkinStyle extends defaultStyle {
|
|||||||
this[deviceType.Train] = {
|
this[deviceType.Train] = {
|
||||||
trainBody: {
|
trainBody: {
|
||||||
trainBodyLineWidth: 1, // 车身line宽
|
trainBodyLineWidth: 1, // 车身line宽
|
||||||
trainBodyOnMouseOver: {
|
|
||||||
train: true,
|
|
||||||
textTrainNumber: false,
|
|
||||||
textTrainServer: false,
|
|
||||||
textTrainTarget: false,
|
|
||||||
textTrainTargetNumber: false
|
|
||||||
}, // 车身鼠标悬浮事件
|
|
||||||
trainBodyOnMouseOut: {
|
|
||||||
train: true,
|
|
||||||
textTrainNumber: false,
|
|
||||||
textTrainServer: false,
|
|
||||||
textTrainTarget: false,
|
|
||||||
textTrainTargetNumber: false
|
|
||||||
}, // 车身鼠标移出事件
|
|
||||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||||
specialTrainType: [], // 特殊列车类型需设置显示格式
|
specialTrainType: [], // 特殊列车类型需设置显示格式
|
||||||
lrPadding: 4, // 两边间隔
|
lrPadding: 4, // 两边间隔
|
||||||
@ -440,12 +426,11 @@ class SkinStyle extends defaultStyle {
|
|||||||
},
|
},
|
||||||
trainStatusStyle: {
|
trainStatusStyle: {
|
||||||
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
defaultDestinationColor: '#FFFFFF', // 默认目的地状态显示颜色
|
||||||
destinationStatusSetText: 'trainTarget', // 目的地状态设置的对应哪个text的颜色
|
destinationStatusSetText: 'trainWindowBorder', // 目的地状态设置的对应哪个颜色
|
||||||
destinationStatus: [
|
destinationStatus: [
|
||||||
{status: '01', showColor: '#FFFFFF'},
|
{status: '01', showColor: '#FFFFFF'},
|
||||||
{status: '02', showColor: '#00FF00'},
|
{status: '02', showColor: '#00FF00'},
|
||||||
{status: '03', showColor: '#A0522D'},
|
{status: '03', showColor: '#A0522D'}
|
||||||
{status: '04', showColor: '#FFFF00'}
|
|
||||||
], // 目的地状态 01准点 02早点 03晚点 04头码车
|
], // 目的地状态 01准点 02早点 03晚点 04头码车
|
||||||
serverNoType: [
|
serverNoType: [
|
||||||
{type: '01', showColor: '#FFFFFF'},
|
{type: '01', showColor: '#FFFFFF'},
|
||||||
@ -494,13 +479,13 @@ class SkinStyle extends defaultStyle {
|
|||||||
runModeStatus: [
|
runModeStatus: [
|
||||||
{
|
{
|
||||||
status: '01',
|
status: '01',
|
||||||
trainLColor: '#FFFFFF',
|
trainLColor: '#00FF00',
|
||||||
trainRColor: '#FFFFFF'
|
trainRColor: '#00FF00'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: '02',
|
status: '02',
|
||||||
trainLColor: '#00FF00',
|
trainLColor: '#FF8000',
|
||||||
trainRColor: '#00FF00'
|
trainRColor: '#FF8000'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status: '03',
|
status: '03',
|
||||||
|
@ -365,20 +365,6 @@ class SkinStyle extends defaultStyle {
|
|||||||
this[deviceType.Train] = {
|
this[deviceType.Train] = {
|
||||||
trainBody: {
|
trainBody: {
|
||||||
trainBodyLineWidth: 1, // 车身line宽
|
trainBodyLineWidth: 1, // 车身line宽
|
||||||
trainBodyOnMouseOver: {
|
|
||||||
train: true,
|
|
||||||
textTrainNumber: false,
|
|
||||||
textTrainServer: false,
|
|
||||||
textTrainTarget: false,
|
|
||||||
textTrainTargetNumber: false
|
|
||||||
}, // 车身鼠标悬浮事件
|
|
||||||
trainBodyOnMouseOut: {
|
|
||||||
train: true,
|
|
||||||
textTrainNumber: false,
|
|
||||||
textTrainServer: false,
|
|
||||||
textTrainTarget: false,
|
|
||||||
textTrainTargetNumber: false
|
|
||||||
}, // 车身鼠标移出事件
|
|
||||||
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
changeTrainWidth: false, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||||
specialTrainType: [], // 特殊列车类型需设置显示格式
|
specialTrainType: [], // 特殊列车类型需设置显示格式
|
||||||
lrPadding: 4, // 两边间隔
|
lrPadding: 4, // 两边间隔
|
||||||
|
@ -314,20 +314,6 @@ class SkinStyle extends defaultStyle {
|
|||||||
this[deviceType.Train] = {
|
this[deviceType.Train] = {
|
||||||
trainBody: {
|
trainBody: {
|
||||||
trainBodyLineWidth: 0, // 车身line宽
|
trainBodyLineWidth: 0, // 车身line宽
|
||||||
trainBodyOnMouseOver: {
|
|
||||||
train: true,
|
|
||||||
textTrainNumber: false,
|
|
||||||
textTrainServer: false,
|
|
||||||
textTrainTarget: false,
|
|
||||||
textTrainTargetNumber: false
|
|
||||||
}, // 车身鼠标悬浮事件
|
|
||||||
trainBodyOnMouseOut: {
|
|
||||||
train: true,
|
|
||||||
textTrainNumber: false,
|
|
||||||
textTrainServer: false,
|
|
||||||
textTrainTarget: false,
|
|
||||||
textTrainTargetNumber: false
|
|
||||||
}, // 车身鼠标移出事件
|
|
||||||
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||||
specialTrainType: [
|
specialTrainType: [
|
||||||
{
|
{
|
||||||
|
@ -402,6 +402,11 @@ class Jlmap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 设置地图位置
|
||||||
|
setPosition(payload) {
|
||||||
|
this.$options && this.$options.update(payload);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Jlmap;
|
export default Jlmap;
|
||||||
|
@ -24,7 +24,7 @@ class EMouse extends Group {
|
|||||||
style: {
|
style: {
|
||||||
x: this.device.model.point.x + 50,
|
x: this.device.model.point.x + 50,
|
||||||
y: this.device.model.point.y + 25,
|
y: this.device.model.point.y + 25,
|
||||||
text: `列车类型: 计划车\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.trackName : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`,
|
text: `列车类型: 计划车\n表\0\0\0\0号: ${this.device.model.serviceNumber}\n车\0次\0号: ${this.device.model.tripNumber}\n目的地号: ${this.device.model.targetCode ? this.device.model.targetCode : ''}\n车\0组\0号: ${this.device.model.groupNumber}\n早\0晚\0点: ${destinationText}\n运行方向: ${this.device.model.directionType == '02' ? '上行' : '下行'}\n乘务组号: \n起点站名: \n终点站名: \n占用轨道: ${this.device.model.sectionModel ? this.device.model.sectionModel.name : ''}\n所在车站: \n车地通信: 正常\n运行等级: 4\n扣车状态: ${this.device.model.runControlStatus == '01' ? '正常' : this.device.model.runControlStatus == '03' ? '跳停' : '扣车'}\n停稳状态: ${this.device.model.runStatus == '02' ? '未停稳' : '停稳'}\n阻塞状态: 无\n列车速度: ${this.device.model.speed || 0} km/h\n列车移动授权距离: ${this.device.model.maLen || 0} m`,
|
||||||
textFill: '#000',
|
textFill: '#000',
|
||||||
textAlign: 'letf',
|
textAlign: 'letf',
|
||||||
textFont: 10 + 'px consolas',
|
textFont: 10 + 'px consolas',
|
||||||
|
@ -39,18 +39,8 @@ export default class TrainBody extends Group {
|
|||||||
this.trainBodyBox = new TrainBodyBox({
|
this.trainBodyBox = new TrainBodyBox({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z,
|
z: model.z,
|
||||||
shape: {
|
point: model.point,
|
||||||
x: model.point.x,
|
style: style
|
||||||
y: model.point.y,
|
|
||||||
width: style.Train.common.trainWidth,
|
|
||||||
height: style.Train.common.trainHeight
|
|
||||||
},
|
|
||||||
style: {
|
|
||||||
lineWidth: style.Train.trainBody.trainBodyLineWidth,
|
|
||||||
stroke: style.trainSidelineColor,
|
|
||||||
fill: style.Train.trainBody.trainBodyFillColor
|
|
||||||
},
|
|
||||||
cursor: 'pointer'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const beginX = (model.point.x + style.Train.trainBody.lrPadding);
|
const beginX = (model.point.x + style.Train.trainBody.lrPadding);
|
||||||
@ -220,6 +210,9 @@ export default class TrainBody extends Group {
|
|||||||
isShow ? this.textA.show() : this.textA.hide();
|
isShow ? this.textA.show() : this.textA.hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
setBodyBoxShape(key, color) {
|
||||||
|
this.trainBodyBox && this.trainBodyBox.setColor(key, color);
|
||||||
|
}
|
||||||
formatChangePosition(model, style) {
|
formatChangePosition(model, style) {
|
||||||
if (style.Train.trainBody.trainNameFormat) {
|
if (style.Train.trainBody.trainNameFormat) {
|
||||||
const arr = style.Train.trainBody.trainNameFormat.split(':');
|
const arr = style.Train.trainBody.trainNameFormat.split(':');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Group from 'zrender/src/container/Group';
|
import Group from 'zrender/src/container/Group';
|
||||||
import Rect from 'zrender/src/graphic/shape/Rect';
|
import Rect from 'zrender/src/graphic/shape/Rect';
|
||||||
|
|
||||||
export default class Train extends Group {
|
export default class TrainBodyBox extends Group {
|
||||||
constructor(model) {
|
constructor(model) {
|
||||||
super();
|
super();
|
||||||
this.model = model;
|
this.model = model;
|
||||||
@ -9,16 +9,23 @@ export default class Train extends Group {
|
|||||||
}
|
}
|
||||||
create() {
|
create() {
|
||||||
const model = this.model;
|
const model = this.model;
|
||||||
this.train = new Rect({
|
this.trainBodyBox = new Rect({
|
||||||
zlevel: model.zlevel,
|
zlevel: model.zlevel,
|
||||||
z: model.z,
|
z: model.z,
|
||||||
shape: model.shape,
|
shape: {
|
||||||
style: model.style,
|
x: model.point.x,
|
||||||
cursor: model.cursor,
|
y: model.point.y,
|
||||||
onmouseover: model.onmouseover,
|
width: model.style.Train.common.trainWidth,
|
||||||
onmouseout: model.onmouseout
|
height: model.style.Train.common.trainHeight
|
||||||
|
},
|
||||||
|
style: {
|
||||||
|
lineWidth: model.style.Train.trainBody.trainBodyLineWidth,
|
||||||
|
stroke: model.style.trainSidelineColor,
|
||||||
|
fill: model.style.Train.trainBody.trainBodyFillColor
|
||||||
|
},
|
||||||
|
cursor: 'pointer'
|
||||||
});
|
});
|
||||||
this.add(this.train);
|
this.add(this.trainBodyBox);
|
||||||
}
|
}
|
||||||
setColor(key, color) {
|
setColor(key, color) {
|
||||||
this.train.setStyle(key, color);
|
this.train.setStyle(key, color);
|
||||||
|
@ -58,9 +58,4 @@ export default class TrainHead extends Group {
|
|||||||
setArrowShow(isShow) {
|
setArrowShow(isShow) {
|
||||||
isShow ? this.arrow.show() : this.arrow.hide();
|
isShow ? this.arrow.show() : this.arrow.hide();
|
||||||
}
|
}
|
||||||
setInvisible(invisible) {
|
|
||||||
this.eachChild((child) => {
|
|
||||||
child.attr('invisible', invisible);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -107,10 +107,6 @@ export default class Train extends Group {
|
|||||||
|
|
||||||
// 获取设备提示坐标
|
// 获取设备提示坐标
|
||||||
getShapeTipPoint() {
|
getShapeTipPoint() {
|
||||||
return {
|
|
||||||
x: (this.train.shape.x),
|
|
||||||
y: (this.train.shape.y)
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 恢复颜色状态
|
// 恢复颜色状态
|
||||||
@ -152,6 +148,9 @@ export default class Train extends Group {
|
|||||||
case 'trainServer':
|
case 'trainServer':
|
||||||
this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
|
this.trainB && this.trainB.setTextTrainServerColor(item.showColor);
|
||||||
break;
|
break;
|
||||||
|
case 'trainWindowBorder':
|
||||||
|
this.trainB && this.trainB.setBodyBoxShape('stroke', item.showColor);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
|
this.trainB && this.trainB.setTextTrainTargetColor(item.showColor);
|
||||||
}
|
}
|
||||||
@ -166,6 +165,9 @@ export default class Train extends Group {
|
|||||||
case 'trainServer':
|
case 'trainServer':
|
||||||
this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
|
this.trainB && this.trainB.setTextTrainServerColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
|
||||||
break;
|
break;
|
||||||
|
case 'trainWindowBorder':
|
||||||
|
this.trainB && this.trainB.setBodyBoxShape('stroke', this.style.Train.trainStatusStyle.defaultDestinationColor);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
|
this.trainB && this.trainB.setTextTrainTargetColor(this.style.Train.trainStatusStyle.defaultDestinationColor);
|
||||||
}
|
}
|
||||||
|
@ -563,7 +563,6 @@ export function trainMenuFiltration(menuObj) {
|
|||||||
export function mouseCancelState(selected) {
|
export function mouseCancelState(selected) {
|
||||||
const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
|
const device = Vue.prototype.$jlmap.getDeviceByCode(selected.code);
|
||||||
const instance = (device || {}).instance;
|
const instance = (device || {}).instance;
|
||||||
debugger;
|
|
||||||
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
if (instance && instance.mouseEvent && instance.mouseEvent.mouseout) {
|
||||||
device['down'] = false;
|
device['down'] = false;
|
||||||
instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
|
instance.mouseEvent.mouseout(Vue.prototype.$jlmap.$zr.curEvent);
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" class="beijing-01__schedule choose-plan-template" :visible.sync="dialogShow" width="80%"
|
<el-dialog
|
||||||
:before-close="doClose" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
:title="title"
|
||||||
</QueryListPage>
|
class="beijing-01__schedule choose-plan-template"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="80%"
|
||||||
|
:before-close="doClose"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-button type="primary" @click="handleConfirm" :loading="loading">选 择</el-button>
|
<el-button type="primary" :loading="loading" @click="handleConfirm">选 择</el-button>
|
||||||
<el-button @click="dialogShow = false">取 消</el-button>
|
<el-button @click="dialogShow = false">取 消</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin'
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChooseTemplatePlan',
|
name: 'ChooseTemplatePlan',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -50,19 +57,19 @@
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '选择模板运行图'
|
return '选择模板运行图';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -70,7 +77,7 @@
|
|||||||
this.skinStyleList = [];
|
this.skinStyleList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
this.skinStyleList = response.data;
|
this.skinStyleList = response.data;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -87,10 +94,10 @@
|
|||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
convertField(fieldValue, enumList, converFormat) {
|
||||||
if (converFormat && converFormat.length >= 2) {
|
if (enumList && converFormat && converFormat.length >= 2) {
|
||||||
let value = converFormat[0];
|
const value = converFormat[0];
|
||||||
let label = converFormat[1];
|
const label = converFormat[1];
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
return enumList[i][label];
|
return enumList[i][label];
|
||||||
}
|
}
|
||||||
@ -109,10 +116,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,24 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" class="beijing-01__schedule reload-today-plan" :visible.sync="dialogShow" width="80%"
|
<el-dialog
|
||||||
:before-close="doClose" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
:title="title"
|
||||||
</QueryListPage>
|
class="beijing-01__schedule reload-today-plan"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="80%"
|
||||||
|
:before-close="doClose"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-button type="primary" @click="handleConfirm" :loading="loading">加 载</el-button>
|
<el-button type="primary" :loading="loading" @click="handleConfirm">加 载</el-button>
|
||||||
<el-button @click="dialogShow = false">取 消</el-button>
|
<el-button @click="dialogShow = false">取 消</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPublishMap } from '@/api/jmap/mapdraft';
|
import { listPublishMap } from '@/api/jmap/mapdraft';
|
||||||
import { runPlanTemplateList, deleteRunPlanTemplate, generateUserRunPlanEveryDay } from '@/api/runplan';
|
import { runPlanTemplateList, deleteRunPlanTemplate, generateUserRunPlanEveryDay } from '@/api/runplan';
|
||||||
import { getStationListBySkinStyle } from '@/api/runplan';
|
import { getStationListBySkinStyle } from '@/api/runplan';
|
||||||
import { getEveryDayRunPlanData } from '@/api/simulation';
|
import { getEveryDayRunPlanData } from '@/api/simulation';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin'
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ReloadTodayPlan',
|
name: 'ReloadTodayPlan',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -53,19 +60,19 @@
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '加载当天计划'
|
return '加载当天计划';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -73,7 +80,7 @@
|
|||||||
this.skinStyleList = [];
|
this.skinStyleList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
this.skinStyleList = response.data;
|
this.skinStyleList = response.data;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -90,10 +97,10 @@
|
|||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
convertField(fieldValue, enumList, converFormat) {
|
||||||
if (converFormat && converFormat.length >= 2) {
|
if (enumList && converFormat && converFormat.length >= 2) {
|
||||||
let value = converFormat[0];
|
const value = converFormat[0];
|
||||||
let label = converFormat[1];
|
const label = converFormat[1];
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
return enumList[i][label];
|
return enumList[i][label];
|
||||||
}
|
}
|
||||||
@ -108,45 +115,45 @@
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
generateUserRunPlanEveryDay(choose.id, this.$route.query.group).then(response => {
|
generateUserRunPlanEveryDay(choose.id, this.$route.query.group).then(response => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
this.loadRunData();
|
this.loadRunData();
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$message.success(`生成用户每日运行图成功`);
|
this.$message.success(`生成用户每日运行图成功`);
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
this.$messageBox(`生成用户每日运行图失败`);
|
this.$messageBox(`生成用户每日运行图失败`);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$messageBox(`请选择需要加载的运行图`);
|
this.$messageBox(`请选择需要加载的运行图`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadRunData() {
|
loadRunData() {
|
||||||
let skinStyle = this.$route.query.skinStyle;
|
const skinStyle = this.$route.query.skinStyle;
|
||||||
this.$store.dispatch('runPlan/clear');
|
this.$store.dispatch('runPlan/clear');
|
||||||
if (skinStyle) {
|
if (skinStyle) {
|
||||||
getStationListBySkinStyle(skinStyle).then(response => {
|
getStationListBySkinStyle(skinStyle).then(response => {
|
||||||
let stations = response.data;
|
const stations = response.data;
|
||||||
this.PlanConvert = this.$theme.loadPlanConvert(skinStyle);
|
this.PlanConvert = this.$theme.loadPlanConvert(skinStyle);
|
||||||
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
this.$store.dispatch('runPlan/setStations', stations).then(() => {
|
||||||
getEveryDayRunPlanData(this.$route.query.group).then(resp => {
|
getEveryDayRunPlanData(this.$route.query.group).then(resp => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
this.$store.dispatch('runPlan/setPlanData', resp.data);
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$store.dispatch('runPlan/setPlanData', []);
|
this.$store.dispatch('runPlan/setPlanData', []);
|
||||||
this.$messageBox(`获取运行图数据失败`);
|
this.$messageBox(`获取运行图数据失败`);
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(`获取车站列表失败`);
|
this.$messageBox(`获取车站列表失败`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" class="beijing-01__schedule choose-plan-template" :visible.sync="dialogShow" width="80%"
|
<el-dialog
|
||||||
:before-close="doClose" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
:title="title"
|
||||||
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
v-dialogDrag
|
||||||
</QueryListPage>
|
class="beijing-01__schedule choose-plan-template"
|
||||||
|
:visible.sync="dialogShow"
|
||||||
|
width="80%"
|
||||||
|
:before-close="doClose"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-button type="primary" @click="handleConfirm" :loading="loading">选 择</el-button>
|
<el-button type="primary" :loading="loading" @click="handleConfirm">选 择</el-button>
|
||||||
<el-button @click="dialogShow = false">取 消</el-button>
|
<el-button @click="dialogShow = false">取 消</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin'
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChooseTemplatePlan',
|
name: 'ChooseTemplatePlan',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -50,19 +57,19 @@
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '选择模板运行图'
|
return '选择模板运行图';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -70,7 +77,7 @@
|
|||||||
this.skinStyleList = [];
|
this.skinStyleList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
this.skinStyleList = response.data;
|
this.skinStyleList = response.data;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -87,10 +94,10 @@
|
|||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
convertField(fieldValue, enumList, converFormat) {
|
||||||
if (converFormat && converFormat.length >= 2) {
|
if (enumList && converFormat && converFormat.length >= 2) {
|
||||||
let value = converFormat[0];
|
const value = converFormat[0];
|
||||||
let label = converFormat[1];
|
const label = converFormat[1];
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
return enumList[i][label];
|
return enumList[i][label];
|
||||||
}
|
}
|
||||||
@ -109,10 +116,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -59,7 +59,7 @@ export default {
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
}
|
}
|
||||||
@ -96,7 +96,7 @@ export default {
|
|||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
convertField(fieldValue, enumList, converFormat) {
|
||||||
if (converFormat && converFormat.length >= 2) {
|
if (enumList && converFormat && converFormat.length >= 2) {
|
||||||
const value = converFormat[0];
|
const value = converFormat[0];
|
||||||
const label = converFormat[1];
|
const label = converFormat[1];
|
||||||
for (let i = 0; i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
|
@ -1,21 +1,28 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" class="beijing-01__schedule choose-plan-template" :visible.sync="dialogShow" width="80%"
|
<el-dialog
|
||||||
:before-close="doClose" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
:title="title"
|
||||||
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
class="beijing-01__schedule choose-plan-template"
|
||||||
</QueryListPage>
|
:visible.sync="dialogShow"
|
||||||
|
v-dialogDrag
|
||||||
|
width="80%"
|
||||||
|
:before-close="doClose"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<QueryListPage ref="pageRules" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
<el-row type="flex" justify="center" class="button-group">
|
<el-row type="flex" justify="center" class="button-group">
|
||||||
<el-button type="primary" @click="handleConfirm" :loading="loading">选 择</el-button>
|
<el-button type="primary" :loading="loading" @click="handleConfirm">选 择</el-button>
|
||||||
<el-button @click="dialogShow = false">取 消</el-button>
|
<el-button @click="dialogShow = false">取 消</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { runPlanTemplateList } from '@/api/runplan';
|
import { runPlanTemplateList } from '@/api/runplan';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin'
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ChooseTemplatePlan',
|
name: 'ChooseTemplatePlan',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -50,19 +57,19 @@
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
title() {
|
title() {
|
||||||
return '选择模板运行图'
|
return '选择模板运行图';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -70,7 +77,7 @@
|
|||||||
this.skinStyleList = [];
|
this.skinStyleList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
this.skinStyleList = response.data;
|
this.skinStyleList = response.data;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -88,8 +95,8 @@
|
|||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
convertField(fieldValue, enumList, converFormat) {
|
||||||
if (converFormat && converFormat.length >= 2) {
|
if (converFormat && converFormat.length >= 2) {
|
||||||
let value = converFormat[0];
|
const value = converFormat[0];
|
||||||
let label = converFormat[1];
|
const label = converFormat[1];
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
for (let i = 0; enumList && i < enumList.length; i++) {
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
return enumList[i][label];
|
return enumList[i][label];
|
||||||
@ -109,10 +116,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@import "src/styles/mixin.scss";
|
@import "src/styles/mixin.scss";
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
}
|
}
|
||||||
@ -89,17 +89,6 @@
|
|||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 生成每日运行图
|
// 生成每日运行图
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
if (this.$refs && this.$refs.pageRules) {
|
if (this.$refs && this.$refs.pageRules) {
|
||||||
|
@ -1,28 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog class="fuzhou-01__systerm stand-detain-train-all" :title="title" :visible.sync="show" width="340px"
|
<el-dialog
|
||||||
:before-close="doClose" :zIndex="2000" :modal="false" :close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<div style="padding: 10px 20px; border: 1px double lightgray; ">
|
class="fuzhou-01__systerm stand-detain-train-all"
|
||||||
|
:title="title"
|
||||||
|
:visible.sync="show"
|
||||||
|
width="340px"
|
||||||
|
:before-close="doClose"
|
||||||
|
:z-index="2000"
|
||||||
|
:modal="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<el-radio-group style="padding: 10px 20px; border: 1px double lightgray; ">
|
||||||
<span class="base-label">范围</span>
|
<span class="base-label">范围</span>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-radio-group v-model="upDown" @change="choose">
|
<el-radio-group v-model="upDown" @change="choose">
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-radio label="02" :id="upDown == '01' ? domIdChoose : ''">上行全线</el-radio>
|
<el-radio :id="upDown == '01' ? domIdChoose : ''" label="02">上行全线</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6" :offset="8">
|
<el-col :span="6" :offset="8">
|
||||||
<el-radio label="01" :id="upDown == '02' ? domIdChoose : ''">下行全线</el-radio>
|
<el-radio :id="upDown == '02' ? domIdChoose : ''" label="01">下行全线</el-radio>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</el-radio-group>
|
||||||
|
|
||||||
<div class="table">
|
<div class="table">
|
||||||
<span>扣车站台列表(中心设置)</span>
|
<span>扣车站台列表(中心设置)</span>
|
||||||
<el-table ref="tempData" :data="tempData" border style="width: 100%" size="mini" empty-text="所有站台都无扣车状态!"
|
<el-table
|
||||||
height="160" highlight-current-row>
|
ref="tempData"
|
||||||
<el-table-column prop="stationName" label="车站名称">
|
:data="tempData"
|
||||||
</el-table-column>
|
border
|
||||||
<el-table-column prop="standName" :width="140" label="扣车站台">
|
style="width: 100%"
|
||||||
</el-table-column>
|
size="mini"
|
||||||
|
empty-text="所有站台都无扣车状态!"
|
||||||
|
height="160"
|
||||||
|
highlight-current-row
|
||||||
|
>
|
||||||
|
<el-table-column prop="stationName" label="车站名称" />
|
||||||
|
<el-table-column prop="standName" :width="140" label="扣车站台" />
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<el-row justify="center" class="button-group">
|
<el-row justify="center" class="button-group">
|
||||||
@ -34,16 +49,16 @@
|
|||||||
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
<el-button :id="domIdCancel" @click="cancel">取 消</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StandDetainTrainAll',
|
name: 'StandDetainTrainAll',
|
||||||
components: {
|
components: {
|
||||||
NoticeInfo
|
NoticeInfo
|
||||||
@ -55,12 +70,12 @@
|
|||||||
upDown: '01',
|
upDown: '01',
|
||||||
tempData: [],
|
tempData: [],
|
||||||
disabled: true,
|
disabled: true,
|
||||||
operation: '',
|
operation: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('map', [
|
...mapGetters('map', [
|
||||||
'stationStandList',
|
'stationStandList'
|
||||||
]),
|
]),
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow && !this.$store.state.menuOperation.break;
|
return this.dialogShow && !this.$store.state.menuOperation.break;
|
||||||
@ -85,27 +100,27 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$store.dispatch('training/tipReload');
|
this.$store.dispatch('training/tipReload');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadTableData() {
|
loadTableData() {
|
||||||
this.tempData = [];
|
this.tempData = [];
|
||||||
this.stationStandList.forEach(elem => {
|
this.stationStandList.forEach(elem => {
|
||||||
/** status 01: 未扣车*/
|
/** status 01: 未扣车*/
|
||||||
let stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).state;
|
const stand = (this.$store.getters['map/getDeviceByCode'](elem.code) || {}).status;
|
||||||
let station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {}).model;
|
const station = (this.$store.getters['map/getDeviceByCode'](elem.stationCode) || {});
|
||||||
if (station && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) {
|
if (station && stand && stand.holdStatus != '01' && Number(elem.direction) == Number(this.upDown)) {
|
||||||
this.tempData.push({ stationName: station.name, standName: elem.name });
|
this.tempData.push({ stationName: station.name, standName: elem.name });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//如果存在未扣车的情况,才可以做此操作
|
// 如果存在未扣车的情况,才可以做此操作
|
||||||
if (this.tempData.length > 0) {
|
if (this.tempData.length > 0) {
|
||||||
this.disabled = false;
|
this.disabled = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow(operate, selected) {
|
doShow(operate, selected) {
|
||||||
//不是断点激活的菜单应该将状态初始化
|
// 不是断点激活的菜单应该将状态初始化
|
||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.upDown = selected.direction;
|
this.upDown = selected.direction;
|
||||||
@ -123,27 +138,27 @@
|
|||||||
this.$store.dispatch('training/emitTipFresh');
|
this.$store.dispatch('training/emitTipFresh');
|
||||||
},
|
},
|
||||||
choose(upDown) {
|
choose(upDown) {
|
||||||
//重新设置扣车站台
|
// 重新设置扣车站台
|
||||||
this.loadTableData();
|
this.loadTableData();
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
|
operation: OperationEvent.StationStand.cancelDetainTrainAll.choose.operation,
|
||||||
val: `${upDown}`,
|
val: `${upDown}`
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
commit() {
|
commit() {
|
||||||
let operate = {
|
const operate = {
|
||||||
send: true,
|
send: true,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
operation: OperationEvent.StationStand.cancelDetainTrainAll.menu.operation,
|
||||||
val: this.upDown,
|
val: this.upDown
|
||||||
}
|
};
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
@ -151,26 +166,26 @@
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.doClose();
|
this.doClose();
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.Command.cancel.menu.operation,
|
operation: OperationEvent.Command.cancel.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -52,7 +52,8 @@
|
|||||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||||
import { getPublishTrainList } from '@/api/jmap/map';
|
import { getPublishTrainList } from '@/api/jmap/map';
|
||||||
import ConfirmTrain from './childDialog/confirmTrain';
|
import ConfirmTrain from './childDialog/confirmTrain';
|
||||||
import NoticeInfo from './childDialog/childDialog/noticeInfo'
|
import NoticeInfo from './childDialog/childDialog/noticeInfo';
|
||||||
|
import Vue from 'vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainControl',
|
name: 'TrainControl',
|
||||||
@ -217,8 +218,7 @@
|
|||||||
if (!this.dialogShow) {
|
if (!this.dialogShow) {
|
||||||
this.operation = operate.operation;
|
this.operation = operate.operation;
|
||||||
}
|
}
|
||||||
|
let model = Vue.prototype.$jlmap.mapDevice[selected.code];
|
||||||
let model = (selected || {}).state;
|
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
groupNumber: model.groupNumber,
|
groupNumber: model.groupNumber,
|
||||||
tripNumber: model.tripNumber,
|
tripNumber: model.tripNumber,
|
||||||
|
@ -1,31 +1,31 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<pop-menu ref="popMenu" :menu="menu"></pop-menu>
|
<pop-menu ref="popMenu" :menu="menu" />
|
||||||
<stand-control ref="standControl"></stand-control>
|
<stand-control ref="standControl" />
|
||||||
<stand-detail ref="standDetail"></stand-detail>
|
<stand-detail ref="standDetail" />
|
||||||
<stand-run-level ref="standRunLevel"></stand-run-level>
|
<stand-run-level ref="standRunLevel" />
|
||||||
<stand-stop-time ref="standStopTime"></stand-stop-time>
|
<stand-stop-time ref="standStopTime" />
|
||||||
<stand-detain-train-all ref="standDetainTrainAll"></stand-detain-train-all>
|
<stand-detain-train-all ref="standDetainTrainAll" />
|
||||||
<notice-info ref="noticeInfo"></notice-info>
|
<notice-info ref="noticeInfo" />
|
||||||
<stand-back-strategy ref="standBackStrategy"></stand-back-strategy>
|
<stand-back-strategy ref="standBackStrategy" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PopMenu from '@/components/PopMenu';
|
import PopMenu from '@/components/PopMenu';
|
||||||
import StandControl from './dialog/standControl';
|
import StandControl from './dialog/standControl';
|
||||||
import StandBackStrategy from './dialog/standBackStrategy';
|
import StandBackStrategy from './dialog/standBackStrategy';
|
||||||
import StandDetail from './dialog/standDetail';
|
import StandDetail from './dialog/standDetail';
|
||||||
import StandRunLevel from './dialog/standRunLevel';
|
import StandRunLevel from './dialog/standRunLevel';
|
||||||
import StandStopTime from './dialog/standStopTime';
|
import StandStopTime from './dialog/standStopTime';
|
||||||
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
import StandDetainTrainAll from './dialog/standDetainTrainAll';
|
||||||
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
import NoticeInfo from './dialog/childDialog/childDialog/noticeInfo';
|
||||||
import { mapGetters } from 'vuex';
|
import { mapGetters } from 'vuex';
|
||||||
import { TrainingMode, OperateMode } from '@/scripts/ConstDic';
|
import { OperateMode } from '@/scripts/ConstDic';
|
||||||
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
import { MapDeviceType, OperationEvent, DeviceMenu } from '@/scripts/ConstDic';
|
||||||
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
import { MenuDisabledState, menuConvert, menuFiltration } from './utils/menuItemStatus';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StationStandMenu',
|
name: 'StationStandMenu',
|
||||||
components: {
|
components: {
|
||||||
PopMenu,
|
PopMenu,
|
||||||
@ -35,7 +35,7 @@
|
|||||||
NoticeInfo,
|
NoticeInfo,
|
||||||
StandBackStrategy,
|
StandBackStrategy,
|
||||||
StandStopTime,
|
StandStopTime,
|
||||||
StandDetainTrainAll,
|
StandDetainTrainAll
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
selected: {
|
selected: {
|
||||||
@ -51,55 +51,55 @@
|
|||||||
label: '扣车',
|
label: '扣车',
|
||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消扣车',
|
label: '取消扣车',
|
||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '强制取消扣车',
|
label: '强制取消扣车',
|
||||||
handler: this.cancelDetainTrainForce,
|
handler: this.cancelDetainTrainForce,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce,
|
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '跳停',
|
label: '跳停',
|
||||||
handler: this.setJumpStop,
|
handler: this.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消跳停',
|
label: '取消跳停',
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置运行等级',
|
label: '设置运行等级',
|
||||||
handler: this.setRunLevel,
|
handler: this.setRunLevel,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
||||||
auth: { station: false, center: false },
|
auth: { station: false, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置提前发车',
|
label: '设置提前发车',
|
||||||
handler: this.earlyDeparture,
|
handler: this.earlyDeparture,
|
||||||
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
||||||
auth: { station: false, center: false },
|
auth: { station: false, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '人工折返策略设置',
|
label: '人工折返策略设置',
|
||||||
handler: this.setBackStrategy,
|
handler: this.setBackStrategy,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
||||||
auth: { station: false, center: false },
|
auth: { station: false, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '查询站台状态',
|
label: '查询站台状态',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
disabledCallback: MenuDisabledState.StationStand.detail,
|
||||||
auth: { station: true, center: false },
|
auth: { station: true, center: false }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
central: [
|
central: [
|
||||||
@ -107,67 +107,67 @@
|
|||||||
label: '扣车',
|
label: '扣车',
|
||||||
handler: this.setDetainTrain,
|
handler: this.setDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
disabledCallback: MenuDisabledState.StationStand.setDetainTrain,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消扣车',
|
label: '取消扣车',
|
||||||
handler: this.cancelDetainTrain,
|
handler: this.cancelDetainTrain,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrain,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '强制取消扣车',
|
label: '强制取消扣车',
|
||||||
handler: this.cancelDetainTrainForce,
|
handler: this.cancelDetainTrainForce,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce,
|
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainForce,
|
||||||
auth: { station: false, center: false },
|
auth: { station: false, center: false }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '全线取消扣车',
|
label: '全线取消扣车',
|
||||||
handler: this.cancelDetainTrainAll,
|
handler: this.cancelDetainTrainAll,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainAll,
|
disabledCallback: MenuDisabledState.StationStand.cancelDetainTrainAll,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '跳停',
|
label: '跳停',
|
||||||
handler: this.setJumpStop,
|
handler: this.setJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.setJumpStop,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '取消跳停',
|
label: '取消跳停',
|
||||||
handler: this.cancelJumpStop,
|
handler: this.cancelJumpStop,
|
||||||
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
disabledCallback: MenuDisabledState.StationStand.cancelJumpStop,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置停站时间',
|
label: '设置停站时间',
|
||||||
handler: this.setStopTime,
|
handler: this.setStopTime,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
disabledCallback: MenuDisabledState.StationStand.setStopTime,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置运行等级',
|
label: '设置运行等级',
|
||||||
handler: this.setRunLevel,
|
handler: this.setRunLevel,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
disabledCallback: MenuDisabledState.StationStand.setRunLevel,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '设置提前发车',
|
label: '设置提前发车',
|
||||||
handler: this.earlyDeparture,
|
handler: this.earlyDeparture,
|
||||||
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
disabledCallback: MenuDisabledState.StationStand.earlyDeparture,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '人工折返策略设置',
|
label: '人工折返策略设置',
|
||||||
handler: this.setBackStrategy,
|
handler: this.setBackStrategy,
|
||||||
disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
disabledCallback: MenuDisabledState.StationStand.setBackStrategy,
|
||||||
auth: { station: false, center: true },
|
auth: { station: false, center: true }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '查询站台状态',
|
label: '查询站台状态',
|
||||||
handler: this.detail,
|
handler: this.detail,
|
||||||
disabledCallback: MenuDisabledState.StationStand.detail,
|
disabledCallback: MenuDisabledState.StationStand.detail,
|
||||||
auth: { station: true, center: true },
|
auth: { station: true, center: true }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -183,7 +183,7 @@
|
|||||||
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
disabledCallback: MenuDisabledState.StationStand.cancelStoppage
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('training', [
|
...mapGetters('training', [
|
||||||
@ -205,21 +205,21 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
let self = this;
|
const self = this;
|
||||||
window.onclick = function (e) {
|
window.onclick = function (e) {
|
||||||
self.doClose();
|
self.doClose();
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
initMenu() {
|
initMenu() {
|
||||||
//编辑模式菜单列表
|
// 编辑模式菜单列表
|
||||||
this.menu = menuFiltration(this.menuNormal);
|
this.menu = menuFiltration(this.menuNormal);
|
||||||
if (this.operatemode === OperateMode.ADMIN) {
|
if (this.operatemode === OperateMode.ADMIN) {
|
||||||
this.menu = [...this.menu, ...this.menuForce]
|
this.menu = [...this.menu, ...this.menuForce];
|
||||||
}
|
}
|
||||||
|
|
||||||
//故障模式菜单列表
|
// 故障模式菜单列表
|
||||||
if (this.operatemode === OperateMode.FAULT) {
|
if (this.operatemode === OperateMode.FAULT) {
|
||||||
this.menu = this.menuForce
|
this.menu = this.menuForce;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu = menuConvert(this.menu);
|
this.menu = menuConvert(this.menu);
|
||||||
@ -236,9 +236,9 @@
|
|||||||
this.$refs.popMenu.close();
|
this.$refs.popMenu.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//设置故障
|
// 设置故障
|
||||||
setStoppage() {
|
setStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -252,13 +252,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消故障
|
// 取消故障
|
||||||
cancelStoppage() {
|
cancelStoppage() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -272,13 +272,13 @@
|
|||||||
} else {
|
} else {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置扣车
|
// 设置扣车
|
||||||
setDetainTrain() {
|
setDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -291,11 +291,11 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消扣车
|
// 取消扣车
|
||||||
cancelDetainTrain() {
|
cancelDetainTrain() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -307,11 +307,11 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//强制取消扣车
|
// 强制取消扣车
|
||||||
cancelDetainTrainForce() {
|
cancelDetainTrainForce() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -323,11 +323,11 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//全线取消扣车
|
// 全线取消扣车
|
||||||
cancelDetainTrainAll() {
|
cancelDetainTrainAll() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -339,11 +339,11 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standDetainTrainAll.doShow(operate, this.selected);
|
this.$refs.standDetainTrainAll.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置跳停
|
// 设置跳停
|
||||||
setJumpStop() {
|
setJumpStop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -355,11 +355,11 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//取消跳停
|
// 取消跳停
|
||||||
cancelJumpStop() {
|
cancelJumpStop() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
@ -371,11 +371,11 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置停站时间
|
// 设置停站时间
|
||||||
setStopTime() {
|
setStopTime() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -392,13 +392,13 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
|
this.$refs.standStopTime.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置运行等级
|
// 设置运行等级
|
||||||
setRunLevel() {
|
setRunLevel() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -415,34 +415,34 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
|
this.$refs.standRunLevel.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置提前发车
|
// 设置提前发车
|
||||||
earlyDeparture() {
|
earlyDeparture() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.earlyDeparture.menu.operation,
|
operation: OperationEvent.StationStand.earlyDeparture.menu.operation
|
||||||
}
|
};
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standControl.doShow(operate, this.selected);
|
this.$refs.standControl.doShow(operate, this.selected);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//设置折返策略
|
// 设置折返策略
|
||||||
setBackStrategy() {
|
setBackStrategy() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
type: MapDeviceType.StationStand.type,
|
type: MapDeviceType.StationStand.type,
|
||||||
operation: OperationEvent.StationStand.setBackStrategy.menu.operation,
|
operation: OperationEvent.StationStand.setBackStrategy.menu.operation
|
||||||
}
|
};
|
||||||
|
|
||||||
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
this.$store.dispatch('training/next', operate).then(({ valid, response }) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@ -453,13 +453,13 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate);
|
this.$refs.standBackStrategy.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
//查询站台状态
|
// 查询站台状态
|
||||||
detail() {
|
detail() {
|
||||||
let operate = {
|
const operate = {
|
||||||
start: true,
|
start: true,
|
||||||
send: true,
|
send: true,
|
||||||
code: this.selected.code,
|
code: this.selected.code,
|
||||||
@ -476,10 +476,10 @@
|
|||||||
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
this.$store.dispatch('menuOperation/handleBreakFlag', { break: true });
|
||||||
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
|
this.$refs.standDetail.doShow(operate, this.selected, tempDate);
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$refs.noticeInfo.doShow(operate);
|
this.$refs.noticeInfo.doShow(operate);
|
||||||
})
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
}
|
}
|
||||||
@ -86,17 +86,6 @@
|
|||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
if (this.$refs && this.$refs.pageRules) {
|
if (this.$refs && this.$refs.pageRules) {
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name'])
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
}
|
}
|
||||||
@ -89,17 +89,6 @@
|
|||||||
}
|
}
|
||||||
return runPlanTemplateList(params);
|
return runPlanTemplateList(params);
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 生成每日运行图
|
// 生成每日运行图
|
||||||
handleConfirm() {
|
handleConfirm() {
|
||||||
if (this.$refs && this.$refs.pageRules) {
|
if (this.$refs && this.$refs.pageRules) {
|
||||||
|
39
src/main.js
39
src/main.js
@ -22,9 +22,6 @@ import '@/scripts/GlobalPlugin';
|
|||||||
import '@/directives';
|
import '@/directives';
|
||||||
import messages from '@/i18n/index';
|
import messages from '@/i18n/index';
|
||||||
|
|
||||||
// window.THREE = require('@/jlmap3d/main/three.min.js');
|
|
||||||
// window.zlib = require('@/jlmap3d/main/inflate.min.js');
|
|
||||||
|
|
||||||
Vue.use(ElementUI);
|
Vue.use(ElementUI);
|
||||||
Vue.use(VueI18n);
|
Vue.use(VueI18n);
|
||||||
|
|
||||||
@ -68,3 +65,39 @@ Vue.prototype.$messageBox = function(msge) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Vue.prototype.$convertField = function(fieldValue, enumList, converFormat, isList = false) {
|
||||||
|
const arr = [];
|
||||||
|
if (enumList && converFormat && converFormat.length >= 2) {
|
||||||
|
const value = converFormat[0];
|
||||||
|
const label = converFormat[1];
|
||||||
|
if (isList) {
|
||||||
|
enumList.forEach((element, i) => {
|
||||||
|
fieldValue.forEach((v, j) => {
|
||||||
|
if ('' + fieldValue[j] === '' + enumList[i][value]) {
|
||||||
|
arr.push(enumList[i][label]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
|
return enumList[i][label];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return isList ? arr: '';
|
||||||
|
};
|
||||||
|
|
||||||
|
Vue.prototype.$convertList = function(FromList, ToList, checktypeFunction) {
|
||||||
|
if (FromList) {
|
||||||
|
ToList.length = 0;
|
||||||
|
FromList.forEach(elem => {
|
||||||
|
if (checktypeFunction(elem)) {
|
||||||
|
ToList.push({ value: elem.code, label: elem.name });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@ -548,7 +548,7 @@ export const asyncRouter = [
|
|||||||
component: resolve => require(['@/views/screenMonitor/index'], resolve),
|
component: resolve => require(['@/views/screenMonitor/index'], resolve),
|
||||||
name: '大屏系统',
|
name: '大屏系统',
|
||||||
meta: {
|
meta: {
|
||||||
roles: [admin, userScreen]
|
roles: [admin, userScreen, user]
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { asyncRouter, constantRoutes, user, userLesson, userExam, userSimulation, userScreen, userPlan, superAdmin } from '@/router';
|
import { asyncRouter, constantRoutes, user, userLesson, userExam, userSimulation, userScreen, userPlan, superAdmin, admin } from '@/router';
|
||||||
import { PermissionType } from '@/utils/PermissionType';
|
import { PermissionType } from '@/utils/PermissionType';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
|
|
||||||
@ -63,6 +63,9 @@ function convertRouterRoles({ roles, permissionType }) {
|
|||||||
*/
|
*/
|
||||||
function filterAsyncRouter(asyncRouter, roles, parentsRoles) {
|
function filterAsyncRouter(asyncRouter, roles, parentsRoles) {
|
||||||
return asyncRouter.filter(route => {
|
return asyncRouter.filter(route => {
|
||||||
|
if (route.name === '大屏系统' && roles.indexOf(admin)===-1 && roles.indexOf(userScreen) ===-1){
|
||||||
|
route.hidden = true;
|
||||||
|
}
|
||||||
if (hasPermission(roles, route, parentsRoles)) {
|
if (hasPermission(roles, route, parentsRoles)) {
|
||||||
if (route.children && route.children.length) {
|
if (route.children && route.children.length) {
|
||||||
route.children = filterAsyncRouter(route.children, roles, route.meta ? route.meta.roles : undefined);
|
route.children = filterAsyncRouter(route.children, roles, route.meta ? route.meta.roles : undefined);
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
:disabled="item.role != 'Dispatcher'"
|
:disabled="checkDisabled(item.role)"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -104,7 +104,7 @@ export default {
|
|||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'skinCode',
|
prop: 'skinCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -205,6 +205,18 @@ export default {
|
|||||||
roleDoClose() {
|
roleDoClose() {
|
||||||
this.$refs['ruleForm'].resetFields();
|
this.$refs['ruleForm'].resetFields();
|
||||||
this.roleShow = false;
|
this.roleShow = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
checkDisabled(role) {
|
||||||
|
if(this.$route.query.prdType == '01'){
|
||||||
|
return role != 'Attendant';
|
||||||
|
} else if (this.$route.query.prdType == '02'){
|
||||||
|
return role != 'Dispatcher';
|
||||||
|
}else if (this.$route.query.prdType == '04'){
|
||||||
|
return role !== 'Driver';
|
||||||
|
}else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -82,6 +82,7 @@ import { checkLoginLine } from '@/api/login';
|
|||||||
import { loadMapData } from '@/utils/loaddata';
|
import { loadMapData } from '@/utils/loaddata';
|
||||||
// import { handleToken } from '@/utils/auth';
|
// import { handleToken } from '@/utils/auth';
|
||||||
import { EventBus } from '@/scripts/event-bus';
|
import { EventBus } from '@/scripts/event-bus';
|
||||||
|
import Vue from 'vue';
|
||||||
|
|
||||||
// 三维
|
// 三维
|
||||||
import ThreeTest from '@/views/jlmap3d/index';
|
import ThreeTest from '@/views/jlmap3d/index';
|
||||||
@ -445,6 +446,10 @@ export default {
|
|||||||
const res = await loadQuest(row.id, this.group);
|
const res = await loadQuest(row.id, this.group);
|
||||||
if (res && res.code == 200) {
|
if (res && res.code == 200) {
|
||||||
this.questId = parseInt(row.id);
|
this.questId = parseInt(row.id);
|
||||||
|
if(res.data && res.data.mapLocation) {
|
||||||
|
let mapLocation={"offsetX":res.data.mapLocation.x,"offsetY":res.data.mapLocation.y,"scaleRate":res.data.mapLocation.scale};
|
||||||
|
Vue.prototype.$jlmap.setPosition(mapLocation)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.$refs.menuDemon) {
|
if (this.$refs.menuDemon) {
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
<set-time ref="setTime" @ConfirmSelectBeginTime="start" />
|
||||||
<tip-quest-detail v-show="questId" ref="questTip" :quest-id="questId" />
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -27,7 +26,6 @@
|
|||||||
<script>
|
<script>
|
||||||
// import ChartView from './demon/chartView';
|
// import ChartView from './demon/chartView';
|
||||||
import SetTime from './demon/setTime';
|
import SetTime from './demon/setTime';
|
||||||
import TipQuestDetail from './tipQuestDetail';
|
|
||||||
import { Notification } from 'element-ui';
|
import { Notification } from 'element-ui';
|
||||||
import { getGoodsTryUse } from '@/api/management/goods';
|
import { getGoodsTryUse } from '@/api/management/goods';
|
||||||
import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
|
import { runDiagramStart, runDiagramOver, runDiagramGetTime } from '@/api/simulation';
|
||||||
@ -43,7 +41,6 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
// ChartView,
|
// ChartView,
|
||||||
SetTime,
|
SetTime,
|
||||||
TipQuestDetail
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
group: {
|
group: {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-form :model="modalData" ref="modalData" :rules="rules" label-width="80px" class="actionInfo" label-position="right" style="margin-top:15px">
|
<el-form :model="modalData" ref="modalData" :rules="rules" label-width="80px" class="actionInfo" label-position="right">
|
||||||
<el-form-item label="动作类型" class="conditionVO" prop="action.type">
|
<el-form-item label="动作类型" class="conditionVO" prop="action.type">
|
||||||
<el-select v-model="modalData.action.type " placeholder="请选择动作类型" @change="changeType" class="inputStyle">
|
<el-select v-model="modalData.action.type " placeholder="请选择动作类型" @change="changeType" class="inputStyle">
|
||||||
<el-option v-for="actionType in actionTypeList" :key="actionType.label" :label="actionType.label" :value="actionType.value"></el-option>
|
<el-option v-for="actionType in actionTypeList" :key="actionType.label" :label="actionType.label" :value="actionType.value"></el-option>
|
||||||
|
82
src/views/display/scriptRecord/roleConditionScript.vue
Normal file
82
src/views/display/scriptRecord/roleConditionScript.vue
Normal file
@ -0,0 +1,82 @@
|
|||||||
|
<template>
|
||||||
|
<el-tabs v-model="activeName" type="card">
|
||||||
|
<el-tab-pane label="角色管理" name="first">
|
||||||
|
<div class="tab-pane">
|
||||||
|
<el-scrollbar wrapClass="scrollbar-wrapper">
|
||||||
|
<role-section ref="roleSection" :group="group" @getBehaviorList="getBehaviorList"></role-section>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="任务目标" name="second">
|
||||||
|
<div class="tab-pane">
|
||||||
|
<el-scrollbar wrapClass="scrollbar-wrapper">
|
||||||
|
<target-condition ref="targetCondition" :group="group"></target-condition>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="任务剧本" name="third">
|
||||||
|
<div class="tab-pane">
|
||||||
|
<el-scrollbar wrapClass="scrollbar-wrapper">
|
||||||
|
<task-script ref="taskScript" :group="group"></task-script>
|
||||||
|
</el-scrollbar>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import Vue from 'vue';
|
||||||
|
import RoleSection from './roleSection';
|
||||||
|
import TargetCondition from './targetCondition';
|
||||||
|
import TaskScript from './taskScript';
|
||||||
|
|
||||||
|
import {getQuestRecord} from '@/api/simulation';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'roleConditionScript',
|
||||||
|
props: {
|
||||||
|
group: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
},
|
||||||
|
components: {
|
||||||
|
TargetCondition,
|
||||||
|
TaskScript,
|
||||||
|
RoleSection,
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName:"first",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
this.loadInitData(this.$route.query);
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
loadInitData(obj) {
|
||||||
|
let group=obj.group;
|
||||||
|
getQuestRecord(group).then(response =>{
|
||||||
|
let deviceConditionList=response.data.questTargetVO.deviceConditionVOList;
|
||||||
|
this.$store.dispatch('scriptRecord/updateDeviceCondition', deviceConditionList);
|
||||||
|
this.$store.dispatch('scriptRecord/updateMemberList', response.data.memberVOList);
|
||||||
|
this.$store.dispatch('scriptRecord/updateScript', response.data.script);
|
||||||
|
// if(response.data.mapLocation)
|
||||||
|
// {
|
||||||
|
// let mapLocation={"offsetX":response.data.mapLocation.x,"offsetY":response.data.mapLocation.y,"scaleRate":response.data.mapLocation.scale};
|
||||||
|
// this.mapLocation=mapLocation;
|
||||||
|
// }
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getBehaviorList(row){
|
||||||
|
this.$emit('getBehaviorList',row.id);
|
||||||
|
this.$store.dispatch('scriptRecord/updateMemberName',row.name);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@import "src/styles/mixin.scss";
|
||||||
|
.tab-pane{
|
||||||
|
height:360px;
|
||||||
|
}
|
||||||
|
</style>
|
@ -73,10 +73,6 @@
|
|||||||
this.loading=false;
|
this.loading=false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
|
||||||
this.memberList=this.$store.state.scriptRecord.memberList;
|
|
||||||
this.loading=false;
|
|
||||||
},
|
|
||||||
methods:{
|
methods:{
|
||||||
getDeviceInfo(){
|
getDeviceInfo(){
|
||||||
let params = { role:this.memberVO.role};
|
let params = { role:this.memberVO.role};
|
||||||
|
@ -48,18 +48,6 @@
|
|||||||
components:{
|
components:{
|
||||||
DeviceCondition
|
DeviceCondition
|
||||||
},
|
},
|
||||||
mounted(){
|
|
||||||
let data=this.$store.state.scriptRecord.deviceConditionList;
|
|
||||||
if(data!=undefined)
|
|
||||||
{
|
|
||||||
var newData=JSON.parse(JSON.stringify(data).replace(/\"code\"/g,'"isAdded":true,"code"'));
|
|
||||||
this.deviceConditionList=newData;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.deviceConditionList=[];
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods:{
|
methods:{
|
||||||
addQuestAction(){
|
addQuestAction(){
|
||||||
if(this.isAdding)
|
if(this.isAdding)
|
||||||
|
@ -42,10 +42,6 @@
|
|||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.rowDrop();
|
this.rowDrop();
|
||||||
let script=this.$store.state.scriptRecord.script;
|
|
||||||
let memeberList=this.$store.state.scriptRecord.memberList;
|
|
||||||
this.taskScriptList=memeberList;
|
|
||||||
this.setScriptList(memeberList,script);
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -1,203 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div v-drag class="reminder-drag">
|
|
||||||
<div ref="drapBox" class="reminder-box">
|
|
||||||
<div class="tip-title">
|
|
||||||
<i v-show="isShrink" class="icon el-icon-minus" @click="shrink" />
|
|
||||||
<i v-show="!isShrink" class="icon el-icon-plus" @click="shrink" />
|
|
||||||
<p v-if="isShrink" style="color: #fff;">
|
|
||||||
<span>{{ formModel.name }}</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div ref="dragBody" class="tip-body-box">
|
|
||||||
<div class="tip-body">
|
|
||||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
|
||||||
<p class="list-item">
|
|
||||||
<span class="list-label">任务描述:</span>
|
|
||||||
<span class="list-elem">{{ formModel.description }}</span>
|
|
||||||
</p>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
<div class="drag-right" />
|
|
||||||
<div class="drag-left" />
|
|
||||||
<div class="drag-bottom" />
|
|
||||||
<div class="drag-top" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import { getQuestById } from '@/api/quest';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'TipQuestDetail',
|
|
||||||
props: {
|
|
||||||
questId: {
|
|
||||||
type: Number,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
isShrink: true,
|
|
||||||
formModel: {
|
|
||||||
name: '',
|
|
||||||
description: ''
|
|
||||||
}
|
|
||||||
};
|
|
||||||
},
|
|
||||||
computed: {
|
|
||||||
},
|
|
||||||
watch: {
|
|
||||||
'questId': function (val) {
|
|
||||||
this.loadInitData(val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() { },
|
|
||||||
methods: {
|
|
||||||
loadInitData(questId) {
|
|
||||||
if (questId) {
|
|
||||||
getQuestById(questId).then(resp => {
|
|
||||||
this.formModel = resp.data;
|
|
||||||
}).catch(() => {
|
|
||||||
this.$messageBox('获取任务信息失败');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
shrink() {
|
|
||||||
const height = this.$refs.dragBody.offsetHeight + 40;
|
|
||||||
const top = this.$refs.drapBox.style.top;
|
|
||||||
if (this.isShrink) {
|
|
||||||
this.$refs.drapBox.style.height = '40px';
|
|
||||||
this.$refs.drapBox.style.top = '';
|
|
||||||
this.isShrink = false;
|
|
||||||
} else {
|
|
||||||
this.$refs.drapBox.style.height = height + 'px';
|
|
||||||
this.$refs.drapBox.style.top = top;
|
|
||||||
this.isShrink = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
@import "src/styles/mixin.scss";
|
|
||||||
|
|
||||||
.tip-body-box {
|
|
||||||
position: relative;
|
|
||||||
height: 260px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.reminder-box {
|
|
||||||
position: absolute;
|
|
||||||
float: left;
|
|
||||||
left: 15x;
|
|
||||||
bottom: 15px;
|
|
||||||
width: 500px;
|
|
||||||
height: 300px;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 5px;
|
|
||||||
overflow: hidden;
|
|
||||||
z-index: 10;
|
|
||||||
font-size: 18px;
|
|
||||||
|
|
||||||
.tip-title {
|
|
||||||
width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
height: 40px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
background-color: #409EFF;
|
|
||||||
border-radius: 5px 5px 0 0;
|
|
||||||
justify-content: space-between;
|
|
||||||
padding: 0 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drag-right,
|
|
||||||
.drag-left {
|
|
||||||
width: 10px;
|
|
||||||
cursor: e-resize;
|
|
||||||
background-color: yellow;
|
|
||||||
height: 100%;
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drag-left {
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drag-bottom {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 10px;
|
|
||||||
cursor: s-resize;
|
|
||||||
background-color: yellow;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.drag-top {
|
|
||||||
position: absolute;
|
|
||||||
top: -45px;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 10px;
|
|
||||||
cursor: s-resize;
|
|
||||||
background-color: yellow;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tip-body {
|
|
||||||
height: 366px;
|
|
||||||
padding: 10px;
|
|
||||||
|
|
||||||
.list-label {
|
|
||||||
width: 90px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.tip-foot {
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
right: 0px;
|
|
||||||
bottom: 0px;
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 10px 0 10px 10px;
|
|
||||||
|
|
||||||
.foot-detail {
|
|
||||||
height: 100%;
|
|
||||||
float: right;
|
|
||||||
margin-top: 9px;
|
|
||||||
padding-right: 15px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.foot-submit {
|
|
||||||
float: right;
|
|
||||||
margin-top: 9px;
|
|
||||||
padding-right: 15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.icon {
|
|
||||||
float: right;
|
|
||||||
margin-right: 10px;
|
|
||||||
cursor: pointer;
|
|
||||||
background-color: #f3f3f3;
|
|
||||||
border-radius: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/deep/ {
|
|
||||||
.el-tree-node__content {
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
|
|
||||||
background-color: #d6e5f7;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -11,31 +11,7 @@
|
|||||||
<div class="tip-body-box" ref="dragBody">
|
<div class="tip-body-box" ref="dragBody">
|
||||||
<div class="tip-body">
|
<div class="tip-body">
|
||||||
<template v-if="displayType=='role'">
|
<template v-if="displayType=='role'">
|
||||||
<template>
|
<role-condition-script :group="group" @getBehaviorList="getBehaviorList"></role-condition-script>
|
||||||
<el-tabs v-model="activeName" type="card">
|
|
||||||
<el-tab-pane label="角色管理" name="first">
|
|
||||||
<div class="tab-pane">
|
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
|
||||||
<role-section ref="roleSection" :group="group" @getBehaviorList="getBehaviorList"></role-section>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="任务目标" name="second">
|
|
||||||
<div class="tab-pane">
|
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
|
||||||
<target-condition ref="targetCondition" :group="group"></target-condition>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
<el-tab-pane label="任务剧本" name="third">
|
|
||||||
<div class="tab-pane">
|
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper">
|
|
||||||
<task-script ref="taskScript" :group="group"></task-script>
|
|
||||||
</el-scrollbar>
|
|
||||||
</div>
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</template>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-if="displayType=='behavior'">
|
<template v-if="displayType=='behavior'">
|
||||||
<div class="tab-pane-big">
|
<div class="tab-pane-big">
|
||||||
@ -63,15 +39,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import RoleSection from './scriptRecord/roleSection';
|
|
||||||
import GetBehavior from './scriptRecord/getBehavior';
|
import GetBehavior from './scriptRecord/getBehavior';
|
||||||
import GetAction from './scriptRecord/getAction';
|
import GetAction from './scriptRecord/getAction';
|
||||||
import TargetCondition from './scriptRecord/targetCondition';
|
import RoleConditionScript from './scriptRecord/roleConditionScript';
|
||||||
import TaskScript from './scriptRecord/taskScript';
|
|
||||||
|
|
||||||
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
import { launchFullscreen, exitFullscreen } from '@/utils/screen';
|
||||||
import {saveScriptScenes, saveScriptData, dumpScriptData,getQuestRecord} from '@/api/simulation';
|
import {saveScriptScenes, saveScriptData, dumpScriptData} from '@/api/simulation';
|
||||||
import {updateMapLocation} from '@/api/quest';
|
import {updateMapLocation} from '@/api/quest';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -83,11 +56,9 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
RoleSection,
|
|
||||||
GetBehavior,
|
GetBehavior,
|
||||||
GetAction,
|
GetAction,
|
||||||
TargetCondition,
|
RoleConditionScript,
|
||||||
TaskScript
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -96,7 +67,6 @@
|
|||||||
memberId:null,
|
memberId:null,
|
||||||
behaviorId:null,
|
behaviorId:null,
|
||||||
displayType:"role",
|
displayType:"role",
|
||||||
activeName:"first",
|
|
||||||
mapLocation:{},
|
mapLocation:{},
|
||||||
// isSaveStage: true,
|
// isSaveStage: true,
|
||||||
}
|
}
|
||||||
@ -111,25 +81,9 @@
|
|||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
this.loadInitData(this.$route.query);
|
|
||||||
this.shrink();
|
this.shrink();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData(obj) {
|
|
||||||
let group=obj.group;
|
|
||||||
let that=this;
|
|
||||||
getQuestRecord(group).then(response =>{
|
|
||||||
let deviceConditionList=response.data.questTargetVO.deviceConditionVOList;
|
|
||||||
this.$store.dispatch('scriptRecord/updateDeviceCondition', deviceConditionList);
|
|
||||||
this.$store.dispatch('scriptRecord/updateMemberList', response.data.memberVOList);
|
|
||||||
this.$store.dispatch('scriptRecord/updateScript', response.data.script);
|
|
||||||
// if(response.data.mapLocation)
|
|
||||||
// {
|
|
||||||
// let mapLocation={"offsetX":response.data.mapLocation.x,"offsetY":response.data.mapLocation.y,"scaleRate":response.data.mapLocation.scale};
|
|
||||||
// this.mapLocation=mapLocation;
|
|
||||||
// }
|
|
||||||
});
|
|
||||||
},
|
|
||||||
jump(obj) {
|
jump(obj) {
|
||||||
},
|
},
|
||||||
shrink() {
|
shrink() {
|
||||||
@ -145,11 +99,6 @@
|
|||||||
this.isShrink = true;
|
this.isShrink = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getBehaviorList(row){
|
|
||||||
this.displayType="behavior";
|
|
||||||
this.memberId=row.id;
|
|
||||||
this.$store.dispatch('scriptRecord/updateMemberName',row.name);
|
|
||||||
},
|
|
||||||
backToMember(){
|
backToMember(){
|
||||||
this.displayType="role";
|
this.displayType="role";
|
||||||
},
|
},
|
||||||
@ -190,6 +139,10 @@
|
|||||||
})
|
})
|
||||||
}).catch(error => { })
|
}).catch(error => { })
|
||||||
},
|
},
|
||||||
|
getBehaviorList(id){
|
||||||
|
this.displayType="behavior";
|
||||||
|
this.memberId=id;
|
||||||
|
},
|
||||||
backToTop(){
|
backToTop(){
|
||||||
var div = this.$refs['elScrollbar'].$refs['wrap'];
|
var div = this.$refs['elScrollbar'].$refs['wrap'];
|
||||||
div.scrollTop=0;
|
div.scrollTop=0;
|
||||||
@ -200,7 +153,6 @@
|
|||||||
},
|
},
|
||||||
saveMaplocation()
|
saveMaplocation()
|
||||||
{
|
{
|
||||||
debugger;
|
|
||||||
// this.$parent.$parent.$refs['mapCanvas'].$refs['mapCommon'].$refs['jlmapVisual'].$jlmap.$options
|
// this.$parent.$parent.$refs['mapCanvas'].$refs['mapCommon'].$refs['jlmapVisual'].$jlmap.$options
|
||||||
// let dataZoom = this.$store.state.map.dataZoom;
|
// let dataZoom = this.$store.state.map.dataZoom;
|
||||||
// let scriptId=this.$route.query.scriptId;
|
// let scriptId=this.$route.query.scriptId;
|
||||||
@ -221,9 +173,6 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
// height: 540px;
|
// height: 540px;
|
||||||
}
|
}
|
||||||
.tab-pane{
|
|
||||||
height:360px;
|
|
||||||
}
|
|
||||||
.tab-pane-big{
|
.tab-pane-big{
|
||||||
height:420px;
|
height:420px;
|
||||||
}
|
}
|
||||||
|
@ -81,28 +81,28 @@ export default {
|
|||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '产品',
|
title: '产品',
|
||||||
prop: 'prdCode',
|
prop: 'prdCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实训类型',
|
title: '实训类型',
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.type, this.trainingTypeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作类型',
|
title: '操作类型',
|
||||||
prop: 'operateType',
|
prop: 'operateType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
prop: 'skinCode',
|
prop: 'skinCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinCode, this.skinCodeList, ['code', 'name'])
|
return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name'])
|
||||||
},
|
},
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
@ -112,17 +112,6 @@
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 确定创建
|
// 确定创建
|
||||||
handleConfirmCreate(data) {
|
handleConfirmCreate(data) {
|
||||||
createQuest(data).then(resp => {
|
createQuest(data).then(resp => {
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'parameter',
|
prop: 'parameter',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.parameter, this.skinStyleList, ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.parameter, this.skinStyleList, ['code', 'name']) },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -61,7 +61,7 @@
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.taskStatusList, ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.taskStatusList, ['code', 'name']) },
|
||||||
tagType: (row) => { if (row.status != '03') { return 'warning' } else { return 'success' } }
|
tagType: (row) => { if (row.status != '03') { return 'warning' } else { return 'success' } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -115,17 +115,6 @@
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.skinStyleList = [];
|
this.skinStyleList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
|
@ -1,52 +1,52 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="25%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave" v-loading="loading">确 定</el-button>
|
<el-button v-loading="loading" type="primary" @click="doSave">确 定</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { addTrainingRulesList } from '@/api/management/operation';
|
import { addTrainingRulesList } from '@/api/management/operation';
|
||||||
import { OperationList } from '@/scripts/OperationConfig';
|
import { OperationList } from '@/scripts/OperationConfig';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin';
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddBatch',
|
name: 'AddBatch',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
skinStyle: '',
|
skinStyle: ''
|
||||||
},
|
},
|
||||||
skinStyleList: [],
|
skinStyleList: [],
|
||||||
isShow: false,
|
isShow: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let isAdd = this.type === 'ADD'
|
this.type === 'ADD';
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'skinStyle', label: '皮肤类型', type: 'select', required: true, options: this.skinStyleList },
|
{ prop: 'skinStyle', label: '皮肤类型', type: 'select', required: true, options: this.skinStyleList }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
const crules = {
|
||||||
skinStyle: [
|
skinStyle: [
|
||||||
{ required: true, message: '请选择皮肤类型', trigger: 'change' },
|
{ required: true, message: '请选择皮肤类型', trigger: 'change' }
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
return crules
|
return crules;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '自动生成操作'
|
return '自动生成操作';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -58,12 +58,12 @@
|
|||||||
this.skinStyleList = [];
|
this.skinStyleList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
this.skinStyleList = response.data.map(item => {
|
this.skinStyleList = response.data.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
show(total) {
|
show(total) {
|
||||||
if (total) {
|
if (total) {
|
||||||
@ -71,10 +71,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
if (this.isShow) {
|
if (this.isShow) {
|
||||||
this.$confirm('此操作将清空改皮肤下所有操作定义, 是否继续?', '提示', {
|
this.$confirm('此操作将清空改皮肤下所有操作定义, 是否继续?', '提示', {
|
||||||
@ -82,34 +82,34 @@
|
|||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
self.create()
|
self.create();
|
||||||
}).catch(() => { })
|
}).catch(() => { });
|
||||||
} else {
|
} else {
|
||||||
self.create()
|
self.create();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
addTrainingRulesList(this.formModel.skinStyle, OperationList[this.formModel.skinStyle].list).then(response => {
|
addTrainingRulesList(this.formModel.skinStyle, OperationList[this.formModel.skinStyle].list).then(response => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.success('批量生成操作定义成功')
|
self.$message.success('批量生成操作定义成功');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable'); // 刷新列表
|
self.$emit('reloadTable'); // 刷新列表
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.error('批量生成操作定义失败:' + error.message)
|
self.$message.error('批量生成操作定义失败:' + error.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
skinStyle: '',
|
skinStyle: ''
|
||||||
}
|
};
|
||||||
this.$refs.dataform.resetForm();
|
this.$refs.dataform.resetForm();
|
||||||
this.isShow = false;
|
this.isShow = false;
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,20 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave" v-loading="loading">确 定</el-button>
|
<el-button v-loading="loading" type="primary" @click="doSave">确 定</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { create, checkDicCodeExist, getData, update } from '@/api/management/dictionary'
|
import { postTrainingRulesData, putTrainingRulesData, getPlaceholderList } from '@/api/management/operation';
|
||||||
import { postTrainingRulesData, putTrainingRulesData, getPlaceholderList } from '@/api/management/operation';
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
import { validateCharCode } from '@/utils/validate'
|
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainingEdit',
|
name: 'TrainingEdit',
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
@ -34,18 +32,18 @@
|
|||||||
minDuration: '',
|
minDuration: '',
|
||||||
maxDuration: '',
|
maxDuration: '',
|
||||||
trainingRemark: '',
|
trainingRemark: '',
|
||||||
productTypes: [],
|
productTypes: []
|
||||||
},
|
},
|
||||||
skinStyleList: [],
|
skinStyleList: [],
|
||||||
trainingTypeList: [],
|
trainingTypeList: [],
|
||||||
trainingOperateTypeMap: {},
|
trainingOperateTypeMap: {},
|
||||||
placeholderList: [],
|
placeholderList: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let isAdd = this.type === 'ADD'
|
const isAdd = this.type === 'ADD';
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'skinStyle', label: '皮肤类型', type: 'select', required: true, options: this.skinStyleList, disabled: !isAdd },
|
{ prop: 'skinStyle', label: '皮肤类型', type: 'select', required: true, options: this.skinStyleList, disabled: !isAdd },
|
||||||
@ -56,42 +54,42 @@
|
|||||||
{ prop: 'minDuration', label: '最佳用时', type: 'text', required: true },
|
{ prop: 'minDuration', label: '最佳用时', type: 'text', required: true },
|
||||||
{ prop: 'maxDuration', label: '最大用时', type: 'text', required: true },
|
{ prop: 'maxDuration', label: '最大用时', type: 'text', required: true },
|
||||||
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark },
|
{ label: '', type: 'button', options: this.placeholderList, style: 'margin-bottom: 0; margin-top: -10px;', typeBtn: 'info', click: this.addTrainRemark },
|
||||||
{ prop: 'trainingRemark', label: '实训说明', type: 'textarea', required: true, tooltip: true, info: '选择占位符 ‘{}’ 不可删除,否则说明显示会有问题!' },
|
{ prop: 'trainingRemark', label: '实训说明', type: 'textarea', required: true, tooltip: true, info: '选择占位符 ‘{}’ 不可删除,否则说明显示会有问题!' }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
const crules = {
|
||||||
trainingName: [
|
trainingName: [
|
||||||
{ required: true, message: '请输入实训名称', trigger: 'blur' },
|
{ required: true, message: '请输入实训名称', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
trainingType: [
|
trainingType: [
|
||||||
{ required: true, message: '请输入实训类型', trigger: 'change' },
|
{ required: true, message: '请输入实训类型', trigger: 'change' }
|
||||||
],
|
],
|
||||||
operateType: [
|
operateType: [
|
||||||
{ required: true, message: '请输入操作类型', trigger: 'change' }
|
{ required: true, message: '请输入操作类型', trigger: 'change' }
|
||||||
],
|
],
|
||||||
skinStyle: [
|
skinStyle: [
|
||||||
{ required: true, message: '请选择皮肤类型', trigger: 'change' },
|
{ required: true, message: '请选择皮肤类型', trigger: 'change' }
|
||||||
],
|
],
|
||||||
minDuration: [
|
minDuration: [
|
||||||
{ required: true, message: '请输入最佳用时', trigger: 'blur' }
|
{ required: true, message: '请输入最佳用时', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
maxDuration: [
|
maxDuration: [
|
||||||
{ required: true, message: '请输入最大用时', trigger: 'blur' },
|
{ required: true, message: '请输入最大用时', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
trainingRemark: [
|
trainingRemark: [
|
||||||
{ required: true, max: 500, message: '请输入实训说明', trigger: 'blur' },
|
{ required: true, max: 500, message: '请输入实训说明', trigger: 'blur' }
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
return crules
|
return crules;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.type === 'ADD') {
|
if (this.type === 'ADD') {
|
||||||
return '创建操作规则'
|
return '创建操作规则';
|
||||||
} else {
|
} else {
|
||||||
return '编辑操作规则'
|
return '编辑操作规则';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -104,90 +102,89 @@
|
|||||||
this.skinStyleList = [];
|
this.skinStyleList = [];
|
||||||
getSkinStyleList().then(response => {
|
getSkinStyleList().then(response => {
|
||||||
this.skinStyleList = response.data.map(item => {
|
this.skinStyleList = response.data.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
// 获取实训类型
|
// 获取实训类型
|
||||||
this.trainingTypeList = [];
|
this.trainingTypeList = [];
|
||||||
this.$Dictionary.trainingType().then(list => {
|
this.$Dictionary.trainingType().then(list => {
|
||||||
this.trainingTypeList = list.map(item => {
|
this.trainingTypeList = list.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
// 获取实训操作类型
|
// 获取实训操作类型
|
||||||
this.trainingOperateTypeMap = {}
|
this.trainingOperateTypeMap = {};
|
||||||
this.$Dictionary.stationControl().then(list => {
|
this.$Dictionary.stationControl().then(list => {
|
||||||
this.trainingOperateTypeMap['01'] = list.map(item => {
|
this.trainingOperateTypeMap['01'] = list.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});; //控制权实训
|
}); // 控制权实训
|
||||||
});
|
});
|
||||||
this.$Dictionary.signalOperation().then(list => {
|
this.$Dictionary.signalOperation().then(list => {
|
||||||
this.trainingOperateTypeMap['02'] = list.map(item => {
|
this.trainingOperateTypeMap['02'] = list.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});; //信号机实训
|
}); // 信号机实训
|
||||||
});
|
});
|
||||||
this.$Dictionary.switchOperation().then(list => {
|
this.$Dictionary.switchOperation().then(list => {
|
||||||
this.trainingOperateTypeMap['03'] = list.map(item => {
|
this.trainingOperateTypeMap['03'] = list.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});; //道岔实训
|
}); // 道岔实训
|
||||||
});
|
});
|
||||||
this.$Dictionary.sectionOperation().then(list => {
|
this.$Dictionary.sectionOperation().then(list => {
|
||||||
this.trainingOperateTypeMap['04'] = list.map(item => {
|
this.trainingOperateTypeMap['04'] = list.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});; //区段实训
|
}); // 区段实训
|
||||||
});
|
});
|
||||||
this.$Dictionary.stationStandOperation().then(list => {
|
this.$Dictionary.stationStandOperation().then(list => {
|
||||||
this.trainingOperateTypeMap['05'] = list.map(item => {
|
this.trainingOperateTypeMap['05'] = list.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});; //站台实训
|
}); // 站台实训
|
||||||
});
|
});
|
||||||
this.$Dictionary.trainPlanOperation().then(list => {
|
this.$Dictionary.trainPlanOperation().then(list => {
|
||||||
this.trainingOperateTypeMap['06'] = list.map(item => {
|
this.trainingOperateTypeMap['06'] = list.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});; //行车计划实训
|
}); // 行车计划实训
|
||||||
});
|
});
|
||||||
this.$Dictionary.trainOperation().then(list => {
|
this.$Dictionary.trainOperation().then(list => {
|
||||||
this.trainingOperateTypeMap['07'] = list.map(item => {
|
this.trainingOperateTypeMap['07'] = list.map(item => {
|
||||||
let params = {}
|
const params = {};
|
||||||
params.label = item.name;
|
params.label = item.name;
|
||||||
params.value = item.code;
|
params.value = item.code;
|
||||||
return params;
|
return params;
|
||||||
});; //列车实训
|
}); // 列车实训
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async show(data) {
|
async show(data) {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
if (data && data.id) {
|
if (data && data.id) {
|
||||||
// 获取操作占位列表
|
// 获取操作占位列表
|
||||||
let res = await getPlaceholderList({ trainingType: data.trainingType, skinStyle: data.skinStyle });
|
const res = await getPlaceholderList({ trainingType: data.trainingType, skinStyle: data.skinStyle });
|
||||||
this.placeholderList = res.data;
|
this.placeholderList = res.data;
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
@ -198,13 +195,13 @@
|
|||||||
skinStyle: data.skinStyle,
|
skinStyle: data.skinStyle,
|
||||||
minDuration: data.minDuration,
|
minDuration: data.minDuration,
|
||||||
maxDuration: data.maxDuration,
|
maxDuration: data.maxDuration,
|
||||||
trainingRemark: this.repliceName(data.trainingRemark, this.placeholderList),
|
trainingRemark: this.repliceName(data.trainingRemark, this.placeholderList)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
repliceName(fieldValue, enumList) {
|
repliceName(fieldValue, enumList) {
|
||||||
if (enumList && enumList.length > 0) {
|
if (enumList && enumList.length > 0) {
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
if (fieldValue.includes(`{${enumList[i].id}}`)) {
|
if (fieldValue.includes(`{${enumList[i].id}}`)) {
|
||||||
fieldValue = fieldValue.replace(`{${enumList[i].id}}`, `{${enumList[i].name}}`);
|
fieldValue = fieldValue.replace(`{${enumList[i].id}}`, `{${enumList[i].name}}`);
|
||||||
}
|
}
|
||||||
@ -216,71 +213,71 @@
|
|||||||
// 获取操作占位列表
|
// 获取操作占位列表
|
||||||
getPlaceholderList({ trainingType: val, skinStyle: '02' }).then(res => {
|
getPlaceholderList({ trainingType: val, skinStyle: '02' }).then(res => {
|
||||||
this.placeholderList = res.data;
|
this.placeholderList = res.data;
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
addTrainName(val) {
|
addTrainName(val) {
|
||||||
this.formModel.trainingName = `${this.formModel.trainingName}{${val.name}}`
|
this.formModel.trainingName = `${this.formModel.trainingName}{${val.name}}`;
|
||||||
},
|
},
|
||||||
addTrainRemark(val) {
|
addTrainRemark(val) {
|
||||||
this.formModel.trainingRemark = `${this.formModel.trainingRemark}{${val.name}}`
|
this.formModel.trainingRemark = `${this.formModel.trainingRemark}{${val.name}}`;
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
if (self.type === 'ADD') {
|
if (self.type === 'ADD') {
|
||||||
self.create()
|
self.create();
|
||||||
} else {
|
} else {
|
||||||
self.update()
|
self.update();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.placeholderList.forEach(item => {
|
this.placeholderList.forEach(item => {
|
||||||
if (this.formModel.trainingName.includes(`{${item.name}}`)) {
|
if (this.formModel.trainingName.includes(`{${item.name}}`)) {
|
||||||
let name = this.formModel.trainingName.replace(`{${item.name}}`, `{${item.id}}`);
|
const name = this.formModel.trainingName.replace(`{${item.name}}`, `{${item.id}}`);
|
||||||
this.formModel.trainingName = name;
|
this.formModel.trainingName = name;
|
||||||
}
|
}
|
||||||
if (this.formModel.trainingRemark.includes(`{${item.name}}`)) {
|
if (this.formModel.trainingRemark.includes(`{${item.name}}`)) {
|
||||||
let remark = this.formModel.trainingRemark.replace(`{${item.name}}`, `{${item.id}}`);
|
const remark = this.formModel.trainingRemark.replace(`{${item.name}}`, `{${item.id}}`);
|
||||||
this.formModel.trainingRemark = remark;
|
this.formModel.trainingRemark = remark;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
postTrainingRulesData(this.formModel).then(response => {
|
postTrainingRulesData(this.formModel).then(response => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.success('创建操作定义成功')
|
self.$message.success('创建操作定义成功');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable')
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.error('创建操作定义失败:' + error.message)
|
self.$message.error('创建操作定义失败:' + error.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.placeholderList.forEach(item => {
|
this.placeholderList.forEach(item => {
|
||||||
if (this.formModel.trainingName.includes(`{${item.name}}`)) {
|
if (this.formModel.trainingName.includes(`{${item.name}}`)) {
|
||||||
let name = this.formModel.trainingName.replace(`{${item.name}}`, `{${item.id}}`);
|
const name = this.formModel.trainingName.replace(`{${item.name}}`, `{${item.id}}`);
|
||||||
this.formModel.trainingName = name;
|
this.formModel.trainingName = name;
|
||||||
}
|
}
|
||||||
if (this.formModel.trainingRemark.includes(`{${item.name}}`)) {
|
if (this.formModel.trainingRemark.includes(`{${item.name}}`)) {
|
||||||
let remark = this.formModel.trainingRemark.replace(`{${item.name}}`, `{${item.id}}`);
|
const remark = this.formModel.trainingRemark.replace(`{${item.name}}`, `{${item.id}}`);
|
||||||
this.formModel.trainingRemark = remark;
|
this.formModel.trainingRemark = remark;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
putTrainingRulesData(this.formModel).then(response => {
|
putTrainingRulesData(this.formModel).then(response => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.success('创建操作定义成功')
|
self.$message.success('创建操作定义成功');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable')
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.loading = false;
|
self.loading = false;
|
||||||
self.$message.error('创建操作定义失败:' + error.message)
|
self.$message.error('创建操作定义失败:' + error.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
@ -290,11 +287,11 @@
|
|||||||
skinStyle: '',
|
skinStyle: '',
|
||||||
minDuration: '',
|
minDuration: '',
|
||||||
maxDuration: '',
|
maxDuration: '',
|
||||||
trainingRemark: '',
|
trainingRemark: ''
|
||||||
}
|
};
|
||||||
this.$refs.dataform.resetForm()
|
this.$refs.dataform.resetForm();
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -61,7 +61,7 @@
|
|||||||
title: '设备类型',
|
title: '设备类型',
|
||||||
prop: 'deviceType',
|
prop: 'deviceType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.deviceType, this.deviceList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.deviceType, this.deviceList, ['value', 'label']) },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -136,18 +136,6 @@
|
|||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
return getOperateStepDataList(this.dicId, params)
|
return getOperateStepDataList(this.dicId, params)
|
||||||
},
|
},
|
||||||
// 转义
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleEdit(index, row) {
|
handleEdit(index, row) {
|
||||||
this.$refs.edit.show(row)
|
this.$refs.edit.show(row)
|
||||||
},
|
},
|
||||||
|
@ -72,21 +72,21 @@
|
|||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']) },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实训类型',
|
title: '实训类型',
|
||||||
prop: 'trainingType',
|
prop: 'trainingType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.trainingType, this.trainingTypeList, ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.trainingType, this.trainingTypeList, ['code', 'name']) },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作类型',
|
title: '操作类型',
|
||||||
prop: 'operateType',
|
prop: 'operateType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.operateType, this.trainingOperateTypeMap[row.trainingType], ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.trainingType], ['code', 'name']) },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -205,17 +205,6 @@
|
|||||||
return fieldValue;
|
return fieldValue;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 选择实训类型下的操作类型 暂时不用
|
// 选择实训类型下的操作类型 暂时不用
|
||||||
typeChoose(form) {
|
typeChoose(form) {
|
||||||
this.queryForm.queryObject.operateType.config.data = [];
|
this.queryForm.queryObject.operateType.config.data = [];
|
||||||
|
@ -1,28 +1,32 @@
|
|||||||
<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" />
|
||||||
</QueryListPage>
|
<training-draft
|
||||||
<training-draft ref="draftTrain" :skinStyleList="skinStyleList" :trainingTypeList="trainingTypeList"
|
ref="draftTrain"
|
||||||
:trainingOperateTypeMap="trainingOperateTypeMap" @refresh="reloadTable"></training-draft>
|
:skin-style-list="skinStyleList"
|
||||||
|
:training-type-list="trainingTypeList"
|
||||||
|
:training-operate-type-map="trainingOperateTypeMap"
|
||||||
|
@refresh="reloadTable"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listPublishMap, putMapProductOnLine, putMapProductOffLine } from '@/api/jmap/mapdraft';
|
// import { listPublishMap, putMapProductOnLine, putMapProductOffLine } from '@/api/jmap/mapdraft';
|
||||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
// import { getPublishMapInfo } from '@/api/jmap/map';
|
||||||
import { pageQueryTraining } from '@/api/jmap/training';
|
import { pageQueryTraining } from '@/api/jmap/training';
|
||||||
import { trainingNotify } from '@/api/simulation';
|
import { trainingNotify } from '@/api/simulation';
|
||||||
import { getCommodityMapProduct, getProductList } from '@/api/management/mapprd';
|
import { getCommodityMapProduct, getProductList } from '@/api/management/mapprd';
|
||||||
import { launchFullscreen } from '@/utils/screen';
|
import { launchFullscreen } from '@/utils/screen';
|
||||||
import { getSkinStyleList } from '@/api/management/mapskin';
|
import { getSkinStyleList } from '@/api/management/mapskin';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import TrainingDraft from './draft';
|
import TrainingDraft from './draft';
|
||||||
import localStore from 'storejs';
|
import localStore from 'storejs';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainingGeneration',
|
name: 'TrainingGeneration',
|
||||||
components: {
|
components: {
|
||||||
TrainingDraft,
|
TrainingDraft
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -95,29 +99,29 @@
|
|||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '产品',
|
title: '产品',
|
||||||
prop: 'prdCode',
|
prop: 'prdCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.prdCode, this.prdTypeList, ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.prdCode, this.prdTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实训类型',
|
title: '实训类型',
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.type, this.trainingTypeList, ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.type, this.trainingTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作类型',
|
title: '操作类型',
|
||||||
prop: 'operateType',
|
prop: 'operateType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.operateType, this.trainingOperateTypeMap[row.type], ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '最小用时',
|
title: '最小用时',
|
||||||
@ -147,16 +151,16 @@
|
|||||||
actions: [
|
actions: [
|
||||||
{ text: '生成实训', btnCode: 'employee_insert', handler: this.autoMaticTrainging },
|
{ text: '生成实训', btnCode: 'employee_insert', handler: this.autoMaticTrainging },
|
||||||
{ text: '修改实训', btnCode: 'employee_insert', handler: this.editTrainingByType, type: 'warning' },
|
{ text: '修改实训', btnCode: 'employee_insert', handler: this.editTrainingByType, type: 'warning' },
|
||||||
{ text: '删除实训', btnCode: 'employee_insert', handler: this.delAutoMaticTrainging, type: 'danger', },
|
{ text: '删除实训', btnCode: 'employee_insert', handler: this.delAutoMaticTrainging, type: 'danger' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
async created() {
|
async created() {
|
||||||
await this.loadInitData();
|
await this.loadInitData();
|
||||||
let json = localStore.get(this.$route.path);
|
const json = localStore.get(this.$route.path);
|
||||||
if (json && json.type) {
|
if (json && json.type) {
|
||||||
this.typeChoose(json);
|
this.typeChoose(json);
|
||||||
}
|
}
|
||||||
@ -172,16 +176,16 @@
|
|||||||
this.skinStyleList = response.data;
|
this.skinStyleList = response.data;
|
||||||
response.data.forEach(elem => {
|
response.data.forEach(elem => {
|
||||||
this.queryForm.queryObject.skinStyle.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.skinStyle.config.data.push({ value: elem.code, label: elem.name });
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
this.prdTypeList = [];
|
this.prdTypeList = [];
|
||||||
getProductList({ pageSize: 500, pageNum: 1 }).then(res => {
|
getProductList({ pageSize: 500, pageNum: 1 }).then(res => {
|
||||||
let list = res.data.list;
|
const list = res.data.list;
|
||||||
if (list && list.length > 0) {
|
if (list && list.length > 0) {
|
||||||
this.prdTypeList = list.filter(elem => { return elem.prdType != '03'; });
|
this.prdTypeList = list.filter(elem => { return elem.prdType != '03'; });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
// 获取实训类型
|
// 获取实训类型
|
||||||
this.trainingTypeList = [];
|
this.trainingTypeList = [];
|
||||||
@ -190,40 +194,40 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
this.trainingOperateTypeMap = {}
|
this.trainingOperateTypeMap = {};
|
||||||
let list01 = await this.$Dictionary.stationControl();
|
const list01 = await this.$Dictionary.stationControl();
|
||||||
this.trainingOperateTypeMap['01'] = list01; //控制权实训
|
this.trainingOperateTypeMap['01'] = list01; // 控制权实训
|
||||||
let list02 = await this.$Dictionary.signalOperation();
|
const list02 = await this.$Dictionary.signalOperation();
|
||||||
this.trainingOperateTypeMap['02'] = list02; //信号机实训
|
this.trainingOperateTypeMap['02'] = list02; // 信号机实训
|
||||||
let list03 = await this.$Dictionary.switchOperation();
|
const list03 = await this.$Dictionary.switchOperation();
|
||||||
this.trainingOperateTypeMap['03'] = list03; //道岔实训
|
this.trainingOperateTypeMap['03'] = list03; // 道岔实训
|
||||||
let list04 = await this.$Dictionary.sectionOperation();
|
const list04 = await this.$Dictionary.sectionOperation();
|
||||||
this.trainingOperateTypeMap['04'] = list04; //区段实训
|
this.trainingOperateTypeMap['04'] = list04; // 区段实训
|
||||||
let list05 = await this.$Dictionary.stationStandOperation();
|
const list05 = await this.$Dictionary.stationStandOperation();
|
||||||
this.trainingOperateTypeMap['05'] = list05; //站台实训
|
this.trainingOperateTypeMap['05'] = list05; // 站台实训
|
||||||
let list06 = await this.$Dictionary.trainPlanOperation();
|
const list06 = await this.$Dictionary.trainPlanOperation();
|
||||||
this.trainingOperateTypeMap['06'] = list06; //行车计划实训
|
this.trainingOperateTypeMap['06'] = list06; // 行车计划实训
|
||||||
let list07 = await this.$Dictionary.trainOperation();
|
const list07 = await this.$Dictionary.trainOperation();
|
||||||
this.trainingOperateTypeMap['07'] = list07; //列车实训
|
this.trainingOperateTypeMap['07'] = list07; // 列车实训
|
||||||
let list08 = await this.$Dictionary.limitOperation();
|
const list08 = await this.$Dictionary.limitOperation();
|
||||||
this.trainingOperateTypeMap['08'] = list08; //限速实训
|
this.trainingOperateTypeMap['08'] = list08; // 限速实训
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
},
|
},
|
||||||
loadInitQueryList(form) {
|
loadInitQueryList(form) {
|
||||||
if (form && form.skinStyle) {
|
if (form && form.skinStyle) {
|
||||||
getCommodityMapProduct(form.skinStyle).then((response) => {
|
getCommodityMapProduct(form.skinStyle).then((response) => {
|
||||||
let productList = response.data;
|
const productList = response.data;
|
||||||
if (productList && productList.length > 0) {
|
if (productList && productList.length > 0) {
|
||||||
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.prdCode.config.data.push({ value: elem.code, label: elem.name });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
skinStyleChoose(form) {
|
skinStyleChoose(form) {
|
||||||
@ -243,14 +247,14 @@
|
|||||||
if (form && form.type) {
|
if (form && form.type) {
|
||||||
this.trainingOperateTypeMap[form.type].forEach(elem => {
|
this.trainingOperateTypeMap[form.type].forEach(elem => {
|
||||||
this.queryForm.queryObject.operateType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.operateType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
convertField(fieldValue, enumList, converFormat) {
|
||||||
if (converFormat && converFormat.length >= 2) {
|
if (converFormat && converFormat.length >= 2) {
|
||||||
let value = converFormat[0];
|
const value = converFormat[0];
|
||||||
let label = converFormat[1];
|
const label = converFormat[1];
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
for (let i = 0; i < enumList.length; i++) {
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
if ('' + fieldValue === '' + enumList[i][value]) {
|
||||||
return enumList[i][label];
|
return enumList[i][label];
|
||||||
}
|
}
|
||||||
@ -269,18 +273,18 @@
|
|||||||
demoDisplay(index, node) {
|
demoDisplay(index, node) {
|
||||||
trainingNotify({ trainingId: node.id }).then(resp => {
|
trainingNotify({ trainingId: node.id }).then(resp => {
|
||||||
/** 区分演示和正式,需要在演示时设置lessonId为0*/
|
/** 区分演示和正式,需要在演示时设置lessonId为0*/
|
||||||
let query = { group: resp.data, trainingId: node.id, lessonId: 0 };
|
const query = { group: resp.data, trainingId: node.id, lessonId: 0 };
|
||||||
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
|
this.$router.push({ path: `${UrlConfig.display}/manage`, query: query });
|
||||||
|
|
||||||
launchFullscreen();
|
launchFullscreen();
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||||
})
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
@ -9,9 +9,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { create, checkDicCodeExist, getData, update } from '@/api/management/dictionary'
|
import { create, checkDicCodeExist, getData, update } from '@/api/management/dictionary';
|
||||||
import { validateCharCode } from '@/utils/validate'
|
import { validateCharCode } from '@/utils/validate';
|
||||||
export default {
|
export default {
|
||||||
name: 'DictionaryEdit',
|
name: 'DictionaryEdit',
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
@ -28,12 +28,12 @@
|
|||||||
status: '1',
|
status: '1',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let isAdd = this.type === 'ADD'
|
const isAdd = this.type === 'ADD';
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '60px',
|
labelWidth: '60px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'code', label: '编码', type: 'text', required: true, disabled: !isAdd },
|
{ prop: 'code', label: '编码', type: 'text', required: true, disabled: !isAdd },
|
||||||
@ -41,13 +41,13 @@
|
|||||||
{
|
{
|
||||||
prop: 'status', label: '状态', type: 'select', required: true, options: this.$ConstSelect.Status
|
prop: 'status', label: '状态', type: 'select', required: true, options: this.$ConstSelect.Status
|
||||||
},
|
},
|
||||||
{ prop: 'remarks', label: '备注', type: 'textarea', required: false },
|
{ prop: 'remarks', label: '备注', type: 'textarea', required: false }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
const crules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
||||||
@ -58,7 +58,7 @@
|
|||||||
remarks: [
|
remarks: [
|
||||||
{ max: 50, message: '不能超过 50 个字符', trigger: 'blur' }
|
{ max: 50, message: '不能超过 50 个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
if (this.type === 'ADD') {
|
if (this.type === 'ADD') {
|
||||||
return Object.assign(crules, {
|
return Object.assign(crules, {
|
||||||
code: [
|
code: [
|
||||||
@ -66,75 +66,73 @@
|
|||||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' },
|
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' },
|
||||||
{ validator: this.validateCode, trigger: 'blur' }
|
{ validator: this.validateCode, trigger: 'blur' }
|
||||||
]
|
]
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return crules
|
return crules;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.type === 'ADD') {
|
if (this.type === 'ADD') {
|
||||||
return '创建目录'
|
return '创建目录';
|
||||||
} else {
|
} else {
|
||||||
return '编辑目录'
|
return '编辑目录';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
validateCode(rule, value, callback) {
|
validateCode(rule, value, callback) {
|
||||||
if (!validateCharCode(value)) {
|
if (!validateCharCode(value)) {
|
||||||
return callback(new Error('格式不正确,只能是字符/数字/_'))
|
return callback(new Error('格式不正确,只能是字符/数字/_'));
|
||||||
} else {
|
} else {
|
||||||
checkDicCodeExist(value).then(response => {
|
checkDicCodeExist(value).then(response => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
return callback(new Error('编码已存在'))
|
return callback(new Error('编码已存在'));
|
||||||
} else {
|
} else {
|
||||||
return callback()
|
return callback();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
return callback(new Error('服务异常'))
|
return callback(new Error('服务异常'));
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show(id) {
|
show(id) {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
if (id) {
|
if (id) {
|
||||||
getData(id).then(response => {
|
getData(id).then(response => {
|
||||||
this.formModel = response.data
|
this.formModel = response.data;
|
||||||
this.$refs.dataform.resetForm()
|
this.$refs.dataform.resetForm();
|
||||||
}).catch(error => {
|
});
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
if (self.type === 'ADD') {
|
if (self.type === 'ADD') {
|
||||||
self.create()
|
self.create();
|
||||||
} else {
|
} else {
|
||||||
self.update()
|
self.update();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
let self = this
|
const self = this;
|
||||||
create(this.formModel).then(response => {
|
create(this.formModel).then(response => {
|
||||||
self.$message.success('创建字典目录成功')
|
self.$message.success('创建字典目录成功');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable')
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('创建字典目录失败:' + error.message)
|
self.$message.error('创建字典目录失败:' + error.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
let self = this
|
const self = this;
|
||||||
update(this.formModel).then(response => {
|
update(this.formModel).then(response => {
|
||||||
self.$message.success('更新字典目录成功')
|
self.$message.success('更新字典目录成功');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable')
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('更新字典目录失败:' + error.message)
|
self.$message.error('更新字典目录失败:' + error.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
@ -142,14 +140,14 @@
|
|||||||
name: '',
|
name: '',
|
||||||
status: '1',
|
status: '1',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
}
|
};
|
||||||
this.$refs.dataform.resetForm()
|
this.$refs.dataform.resetForm();
|
||||||
if (done) {
|
if (done) {
|
||||||
done()
|
done();
|
||||||
} else {
|
} else {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,16 +1,15 @@
|
|||||||
<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" />
|
||||||
</QueryListPage>
|
<dictionary-edit ref="create" type="ADD" @reloadTable="reloadTable" />
|
||||||
<dictionary-edit ref="create" type="ADD" @reloadTable="reloadTable"></dictionary-edit>
|
<dictionary-edit ref="edit" type="EDIT" @reloadTable="reloadTable" />
|
||||||
<dictionary-edit ref="edit" type="EDIT" @reloadTable="reloadTable"></dictionary-edit>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list, create, del } from '@/api/management/dictionary'
|
import { list, del } from '@/api/management/dictionary';
|
||||||
import DictionaryEdit from '@/views/management/dictionary/edit'
|
import DictionaryEdit from '@/views/management/dictionary/edit';
|
||||||
export default {
|
export default {
|
||||||
name: 'Dictionary',
|
name: 'Dictionary',
|
||||||
components: {
|
components: {
|
||||||
DictionaryEdit
|
DictionaryEdit
|
||||||
@ -60,8 +59,8 @@
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.status, 'Status') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.status, 'Status'); },
|
||||||
tagType: (row) => { if (row.status === '0') { return 'danger' } else { return 'success' } }
|
tagType: (row) => { if (row.status === '0') { return 'danger'; } else { return 'success'; } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '说明',
|
title: '说明',
|
||||||
@ -84,31 +83,31 @@
|
|||||||
name: '删除',
|
name: '删除',
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '新增', handler: this.handleAdd },
|
{ text: '新增', handler: this.handleAdd }
|
||||||
// { text: '批量删除', btnCode: 'employee_delete', handler: this.handleBatchDelete, type: 'danger' }
|
// { text: '批量删除', btnCode: 'employee_delete', handler: this.handleBatchDelete, type: 'danger' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
handleViewDetail(index, row) {
|
handleViewDetail(index, row) {
|
||||||
this.$router.push({ path: `/system/dictionary/detail`, query: { id: row.id } })
|
this.$router.push({ path: `/system/dictionary/detail`, query: { id: row.id } });
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEdit(index, row) {
|
handleEdit(index, row) {
|
||||||
this.$refs.edit.show(row.id)
|
this.$refs.edit.show(row.id);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.create.show()
|
this.$refs.create.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
handleBatchDelete() {
|
handleBatchDelete() {
|
||||||
@ -121,18 +120,18 @@
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
del(row.id).then(response => {
|
del(row.id).then(response => {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功');
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
this.$messageBox('删除失败')
|
this.$messageBox('删除失败');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||||
@ -9,9 +9,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { create, checkDicDetailCodeExist, getData, update } from '@/api/management/dictionaryDetail'
|
import { create, checkDicDetailCodeExist, getData, update } from '@/api/management/dictionaryDetail';
|
||||||
import { validateCharCode } from '@/utils/validate'
|
import { validateCharCode } from '@/utils/validate';
|
||||||
export default {
|
export default {
|
||||||
name: 'DictionaryDetailEdit',
|
name: 'DictionaryDetailEdit',
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
@ -32,12 +32,12 @@
|
|||||||
status: '1',
|
status: '1',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let isAdd = this.type === 'ADD'
|
const isAdd = this.type === 'ADD';
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '60px',
|
labelWidth: '60px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'code', label: '编码', type: 'text', required: true, disabled: !isAdd },
|
{ prop: 'code', label: '编码', type: 'text', required: true, disabled: !isAdd },
|
||||||
@ -45,13 +45,13 @@
|
|||||||
{
|
{
|
||||||
prop: 'status', label: '状态', type: 'select', required: true, options: this.$ConstSelect.Status
|
prop: 'status', label: '状态', type: 'select', required: true, options: this.$ConstSelect.Status
|
||||||
},
|
},
|
||||||
{ prop: 'remarks', label: '备注', type: 'textarea', required: false },
|
{ prop: 'remarks', label: '备注', type: 'textarea', required: false }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
const crules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
{ required: true, message: '请输入名称', trigger: 'blur' },
|
||||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
||||||
@ -62,7 +62,7 @@
|
|||||||
remarks: [
|
remarks: [
|
||||||
{ max: 50, message: '不能超过 50 个字符', trigger: 'blur' }
|
{ max: 50, message: '不能超过 50 个字符', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
if (this.type === 'ADD') {
|
if (this.type === 'ADD') {
|
||||||
return Object.assign(crules, {
|
return Object.assign(crules, {
|
||||||
code: [
|
code: [
|
||||||
@ -70,75 +70,73 @@
|
|||||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' },
|
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' },
|
||||||
{ validator: this.validateCode, trigger: 'blur' }
|
{ validator: this.validateCode, trigger: 'blur' }
|
||||||
]
|
]
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
return crules
|
return crules;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.type === 'ADD') {
|
if (this.type === 'ADD') {
|
||||||
return '创建明细'
|
return '创建明细';
|
||||||
} else {
|
} else {
|
||||||
return '编辑明细'
|
return '编辑明细';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
validateCode(rule, value, callback) {
|
validateCode(rule, value, callback) {
|
||||||
if (!validateCharCode(value)) {
|
if (!validateCharCode(value)) {
|
||||||
return callback(new Error('格式不正确,只能是字符/数字/_'))
|
return callback(new Error('格式不正确,只能是字符/数字/_'));
|
||||||
} else {
|
} else {
|
||||||
checkDicDetailCodeExist(this.dicId, value).then(response => {
|
checkDicDetailCodeExist(this.dicId, value).then(response => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
return callback(new Error('编码已存在'))
|
return callback(new Error('编码已存在'));
|
||||||
} else {
|
} else {
|
||||||
return callback()
|
return callback();
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
return callback(new Error('服务异常'))
|
return callback(new Error('服务异常'));
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show(id) {
|
show(id) {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
if (id) {
|
if (id) {
|
||||||
getData(this.dicId, id).then(response => {
|
getData(this.dicId, id).then(response => {
|
||||||
this.formModel = response.data
|
this.formModel = response.data;
|
||||||
this.$refs.dataform.resetForm()
|
this.$refs.dataform.resetForm();
|
||||||
}).catch(error => {
|
});
|
||||||
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
if (self.type === 'ADD') {
|
if (self.type === 'ADD') {
|
||||||
self.create()
|
self.create();
|
||||||
} else {
|
} else {
|
||||||
self.update()
|
self.update();
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
let self = this
|
const self = this;
|
||||||
create(this.dicId, this.formModel).then(response => {
|
create(this.dicId, this.formModel).then(response => {
|
||||||
self.$message.success('创建字典目录成功')
|
self.$message.success('创建字典目录成功');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable')
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('创建字典目录失败:' + error.message)
|
self.$message.error('创建字典目录失败:' + error.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
let self = this
|
const self = this;
|
||||||
update(this.dicId, this.formModel).then(response => {
|
update(this.dicId, this.formModel).then(response => {
|
||||||
self.$message.success('更新字典目录成功')
|
self.$message.success('更新字典目录成功');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable')
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('更新字典目录失败:' + error.message)
|
self.$message.error('更新字典目录失败:' + error.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
@ -146,14 +144,14 @@
|
|||||||
name: '',
|
name: '',
|
||||||
status: '1',
|
status: '1',
|
||||||
remarks: ''
|
remarks: ''
|
||||||
}
|
};
|
||||||
this.$refs.dataform.resetForm()
|
this.$refs.dataform.resetForm();
|
||||||
if (done) {
|
if (done) {
|
||||||
done()
|
done();
|
||||||
} else {
|
} else {
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,25 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!-- <turnback-bar :title="turnbackBarTitle"></turnback-bar> -->
|
<!-- <turnback-bar :title="turnbackBarTitle"></turnback-bar> -->
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</QueryListPage>
|
|
||||||
<div class="draft">
|
<div class="draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="turnback">返回</el-button>
|
<el-button type="primary" @click="turnback">返回</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<dictionary-detail-edit ref="create" type="ADD" :dicId="dicId" @reloadTable="reloadTable">
|
<dictionary-detail-edit ref="create" type="ADD" :dic-id="dicId" @reloadTable="reloadTable" />
|
||||||
</dictionary-detail-edit>
|
<dictionary-detail-edit ref="edit" type="EDIT" :dic-id="dicId" @reloadTable="reloadTable" />
|
||||||
<dictionary-detail-edit ref="edit" type="EDIT" :dicId="dicId" @reloadTable="reloadTable">
|
|
||||||
</dictionary-detail-edit>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { list, create, del } from '@/api/management/dictionaryDetail'
|
import { list, del } from '@/api/management/dictionaryDetail';
|
||||||
import { getData } from '@/api/management/dictionary'
|
import { getData } from '@/api/management/dictionary';
|
||||||
import DictionaryDetailEdit from '@/views/management/dictionaryDetail/edit'
|
import DictionaryDetailEdit from '@/views/management/dictionaryDetail/edit';
|
||||||
export default {
|
export default {
|
||||||
name: 'DictionaryDetail',
|
name: 'DictionaryDetail',
|
||||||
components: {
|
components: {
|
||||||
DictionaryDetailEdit
|
DictionaryDetailEdit
|
||||||
@ -71,8 +68,8 @@
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.status, 'Status') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.status, 'Status'); },
|
||||||
tagType: (row) => { if (row.status === '0') { return 'danger' } else { return 'success' } }
|
tagType: (row) => { if (row.status === '0') { return 'danger'; } else { return 'success'; } }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '说明',
|
title: '说明',
|
||||||
@ -91,18 +88,18 @@
|
|||||||
name: '删除',
|
name: '删除',
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '新增', btnCode: 'employee_insert', handler: this.handleAdd },
|
{ text: '新增', btnCode: 'employee_insert', handler: this.handleAdd }
|
||||||
// { text: '批量删除', btnCode: 'employee_delete', handler: this.handleBatchDelete, type: 'danger' }
|
// { text: '批量删除', btnCode: 'employee_delete', handler: this.handleBatchDelete, type: 'danger' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
// computed: {
|
// computed: {
|
||||||
@ -114,23 +111,21 @@
|
|||||||
created() {
|
created() {
|
||||||
this.dicId = this.$route.query.id;
|
this.dicId = this.$route.query.id;
|
||||||
getData(this.dicId).then(response => {
|
getData(this.dicId).then(response => {
|
||||||
this.dic = response.data
|
this.dic = response.data;
|
||||||
}).catch(error => {
|
});
|
||||||
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
queryFunction(params) {
|
queryFunction(params) {
|
||||||
return list(this.dicId, params)
|
return list(this.dicId, params);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEdit(index, row) {
|
handleEdit(index, row) {
|
||||||
this.$refs.edit.show(row.id)
|
this.$refs.edit.show(row.id);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.create.show()
|
this.$refs.create.show();
|
||||||
},
|
},
|
||||||
|
|
||||||
handleBatchDelete() {
|
handleBatchDelete() {
|
||||||
@ -139,23 +134,23 @@
|
|||||||
|
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
del(this.dicId, row.id).then(response => {
|
del(this.dicId, row.id).then(response => {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功');
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
this.$messageBox('删除失败')
|
this.$messageBox('删除失败');
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
},
|
},
|
||||||
|
|
||||||
turnback() {
|
turnback() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.draft {
|
.draft {
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
<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" />
|
||||||
</QueryListPage>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getExistingSimulation,deleteExistingSimulation } from '@/api/simulation';
|
import { getExistingSimulation, deleteExistingSimulation } from '@/api/simulation';
|
||||||
export default {
|
export default {
|
||||||
name: 'SimulationManage',
|
name: 'SimulationManage',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
@ -80,7 +79,7 @@
|
|||||||
title: '是否错误',
|
title: '是否错误',
|
||||||
prop: 'error',
|
prop: 'error',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.error, 'Whether') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.error, 'Whether'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.error) {
|
switch (row.error) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
@ -96,7 +95,7 @@
|
|||||||
title: '是否暂停',
|
title: '是否暂停',
|
||||||
prop: 'pause',
|
prop: 'pause',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.pause, 'Whether') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.pause, 'Whether'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.pause) {
|
switch (row.pause) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
@ -108,7 +107,7 @@
|
|||||||
title: '是否按计划行车',
|
title: '是否按计划行车',
|
||||||
prop: 'runAsPlan',
|
prop: 'runAsPlan',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.runAsPlan, 'Whether') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.runAsPlan, 'Whether'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.runAsPlan) {
|
switch (row.runAsPlan) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
@ -120,21 +119,21 @@
|
|||||||
title: '皮肤编号',
|
title: '皮肤编号',
|
||||||
prop: 'skinCode',
|
prop: 'skinCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinCode, this.$ConstSelect.skinCode, ['value', 'label'])},
|
columnValue: (row) => { return this.$convertField(row.skinCode, this.$ConstSelect.skinCode, ['value', 'label']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '仿真类型',
|
title: '仿真类型',
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.type, this.$ConstSelect.SimulationType, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.type, this.$ConstSelect.SimulationType, ['value', 'label']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '仿真成员ID',
|
title: '仿真成员ID',
|
||||||
prop: 'sessionList',
|
prop: 'sessionList',
|
||||||
type: 'basicText',
|
type: 'basicText',
|
||||||
columnValue: (row) => { return this.listJoiningTogether(row.sessionList) }
|
columnValue: (row) => { return this.listJoiningTogether(row.sessionList); }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -144,14 +143,14 @@
|
|||||||
{
|
{
|
||||||
name: '销毁',
|
name: '销毁',
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
type: 'danger',
|
type: 'danger'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$Dictionary.productType().then(list => {
|
this.$Dictionary.productType().then(list => {
|
||||||
@ -161,24 +160,13 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
listJoiningTogether(sessionList) {
|
listJoiningTogether(sessionList) {
|
||||||
let sessionId = '';
|
let sessionId = '';
|
||||||
if(sessionList.length>0){
|
if (sessionList.length>0) {
|
||||||
sessionList.forEach((item) => {
|
sessionList.forEach((item) => {
|
||||||
sessionId = sessionId+item+',';
|
sessionId = sessionId+item+',';
|
||||||
});
|
});
|
||||||
sessionId = sessionId.substring(0,sessionId.length-1);
|
sessionId = sessionId.substring(0, sessionId.length-1);
|
||||||
}
|
}
|
||||||
return sessionId;
|
return sessionId;
|
||||||
},
|
},
|
||||||
@ -190,17 +178,17 @@
|
|||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteExistingSimulation(row.group).then(response => {
|
deleteExistingSimulation(row.group).then(response => {
|
||||||
this.$message.success('删除成功');
|
this.$message.success('删除成功');
|
||||||
this.reloadTable()
|
|
||||||
}).catch(error => {
|
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$messageBox('删除失败')
|
}).catch(() => {
|
||||||
})
|
this.reloadTable();
|
||||||
})
|
this.$messageBox('删除失败');
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
<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" />
|
||||||
</QueryListPage>
|
<dictionary-edit ref="edit" @reloadTable="reloadTable" />
|
||||||
<dictionary-edit ref="edit" @reloadTable="reloadTable"></dictionary-edit>
|
<correlation-map ref="correlationMap" />
|
||||||
<correlation-map ref="correlationMap"></correlation-map>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getUserList } from '@/api/management/user';
|
import { getUserList } from '@/api/management/user';
|
||||||
import localStore from 'storejs';
|
import DictionaryEdit from './edit';
|
||||||
import DictionaryEdit from './edit'
|
import CorrelationMap from './correlationMap';
|
||||||
import CorrelationMap from './correlationMap';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserControl',
|
name: 'UserControl',
|
||||||
components: {
|
components: {
|
||||||
DictionaryEdit,
|
DictionaryEdit,
|
||||||
@ -68,8 +66,8 @@
|
|||||||
title: '角色',
|
title: '角色',
|
||||||
prop: 'roles',
|
prop: 'roles',
|
||||||
type: 'tagMore',
|
type: 'tagMore',
|
||||||
columnValue: (row) => { return this.convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -78,41 +76,26 @@
|
|||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '编辑',
|
name: '编辑',
|
||||||
handleClick: this.handleUserEdit,
|
handleClick: this.handleUserEdit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '订阅地图',
|
name: '订阅地图',
|
||||||
handleClick: this.handleMapCorrelation,
|
handleClick: this.handleMapCorrelation,
|
||||||
type: 'danger',
|
type: 'danger'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
let arr = [];
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
enumList.forEach((element, i) => {
|
|
||||||
fieldValue.forEach((v, j) => {
|
|
||||||
if ('' + fieldValue[j] === '' + enumList[i][value]) {
|
|
||||||
arr.push(enumList[i][label])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
},
|
|
||||||
// 编辑
|
// 编辑
|
||||||
handleUserEdit(index, row) {
|
handleUserEdit(index, row) {
|
||||||
this.$refs.edit.doShow(row)
|
this.$refs.edit.doShow(row);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
@ -130,17 +113,17 @@
|
|||||||
// this.reloadTable()
|
// this.reloadTable()
|
||||||
// this.$messageBox('删除失败')
|
// this.$messageBox('删除失败')
|
||||||
// })
|
// })
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//关联地图
|
// 关联地图
|
||||||
handleMapCorrelation(index, row) {
|
handleMapCorrelation(index, row) {
|
||||||
this.$refs.correlationMap.doShow(row);
|
this.$refs.correlationMap.doShow(row);
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -57,7 +57,7 @@
|
|||||||
title: '考试结果',
|
title: '考试结果',
|
||||||
prop: 'result',
|
prop: 'result',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.result, this.$ConstSelect.examResultList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.result, this.$ConstSelect.examResultList, ['value', 'label']) },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.result) {
|
switch (row.result) {
|
||||||
case '01': return 'warning';
|
case '01': return 'warning';
|
||||||
@ -108,17 +108,6 @@
|
|||||||
loadInitData() {
|
loadInitData() {
|
||||||
|
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
edit(index, row) {
|
edit(index, row) {
|
||||||
|
@ -129,17 +129,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
edit(index, row) {
|
edit(index, row) {
|
||||||
|
@ -1,34 +1,32 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<add-training ref="addTraining" @selectTrain="selectTrain"></add-training>
|
<add-training ref="addTraining" @selectTrain="selectTrain" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { create, checkDicDetailCodeExist, getData } from '@/api/management/dictionaryDetail'
|
import { addUserTraining } from '@/api/jmap/training';
|
||||||
import { addUserTraining } from '@/api/jmap/training';
|
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||||
import { validateCharCode } from '@/utils/validate';
|
import { getDimUserList } from '@/api/management/user';
|
||||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
import AddTraining from './addTraining';
|
||||||
import { getDimUserList } from '@/api/management/user';
|
|
||||||
import AddTraining from './addTraining';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UsersTrainingAdd',
|
name: 'UsersTrainingAdd',
|
||||||
|
components: {
|
||||||
|
AddTraining
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
}
|
||||||
},
|
|
||||||
components: {
|
|
||||||
AddTraining,
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -39,46 +37,46 @@
|
|||||||
trainingName: '',
|
trainingName: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
duration: '',
|
duration: ''
|
||||||
},
|
},
|
||||||
LessonList: [],
|
LessonList: [],
|
||||||
UserList: [],
|
UserList: [],
|
||||||
UserLoading: false,
|
UserLoading: false
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let isAdd = this.type === 'ADD'
|
this.type === 'ADD';
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'lessonId', label: '课程名称', type: 'select', required: true, options: this.LessonList, },
|
{ prop: 'lessonId', label: '课程名称', type: 'select', required: true, options: this.LessonList },
|
||||||
{ prop: 'trainingName', label: '实训名称', type: 'text', required: true, rightWidth: true, disabled: true, buttontip: '选择实训', buttonClick: this.buttonClick, placeholder: '请选择实训' },
|
{ prop: 'trainingName', label: '实训名称', type: 'text', required: true, rightWidth: true, disabled: true, buttontip: '选择实训', buttonClick: this.buttonClick, placeholder: '请选择实训' },
|
||||||
{ prop: 'userName', label: '用户名称', type: 'complete', required: false, placeholder: '', querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
{ prop: 'userName', label: '用户名称', type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
||||||
{ prop: 'duration', label: '实训时长', type: 'text', required: true, rightWidth: true, message: 's' },
|
{ prop: 'duration', label: '实训时长', type: 'text', required: true, rightWidth: true, message: 's' }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
const crules = {
|
||||||
lessonId: [
|
lessonId: [
|
||||||
{ required: true, message: '请输入教学名称', trigger: 'change' },
|
{ required: true, message: '请输入教学名称', trigger: 'change' }
|
||||||
],
|
],
|
||||||
trainingName: [
|
trainingName: [
|
||||||
{ required: true, message: '请选择实训', trigger: 'change' },
|
{ required: true, message: '请选择实训', trigger: 'change' }
|
||||||
],
|
],
|
||||||
userName: [
|
userName: [
|
||||||
{ required: true, message: '请输入用户名称', trigger: 'change' },
|
{ required: true, message: '请输入用户名称', trigger: 'change' }
|
||||||
],
|
],
|
||||||
duration: [
|
duration: [
|
||||||
{ required: true, message: '请输入时长', trigger: 'blur' },
|
{ required: true, message: '请输入时长', trigger: 'blur' }
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
return crules
|
return crules;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '创建用户实训'
|
return '创建用户实训';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -86,36 +84,36 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
//加载发布课程列表
|
// 加载发布课程列表
|
||||||
this.LessonList.length = 0;
|
this.LessonList.length = 0;
|
||||||
this.UserList.length = 0;
|
this.UserList.length = 0;
|
||||||
getPublishLessonList().then(response => {
|
getPublishLessonList().then(response => {
|
||||||
let 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.id, label: elem.name });
|
this.LessonList.push({ value: elem.id, label: elem.name });
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 搜索查询input
|
// 搜索查询input
|
||||||
async querySearchAsync(queryString, cb) {
|
async querySearchAsync(queryString, cb) {
|
||||||
// 根据queryString 查询用户 并显示
|
// 根据queryString 查询用户 并显示
|
||||||
let results = [];
|
const results = [];
|
||||||
if (queryString) {
|
if (queryString) {
|
||||||
try {
|
try {
|
||||||
let params = {
|
const params = {
|
||||||
fuzzyParam: queryString,
|
fuzzyParam: queryString
|
||||||
};
|
};
|
||||||
let res = await getDimUserList(params);
|
const res = await getDimUserList(params);
|
||||||
let list = res.data;
|
const list = res.data;
|
||||||
list.forEach(item => {
|
list.forEach(item => {
|
||||||
let value = {
|
const value = {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
value: `${item.nickname}(${item.name})${item.mobile}`
|
value: `${item.nickname}(${item.name})${item.mobile}`
|
||||||
}
|
};
|
||||||
results.push(value);
|
results.push(value);
|
||||||
})
|
});
|
||||||
cb(results);
|
cb(results);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '查询用户list');
|
console.error(error, '查询用户list');
|
||||||
@ -136,11 +134,11 @@
|
|||||||
if (this.formModel.lessonId) {
|
if (this.formModel.lessonId) {
|
||||||
this.$refs.addTraining.show(this.formModel.lessonId);
|
this.$refs.addTraining.show(this.formModel.lessonId);
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请先选择课程名称')
|
this.$message.error('请先选择课程名称');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
show(data) {
|
show(data) {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
// this.formModel = {
|
// this.formModel = {
|
||||||
// lessonId: '',
|
// lessonId: '',
|
||||||
// trainingId: '',
|
// trainingId: '',
|
||||||
@ -151,23 +149,23 @@
|
|||||||
// };
|
// };
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
self.save()
|
self.save();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
let self = this
|
const self = this;
|
||||||
if (this.formModel.userId) {
|
if (this.formModel.userId) {
|
||||||
addUserTraining(this.formModel).then(response => {
|
addUserTraining(this.formModel).then(response => {
|
||||||
self.$message.success('创建成功!')
|
self.$message.success('创建成功!');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable')
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('创建失败!' + error.message)
|
self.$message.error('创建失败!' + error.message);
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
self.$message.error('请选择用户')
|
self.$message.error('请选择用户');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
@ -177,10 +175,10 @@
|
|||||||
trainingName: '',
|
trainingName: '',
|
||||||
userId: '',
|
userId: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
duration: '',
|
duration: ''
|
||||||
}
|
};
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,9 +1,15 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisibles" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisibles" width="30%" :before-close="handleClose" center>
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{ height: '280px', width:'100%' }">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: '280px', width:'100%' }">
|
||||||
<el-tree ref="tree" :data="treeData" :props="defaultProps" highlight-current @node-click="clickEvent"
|
<el-tree
|
||||||
:span=22>
|
ref="tree"
|
||||||
<span class="custom-tree-node" slot-scope="{ node, data }">
|
:data="treeData"
|
||||||
|
:props="defaultProps"
|
||||||
|
highlight-current
|
||||||
|
:span="22"
|
||||||
|
@node-click="clickEvent"
|
||||||
|
>
|
||||||
|
<span slot-scope="{ node }" class="custom-tree-node">
|
||||||
<span class="el-icon-tickets">
|
<span class="el-icon-tickets">
|
||||||
<span> {{ node.label }}</span>
|
<span> {{ node.label }}</span>
|
||||||
</span>
|
</span>
|
||||||
@ -11,16 +17,16 @@
|
|||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave" :disabled="disabled">确 定</el-button>
|
<el-button type="primary" :disabled="disabled" @click="doSave">确 定</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishLessonDetail } from '@/api/jmap/lesson';
|
import { getPublishLessonDetail } from '@/api/jmap/lesson';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AddTraining',
|
name: 'AddTraining',
|
||||||
props: {
|
props: {
|
||||||
|
|
||||||
@ -31,15 +37,15 @@
|
|||||||
title: '选择实训',
|
title: '选择实训',
|
||||||
treeData: [{
|
treeData: [{
|
||||||
children: [],
|
children: [],
|
||||||
name: '',
|
name: ''
|
||||||
}],
|
}],
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
},
|
},
|
||||||
training: {},
|
training: {},
|
||||||
disabled: true,
|
disabled: true
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
@ -59,34 +65,34 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async show(lessonId) {
|
async show(lessonId) {
|
||||||
this.dialogVisibles = true
|
this.dialogVisibles = true;
|
||||||
try {
|
try {
|
||||||
let res = await getPublishLessonDetail({ id: lessonId });
|
const res = await getPublishLessonDetail({ id: lessonId });
|
||||||
this.treeData[0].children = res.data.chapters;
|
this.treeData[0].children = res.data.chapters;
|
||||||
this.treeData[0].name = res.data.name;
|
this.treeData[0].name = res.data.name;
|
||||||
this.treeData[0].children.forEach(ele => {
|
this.treeData[0].children.forEach(ele => {
|
||||||
ele.children = ele.trainingVos;
|
ele.children = ele.trainingVos;
|
||||||
ele.children.forEach(item => {
|
ele.children.forEach(item => {
|
||||||
item.trainingSelect = true;
|
item.trainingSelect = true;
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
this.$emit('selectTrain', this.training)
|
this.$emit('selectTrain', this.training);
|
||||||
this.handleClose();
|
this.handleClose();
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.treeData = [{
|
this.treeData = [{
|
||||||
children: [],
|
children: [],
|
||||||
name: '',
|
name: ''
|
||||||
}];
|
}];
|
||||||
this.trainingId = '';
|
this.trainingId = '';
|
||||||
this.training = {};
|
this.training = {};
|
||||||
this.dialogVisibles = false;
|
this.dialogVisibles = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">取 消</el-button>
|
||||||
@ -9,16 +9,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { create, checkDicDetailCodeExist, getData } from '@/api/management/dictionaryDetail'
|
import { putUserTraining } from '@/api/jmap/training';
|
||||||
import { putUserTraining } from '@/api/jmap/training';
|
export default {
|
||||||
import { validateCharCode } from '@/utils/validate'
|
|
||||||
export default {
|
|
||||||
name: 'UsersTrainingEdit',
|
name: 'UsersTrainingEdit',
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -28,70 +26,70 @@
|
|||||||
lessonName: '',
|
lessonName: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
trainingName: '',
|
trainingName: '',
|
||||||
duration: '',
|
duration: ''
|
||||||
// trainingCount: '',
|
// trainingCount: '',
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let isAdd = this.type === 'ADD'
|
this.type === 'ADD';
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'lessonName', label: '教学名称', type: 'text', required: false, disabled: true },
|
{ prop: 'lessonName', label: '教学名称', type: 'text', required: false, disabled: true },
|
||||||
{ prop: 'trainingName', label: '实训名称', type: 'text', required: true, disabled: true },
|
{ prop: 'trainingName', label: '实训名称', type: 'text', required: true, disabled: true },
|
||||||
{ prop: 'userName', label: '用户名称', type: 'text', required: true, disabled: true },
|
{ prop: 'userName', label: '用户名称', type: 'text', required: true, disabled: true },
|
||||||
{ prop: 'duration', label: '实训时长', type: 'text', required: true, rightWidth: true, message: 's' },
|
{ prop: 'duration', label: '实训时长', type: 'text', required: true, rightWidth: true, message: 's' }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
rules() {
|
rules() {
|
||||||
let crules = {
|
const crules = {
|
||||||
duration: [
|
duration: [
|
||||||
{ required: true, message: '请输入时长', trigger: 'blur' },
|
{ required: true, message: '请输入时长', trigger: 'blur' }
|
||||||
],
|
]
|
||||||
}
|
};
|
||||||
return crules
|
return crules;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '编辑实训详情'
|
return '编辑实训详情';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show(data) {
|
show(data) {
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true;
|
||||||
if (data && data.id) {
|
if (data && data.id) {
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
lessonName: data.lessonName,
|
lessonName: data.lessonName,
|
||||||
userName: data.userName,
|
userName: data.userName,
|
||||||
trainingName: data.trainingName,
|
trainingName: data.trainingName,
|
||||||
duration: data.duration,
|
duration: data.duration
|
||||||
// trainingCount: data.trainingCount
|
// trainingCount: data.trainingCount
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
let self = this
|
const self = this;
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
self.update()
|
self.update();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
let self = this;
|
const self = this;
|
||||||
let param = {
|
const param = {
|
||||||
id: this.formModel.id,
|
id: this.formModel.id,
|
||||||
duration: this.formModel.duration,
|
duration: this.formModel.duration
|
||||||
}
|
};
|
||||||
putUserTraining(param).then(response => {
|
putUserTraining(param).then(response => {
|
||||||
self.$message.success('修改成功!')
|
self.$message.success('修改成功!');
|
||||||
self.handleClose()
|
self.handleClose();
|
||||||
self.$emit('reloadTable')
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('修改失败!' + error.message)
|
self.$message.error('修改失败!' + error.message);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
this.formModel = {
|
this.formModel = {
|
||||||
@ -99,10 +97,10 @@
|
|||||||
lessonName: '',
|
lessonName: '',
|
||||||
userName: '',
|
userName: '',
|
||||||
trainingName: '',
|
trainingName: '',
|
||||||
duration: '',
|
duration: ''
|
||||||
}
|
};
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,22 +1,20 @@
|
|||||||
<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" />
|
||||||
</QueryListPage>
|
<users-training-edit ref="edit" type="EDIT" @reloadTable="reloadTable" />
|
||||||
<users-training-edit ref="edit" type="EDIT" @reloadTable="reloadTable"></users-training-edit>
|
<users-training-add ref="add" type="ADD" @reloadTable="reloadTable" />
|
||||||
<users-training-add ref="add" type="ADD" @reloadTable="reloadTable"></users-training-add>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getTrainingList, deleteUserTraining } from '@/api/jmap/training';
|
import { getTrainingList, deleteUserTraining } from '@/api/jmap/training';
|
||||||
import localStore from 'storejs';
|
import UsersTrainingEdit from './edit';
|
||||||
import UsersTrainingEdit from './edit';
|
import UsersTrainingAdd from './add';
|
||||||
import UsersTrainingAdd from './add'
|
export default {
|
||||||
export default {
|
|
||||||
name: 'UserTrainingEdit',
|
name: 'UserTrainingEdit',
|
||||||
components: {
|
components: {
|
||||||
UsersTrainingEdit,
|
UsersTrainingEdit,
|
||||||
UsersTrainingAdd,
|
UsersTrainingAdd
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -61,8 +59,8 @@
|
|||||||
title: '实训用时',
|
title: '实训用时',
|
||||||
prop: 'duration',
|
prop: 'duration',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.computation(row.duration) },
|
columnValue: (row) => { return this.computation(row.duration); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实训名称',
|
title: '实训名称',
|
||||||
@ -76,23 +74,23 @@
|
|||||||
{
|
{
|
||||||
name: '编辑',
|
name: '编辑',
|
||||||
handleClick: this.edit,
|
handleClick: this.edit,
|
||||||
showControl: (row) => { return row.fake != '0' }
|
showControl: (row) => { return row.fake != '0'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '删除',
|
name: '删除',
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
showControl: (row) => { return row.fake != '0' }
|
showControl: (row) => { return row.fake != '0'; }
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '新增', handler: this.createTraining }
|
{ text: '新增', handler: this.createTraining }
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
@ -102,12 +100,12 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
createTraining() {
|
createTraining() {
|
||||||
this.$refs.add.show()
|
this.$refs.add.show();
|
||||||
},
|
},
|
||||||
computation(fieldValue) {
|
computation(fieldValue) {
|
||||||
if (fieldValue) {
|
if (fieldValue) {
|
||||||
let f = parseInt(fieldValue / 60);
|
const f = parseInt(fieldValue / 60);
|
||||||
let s = fieldValue % 60;
|
const s = fieldValue % 60;
|
||||||
if (f > 0) {
|
if (f > 0) {
|
||||||
return `${f}分${s}秒`;
|
return `${f}分${s}秒`;
|
||||||
} else {
|
} else {
|
||||||
@ -118,7 +116,7 @@
|
|||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
edit(index, row) {
|
edit(index, row) {
|
||||||
this.$refs.edit.show(row)
|
this.$refs.edit.show(row);
|
||||||
},
|
},
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
@ -129,18 +127,18 @@
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteUserTraining(row.id).then(response => {
|
deleteUserTraining(row.id).then(response => {
|
||||||
this.$message.success('删除成功')
|
this.$message.success('删除成功');
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
this.$messageBox('删除失败')
|
this.$messageBox('删除失败');
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -52,7 +52,7 @@
|
|||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']) },
|
columnValue: (row) => { return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']) },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -114,19 +114,6 @@
|
|||||||
this.skinStyleList = response.data;
|
this.skinStyleList = response.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 添加
|
// 添加
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$router.push({ path: `${UrlConfig.map.productDraft}/add/0` });
|
this.$router.push({ path: `${UrlConfig.map.productDraft}/add/0` });
|
||||||
|
@ -152,16 +152,6 @@
|
|||||||
resizeHandler: function () {
|
resizeHandler: function () {
|
||||||
this.height = this._clientHeight - 130;
|
this.height = this._clientHeight - 130;
|
||||||
},
|
},
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
//加载发布课程列表
|
//加载发布课程列表
|
||||||
this.display = 1;
|
this.display = 1;
|
||||||
|
@ -115,17 +115,6 @@
|
|||||||
this.skinStyleList = response.data;
|
this.skinStyleList = response.data;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$router.push(`${UrlConfig.map.skinStyleDraft}/add/null`);
|
this.$router.push(`${UrlConfig.map.skinStyleDraft}/add/null`);
|
||||||
},
|
},
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<div v-if="orderType">
|
<div v-if="orderType">
|
||||||
<data-form ref="dataform" :form="formOrder" :formModel="formOrderModel"></data-form>
|
<data-form ref="dataform" :form="formOrder" :form-model="formOrderModel" />
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" />
|
||||||
</div>
|
</div>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="handleClose">关 闭</el-button>
|
<el-button type="primary" @click="handleClose">关 闭</el-button>
|
||||||
@ -13,55 +13,49 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { create, checkDicDetailCodeExist, getData } from '@/api/management/dictionaryDetail'
|
export default {
|
||||||
import { postSimulationStats } from '@/api/jmap/training';
|
name: 'AuthorDetail',
|
||||||
import { validateCharCode } from '@/utils/validate';
|
|
||||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
|
||||||
import { getUserList } from '@/api/management/user';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'authorDetail',
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
source: '',
|
source: '',
|
||||||
userMobile: '',
|
userMobile: '',
|
||||||
userName: '',
|
userName: ''
|
||||||
},
|
},
|
||||||
formOrderModel: {
|
formOrderModel: {
|
||||||
source: '',
|
source: '',
|
||||||
order: '',
|
order: ''
|
||||||
},
|
},
|
||||||
PermissionTypeList: [],
|
PermissionTypeList: [],
|
||||||
orderType: '',
|
orderType: '',
|
||||||
order: '',
|
order: ''
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'source', label: '来源', type: 'text', disabled: true, },
|
{ prop: 'source', label: '来源', type: 'text', disabled: true },
|
||||||
{ prop: 'name', label: '分发用户', type: 'text', disabled: true, },
|
{ prop: 'name', label: '分发用户', type: 'text', disabled: true },
|
||||||
{ prop: 'mobile', label: '用户手机号', type: 'text', disabled: true, },
|
{ prop: 'mobile', label: '用户手机号', type: 'text', disabled: true }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
formOrder() {
|
formOrder() {
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'source', label: '来源', type: 'text', disabled: true, },
|
{ prop: 'source', label: '来源', type: 'text', disabled: true },
|
||||||
{ prop: 'order', label: '订单号', type: 'text', disabled: true, },
|
{ prop: 'order', label: '订单号', type: 'text', disabled: true }
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '来源信息'
|
return '来源信息';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -74,13 +68,13 @@
|
|||||||
this.formModel = {
|
this.formModel = {
|
||||||
source: '权限分发',
|
source: '权限分发',
|
||||||
mobile: data.mobile,
|
mobile: data.mobile,
|
||||||
name: data.name,
|
name: data.name
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
this.orderType = true;
|
this.orderType = true;
|
||||||
this.formOrderModel = {
|
this.formOrderModel = {
|
||||||
source: '订单创建',
|
source: '订单创建',
|
||||||
order: data,
|
order: data
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -88,10 +82,10 @@
|
|||||||
this.formModel = {
|
this.formModel = {
|
||||||
source: '',
|
source: '',
|
||||||
userMobile: '',
|
userMobile: '',
|
||||||
userName: '',
|
userName: ''
|
||||||
}
|
};
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -1,12 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="card-box">
|
<div class="card-box">
|
||||||
<el-steps class="steps" :active="display">
|
<el-steps class="steps" :active="display">
|
||||||
<el-step :title="title" icon="el-icon-edit-outline"></el-step>
|
<el-step :title="title" icon="el-icon-edit-outline" />
|
||||||
<el-step title="" icon="el-icon-upload"></el-step>
|
<el-step title="" icon="el-icon-upload" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-card class="forms">
|
<el-card class="forms">
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height:height -120 + 'px'}" style="padding-top: 40px">
|
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height -120 + 'px'}" style="padding-top: 40px">
|
||||||
<data-form ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</el-card>
|
</el-card>
|
||||||
<div class="draft">
|
<div class="draft">
|
||||||
@ -19,13 +19,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getPublishLessonList } from '@/api/jmap/lesson';
|
import { getPublishLessonList } from '@/api/jmap/lesson';
|
||||||
import { getUserInfoByNameOrMobile } from '@/api/management/user';
|
import { getUserInfoByNameOrMobile } from '@/api/management/user';
|
||||||
import { createLessonPermisson } from '@/api/management/author';
|
import { createLessonPermisson } from '@/api/management/author';
|
||||||
import { validateCharCode } from '@/utils/validate';
|
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DictionaryDetailEdit',
|
name: 'DictionaryDetailEdit',
|
||||||
mixins: [
|
mixins: [
|
||||||
WindowResizeHandler
|
WindowResizeHandler
|
||||||
@ -44,13 +43,13 @@
|
|||||||
type: '01',
|
type: '01',
|
||||||
forever: true,
|
forever: true,
|
||||||
lessonId: '',
|
lessonId: '',
|
||||||
total: 0,
|
total: 0
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: '140px',
|
labelWidth: '140px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'userId', label: '用户名称', type: 'select', required: false, options: this.UserList, remote: this.userRemote, loading: this.UserLoading },
|
{ prop: 'userId', label: '用户名称', type: 'select', required: false, options: this.UserList, remote: this.userRemote, loading: this.UserLoading },
|
||||||
@ -60,12 +59,12 @@
|
|||||||
{ prop: 'total', label: '权限个数', type: 'number', required: false }
|
{ prop: 'total', label: '权限个数', type: 'number', required: false }
|
||||||
]
|
]
|
||||||
|
|
||||||
}
|
};
|
||||||
return form
|
return form;
|
||||||
},
|
},
|
||||||
|
|
||||||
rules() {
|
rules() {
|
||||||
let baseRules = {
|
const baseRules = {
|
||||||
userId: [
|
userId: [
|
||||||
{ required: true, message: '请输入用户名称', trigger: 'blur' }
|
{ required: true, message: '请输入用户名称', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
@ -85,15 +84,15 @@
|
|||||||
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
|
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
|
||||||
callback();
|
callback();
|
||||||
} else {
|
} else {
|
||||||
callback(new Error("请输入有效权限个数"));
|
callback(new Error('请输入有效权限个数'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: 'blur',
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
};
|
||||||
|
|
||||||
//清空表单验证提示信息
|
// 清空表单验证提示信息
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.dataform.clearValidate();
|
this.$refs.dataform.clearValidate();
|
||||||
});
|
});
|
||||||
@ -108,37 +107,37 @@
|
|||||||
resizeHandler: function () {
|
resizeHandler: function () {
|
||||||
this.height = this._clientHeight - 130;
|
this.height = this._clientHeight - 130;
|
||||||
},
|
},
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
convertList(FromList, ToList, checktypeFunction) {
|
||||||
if (FromList) {
|
if (FromList) {
|
||||||
ToList.length = 0;
|
ToList.length = 0;
|
||||||
FromList.forEach(elem => {
|
FromList.forEach(elem => {
|
||||||
if (ChecktypeFunction(elem)) {
|
if (checktypeFunction(elem)) {
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
ToList.push({ value: elem.code, label: elem.name });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
//加载发布课程列表
|
// 加载发布课程列表
|
||||||
this.display = 1;
|
this.display = 1;
|
||||||
this.LessonList.length = 0;
|
this.LessonList.length = 0;
|
||||||
getPublishLessonList().then(response => {
|
getPublishLessonList().then(response => {
|
||||||
let 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.id, label: elem.name });
|
this.LessonList.push({ value: elem.id, label: elem.name });
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//转换权限类型
|
// 转换权限类型
|
||||||
this.$Dictionary.permissionType().then(list => {
|
this.$Dictionary.permissionType().then(list => {
|
||||||
this.convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//清空表单验证提示信息
|
// 清空表单验证提示信息
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.dataform.resetForm();
|
this.$refs.dataform.resetForm();
|
||||||
});
|
});
|
||||||
@ -152,8 +151,8 @@
|
|||||||
getUserInfoByNameOrMobile({ query: query }).then(response => {
|
getUserInfoByNameOrMobile({ query: query }).then(response => {
|
||||||
response.data.forEach(item => {
|
response.data.forEach(item => {
|
||||||
this.UserList.push({ value: item.id, label: item.name });
|
this.UserList.push({ value: item.id, label: item.name });
|
||||||
})
|
});
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox('远程查询错误');
|
this.$messageBox('远程查询错误');
|
||||||
});
|
});
|
||||||
}, 200);
|
}, 200);
|
||||||
@ -162,13 +161,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
buildModel() {
|
buildModel() {
|
||||||
let model = {
|
const model = {
|
||||||
userId: this.formModel.userId,
|
userId: this.formModel.userId,
|
||||||
lessonId: this.formModel.lessonId,
|
lessonId: this.formModel.lessonId,
|
||||||
type: this.formModel.type,
|
type: this.formModel.type,
|
||||||
forever: this.formModel.forever,
|
forever: this.formModel.forever,
|
||||||
total: this.formModel.total,
|
total: this.formModel.total
|
||||||
}
|
};
|
||||||
return model;
|
return model;
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
@ -177,16 +176,16 @@
|
|||||||
this.display = 2;
|
this.display = 2;
|
||||||
this.turnback();
|
this.turnback();
|
||||||
this.$message.success('创建成功');
|
this.$message.success('创建成功');
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox("创建失败");
|
this.$messageBox('创建失败');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
turnback() {
|
turnback() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
title: '权限类型',
|
title: '权限类型',
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.type, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -128,7 +128,7 @@
|
|||||||
title: '课程权限状态',
|
title: '课程权限状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
@ -183,30 +183,9 @@
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -214,7 +193,7 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -190,16 +190,6 @@
|
|||||||
resizeHandler: function () {
|
resizeHandler: function () {
|
||||||
this.height = this._clientHeight - 170;
|
this.height = this._clientHeight - 170;
|
||||||
},
|
},
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async initLoadPage() {
|
async initLoadPage() {
|
||||||
// 加载字典数据
|
// 加载字典数据
|
||||||
// 加载地图,产品,课程
|
// 加载地图,产品,课程
|
||||||
@ -218,7 +208,7 @@
|
|||||||
}
|
}
|
||||||
// 产品类型
|
// 产品类型
|
||||||
this.$Dictionary.productType().then(list => {
|
this.$Dictionary.productType().then(list => {
|
||||||
this.convertList(list, this.productTypeList, elem => {
|
this.$convertList(list, this.productTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -226,7 +216,7 @@
|
|||||||
// 时间类型
|
// 时间类型
|
||||||
this.TimeStyleDict = {};
|
this.TimeStyleDict = {};
|
||||||
this.$Dictionary.timeStyleType().then(list => {
|
this.$Dictionary.timeStyleType().then(list => {
|
||||||
this.convertList(list, this.TimeStyleList, elem => {
|
this.$convertList(list, this.TimeStyleList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
title: '产品类型',
|
title: '产品类型',
|
||||||
prop: 'productType',
|
prop: 'productType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.productType, this.productTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -87,7 +87,7 @@
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
@ -149,19 +149,9 @@
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -170,7 +160,7 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.convertList(list, this.productTypeList, elem => {
|
this.$convertList(list, this.productTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -184,17 +174,6 @@
|
|||||||
console.error(error, '获取发布地图');
|
console.error(error, '获取发布地图');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleEdit(index, row) {
|
handleEdit(index, row) {
|
||||||
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/edit/${row.id}` });
|
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/edit/${row.id}` });
|
||||||
},
|
},
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
title: '产品类型',
|
title: '产品类型',
|
||||||
prop: 'productType',
|
prop: 'productType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.productType, this.productTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -101,7 +101,7 @@
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
@ -148,19 +148,9 @@
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -169,7 +159,7 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.convertList(list, this.productTypeList, elem => {
|
this.$convertList(list, this.productTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -184,19 +174,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
handleAdd(index, row) {
|
handleAdd(index, row) {
|
||||||
this.$emit('selectGoods', row);
|
this.$emit('selectGoods', row);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
|
@ -280,16 +280,6 @@
|
|||||||
resizeHandler: function () {
|
resizeHandler: function () {
|
||||||
this.height = this._clientHeight - 170;
|
this.height = this._clientHeight - 170;
|
||||||
},
|
},
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
buttonClick() {
|
buttonClick() {
|
||||||
this.$refs.addGoods.doShow();
|
this.$refs.addGoods.doShow();
|
||||||
},
|
},
|
||||||
@ -328,31 +318,31 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.$Dictionary.permissionType().then(list => {
|
this.$Dictionary.permissionType().then(list => {
|
||||||
this.convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.orderType().then(list => {
|
this.$Dictionary.orderType().then(list => {
|
||||||
this.convertList(list, this.OrderTypeList, elem => {
|
this.$convertList(list, this.OrderTypeList, elem => {
|
||||||
return elem.code !== '01' //过滤个人
|
return elem.code !== '01' //过滤个人
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.payStatus().then(list => {
|
this.$Dictionary.payStatus().then(list => {
|
||||||
this.convertList(list, this.PayStatusTypeList, elem => {
|
this.$convertList(list, this.PayStatusTypeList, elem => {
|
||||||
return elem.code !== '03' //过滤取消状态
|
return elem.code !== '03' //过滤取消状态
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.payType().then(list => {
|
this.$Dictionary.payType().then(list => {
|
||||||
this.convertList(list, this.PayTypeList, elem => {
|
this.$convertList(list, this.PayTypeList, elem => {
|
||||||
return true
|
return true
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.bizType().then(list => {
|
this.$Dictionary.bizType().then(list => {
|
||||||
this.convertList(list, this.BizTypeList, elem => {
|
this.$convertList(list, this.BizTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
title: '权限类型',
|
title: '权限类型',
|
||||||
prop: 'permissionType',
|
prop: 'permissionType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -120,7 +120,7 @@
|
|||||||
title: '支付方式',
|
title: '支付方式',
|
||||||
prop: 'payWays',
|
prop: 'payWays',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.payWays, this.PayTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.payWays, this.PayTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -131,7 +131,7 @@
|
|||||||
title: '订单类型',
|
title: '订单类型',
|
||||||
prop: 'orderType',
|
prop: 'orderType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.orderType, this.OrderTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.orderType, this.OrderTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -142,14 +142,14 @@
|
|||||||
title: '业务类型',
|
title: '业务类型',
|
||||||
prop: 'bizType',
|
prop: 'bizType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.bizType, this.BizTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.bizType, this.BizTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '支付状态',
|
title: '支付状态',
|
||||||
prop: 'payStatus',
|
prop: 'payStatus',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.payStatus, this.PayStatusList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.payStatus, this.PayStatusList, ['value', 'label']) },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.payStatus) {
|
switch (row.payStatus) {
|
||||||
case '01': return 'danger';
|
case '01': return 'danger';
|
||||||
@ -199,27 +199,6 @@
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.queryForm.queryObject.organizationId.config.data.length = 0;
|
this.queryForm.queryObject.organizationId.config.data.length = 0;
|
||||||
getOrganizationList().then(response => {
|
getOrganizationList().then(response => {
|
||||||
@ -234,32 +213,32 @@
|
|||||||
})
|
})
|
||||||
|
|
||||||
this.$Dictionary.bizType().then(list => {
|
this.$Dictionary.bizType().then(list => {
|
||||||
this.convertList(list, this.BizTypeList, elem => {
|
this.$convertList(list, this.BizTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
this.$Dictionary.orderType().then(list => {
|
this.$Dictionary.orderType().then(list => {
|
||||||
this.convertList(list, this.OrderTypeList, elem => {
|
this.$convertList(list, this.OrderTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$Dictionary.payType().then(list => {
|
this.$Dictionary.payType().then(list => {
|
||||||
this.convertList(list, this.PayTypeList, elem => {
|
this.$convertList(list, this.PayTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$Dictionary.payStatus().then(list => {
|
this.$Dictionary.payStatus().then(list => {
|
||||||
this.convertList(list, this.PayStatusList, elem => {
|
this.$convertList(list, this.PayStatusList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
@ -268,7 +247,7 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
title: '权限类型',
|
title: '权限类型',
|
||||||
prop: 'permissionType',
|
prop: 'permissionType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -118,7 +118,7 @@
|
|||||||
title: '课程权限状态',
|
title: '课程权限状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
@ -134,30 +134,9 @@
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -165,7 +144,7 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -84,7 +84,7 @@
|
|||||||
title: '权限类型',
|
title: '权限类型',
|
||||||
prop: 'permissionType',
|
prop: 'permissionType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -171,17 +171,6 @@
|
|||||||
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
formatterDate(row, porpInfo) {
|
formatterDate(row, porpInfo) {
|
||||||
return String(row[porpInfo.property] || '').split(' ')[0];
|
return String(row[porpInfo.property] || '').split(' ')[0];
|
||||||
},
|
},
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
title: '权限类型',
|
title: '权限类型',
|
||||||
prop: 'permissionType',
|
prop: 'permissionType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return '' }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -131,7 +131,7 @@
|
|||||||
title: '权限状态',
|
title: '权限状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
@ -183,33 +183,12 @@
|
|||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertList(FromList, ToList, ChecktypeFunction) {
|
|
||||||
if (FromList) {
|
|
||||||
ToList.length = 0;
|
|
||||||
FromList.forEach(elem => {
|
|
||||||
if (ChecktypeFunction(elem)) {
|
|
||||||
ToList.push({ value: elem.code, label: elem.name });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
||||||
})
|
})
|
||||||
this.convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -217,7 +196,7 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
this.PermissionTypeList.push({ value: undefined, label: '权限包' });
|
this.PermissionTypeList.push({ value: undefined, label: '权限包' });
|
||||||
|
@ -1,21 +1,20 @@
|
|||||||
<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"/>
|
||||||
</QueryListPage>
|
<select-role ref="selectRole" @reloadTable="reloadTable"/>
|
||||||
<select-role ref="selectRole" @reloadTable="reloadTable"></select-role>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listUserPermision } from '@/api/management/author';
|
import { listUserPermision } from '@/api/management/author';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import { superAdmin } from '@/router';
|
import { superAdmin } from '@/router';
|
||||||
import selectRole from './selectRole/list';
|
import selectRole from './selectRole/list';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'author',
|
name: 'Author',
|
||||||
components: {
|
components: {
|
||||||
selectRole,
|
selectRole
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -64,26 +63,26 @@
|
|||||||
title: '权限类型',
|
title: '权限类型',
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.type, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '地图名称',
|
title: '地图名称',
|
||||||
prop: 'mapName',
|
prop: 'mapName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '地图产品名称',
|
title: '地图产品名称',
|
||||||
prop: 'mapProductName',
|
prop: 'mapProductName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '课程名称',
|
title: '课程名称',
|
||||||
prop: 'lessonName',
|
prop: 'lessonName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '公用/专用',
|
title: '公用/专用',
|
||||||
prop: 'canDistribute',
|
prop: 'canDistribute',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.canDistribute) {
|
switch (row.canDistribute) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
@ -95,7 +94,7 @@
|
|||||||
title: '是否永久',
|
title: '是否永久',
|
||||||
prop: 'forever',
|
prop: 'forever',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.forever) {
|
switch (row.forever) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
@ -127,13 +126,13 @@
|
|||||||
{
|
{
|
||||||
title: '权限归属人',
|
title: '权限归属人',
|
||||||
prop: 'ownerName',
|
prop: 'ownerName',
|
||||||
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) != -1; },
|
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) != -1; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '权限状态',
|
title: '权限状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
@ -150,16 +149,16 @@
|
|||||||
{
|
{
|
||||||
name: '设置归属人',
|
name: '设置归属人',
|
||||||
handleClick: this.handleRoleVest,
|
handleClick: this.handleRoleVest,
|
||||||
type: '',
|
type: ''
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '打包权限', btnCode: 'employee_insert', handler: this.handlePermissionPack },
|
{ text: '打包权限', btnCode: 'employee_insert', handler: this.handlePermissionPack }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -176,17 +175,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
handleRoleVest(index, row) {
|
handleRoleVest(index, row) {
|
||||||
this.$refs.selectRole.doShow(row.id);
|
this.$refs.selectRole.doShow(row.id);
|
||||||
},
|
},
|
||||||
@ -197,7 +185,7 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -206,7 +194,7 @@
|
|||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -220,13 +208,13 @@
|
|||||||
return listUserPermision(params);
|
return listUserPermision(params);
|
||||||
},
|
},
|
||||||
handlePermissionPack() {
|
handlePermissionPack() {
|
||||||
this.$router.push({ path: `${UrlConfig.permission.permissionDraft}` })
|
this.$router.push({ path: `${UrlConfig.permission.permissionDraft}` });
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
if (this.queryList && this.queryList.reload) {
|
if (this.queryList && this.queryList.reload) {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
@ -82,21 +82,6 @@
|
|||||||
doClose() {
|
doClose() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
let arr = [];
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
enumList.forEach((element, i) => {
|
|
||||||
fieldValue.forEach((v, j) => {
|
|
||||||
if ('' + fieldValue[j] === '' + enumList[i][value]) {
|
|
||||||
arr.push(enumList[i][label])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return arr;
|
|
||||||
},
|
|
||||||
|
|
||||||
selectRole(index, row) {
|
selectRole(index, row) {
|
||||||
this.$confirm(`是否确定设置"${row.name}"为权限所属人`, '提示', {
|
this.$confirm(`是否确定设置"${row.name}"为权限所属人`, '提示', {
|
||||||
|
@ -74,7 +74,7 @@ export default {
|
|||||||
prop: 'lessonId',
|
prop: 'lessonId',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
show: !this.$route.query.lessonId,
|
show: !this.$route.query.lessonId,
|
||||||
columnValue: (row) => { return this.convertField(row.lessonId, this.OrganizationList, ['id', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.lessonId, this.OrganizationList, ['id', 'name']); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -122,7 +122,7 @@ export default {
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
@ -214,7 +214,7 @@ export default {
|
|||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -46,7 +46,7 @@ export default {
|
|||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -57,7 +57,7 @@ export default {
|
|||||||
title: '产品类型',
|
title: '产品类型',
|
||||||
prop: 'prdType',
|
prop: 'prdType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.prdType, this.prdTypeList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.prdType, this.prdTypeList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
@ -50,7 +50,7 @@ export default {
|
|||||||
title: '所属城市',
|
title: '所属城市',
|
||||||
prop: 'cityCode',
|
prop: 'cityCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.cityCode, this.cityList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.cityCode, this.cityList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -51,14 +51,14 @@ export default {
|
|||||||
title: '所属城市',
|
title: '所属城市',
|
||||||
prop: 'cityCode',
|
prop: 'cityCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.cityCode, this.cityList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.cityCode, this.cityList, ['code', 'name']); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '皮肤类型',
|
title: '皮肤类型',
|
||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
|
columnValue: (row) => { return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']); },
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -56,7 +56,7 @@ export default {
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ export default {
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
|
@ -50,7 +50,7 @@ export default {
|
|||||||
prop: 'skinStyle',
|
prop: 'skinStyle',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
return this.$convertField(row.skinStyle, this.skinStyleList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
|
@ -45,7 +45,7 @@ export default {
|
|||||||
prop: 'skinCode',
|
prop: 'skinCode',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => {
|
columnValue: (row) => {
|
||||||
return this.convertField(row.skinCode, this.skinCodeList, ['code', 'name']);
|
return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']);
|
||||||
},
|
},
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
title: '状态',
|
title: '状态',
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
@ -97,17 +97,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
convertField(fieldValue, enumList, converFormat) {
|
|
||||||
if (converFormat && converFormat.length >= 2) {
|
|
||||||
let value = converFormat[0];
|
|
||||||
let label = converFormat[1];
|
|
||||||
for (let i = 0; enumList && i < enumList.length; i++) {
|
|
||||||
if ('' + fieldValue === '' + enumList[i][value]) {
|
|
||||||
return enumList[i][label];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.EffectiveTypeList = [];
|
this.EffectiveTypeList = [];
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
|
Loading…
Reference in New Issue
Block a user