国际化调整
This commit is contained in:
parent
9ace0842a5
commit
5f4412dd40
@ -103,5 +103,8 @@ export default {
|
||||
statusType: 'Status type',
|
||||
private: 'Private',
|
||||
public: 'Public',
|
||||
pleaseEnterContent: 'Please enter content'
|
||||
pleaseEnterContent: 'Please enter content',
|
||||
selectGoods: 'Select Goods',
|
||||
month: ' month',
|
||||
yuan: ' yuan'
|
||||
};
|
||||
|
@ -89,5 +89,20 @@ export default {
|
||||
totalScore: 'Total score',
|
||||
addExamRluesError: 'Add rule does not match full score',
|
||||
addExamRules: 'Please add exam rules!',
|
||||
saveRuleFailed: 'Save rules failed: '
|
||||
saveRuleFailed: 'Save rules failed: ',
|
||||
|
||||
selectTypeScope: 'Please select type scope',
|
||||
operationType: 'Operation type',
|
||||
selectScope: 'Please select scope',
|
||||
questionNumbers: 'Question number',
|
||||
allNumberTipOne: '',
|
||||
allNumberTipTwo: 'questions in this type.',
|
||||
scorePerQuestion: 'Score/Question',
|
||||
inputQuestionNumber: 'Please input question number',
|
||||
inputQuestionNumberError: 'The number of questions entered must be greater than 0',
|
||||
inputValidNumber: 'Please input valid number',
|
||||
inputNumberError: 'The input value must be greater than the number of questions',
|
||||
inputScorePerQuestion: 'Please input score per question',
|
||||
selectTestType: 'Please select test type',
|
||||
modifyRules: 'Modify Rules'
|
||||
};
|
||||
|
@ -102,5 +102,8 @@ export default {
|
||||
orderDetails: '订单详情',
|
||||
statusType: '状态类型',
|
||||
createPackage: '创建权限',
|
||||
pleaseEnterContent: '请输入内容'
|
||||
pleaseEnterContent: '请输入内容',
|
||||
selectGoods: '选择商品',
|
||||
month: '月',
|
||||
yuan: '元'
|
||||
};
|
||||
|
@ -89,23 +89,23 @@ export default {
|
||||
totalScore: '总分',
|
||||
addExamRluesError: '添加规则不匹配满分',
|
||||
addExamRules: '请添加考试规则!',
|
||||
saveRuleFailed: '保存规则失败: '
|
||||
saveRuleFailed: '保存规则失败: ',
|
||||
|
||||
// 请选择类型范围
|
||||
// 操作类型
|
||||
// 请选择范围
|
||||
// 题数
|
||||
// 此类型有
|
||||
// 道题
|
||||
// 每题分值
|
||||
// 请输入题数
|
||||
// 输入的题数大于0
|
||||
// 请输入有效数字
|
||||
// 输入值必须大于题数
|
||||
// 请输入每题分值
|
||||
// 请输入数字值
|
||||
// 添加规则
|
||||
// 请选择试题类型
|
||||
// 修改规则
|
||||
// 刷新失败
|
||||
selectTypeScope: '请选择类型范围',
|
||||
operationType: '操作类型',
|
||||
selectScope: '请选择范围',
|
||||
questionNumbers: '题数',
|
||||
allNumberTipOne: '此类型有',
|
||||
allNumberTipTwo: '道题',
|
||||
scorePerQuestion: '每题分值',
|
||||
inputQuestionNumber: '请输入题数',
|
||||
inputQuestionNumberError: '输入的题数大于0',
|
||||
inputValidNumber: '请输入有效数字',
|
||||
inputNumberError: '输入值必须大于题数',
|
||||
inputScorePerQuestion: '请输入每题分值',
|
||||
// inputNumericType 请输入数字值
|
||||
// addRules 添加规则
|
||||
selectTestType: '请选择试题类型',
|
||||
modifyRules: '修改规则'
|
||||
// refreshFailed 刷新失败
|
||||
};
|
||||
|
@ -191,3 +191,9 @@ export default {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
/deep/
|
||||
.el-row .el-button+.el-button{
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
|
@ -155,16 +155,16 @@ export default {
|
||||
labelWidth: this.$i18n.locale == 'en' ? '200px': '145px',
|
||||
items: [
|
||||
{ prop: 'organizationId', label: this.$t('orderAuthor.organizationOrEnterprise'), type: 'select', required: false, disabled: this.isDisabled, options: this.OrganizationList, allowCreate: true, onChange: this.onChange },
|
||||
{ prop: 'goodsName', label: this.$t('orderAuthor.commodityName'), type: 'text', required: false, disabled: true, rightWidth: true, buttontip: '选择商品', buttonClick: this.buttonClick },
|
||||
{ prop: 'price', label: this.$t('orderAuthor.itemPricing'), type: 'number', required: false, disabled: true, min: 0, message: '元' },
|
||||
{ prop: 'goodsName', label: this.$t('orderAuthor.commodityName'), type: 'text', required: false, disabled: true, rightWidth: true, buttontip: this.$t('orderAuthor.selectGoods'), buttonClick: this.buttonClick },
|
||||
{ prop: 'price', label: this.$t('orderAuthor.itemPricing'), type: 'number', required: false, disabled: true, min: 0, message: this.$t('orderAuthor.yuan') },
|
||||
{ prop: 'orderType', label: this.$t('orderAuthor.orderType'), type: 'select', required: false, disabled: this.isDisabled, options: this.OrderTypeList },
|
||||
{ prop: 'sellerId', label: this.$t('orderAuthor.salesman'), type: 'select', required: false, show: this.isShowSeller, disabled: this.isDisabled, options: this.SellerList },
|
||||
{ prop: 'contractNo', label: this.$t('orderAuthor.contractNumber'), type: 'text', required: false, show: this.isShowContractNo },
|
||||
{ prop: 'amount', label: this.totalTitle, type: 'number', required: false, show: true, min: 0 },
|
||||
{ prop: 'forever', label: this.$t('orderAuthor.permanenceOrNot'), type: 'radio', required: false, options: this.$ConstSelect.Whether, disabled: this.foreverIsDisabled },
|
||||
{ prop: 'startTime', label: this.$t('orderAuthor.startDate'), type: 'date', required: false, show: this.isShowStartDate, viewFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd', picker: this.DatePicker },
|
||||
{ prop: 'monthAmount', label: this.monthsTitle, type: 'number', required: false, show: this.isShowMonths, min: 0, message: '月' },
|
||||
{ prop: 'totalPrice', label: this.$t('orderAuthor.totalPrice'), type: 'number', required: false, show: this.isShowPrice, min: 0, message: '元' },
|
||||
{ prop: 'monthAmount', label: this.monthsTitle, type: 'number', required: false, show: this.isShowMonths, min: 0, message: this.$t('orderAuthor.month') },
|
||||
{ prop: 'totalPrice', label: this.$t('orderAuthor.totalPrice'), type: 'number', required: false, show: this.isShowPrice, min: 0, message: this.$t('orderAuthor.yuan') },
|
||||
{ prop: 'bizType', label: this.$t('orderAuthor.businessType'), type: 'select', required: false, disabled: true, options: this.BizTypeList },
|
||||
{ prop: 'payWays', label: this.$t('orderAuthor.paymentMethod'), type: 'select', required: false, disabled: this.payTypeIsDisabled, show: this.isShowPayType, options: this.PayTypeList },
|
||||
{ prop: 'payStatus', label: this.$t('orderAuthor.paymentStatus'), type: 'select', required: false, disabled: this.payStatusDisabled, show: this.isShowPayStatus, options: this.PayStatusTypeList }
|
||||
|
@ -104,16 +104,16 @@ export default {
|
||||
labelWidth: this.$i18n.locale == 'en' ? '200px': '145px',
|
||||
items: [
|
||||
{ prop: 'organizationId', label: this.$t('orderAuthor.organizationOrEnterprise'), type: 'select', required: false, options: this.OrganizationList, allowCreate: true, onChange: this.onChange },
|
||||
{ prop: 'goodsName', label: this.$t('orderAuthor.commodityName'), type: 'text', required: false, disabled: true, rightWidth: true, buttontip: '选择商品', buttonClick: this.buttonClick },
|
||||
{ prop: 'price', label: this.$t('orderAuthor.itemPricing'), type: 'number', required: false, disabled: true, min: 0, message: '元' },
|
||||
{ prop: 'goodsName', label: this.$t('orderAuthor.commodityName'), type: 'text', required: false, disabled: true, rightWidth: true, buttontip: this.$t('orderAuthor.selectGoods'), buttonClick: this.buttonClick },
|
||||
{ prop: 'price', label: this.$t('orderAuthor.itemPricing'), type: 'number', required: false, disabled: true, min: 0, message: this.$t('orderAuthor.yuan') },
|
||||
{ prop: 'orderType', label: this.$t('orderAuthor.orderType'), type: 'select', required: false, options: this.OrderTypeList },
|
||||
{ prop: 'sellerId', label: this.$t('orderAuthor.salesman'), type: 'select', required: false, show: this.isShowSeller, options: this.SellerList },
|
||||
{ prop: 'contractNo', label: this.$t('orderAuthor.contractNumber'), type: 'text', required: false, show: this.isShowContractNo },
|
||||
{ prop: 'amount', label: this.totalTitle, type: 'number', required: false, show: true, min: 0 },
|
||||
{ prop: 'forever', label: this.$t('orderAuthor.permanenceOrNot'), type: 'radio', required: false, options: this.$ConstSelect.Whether, disabled: this.foreverIsDisabled },
|
||||
{ prop: 'startTime', label: this.$t('orderAuthor.startDate'), type: 'date', required: false, show: this.isShowStartDate, viewFormat: 'yyyy-MM-dd', valueFormat: 'yyyy-MM-dd', picker: this.DatePicker },
|
||||
{ prop: 'monthAmount', label: this.$t('orderAuthor.choosePurchaseTime'), type: 'number', required: false, show: this.isShowMonths, min: 0, message: '月' },
|
||||
{ prop: 'totalPrice', label: this.$t('orderAuthor.totalPrice'), type: 'number', required: false, show: this.isShowPrice, min: 0, message: '元' },
|
||||
{ prop: 'monthAmount', label: this.$t('orderAuthor.choosePurchaseTime'), type: 'number', required: false, show: this.isShowMonths, min: 0, message: this.$t('orderAuthor.month') },
|
||||
{ prop: 'totalPrice', label: this.$t('orderAuthor.totalPrice'), type: 'number', required: false, show: this.isShowPrice, min: 0, message: this.$t('orderAuthor.yuan') },
|
||||
{ prop: 'bizType', label: this.$t('orderAuthor.businessType'), type: 'select', required: false, disabled: true, options: this.BizTypeList },
|
||||
{ prop: 'payWays', label: this.$t('orderAuthor.paymentMethod'), type: 'select', required: false, show: this.isShowPayType, options: this.PayTypeList },
|
||||
{ prop: 'payStatus', label: this.$t('orderAuthor.paymentStatus'), type: 'select', required: false, show: this.isShowPayStatus, options: this.PayStatusTypeList }
|
||||
|
@ -1,11 +1,12 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogShow" :before-close="handleCancel" :close-on-click-modal="false">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="实训类型" prop="course">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
|
||||
<el-form-item :label="$t('publish.trainingType')" prop="course">
|
||||
<el-select
|
||||
v-model="form.course"
|
||||
placeholder="请选择类型范围"
|
||||
:placeholder="$t('publish.selectTypeScope')"
|
||||
:disabled="editOk"
|
||||
style="width:240px;"
|
||||
@change="changeCourse(form.course)"
|
||||
>
|
||||
<el-option
|
||||
@ -17,11 +18,11 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作类型">
|
||||
<el-form-item :label="$t('publish.operationType')">
|
||||
<el-select
|
||||
v-model="form.operateType"
|
||||
clearable
|
||||
placeholder="请选择范围"
|
||||
:placeholder="$t('publish.selectScope')"
|
||||
:disabled="editOk"
|
||||
@change="changeOperation(form.operateType)"
|
||||
>
|
||||
@ -34,16 +35,16 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="题数" prop="number">
|
||||
<el-form-item :label="$t('publish.questionNumbers')" prop="number">
|
||||
<el-input
|
||||
v-model="form.number"
|
||||
placeholder=""
|
||||
style="width: calc(100% - 200px); float: left; margin-right: 10px;"
|
||||
style="width: calc(100% - 280px); float: left; margin-right: 10px;"
|
||||
/>
|
||||
<span style="width: 190px; float: left;">此类型有{{ topicNum }}道题</span>
|
||||
<span style="width: 190px; float: left;">{{$t('publish.allNumberTipOne')}} {{ topicNum }} {{$t('publish.allNumberTipTwo')}}</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="每题分值" prop="mark">
|
||||
<el-input v-model="form.mark" placeholder="" />
|
||||
<el-form-item :label="$t('publish.scorePerQuestion')" prop="mark">
|
||||
<el-input v-model="form.mark" placeholder="" style="width:240px"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -72,15 +73,15 @@ export default {
|
||||
data() {
|
||||
var number = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请输入题数'));
|
||||
return callback(new Error(this.$t('publish.inputQuestionNumber')));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (Number(value) == 0) {
|
||||
callback(new Error('输入的题数大于0'));
|
||||
callback(new Error(this.$t('publish.inputQuestionNumberError')));
|
||||
} else if (!Number(value)) {
|
||||
callback(new Error('请输入有效数字'));
|
||||
callback(new Error(this.$t('publish.inputValidNumber')));
|
||||
} else if (Number(value) > this.topicNum) {
|
||||
callback(new Error('输入值必须大于题数'));
|
||||
callback(new Error(this.$t('publish.inputNumberError')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
@ -88,18 +89,18 @@ export default {
|
||||
};
|
||||
var mark = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
return callback(new Error('请输入每题分值'));
|
||||
return callback(new Error(this.$t('publish.inputScorePerQuestion')));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (!Number(value)) {
|
||||
callback(new Error('请输入数字值'));
|
||||
callback(new Error(this.$t('publish.inputNumericType')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}, 100);
|
||||
};
|
||||
return {
|
||||
title: '添加规则',
|
||||
title: this.$t('publish.addRules'),
|
||||
form: {
|
||||
course: '',
|
||||
operateType: '',
|
||||
@ -111,7 +112,7 @@ export default {
|
||||
editOk: false,
|
||||
rules: {
|
||||
course: [
|
||||
{ required: true, message: '请选择试题类型', trigger: 'change' }
|
||||
{ required: true, message: this.$t('publish.selectTestType'), trigger: 'change' }
|
||||
],
|
||||
number: [
|
||||
{ required: true, validator: number, trigger: 'blur' }
|
||||
@ -128,7 +129,7 @@ export default {
|
||||
},
|
||||
watch: {
|
||||
editCourse: function (val) {
|
||||
this.title = '修改规则';
|
||||
this.title = this.$t('publish.modifyRules');
|
||||
this.editOk = true;
|
||||
this.form = {
|
||||
course: val.trainingType,
|
||||
@ -231,7 +232,7 @@ export default {
|
||||
this.changeCourseDisable();
|
||||
this.$store.dispatch('exam/setCourse', this.options);
|
||||
}).catch(() => {
|
||||
this.$messageBox('刷新失败');
|
||||
this.$messageBox(this.$t('publish.refreshFailed'));
|
||||
});
|
||||
},
|
||||
async getList() {
|
||||
@ -249,10 +250,13 @@ export default {
|
||||
operateType: ''
|
||||
};
|
||||
this.operationTypeList = this.trainingOperateTypeMap[val];
|
||||
this.operationTypeList.forEach(item => {
|
||||
item.disabled = false;
|
||||
});
|
||||
this.changeOperationDisabled(); // 禁用设置
|
||||
if(this.operationTypeList){
|
||||
this.operationTypeList.forEach(item => {
|
||||
item.disabled = false;
|
||||
this.changeOperationDisabled(); // 禁用设置
|
||||
});
|
||||
}
|
||||
this.form.operateType="";
|
||||
const resp = await getLessonTypeNum(param);
|
||||
if (resp.code == 200) {
|
||||
this.topicNum = resp.data;
|
||||
|
Loading…
Reference in New Issue
Block a user