Merge branch 'dev' into test
This commit is contained in:
commit
90c8349a8f
@ -56,7 +56,7 @@ export default {
|
||||
createChapter: 'Create chapter',
|
||||
contentSorting: 'Content sorting',
|
||||
courseList: 'Course list',
|
||||
countSkinCode: 'Duplicate skin cannot be the same type as the copied skin',
|
||||
countSkinCode: 'Duplicate map cannot be the same type as the copied map',
|
||||
createNewCoursesFromRelease: 'Create new courses from release',
|
||||
courseName: 'Course name',
|
||||
parentChapter: 'Parent chapter:',
|
||||
|
@ -101,7 +101,7 @@ export default {
|
||||
train: '列车',
|
||||
station: '车站',
|
||||
trainWindow: '车次窗',
|
||||
countSkinCode: '复制皮肤与被复制皮肤类型不能一样',
|
||||
countSkinCode: '复制地图与被复制地图类型不能一样',
|
||||
trainingRecord: '实训录制',
|
||||
lesson: '课程',
|
||||
taskManage: '任务管理',
|
||||
|
@ -564,59 +564,64 @@ export const asyncRouter = [
|
||||
roles: [admin, userDesign]
|
||||
},
|
||||
children: [
|
||||
{
|
||||
{ // 发布地图
|
||||
path: 'map',
|
||||
component: PublishMap,
|
||||
meta: {
|
||||
i18n: 'router.publishMapManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
{ // 发布历史
|
||||
path: 'map/detail',
|
||||
hidden: true,
|
||||
component: PublishMapDetail
|
||||
},
|
||||
{
|
||||
{ // 产品状态
|
||||
path: 'product',
|
||||
component: ProductStatus,
|
||||
meta: {
|
||||
i18n: 'router.productStateManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
{ // 发布课程
|
||||
path: 'lesson',
|
||||
component: PublishLesson,
|
||||
meta: {
|
||||
i18n: 'router.publishLessonManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
{ // 模板运行图
|
||||
path: 'runPlan/template',
|
||||
component: RunPlanTemplate,
|
||||
meta: {
|
||||
i18n: 'router.runPlanTemplateManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
{ // 加载运行图管理
|
||||
path: 'runPlan/common',
|
||||
component: RunPlanCommon,
|
||||
meta: {
|
||||
i18n: 'router.runPlanCommonManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
{ // 新增加载运行图
|
||||
path: 'runPlan/common/:mode',
|
||||
component: RunPlanCommonDraft,
|
||||
hidden: true
|
||||
},
|
||||
{ // 运行图预览
|
||||
path: 'runPlan/view/:mode',
|
||||
component: RunplanView,
|
||||
hidden: true
|
||||
},
|
||||
{ // 每日运行图
|
||||
path: 'runPlan/everyDay',
|
||||
component: RunPlanEveryDay,
|
||||
meta: {
|
||||
i18n: 'router.runPlanEveryDayManage'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'runPlan/view/:mode',
|
||||
component: RunplanView,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
{ // 考试规则列表
|
||||
path: 'examRule/manage',
|
||||
component: PublishExamRule,
|
||||
meta: {
|
||||
@ -627,11 +632,6 @@ export const asyncRouter = [
|
||||
path: 'examRule/draft/:mode/:ruleId/:lessonId',
|
||||
component: PublishExamRuleDraft,
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'runPlan/common/:mode',
|
||||
component: RunPlanCommonDraft,
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -87,13 +87,13 @@ export default {
|
||||
return data.name.indexOf(value) !== -1;
|
||||
},
|
||||
editLesson() {
|
||||
this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.lessonId, skinCode: this.$route.query.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}} );
|
||||
this.$router.push( {path: `/design/lesson/details/edit/lessonEdit`, query: {id: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}} );
|
||||
},
|
||||
createChapte(node) {
|
||||
this.$router.push({path: `/design/lesson/details/edit/chapterCreate`, query: {id: node.data.id, lessonId: this.lessonId, skinCode: this.$route.query.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}});
|
||||
this.$router.push({path: `/design/lesson/details/edit/chapterCreate`, query: {id: node.data.id, type:node.data.type, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}});
|
||||
},
|
||||
updateChapte(node) {
|
||||
this.$router.push( {path: `/design/lesson/details/edit/chapterEdit`, query: {id: node.data.id, skinCode: this.$route.query.skinCode, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}});
|
||||
this.$router.push( {path: `/design/lesson/details/edit/chapterEdit`, query: {id: node.data.id, type:node.data.type, lessonId: this.lessonId, cityCode: this.$route.query.cityCode, mapId: this.$route.query.mapId}});
|
||||
},
|
||||
showContextMenu(e, obj, node, vueElem) {
|
||||
if (obj && obj.type === 'Lesson' || obj.type === 'Chapter') {
|
||||
|
@ -181,7 +181,7 @@ export default {
|
||||
this.$refs.queryListPage.refresh(true);
|
||||
},
|
||||
lessonCreate() {
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {skinCode: this.$route.params.skinCode, mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode} });
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonEdit}/lessonCreate`, query: {mapId: this.$route.params.mapId, cityCode: this.$route.query.cityCode} });
|
||||
},
|
||||
lessonCreateByPublish() {
|
||||
this.$nextTick(() => {
|
||||
@ -189,8 +189,9 @@ export default {
|
||||
});
|
||||
},
|
||||
publish(index, row) {
|
||||
row.skinCode = this.$route.params.skinCode;
|
||||
row.mapId = this.$route.params.mapId;
|
||||
row.cityCode = this.$route.query.cityCode;
|
||||
debugger;
|
||||
this.$refs.publishLesson.doShow(row);
|
||||
},
|
||||
deleteLesson(index, row) {
|
||||
@ -236,7 +237,7 @@ export default {
|
||||
this.$refs.lessonDetail.show(row.id);
|
||||
},
|
||||
goDetail(index, row) {
|
||||
this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, skinCode: this.$route.params.skinCode, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId}});
|
||||
this.$router.push({path: `/design/lesson/details`, query: {lessonId: row.id, cityCode: this.$route.query.cityCode, mapId: this.$route.params.mapId}});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -178,7 +178,7 @@ export default {
|
||||
this.detail.prdCode = resp.data.prdCode;
|
||||
this.chapterModel.lessonId = resp.data.id;
|
||||
this.chapterModel.lessonName = resp.data.name;
|
||||
if (data.id !== data.lessonId) {
|
||||
if (data.type === 'Chapter') {
|
||||
this.getChapter(data);
|
||||
}
|
||||
}).catch(() => {
|
||||
@ -210,7 +210,7 @@ export default {
|
||||
});
|
||||
},
|
||||
back() {
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}/${this.$route.query.skinCode}`, query: {cityCode: this.$route.query.cityCode} });
|
||||
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}`, query: {cityCode: this.$route.query.cityCode} });
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -26,8 +26,8 @@ export default {
|
||||
loading: false,
|
||||
dialogVisible: false,
|
||||
formModel: {
|
||||
skinCodeFrom: '',
|
||||
skinCodeTo: ''
|
||||
mapIdFrom: '',
|
||||
mapIdTo: ''
|
||||
},
|
||||
mapIdList: []
|
||||
};
|
||||
@ -39,14 +39,14 @@ export default {
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{
|
||||
prop: 'skinCodeFrom',
|
||||
prop: 'mapIdFrom',
|
||||
label: this.$t('lesson.skinTypeFrom'),
|
||||
type: 'select',
|
||||
required: true,
|
||||
options: this.mapIdList
|
||||
},
|
||||
{
|
||||
prop: 'skinCodeTo',
|
||||
prop: 'mapIdTo',
|
||||
label: this.$t('lesson.skinTypeTo'),
|
||||
type: 'select',
|
||||
required: true,
|
||||
@ -58,14 +58,14 @@ export default {
|
||||
},
|
||||
rules() {
|
||||
const crules = {
|
||||
skinCodeFrom: [
|
||||
mapIdFrom: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('rules.inputSkinType'),
|
||||
trigger: 'change'
|
||||
}
|
||||
],
|
||||
skinCodeTo: [
|
||||
mapIdTo: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('rules.inputSkinType'),
|
||||
@ -101,7 +101,7 @@ export default {
|
||||
doSave() {
|
||||
const self = this;
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
if (this.formModel.skinCodeFrom != this.formModel.skinCodeTo) {
|
||||
if (this.formModel.mapIdFrom != this.formModel.mapIdTo) {
|
||||
self.create();
|
||||
} else {
|
||||
this.$alert(this.$t('lesson.countSkinCode'), this.$t('global.tips'), {
|
||||
@ -114,7 +114,7 @@ export default {
|
||||
create() {
|
||||
const self = this;
|
||||
this.loading = true;
|
||||
postOperateSaveAs(this.formModel.skinCodeFrom, this.formModel.skinCodeTo)
|
||||
postOperateSaveAs(this.formModel.mapIdFrom, this.formModel.mapIdTo)
|
||||
.then(response => {
|
||||
self.loading = false;
|
||||
self.$message.success(this.$t('lesson.batchCreateSuccess'));
|
||||
|
@ -19,7 +19,7 @@
|
||||
<el-form-item
|
||||
:label="$t('map.productCode') + ':'"
|
||||
prop="code"
|
||||
:rules="node && node.data.type ==='skin' ? baseRules.code:{}"
|
||||
:rules="node && node.data.type ==='Map' ? baseRules.code:{}"
|
||||
>
|
||||
<el-input v-model="addModel.code" :disabled="codeDisabled" />
|
||||
</el-form-item>
|
||||
@ -87,7 +87,7 @@ export default {
|
||||
computed: {
|
||||
title() {
|
||||
if (this.node && this.node.data) {
|
||||
if (this.node.data.type === 'Skin') {
|
||||
if (this.node.data.type === 'Map') {
|
||||
return this.$t('map.createProductCategories');
|
||||
} else if (this.node.data.type === 'Prd' ||
|
||||
this.node.data.type === 'Prd') {
|
||||
@ -97,7 +97,7 @@ export default {
|
||||
return this.$t('map.selectOperation');
|
||||
},
|
||||
isCreate() {
|
||||
return this.node && this.node.data.type === 'Skin';
|
||||
return this.node && this.node.data.type === 'Map';
|
||||
},
|
||||
isUpdate() {
|
||||
return this.node && this.node.data.type === 'Prd';
|
||||
@ -141,10 +141,11 @@ export default {
|
||||
this.initTrainTypes = [];
|
||||
this.$refs.form.resetFields();
|
||||
this.loading = true;
|
||||
if (node.data.type === 'Skin') {
|
||||
if (node.data.type === 'Map') {
|
||||
this.codeDisabled = false;
|
||||
this.addModel.mapName = node.data.name;
|
||||
this.addModel.skinCode = node.data.id;
|
||||
this.addModel.mapId = node.data.id;
|
||||
this.loading = false;
|
||||
} else if (node.data.type === 'Prd') {
|
||||
this.codeDisabled = true;
|
||||
@ -180,6 +181,7 @@ export default {
|
||||
const data = {
|
||||
skinCode: this.addModel.skinCode,
|
||||
mapName: this.addModel.mapName,
|
||||
mapId: this.addModel.mapId,
|
||||
name: this.addModel.name,
|
||||
remarks: this.addModel.remarks,
|
||||
prdType: this.addModel.prdType,
|
||||
|
@ -53,7 +53,8 @@ export default {
|
||||
x: 0,
|
||||
y: 0
|
||||
},
|
||||
localParamName: 'product_cityCode'
|
||||
localParamName: 'product_cityCode',
|
||||
cityCode: ''
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@ -97,7 +98,10 @@ export default {
|
||||
async refresh(filterSelect) {
|
||||
this.loading = true;
|
||||
try {
|
||||
const res = await getPublishMapTree(filterSelect);
|
||||
if (filterSelect) {
|
||||
this.cityCode = filterSelect;
|
||||
}
|
||||
const res = await getPublishMapTree(this.cityCode);
|
||||
this.treeData = this.convertTreeData(res.data);
|
||||
this.$nextTick(() => {
|
||||
this.loading = false;
|
||||
|
Loading…
Reference in New Issue
Block a user