增加国际化配置
This commit is contained in:
parent
08587fb377
commit
8259b24f6c
@ -47,6 +47,9 @@ export default {
|
||||
updateFailed: 'Failure to update',
|
||||
exportException: 'Export exception',
|
||||
operationFailure: 'Operation Failure',
|
||||
createCommonRunPlanFailed: 'Failed to create a common run plan'
|
||||
|
||||
createCommonRunPlanFailed: 'Failed to create a common run plan',
|
||||
templateHasBeUse: 'The template has been used by the load plan and cannot be deleted',
|
||||
setFailed: 'Setup failed',
|
||||
deleteException: 'To remove exceptions, contact your administrator',
|
||||
paperHasUseNotDel: 'The paper has been used and cannot be deleted'
|
||||
};
|
||||
|
@ -34,6 +34,9 @@ export default {
|
||||
distributeExamPermission: 'Distribution of Examination Authority',
|
||||
distributeSimulationPermission: 'Distribution of simulation privileges',
|
||||
distributeScreenPermission: 'Large Screen Privilege Distribution',
|
||||
email: 'Email',
|
||||
nickName: 'nickname',
|
||||
mobile: 'mobile',
|
||||
name: 'Name',
|
||||
code: 'Code',
|
||||
status: 'Status',
|
||||
@ -64,7 +67,8 @@ export default {
|
||||
toBeDeveloped: 'Functions to be developed',
|
||||
yuan: '¥',
|
||||
filteringKeywords: 'Enter keywords for filtering',
|
||||
previousStep: 'PreviousStep',
|
||||
lastStep: 'Last Step',
|
||||
nextStep: 'Next Step ',
|
||||
skip: 'Skip',
|
||||
modify: 'Modify',
|
||||
language: 'Language',
|
||||
@ -83,6 +87,9 @@ export default {
|
||||
putaway: 'Putaway',
|
||||
soldOut: 'Sold out',
|
||||
exportMap: 'Export Map',
|
||||
preview: 'Preview'
|
||||
|
||||
preview: 'Preview',
|
||||
notBeUse: 'This function is not enabled for the time being',
|
||||
fastCreate: 'Quickly Create',
|
||||
duration: 'duration',
|
||||
isTry: 'Try'
|
||||
};
|
||||
|
@ -10,6 +10,7 @@ import tip from './tip';
|
||||
import system from './system';
|
||||
import orderAuthor from './orderAuthor';
|
||||
import publish from './publish';
|
||||
import permission from './permission';
|
||||
|
||||
export default {
|
||||
...enLocale,
|
||||
@ -23,5 +24,6 @@ export default {
|
||||
tip,
|
||||
system,
|
||||
orderAuthor,
|
||||
publish
|
||||
publish,
|
||||
permission
|
||||
};
|
||||
|
6
src/i18n/langs/en/permission.js
Normal file
6
src/i18n/langs/en/permission.js
Normal file
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
permissionPack: 'Package',
|
||||
setSuccess: 'Set successfully',
|
||||
isSureSetBelonger: 'Are you sure to set {name} to be the owner of the permission?',
|
||||
belonger: 'Set Owner'
|
||||
};
|
@ -2,6 +2,7 @@ export default {
|
||||
city: 'City',
|
||||
skinType: 'Skin Type',
|
||||
mapName: 'Map Name',
|
||||
lessonName: 'Lesson Name',
|
||||
updateMapName: 'Update Map Name',
|
||||
updateTime: 'Update Time',
|
||||
operationSuccess: 'Operate successfully',
|
||||
@ -30,6 +31,17 @@ export default {
|
||||
pleaseSelectTemplate: 'Please Select Template Run Plan',
|
||||
selectMap: 'Select Map',
|
||||
createCommonRunPlan: 'Create Common Run Plan',
|
||||
createCommonSuccess: 'Creation of a common run plan was successful'
|
||||
createCommonSuccess: 'Creation of a common run plan was successful',
|
||||
wellGenerateEveryRunPlan: 'This operation generates a daily running diagram. Do you want to continue?',
|
||||
wellDelTemplate: 'This action deletes the diagram template. Do you want to continue?',
|
||||
fullMark: 'Full Mark',
|
||||
passScore: 'Passing Score',
|
||||
examTime: 'Exam Time',
|
||||
creator: 'Creator',
|
||||
paperName: 'Name Of Test Paper',
|
||||
setSuccess: 'Set successfully',
|
||||
wellPutawayPaper: 'This operation puts the paper on the shelf. Do you want to continue?',
|
||||
wellSoldOutPaper: 'This operation removes the paper from the shelf. Do you want to continue?',
|
||||
wellDelPaper: 'This operation will delete the paper. Do you want to continue?'
|
||||
|
||||
};
|
||||
|
@ -12,7 +12,6 @@ export default {
|
||||
destory: 'Destory',
|
||||
simulationGroup: 'Simulation Group',
|
||||
userName: 'User Name',
|
||||
mobile: 'Cell-phone Number',
|
||||
skinCode: 'Skin Code',
|
||||
prdType: 'Product Type',
|
||||
simulationType: 'Simulation Type',
|
||||
@ -40,7 +39,6 @@ export default {
|
||||
editExamDetail: 'Edit exam details',
|
||||
subscribeMap: 'Subscribe',
|
||||
roles: 'Roles',
|
||||
email: 'Email',
|
||||
nickname: 'Nickname',
|
||||
delTypeIsContinue: 'This operation will delete the type. Do you want to continue?',
|
||||
permission: 'Permission',
|
||||
|
@ -47,6 +47,10 @@ export default {
|
||||
updateFailed: '更新失败',
|
||||
exportException: '导出异常',
|
||||
operationFailure: '操作失败',
|
||||
createCommonRunPlanFailed: '创建通用运行图失败'
|
||||
createCommonRunPlanFailed: '创建通用运行图失败',
|
||||
templateHasBeUse: '该模板已被加载计划使用,无法删除',
|
||||
setFailed: '设置失败',
|
||||
deleteException: '删除异常,请联系管理员',
|
||||
paperHasUseNotDel: '该试卷已被使用,不能删除'
|
||||
|
||||
};
|
||||
|
@ -34,6 +34,9 @@ export default {
|
||||
distributeExamPermission: '考试权限分发',
|
||||
distributeSimulationPermission: '仿真权限分发',
|
||||
distributeScreenPermission: '大屏权限分发',
|
||||
email: '邮箱',
|
||||
nickName: '昵称',
|
||||
mobile: '手机号',
|
||||
name: '名称',
|
||||
code: '编码',
|
||||
status: '状态',
|
||||
@ -65,7 +68,8 @@ export default {
|
||||
choose: '选 择',
|
||||
yuan: '元',
|
||||
filteringKeywords: '输入关键字进行过滤',
|
||||
previousStep: '上一步',
|
||||
lastStep: '上一步',
|
||||
nextStep: '下一步',
|
||||
skip: '跳过',
|
||||
modify: '修改',
|
||||
language: '语言',
|
||||
@ -84,6 +88,10 @@ export default {
|
||||
putaway: '上 架',
|
||||
soldOut: '下 架',
|
||||
exportMap: '导出地图',
|
||||
preview: '预览'
|
||||
preview: '预览',
|
||||
notBeUse: '该功能暂时未开启',
|
||||
fastCreate: '快速创建',
|
||||
duration: '时长',
|
||||
isTry: '是否试用'
|
||||
|
||||
};
|
||||
|
@ -10,6 +10,7 @@ import tip from './tip';
|
||||
import system from './system';
|
||||
import orderAuthor from './orderAuthor';
|
||||
import publish from './publish';
|
||||
import permission from './permission';
|
||||
|
||||
export default {
|
||||
...cnLocale,
|
||||
@ -23,5 +24,6 @@ export default {
|
||||
tip,
|
||||
system,
|
||||
orderAuthor,
|
||||
publish
|
||||
publish,
|
||||
permission
|
||||
};
|
||||
|
6
src/i18n/langs/zh/permission.js
Normal file
6
src/i18n/langs/zh/permission.js
Normal file
@ -0,0 +1,6 @@
|
||||
export default {
|
||||
permissionPack: '权限打包',
|
||||
setSuccess: '设置成功',
|
||||
isSureSetBelonger: '是否确定设置{name}为权限所属人?',
|
||||
belonger: '设置归属人'
|
||||
};
|
@ -2,6 +2,7 @@ export default {
|
||||
city: '所属城市',
|
||||
skinType: '皮肤类型',
|
||||
mapName: '地图名称',
|
||||
lessonName: '课程名称',
|
||||
updateMapName: '更新地图名称',
|
||||
updateTime: '更新时间',
|
||||
operationSuccess: '操作成功',
|
||||
@ -30,5 +31,17 @@ export default {
|
||||
pleaseSelectTemplate: '请选择模板运行图',
|
||||
selectMap: '选择地图',
|
||||
createCommonRunPlan: '创建通用运行图',
|
||||
createCommonSuccess: '创建通用运行图成功'
|
||||
createCommonSuccess: '创建通用运行图成功',
|
||||
wellGenerateEveryRunPlan: '此操作将生成每日运行图, 是否继续?',
|
||||
wellDelTemplate: '此操作将删除此运行图模板, 是否继续?',
|
||||
fullMark: '满分',
|
||||
passScore: '及格分',
|
||||
examTime: '考试时间',
|
||||
creator: '创建人',
|
||||
paperName: '试卷名称',
|
||||
setSuccess: '设置成功',
|
||||
wellPutawayPaper: '此操作将此试卷上架, 是否继续?',
|
||||
wellSoldOutPaper: '此操作将此试卷下架, 是否继续?',
|
||||
wellDelPaper: '此操作将删除该试卷, 是否继续?'
|
||||
|
||||
};
|
||||
|
@ -12,7 +12,6 @@ export default {
|
||||
destory: '销 毁',
|
||||
simulationGroup: '仿真Group',
|
||||
userName: '用户名',
|
||||
mobile: '手机号',
|
||||
skinCode: '皮肤编号',
|
||||
prdType: '产品类型',
|
||||
simulationType: '仿真类型',
|
||||
@ -40,7 +39,6 @@ export default {
|
||||
editExamDetail: '编辑考试详情',
|
||||
subscribeMap: '订阅地图',
|
||||
roles: '角色',
|
||||
email: '邮箱',
|
||||
nickname: '昵称',
|
||||
delTypeIsContinue: '此操作将删除该类型, 是否继续?',
|
||||
permission: '权限',
|
||||
|
@ -32,7 +32,7 @@ export default {
|
||||
},
|
||||
mobile: {
|
||||
type: 'text',
|
||||
label: this.$t('system.mobile')
|
||||
label: this.$t('global.mobile')
|
||||
},
|
||||
skinCode: {
|
||||
type: 'select',
|
||||
@ -68,7 +68,7 @@ export default {
|
||||
prop: 'creator.name'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.mobile'),
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'creator.mobile'
|
||||
},
|
||||
{
|
||||
|
@ -55,11 +55,11 @@ export default {
|
||||
prop: 'nickname'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.mobile'),
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.email'),
|
||||
title: this.$t('system.global.email'),
|
||||
prop: 'email'
|
||||
},
|
||||
{
|
||||
|
@ -75,7 +75,7 @@ export default {
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.mobile'),
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ export default {
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.mobile'),
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ export default {
|
||||
prop: 'userName'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.mobile'),
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'userMobile'
|
||||
},
|
||||
{
|
||||
|
@ -98,7 +98,7 @@
|
||||
</div>
|
||||
</el-card>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :disabled="isSpeed" @click="back"><span>{{$t('global.previousStep')}}</span></el-button>
|
||||
<el-button type="primary" :disabled="isSpeed" @click="back"><span>{{$t('global.lastStep')}}</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>
|
||||
|
@ -8,8 +8,8 @@
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleClose">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSure">确 定</el-button>
|
||||
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="handleSure">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -2,9 +2,9 @@
|
||||
<el-dialog :title="title" :visible.sync="show" width="800px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :disabled="disabled" @click="draftRule">{{ isAdd? '添加': '修改' }}
|
||||
<el-button type="primary" :disabled="disabled" @click="draftRule">{{ isAdd? $t('global.add'): $t('global.edit') }}
|
||||
</el-button>
|
||||
<el-button @click="doClose">取 消</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -51,7 +51,7 @@
|
||||
<el-button-group>
|
||||
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">打包</el-button>
|
||||
<el-button v-if="urlInfo.url" type="primary" @click="qrcodeShow">获取二维码</el-button>
|
||||
<el-button type="primary" @click="turnback">返回</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<edit-rule
|
||||
|
@ -142,12 +142,12 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '200',
|
||||
hide: () => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
|
||||
buttons: [
|
||||
{
|
||||
name: '设置归属人',
|
||||
name: this.$t('permission.belonger'),
|
||||
handleClick: this.handleRoleVest,
|
||||
type: ''
|
||||
}
|
||||
@ -155,7 +155,7 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '打包权限', btnCode: 'employee_insert', handler: this.handlePermissionPack }
|
||||
{ text: this.$t('permission.permissionPack'), btnCode: 'employee_insert', handler: this.handlePermissionPack }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
@ -1,107 +1,111 @@
|
||||
<template>
|
||||
<el-dialog title="用户列表" :visible.sync="show" top="20px" width="90%" :before-doClose="doClose"
|
||||
:close-on-click-modal="false">
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
||||
</QueryListPage>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="用户列表"
|
||||
:visible.sync="show"
|
||||
top="20px"
|
||||
width="90%"
|
||||
:before-do-close="doClose"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserList } from '@/api/management/user';
|
||||
import { putPermissionOwner } from '@/api/management/author';
|
||||
import localStore from 'storejs';
|
||||
import { getUserList } from '@/api/management/user';
|
||||
import { putPermissionOwner } from '@/api/management/author';
|
||||
|
||||
export default {
|
||||
name: 'selectRole',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
roleId: '',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: '名称'
|
||||
}
|
||||
}
|
||||
export default {
|
||||
name: 'SelectRole',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
roleId: '',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('global.name')
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: getUserList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '名称',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '昵称',
|
||||
prop: 'nickname'
|
||||
},
|
||||
{
|
||||
title: '电话',
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
prop: 'email'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: '选择',
|
||||
handleClick: this.selectRole,
|
||||
showControl: (row) => {
|
||||
return row.id != this.$store.state.user.id;
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
doShow(roleId) {
|
||||
this.roleId = roleId;
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
},
|
||||
queryList: {
|
||||
query: getUserList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('global.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.nickName'),
|
||||
prop: 'nickname'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.email'),
|
||||
prop: 'email'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.select'),
|
||||
handleClick: this.selectRole,
|
||||
showControl: (row) => {
|
||||
return row.id != this.$store.state.user.id;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
doShow(roleId) {
|
||||
this.roleId = roleId;
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
|
||||
selectRole(index, row) {
|
||||
this.$confirm(`是否确定设置"${row.name}"为权限所属人`, '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
putPermissionOwner({ id: this.roleId, owner: row }).then(resp => {
|
||||
this.$message.success('设置成功!');
|
||||
this.show = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
this.$messageBox('设置失败!');
|
||||
})
|
||||
}).catch(() => { });
|
||||
},
|
||||
selectRole(index, row) {
|
||||
this.$confirm(this.$t('permission.isSureSetBelonger').replace('{name}', row.name), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
putPermissionOwner({ id: this.roleId, owner: row }).then(resp => {
|
||||
this.$message.success(this.$t('permission.setSuccess'));
|
||||
this.show = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.setFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
reloadTable() {
|
||||
this.queryList.reload()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
@ -47,8 +47,8 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleOk">确 定</el-button>
|
||||
<el-button @click="handleCancel">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="handleOk">{{ $t('global.confirm') }}</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
@ -67,9 +67,9 @@
|
||||
<el-input v-model="form.desc" type="textarea" placeholder="请填写试题描述" :disabled="isEdit" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item>
|
||||
<el-button type="primary" @click="updateForm" v-if="isEdit">修改</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-else>下一步</el-button>
|
||||
</el-form-item> -->
|
||||
<el-button type="primary" @click="updateForm" v-if="isEdit">{{ $t('error.edit') }}</el-button>
|
||||
<el-button type="primary" @click="submitForm" v-else>{{ $t('error.nextStep') }}</el-button>
|
||||
</el-form-item> -->
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div v-if="lessonName" slot="header" style="text-align: center;">
|
||||
<b>课程名称: {{ lessonName }}</b>
|
||||
<b>{{ $t('publish.lessonName') }}: {{ lessonName }}</b>
|
||||
</div>
|
||||
<!-- <turnback-bar :title="turnbackBarTitle"></turnback-bar> -->
|
||||
<div class="exam-box" :style="{ height: height +'px' }">
|
||||
@ -20,11 +20,11 @@
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isPrevStep" type="primary" @click="prevStep">上一步</el-button>
|
||||
<el-button v-if="isNextStep" type="primary" @click="nextStep">下一步</el-button>
|
||||
<el-button v-if="isUpdate" type="warning" @click="update">修改</el-button>
|
||||
<el-button v-if="isCreate" type="primary" @click="create">创建</el-button>
|
||||
<el-button type="primary" @click="turnback">返回</el-button>
|
||||
<el-button v-if="isPrevStep" type="primary" @click="prevStep">{{ this.$t('global.lastStep') }}</el-button>
|
||||
<el-button v-if="isNextStep" type="primary" @click="nextStep">{{ this.$t('global.lastStep') }}</el-button>
|
||||
<el-button v-if="isUpdate" type="warning" @click="update">{{ $t('global.update') }}</el-button>
|
||||
<el-button v-if="isCreate" type="primary" @click="create">{{ $t('global.create') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</el-scrollbar>
|
||||
|
@ -7,17 +7,17 @@
|
||||
<el-table-column prop="num" label="题数" width="100" />
|
||||
<el-table-column prop="point" label="每题分值" width="100" />
|
||||
<el-table-column prop="chapterIdLong" label="总分" width="100" />
|
||||
<el-table-column label="操作" width="100">
|
||||
<el-table-column :label="$t('global.operate')" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="handleForm(scope)">修改</el-button>
|
||||
<el-button type="text" size="small" @click="deleteForm(scope)">删除</el-button>
|
||||
<el-button type="text" size="small" @click="handleForm(scope)">{{ $t('global.edit') }}</el-button>
|
||||
<el-button type="text" size="small" @click="deleteForm(scope)">{{ $t('global.delete') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <div class="btn-footer">
|
||||
<el-button @click="regulation">上一步</el-button>
|
||||
<el-button type="primary" @click="creatOk">新增</el-button>
|
||||
</div> -->
|
||||
<el-button @click="regulation">上一步</el-button>
|
||||
<el-button type="primary" @click="creatOk">新增</el-button>
|
||||
</div> -->
|
||||
<edit-rule
|
||||
ref="addRule"
|
||||
:course-id="courseId"
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div v-if="lessonName" slot="header" style="text-align: center;">
|
||||
<b>课程名称: {{ lessonName }}</b>
|
||||
<b>{{ $t('publish.lessonName') }}: {{ lessonName }}</b>
|
||||
</div>
|
||||
<div :style="{ height: height +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="">
|
||||
@ -44,22 +44,22 @@ export default {
|
||||
lessonName: '',
|
||||
height: '',
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
labelWidth: '160px',
|
||||
queryObject: {
|
||||
'lessonId': {
|
||||
type: this.$route.query.lessonId ? '' : 'select',
|
||||
label: '课程',
|
||||
label: this.$t('publish.lessonName'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'name': {
|
||||
type: 'text',
|
||||
label: '试卷名称'
|
||||
label: this.$t('publish.paperName')
|
||||
},
|
||||
'creatorName': {
|
||||
type: 'text',
|
||||
label: '创建人'
|
||||
label: this.$t('publish.creator')
|
||||
}
|
||||
},
|
||||
reset: !this.$route.query.lessonId
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '课程名称',
|
||||
title: this.$t('publish.lessonName'),
|
||||
prop: 'lessonId',
|
||||
type: 'tag',
|
||||
show: !this.$route.query.lessonId,
|
||||
@ -78,15 +78,15 @@ export default {
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '试卷名称',
|
||||
title: this.$t('publish.paperName'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
title: this.$t('publish.creator'),
|
||||
prop: 'creatorName'
|
||||
},
|
||||
{
|
||||
title: '是否试用',
|
||||
title: this.$t('global.isTry'),
|
||||
prop: 'trial',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.trial, 'Whether'); },
|
||||
@ -98,28 +98,28 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '时长',
|
||||
title: this.$t('global.duration'),
|
||||
prop: 'duration',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.durationField(row.duration); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '考试时间',
|
||||
title: this.$t('publish.examTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
format: 'yyyy-MM-dd hh:ss'
|
||||
},
|
||||
{
|
||||
title: '满分',
|
||||
title: this.$t('publish.fullMark'),
|
||||
prop: 'fullPoint'
|
||||
},
|
||||
{
|
||||
title: '及格分',
|
||||
title: this.$t('publish.passScore'),
|
||||
prop: 'passingPoint'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
title: this.$t('global.status'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
@ -132,23 +132,23 @@ export default {
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: '操作',
|
||||
title: this.$t('global.operate'),
|
||||
width: '300',
|
||||
buttons: [
|
||||
{
|
||||
name: '快速创建',
|
||||
name: this.$t('global.fastCreate'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleDistribute,
|
||||
showControl: (row) => { return row.bizType !== '02'; }
|
||||
},
|
||||
{
|
||||
name: '修改',
|
||||
name: this.$t('global.edit'),
|
||||
type: 'primary',
|
||||
showControl: (row) => { return row.creatorId == this.userId; },
|
||||
handleClick: this.handleUpdate
|
||||
},
|
||||
{
|
||||
name: '下架',
|
||||
name: this.$t('global.soldOut'),
|
||||
type: 'warning',
|
||||
handleClick: this.handleEfficacy,
|
||||
showControl: (row) => {
|
||||
@ -156,7 +156,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '上架',
|
||||
name: this.$t('global.putaway'),
|
||||
type: 'primary',
|
||||
handleClick: this.handleEffective,
|
||||
showControl: (row) => {
|
||||
@ -164,7 +164,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '删除',
|
||||
name: this.$t('global.delete'),
|
||||
type: 'danger',
|
||||
handleClick: this.deleteList,
|
||||
showControl: (row) => { return row.creatorId == this.userId; }
|
||||
@ -173,7 +173,7 @@ export default {
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{ text: '新增', btnCode: 'employee_insert', handler: this.handleNormalAdd }
|
||||
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleNormalAdd }
|
||||
]
|
||||
}
|
||||
};
|
||||
@ -238,57 +238,57 @@ export default {
|
||||
},
|
||||
// 删除
|
||||
deleteList(index, data) {
|
||||
this.$confirm('此操作将删除该试卷, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('publish.wellDelPaper'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteExam(data).then(res => {
|
||||
this.queryList.reload();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
message: this.$t('publish.setSuccess')
|
||||
});
|
||||
}).catch(res => {
|
||||
if (res.code == '500009') {
|
||||
this.$message({ type: 'warning', message: '该试卷已被使用,不能删除' });
|
||||
this.$message({ type: 'warning', message: this.$t('error.paperHasUseNotDel') });
|
||||
} else {
|
||||
this.$message({ type: 'error', message: '删除异常,请联系管理员' });
|
||||
this.$message({ type: 'error', message: this.$t('error.deleteException') });
|
||||
}
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleEfficacy(index, data) {
|
||||
this.$confirm('此操作将此试卷下架?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('publish.wellSoldOutPaper'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setExamEfficacy(data).then(res => {
|
||||
this.queryList.reload();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '设置成功!'
|
||||
message: this.$t('publish.setSuccess')
|
||||
});
|
||||
}).catch(res => {
|
||||
this.$message({ type: 'warning', message: '设置失败,' + res.message });
|
||||
this.$message({ type: 'warning', message: `${this.$t('error.setFailed')}${res.message}` });
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleEffective(index, data) {
|
||||
this.$confirm('此操作将此试卷上架?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('publish.wellPutawayPaper'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
setExamEffectivey(data).then(res => {
|
||||
this.queryList.reload();
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '设置成功!'
|
||||
message: this.$t('publish.setSuccess')
|
||||
});
|
||||
}).catch(res => {
|
||||
this.$message({ type: 'warning', message: '设置失败,' + res.message });
|
||||
this.$message({ type: 'warning', message: `${this.$t('error.setFailed')}${res.message}` });
|
||||
});
|
||||
}).catch(() => { });
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
labelWidth: '140px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
|
@ -102,37 +102,37 @@ export default {
|
||||
},
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除此运行图模板, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('publish.wellDelTemplate'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteRunPlanTemplate(row.id).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.$message.success(this.$t('publish.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(error => {
|
||||
this.reloadTable();
|
||||
if (error.code == 500) {
|
||||
this.$messageBox('删除失败');
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
} else if (error.code == 500009) {
|
||||
this.$messageBox('该模板已被加载计划使用,无法删除');
|
||||
this.$messageBox(this.$t('error.templateHasBeUse'));
|
||||
}
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
// 生成每日运行图
|
||||
handleGenerateEveryDay(index, row) {
|
||||
this.$confirm('此操作将生成每日运行图, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('publish.wellGenerateEveryRunPlan'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
generateCommonRunPlanEveryDay(row.id).then(response => {
|
||||
this.reloadTable();
|
||||
this.$message.success('生成通用每日运行图成功。');
|
||||
this.$message.success(this.$t('publish.createCommonSuccess'));
|
||||
}).catch(() => {
|
||||
this.reloadTable();
|
||||
this.$messageBox('生成通用每日运行图失败!');
|
||||
this.$messageBox(this.$t('error.operationFailure'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
@ -92,20 +92,20 @@ export default {
|
||||
},
|
||||
// 删除
|
||||
handleDelete(index, row) {
|
||||
this.$confirm('此操作将删除此仿真脚本, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
this.$confirm(this.$t('publish.wellDelTemplate'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteQuest(row.id).then(response => {
|
||||
this.$message.success('删除成功');
|
||||
this.$message.success(this.$t('publish.deleteSuccess'));
|
||||
this.reloadTable();
|
||||
}).catch(error => {
|
||||
this.reloadTable();
|
||||
if (error.code == 500) {
|
||||
this.$messageBox('删除失败');
|
||||
this.$messageBox(this.$t('error.deleteFailed'));
|
||||
} else if (error.code == 500009) {
|
||||
this.$messageBox('该模板已被加载计划使用,无法删除');
|
||||
this.$messageBox(this.$t('error.templateHasBeUse'));
|
||||
}
|
||||
});
|
||||
}).catch(() => { });
|
||||
@ -113,8 +113,7 @@ export default {
|
||||
|
||||
// 查看详情
|
||||
handleDetail(index, row) {
|
||||
console.log(index, row);
|
||||
this.$messageBox('该功能暂时未开启');
|
||||
this.$messageBox(this.$t('global.notBeUse'));
|
||||
},
|
||||
|
||||
reloadTable() {
|
||||
|
Loading…
Reference in New Issue
Block a user