Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
6bbfd49150
@ -9,6 +9,7 @@ import scriptRecord from './scriptRecord';
|
||||
import tip from './tip';
|
||||
import system from './system';
|
||||
import orderAuthor from './orderAuthor';
|
||||
import teach from './teach';
|
||||
import publish from './publish';
|
||||
import permission from './permission';
|
||||
import replay from './replay';
|
||||
@ -20,6 +21,7 @@ export default {
|
||||
global,
|
||||
router,
|
||||
lesson,
|
||||
teach,
|
||||
error,
|
||||
rules,
|
||||
scriptRecord,
|
||||
|
@ -23,6 +23,7 @@ export default {
|
||||
layerDisplay: 'The layer display',
|
||||
viewShows: 'View shows',
|
||||
contentShows: 'content show',
|
||||
createBatch: 'Create a batch',
|
||||
|
||||
save: 'save',
|
||||
updata: 'update',
|
||||
@ -299,6 +300,7 @@ export default {
|
||||
zzkContent: 'Station control content:',
|
||||
stationControlZok: 'central',
|
||||
|
||||
skinStyleColon: 'Skin type:',
|
||||
skinDesignation: 'SkinName',
|
||||
skinCoding: 'SkinCoding',
|
||||
coordinatesOrigin: 'CoordinatesOrigin',
|
||||
@ -341,9 +343,13 @@ export default {
|
||||
productType: 'ProductType',
|
||||
productCode: 'ProductCode',
|
||||
productName: 'ProductName',
|
||||
createProductCategories: 'Create product categories',
|
||||
productDescription: 'ProductDescription',
|
||||
associateTrainingTypes: 'AssociateTrainingTypes',
|
||||
createTrainingCategories: 'CreateTrainingCategories',
|
||||
editTraining: 'Edit product categories',
|
||||
productCategories: 'The product category',
|
||||
selectOperation: 'Please select operation',
|
||||
editTrainingCategories: 'EditTrainingCategories',
|
||||
linkWidth: 'LinkWidth',
|
||||
maxLinkWidth: '(Link width is at most 20)',
|
||||
@ -380,6 +386,7 @@ export default {
|
||||
|
||||
trainCode: 'Train number:',
|
||||
groupNumber: 'The number of:',
|
||||
groupNumberInterval: 'Group number interval:',
|
||||
modelCode: 'Car type:',
|
||||
|
||||
trainmodelCreate: 'New car type',
|
||||
|
19
src/i18n/langs/en/teach.js
Normal file
19
src/i18n/langs/en/teach.js
Normal file
@ -0,0 +1,19 @@
|
||||
export default {
|
||||
title: 'Urban rail transit teaching system',
|
||||
describe: 'This system is equipped with real business logic and software architecture based on the business and process-driven mode of metro employees and training sites. From the perspective of business process, standard operation, training mode and open principle, it strives to build a practical training and teaching system that best meets user needs and responds to changes quickly.',
|
||||
trainingName: 'Training name:',
|
||||
trainingTime: 'Best time to complete the training:',
|
||||
trainingMaximum: 'Maximum time to complete the training:',
|
||||
trainingInstructions: 'Training instructions:',
|
||||
startTraining: 'Began to practice',
|
||||
|
||||
courseName: 'Course name',
|
||||
courseDescription: 'Course description',
|
||||
courseDetails: 'Course details',
|
||||
free: 'free',
|
||||
permissionsDetails: 'Permissions for details',
|
||||
buy: 'buy',
|
||||
permissionDistribute: 'Permission distribution (class)',
|
||||
authorityTransferred: 'Authority transferred',
|
||||
courseList: 'Course list'
|
||||
};
|
@ -25,6 +25,8 @@ export default {
|
||||
selectedSectionEmpty: 'The selected section is empty',
|
||||
selectedStationEmpty: 'The selected station is empty',
|
||||
|
||||
enterKeywordsFiltering: 'Enter keywords for filtering',
|
||||
|
||||
selectMap: 'Please select the map first',
|
||||
selectTrainType: 'Please select the train model to view',
|
||||
|
||||
@ -63,6 +65,8 @@ export default {
|
||||
createRoutingFailed: 'Failed to create junction',
|
||||
pathUpdataSuccessful: 'Road update successful!',
|
||||
pathUpdataFailed: 'Update traffic failed',
|
||||
productCodeExists: 'The product Code already exists',
|
||||
narrowScope: 'You cannot narrow down the training list you created last time',
|
||||
|
||||
failedLoadMap: 'Failed to load map data',
|
||||
sectionPointsDeficiency: 'Segment coordinates missing',
|
||||
@ -89,5 +93,11 @@ export default {
|
||||
skinDeleteConfirmation: 'This will permanently remove the skin. Do you want to continue?',
|
||||
skinCodingExist: 'Map skin codes already exist',
|
||||
underImport: 'UnderImport...',
|
||||
deleteTypeHint: 'This action deletes the type. Do you want to continue?'
|
||||
deleteTypeHint: 'This action deletes the type. Do you want to continue?',
|
||||
selectValidInterval: 'Please select a valid interval',
|
||||
|
||||
failedCourse: 'Failed to obtain course information',
|
||||
createSimulationFaild: 'Failed to create simulation',
|
||||
accessCourseNo: 'No access to this course, please go and buy it!'
|
||||
|
||||
};
|
||||
|
@ -85,6 +85,30 @@ export default {
|
||||
inputRoomNumber: '请输入房间号',
|
||||
chooseRoom: '选择房间',
|
||||
month: '月',
|
||||
|
||||
permissions: '权限',
|
||||
yuanMonth: '元/月',
|
||||
permissionType: '权限类型:',
|
||||
purchaseDuration: '购买时长:',
|
||||
custom: '自定义',
|
||||
permissionNum: '权限数量:',
|
||||
indexA: '个',
|
||||
purchasePrice: '购买总价:',
|
||||
submitOrders: '提交订单',
|
||||
|
||||
january: '一月',
|
||||
march: '三月',
|
||||
year: '一年',
|
||||
twoYears: '两年',
|
||||
fiveYears: '五年',
|
||||
tenYears: '十年',
|
||||
courseName: '课程名称',
|
||||
screenName: '大屏名称',
|
||||
productName: '产品名称',
|
||||
coursePrice: '课程单价',
|
||||
testPrice: '考试单价',
|
||||
simulationPrice: '仿真单价',
|
||||
timeUnitPrice: '大屏单价',
|
||||
putaway: '上 架',
|
||||
soldOut: '下 架',
|
||||
exportMap: '导出地图',
|
||||
|
@ -9,6 +9,7 @@ import scriptRecord from './scriptRecord';
|
||||
import tip from './tip';
|
||||
import system from './system';
|
||||
import orderAuthor from './orderAuthor';
|
||||
import teach from './teach';
|
||||
import publish from './publish';
|
||||
import permission from './permission';
|
||||
import replay from './replay';
|
||||
@ -21,6 +22,7 @@ export default {
|
||||
router,
|
||||
lesson,
|
||||
error,
|
||||
teach,
|
||||
rules,
|
||||
scriptRecord,
|
||||
tip,
|
||||
|
@ -23,6 +23,7 @@ export default {
|
||||
layerDisplay: '图层显示',
|
||||
viewShows: '视图显示',
|
||||
contentShows: '内容显示',
|
||||
createBatch: '批量创建',
|
||||
|
||||
save: '保存',
|
||||
updata: '更新',
|
||||
@ -330,6 +331,7 @@ export default {
|
||||
|
||||
trainCode: '列车编号:',
|
||||
groupNumber: '车组号:',
|
||||
groupNumberInterval: '车组号区间:',
|
||||
trainNumber: '车组号',
|
||||
modelCode: '车类型:',
|
||||
|
||||
@ -414,6 +416,7 @@ export default {
|
||||
startStation: '起始站',
|
||||
endStation: '终到站',
|
||||
|
||||
skinStyleColon: '皮肤类型:',
|
||||
skinDesignation: '皮肤名称',
|
||||
skinCoding: '皮肤编码',
|
||||
coordinatesOrigin: '坐标原点',
|
||||
@ -456,9 +459,13 @@ export default {
|
||||
productType: '产品类型',
|
||||
productCode: '产品编码',
|
||||
productName: '产品名称',
|
||||
createProductCategories: '创建产品类目',
|
||||
productDescription: '产品说明',
|
||||
associateTrainingTypes: '关联实训类型',
|
||||
createTrainingCategories: '创建实训类目',
|
||||
editTraining: '编辑产品类目',
|
||||
productCategories: '产品类目',
|
||||
selectOperation: '请选择操作',
|
||||
editTrainingCategories: '编辑实训类目',
|
||||
linkWidth: 'link宽度',
|
||||
maxLinkWidth: '(Link宽度最大为20)',
|
||||
|
@ -212,6 +212,9 @@ export default {
|
||||
sectionWidthInputPrompt: '请输入有效区段宽度',
|
||||
selectShowWatermark: '请选择是否水印',
|
||||
|
||||
courseNameEmpty: '课程名称不能为空',
|
||||
purchaseMonth: '请输入购买月数',
|
||||
accessNumber: '请输入权限数量',
|
||||
pleaseInputMapName: '请输入地图新名称',
|
||||
inputTemplateRunPlan: '请选择模板运行图',
|
||||
inputSkinType: '请选择皮肤类型',
|
||||
|
19
src/i18n/langs/zh/teach.js
Normal file
19
src/i18n/langs/zh/teach.js
Normal file
@ -0,0 +1,19 @@
|
||||
export default {
|
||||
title: '城市轨道交通教学系统',
|
||||
describe: '该系统具备真实的业务逻辑,以地铁员工和培训点为要素的业务和流程驱动方式进行软件架构,从业务流程、标准作业、培训方式及开放原则等角度出发,力求打造最符合用户需求及快速响应变化的实训教学系统。',
|
||||
trainingName: '实训名称:',
|
||||
trainingTime: '完成实训最佳用时:',
|
||||
trainingMaximum: '完成实训最大用时:',
|
||||
trainingInstructions: '实训说明:',
|
||||
startTraining: '开始实训',
|
||||
|
||||
courseName: '课程名称',
|
||||
courseDescription: '课程说明',
|
||||
courseDetails: '课程详情',
|
||||
free: '免费',
|
||||
permissionsDetails: '权限详情',
|
||||
buy: '购买',
|
||||
permissionDistribute: '权限分发(上课)',
|
||||
authorityTransferred: '权限转赠',
|
||||
courseList: '课程列表'
|
||||
};
|
@ -8,6 +8,7 @@ export default {
|
||||
hint: '提示',
|
||||
cancelledDelete: '已取消删除',
|
||||
cancelGeneration: '已取消批量生成',
|
||||
refreshFailure: '刷新失败',
|
||||
|
||||
updateSuccessfully: '更新成功',
|
||||
saveSuccessfully: '保存成功',
|
||||
@ -25,6 +26,8 @@ export default {
|
||||
selectedSectionEmpty: '选择的区段为空',
|
||||
selectedStationEmpty: '选择的车站为空',
|
||||
|
||||
enterKeywordsFiltering: '输入关键字进行过滤',
|
||||
|
||||
selectMap: '请先选择地图',
|
||||
selectTrainType: '请选择查看的列车模型',
|
||||
|
||||
@ -59,6 +62,9 @@ export default {
|
||||
deleteProductSuccessfully: '删除产品成功',
|
||||
deleteProductFailed: '删除产品失败',
|
||||
cannotDeleteProduct: '产品已被使用无法删除',
|
||||
productCodeExists: '产品Code已存在',
|
||||
narrowScope: '不能缩小上次创建的实训列表的范围',
|
||||
|
||||
pathCreationSuccessful: '创建交路成功!',
|
||||
createRoutingFailed: '创建交路失败',
|
||||
pathUpdataSuccessful: '更新交路成功!',
|
||||
@ -89,6 +95,15 @@ export default {
|
||||
skinDeleteConfirmation: '此操作将永久删除该皮肤, 是否继续?',
|
||||
skinCodingExist: '地图皮肤编码已存在',
|
||||
underImport: '正在导入中...',
|
||||
deleteTypeHint: '此操作将删除该类型, 是否继续?'
|
||||
deleteTypeHint: '此操作将删除该类型, 是否继续?',
|
||||
selectValidInterval: '请选择有效的区间',
|
||||
|
||||
failedCourse: '获取课程信息失败',
|
||||
createSimulationFaild: '创建仿真失败',
|
||||
accessCourseNo: '无此课程权限, 请前往购买!',
|
||||
|
||||
failedSubmitOrder: '提交订单失败',
|
||||
permissionsNumber: '请输入有效的权限个数',
|
||||
purchaseMonth: '请输入有效的购买月数'
|
||||
|
||||
};
|
||||
|
@ -27,8 +27,8 @@ import SkinCodeDraft from '@/views/map/skinCode/draft';
|
||||
import Mapdraft from '@/views/map/mapdraft/index';
|
||||
import Mapedit from '@/views/map/mapdraft/mapedit/index';
|
||||
import Runplan from '@/views/map/runplan/index';
|
||||
import MapProduct from '@/views/map/product/index';
|
||||
import RunplanView from '@/views/map/runplan/chart';
|
||||
import Trainingcategory from '@/views/lesson/trainingcategory/index';
|
||||
import Trainingrecord from '@/views/lesson/trainingrecord/index';
|
||||
import TrainingrecordManage from '@/views/lesson/trainingrecord/manage/index';
|
||||
import Taskmanage from '@/views/lesson/taskmanage/list';
|
||||
@ -389,7 +389,7 @@ export const asyncRouter = [
|
||||
},
|
||||
{
|
||||
path: 'product',
|
||||
component: Trainingcategory,
|
||||
component: MapProduct,
|
||||
meta: {
|
||||
i18n: 'router.productEdit'
|
||||
}
|
||||
|
@ -12,30 +12,30 @@
|
||||
<el-form-item :label="nameTitle + ':'" prop="name">
|
||||
<span style="color: #808080 !important;"> {{ saleModel.name }} </span>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限类型: " prop="systemName">
|
||||
<span style="color: #808080 !important;"> {{ systemName }}权限 </span>
|
||||
<el-form-item :label="$t('global.permissionType')" prop="systemName">
|
||||
<span style="color: #808080 !important;"> {{ systemName }}{{ $t('global.permissions') }} </span>
|
||||
</el-form-item>
|
||||
<el-form-item :label="priceTitle + ':'" prop="price">
|
||||
<span style="font-size: 16px;color: #fb7a1b;"> {{ saleModel.price.toFixed(2) }}</span>
|
||||
<span style="color: #333;">元/月</span>
|
||||
<span style="color: #333;">{{ $t('global.yuanMonth') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买时长: " prop="choose">
|
||||
<el-form-item :label="$t('global.purchaseDuration')" prop="choose">
|
||||
<el-radio-group v-model="choose" @change="chooseEvent">
|
||||
<template v-for="(item,idx) in chooseList">
|
||||
<el-radio-button :key="idx" :label="item.label" />
|
||||
</template>
|
||||
<el-radio-button label="自定义" />
|
||||
<el-radio-button :label="$t('global.custom')" />
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item v-show="!disabled" prop="months">
|
||||
<el-input-number v-model="saleModel.months" :min="1" :max="1000" :disabled="disabled " />
|
||||
<span>月</span>
|
||||
<span>{{ $t('global.month') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="权限数量: " prop="total">
|
||||
<el-form-item :label="$t('global.permissionNum')" prop="total">
|
||||
<el-input-number v-model="saleModel.total" :min="1" :max="200" />
|
||||
<span>个</span>
|
||||
<span>{{ $t('global.indexA') }}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买总价: " prop="sumPrice">
|
||||
<el-form-item :label="$t('global.purchasePrice')" prop="sumPrice">
|
||||
<span style="font-size: 24px; color: #fb7a1b;"> {{ parseInt(sumPrice) }}</span>
|
||||
<span style="font-size: 16px;color: #fb7a1b;">. {{ (sumPrice -
|
||||
parseInt(sumPrice)).toFixed(2).toString().replace('.0', '').replace(' ', '') }}
|
||||
@ -44,9 +44,9 @@
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<el-button style="float: right; margin-bottom: 20px; margin-right: 20px;" type="primary " @click="commit">提交订单
|
||||
<el-button style="float: right; margin-bottom: 20px; margin-right: 20px;" type="primary " @click="commit">{{ $t('global.submitOrders') }}
|
||||
</el-button>
|
||||
<el-button style="float: right; margin-bottom: 20px; margin-right: 10px;" @click="back">返回</el-button>
|
||||
<el-button style="float: right; margin-bottom: 20px; margin-right: 10px;" @click="back">{{ $t('global.back') }}</el-button>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
@ -69,14 +69,14 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
disabled: true,
|
||||
choose: '一月',
|
||||
choose: this.$t('global.january'),
|
||||
chooseList: [
|
||||
{ label: '一月', value: 1 },
|
||||
{ label: '三月', value: 3 },
|
||||
{ label: '一年', value: 12 },
|
||||
{ label: '两年', value: 24 },
|
||||
{ label: '五年', value: 60 },
|
||||
{ label: '十年', value: 120 }
|
||||
{ label: this.$t('global.january'), value: 1 },
|
||||
{ label: this.$t('global.march'), value: 3 },
|
||||
{ label: this.$t('global.year'), value: 12 },
|
||||
{ label: this.$t('global.twoYears'), value: 24 },
|
||||
{ label: this.$t('global.fiveYears'), value: 60 },
|
||||
{ label: this.$t('global.tenYears'), value: 120 }
|
||||
],
|
||||
saleModel: {
|
||||
goodsId: '',
|
||||
@ -94,48 +94,48 @@ export default {
|
||||
nameTitle() {
|
||||
if (this.$route.query.permissionType == PermissionType.EXAM ||
|
||||
this.$route.query.permissionType == PermissionType.LESSON) {
|
||||
return '课程名称';
|
||||
return this.$t('global.courseName');
|
||||
} else if (this.$route.query.permissionType == PermissionType.SCREEN) {
|
||||
return '大屏名称';
|
||||
return this.$t('global.screenName');
|
||||
} else {
|
||||
return '产品名称';
|
||||
return this.$t('global.productName');
|
||||
}
|
||||
},
|
||||
priceTitle() {
|
||||
switch (this.$route.query.permissionType) {
|
||||
case PermissionType.LESSON: return '课程单价';
|
||||
case PermissionType.EXAM: return '考试单价';
|
||||
case PermissionType.SIMULATION: return '仿真单价';
|
||||
case PermissionType.SCREEN: return '大屏单价';
|
||||
case PermissionType.LESSON: return this.$t('global.coursePrice');
|
||||
case PermissionType.EXAM: return this.$t('global.testPrice');
|
||||
case PermissionType.SIMULATION: return this.$t('global.simulationPrice');
|
||||
case PermissionType.SCREEN: return this.$t('global.timeUnitPrice');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
rules() {
|
||||
return {
|
||||
'name': [
|
||||
{ required: true, message: '课程名称不能为空', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.courseNameEmpty'), trigger: 'blur' }
|
||||
],
|
||||
'months': [
|
||||
{ required: true, message: '请输入购买月数', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.purchaseMonth'), trigger: 'blur' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('请输入有效的购买月数'));
|
||||
callback(new Error(this.$t('tip.purchaseMonth')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
'total': [
|
||||
{ required: true, message: '请输入权限数量', trigger: 'blur' },
|
||||
{ required: true, message: this.$t('rules.accessNumber'), trigger: 'blur' },
|
||||
{
|
||||
validator(rule, value, callback) {
|
||||
if (Number.isInteger(Number(value)) && Number(value) >= 0) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('请输入有效的权限个数'));
|
||||
callback(new Error(this.$t('tip.permissionsNumber')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
@ -163,7 +163,7 @@ export default {
|
||||
methods: {
|
||||
// 选择自定义时长,修改页面控件状态
|
||||
chooseEvent(label) {
|
||||
this.disabled = label !== '自定义';
|
||||
this.disabled = label !== this.$t('global.custom');
|
||||
this.chooseList.forEach(elem => {
|
||||
if (label === elem.label) {
|
||||
this.saleModel.months = elem.value;
|
||||
@ -184,7 +184,7 @@ export default {
|
||||
commitOrder(model).then(response => {
|
||||
this.$emit('commit', response.data);
|
||||
}).catch(() => {
|
||||
this.$messageBox('提交订单失败');
|
||||
this.$messageBox(this.$t('tip.failedSubmitOrder'));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="批量创建"
|
||||
:title="$t('map.createBatch')"
|
||||
:visible.sync="visible"
|
||||
width="400px"
|
||||
:before-close="doClose"
|
||||
>
|
||||
<el-radio-group v-model="mode" class="radio-mode">
|
||||
<el-radio label="01">创建</el-radio>
|
||||
<el-radio label="02">批量创建</el-radio>
|
||||
<el-radio label="01">{{ $t('map.create') }}</el-radio>
|
||||
<el-radio label="02">{{ $t('map.createBatch') }}</el-radio>
|
||||
</el-radio-group>
|
||||
<el-form ref="form" :model="addModel" label-width="90px" size="mini" :rules="rules">
|
||||
<el-form-item v-if="mode == '01'" label="车组号:" prop="groupNumber">
|
||||
<el-form-item v-if="mode == '01'" :label="$t('map.groupNumber')" prop="groupNumber">
|
||||
<el-input v-model="addModel.groupNumber" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="mode == '02'" label="车组号区间:" prop="range">
|
||||
<el-form-item v-if="mode == '02'" :label="$t('map.groupNumberInterval')" prop="range">
|
||||
<el-input-number v-model="addModel.range.beg" :min="1" :max="999" />
|
||||
<el-input-number v-model="addModel.range.end" :min="1" :max="999" />
|
||||
</el-form-item>
|
||||
<el-form-item label="车类型:" prop="modelCode">
|
||||
<el-form-item :label="$t('map.modelCode')" prop="modelCode">
|
||||
<el-select v-model="addModel.modelCode" filterable>
|
||||
<el-option
|
||||
v-for="item in trainModelList"
|
||||
@ -27,18 +27,18 @@
|
||||
/>
|
||||
</el-select>
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="small" @click="newTrainMode">添加</el-button>
|
||||
<el-button type="primary" size="small" @click="uptTrainMode(addModel.modelCode)">更新
|
||||
<el-button type="primary" size="small" @click="newTrainMode">{{ $t('map.add') }}</el-button>
|
||||
<el-button type="primary" size="small" @click="uptTrainMode(addModel.modelCode)">{{ $t('map.updata') }}
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" @click="delTrainMode(addModel.modelCode)">删除
|
||||
<el-button type="primary" size="small" @click="delTrainMode(addModel.modelCode)">{{ $t('map.deleteObj') }}
|
||||
</el-button>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">确 定</el-button>
|
||||
<el-button @click="visible = false">{{ $t('map.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="handleConfirm">{{ $t('map.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -79,14 +79,14 @@ export default {
|
||||
range.end >= range.beg) {
|
||||
callback();
|
||||
} else {
|
||||
callback(new Error('请选择有效的区间'));
|
||||
callback(new Error(this.$t('tip.selectValidInterval')));
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
modelCode: [
|
||||
{ required: true, message: '请选择车类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
|
@ -62,13 +62,13 @@ export default {
|
||||
},
|
||||
rules: {
|
||||
code: [
|
||||
{ required: true, message: '请重新选择设备', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.pleaseReSelectDevice'), trigger: 'change' }
|
||||
],
|
||||
groupNumber: [
|
||||
{ required: true, message: '请输入车组号', trigger: 'blur' }
|
||||
{ required: true, message: this.$t('rules.pleaseEnterGroupNumber'), trigger: 'blur' }
|
||||
],
|
||||
modelCode: [
|
||||
{ required: true, message: '请选择车类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.selectTrainType'), trigger: 'change' }
|
||||
]
|
||||
},
|
||||
search: ''
|
||||
@ -130,7 +130,7 @@ export default {
|
||||
if (Object.keys(this.$store.state.map.map || {}).length) {
|
||||
this.$refs.trainMode.doShow({}, 'ADD');
|
||||
} else {
|
||||
this.$messageBox('请先选择地图');
|
||||
this.$messageBox(this.$t('tip.selectMap'));
|
||||
}
|
||||
},
|
||||
uptTrainMode(code) {
|
||||
@ -138,7 +138,7 @@ export default {
|
||||
if (index >= 0) {
|
||||
this.$refs.trainMode.doShow(this.trainModelList[index], 'UPT');
|
||||
} else {
|
||||
this.$messageBox('请选择查看的列车模型');
|
||||
this.$messageBox(this.$t('tip.selectTrainType'));
|
||||
}
|
||||
},
|
||||
delTrainMode(code) {
|
||||
@ -154,15 +154,15 @@ export default {
|
||||
const train = this.$store.getters['map/getDeviceByCode'](row.code);
|
||||
if (train) {
|
||||
const _that = this;
|
||||
this.$confirm('是否确认删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('tip.confirmDeletion'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
_that.$emit('delMapModel', train);
|
||||
_that.deviceSelect();
|
||||
}).catch(() => {
|
||||
_that.$message.info('已取消删除');
|
||||
_that.$message.info(this.$t('tip.cancelledDelete'));
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -1,318 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<turnback-bar :title="turnbackBarTitle" />
|
||||
<div class="card-box">
|
||||
<el-steps class="steps" :active="display">
|
||||
<el-step :title="title" icon="el-icon-edit-outline" />
|
||||
<el-step title="" icon="el-icon-upload" />
|
||||
</el-steps>
|
||||
<el-card class="forms">
|
||||
<el-scrollbar
|
||||
wrap-class="scrollbar-wrapper"
|
||||
:style="{height:height - 300 + 'px'}"
|
||||
style="padding-top: 60px"
|
||||
>
|
||||
<el-form ref="form" :model="addModel" label-width="140px">
|
||||
<el-form-item :label="this.$t('map.belongsToMapName')+':'" prop="mapName">
|
||||
<el-input v-model="addModel.mapName" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('map.productType')+':'" prop="prdType">
|
||||
<el-radio-group v-model="addModel.prdType">
|
||||
<template v-for="item in chooseList">
|
||||
<el-radio-button :key="item" :label="item.code">{{ item.name }}</el-radio-button>
|
||||
</template>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="this.$t('map.productCode')+':'"
|
||||
prop="code"
|
||||
:rules="node && node.data.type ==='map' ? baseRules.code:{}"
|
||||
>
|
||||
<el-input v-model="addModel.code" :disabled="codeDisabled" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('map.productName')+':'" prop="name" :rules="baseRules.name">
|
||||
<el-input v-model="addModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('map.productDescription')+':'" prop="remarks" :rules="baseRules.remarks">
|
||||
<el-input v-model="addModel.remarks" type="textarea" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="this.$t('map.associateTrainingTypes')+':'" prop="trainTypes" :rules="baseRules.trainTypes">
|
||||
<el-select
|
||||
v-model="addModel.trainTypes"
|
||||
multiple
|
||||
:placeholder="this.$t('map.pleaseSelect')"
|
||||
@change="trainTypesChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in trainTypesList"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isAdd" type="primary" @click="create">{{$t('global.create')}}</el-button>
|
||||
<el-button v-if="isEdit" type="warning" @click="update">{{$t('global.update')}}</el-button>
|
||||
<el-button v-if="isEdit" type="danger" @click="deleteObj">{{$t('global.delete')}}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { createTrainingCategory, updateTrainingCategory, deleteTrainingCategory } from '@/api/management/mapprd';
|
||||
import { getProductDetail } from '@/api/management/mapprd';
|
||||
import localStore from 'storejs';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
|
||||
export default {
|
||||
name: 'ShowDetail',
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
],
|
||||
props: {
|
||||
height: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
node: null,
|
||||
display: 1,
|
||||
// height: 0,
|
||||
codeDisabled: true,
|
||||
rules: {},
|
||||
trainTypesList: [],
|
||||
initTrainTypes: [],
|
||||
chooseList: [],
|
||||
addModel: {
|
||||
id: '',
|
||||
mapId: '',
|
||||
mapName: '',
|
||||
skinCode: '',
|
||||
name: '',
|
||||
remarks: '',
|
||||
code: '',
|
||||
prdType: '01',
|
||||
trainTypes: []
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
if (this.isAdd) {
|
||||
return this.$t('map.createTrainingCategories');
|
||||
} else if (this.isEdit) {
|
||||
return this.$t('map.editTrainingCategories');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
turnbackBarTitle() {
|
||||
return '';
|
||||
},
|
||||
isAdd() {
|
||||
return this.$route.params.mode == 'add';
|
||||
},
|
||||
isEdit() {
|
||||
return this.$route.params.mode == 'edit';
|
||||
},
|
||||
baseRules() {
|
||||
return {
|
||||
code: [
|
||||
{ required: true, message: this.$t('rules.productCodeEnter'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: this.$t('rules.productNameEnter'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
{ required: true, message: this.$t('rules.productDescriptionEnter'), trigger: 'change' }
|
||||
],
|
||||
trainTypes: [
|
||||
{ required: true, message: this.$t('rules.trainingTypeSelect'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$Dictionary.trainingType().then(list => {
|
||||
this.trainTypesList = list;
|
||||
});
|
||||
this.$Dictionary.productPostType().then(list => {
|
||||
this.chooseList = list;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
resizeHandler: function () {
|
||||
this.height = this._clientHeight;
|
||||
},
|
||||
loadData(node) {
|
||||
if (node) {
|
||||
// 清除数据
|
||||
this.node = node;
|
||||
this.initTrainTypes = [];
|
||||
this.$refs.form.resetFields();
|
||||
if (node.data.type === 'map') {
|
||||
this.codeDisabled = false;
|
||||
getPublishMapInfo(node.data.id).then(response => {
|
||||
const data = response.data;
|
||||
this.addModel.mapName = data.name;
|
||||
this.addModel.skinCode = data.skinCode;
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
} else if (node.data.type === 'prd') {
|
||||
this.codeDisabled = true;
|
||||
getProductDetail(node.data.id).then(response => {
|
||||
this.addModel.mapName = node.parent.data.name;
|
||||
this.addModel.mapId = node.parent.data.id;
|
||||
this.addModel.name = response.data.name;
|
||||
this.addModel.remarks = response.data.remarks;
|
||||
this.addModel.prdType = response.data.prdType || '01';
|
||||
this.addModel.code = response.data.code;
|
||||
this.addModel.skinCode = response.data.skinCode;
|
||||
this.addModel.trainTypes = this.initTrainTypes = response.data.trainTypes;
|
||||
this.addModel.id = response.data.id;
|
||||
this.loading = false;
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
||||
|
||||
// 清除表单验证提示信息
|
||||
this.$nextTick(function () {
|
||||
this.$refs.form.clearValidate();
|
||||
});
|
||||
}
|
||||
},
|
||||
create() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const data = {
|
||||
skinCode: this.addModel.skinCode,
|
||||
mapName: this.addModel.mapName,
|
||||
name: this.addModel.name,
|
||||
remarks: this.addModel.remarks,
|
||||
prdType: this.addModel.prdType,
|
||||
code: this.addModel.code,
|
||||
trainTypes: this.addModel.trainTypes
|
||||
};
|
||||
createTrainingCategory(data).then(response => {
|
||||
this.initTrainTypes = this.addModel.trainTypes;
|
||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('mapId') || '']);
|
||||
this.$message.success(this.$t('tip.productCreationSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.productCreationFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
update() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
updateTrainingCategory(this.addModel).then(response => {
|
||||
this.initTrainTypes = this.addModel.trainTypes;
|
||||
this.$message.success(this.$t('tip.updateProductSuccessfully'));
|
||||
// this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('mapId') || '']);
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.updateProductFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
trainTypesChange(tag) {
|
||||
if (this.initTrainTypes && this.initTrainTypes.length > 0) {
|
||||
this.initTrainTypes.forEach(elem => {
|
||||
if (this.addModel.trainTypes.indexOf(elem) < 0) {
|
||||
this.addModel.trainTypes = this.initTrainTypes;
|
||||
this.$messageBox(this.$t('error.cannotNarrowDown'));
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
deleteObj() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
deleteTrainingCategory(this.addModel).then(response => {
|
||||
this.$message.success(this.$t('tip.deleteProductSuccessfully'));
|
||||
this.$refs.form.resetFields();
|
||||
this.node = null;
|
||||
this.$emit('refresh', [localStore.get('cityCode') || '', localStore.get('mapId') || '']);
|
||||
}).catch(error => {
|
||||
if (error.code === 500009) {
|
||||
this.$messageBox(this.$t('tip.cannotDeleteProduct'));
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.deleteProductFailed'));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
turnback() {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.card-box {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.steps {
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
padding-top: 20px;
|
||||
height: 100%;
|
||||
|
||||
/deep/ {
|
||||
.el-step__icon.is-icon {
|
||||
width: 95px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.forms {
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
margin-top: 15px;
|
||||
|
||||
/deep/ {
|
||||
.el-select {
|
||||
float: left;
|
||||
width: calc(600px);
|
||||
}
|
||||
|
||||
.el-textarea {
|
||||
float: left;
|
||||
width: calc(600px);
|
||||
}
|
||||
|
||||
.el-form-item__content>.el-input {
|
||||
float: left;
|
||||
width: calc(600px);
|
||||
}
|
||||
|
||||
.el-input-number {
|
||||
float: left;
|
||||
width: calc(250px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.draft {
|
||||
width: 300px;
|
||||
text-align: center;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
@ -7,10 +7,10 @@
|
||||
<el-card class="forms">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height:height -120 + 'px'}" style="padding-top: 40px">
|
||||
<el-form ref="form" :model="addModel" label-width="140px">
|
||||
<el-form-item label="皮肤类型:" prop="mapName">
|
||||
<el-form-item :label="$t('map.skinStyleColon')" prop="mapName">
|
||||
<el-input v-model="addModel.mapName" :disabled="true" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品类型:" prop="prdType">
|
||||
<el-form-item :label="$t('map.productType') + ':'" prop="prdType">
|
||||
<el-radio-group v-model="addModel.prdType" :disabled="isUpdate">
|
||||
<template v-for="item in chooseList">
|
||||
<el-radio-button :key="item.code" :label="item.code">{{ item.name }}</el-radio-button>
|
||||
@ -18,22 +18,22 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="产品编码:"
|
||||
:label="$t('map.productCode') + ':'"
|
||||
prop="code"
|
||||
:rules="node && node.data.type ==='skin' ? baseRules.code:{}"
|
||||
>
|
||||
<el-input v-model="addModel.code" :disabled="codeDisabled" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产品名称:" prop="name" :rules="baseRules.name">
|
||||
<el-form-item :label="$t('map.productName') + ':'" prop="name" :rules="baseRules.name">
|
||||
<el-input v-model="addModel.name" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="isShowTrainTypes"
|
||||
label="关联实训类型:"
|
||||
:label="$t('map.associateTrainingTypes') + ':'"
|
||||
prop="trainTypes"
|
||||
:rules="baseRules.trainTypes"
|
||||
>
|
||||
<el-select v-model="addModel.trainTypes" multiple placeholder="请选择" @change="trainTypesChange">
|
||||
<el-select v-model="addModel.trainTypes" multiple :placeholder="$t('map.pleaseSelect')" @change="trainTypesChange">
|
||||
<el-option
|
||||
v-for="item in trainTypesList"
|
||||
:key="item.code"
|
||||
@ -42,7 +42,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="产品说明:" prop="remarks" :rules="baseRules.remarks">
|
||||
<el-form-item :label="$t('map.productDescription') + ':'" prop="remarks" :rules="baseRules.remarks">
|
||||
<el-input v-model="addModel.remarks" type="textarea" :rows="4" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -50,24 +50,23 @@
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isCreate" type="primary" @click="create">创建</el-button>
|
||||
<el-button v-if="isUpdate" type="primary" @click="update">更新</el-button>
|
||||
<el-button v-if="isDelete" type="danger" @click="deleteObj">删除</el-button>
|
||||
<el-button v-if="isCreate" type="primary" @click="create">{{ $t('map.create') }}</el-button>
|
||||
<el-button v-if="isUpdate" type="primary" @click="update">{{ $t('map.updata') }}</el-button>
|
||||
<el-button v-if="isDelete" type="danger" @click="deleteObj">{{ $t('map.deleteObj') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { createTrainingCategory, updateTrainingCategory, getProductDetail, deleteTrainingCategory, checkMapProductCodeExist } from '@/api/management/mapprd';
|
||||
// import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'ShowDetail',
|
||||
props: {
|
||||
height: {
|
||||
type: Number
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@ -97,13 +96,13 @@ export default {
|
||||
title() {
|
||||
if (this.node && this.node.data) {
|
||||
if (this.node.data.type === 'skin') {
|
||||
return '创建产品类目';
|
||||
return this.$t('map.createProductCategories');
|
||||
} else if (this.node.data.type === 'prd' ||
|
||||
this.node.data.type === 'prd') {
|
||||
return '编辑产品类目';
|
||||
return this.$t('map.editTraining');
|
||||
}
|
||||
}
|
||||
return '请选择操作';
|
||||
return this.$t('map.selectOperation');
|
||||
},
|
||||
isCreate() {
|
||||
return this.node && this.node.data.type === 'skin';
|
||||
@ -120,16 +119,16 @@ export default {
|
||||
baseRules() {
|
||||
return {
|
||||
code: [
|
||||
{ required: true, message: '请输入产品编码', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productCodeEnter'), trigger: 'change' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '请输入产品名称', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productNameEnter'), trigger: 'change' }
|
||||
],
|
||||
remarks: [
|
||||
{ required: true, message: '请输入产品说明', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.productDescriptionEnter'), trigger: 'change' }
|
||||
],
|
||||
trainTypes: [
|
||||
{ required: true, message: '请选择关联实训类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('rules.trainingTypeSelect'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
@ -198,15 +197,15 @@ export default {
|
||||
createTrainingCategory(data).then(response => {
|
||||
this.initTrainTypes = this.addModel.trainTypes;
|
||||
this.$emit('refresh');
|
||||
this.$message.success('创建产品成功');
|
||||
this.$message.success(this.$t('tip.productCreationSuccessfully'));
|
||||
}).catch(() => {
|
||||
this.$messageBox('创建产品失败');
|
||||
this.$messageBox(this.$t('tip.productCreationFailed'));
|
||||
});
|
||||
} else {
|
||||
this.$messageBox('产品Code已存在');
|
||||
this.$messageBox(this.$t('tip.productCodeExists'));
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$messageBox('校验产品Code是否已存在失败');
|
||||
this.$messageBox(this.$t('tip.productCodeExists'));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -217,10 +216,10 @@ export default {
|
||||
this.addModel.trainTypes = this.isShowTrainTypes ? this.addModel.trainTypes : [];
|
||||
updateTrainingCategory(this.addModel).then(response => {
|
||||
this.initTrainTypes = this.addModel.trainTypes;
|
||||
this.$message.success('更新产品成功');
|
||||
this.$message.success(this.$t('tip.updateProductSuccessfully'));
|
||||
this.$emit('refresh');
|
||||
}).catch(() => {
|
||||
this.$messageBox('更新产品失败');
|
||||
this.$messageBox(this.$t('tip.updateProductFailed'));
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -230,7 +229,7 @@ export default {
|
||||
this.initTrainTypes.forEach(elem => {
|
||||
if (this.addModel.trainTypes.indexOf(elem) < 0) {
|
||||
this.addModel.trainTypes = this.initTrainTypes;
|
||||
this.$messageBox('不能缩小上次创建的实训列表的范围');
|
||||
this.$messageBox(this.$t('tip.narrowScope'));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -239,15 +238,15 @@ export default {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
deleteTrainingCategory(this.addModel).then(response => {
|
||||
this.$message.success('删除产品成功');
|
||||
this.$message.success(this.$t('tip.deleteProductSuccessfully'));
|
||||
this.$refs.form.resetFields();
|
||||
this.node = null;
|
||||
this.$emit('refresh');
|
||||
}).catch(error => {
|
||||
if (error.code === 500009) {
|
||||
this.$messageBox('产品已被使用无法删除');
|
||||
this.$messageBox(this.$t('tip.cannotDeleteProduct'));
|
||||
} else {
|
||||
this.$messageBox('删除产品失败');
|
||||
this.$messageBox(this.$t('tip.deleteProductFailed'));
|
||||
}
|
||||
});
|
||||
}
|
@ -10,7 +10,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { deleteMap, listMap, newMap, getMapDetail, publishMap, editMap, saveAsMap } from '@/api/jmap/mapdraft';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import TrainingTreeOperate from './tree';
|
||||
import EditDetailOperate from './edit';
|
@ -1,154 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPublishMapList, delPublishMap } from '@/api/jmap/map';
|
||||
import { getSkinCodeList } from '@/api/management/mapskin';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import localStore from 'storejs';
|
||||
|
||||
export default {
|
||||
name: 'ProductList',
|
||||
data() {
|
||||
return {
|
||||
cityList: [],
|
||||
skinCodeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('map.name')
|
||||
},
|
||||
cityCode: {
|
||||
type: 'select',
|
||||
label: this.$t('map.selectCity'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: getPublishMapList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('map.mapName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('map.skinType'),
|
||||
prop: 'skinCode',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.skinCode, this.skinCodeList, ['code', 'name']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('map.turnoverTime'),
|
||||
prop: 'updateTime'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('map.productList'),
|
||||
handleClick: this.handleList,
|
||||
type: ''
|
||||
},
|
||||
{
|
||||
name: this.$t('global.modify'),
|
||||
handleClick: this.handleEdit,
|
||||
type: 'warning'
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handleDelete,
|
||||
type: 'danger'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleAdd }
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
isShow() {
|
||||
return this.$store.getters['roles'].indexOf('05');
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.cityList = [];
|
||||
this.$Dictionary.cityType().then(list => {
|
||||
this.cityList = list;
|
||||
this.cityList.forEach(elem => {
|
||||
this.queryForm.queryObject.cityCode.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.loadingCityListFailed'));
|
||||
});
|
||||
|
||||
this.skinCodeList = [];
|
||||
getSkinCodeList().then(response => {
|
||||
this.skinCodeList = response.data;
|
||||
});
|
||||
},
|
||||
// 添加
|
||||
handleAdd() {
|
||||
this.$router.push({ path: `${UrlConfig.map.productDraft}/add/0` });
|
||||
},
|
||||
|
||||
// 列表
|
||||
handleList(index, row) {
|
||||
|
||||
},
|
||||
|
||||
// 编辑
|
||||
handleEdit(index, row) {
|
||||
this.$router.push({ path: `${UrlConfig.map.productDraft}/edit/0` });
|
||||
},
|
||||
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm(this.$t('tip.deleteTypeHint'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
delPublishMap(row.id).then(response => {
|
||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||
this.reloadTable();
|
||||
localStore.remove('mapId');
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox(this.$t('tip.failDelete'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>产品类目</span>
|
||||
<span>{{ $t('map.productCategories') }}</span>
|
||||
</div>
|
||||
<el-input v-model="filterText" placeholder="输入关键字进行过滤" clearable />
|
||||
<el-input v-model="filterText" :placeholder="$t('tip.enterKeywordsFiltering')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height +'px' }">
|
||||
<el-tree
|
||||
ref="trainingTree"
|
||||
@ -99,7 +99,7 @@ export default {
|
||||
this.treeData = this.convertTreeData(response.data);
|
||||
this.$nextTick(() => { this.loading = false; });
|
||||
}).catch(() => {
|
||||
this.$messageBox('刷新失败');
|
||||
this.$messageBox(this.$t('tip.refreshFailure'));
|
||||
this.loading = false;
|
||||
});
|
||||
}
|
@ -1,69 +1,73 @@
|
||||
<template>
|
||||
<el-dialog :title="this.$t('map.setupOperationGraph')" :visible.sync="dialogShow" width="600px" :before-close="doClose" append-to-body>
|
||||
<el-form ref="form" :model="formModel" label-width="160px" size="mini" :rules="rules">
|
||||
<el-form-item :label="this.$t('map.selectOperationGraphDataRange')+':'" prop="timeArea">
|
||||
<el-time-picker is-range v-model="formModel.timeArea" range-separator="this.$t('map.to')" start-placeholder="this.$t('global.startTime')"
|
||||
end-placeholder="this.$t('global.endTime')" placeholder="this.$t('map.selectionTimeRange')">
|
||||
</el-time-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="handle">{{$t(global.confirm)}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog :title="this.$t('map.setupOperationGraph')" :visible.sync="dialogShow" width="600px" :before-close="doClose" append-to-body>
|
||||
<el-form ref="form" :model="formModel" label-width="160px" size="mini" :rules="rules">
|
||||
<el-form-item :label="this.$t('map.selectOperationGraphDataRange')+':'" prop="timeArea">
|
||||
<el-time-picker
|
||||
v-model="formModel.timeArea"
|
||||
is-range
|
||||
range-separator="this.$t('map.to')"
|
||||
start-placeholder="this.$t('global.startTime')"
|
||||
end-placeholder="this.$t('global.endTime')"
|
||||
placeholder="this.$t('map.selectionTimeRange')"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="handle">{{ $t(global.confirm) }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { MapDeviceType, OperationEvent } from '@/scripts/ConstDic';
|
||||
export default {
|
||||
name: 'ChartSetting',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
intervalList: [
|
||||
{ code: '01', value: this.$t('map.pointSystem1') },
|
||||
{ code: '02', value: this.$t('map.pointSystem2') },
|
||||
{ code: '05', value: this.$t('map.pointSystem5') },
|
||||
],
|
||||
formModel: {
|
||||
timeArea: [new Date(2018, 10, 1), new Date(2018, 10, 1)],
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
rules() {
|
||||
return {
|
||||
timeArea: [
|
||||
{ required: true, message: this.$t('rules.selectDataRange'), trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handle() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
let baseDate = new Date(2018, 10, 1);
|
||||
let model = {
|
||||
startValue: this.formModel.timeArea[0].valueOf() - baseDate.valueOf(),
|
||||
endValue: this.formModel.timeArea[1].valueOf() - baseDate.valueOf(),
|
||||
intervalLevel: parseFloat('01')
|
||||
}
|
||||
this.$emit('settingExac', model);
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'ChartSetting',
|
||||
data() {
|
||||
return {
|
||||
dialogShow: false,
|
||||
intervalList: [
|
||||
{ code: '01', value: this.$t('map.pointSystem1') },
|
||||
{ code: '02', value: this.$t('map.pointSystem2') },
|
||||
{ code: '05', value: this.$t('map.pointSystem5') }
|
||||
],
|
||||
formModel: {
|
||||
timeArea: [new Date(2018, 10, 1), new Date(2018, 10, 1)]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
rules() {
|
||||
return {
|
||||
timeArea: [
|
||||
{ required: true, message: this.$t('rules.selectDataRange'), trigger: 'change' }
|
||||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.dialogShow = true;
|
||||
},
|
||||
doClose() {
|
||||
this.dialogShow = false;
|
||||
},
|
||||
handle() {
|
||||
this.$refs.form.validate((valid) => {
|
||||
if (valid) {
|
||||
const baseDate = new Date(2018, 10, 1);
|
||||
const model = {
|
||||
startValue: this.formModel.timeArea[0].valueOf() - baseDate.valueOf(),
|
||||
endValue: this.formModel.timeArea[1].valueOf() - baseDate.valueOf(),
|
||||
intervalLevel: parseFloat('01')
|
||||
};
|
||||
this.$emit('settingExac', model);
|
||||
this.doClose();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
|
@ -1,57 +1,57 @@
|
||||
<template>
|
||||
<div class="main">
|
||||
<div class="list" :style="{width: widthLeft+'px'}">
|
||||
<chart-list ref="list" :height="height"></chart-list>
|
||||
</div>
|
||||
<drap-left :widthLeft="widthLeft" @drapWidth="drapWidth"></drap-left>
|
||||
<transition>
|
||||
<router-view style="float: right;" :style="{width: width+'px'}"></router-view>
|
||||
</transition>
|
||||
<div class="main">
|
||||
<div class="list" :style="{width: widthLeft+'px'}">
|
||||
<chart-list ref="list" :height="height" />
|
||||
</div>
|
||||
<drap-left :width-left="widthLeft" @drapWidth="drapWidth" />
|
||||
<transition>
|
||||
<router-view style="float: right;" :style="{width: width+'px'}" />
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import DrapLeft from '@/views/components/drapLeft/index';
|
||||
import ChartList from './manage/list';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import DrapLeft from '@/views/components/drapLeft/index';
|
||||
import ChartList from './manage/list';
|
||||
|
||||
export default {
|
||||
name: 'runPlan',
|
||||
mixins: [WindowResizeHandler],
|
||||
components: {
|
||||
DrapLeft,
|
||||
ChartList,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
width: 0,
|
||||
height: 0,
|
||||
widthLeft: 320,
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
widthLeft(val) {
|
||||
this.setRunPlanResize(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
},
|
||||
setRunPlanResize(LeftWidth) {
|
||||
if (this.$refs) {
|
||||
this.width = this._clientWidth - LeftWidth;
|
||||
this.height = this._clientHeight - 150;
|
||||
this.$store.dispatch('runPlan/resize', { width: this.width, height: this.height + 90 });
|
||||
} else {
|
||||
setTimeout(() => { this.setRunPlanResize(LeftWidth); }, 300)
|
||||
}
|
||||
},
|
||||
resizeHandler() {
|
||||
this.setRunPlanResize(this.widthLeft);
|
||||
}
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'RunPlan',
|
||||
components: {
|
||||
DrapLeft,
|
||||
ChartList
|
||||
},
|
||||
mixins: [WindowResizeHandler],
|
||||
data() {
|
||||
return {
|
||||
width: 0,
|
||||
height: 0,
|
||||
widthLeft: 320
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
widthLeft(val) {
|
||||
this.setRunPlanResize(val);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
drapWidth(width) {
|
||||
this.widthLeft = Number(width);
|
||||
},
|
||||
setRunPlanResize(LeftWidth) {
|
||||
if (this.$refs) {
|
||||
this.width = this._clientWidth - LeftWidth;
|
||||
this.height = this._clientHeight - 150;
|
||||
this.$store.dispatch('runPlan/resize', { width: this.width, height: this.height + 90 });
|
||||
} else {
|
||||
setTimeout(() => { this.setRunPlanResize(LeftWidth); }, 300);
|
||||
}
|
||||
},
|
||||
resizeHandler() {
|
||||
this.setRunPlanResize(this.widthLeft);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
@ -64,4 +64,4 @@
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
@ -14,8 +14,8 @@
|
||||
<el-input v-model="context" type="textarea" :rows="10" readonly />
|
||||
</el-row>
|
||||
<el-row type="flex" justify="center" class="button-group">
|
||||
<el-button @click="handleCommit">{{$t('global.confirm')}}</el-button>
|
||||
<el-button @click="doClose">{{$t('global.cancel')}}</el-button>
|
||||
<el-button @click="handleCommit">{{ $t('global.confirm') }}</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</el-row>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -98,11 +98,11 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :disabled="isSpeed" @click="back"><span>{{$t('global.lastStep')}}</span></el-button>
|
||||
<el-button type="primary" :disabled="isSpeed" @click="back"><span>{{ $t('global.previousStep') }}</span></el-button>
|
||||
<el-button type="primary" :loading="loading" @click="next">
|
||||
<span v-if="isSpeed && disabled">{{$t('global.skip')}}</span>
|
||||
<span v-if="isSpeed && !disabled">{{$t('global.create')}}</span>
|
||||
<span v-if="isChart">{{$t('global.confirm')}}</span>
|
||||
<span v-if="isSpeed && disabled">{{ $t('global.skip') }}</span>
|
||||
<span v-if="isSpeed && !disabled">{{ $t('global.create') }}</span>
|
||||
<span v-if="isChart">{{ $t('global.confirm') }}</span>
|
||||
</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
@ -118,7 +118,9 @@ export default {
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
requited: true
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -6,8 +6,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="importf">{{$t('map.import')}}</el-button>
|
||||
<el-button @click="close">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" @click="importf">{{ $t('map.import') }}</el-button>
|
||||
<el-button @click="close">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -21,7 +21,9 @@ export default {
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
requited: true
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="skin-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>{{$t('map.mapList')}}</span>
|
||||
<span>{{ $t('map.mapList') }}</span>
|
||||
</div>
|
||||
<el-input v-model="filterText" :placeholder="this.$t('global.filteringKeywords')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: (height)+'px'}">
|
||||
|
@ -8,8 +8,8 @@
|
||||
</el-form>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button :disabled="loading" @click="dialogShow = false">{{$t('global.cancel')}}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="publish">{{$t('global.confirm')}}</el-button>
|
||||
<el-button :disabled="loading" @click="dialogShow = false">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" :loading="loading" @click="publish">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
@ -22,7 +22,9 @@ export default {
|
||||
props: {
|
||||
selected: {
|
||||
type: Object,
|
||||
requited: true
|
||||
default: function () {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
|
@ -12,9 +12,9 @@
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isAdd" type="primary" style="margin-left: 120px" @click="create">{{$t('global.create')}}</el-button>
|
||||
<el-button v-if="isEdit" type="warning" style="margin-left: 120px" @click="update">{{$t('global.update')}}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{$t('global.return')}}</el-button>
|
||||
<el-button v-if="isAdd" type="primary" style="margin-left: 120px" @click="create">{{ $t('global.create') }}</el-button>
|
||||
<el-button v-if="isEdit" type="warning" style="margin-left: 120px" @click="update">{{ $t('global.update') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -48,10 +48,10 @@ export default {
|
||||
computed: {
|
||||
title() {
|
||||
if (this.isAdd) {
|
||||
return this.$t('map.addMapSkin');
|
||||
return this.$t('map.addMapSkin');
|
||||
}
|
||||
if (this.isEdit) {
|
||||
return this.$t('map.updateMapSkin');
|
||||
return this.$t('map.updateMapSkin');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
|
@ -12,8 +12,8 @@
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isAdd" type="primary" style="margin-left: 120px" @click="create">{{$t('global.create')}}</el-button>
|
||||
<el-button v-if="isEdit" type="primary" style="margin-left: 120px" @click="update">{{$t('global.update')}}</el-button>
|
||||
<el-button v-if="isAdd" type="primary" style="margin-left: 120px" @click="create">{{ $t('global.create') }}</el-button>
|
||||
<el-button v-if="isEdit" type="primary" style="margin-left: 120px" @click="update">{{ $t('global.update') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -47,10 +47,10 @@ export default {
|
||||
computed: {
|
||||
title() {
|
||||
if (this.isAdd) {
|
||||
return this.$t('map.addMapSkin');
|
||||
return this.$t('map.addMapSkin');
|
||||
}
|
||||
if (this.isEdit) {
|
||||
return this.$t('map.updateMapSkin');
|
||||
return this.$t('map.updateMapSkin');
|
||||
}
|
||||
return '';
|
||||
},
|
||||
|
@ -25,11 +25,11 @@ export default {
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('map.skinDesignation'),
|
||||
label: this.$t('map.skinDesignation')
|
||||
},
|
||||
code: {
|
||||
type: 'text',
|
||||
label: this.$t('map.skinCoding'),
|
||||
label: this.$t('map.skinCoding')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -162,10 +162,6 @@ import {saveScriptScenes, saveScriptData, dumpScriptData, updateMapLocation, scr
|
||||
this.initAutoSaveScript();
|
||||
})
|
||||
},
|
||||
saveMaplocation()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -98,6 +98,11 @@
|
||||
this.$parent.$parent.$parent.setIsParse(this.isPause);
|
||||
this.$refs['modalData'].clearValidate();
|
||||
this.$refs['commandData'].clearValidate();
|
||||
if(!val)
|
||||
{
|
||||
this.initActionData();
|
||||
this.initCommandActionData();
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
@ -219,7 +224,7 @@
|
||||
this.adding=false;
|
||||
this.$message.success('添加指令成功');
|
||||
this.$emit('create',true);
|
||||
this.initCommandActionData();
|
||||
// this.initCommandActionData();
|
||||
}).catch(error => {
|
||||
this.adding=false;
|
||||
this.$messageBox(`添加指令失败: ${error.message}`);
|
||||
@ -245,7 +250,7 @@
|
||||
this.modifying=false;
|
||||
this.$message.success('添加对话成功');
|
||||
this.$emit('create',true);
|
||||
this.initActionData();
|
||||
// this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
this.$messageBox(`添加对话失败: ${error.message}`);
|
||||
@ -261,7 +266,7 @@
|
||||
this.$emit('modifyButtonName');
|
||||
this.$message.success('修改对话成功');
|
||||
this.$emit('create',false);
|
||||
this.initActionData();
|
||||
// this.initActionData();
|
||||
}).catch(error => {
|
||||
this.modifying=false;
|
||||
this.$messageBox(`修改对话失败: ${error.message}`);
|
||||
|
@ -14,12 +14,25 @@
|
||||
<el-timeline-item v-for="(actionInfo,index) in actionInfoList" :key="index">
|
||||
<el-card>
|
||||
<div class="actionTable">
|
||||
|
||||
<span class="detail" v-html="actionInfo.detail">
|
||||
</span>
|
||||
<span class="otherInfo">{{actionInfo.otherInfo}}</span>
|
||||
<span class="otherInfo" v-html="actionInfo.otherInfo"></span>
|
||||
<span v-if="actionInfo.isCoversition">
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>对</span>
|
||||
<span class="roleClass">{{actionInfo.targetName}}</span>
|
||||
<span>: </span>
|
||||
<span>{{actionInfo.reply}}</span>
|
||||
</span>
|
||||
<span v-else>
|
||||
<span class="roleClass">{{actionInfo.memberName}}</span>
|
||||
<span>执行指令: </span>
|
||||
<span class="commandStyle">{{actionInfo.command}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="btnGroup">
|
||||
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" :disabled="actionInfo.disabled">修改</el-button>
|
||||
<el-button type="primary" size="mini" style="margin-left:10px;" @click="modifyAction(actionInfo.row)" v-if="actionInfo.visible">修改</el-button>
|
||||
<!-- <el-button type="danger" size="mini" @click="deleteAction(actionInfo.id)">删除</el-button> -->
|
||||
</div>
|
||||
</el-card>
|
||||
@ -100,7 +113,7 @@
|
||||
{
|
||||
let target=memberVOList.find(elem=>{return elem.id==element.targetId});
|
||||
let targetName=target.name==undefined?"":" - "+target.name;
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>"+" 对 "+"<span style='color:#409EFF'>"+target.role+targetName+"</span>:",otherInfo:element.reply,row:element,disabled:false});
|
||||
this.actionInfoList.push({id:element.id,isCoversition:true,memberName:member.role+memberName,targetName:target.role+targetName,reply:element.reply,row:element,visible:true});
|
||||
break;
|
||||
}
|
||||
case "Command":
|
||||
@ -110,12 +123,12 @@
|
||||
{
|
||||
case 'Train_Manual_Route_Blocking_Drive':
|
||||
{
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>执行指令 :",otherInfo:deviceCommand.label,row:element,disabled:true});
|
||||
this.actionInfoList.push({id:element.id,isCoversition:false,memberName:member.role+memberName,command:deviceCommand.label,row:element,visible:false});
|
||||
break;
|
||||
}
|
||||
case 'Train_Manual_Limit_Drive':
|
||||
{
|
||||
this.actionInfoList.push({id:element.id,detail:"<span style='color:#409EFF'>"+member.role+memberName+"</span>执行指令 : ",otherInfo:deviceCommand.label,row:element,disabled:true});
|
||||
this.actionInfoList.push({id:element.id,isCoversition:false,memberName:member.role+memberName,command:deviceCommand.label,row:element,visible:false});
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -226,4 +239,10 @@
|
||||
width: 380px;
|
||||
position: absolute;
|
||||
}
|
||||
.roleClass{
|
||||
color:#409EFF
|
||||
}
|
||||
.commandStyle{
|
||||
color:#f00;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,8 +1,7 @@
|
||||
<template>
|
||||
<el-card v-loading="loading" class="map-list-main">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>课程列表</span>
|
||||
<!-- <div v-if="role" class="back-home" @click="backHome">返回首页</div> -->
|
||||
<span>{{ $t('teach.courseList') }}</span>
|
||||
</div>
|
||||
<filter-city
|
||||
ref="filerCity"
|
||||
@ -11,7 +10,7 @@
|
||||
:query-function="queryFunction"
|
||||
@filterSelectChange="refresh"
|
||||
/>
|
||||
<el-input v-model="filterText" placeholder="输入关键字进行过滤" clearable />
|
||||
<el-input v-model="filterText" :placeholder="$t('tip.enterKeywordsFiltering')" clearable />
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: (height-125) +'px', width:'100%' }">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
@ -159,9 +158,9 @@ export default {
|
||||
if (obj.valid) {
|
||||
this.trainingStart(obj, node);
|
||||
} else {
|
||||
this.$confirm('无此课程权限, 请前往购买!', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消'
|
||||
this.$confirm(this.$t('tip.accessCourseNo'), this.$t('tip.hint'), {
|
||||
confirmButtonText: this.$t('tip.confirm'),
|
||||
cancelButtonText: this.$t('tip.cancel')
|
||||
}).then(() => {
|
||||
while (node) {
|
||||
if (node.data.type === 'lesson') {
|
||||
@ -201,7 +200,7 @@ export default {
|
||||
});
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
this.$messageBox('刷新失败');
|
||||
this.$messageBox(this.$t('tip.refreshFailure'));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>课程名称: {{ courseModel.name }}</b>
|
||||
<b>{{ $t('teach.courseName') }}: {{ courseModel.name }}</b>
|
||||
</div>
|
||||
<div style="margin:50px" :style="{ height: height - 190 +'px' }">
|
||||
<p style="font-size: 14px; margin-bottom: 20px"> 课程说明:
|
||||
<p style="font-size: 14px; margin-bottom: 20px"> {{ $t('teach.courseDescription') }}:
|
||||
<span style="color: #808080 !important;">
|
||||
{{ courseModel.remarks }}
|
||||
</span>
|
||||
</p>
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane label="课程详情" name="first">
|
||||
<el-tab-pane :label="$t('teach.courseDetails')" name="first">
|
||||
<div :style="{ height: height - 270 +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<template v-for="item in courseModel.detail">
|
||||
@ -20,7 +20,7 @@
|
||||
<ul :key="it.code" style="float:none;" type="circle">
|
||||
<li :style="{color: it.trial? 'green':'' }">
|
||||
<span>{{ it.name }}
|
||||
<span v-if="it.trial">(免费)</span>
|
||||
<span v-if="it.trial">({{ $t('teach.free') }})</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@ -31,7 +31,7 @@
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="权限详情" name="second">
|
||||
<el-tab-pane :label="$t('teach.permissionsDetails')" name="second">
|
||||
<div :style="{ height: height - 270 +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="initLoadPage" />
|
||||
@ -41,9 +41,9 @@
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="btn-buy">
|
||||
<el-button type="success" @click="buy">购买</el-button>
|
||||
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="distribute">权限分发(上课)</el-button>
|
||||
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="transfer">权限转赠</el-button>
|
||||
<el-button type="success" @click="buy">{{ $t('teach.buy') }}</el-button>
|
||||
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="distribute">{{ $t('teach.permissionDistribute') }}</el-button>
|
||||
<el-button v-if="hasPermssion" :loading="loading" type="primary" @click="transfer">{{ $t('teach.authorityTransferred') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -117,7 +117,7 @@ export default {
|
||||
PermissionType: PermissionType.LESSON
|
||||
};
|
||||
}).catch(error => {
|
||||
this.$message.error('获取课程信息失败:' + error.message);
|
||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
<div class="home-box" :style="{height: height+'px'}">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper">
|
||||
<h1 class="title">
|
||||
城市轨道交通教学系统
|
||||
{{ $t('teach.title') }}
|
||||
<img :src="logo" alt="" class="logo-img">
|
||||
</h1>
|
||||
<div class="card-box">
|
||||
@ -14,7 +14,7 @@
|
||||
</el-carousel>
|
||||
</div>
|
||||
<div class="brief-box">
|
||||
该系统具备真实的业务逻辑,以地铁员工和培训点为要素的业务和流程驱动方式进行软件架构,从业务流程、标准作业、培训方式及开放原则等角度出发,力求打造最符合用户需求及快速响应变化的实训教学系统。</div>
|
||||
{{ $t('teach.describe') }}</div>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
</el-card>
|
||||
|
@ -1,26 +1,26 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div slot="header" style="text-align: center;">
|
||||
<b>实训名称: {{ courseModel.name }}</b>
|
||||
<b>{{ $t('teach.trainingName') }} {{ courseModel.name }}</b>
|
||||
</div>
|
||||
<div style="margin:50px">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: height - 190 +'px' }">
|
||||
<p class="list-item">
|
||||
<span class="list-label">完成实训最佳用时:</span>
|
||||
<span class="list-label">{{ $t('teach.trainingTime') }}</span>
|
||||
<span class="list-elem"> {{ courseModel.minDuration | setTime }} 秒</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">完成实训最大用时:</span>
|
||||
<span class="list-label">{{ $t('teach.trainingMaximum') }}</span>
|
||||
<span class="list-elem">{{ courseModel.maxDuration | setTime }} 秒</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">实训说明:</span>
|
||||
<span class="list-label">{{ $t('teach.trainingInstructions') }}</span>
|
||||
<span class="list-elem">{{ courseModel.remarks }}</span>
|
||||
</p>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div class="btn-start">
|
||||
<el-button :loading="loading" type="primary" @click="start">开始实训</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="start">{{ $t('teach.startTraining') }}</el-button>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -81,7 +81,7 @@ export default {
|
||||
};
|
||||
})
|
||||
.catch(error => {
|
||||
this.$message.error('获取课程信息失败:' + error.message);
|
||||
this.$message.error(this.$t('tip.failedCourse') + ':' + error.message);
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -95,7 +95,7 @@ export default {
|
||||
launchFullscreen();
|
||||
}).catch(error => {
|
||||
this.loading = false;
|
||||
this.$messageBox(`创建仿真失败: ${error.message}`);
|
||||
this.$messageBox(`${this.$t('tip.createSimulationFaild')} : ${error.message}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user