Merge branch 'dev' of https://git.cloud.tencent.com/joylink/jl-nclient into dev
This commit is contained in:
commit
442b3fd686
@ -40,5 +40,10 @@ export default {
|
|||||||
codeHasExist: 'Coding already exists',
|
codeHasExist: 'Coding already exists',
|
||||||
formartError: 'The format is incorrect, only characters/numbers/_',
|
formartError: 'The format is incorrect, only characters/numbers/_',
|
||||||
createDictionaryFailed: 'Failed to create dictionary',
|
createDictionaryFailed: 'Failed to create dictionary',
|
||||||
updateDictionaryFailed: 'Failed to update dictionary'
|
updateDictionaryFailed: 'Failed to update dictionary',
|
||||||
|
createDetailFailed: 'Failed to create details',
|
||||||
|
updateDetailFailed: 'Failed to update details',
|
||||||
|
addFailed: 'Failure to add',
|
||||||
|
updateFailed: 'Failure to update'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -52,6 +52,7 @@ export default {
|
|||||||
transferQRCode: 'Transfer QRCode',
|
transferQRCode: 'Transfer QRCode',
|
||||||
today: 'Today',
|
today: 'Today',
|
||||||
yesterday: 'Yesterday',
|
yesterday: 'Yesterday',
|
||||||
|
addOrder: 'AddOrder',
|
||||||
aWeekAgo: 'A week ago',
|
aWeekAgo: 'A week ago',
|
||||||
updateOrder: 'Update order',
|
updateOrder: 'Update order',
|
||||||
renewOrder: 'Renew order',
|
renewOrder: 'Renew order',
|
||||||
@ -78,7 +79,8 @@ export default {
|
|||||||
unitOfTime: 'Unit of time',
|
unitOfTime: 'Unit of time',
|
||||||
trialTime: 'Trial time',
|
trialTime: 'Trial time',
|
||||||
distributionUser: 'Distribution user',
|
distributionUser: 'Distribution user',
|
||||||
orderNumber: 'OrderNumber',
|
orderNumber: 'Order Number',
|
||||||
|
select: 'Select',
|
||||||
sourcesOfInformation: 'Sources of information',
|
sourcesOfInformation: 'Sources of information',
|
||||||
distributePermission: 'Distribute permission',
|
distributePermission: 'Distribute permission',
|
||||||
orderCreation: 'Order creation',
|
orderCreation: 'Order creation',
|
||||||
|
@ -181,6 +181,10 @@ export default {
|
|||||||
goodsDescribtionInput: 'Please enter product description',
|
goodsDescribtionInput: 'Please enter product description',
|
||||||
userNameInput: 'Please enter user name',
|
userNameInput: 'Please enter user name',
|
||||||
permissionTypeInput: 'Please select the permission type',
|
permissionTypeInput: 'Please select the permission type',
|
||||||
|
timeInput: 'Please enter the time',
|
||||||
|
chooseUser: 'Please select the user',
|
||||||
|
pleaseInputLessonName: 'Please enter the course name',
|
||||||
|
pleaseSelectTraining: 'Please select training',
|
||||||
|
|
||||||
maxScaling: '(The maximum scale is 8 steps)',
|
maxScaling: '(The maximum scale is 8 steps)',
|
||||||
skinCodingInput: 'Please enter skin code',
|
skinCodingInput: 'Please enter skin code',
|
||||||
|
@ -11,8 +11,8 @@ export default {
|
|||||||
updateSuccess: 'Update successful',
|
updateSuccess: 'Update successful',
|
||||||
destory: 'Destory',
|
destory: 'Destory',
|
||||||
simulationGroup: 'Simulation Group',
|
simulationGroup: 'Simulation Group',
|
||||||
username: 'User Name',
|
userName: 'User Name',
|
||||||
phoneNumber: 'Cell-phone Number',
|
mobile: 'Cell-phone Number',
|
||||||
skinCode: 'Skin Code',
|
skinCode: 'Skin Code',
|
||||||
prdType: 'Product Type',
|
prdType: 'Product Type',
|
||||||
simulationType: 'Simulation Type',
|
simulationType: 'Simulation Type',
|
||||||
@ -21,5 +21,34 @@ export default {
|
|||||||
isError: 'Is Error',
|
isError: 'Is Error',
|
||||||
isSuspend: 'Is Suspend',
|
isSuspend: 'Is Suspend',
|
||||||
isDrivingAsplanned: 'Whether to drive as planned',
|
isDrivingAsplanned: 'Whether to drive as planned',
|
||||||
delUserSimulationIsContinue: 'This operation will delete the user simulation data. Do you want to continue?'
|
delUserSimulationIsContinue: 'This operation will delete the user simulation data. Do you want to continue?',
|
||||||
|
createDetail: 'Create details',
|
||||||
|
editDetail: 'Editorial details',
|
||||||
|
mapName: 'Map Name',
|
||||||
|
trainingName: 'Training Name',
|
||||||
|
trainingUseTime: 'Training Time',
|
||||||
|
minute: 'Minute',
|
||||||
|
second: 'Second',
|
||||||
|
createSimulationTitle: 'Create Simulation Information',
|
||||||
|
addSuccess: 'Added Successfully',
|
||||||
|
pleaseInputNames: 'Please enter your nickname/name/cell phone number',
|
||||||
|
examUser: 'Examination Users',
|
||||||
|
examScore: 'Examination Score',
|
||||||
|
examResult: 'Examination Results',
|
||||||
|
examName: 'Paper Name',
|
||||||
|
delExamResultIsContinue: 'This operation will delete the test result. Do you want to continue?',
|
||||||
|
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',
|
||||||
|
editUserPermission: 'Edit User Rights',
|
||||||
|
lessonName: 'Lesson Name',
|
||||||
|
selectTraining: 'Selection Training',
|
||||||
|
createUserTraining: 'Creating User Training',
|
||||||
|
editTrainingDetail: 'Editor Training Details',
|
||||||
|
trainingTime: 'Training duration'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -40,6 +40,10 @@ export default {
|
|||||||
codeHasExist: '编码已存在',
|
codeHasExist: '编码已存在',
|
||||||
formartError: '格式不正确,只能是字符/数字/_',
|
formartError: '格式不正确,只能是字符/数字/_',
|
||||||
createDictionaryFailed: '创建字典失败',
|
createDictionaryFailed: '创建字典失败',
|
||||||
updateDictionaryFailed: '更新字典失败'
|
updateDictionaryFailed: '更新字典失败',
|
||||||
|
createDetailFailed: '创建明细失败',
|
||||||
|
updateDetailFailed: '更新明细失败',
|
||||||
|
addFailed: '添加失败',
|
||||||
|
updateFailed: '更新失败'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -83,5 +83,6 @@ export default {
|
|||||||
sourcesOfInformation: '信息来源',
|
sourcesOfInformation: '信息来源',
|
||||||
distributePermission: '权限分发',
|
distributePermission: '权限分发',
|
||||||
orderCreation: '订单创建',
|
orderCreation: '订单创建',
|
||||||
|
select: '选择',
|
||||||
chooseGoods: '选择商品'
|
chooseGoods: '选择商品'
|
||||||
};
|
};
|
||||||
|
@ -180,6 +180,10 @@ export default {
|
|||||||
goodsDescribtionInput: '请输入商品描述',
|
goodsDescribtionInput: '请输入商品描述',
|
||||||
userNameInput: '请输入用户名称',
|
userNameInput: '请输入用户名称',
|
||||||
permissionTypeInput: '请选择权限类型',
|
permissionTypeInput: '请选择权限类型',
|
||||||
|
timeInput: '请输入时长',
|
||||||
|
chooseUser: '请选择用户',
|
||||||
|
pleaseInputLessonName: '请输入课程名称',
|
||||||
|
pleaseSelectTraining: '请选择实训',
|
||||||
|
|
||||||
maxScaling: '(缩放比例最大为8级)',
|
maxScaling: '(缩放比例最大为8级)',
|
||||||
skinCodingInput: '请输入皮肤编码',
|
skinCodingInput: '请输入皮肤编码',
|
||||||
|
@ -11,8 +11,8 @@ export default {
|
|||||||
updateSuccess: '更新成功',
|
updateSuccess: '更新成功',
|
||||||
destory: '销 毁',
|
destory: '销 毁',
|
||||||
simulationGroup: '仿真Group',
|
simulationGroup: '仿真Group',
|
||||||
username: '用户名',
|
userName: '用户名',
|
||||||
phoneNumber: '手机号',
|
mobile: '手机号',
|
||||||
skinCode: '皮肤编号',
|
skinCode: '皮肤编号',
|
||||||
prdType: '产品类型',
|
prdType: '产品类型',
|
||||||
simulationType: '仿真类型',
|
simulationType: '仿真类型',
|
||||||
@ -21,5 +21,34 @@ export default {
|
|||||||
isError: '是否错误',
|
isError: '是否错误',
|
||||||
isSuspend: '是否暂停',
|
isSuspend: '是否暂停',
|
||||||
isDrivingAsplanned: '是否按计划行车',
|
isDrivingAsplanned: '是否按计划行车',
|
||||||
delUserSimulationIsContinue: '此操作将删除此用户仿真数据, 是否继续?'
|
delUserSimulationIsContinue: '此操作将删除此用户仿真数据, 是否继续?',
|
||||||
|
createDetail: '创建明细',
|
||||||
|
editDetail: '编辑明细',
|
||||||
|
mapName: '地图名称',
|
||||||
|
trainingName: '实训名称',
|
||||||
|
trainingUseTime: '实训用时',
|
||||||
|
minute: '分',
|
||||||
|
second: '秒',
|
||||||
|
createSimulationTitle: '创建仿真信息',
|
||||||
|
addSuccess: '添加成功',
|
||||||
|
pleaseInputNames: '请输入昵称/名字/手机号',
|
||||||
|
examUser: '考试用户',
|
||||||
|
examScore: '考试成绩',
|
||||||
|
examResult: '考试结果',
|
||||||
|
examName: '试卷名称',
|
||||||
|
delExamResultIsContinue: '此操作将删除此考试结果, 是否继续?',
|
||||||
|
editExamDetail: '编辑考试详情',
|
||||||
|
subscribeMap: '订阅地图',
|
||||||
|
roles: '角色',
|
||||||
|
email: '邮箱',
|
||||||
|
nickname: '昵称',
|
||||||
|
delTypeIsContinue: '此操作将删除该类型, 是否继续?',
|
||||||
|
permission: '权限',
|
||||||
|
editUserPermission: '编辑用户权限',
|
||||||
|
lessonName: '课程名称',
|
||||||
|
selectTraining: '选择实训',
|
||||||
|
createUserTraining: '创建用户实训',
|
||||||
|
editTrainingDetail: '编辑实训详情',
|
||||||
|
trainingTime: '实训时长'
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -40,12 +40,12 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '60px',
|
labelWidth: '60px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'code', label: '编码', type: 'text', required: true, disabled: !isAdd },
|
{ prop: 'code', label: this.$t('system.code'), type: 'text', required: true, disabled: !isAdd },
|
||||||
{ prop: 'name', label: '名称', type: 'text', required: true },
|
{ prop: 'name', label: this.$t('system.name'), type: 'text', required: true },
|
||||||
{
|
{
|
||||||
prop: 'status', label: '状态', type: 'select', required: true, options: this.$ConstSelect.Status
|
prop: 'status', label: this.$t('system.status'), type: 'select', required: true, options: this.$ConstSelect.Status
|
||||||
},
|
},
|
||||||
{ prop: 'remarks', label: '备注', type: 'textarea', required: false }
|
{ prop: 'remarks', label: this.$t('system.remarks'), type: 'textarea', required: false }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -53,21 +53,21 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
|
||||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
status: [
|
status: [
|
||||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
remarks: [
|
remarks: [
|
||||||
{ max: 50, message: '不能超过 50 个字符', trigger: 'blur' }
|
{ max: 50, message: this.$t('rules.strLengthNotExceed50'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
if (this.type === 'ADD') {
|
if (this.type === 'ADD') {
|
||||||
return Object.assign(crules, {
|
return Object.assign(crules, {
|
||||||
code: [
|
code: [
|
||||||
{ required: true, message: '请输入编码', trigger: 'blur' },
|
{ required: true, message: this.$t('rules.pleaseInputCode'), trigger: 'blur' },
|
||||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' },
|
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' },
|
||||||
{ validator: this.validateCode, trigger: 'blur' }
|
{ validator: this.validateCode, trigger: 'blur' }
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@ -77,25 +77,25 @@ export default {
|
|||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
if (this.type === 'ADD') {
|
if (this.type === 'ADD') {
|
||||||
return '创建明细';
|
return this.$t('system.createDetail');
|
||||||
} else {
|
} else {
|
||||||
return '编辑明细';
|
return this.$t('system.editDetail');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
validateCode(rule, value, callback) {
|
validateCode(rule, value, callback) {
|
||||||
if (!validateCharCode(value)) {
|
if (!validateCharCode(value)) {
|
||||||
return callback(new Error('格式不正确,只能是字符/数字/_'));
|
return callback(new Error(this.$t('error.formartError')));
|
||||||
} else {
|
} else {
|
||||||
checkDicDetailCodeExist(this.dicId, value).then(response => {
|
checkDicDetailCodeExist(this.dicId, value).then(response => {
|
||||||
if (response.data) {
|
if (response.data) {
|
||||||
return callback(new Error('编码已存在'));
|
return callback(new Error(this.$t('error.codeHasExist')));
|
||||||
} else {
|
} else {
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
return callback(new Error('服务异常'));
|
return callback(new Error(this.$t('error.serviceException')));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -121,21 +121,21 @@ export default {
|
|||||||
create() {
|
create() {
|
||||||
const self = this;
|
const self = this;
|
||||||
create(this.dicId, this.formModel).then(response => {
|
create(this.dicId, this.formModel).then(response => {
|
||||||
self.$message.success('创建字典目录成功');
|
self.$message.success(this.$t('system.createSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable');
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('创建字典目录失败:' + error.message);
|
self.$message.error(`${this.$t('error.createDetailFailed')}:${error.message}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
const self = this;
|
const self = this;
|
||||||
update(this.dicId, this.formModel).then(response => {
|
update(this.dicId, this.formModel).then(response => {
|
||||||
self.$message.success('更新字典目录成功');
|
self.$message.success(this.$t('system.updateSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable');
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('更新字典目录失败:' + error.message);
|
self.$message.error(`${this.$t('error.updateDetailFailed')}:${error.message}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
|
@ -28,11 +28,11 @@ export default {
|
|||||||
},
|
},
|
||||||
userName: {
|
userName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('system.username')
|
label: this.$t('system.userName')
|
||||||
},
|
},
|
||||||
mobile: {
|
mobile: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('system.phoneNumber')
|
label: this.$t('system.mobile')
|
||||||
},
|
},
|
||||||
skinCode: {
|
skinCode: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -64,11 +64,11 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('system.username'),
|
title: this.$t('system.userName'),
|
||||||
prop: 'creator.name'
|
prop: 'creator.name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('system.phoneNumber'),
|
title: this.$t('system.mobile'),
|
||||||
prop: 'creator.mobile'
|
prop: 'creator.mobile'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -170,7 +170,7 @@ export default {
|
|||||||
return sessionId;
|
return sessionId;
|
||||||
},
|
},
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm(this.$t('global.delUserSimulationIsContinue'), this.$t('global.tips'), {
|
this.$confirm(this.$t('system.delUserSimulationIsContinue'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('global.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('global.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="'编辑用户权限'" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="$t('system.editUserPermission')" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -31,11 +31,11 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '60px',
|
labelWidth: '60px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'name', label: '名称', type: 'text', required: true, disabled: true },
|
{ prop: 'name', label: this.$t('system.name'), type: 'text', required: true, disabled: true },
|
||||||
// { prop: 'nickname', label: '昵称', type: 'text', required: true },
|
// { prop: 'nickname', label: '昵称', type: 'text', required: true },
|
||||||
// { prop: 'mobile', label: '电话', type: 'text', required: true },
|
// { prop: 'mobile', label: '电话', type: 'text', required: true },
|
||||||
// { prop: 'email', label: '邮箱', type: 'text' },
|
// { prop: 'email', label: '邮箱', type: 'text' },
|
||||||
{ prop: 'roles', label: '权限', type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
|
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -43,11 +43,11 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
name: [
|
name: [
|
||||||
{ required: true, message: '请输入名称', trigger: 'blur' },
|
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' },
|
||||||
{ min: 1, max: 25, message: '长度在 1 到 25 个字符', trigger: 'blur' }
|
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
status: [
|
status: [
|
||||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
@ -76,11 +76,11 @@ export default {
|
|||||||
update() {
|
update() {
|
||||||
const self = this;
|
const self = this;
|
||||||
putRoles(this.formModel).then(response => {
|
putRoles(this.formModel).then(response => {
|
||||||
self.$message.success('修改成功');
|
self.$message.success(this.$t('system.updateSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable');
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('修改失败:' + error.message);
|
self.$message.error(`${this.$t('error.updateFailed')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
|
@ -29,11 +29,11 @@ export default {
|
|||||||
queryObject: {
|
queryObject: {
|
||||||
name: {
|
name: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: '名称'
|
label: this.$t('system.name')
|
||||||
},
|
},
|
||||||
roles: {
|
roles: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '角色',
|
label: this.$t('system.roles'),
|
||||||
config: {
|
config: {
|
||||||
data: this.$ConstSelect.roleList
|
data: this.$ConstSelect.roleList
|
||||||
}
|
}
|
||||||
@ -47,23 +47,23 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '名称',
|
title: this.$t('system.name'),
|
||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '昵称',
|
title: this.$t('system.nickname'),
|
||||||
prop: 'nickname'
|
prop: 'nickname'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '电话',
|
title: this.$t('system.mobile'),
|
||||||
prop: 'mobile'
|
prop: 'mobile'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邮箱',
|
title: this.$t('system.email'),
|
||||||
prop: 'email'
|
prop: 'email'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '角色',
|
title: this.$t('system.roles'),
|
||||||
prop: 'roles',
|
prop: 'roles',
|
||||||
type: 'tagMore',
|
type: 'tagMore',
|
||||||
columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
||||||
@ -71,15 +71,15 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: '操作',
|
title: this.$t('global.operate'),
|
||||||
width: '250',
|
width: '250',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '编辑',
|
name: this.$t('global.edit'),
|
||||||
handleClick: this.handleUserEdit
|
handleClick: this.handleUserEdit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '订阅地图',
|
name: this.$t('system.subscribeMap'),
|
||||||
handleClick: this.handleMapCorrelation,
|
handleClick: this.handleMapCorrelation,
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
}
|
}
|
||||||
@ -100,9 +100,9 @@ export default {
|
|||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
handleUserDelete(index, row) {
|
handleUserDelete(index, row) {
|
||||||
this.$confirm('此操作将删除该类型, 是否继续?', '提示', {
|
this.$confirm(this.$t('system.delTypeIsContinue'), this.$t('global.tips'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
// delPublishMap(row.id).then(response => {
|
// delPublishMap(row.id).then(response => {
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
<el-button @click="dialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -34,12 +34,12 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
const form = {
|
const form = {
|
||||||
labelWidth: '100px',
|
labelWidth: '160px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'userName', label: '用户名称', type: 'text', required: false, disabled: true },
|
{ prop: 'userName', label: this.$t('system.userName'), type: 'text', required: false, disabled: true },
|
||||||
{ prop: 'examName', label: '试卷名称', type: 'text', required: true, disabled: true },
|
{ prop: 'examName', label: this.$t('system.examName'), type: 'text', required: true, disabled: true },
|
||||||
{ prop: 'score', label: '考试分数', type: 'text', required: true },
|
{ prop: 'score', label: this.$t('system.examScore'), type: 'text', required: true },
|
||||||
{ prop: 'result', label: '考试结果', type: 'select', required: true, options: this.$ConstSelect.examResultList }
|
{ prop: 'result', label: this.$t('system.examResult'), type: 'select', required: true, options: this.$ConstSelect.examResultList }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -47,16 +47,16 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
score: [
|
score: [
|
||||||
{ required: true, message: '请输入名称', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.pleaseInputName'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
result: [
|
result: [
|
||||||
{ required: true, message: '请选择状态', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectStatus'), trigger: 'change' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '编辑考试详情';
|
return this.$t('system.editExamDetail');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -79,11 +79,11 @@ export default {
|
|||||||
update() {
|
update() {
|
||||||
const self = this;
|
const self = this;
|
||||||
updateExam(this.formModel).then(response => {
|
updateExam(this.formModel).then(response => {
|
||||||
self.$message.success('修改成功!');
|
self.$message.success(this.$t('system.updateSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable');
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('修改失败!' + error.message);
|
self.$message.error(`${this.$t('error.updateFailed')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
|
@ -22,20 +22,20 @@ export default {
|
|||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '150px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
examName: {
|
examName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: '试卷名称'
|
label: this.$t('system.examName')
|
||||||
},
|
},
|
||||||
userName: {
|
userName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: '考试用户'
|
label: this.$t('system.examUser')
|
||||||
},
|
},
|
||||||
result: {
|
result: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '考试结果',
|
label: this.$t('system.examResult'),
|
||||||
config: {
|
config: {
|
||||||
data: this.$ConstSelect.examResultList
|
data: this.$ConstSelect.examResultList
|
||||||
}
|
}
|
||||||
@ -49,11 +49,11 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '试卷名称',
|
title: this.$t('system.examName'),
|
||||||
prop: 'examName'
|
prop: 'examName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '考试结果',
|
title: this.$t('system.examResult'),
|
||||||
prop: 'result',
|
prop: 'result',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.result, this.$ConstSelect.examResultList, ['value', 'label']); },
|
columnValue: (row) => { return this.$convertField(row.result, this.$ConstSelect.examResultList, ['value', 'label']); },
|
||||||
@ -67,28 +67,28 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '考试成绩',
|
title: this.$t('system.examScore'),
|
||||||
prop: 'score'
|
prop: 'score'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '考试用户',
|
title: this.$t('system.examUser'),
|
||||||
prop: 'userName'
|
prop: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户手机号',
|
title: this.$t('system.mobile'),
|
||||||
prop: 'userMobile'
|
prop: 'userMobile'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: '操作',
|
title: this.$t('global.operate'),
|
||||||
width: '250',
|
width: '250',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '编辑',
|
name: this.$t('global.edit'),
|
||||||
handleClick: this.edit
|
handleClick: this.edit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '删除',
|
name: this.$t('global.delete'),
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
}
|
}
|
||||||
@ -115,17 +115,17 @@ export default {
|
|||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm('此操作将删除此考试结果, 是否继续?', '提示', {
|
this.$confirm(this.$t('system.delExamResultIsContinue'), this.$t('global.tips'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
delPublishExam(row.id).then(response => {
|
delPublishExam(row.id).then(response => {
|
||||||
this.$message.success('删除成功');
|
this.$message.success(this.$t('system.deleteSuccess'));
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$messageBox('删除失败');
|
this.$messageBox(this.$t('error.deleteFailed'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -41,12 +41,12 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
form() {
|
form() {
|
||||||
const form = {
|
const form = {
|
||||||
labelWidth: '100px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'mapId', label: '地图名称', type: 'select', required: true, options: this.LessonList, change: true, onChange: this.mapChange },
|
{ prop: 'mapId', label: this.$t('system.mapName'), type: 'select', required: true, options: this.LessonList, change: true, onChange: this.mapChange, placeholder: this.$t('rules.mapInput') },
|
||||||
{ prop: 'mapPrdCode', label: '产品名称', type: 'select', required: true, options: this.mapPrdList, placeholder: '请选择产品' },
|
{ prop: 'mapPrdCode', label: this.$t('system.productName'), type: 'select', required: true, options: this.mapPrdList, placeholder: this.$t('rules.productInput') },
|
||||||
{ prop: 'userName', label: '用户名称', type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
{ prop: 'userName', label: this.$t('system.userName'), type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: this.$t('system.pleaseInputNames') },
|
||||||
{ prop: 'duration', label: '实训时长', type: 'text', rightWidth: true, required: true, message: 's' }
|
{ prop: 'duration', label: this.$t('system.trainingUseTime'), type: 'text', rightWidth: true, required: true, message: 's' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -54,22 +54,22 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
mapId: [
|
mapId: [
|
||||||
{ required: true, message: '请选择地图', trigger: 'change' }
|
{ required: true, message: this.$t('rules.mapInput'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
userName: [
|
userName: [
|
||||||
{ required: true, message: '请选择用户', trigger: 'change' }
|
{ required: true, message: this.$t('rules.chooseUser'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
mapPrdCode: [
|
mapPrdCode: [
|
||||||
{ required: true, message: '请选择产品', trigger: 'change' }
|
{ required: true, message: this.$t('rules.productInput'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
duration: [
|
duration: [
|
||||||
{ required: true, message: '请输入时长', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.timeInput'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '创建仿真信息';
|
return this.$t('system.createSimulationTitle');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -113,7 +113,7 @@ export default {
|
|||||||
});
|
});
|
||||||
cb(results);
|
cb(results);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '查询用户list');
|
console.error(error);
|
||||||
cb(results);
|
cb(results);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -148,13 +148,6 @@ export default {
|
|||||||
},
|
},
|
||||||
show(data) {
|
show(data) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
// this.formModel = {
|
|
||||||
// mapId: '',
|
|
||||||
// mapPrdCode: '',
|
|
||||||
// userId: '',
|
|
||||||
// userName: '',
|
|
||||||
// duration: '',
|
|
||||||
// };
|
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
const self = this;
|
const self = this;
|
||||||
@ -172,14 +165,14 @@ export default {
|
|||||||
};
|
};
|
||||||
if (params.userId) {
|
if (params.userId) {
|
||||||
postSimulationStats(params).then(response => {
|
postSimulationStats(params).then(response => {
|
||||||
self.$message.success('新增成功!');
|
self.$message.success(this.$t('system.addSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable');
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('新增失败!' + error.message);
|
self.$message.error(this.$t('error.addFailed') + error.message);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$message.error('请选择用户');
|
this.$message.error(this.$t('rules.chooseUser'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
|
@ -29,16 +29,16 @@ export default {
|
|||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '120px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
trainingName: {
|
trainingName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: '实训名称'
|
label: this.$t('system.trainingName')
|
||||||
},
|
},
|
||||||
userName: {
|
userName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: '用户名'
|
label: this.$t('system.userName')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,41 +49,41 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '用户名称',
|
title: this.$t('system.userName'),
|
||||||
prop: 'userName'
|
prop: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户手机号',
|
title: this.$t('system.mobile'),
|
||||||
prop: 'userMobile'
|
prop: 'userMobile'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '地图名称',
|
title: this.$t('system.mapName'),
|
||||||
prop: 'mapName'
|
prop: 'mapName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实训用时',
|
title: this.$t('system.trainingUseTime'),
|
||||||
prop: 'duration',
|
prop: 'duration',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.computation(row.duration); },
|
columnValue: (row) => { return this.computation(row.duration); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '产品名称',
|
title: this.$t('system.productName'),
|
||||||
prop: 'mapPrdName'
|
prop: 'mapPrdName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: '操作',
|
title: this.$t('global.operate'),
|
||||||
width: '250',
|
width: '250',
|
||||||
hide: (row) => { return !row.fake; },
|
hide: (row) => { return !row.fake; },
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '编辑',
|
name: this.$t('global.edit'),
|
||||||
handleClick: this.edit,
|
handleClick: this.edit,
|
||||||
showControl: (row) => { return row.fake; }
|
showControl: (row) => { return row.fake; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '删除',
|
name: this.$t('global.delete'),
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
showControl: (row) => { return row.fake; }
|
showControl: (row) => { return row.fake; }
|
||||||
@ -92,7 +92,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '新增', handler: this.createTraining }
|
{ text: this.$t('global.add'), handler: this.createTraining }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
@ -121,9 +121,9 @@ export default {
|
|||||||
const f = parseInt(fieldValue / 60);
|
const f = parseInt(fieldValue / 60);
|
||||||
const s = fieldValue % 60;
|
const s = fieldValue % 60;
|
||||||
if (f > 0) {
|
if (f > 0) {
|
||||||
return `${f}分${s}秒`;
|
return `${f} ${this.$t('system.minute')} ${s} ${this.$t('system.second')}`;
|
||||||
} else {
|
} else {
|
||||||
return `${s}秒`;
|
return `${s} ${this.$t('system.second')}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -135,17 +135,17 @@ export default {
|
|||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm('此操作将删除此用户仿真数据, 是否继续?', '提示', {
|
this.$confirm(this.$t('system.delUserSimulationIsContinue'), this.$t('global.tips'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteSimulationStats(row.id).then(response => {
|
deleteSimulationStats(row.id).then(response => {
|
||||||
this.$message.success('删除成功');
|
this.$message.success(this.$t('system.deleteSuccess'));
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$messageBox('删除失败');
|
this.$messageBox(this.$t('error.deleteFailed'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<add-training ref="addTraining" @selectTrain="selectTrain" />
|
<add-training ref="addTraining" @selectTrain="selectTrain" />
|
||||||
@ -48,12 +48,12 @@ export default {
|
|||||||
form() {
|
form() {
|
||||||
this.type === 'ADD';
|
this.type === 'ADD';
|
||||||
const form = {
|
const form = {
|
||||||
labelWidth: '100px',
|
labelWidth: '150px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'lessonId', label: '课程名称', type: 'select', required: true, options: this.LessonList },
|
{ prop: 'lessonId', label: this.$t('system.lessonName'), type: 'select', required: true, options: this.LessonList },
|
||||||
{ prop: 'trainingName', label: '实训名称', type: 'text', required: true, rightWidth: true, disabled: true, buttontip: '选择实训', buttonClick: this.buttonClick, placeholder: '请选择实训' },
|
{ prop: 'trainingName', label: this.$t('system.trainingName'), type: 'text', required: true, rightWidth: true, disabled: true, buttontip: this.$t('system.selectTraining'), buttonClick: this.buttonClick, placeholder: this.$t('rules.pleaseSelectTraining') },
|
||||||
{ prop: 'userName', label: '用户名称', type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: '请输入昵称/名字/手机号' },
|
{ prop: 'userName', label: this.$t('system.userName'), type: 'complete', required: false, querySearchAsync: this.querySearchAsync, handleSelect: this.prdSelect, placeholder: this.$t('system.pleaseInputNames') },
|
||||||
{ prop: 'duration', label: '实训时长', type: 'text', required: true, rightWidth: true, message: 's' }
|
{ prop: 'duration', label: this.$t('system.trainingTime'), type: 'text', required: true, rightWidth: true, message: 's' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -61,22 +61,22 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
lessonId: [
|
lessonId: [
|
||||||
{ required: true, message: '请输入教学名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseInputLessonName'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
trainingName: [
|
trainingName: [
|
||||||
{ required: true, message: '请选择实训', trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelectTraining'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
userName: [
|
userName: [
|
||||||
{ required: true, message: '请输入用户名称', trigger: 'change' }
|
{ required: true, message: this.$t('rules.userNameInput'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
duration: [
|
duration: [
|
||||||
{ required: true, message: '请输入时长', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.timeInput'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '创建用户实训';
|
return this.$t('system.createUserTraining');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -139,14 +139,6 @@ export default {
|
|||||||
},
|
},
|
||||||
show(data) {
|
show(data) {
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
// this.formModel = {
|
|
||||||
// lessonId: '',
|
|
||||||
// trainingId: '',
|
|
||||||
// trainingName: '',
|
|
||||||
// userId: '',
|
|
||||||
// userName: '',
|
|
||||||
// duration: '',
|
|
||||||
// };
|
|
||||||
},
|
},
|
||||||
doSave() {
|
doSave() {
|
||||||
const self = this;
|
const self = this;
|
||||||
@ -158,14 +150,14 @@ export default {
|
|||||||
const self = this;
|
const self = this;
|
||||||
if (this.formModel.userId) {
|
if (this.formModel.userId) {
|
||||||
addUserTraining(this.formModel).then(response => {
|
addUserTraining(this.formModel).then(response => {
|
||||||
self.$message.success('创建成功!');
|
self.$message.success(this.$t('system.addSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable');
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('创建失败!' + error.message);
|
self.$message.error(this.$t('error.addFailed') + error.message);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
self.$message.error('请选择用户');
|
self.$message.error(this.$t('rules.chooseUser'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
</el-tree>
|
</el-tree>
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" :disabled="disabled" @click="doSave">确 定</el-button>
|
<el-button type="primary" :disabled="disabled" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -34,7 +34,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogVisibles: false,
|
dialogVisibles: false,
|
||||||
title: '选择实训',
|
title: this.$t('system.selectTraining'),
|
||||||
treeData: [{
|
treeData: [{
|
||||||
children: [],
|
children: [],
|
||||||
name: ''
|
name: ''
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<span slot="footer" class="dialog-footer">
|
<span slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||||
<el-button @click="handleClose">取 消</el-button>
|
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@ -37,10 +37,10 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '100px',
|
labelWidth: '100px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'lessonName', label: '教学名称', type: 'text', required: false, disabled: true },
|
{ prop: 'lessonName', label: this.$t('system.lessonName'), type: 'text', required: false, disabled: true },
|
||||||
{ prop: 'trainingName', label: '实训名称', type: 'text', required: true, disabled: true },
|
{ prop: 'trainingName', label: this.$t('system.trainingName'), type: 'text', required: true, disabled: true },
|
||||||
{ prop: 'userName', label: '用户名称', type: 'text', required: true, disabled: true },
|
{ prop: 'userName', label: this.$t('system.userName'), type: 'text', required: true, disabled: true },
|
||||||
{ prop: 'duration', label: '实训时长', type: 'text', required: true, rightWidth: true, message: 's' }
|
{ prop: 'duration', label: this.$t('system.trainingTime'), type: 'text', required: true, rightWidth: true, message: 's' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return form;
|
return form;
|
||||||
@ -48,13 +48,13 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
duration: [
|
duration: [
|
||||||
{ required: true, message: '请输入时长', trigger: 'blur' }
|
{ required: true, message: this.$t('rules.timeInput'), trigger: 'blur' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
return crules;
|
return crules;
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '编辑实训详情';
|
return this.$t('system.editTrainingDetail');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -67,7 +67,6 @@ export default {
|
|||||||
userName: data.userName,
|
userName: data.userName,
|
||||||
trainingName: data.trainingName,
|
trainingName: data.trainingName,
|
||||||
duration: data.duration
|
duration: data.duration
|
||||||
// trainingCount: data.trainingCount
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -84,11 +83,11 @@ export default {
|
|||||||
duration: this.formModel.duration
|
duration: this.formModel.duration
|
||||||
};
|
};
|
||||||
putUserTraining(param).then(response => {
|
putUserTraining(param).then(response => {
|
||||||
self.$message.success('修改成功!');
|
self.$message.success(this.$t('system.updateSuccess'));
|
||||||
self.handleClose();
|
self.handleClose();
|
||||||
self.$emit('reloadTable');
|
self.$emit('reloadTable');
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
self.$message.error('修改失败!' + error.message);
|
self.$message.error(`${this.$t('error.updateFailed')}: ${error.message}`);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClose(done) {
|
handleClose(done) {
|
||||||
|
@ -24,16 +24,16 @@ export default {
|
|||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '120px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
trainingName: {
|
trainingName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: '实训名称'
|
label: this.$t('system.trainingName')
|
||||||
},
|
},
|
||||||
userName: {
|
userName: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: '用户名'
|
label: this.$t('system.userName')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,40 +44,40 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '用户名称',
|
title: this.$t('system.userName'),
|
||||||
prop: 'userName'
|
prop: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '用户手机号',
|
title: this.$t('system.mobile'),
|
||||||
prop: 'userMobile'
|
prop: 'userMobile'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '课程名称',
|
title: this.$t('system.lessonName'),
|
||||||
prop: 'lessonName'
|
prop: 'lessonName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实训用时',
|
title: this.$t('system.trainingUseTime'),
|
||||||
prop: 'duration',
|
prop: 'duration',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.computation(row.duration); },
|
columnValue: (row) => { return this.computation(row.duration); },
|
||||||
tagType: (row) => { return 'success'; }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实训名称',
|
title: this.$t('system.trainingName'),
|
||||||
prop: 'trainingName'
|
prop: 'trainingName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: '操作',
|
title: this.$t('global.operate'),
|
||||||
width: '250',
|
width: '250',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: '编辑',
|
name: this.$t('global.edit'),
|
||||||
handleClick: this.edit,
|
handleClick: this.edit,
|
||||||
showControl: (row) => { return row.fake != '0'; }
|
showControl: (row) => { return row.fake != '0'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '删除',
|
name: this.$t('global.delete'),
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete,
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
showControl: (row) => { return row.fake != '0'; }
|
showControl: (row) => { return row.fake != '0'; }
|
||||||
@ -86,7 +86,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: '新增', handler: this.createTraining }
|
{ text: this.$t('global.add'), handler: this.createTraining }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
@ -107,9 +107,9 @@ export default {
|
|||||||
const f = parseInt(fieldValue / 60);
|
const f = parseInt(fieldValue / 60);
|
||||||
const s = fieldValue % 60;
|
const s = fieldValue % 60;
|
||||||
if (f > 0) {
|
if (f > 0) {
|
||||||
return `${f}分${s}秒`;
|
return `${f} ${this.$t('system.minute')} ${s} ${this.$t('system.second')}`;
|
||||||
} else {
|
} else {
|
||||||
return `${s}秒`;
|
return `${s} ${this.$t('system.second')}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -121,17 +121,17 @@ export default {
|
|||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm('此操作将删除此考试结果, 是否继续?', '提示', {
|
this.$confirm(this.$t('system.delExamResultIsContinue'), this.$t('global.tips'), {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
deleteUserTraining(row.id).then(response => {
|
deleteUserTraining(row.id).then(response => {
|
||||||
this.$message.success('删除成功');
|
this.$message.success(this.$t('system.deleteSuccess'));
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$messageBox('删除失败');
|
this.$messageBox(this.$t('error.deleteFailed'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<div class="draft">
|
<div class="draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="create">{{$t('global.create')}}</el-button>
|
<el-button type="primary" @click="create">{{ $t('global.create') }}</el-button>
|
||||||
<el-button type="primary" @click="turnback">{{$t('global.return')}}</el-button>
|
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,7 +63,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
rules() {
|
rules() {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
const baseRules = {
|
const baseRules = {
|
||||||
userId: [
|
userId: [
|
||||||
{ required: true, message: this.$t('rules.userNameInput'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.userNameInput'), trigger: 'blur' }
|
||||||
|
@ -1,244 +1,241 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</QueryListPage>
|
<author-detail ref="authorDetail" />
|
||||||
<author-detail ref="authorDetail"></author-detail>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getLessonPermissonPageList, setLessonPermisson, getDistribute } from '@/api/management/author';
|
import { getLessonPermissonPageList, setLessonPermisson, getDistribute } from '@/api/management/author';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import authorDetail from './detail';
|
import authorDetail from './detail';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'author',
|
name: 'Author',
|
||||||
components: {
|
components: {
|
||||||
authorDetail
|
authorDetail
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
param: '',
|
param: '',
|
||||||
WhetherTypeList: [],
|
WhetherTypeList: [],
|
||||||
EffectiveTypeList: [],
|
EffectiveTypeList: [],
|
||||||
PermissionTypeList: [],
|
PermissionTypeList: [],
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
'userMobile': {
|
'userMobile': {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('orderAuthor.userMobile')
|
label: this.$t('orderAuthor.userMobile')
|
||||||
},
|
},
|
||||||
'userName': {
|
'userName': {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('orderAuthor.userName')
|
label: this.$t('orderAuthor.userName')
|
||||||
},
|
},
|
||||||
'type': {
|
'type': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.permissionType'),
|
label: this.$t('orderAuthor.permissionType'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.userName'),
|
title: this.$t('orderAuthor.userName'),
|
||||||
prop: 'userName'
|
prop: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.userMobile'),
|
title: this.$t('orderAuthor.userMobile'),
|
||||||
prop: 'userMobile'
|
prop: 'userMobile'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.mapName'),
|
title: this.$t('orderAuthor.mapName'),
|
||||||
prop: 'mapName',
|
prop: 'mapName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.mapProductName'),
|
title: this.$t('orderAuthor.mapProductName'),
|
||||||
prop: 'mapProductName',
|
prop: 'mapProductName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.courseName'),
|
title: this.$t('orderAuthor.courseName'),
|
||||||
prop: 'lessonName',
|
prop: 'lessonName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permissionType'),
|
title: this.$t('orderAuthor.permissionType'),
|
||||||
prop: 'type',
|
prop: 'type',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||||
prop: 'forever',
|
prop: 'forever',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.forever) {
|
switch (row.forever) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
case false: return 'danger';
|
case false: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||||
prop: 'canDistribute',
|
prop: 'canDistribute',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.canDistribute) {
|
switch (row.canDistribute) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
case false: return 'danger';
|
case false: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.totalPermissions'),
|
title: this.$t('orderAuthor.totalPermissions'),
|
||||||
prop: 'amount'
|
prop: 'amount'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.residualPermissionNumber'),
|
title: this.$t('orderAuthor.residualPermissionNumber'),
|
||||||
prop: 'remains'
|
prop: 'remains'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.startTime'),
|
title: this.$t('orderAuthor.startTime'),
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
formatter: this.formatterDate
|
formatter: this.formatterDate
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.endTime'),
|
title: this.$t('orderAuthor.endTime'),
|
||||||
prop: 'endTime',
|
prop: 'endTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
formatter: this.formatterDate
|
formatter: this.formatterDate
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
default: return 'danger';
|
default: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '250',
|
width: '250',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.setupFailure'),
|
name: this.$t('orderAuthor.setupFailure'),
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
handleClick: this.handleSetFailure,
|
handleClick: this.handleSetFailure,
|
||||||
showControl: (row) => {
|
showControl: (row) => {
|
||||||
return row.status === '1';
|
return row.status === '1';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.setupEffective'),
|
name: this.$t('orderAuthor.setupEffective'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handleClick: this.handleSetFailure,
|
handleClick: this.handleSetFailure,
|
||||||
showControl: (row) => {
|
showControl: (row) => {
|
||||||
return row.status === '0';
|
return row.status === '0';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.renew'),
|
name: this.$t('orderAuthor.renew'),
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
handleClick: this.handleRenewAdd,
|
handleClick: this.handleRenewAdd,
|
||||||
showControl: (row) => {
|
showControl: (row) => {
|
||||||
return row.origin === '01' && (row.forever || (row.endTime && Date.parse(new Date(row.endTime.replace(/\-/g, "\/"))) > Date.parse(new Date())))
|
return row.origin === '01' && (row.forever || (row.endTime && Date.parse(new Date(row.endTime.replace(/\-/g, '\/'))) > Date.parse(new Date())));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.source'),
|
name: this.$t('orderAuthor.source'),
|
||||||
type: '',
|
type: '',
|
||||||
handleClick: this.handleSource,
|
handleClick: this.handleSource
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.$Dictionary.permissionType().then(list => {
|
this.$Dictionary.permissionType().then(list => {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
formatterDate(row, porpInfo) {
|
formatterDate(row, porpInfo) {
|
||||||
if (row.hasOwnProperty(porpInfo.property)) {
|
return row[porpInfo.property];
|
||||||
}
|
},
|
||||||
return row[porpInfo.property];
|
queryFunction(params) {
|
||||||
},
|
return getLessonPermissonPageList(params);
|
||||||
queryFunction(params) {
|
},
|
||||||
return getLessonPermissonPageList(params);
|
handleSetFailure(index, row) {
|
||||||
},
|
this.$confirm(this.$t('tip.updatePrivilegeTip'), this.$t('global.tips'), {
|
||||||
handleSetFailure(index, row) {
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
this.$confirm(this.$t('tip.updatePrivilegeTip'), this.$t('tip.hint'), {
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
type: 'warning'
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
}).then(() => {
|
||||||
type: 'warning'
|
setLessonPermisson({ id: row.id, status: row.status == 1 ? '0' : '1' }).then(res => {
|
||||||
}).then(() => {
|
this.$message.success(this.$t('tip.setupSuccessfully'));
|
||||||
setLessonPermisson({ id: row.id, status: row.status == 1 ? '0' : '1' }).then(res => {
|
this.reloadTable();
|
||||||
this.$message.success(this.$t('tip.setupSuccessfully'));
|
}).catch(() => {
|
||||||
this.reloadTable();
|
this.$messageBox(this.$t('tip.setupFailed'));
|
||||||
}).catch(error => {
|
});
|
||||||
this.$messageBox(this.$t('tip.setupFailed'));
|
}).catch(() => { });
|
||||||
})
|
},
|
||||||
}).catch(() => { })
|
handleRenewAdd(index, row) {
|
||||||
},
|
this.$router.push({ path: `${UrlConfig.orderauthor.authorDraft}/renew/${row.id}` });
|
||||||
handleRenewAdd(index, row) {
|
},
|
||||||
this.$router.push({ path: `${UrlConfig.orderauthor.authorDraft}/renew/${row.id}` });
|
handlePermissionAdd() {
|
||||||
},
|
this.$router.push({ path: `${UrlConfig.orderauthor.authorDraft}/add/0` });
|
||||||
handlePermissionAdd() {
|
},
|
||||||
this.$router.push({ path: `${UrlConfig.orderauthor.authorDraft}/add/0` });
|
reloadTable() {
|
||||||
},
|
if (this.queryList && this.queryList.reload) {
|
||||||
reloadTable() {
|
this.queryList.reload();
|
||||||
if (this.queryList && this.queryList.reload) {
|
}
|
||||||
this.queryList.reload()
|
},
|
||||||
}
|
async handleSource(index, row) {
|
||||||
},
|
try {
|
||||||
async handleSource(index, row) {
|
const res = await getDistribute(row.distributeId);
|
||||||
try {
|
this.$refs.authorDetail.show(res.data);
|
||||||
let res = await getDistribute(row.distributeId);
|
} catch (error) {
|
||||||
this.$refs.authorDetail.show(res.data);
|
this.$messageBox(this.$t('tip.requestFailed'));
|
||||||
} catch (error) {
|
}
|
||||||
this.$messageBox(this.$t('tip.requestFailed'));
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,221 +1,220 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</QueryListPage>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getCommodityList, delCommodity, setCommodityStatus } from '@/api/management/goods';
|
import { getCommodityList, delCommodity, setCommodityStatus } from '@/api/management/goods';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Dictionary',
|
name: 'Dictionary',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
productTypeList: [],
|
productTypeList: [],
|
||||||
EffectiveTypeList: [],
|
EffectiveTypeList: [],
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '80px',
|
labelWidth: '80px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
name: {
|
name: {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('orderAuthor.name')
|
label: this.$t('orderAuthor.name')
|
||||||
},
|
},
|
||||||
productType: {
|
productType: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.productType'),
|
label: this.$t('orderAuthor.productType'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mapId: {
|
mapId: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.map'),
|
label: this.$t('orderAuthor.map'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
status: {
|
status: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.state'),
|
label: this.$t('orderAuthor.state'),
|
||||||
config: {
|
config: {
|
||||||
data: this.$ConstSelect.Status
|
data: this.$ConstSelect.Status
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: getCommodityList,
|
query: getCommodityList,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.commodityName'),
|
title: this.$t('orderAuthor.commodityName'),
|
||||||
prop: 'name'
|
prop: 'name'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.productType'),
|
title: this.$t('orderAuthor.productType'),
|
||||||
prop: 'productType',
|
prop: 'productType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.mapName'),
|
title: this.$t('orderAuthor.mapName'),
|
||||||
prop: 'mapName',
|
prop: 'mapName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.productName'),
|
title: this.$t('orderAuthor.productName'),
|
||||||
prop: 'prdName',
|
prop: 'prdName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.courseName'),
|
title: this.$t('orderAuthor.courseName'),
|
||||||
prop: 'lessonName',
|
prop: 'lessonName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.price'),
|
title: this.$t('orderAuthor.price'),
|
||||||
prop: 'price'
|
prop: 'price'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.state'),
|
title: this.$t('orderAuthor.state'),
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
default: return 'danger';
|
default: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.describtion'),
|
title: this.$t('orderAuthor.describtion'),
|
||||||
prop: 'remarks'
|
prop: 'remarks'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.creationTime'),
|
title: this.$t('orderAuthor.creationTime'),
|
||||||
prop: 'createTime'
|
prop: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '270',
|
width: this.$i18n.locale == 'en' ? '300': '250',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('global.edit'),
|
name: this.$t('global.edit'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handleClick: this.handleEdit
|
handleClick: this.handleEdit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.setupFailure'),
|
name: this.$t('orderAuthor.setupFailure'),
|
||||||
handleClick: this.handleEfficacy,
|
handleClick: this.handleEfficacy,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showControl: (row) => {
|
showControl: (row) => {
|
||||||
return row.status == '1';
|
return row.status == '1';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.setupEffective'),
|
name: this.$t('orderAuthor.setupEffective'),
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
handleClick: this.handleEfficacy,
|
handleClick: this.handleEfficacy,
|
||||||
showControl: (row) => {
|
showControl: (row) => {
|
||||||
return row.status == '0';
|
return row.status == '0';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('global.delete'),
|
name: this.$t('global.delete'),
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
handleClick: this.handleDelete,
|
handleClick: this.handleDelete
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: this.$t('global.add'), handler: this.handleAdd },
|
{ text: this.$t('global.add'), handler: this.handleAdd }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// 产品类型
|
// 产品类型
|
||||||
this.$Dictionary.productType().then(list => {
|
this.$Dictionary.productType().then(list => {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.$convertList(list, this.productTypeList, elem => {
|
this.$convertList(list, this.productTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
// 获取地图
|
// 获取地图
|
||||||
let res = await listPublishMap();
|
const res = await listPublishMap();
|
||||||
res.data.forEach(elem => {
|
res.data.forEach(elem => {
|
||||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '获取发布地图');
|
console.error(error, '获取发布地图');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleEdit(index, row) {
|
handleEdit(index, row) {
|
||||||
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/edit/${row.id}` });
|
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/edit/${row.id}` });
|
||||||
},
|
},
|
||||||
|
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/add/0` });
|
this.$router.push({ path: `${UrlConfig.orderauthor.commodityDraft}/add/0` });
|
||||||
},
|
},
|
||||||
// 设置失效
|
// 设置失效
|
||||||
handleEfficacy(index, row) {
|
handleEfficacy(index, row) {
|
||||||
this.$confirm(this.$t('tip.updateProductTip'), this.$t('tip.hint'), {
|
this.$confirm(this.$t('tip.updateProductTip'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
setCommodityStatus(row.id).then(res => {
|
setCommodityStatus(row.id).then(res => {
|
||||||
this.$message.success(this.$t('tip.operationSuccessfully'));
|
this.$message.success(this.$t('tip.operationSuccessfully'));
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
}).catch(err => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('tip.operationFailed'));
|
this.$messageBox(this.$t('tip.operationFailed'));
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
})
|
});
|
||||||
}).catch(() => { })
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
handleDelete(index, row) {
|
handleDelete(index, row) {
|
||||||
this.$confirm(this.$t('tip.deleteProductTip'), this.$t('tip.hint'), {
|
this.$confirm(this.$t('tip.deleteProductTip'), this.$t('global.tips'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
delCommodity(row.id).then(response => {
|
delCommodity(row.id).then(response => {
|
||||||
this.$message.success(this.$t('tip.successfullyDelete'));
|
this.$message.success(this.$t('tip.successfullyDelete'));
|
||||||
this.reloadTable()
|
this.reloadTable();
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
this.$messageBox(this.$t('tip.failDelete'))
|
this.$messageBox(this.$t('tip.failDelete'));
|
||||||
})
|
});
|
||||||
}).catch(() => { })
|
}).catch(() => { });
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,189 +1,195 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="this.$t('orderAuthor.trainingList')" :visible.sync="show" top="20px" width="90%" :before-doClose="doClose"
|
<el-dialog
|
||||||
:close-on-click-modal="false">
|
:title="this.$t('orderAuthor.trainingList')"
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
:visible.sync="show"
|
||||||
</QueryListPage>
|
top="20px"
|
||||||
</el-dialog>
|
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>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { putMapProductOnLine, putMapProductOffLine } from '@/api/jmap/mapdraft';
|
import { getCommodityList } from '@/api/management/goods';
|
||||||
import { getCommodityList, delCommodity, setCommodityStatus } from '@/api/management/goods';
|
import { listPublishMap } from '@/api/jmap/map';
|
||||||
import { getProductList } from '@/api/management/mapprd';
|
|
||||||
import { pageQueryTraining } from '@/api/jmap/training';
|
|
||||||
import { getSkinCodeList } from '@/api/management/mapskin'
|
|
||||||
import localStore from 'storejs';
|
|
||||||
import { listPublishMap } from '@/api/jmap/map';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'addGoods',
|
name: 'AddGoods',
|
||||||
props: {
|
props: {
|
||||||
trainings: {
|
trainings: {
|
||||||
type: Array,
|
type: Array,
|
||||||
},
|
default() {
|
||||||
detail: {
|
return [];
|
||||||
type: Object,
|
}
|
||||||
}
|
},
|
||||||
},
|
detail: {
|
||||||
data() {
|
type: Object,
|
||||||
return {
|
default() {
|
||||||
show: false,
|
return null;
|
||||||
productTypeList: [],
|
}
|
||||||
EffectiveTypeList: [],
|
}
|
||||||
pagerConfig: {
|
},
|
||||||
pageSize: 'pageSize',
|
data() {
|
||||||
pageIndex: 'pageNum'
|
return {
|
||||||
},
|
show: false,
|
||||||
queryForm: {
|
productTypeList: [],
|
||||||
labelWidth: '80px',
|
EffectiveTypeList: [],
|
||||||
reset: true,
|
pagerConfig: {
|
||||||
queryObject: {
|
pageSize: 'pageSize',
|
||||||
name: {
|
pageIndex: 'pageNum'
|
||||||
type: 'text',
|
},
|
||||||
label: this.$t('orderAuthor.name')
|
queryForm: {
|
||||||
},
|
labelWidth: '80px',
|
||||||
productType: {
|
reset: true,
|
||||||
type: 'select',
|
queryObject: {
|
||||||
label: this.$t('orderAuthor.productType'),
|
name: {
|
||||||
config: {
|
type: 'text',
|
||||||
data: []
|
label: this.$t('orderAuthor.name')
|
||||||
}
|
},
|
||||||
},
|
productType: {
|
||||||
mapId: {
|
type: 'select',
|
||||||
type: 'select',
|
label: this.$t('orderAuthor.productType'),
|
||||||
label: this.$t('orderAuthor.map'),
|
config: {
|
||||||
config: {
|
data: []
|
||||||
data: []
|
}
|
||||||
}
|
},
|
||||||
},
|
mapId: {
|
||||||
status: {
|
type: 'select',
|
||||||
type: 'select',
|
label: this.$t('orderAuthor.map'),
|
||||||
label: this.$t('orderAuthor.state'),
|
config: {
|
||||||
config: {
|
data: []
|
||||||
data: this.$ConstSelect.Status
|
}
|
||||||
}
|
},
|
||||||
}
|
status: {
|
||||||
}
|
type: 'select',
|
||||||
},
|
label: this.$t('orderAuthor.state'),
|
||||||
queryList: {
|
config: {
|
||||||
query: getCommodityList,
|
data: this.$ConstSelect.Status
|
||||||
selectCheckShow: false,
|
}
|
||||||
indexShow: true,
|
}
|
||||||
columns: [
|
}
|
||||||
{
|
},
|
||||||
title: this.$t('orderAuthor.commodityName'),
|
queryList: {
|
||||||
prop: 'name'
|
query: getCommodityList,
|
||||||
},
|
selectCheckShow: false,
|
||||||
{
|
indexShow: true,
|
||||||
title: this.$t('orderAuthor.productType'),
|
columns: [
|
||||||
prop: 'productType',
|
{
|
||||||
type: 'tag',
|
title: this.$t('orderAuthor.commodityName'),
|
||||||
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']) },
|
prop: 'name'
|
||||||
tagType: (row) => { return 'success' }
|
},
|
||||||
},
|
{
|
||||||
{
|
title: this.$t('orderAuthor.productType'),
|
||||||
title: this.$t('orderAuthor.mapName'),
|
prop: 'productType',
|
||||||
prop: 'mapName',
|
type: 'tag',
|
||||||
},
|
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']); },
|
||||||
{
|
tagType: (row) => { return 'success'; }
|
||||||
title: this.$t('orderAuthor.productName'),
|
},
|
||||||
prop: 'prdName',
|
{
|
||||||
},
|
title: this.$t('orderAuthor.mapName'),
|
||||||
{
|
prop: 'mapName'
|
||||||
title: this.$t('orderAuthor.courseName'),
|
},
|
||||||
prop: 'lessonName',
|
{
|
||||||
},
|
title: this.$t('orderAuthor.productName'),
|
||||||
{
|
prop: 'prdName'
|
||||||
title: this.$t('orderAuthor.price'),
|
},
|
||||||
prop: 'price'
|
{
|
||||||
},
|
title: this.$t('orderAuthor.courseName'),
|
||||||
{
|
prop: 'lessonName'
|
||||||
title: this.$t('orderAuthor.state'),
|
},
|
||||||
prop: 'status',
|
{
|
||||||
type: 'tag',
|
title: this.$t('orderAuthor.price'),
|
||||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
prop: 'price'
|
||||||
tagType: (row) => {
|
},
|
||||||
switch (row.status) {
|
{
|
||||||
case '1': return 'success';
|
title: this.$t('orderAuthor.state'),
|
||||||
default: return 'danger';
|
prop: 'status',
|
||||||
}
|
type: 'tag',
|
||||||
}
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||||
},
|
tagType: (row) => {
|
||||||
{
|
switch (row.status) {
|
||||||
title: this.$t('orderAuthor.describtion'),
|
case '1': return 'success';
|
||||||
prop: 'remarks'
|
default: return 'danger';
|
||||||
},
|
}
|
||||||
{
|
}
|
||||||
title: this.$t('orderAuthor.creationTime'),
|
},
|
||||||
prop: 'createTime'
|
{
|
||||||
},
|
title: this.$t('orderAuthor.describtion'),
|
||||||
{
|
prop: 'remarks'
|
||||||
type: 'button',
|
},
|
||||||
title: this.$t('global.operate'),
|
{
|
||||||
width: '250',
|
title: this.$t('orderAuthor.creationTime'),
|
||||||
buttons: [
|
prop: 'createTime'
|
||||||
{
|
},
|
||||||
name: '选择',
|
{
|
||||||
type: 'primary',
|
type: 'button',
|
||||||
handleClick: this.handleAdd
|
title: this.$t('global.operate'),
|
||||||
},
|
width: '250',
|
||||||
]
|
buttons: [
|
||||||
}
|
{
|
||||||
],
|
name: this.$t('orderAuthor.select'),
|
||||||
actions: [
|
type: 'primary',
|
||||||
]
|
handleClick: this.handleAdd
|
||||||
},
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
actions: [
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
currentModel: {}
|
currentModel: {}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow() {
|
doShow() {
|
||||||
this.show = true;
|
this.show = true;
|
||||||
this.reloadTable();
|
this.reloadTable();
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
async loadInitData() {
|
async loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// 产品类型
|
// 产品类型
|
||||||
this.$Dictionary.productType().then(list => {
|
this.$Dictionary.productType().then(list => {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.$convertList(list, this.productTypeList, elem => {
|
this.$convertList(list, this.productTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
try {
|
try {
|
||||||
// 获取地图
|
// 获取地图
|
||||||
let res = await listPublishMap();
|
const res = await listPublishMap();
|
||||||
res.data.forEach(elem => {
|
res.data.forEach(elem => {
|
||||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error, '获取发布地图');
|
console.error(error, '获取发布地图');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
handleAdd(index, row) {
|
handleAdd(index, row) {
|
||||||
this.$emit('selectGoods', row);
|
this.$emit('selectGoods', row);
|
||||||
this.doClose();
|
this.doClose();
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
if (this.queryList && this.queryList.reload) {
|
if (this.queryList && this.queryList.reload) {
|
||||||
this.queryList.reload();
|
this.queryList.reload();
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,54 +1,62 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="show" width="360px" :before-close="doClose" :zIndex="2000" :modal="false"
|
<el-dialog
|
||||||
:close-on-click-modal="false" v-dialogDrag>
|
v-dialogDrag
|
||||||
<div style="text-align:center">
|
:title="title"
|
||||||
<el-radio-group v-model="formModel.canDistribute">
|
:visible.sync="show"
|
||||||
<el-radio :label="true">{{$t('orderAuthor.publicAuthority')}}</el-radio>
|
width="360px"
|
||||||
<el-radio :label="false">{{$t('orderAuthor.privateAuthority')}}</el-radio>
|
:before-close="doClose"
|
||||||
</el-radio-group>
|
:z-index="2000"
|
||||||
</div>
|
:modal="false"
|
||||||
<span slot="footer" class="dialog-footer">
|
:close-on-click-modal="false"
|
||||||
<el-button @click="handleClose">{{$t('global.cancel')}}</el-button>
|
>
|
||||||
<el-button type="primary" @click="handleSure">{{$t('global.confirm')}}</el-button>
|
<div style="text-align:center">
|
||||||
</span>
|
<el-radio-group v-model="formModel.canDistribute">
|
||||||
</el-dialog>
|
<el-radio :label="true">{{ $t('orderAuthor.publicAuthority') }}</el-radio>
|
||||||
|
<el-radio :label="false">{{ $t('orderAuthor.privateAuthority') }}</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</div>
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="handleClose">{{ $t('global.cancel') }}</el-button>
|
||||||
|
<el-button type="primary" @click="handleSure">{{ $t('global.confirm') }}</el-button>
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'CanTransfer',
|
name: 'CanTransfer',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialogShow: false,
|
dialogShow: false,
|
||||||
formModel: {
|
formModel: {
|
||||||
canDistribute: true,
|
canDistribute: true
|
||||||
},
|
},
|
||||||
data: {},
|
data: {}
|
||||||
|
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
show() {
|
show() {
|
||||||
return this.dialogShow;
|
return this.dialogShow;
|
||||||
},
|
},
|
||||||
title() { return this.$t('orderAuthor.optionPrivilegeTransfer'); }
|
title() { return this.$t('orderAuthor.optionPrivilegeTransfer'); }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
doShow(data) {
|
doShow(data) {
|
||||||
this.dialogShow = true;
|
this.dialogShow = true;
|
||||||
this.formModel.canDistribute = true;
|
this.formModel.canDistribute = true;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.dialogShow = false;
|
this.dialogShow = false;
|
||||||
},
|
},
|
||||||
handleSure() {
|
handleSure() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
Object.assign(this.data, this.formModel);
|
Object.assign(this.data, this.formModel);
|
||||||
this.$emit('distribute', this.data);
|
this.$emit('distribute', this.data);
|
||||||
},
|
},
|
||||||
handleClose() {
|
handleClose() {
|
||||||
this.doClose();
|
this.doClose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,511 +1,508 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<!-- <turnback-bar :title="turnbackBarTitle"></turnback-bar> -->
|
<!-- <turnback-bar :title="turnbackBarTitle"></turnback-bar> -->
|
||||||
<div class="card-box">
|
<div class="card-box">
|
||||||
<el-steps class="steps" :active="display">
|
<el-steps class="steps" :active="display">
|
||||||
<el-step :title="title" icon="el-icon-edit-outline"></el-step>
|
<el-step :title="title" icon="el-icon-edit-outline" />
|
||||||
<el-step title="" icon="el-icon-upload"></el-step>
|
<el-step title="" icon="el-icon-upload" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-card class="forms">
|
<el-card class="forms">
|
||||||
<el-scrollbar wrapClass="scrollbar-wrapper" :style="{height:height -70 + 'px'}"
|
<el-scrollbar
|
||||||
style="padding-top: 40px">
|
wrap-class="scrollbar-wrapper"
|
||||||
<data-form class="card-form" ref="dataform" :form="form" :formModel="formModel" :rules="rules"></data-form>
|
:style="{height:height -70 + 'px'}"
|
||||||
</el-scrollbar>
|
style="padding-top: 40px"
|
||||||
</el-card>
|
>
|
||||||
<div class="draft">
|
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||||
<el-button-group>
|
</el-scrollbar>
|
||||||
<el-button type="primary" @click="create" v-if="isAdd" v-loading="loading">{{$t('global.create')}}</el-button>
|
</el-card>
|
||||||
<el-button type="primary" @click="update" v-if="isEdit" v-loading="loading">{{$t('global.update')}}</el-button>
|
<div class="draft">
|
||||||
<el-button type="primary" @click="create" v-if="isReNew" v-loading="loading">{{$t('orderAuthor.renew')}}</el-button>
|
<el-button-group>
|
||||||
<el-button type="primary" @click="turnback">{{$t('global.return')}}</el-button>
|
<el-button v-if="isAdd" v-loading="loading" type="primary" @click="create">{{ $t('global.create') }}</el-button>
|
||||||
</el-button-group>
|
<el-button v-if="isEdit" v-loading="loading" type="primary" @click="update">{{ $t('global.update') }}</el-button>
|
||||||
</div>
|
<el-button v-if="isReNew" v-loading="loading" type="primary" @click="create">{{ $t('orderAuthor.renew') }}</el-button>
|
||||||
</div>
|
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
|
||||||
<add-goods ref="addGoods" @selectGoods="selectGoods"></add-goods>
|
</el-button-group>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<add-goods ref="addGoods" @selectGoods="selectGoods" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getOrderDetail, createOrder, updateOrder, getOrderCharge } from '@/api/management/order';
|
import { createOrder, updateOrder, getOrderCharge } from '@/api/management/order';
|
||||||
import { addOrganization, getOrganizationList } from '@/api/management/organization';
|
import { addOrganization, getOrganizationList } from '@/api/management/organization';
|
||||||
import { getGoodsList } from '@/api/management/goods';
|
import { getGoodsList } from '@/api/management/goods';
|
||||||
import { getSellerList } from '@/api/management/user';
|
import { getSellerList } from '@/api/management/user';
|
||||||
import { validateCharCode } from '@/utils/validate';
|
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||||
import { UrlConfig } from '@/router/index';
|
import addGoods from './addGoods';
|
||||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
|
||||||
import addGoods from './addGoods';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DictionaryDetailEdit',
|
name: 'DictionaryDetailEdit',
|
||||||
mixins: [
|
components: {
|
||||||
WindowResizeHandler
|
addGoods
|
||||||
],
|
},
|
||||||
components: {
|
mixins: [
|
||||||
addGoods
|
WindowResizeHandler
|
||||||
},
|
],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
type: '',
|
type: '',
|
||||||
height: '',
|
height: '',
|
||||||
display: 1,
|
display: 1,
|
||||||
loading: false,
|
loading: false,
|
||||||
foreverInitData: false,
|
foreverInitData: false,
|
||||||
SellerList: [],
|
SellerList: [],
|
||||||
OrganizationList: [],
|
OrganizationList: [],
|
||||||
BizTypeList: [],
|
BizTypeList: [],
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
OrderTypeList: [],
|
OrderTypeList: [],
|
||||||
PayTypeList: [],
|
PayTypeList: [],
|
||||||
PayStatusTypeList: [],
|
PayStatusTypeList: [],
|
||||||
WhetherTypeList: [],
|
WhetherTypeList: [],
|
||||||
OrgzList: [],
|
OrgzList: [],
|
||||||
PermissionTypeList: [],
|
PermissionTypeList: [],
|
||||||
formModel: {
|
formModel: {
|
||||||
organizationId: '',
|
organizationId: '',
|
||||||
goodsId: '',
|
goodsId: '',
|
||||||
goodsName: '',
|
goodsName: '',
|
||||||
orderType: '02',
|
orderType: '02',
|
||||||
contractNo: '',
|
contractNo: '',
|
||||||
forever: false,
|
forever: false,
|
||||||
totalPrice: 0,
|
totalPrice: 0,
|
||||||
price: 0,
|
price: 0,
|
||||||
amount: 0,
|
amount: 0,
|
||||||
monthAmount: 0,
|
monthAmount: 0,
|
||||||
bizType: '01',
|
bizType: '01',
|
||||||
payWays: '01',
|
payWays: '01',
|
||||||
payStatus: '02',
|
payStatus: '02',
|
||||||
startTime: '',
|
startTime: '',
|
||||||
sellerId: '',
|
sellerId: ''
|
||||||
},
|
},
|
||||||
DatePicker: {
|
DatePicker: {
|
||||||
shortcuts: [{
|
shortcuts: [{
|
||||||
text: this.$t('orderAuthor.today'),
|
text: this.$t('orderAuthor.today'),
|
||||||
onClick(picker) {
|
onClick(picker) {
|
||||||
picker.$emit('pick', new Date());
|
picker.$emit('pick', new Date());
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
text: this.$t('orderAuthor.yesterday'),
|
text: this.$t('orderAuthor.yesterday'),
|
||||||
onClick(picker) {
|
onClick(picker) {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
date.setTime(date.getTime() - 3600 * 1000 * 24);
|
||||||
picker.$emit('pick', date);
|
picker.$emit('pick', date);
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
text: this.$t('orderAuthor.aWeekAgo'),
|
text: this.$t('orderAuthor.aWeekAgo'),
|
||||||
onClick(picker) {
|
onClick(picker) {
|
||||||
const date = new Date();
|
const date = new Date();
|
||||||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
picker.$emit('pick', date);
|
picker.$emit('pick', date);
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// turnbackBarTitle() {
|
// turnbackBarTitle() {
|
||||||
// return '';
|
// return '';
|
||||||
// },
|
// },
|
||||||
isAdd() {
|
isAdd() {
|
||||||
return this.type === 'ADD';
|
return this.type === 'ADD';
|
||||||
},
|
},
|
||||||
isEdit() {
|
isEdit() {
|
||||||
return (this.type === 'EDIT') && !isNaN(Number(this.$route.params.orderId));;
|
return (this.type === 'EDIT') && !isNaN(Number(this.$route.params.orderId));
|
||||||
},
|
},
|
||||||
isReNew() {
|
isReNew() {
|
||||||
return (this.type === 'RENEW') && !isNaN(Number(this.$route.params.orderId));
|
return (this.type === 'RENEW') && !isNaN(Number(this.$route.params.orderId));
|
||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return this.isAdd ? this.$t('orderAuthor.addOrder') : (this.isEdit ? this.$t('orderAuthor.updateOrder') : this.isReNew ? this.$t('orderAuthor.renewOrder') : this.$t('orderAuthor.unknownRouter'));
|
return this.isAdd ? this.$t('orderAuthor.addOrder') : (this.isEdit ? this.$t('orderAuthor.updateOrder') : this.isReNew ? this.$t('orderAuthor.renewOrder') : this.$t('orderAuthor.unknownRouter'));
|
||||||
},
|
},
|
||||||
monthsTitle() {
|
monthsTitle() {
|
||||||
return this.isReNew ? this.$t('orderAuthor.increasePurchaseTime') : this.$t('orderAuthor.choosePurchaseTime');
|
return this.isReNew ? this.$t('orderAuthor.increasePurchaseTime') : this.$t('orderAuthor.choosePurchaseTime');
|
||||||
},
|
},
|
||||||
totalTitle() {
|
totalTitle() {
|
||||||
return this.isReNew ? this.$t('orderAuthor.increasePermissionNumber') : this.$t('orderAuthor.choosePermissionNumber');
|
return this.isReNew ? this.$t('orderAuthor.increasePermissionNumber') : this.$t('orderAuthor.choosePermissionNumber');
|
||||||
},
|
},
|
||||||
isShowStartDate() {
|
isShowStartDate() {
|
||||||
return !this.formModel.forever && (this.formModel.bizType !== '02'); //非永久的非续费类型显示开始时间
|
return !this.formModel.forever && (this.formModel.bizType !== '02'); // 非永久的非续费类型显示开始时间
|
||||||
},
|
},
|
||||||
isShowMonths() {
|
isShowMonths() {
|
||||||
return !this.formModel.forever // 非永久类型显示月份
|
return !this.formModel.forever; // 非永久类型显示月份
|
||||||
},
|
},
|
||||||
isShowContractNo() {
|
isShowContractNo() {
|
||||||
return this.formModel.orderType === '02'; //是合同类型显示
|
return this.formModel.orderType === '02'; // 是合同类型显示
|
||||||
},
|
},
|
||||||
isShowPrice() {
|
isShowPrice() {
|
||||||
return this.formModel.orderType === '02'; //是合同类型显示
|
return this.formModel.orderType === '02'; // 是合同类型显示
|
||||||
},
|
},
|
||||||
isShowPayType() {
|
isShowPayType() {
|
||||||
return this.formModel.orderType === '02'; //是合同类型显示
|
return this.formModel.orderType === '02'; // 是合同类型显示
|
||||||
},
|
},
|
||||||
isShowPayStatus() {
|
isShowPayStatus() {
|
||||||
return this.formModel.orderType === '02'; //是合同类型显示
|
return this.formModel.orderType === '02'; // 是合同类型显示
|
||||||
},
|
},
|
||||||
isShowSeller() {
|
isShowSeller() {
|
||||||
return this.formModel.orderType !== '04'; //不是内部分配显示
|
return this.formModel.orderType !== '04'; // 不是内部分配显示
|
||||||
},
|
},
|
||||||
isDisabled() {
|
isDisabled() {
|
||||||
return this.isEdit || this.isReNew
|
return this.isEdit || this.isReNew;
|
||||||
},
|
},
|
||||||
foreverIsDisabled() {
|
foreverIsDisabled() {
|
||||||
return this.foreverInitData
|
return this.foreverInitData;
|
||||||
},
|
},
|
||||||
payTypeIsDisabled() {
|
payTypeIsDisabled() {
|
||||||
return this.isEdit
|
return this.isEdit;
|
||||||
},
|
},
|
||||||
payStatusDisabled() {
|
payStatusDisabled() {
|
||||||
return this.isEdit
|
return this.isEdit;
|
||||||
},
|
},
|
||||||
|
|
||||||
form() {
|
form() {
|
||||||
let form = {
|
const form = {
|
||||||
labelWidth: 'auto',
|
labelWidth: this.$i18n.locale == 'en' ? '200px': '145px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'organizationId', label: this.$t('orderAuthor.organizationOrEnterprise'), type: 'select', required: false, disabled: this.isDisabled, options: this.OrganizationList, allowCreate: true, onChange: this.onChange },
|
{ prop: 'organizationId', label: this.$t('orderAuthor.organizationOrEnterprise'), type: 'select', required: false, disabled: this.isDisabled, options: this.OrganizationList, allowCreate: true, onChange: this.onChange },
|
||||||
// { prop: 'goodsId', label: '商品名称', type: 'select', required: false, disabled: this.isDisabled, options: this.goodsList, change: true, onChange: this.selectCommodity },
|
{ prop: 'goodsName', label: this.$t('orderAuthor.commodityName'), type: 'text', required: false, disabled: true, rightWidth: true, buttontip: '选择商品', buttonClick: this.buttonClick },
|
||||||
{ prop: 'goodsName', label: this.$t('orderAuthor.commodityName'), type: 'text', required: false, rightWidth: true, disabled: true, buttontip: this.$t('orderAuthor.chooseGoods'), buttonClick: this.buttonClick },
|
{ prop: 'price', label: this.$t('orderAuthor.itemPricing'), type: 'number', required: false, disabled: true, min: 0, message: '元' },
|
||||||
{ prop: 'price', label: this.$t('orderAuthor.itemPricing'), type: 'number', required: false, disabled: true, min: 0, message: this.$t('global.yuan') },
|
{ prop: 'orderType', label: this.$t('orderAuthor.orderType'), type: 'select', required: false, disabled: this.isDisabled, options: this.OrderTypeList },
|
||||||
{ 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: '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: 'contractNo', label: this.$t('orderAuthor.contractNumber'), type: 'text',rightWidth: true, required: false, show: this.isShowContractNo },
|
{ prop: 'amount', label: this.totalTitle, type: 'number', required: false, show: true, min: 0 },
|
||||||
{ 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: '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: '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: 'monthAmount', label: this.monthsTitle, type: 'number', required: false, show: this.isShowMonths, min: 0, message: this.$t('global.month') },
|
{ prop: 'totalPrice', label: this.$t('orderAuthor.totalPrice'), type: 'number', required: false, show: this.isShowPrice, min: 0, message: '元' },
|
||||||
{ prop: 'totalPrice', label: this.$t('orderAuthor.totalPrice'), type: 'number', required: false, show: this.isShowPrice, min: 0, message: this.$t('global.yuan') },
|
{ prop: 'bizType', label: this.$t('orderAuthor.businessType'), type: 'select', required: false, disabled: true, options: this.BizTypeList },
|
||||||
{ 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: '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 }
|
||||||
{ prop: 'payStatus', label: this.$t('orderAuthor.paymentStatus'), type: 'select', required: false, disabled: this.payStatusDisabled, show: this.isShowPayStatus, options: this.PayStatusTypeList },
|
]
|
||||||
]
|
};
|
||||||
};
|
return form;
|
||||||
return form
|
},
|
||||||
},
|
|
||||||
|
|
||||||
rules() {
|
rules() {
|
||||||
const _this = this;
|
const _this = this;
|
||||||
let baseRules = {
|
const baseRules = {
|
||||||
organizationId: [
|
organizationId: [
|
||||||
{ required: true, message: this.$t('rules.organizationInput'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.organizationInput'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
// goodsId: [
|
goodsName: [
|
||||||
// { required: true, message: '请选择商品', trigger: 'change' }
|
{ required: true, message: this.$t('rules.productSelect'), trigger: 'change' }
|
||||||
// ],
|
],
|
||||||
goodsName: [
|
price: [
|
||||||
{ required: true, message: this.$t('rules.productSelect'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.itemPricingInput'), trigger: 'blur' }
|
||||||
],
|
],
|
||||||
price: [
|
orderType: [
|
||||||
{ required: true, message: this.$t('rules.itemPricingInput'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.orderTypeSelect'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
orderType: [
|
contractNo: [
|
||||||
{ required: true, message: this.$t('rules.orderTypeSelect'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.contractNumberInput'), trigger: 'blur' },
|
||||||
],
|
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
||||||
contractNo: [
|
],
|
||||||
{ required: true, message: this.$t('rules.contractNumberInput'), trigger: 'blur' },
|
sellerId: [
|
||||||
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
|
{ required: true, message: this.$t('rules.salesmanInput'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
sellerId: [
|
forever: [
|
||||||
{ required: true, message: this.$t('rules.salesmanInput'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.pleaseSelect'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
forever: [
|
amount: [
|
||||||
{ required: true, message: this.$t('rules.pleaseSelect'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.authorAmountInput'), trigger: 'change' },
|
||||||
],
|
{
|
||||||
amount: [
|
validator(rule, value, callback) {
|
||||||
{ required: true, message: this.$t('rules.authorAmountInput'), trigger: 'change' },
|
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
||||||
{
|
callback();
|
||||||
validator(rule, value, callback) {
|
} else {
|
||||||
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
callback(new Error(_this.$t('rules.authorAmountInputError')));
|
||||||
callback();
|
}
|
||||||
} else {
|
},
|
||||||
callback(new Error(_this.$t('rules.authorAmountInputError')));
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
trigger: 'blur',
|
totalPrice: [
|
||||||
}
|
{ required: true, message: this.$t('rules.totalPriceInput'), trigger: 'change' },
|
||||||
],
|
{
|
||||||
totalPrice: [
|
validator(rule, value, callback) {
|
||||||
{ required: true, message: this.$t('rules.totalPriceInput'), trigger: 'change' },
|
if (Number(value) >= 0) {
|
||||||
{
|
if (String(value).split('.')[1] && String(value).split('.')[1].length > 2) {
|
||||||
validator(rule, value, callback) {
|
callback(new Error(this.$t('rules.totalPriceInputError1')));
|
||||||
if (Number(value) >= 0) {
|
} else {
|
||||||
if (String(value).split('.')[1] && String(value).split('.')[1].length > 2) {
|
callback();
|
||||||
callback(new Error(this.$t('rules.totalPriceInputError1')));
|
}
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback(new Error(_this.$t('rules.totalPriceInputError2')));
|
||||||
}
|
}
|
||||||
} else {
|
},
|
||||||
callback(new Error(_this.$t('rules.totalPriceInputError2')));
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
trigger: 'blur',
|
monthAmount: [
|
||||||
}
|
{ required: true, message: this.$t('rules.monthAmountInput'), trigger: 'change' },
|
||||||
],
|
{
|
||||||
monthAmount: [
|
validator(rule, value, callback) {
|
||||||
{ required: true, message: this.$t('rules.monthAmountInput'), trigger: 'change' },
|
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
||||||
{
|
callback();
|
||||||
validator(rule, value, callback) {
|
} else {
|
||||||
if (Number.isInteger(Number(value)) && Number(value) > 0) {
|
callback(new Error(_this.$t('rules.monthAmountInputError')));
|
||||||
callback();
|
}
|
||||||
} else {
|
},
|
||||||
callback(new Error(_this.$t('rules.monthAmountInputError')));
|
trigger: 'blur'
|
||||||
}
|
}
|
||||||
},
|
],
|
||||||
trigger: 'blur',
|
startTime: [
|
||||||
}
|
{ required: true, message: this.$t('rules.startTimePick'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
startTime: [
|
bizType: [
|
||||||
{ required: true, message: this.$t('rules.startTimePick'), trigger: 'change' }
|
{ required: true, message: this.$t('rules.bizTypeSelect'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
bizType: [
|
payWays: [
|
||||||
{ required: true, message: this.$t('rules.bizTypeSelect'), trigger: 'change' }
|
{ required: true && this.isShowPayType, message: this.$t('rules.payWaysSelect'), trigger: 'change' }
|
||||||
],
|
],
|
||||||
payWays: [
|
payStatus: [
|
||||||
{ required: true && this.isShowPayType, message: this.$t('rules.payWaysSelect'), trigger: 'change' }
|
{ required: true && this.isShowPayStatus, message: this.$t('rules.payStatusSelect'), trigger: 'change' }
|
||||||
],
|
]
|
||||||
payStatus: [
|
};
|
||||||
{ required: true && this.isShowPayStatus, message: this.$t('rules.payStatusSelect'), trigger: 'change' }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
//清空表单验证提示信息
|
// 清空表单验证提示信息
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.dataform.clearValidate();
|
this.$refs.dataform.clearValidate();
|
||||||
});
|
});
|
||||||
|
|
||||||
return baseRules;
|
return baseRules;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initLoadPage();
|
this.initLoadPage();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
resizeHandler: function () {
|
resizeHandler: function () {
|
||||||
this.height = this._clientHeight - 170;
|
this.height = this._clientHeight - 170;
|
||||||
},
|
},
|
||||||
buttonClick() {
|
buttonClick() {
|
||||||
this.$refs.addGoods.doShow();
|
this.$refs.addGoods.doShow();
|
||||||
},
|
},
|
||||||
selectGoods(data) {
|
selectGoods(data) {
|
||||||
this.formModel.goodsId = data.id;
|
this.formModel.goodsId = data.id;
|
||||||
this.formModel.goodsName = data.name;
|
this.formModel.goodsName = data.name;
|
||||||
},
|
},
|
||||||
initLoadPage() {
|
initLoadPage() {
|
||||||
//加载字典数据
|
// 加载字典数据
|
||||||
//加载发布课程列表
|
// 加载发布课程列表
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.goodsList.length = 0;
|
this.goodsList.length = 0;
|
||||||
getGoodsList().then(response => {
|
getGoodsList().then(response => {
|
||||||
let data = response.data;
|
const data = response.data;
|
||||||
if (data && data.length) {
|
if (data && data.length) {
|
||||||
data.forEach(elem => {
|
data.forEach(elem => {
|
||||||
this.goodsList.push({ value: elem.id, label: elem.name, price: elem.price });
|
this.goodsList.push({ value: elem.id, label: elem.name, price: elem.price });
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//加载组织列表
|
// 加载组织列表
|
||||||
this.OrganizationList.length = 0;
|
this.OrganizationList.length = 0;
|
||||||
getOrganizationList().then(response => {
|
getOrganizationList().then(response => {
|
||||||
let data = response.data;
|
const data = response.data;
|
||||||
data.forEach(elem => {
|
data.forEach(elem => {
|
||||||
this.OrganizationList.push({ value: '' + elem.id, label: elem.name });
|
this.OrganizationList.push({ value: '' + elem.id, label: elem.name });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
getSellerList().then(response => {
|
getSellerList().then(response => {
|
||||||
let data = response.data;
|
const data = response.data;
|
||||||
data.forEach(elem => {
|
data.forEach(elem => {
|
||||||
this.SellerList.push({ value: '' + elem.id, label: elem.name });
|
this.SellerList.push({ value: '' + elem.id, label: elem.name });
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
this.$Dictionary.permissionType().then(list => {
|
this.$Dictionary.permissionType().then(list => {
|
||||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.orderType().then(list => {
|
this.$Dictionary.orderType().then(list => {
|
||||||
this.$convertList(list, this.OrderTypeList, elem => {
|
this.$convertList(list, this.OrderTypeList, elem => {
|
||||||
return elem.code !== '01' //过滤个人
|
return elem.code !== '01'; // 过滤个人
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.payStatus().then(list => {
|
this.$Dictionary.payStatus().then(list => {
|
||||||
this.$convertList(list, this.PayStatusTypeList, elem => {
|
this.$convertList(list, this.PayStatusTypeList, elem => {
|
||||||
return elem.code !== '03' //过滤取消状态
|
return elem.code !== '03'; // 过滤取消状态
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.payType().then(list => {
|
this.$Dictionary.payType().then(list => {
|
||||||
this.$convertList(list, this.PayTypeList, elem => {
|
this.$convertList(list, this.PayTypeList, elem => {
|
||||||
return true
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
this.$Dictionary.bizType().then(list => {
|
this.$Dictionary.bizType().then(list => {
|
||||||
this.$convertList(list, this.BizTypeList, elem => {
|
this.$convertList(list, this.BizTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//清空数据
|
// 清空数据
|
||||||
this.$refs.dataform.resetForm();
|
this.$refs.dataform.resetForm();
|
||||||
|
|
||||||
//添加模式
|
// 添加模式
|
||||||
this.type = String(this.$route.params.mode).toUpperCase();
|
this.type = String(this.$route.params.mode).toUpperCase();
|
||||||
if (this.type === 'ADD') {
|
if (this.type === 'ADD') {
|
||||||
this.formModel.bizType = '01'; //正常购买
|
this.formModel.bizType = '01'; // 正常购买
|
||||||
} else if (this.type === 'EDIT') {
|
} else if (this.type === 'EDIT') {
|
||||||
this.$alert(this.$t('global.toBeDeveloped'), this.$t('tip.hint'), {
|
this.$alert(this.$t('global.toBeDeveloped'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
callback: action => {
|
callback: action => {
|
||||||
this.turnback();
|
this.turnback();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (this.type === 'RENEW') {
|
} else if (this.type === 'RENEW') {
|
||||||
this.type = 'RENEW';
|
this.type = 'RENEW';
|
||||||
getOrderCharge(this.$route.params.orderId).then(response => {
|
getOrderCharge(this.$route.params.orderId).then(response => {
|
||||||
this.loadModelData(response.data, () => {
|
this.loadModelData(response.data, () => {
|
||||||
this.formModel.bizType = '02'; //续费类型
|
this.formModel.bizType = '02'; // 续费类型
|
||||||
this.formModel.totalPrice = 0;
|
this.formModel.totalPrice = 0;
|
||||||
this.formModel.amount = 0;
|
this.formModel.amount = 0;
|
||||||
this.formModel.monthAmount = 0;
|
this.formModel.monthAmount = 0;
|
||||||
this.formModel.contractNo = '';
|
this.formModel.contractNo = '';
|
||||||
});
|
});
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.loadingDataFailed'));
|
this.$messageBox(this.$t('error.loadingDataFailed'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//清空表单验证提示信息
|
// 清空表单验证提示信息
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.dataform.clearValidate();
|
this.$refs.dataform.clearValidate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadModelData(data, callback) {
|
loadModelData(data, callback) {
|
||||||
//获取返回值到model
|
// 获取返回值到model
|
||||||
for (let field in this.formModel) {
|
for (const field in this.formModel) {
|
||||||
if (data && data.hasOwnProperty(field)) {
|
if (data && data.hasOwnProperty(field)) {
|
||||||
this.formModel[field] = data[field];
|
this.formModel[field] = data[field];
|
||||||
if (field === 'forever') {
|
if (field === 'forever') {
|
||||||
this.foreverInitData = data[field]; //保存forever初始值
|
this.foreverInitData = data[field]; // 保存forever初始值
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (callback && (typeof callback === typeof function () { })) {
|
if (callback && (typeof callback === typeof function () { })) {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onChange(input) {
|
onChange(input) {
|
||||||
//判断输入的条目是否已存在List当中,如果存在则直接返回,不做处理
|
// 判断输入的条目是否已存在List当中,如果存在则直接返回,不做处理
|
||||||
let list = this.OrganizationList
|
const list = this.OrganizationList;
|
||||||
for (let i in list) {
|
for (const i in list) {
|
||||||
if (list[i].value === input) {
|
if (list[i].value === input) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
//如果需要添加的条目,不存在List当中,则需要提示是否添加条目,并且增加对应的处理
|
// 如果需要添加的条目,不存在List当中,则需要提示是否添加条目,并且增加对应的处理
|
||||||
this.$confirm(this.$t('tip.addOrganizationPrefix') + input + this.$t('tip.addOrganizationSuffix'), this.$t('tip.hint'), {
|
this.$confirm(this.$t('tip.addOrganizationPrefix') + input + this.$t('tip.addOrganizationSuffix'), this.$t('tip.hint'), {
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
cancelButtonText: this.$t('tip.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
addOrganization({ name: input }).then(response => {
|
addOrganization({ name: input }).then(response => {
|
||||||
this.OrgzList.push(response.data);
|
this.OrgzList.push(response.data);
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.$messageBox(this.$t('error.addingFailure'));
|
this.$messageBox(this.$t('error.addingFailure'));
|
||||||
})
|
});
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.formModel.organizationId = '';
|
this.formModel.organizationId = '';
|
||||||
this.$message.info(this.$t('error.cancelled'));
|
this.$message.info(this.$t('error.cancelled'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
selectCommodity(data) {
|
selectCommodity(data) {
|
||||||
this.goodsList.forEach(v => {
|
this.goodsList.forEach(v => {
|
||||||
if (v.value == data) {
|
if (v.value == data) {
|
||||||
this.formModel.price = v.price;
|
this.formModel.price = v.price;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
buildModel() {
|
buildModel() {
|
||||||
//如果新增的条目不存在字典当中,则需要在临时字典中取对应的值
|
// 如果新增的条目不存在字典当中,则需要在临时字典中取对应的值
|
||||||
let orgzId = this.formModel.organizationId;
|
let orgzId = this.formModel.organizationId;
|
||||||
if (this.OrgzList && this.OrgzList.length) {
|
if (this.OrgzList && this.OrgzList.length) {
|
||||||
for (var i in this.OrgzList) {
|
for (var i in this.OrgzList) {
|
||||||
if (orgzId === this.OrgzList[i].name) {
|
if (orgzId === this.OrgzList[i].name) {
|
||||||
orgzId = this.OrgzList[i].id;
|
orgzId = this.OrgzList[i].id;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//构造基础数据
|
// 构造基础数据
|
||||||
let model = {
|
const model = {
|
||||||
organizationId: orgzId,
|
organizationId: orgzId,
|
||||||
goodsId: this.formModel.goodsId,
|
goodsId: this.formModel.goodsId,
|
||||||
orderType: this.formModel.orderType,
|
orderType: this.formModel.orderType,
|
||||||
amount: this.formModel.amount,
|
amount: this.formModel.amount,
|
||||||
// permissionType: this.formModel.permissionType,
|
// permissionType: this.formModel.permissionType,
|
||||||
forever: this.formModel.forever,
|
forever: this.formModel.forever,
|
||||||
bizType: this.formModel.bizType,
|
bizType: this.formModel.bizType,
|
||||||
price: this.formModel.price,
|
price: this.formModel.price
|
||||||
// monthAmount: this.formModel.monthAmount,
|
// monthAmount: this.formModel.monthAmount,
|
||||||
// startTime: this.formModel.startTime,
|
// startTime: this.formModel.startTime,
|
||||||
// payWays: this.formModel.payWays,
|
// payWays: this.formModel.payWays,
|
||||||
}
|
};
|
||||||
|
|
||||||
//根据界面是否显示,序列对应的数据到model中
|
// 根据界面是否显示,序列对应的数据到model中
|
||||||
if (this.isShowContractNo) { model.contractNo = this.formModel.contractNo; }
|
if (this.isShowContractNo) { model.contractNo = this.formModel.contractNo; }
|
||||||
|
|
||||||
if (this.isShowStartDate) { model.startTime = this.formModel.startTime; }
|
if (this.isShowStartDate) { model.startTime = this.formModel.startTime; }
|
||||||
|
|
||||||
if (this.isShowMonths) { model.monthAmount = this.formModel.monthAmount; }
|
if (this.isShowMonths) { model.monthAmount = this.formModel.monthAmount; }
|
||||||
|
|
||||||
if (this.isShowPrice) { model.totalPrice = this.formModel.totalPrice; }
|
if (this.isShowPrice) { model.totalPrice = this.formModel.totalPrice; }
|
||||||
|
|
||||||
if (this.isShowPayType) { model.payWays = this.formModel.payWays; }
|
if (this.isShowPayType) { model.payWays = this.formModel.payWays; }
|
||||||
|
|
||||||
if (this.isShowPayStatus) { model.payStatus = this.formModel.payStatus; }
|
if (this.isShowPayStatus) { model.payStatus = this.formModel.payStatus; }
|
||||||
|
|
||||||
if (this.isShowSeller) { model.sellerId = this.formModel.sellerId; }
|
if (this.isShowSeller) { model.sellerId = this.formModel.sellerId; }
|
||||||
|
|
||||||
//如果是续费类型,则需要将权限ID一并返回回去
|
// 如果是续费类型,则需要将权限ID一并返回回去
|
||||||
if (this.isReNew) { model.permissionId = this.$route.params.orderId; }
|
if (this.isReNew) { model.permissionId = this.$route.params.orderId; }
|
||||||
|
|
||||||
return model;
|
return model;
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
createOrder(this.buildModel()).then(response => {
|
createOrder(this.buildModel()).then(response => {
|
||||||
this.turnback();
|
this.turnback();
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.success(this.$t('tip.creatingSuccessful'));
|
this.$message.success(this.$t('tip.creatingSuccessful'));
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox(this.$t('tip.creatingFailed'));
|
this.$messageBox(this.$t('tip.creatingFailed'));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
this.$refs.dataform.validateForm(() => {
|
this.$refs.dataform.validateForm(() => {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
updateOrder(this.buildModel()).then(response => {
|
updateOrder(this.buildModel()).then(response => {
|
||||||
this.turnback();
|
this.turnback();
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$message.success(this.$t('tip.updateSuccessfully'));
|
this.$message.success(this.$t('tip.updateSuccessfully'));
|
||||||
}).catch(error => {
|
}).catch(() => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
this.$messageBox(this.$t('tip.updateFailed'))
|
this.$messageBox(this.$t('tip.updateFailed'));
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
turnback() {
|
turnback() {
|
||||||
this.$router.go(-1)
|
this.$router.go(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
@ -534,7 +531,7 @@
|
|||||||
/deep/ {
|
/deep/ {
|
||||||
.el-select {
|
.el-select {
|
||||||
float: left;
|
float: left;
|
||||||
width: calc(600px);
|
width: calc(500px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-input-number {
|
.el-input-number {
|
||||||
|
@ -1,312 +1,310 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</QueryListPage>
|
<can-distribute ref="canDistribute" @distribute="distribute" />
|
||||||
<can-distribute ref="canDistribute" @distribute="distribute"></can-distribute>
|
<qr-code ref="qrCode" />
|
||||||
<qr-code ref="qrCode"></qr-code>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getOrderPageList, giveOrder } from '@/api/management/order';
|
import { getOrderPageList } from '@/api/management/order';
|
||||||
import { getSellerList } from '@/api/management/user';
|
import { getSellerList } from '@/api/management/user';
|
||||||
import { getOrganizationList } from '@/api/management/organization';
|
import { getOrganizationList } from '@/api/management/organization';
|
||||||
import { giveLessons } from '@/api/management/distribute';
|
import { giveLessons } from '@/api/management/distribute';
|
||||||
import { OperatorModel } from '@/scripts/ConstDic';
|
import { OperatorModel } from '@/scripts/ConstDic';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import QrCode from '@/components/QrCode';
|
import QrCode from '@/components/QrCode';
|
||||||
import CanDistribute from './canDistribute';
|
import CanDistribute from './canDistribute';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'List',
|
name: 'List',
|
||||||
components: {
|
components: {
|
||||||
QrCode,
|
QrCode,
|
||||||
CanDistribute
|
CanDistribute
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
SellerList: [],
|
SellerList: [],
|
||||||
BizTypeList: [],
|
BizTypeList: [],
|
||||||
OrderTypeList: [],
|
OrderTypeList: [],
|
||||||
PayTypeList: [],
|
PayTypeList: [],
|
||||||
PayStatusList: [],
|
PayStatusList: [],
|
||||||
// OrganizationList: [],
|
// OrganizationList: [],
|
||||||
WhetherTypeList: [],
|
WhetherTypeList: [],
|
||||||
EffectiveTypeList: [],
|
EffectiveTypeList: [],
|
||||||
PermissionTypeList: [],
|
PermissionTypeList: [],
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '180px',
|
labelWidth: '180px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
'organizationId': {
|
'organizationId': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.organizationOrEnterprise'),
|
label: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'userName': {
|
'userName': {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('orderAuthor.userName'),
|
label: this.$t('orderAuthor.userName')
|
||||||
},
|
},
|
||||||
'permissionType': {
|
'permissionType': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.permissionType'),
|
label: this.$t('orderAuthor.permissionType'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||||
prop: 'organizationName',
|
prop: 'organizationName',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return row.organizationName },
|
columnValue: (row) => { return row.organizationName; },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.userName'),
|
title: this.$t('orderAuthor.userName'),
|
||||||
prop: 'userName'
|
prop: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.commodityName'),
|
title: this.$t('orderAuthor.commodityName'),
|
||||||
prop: 'goodsName',
|
prop: 'goodsName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permissionType'),
|
title: this.$t('orderAuthor.permissionType'),
|
||||||
prop: 'permissionType',
|
prop: 'permissionType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permissionNumber'),
|
title: this.$t('orderAuthor.permissionNumber'),
|
||||||
prop: 'amount'
|
prop: 'amount'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||||
prop: 'forever',
|
prop: 'forever',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
return row.forever ? 'success' : 'danger';
|
return row.forever ? 'success' : 'danger';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.startDate'),
|
title: this.$t('orderAuthor.startDate'),
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
format: 'yyyy-MM-dd'
|
format: 'yyyy-MM-dd'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.purchaseMonths'),
|
title: this.$t('orderAuthor.purchaseMonths'),
|
||||||
prop: 'monthAmount'
|
prop: 'monthAmount'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.totalPrice'),
|
title: this.$t('orderAuthor.totalPrice'),
|
||||||
prop: 'totalPrice'
|
prop: 'totalPrice'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.paymentMethod'),
|
title: this.$t('orderAuthor.paymentMethod'),
|
||||||
prop: 'payWays',
|
prop: 'payWays',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.payWays, this.PayTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.payWays, this.PayTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.creationDate'),
|
title: this.$t('orderAuthor.creationDate'),
|
||||||
prop: 'createTime'
|
prop: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.orderType'),
|
title: this.$t('orderAuthor.orderType'),
|
||||||
prop: 'orderType',
|
prop: 'orderType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.orderType, this.OrderTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.orderType, this.OrderTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.contractNumber'),
|
title: this.$t('orderAuthor.contractNumber'),
|
||||||
prop: 'contractNo'
|
prop: 'contractNo'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.businessType'),
|
title: this.$t('orderAuthor.businessType'),
|
||||||
prop: 'bizType',
|
prop: 'bizType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.bizType, this.BizTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.bizType, this.BizTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.paymentStatus'),
|
title: this.$t('orderAuthor.paymentStatus'),
|
||||||
prop: 'payStatus',
|
prop: 'payStatus',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.payStatus, this.PayStatusList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.payStatus, this.PayStatusList, ['value', 'label']); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.payStatus) {
|
switch (row.payStatus) {
|
||||||
case '01': return 'danger';
|
case '01': return 'danger';
|
||||||
case '02': return 'success';
|
case '02': return 'success';
|
||||||
case '03': return 'info';
|
case '03': return 'info';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.salesman'),
|
title: this.$t('orderAuthor.salesman'),
|
||||||
prop: 'sellerName',
|
prop: 'sellerName',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return row.sellerName },
|
columnValue: (row) => { return row.sellerName; },
|
||||||
tagType: (row) => { return 'success' }
|
tagType: (row) => { return 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '260',
|
width: '260',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('global.edit'),
|
name: this.$t('global.edit'),
|
||||||
handleClick: this.handleEdit
|
handleClick: this.handleEdit
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.obtainQrCode'),
|
name: this.$t('orderAuthor.obtainQrCode'),
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
handleClick: this.handleCanDistribute,
|
handleClick: this.handleCanDistribute,
|
||||||
showControl: (row) => { return row.bizType !== '02' && row.orderType !== '01' && row.qrCodeGenerated }
|
showControl: (row) => { return row.bizType !== '02' && row.orderType !== '01' && row.qrCodeGenerated; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.generatingQRCode'),
|
name: this.$t('orderAuthor.generatingQRCode'),
|
||||||
type: "warning",
|
type: 'warning',
|
||||||
handleClick: this.handleCanDistribute,
|
handleClick: this.handleCanDistribute,
|
||||||
showControl: (row) => { return row.bizType !== '02' && row.orderType !== '01' && !row.qrCodeGenerated }
|
showControl: (row) => { return row.bizType !== '02' && row.orderType !== '01' && !row.qrCodeGenerated; }
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleNormalAdd },
|
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleNormalAdd }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.queryForm.queryObject.organizationId.config.data.length = 0;
|
this.queryForm.queryObject.organizationId.config.data.length = 0;
|
||||||
getOrganizationList().then(response => {
|
getOrganizationList().then(response => {
|
||||||
// this.OrganizationList = response.data;
|
// this.OrganizationList = response.data;
|
||||||
response.data.forEach(elem => {
|
response.data.forEach(elem => {
|
||||||
this.queryForm.queryObject.organizationId.config.data.push({ value: elem.id, label: elem.name });
|
this.queryForm.queryObject.organizationId.config.data.push({ value: elem.id, label: elem.name });
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
getSellerList().then(response => {
|
getSellerList().then(response => {
|
||||||
this.SellerList = response.data;
|
this.SellerList = response.data;
|
||||||
})
|
});
|
||||||
|
|
||||||
this.$Dictionary.bizType().then(list => {
|
this.$Dictionary.bizType().then(list => {
|
||||||
this.$convertList(list, this.BizTypeList, elem => {
|
this.$convertList(list, this.BizTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
|
this.$Dictionary.orderType().then(list => {
|
||||||
|
this.$convertList(list, this.OrderTypeList, elem => {
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
this.$Dictionary.orderType().then(list => {
|
this.$Dictionary.payType().then(list => {
|
||||||
this.$convertList(list, this.OrderTypeList, elem => {
|
this.$convertList(list, this.PayTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
this.$Dictionary.payType().then(list => {
|
this.$Dictionary.payStatus().then(list => {
|
||||||
this.$convertList(list, this.PayTypeList, elem => {
|
this.$convertList(list, this.PayStatusList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
this.$Dictionary.payStatus().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.$convertList(list, this.PayStatusList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
})
|
});
|
||||||
|
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.permissionType().then(list => {
|
||||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
list.forEach(elem => {
|
||||||
return true;
|
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
})
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
queryFunction(params) {
|
||||||
|
return getOrderPageList(params);
|
||||||
|
},
|
||||||
|
handleNormalAdd() {
|
||||||
|
this.$router.push({ path: `${UrlConfig.orderauthor.orderDraft}/add/0` });
|
||||||
|
},
|
||||||
|
handleEdit(index, data) {
|
||||||
|
this.$alert('功能待开发', this.$t('tip.hint'), {
|
||||||
|
confirmButtonText: this.$t('tip.confirm'),
|
||||||
|
callback: action => {
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCanDistribute(index, data) {
|
||||||
|
if (data.qrCodeGenerated) {
|
||||||
|
data.canDistribute = true;
|
||||||
|
this.distribute(data);
|
||||||
|
} else {
|
||||||
|
this.$refs.canDistribute.doShow(data);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
distribute(data) {
|
||||||
|
const model = {
|
||||||
|
amount: data.amount,
|
||||||
|
forever: data.forever,
|
||||||
|
orderCode: data.code,
|
||||||
|
startTime: data.startTime + ' 00:00:00',
|
||||||
|
monthAmount: data.monthAmount,
|
||||||
|
canDistribute: data.canDistribute,
|
||||||
|
operator: OperatorModel.TRANSFER,
|
||||||
|
mapId: data.mapId,
|
||||||
|
lessonId: data.lessonId || '',
|
||||||
|
mapProductCode: data.mapProductCode || '',
|
||||||
|
permissionType: data.permissionType,
|
||||||
|
organizationId: data.organizationId
|
||||||
|
};
|
||||||
|
|
||||||
this.$Dictionary.permissionType().then(list => {
|
giveLessons(model).then(response => {
|
||||||
list.forEach(elem => {
|
this.reloadTable();
|
||||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
if (data.qrCodeGenerated) {
|
||||||
});
|
this.$refs.qrCode.doShow({
|
||||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
url: response.data,
|
||||||
return true;
|
title: this.$t('orderAuthor.transferQRCode')
|
||||||
});
|
});
|
||||||
})
|
}
|
||||||
},
|
|
||||||
queryFunction(params) {
|
|
||||||
return getOrderPageList(params);
|
|
||||||
},
|
|
||||||
handleNormalAdd() {
|
|
||||||
this.$router.push({ path: `${UrlConfig.orderauthor.orderDraft}/add/0` })
|
|
||||||
},
|
|
||||||
handleEdit(index, data) {
|
|
||||||
this.$alert('功能待开发', this.$t('tip.hint'), {
|
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
|
||||||
callback: action => {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
handleCanDistribute(index, data) {
|
|
||||||
if (data.qrCodeGenerated) {
|
|
||||||
data.canDistribute = true;
|
|
||||||
this.distribute(data);
|
|
||||||
} else {
|
|
||||||
this.$refs.canDistribute.doShow(data);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
distribute(data) {
|
|
||||||
let model = {
|
|
||||||
amount: data.amount,
|
|
||||||
forever: data.forever,
|
|
||||||
orderCode: data.code,
|
|
||||||
startTime: data.startTime + " 00:00:00",
|
|
||||||
monthAmount: data.monthAmount,
|
|
||||||
canDistribute: data.canDistribute,
|
|
||||||
operator: OperatorModel.TRANSFER,
|
|
||||||
mapId: data.mapId,
|
|
||||||
lessonId: data.lessonId || '',
|
|
||||||
mapProductCode: data.mapProductCode || '',
|
|
||||||
permissionType: data.permissionType,
|
|
||||||
organizationId: data.organizationId
|
|
||||||
}
|
|
||||||
|
|
||||||
giveLessons(model).then(response => {
|
}).catch(() => {
|
||||||
this.reloadTable();
|
this.$messageBox(this.$t('error.transferredQRCodeFailed'));
|
||||||
if (data.qrCodeGenerated) {
|
});
|
||||||
this.$refs.qrCode.doShow({
|
},
|
||||||
url: response.data,
|
reloadTable() {
|
||||||
title: this.$t('orderAuthor.transferQRCode')
|
if (this.queryList && this.queryList.reload) {
|
||||||
});
|
this.queryList.reload();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}).catch(error => {
|
}
|
||||||
this.$messageBox(this.$t('error.transferredQRCodeFailed'));
|
};
|
||||||
});
|
|
||||||
},
|
|
||||||
reloadTable() {
|
|
||||||
if (this.queryList && this.queryList.reload) {
|
|
||||||
this.queryList.reload()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,174 +1,169 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</QueryListPage>
|
<div class="draft">
|
||||||
<div class="draft">
|
<el-button-group>
|
||||||
<el-button-group>
|
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
|
||||||
<el-button type="primary" @click="turnback">{{$t('global.return')}}</el-button>
|
</el-button-group>
|
||||||
</el-button-group>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { superAdmin } from '@/router';
|
import { getPermissionPackageDetail } from '@/api/management/distribute';
|
||||||
import { listPackagePermission, restorePackagePermission, getPermissionPackageDetail } from '@/api/management/distribute';
|
|
||||||
import { UrlConfig } from '@/router/index';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TrainsferDetail',
|
name: 'TrainsferDetail',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
show: false,
|
show: false,
|
||||||
height: 0,
|
height: 0,
|
||||||
WhetherTypeList: [],
|
WhetherTypeList: [],
|
||||||
EffectiveTypeList: [],
|
EffectiveTypeList: [],
|
||||||
PermissionTypeList: [],
|
PermissionTypeList: [],
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
'permissionType': {
|
'permissionType': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.permissionType'),
|
label: this.$t('orderAuthor.permissionType'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||||
prop: 'organizationName'
|
prop: 'organizationName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.userName'),
|
title: this.$t('orderAuthor.userName'),
|
||||||
prop: 'userName'
|
prop: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.userMobile'),
|
title: this.$t('orderAuthor.userMobile'),
|
||||||
prop: 'userMobile'
|
prop: 'userMobile'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.mapName'),
|
title: this.$t('orderAuthor.mapName'),
|
||||||
prop: 'mapName',
|
prop: 'mapName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.mapProductName'),
|
title: this.$t('orderAuthor.mapProductName'),
|
||||||
prop: 'mapProductName',
|
prop: 'mapProductName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.courseName'),
|
title: this.$t('orderAuthor.courseName'),
|
||||||
prop: 'lessonName',
|
prop: 'lessonName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permissionType'),
|
title: this.$t('orderAuthor.permissionType'),
|
||||||
prop: 'permissionType',
|
prop: 'permissionType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||||
prop: 'canDistribute',
|
prop: 'canDistribute',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.canDistribute) {
|
switch (row.canDistribute) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
case false: return 'danger';
|
case false: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||||
prop: 'forever',
|
prop: 'forever',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.forever) {
|
switch (row.forever) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
case false: return 'danger';
|
case false: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.startTime'),
|
title: this.$t('orderAuthor.startTime'),
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
formatter: this.formatterDate
|
formatter: this.formatterDate
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.endTime'),
|
title: this.$t('orderAuthor.endTime'),
|
||||||
prop: 'endTime',
|
prop: 'endTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
formatter: this.formatterDate
|
formatter: this.formatterDate
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
default: return 'danger';
|
default: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.$Dictionary.permissionType().then(list => {
|
this.$Dictionary.permissionType().then(list => {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
formatterDate(row, porpInfo) {
|
formatterDate(row, porpInfo) {
|
||||||
if (row.hasOwnProperty(porpInfo.property)) {
|
return row[porpInfo.property];
|
||||||
}
|
},
|
||||||
return row[porpInfo.property];
|
queryFunction(params) {
|
||||||
},
|
// if (params.permissionType) {
|
||||||
queryFunction(params) {
|
return getPermissionPackageDetail(this.$route.params.permissionId, params);
|
||||||
// if (params.permissionType) {
|
// }
|
||||||
return getPermissionPackageDetail(this.$route.params.permissionId, params)
|
},
|
||||||
// }
|
reloadTable() {
|
||||||
},
|
if (this.queryList && this.queryList.reload) {
|
||||||
reloadTable() {
|
this.queryList.reload();
|
||||||
if (this.queryList && this.queryList.reload) {
|
}
|
||||||
this.queryList.reload()
|
},
|
||||||
}
|
turnback() {
|
||||||
},
|
this.$router.go(-1);
|
||||||
turnback() {
|
}
|
||||||
this.$router.go(-1)
|
}
|
||||||
}
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
.draft {
|
.draft {
|
||||||
|
@ -1,208 +1,221 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog :title="title" :visible.sync="show" top="20px" width="90%" :before-close="doClose"
|
<el-dialog
|
||||||
:close-on-click-modal="false">
|
:title="title"
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
:visible.sync="show"
|
||||||
</QueryListPage>
|
top="20px"
|
||||||
</el-dialog>
|
width="90%"
|
||||||
|
:before-close="doClose"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
>
|
||||||
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listCanPackagePermission } from '@/api/management/distribute';
|
import { listCanPackagePermission } from '@/api/management/distribute';
|
||||||
import { UrlConfig } from '@/router/index';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'author',
|
name: 'Author',
|
||||||
props: {
|
props: {
|
||||||
ruleList: {
|
ruleList: {
|
||||||
type: Array
|
type: Array,
|
||||||
},
|
default() {
|
||||||
EffectiveTypeList: {
|
return [];
|
||||||
type: Array,
|
}
|
||||||
},
|
},
|
||||||
PermissionTypeList: {
|
effectiveTypeList: {
|
||||||
type: Array
|
type: Array,
|
||||||
},
|
default() {
|
||||||
},
|
return [];
|
||||||
data() {
|
}
|
||||||
return {
|
},
|
||||||
show: false,
|
permissionTypeList: {
|
||||||
param: '',
|
type: Array,
|
||||||
pagerConfig: {
|
default() {
|
||||||
pageSize: 'pageSize',
|
return [];
|
||||||
pageIndex: 'pageNum'
|
}
|
||||||
},
|
}
|
||||||
queryForm: {
|
},
|
||||||
labelWidth: '100px',
|
data() {
|
||||||
reset: true,
|
return {
|
||||||
queryObject: {
|
show: false,
|
||||||
'permissionType': {
|
param: '',
|
||||||
type: 'select',
|
pagerConfig: {
|
||||||
label: this.$t('orderAuthor.permissionType'),
|
pageSize: 'pageSize',
|
||||||
config: {
|
pageIndex: 'pageNum'
|
||||||
data: []
|
},
|
||||||
}
|
queryForm: {
|
||||||
},
|
labelWidth: '100px',
|
||||||
'canDistribute': {
|
reset: true,
|
||||||
type: 'select',
|
queryObject: {
|
||||||
label: this.$t('orderAuthor.publicOrPrivate'),
|
'permissionType': {
|
||||||
config: {
|
type: 'select',
|
||||||
data: []
|
label: this.$t('orderAuthor.permissionType'),
|
||||||
}
|
config: {
|
||||||
}
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
'canDistribute': {
|
||||||
query: this.queryFunction,
|
type: 'select',
|
||||||
selectCheckShow: false,
|
label: this.$t('orderAuthor.publicOrPrivate'),
|
||||||
indexShow: true,
|
config: {
|
||||||
columns: [
|
data: []
|
||||||
{
|
}
|
||||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
}
|
||||||
prop: 'organizationName'
|
}
|
||||||
},
|
},
|
||||||
{
|
queryList: {
|
||||||
title: this.$t('orderAuthor.userName'),
|
query: this.queryFunction,
|
||||||
prop: 'userName'
|
selectCheckShow: false,
|
||||||
},
|
indexShow: true,
|
||||||
{
|
columns: [
|
||||||
title: this.$t('orderAuthor.userMobile'),
|
{
|
||||||
prop: 'userMobile'
|
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||||
},
|
prop: 'organizationName'
|
||||||
{
|
},
|
||||||
title: this.$t('orderAuthor.mapName'),
|
{
|
||||||
prop: 'mapName',
|
title: this.$t('orderAuthor.userName'),
|
||||||
},
|
prop: 'userName'
|
||||||
{
|
},
|
||||||
title: this.$t('orderAuthor.mapProductName'),
|
{
|
||||||
prop: 'mapProductName',
|
title: this.$t('orderAuthor.userMobile'),
|
||||||
},
|
prop: 'userMobile'
|
||||||
{
|
},
|
||||||
title: this.$t('orderAuthor.courseName'),
|
{
|
||||||
prop: 'lessonName',
|
title: this.$t('orderAuthor.mapName'),
|
||||||
},
|
prop: 'mapName'
|
||||||
{
|
},
|
||||||
title: this.$t('orderAuthor.permissionType'),
|
{
|
||||||
prop: 'permissionType',
|
title: this.$t('orderAuthor.mapProductName'),
|
||||||
type: 'tag',
|
prop: 'mapProductName'
|
||||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
},
|
||||||
tagType: (row) => { return '' }
|
{
|
||||||
},
|
title: this.$t('orderAuthor.courseName'),
|
||||||
{
|
prop: 'lessonName'
|
||||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
},
|
||||||
prop: 'canDistribute',
|
{
|
||||||
type: 'tag',
|
title: this.$t('orderAuthor.permissionType'),
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
prop: 'permissionType',
|
||||||
tagType: (row) => {
|
type: 'tag',
|
||||||
switch (row.canDistribute) {
|
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||||
case true: return 'success';
|
tagType: (row) => { return ''; }
|
||||||
case false: return 'danger';
|
},
|
||||||
}
|
{
|
||||||
}
|
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||||
},
|
prop: 'canDistribute',
|
||||||
{
|
type: 'tag',
|
||||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||||
prop: 'forever',
|
tagType: (row) => {
|
||||||
type: 'tag',
|
switch (row.canDistribute) {
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
case true: return 'success';
|
||||||
tagType: (row) => {
|
case false: return 'danger';
|
||||||
switch (row.forever) {
|
}
|
||||||
case true: return 'success';
|
}
|
||||||
case false: return 'danger';
|
},
|
||||||
}
|
{
|
||||||
}
|
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||||
},
|
prop: 'forever',
|
||||||
// {
|
type: 'tag',
|
||||||
// title: '权限总数',
|
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||||
// prop: 'amount'
|
tagType: (row) => {
|
||||||
// },
|
switch (row.forever) {
|
||||||
// {
|
case true: return 'success';
|
||||||
// title: '剩余权限数量',
|
case false: return 'danger';
|
||||||
// prop: 'remains'
|
}
|
||||||
// },
|
}
|
||||||
{
|
},
|
||||||
title: this.$t('orderAuthor.startTime'),
|
// {
|
||||||
prop: 'startTime',
|
// title: '权限总数',
|
||||||
type: 'formatter',
|
// prop: 'amount'
|
||||||
formatter: this.formatterDate
|
// },
|
||||||
|
// {
|
||||||
|
// title: '剩余权限数量',
|
||||||
|
// prop: 'remains'
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: this.$t('orderAuthor.startTime'),
|
||||||
|
prop: 'startTime',
|
||||||
|
type: 'formatter',
|
||||||
|
formatter: this.formatterDate
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.endTime'),
|
title: this.$t('orderAuthor.endTime'),
|
||||||
prop: 'endTime',
|
prop: 'endTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
formatter: this.formatterDate
|
formatter: this.formatterDate
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '120',
|
width: '120',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('global.add'),
|
name: this.$t('global.add'),
|
||||||
handleClick: this.handlePut,
|
handleClick: this.handlePut,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return !row.isPut && row.permissionType }
|
showControl: (row) => { return !row.isPut && row.permissionType; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('global.delete'),
|
name: this.$t('global.delete'),
|
||||||
handleClick: this.handlePop,
|
handleClick: this.handlePop,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
showControl: (row) => { return row.isPut && row.permissionType }
|
showControl: (row) => { return row.isPut && row.permissionType; }
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
computed: {
|
||||||
PermissionTypeList: function (list) {
|
title() {
|
||||||
if (list && list.length) {
|
return this.$t('orderAuthor.editPermissionRules');
|
||||||
this.queryForm.queryObject.permissionType.config.data = list;
|
}
|
||||||
}
|
},
|
||||||
}
|
watch: {
|
||||||
},
|
PermissionTypeList: function (list) {
|
||||||
computed: {
|
if (list && list.length) {
|
||||||
title() {
|
this.queryForm.queryObject.permissionType.config.data = list;
|
||||||
return this.$t('orderAuthor.editPermissionRules');
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
formatterDate(row, porpInfo) {
|
formatterDate(row, porpInfo) {
|
||||||
return String(row[porpInfo.property] || '').split(' ')[0];
|
return String(row[porpInfo.property] || '').split(' ')[0];
|
||||||
},
|
},
|
||||||
async queryFunction(params) {
|
async queryFunction(params) {
|
||||||
let resp = await listCanPackagePermission(params);
|
const resp = await listCanPackagePermission(params);
|
||||||
this.ruleList.forEach(elem => {
|
this.ruleList.forEach(elem => {
|
||||||
resp.data.list.forEach(item => {
|
resp.data.list.forEach(item => {
|
||||||
if (item.id == elem.id) {
|
if (item.id == elem.id) {
|
||||||
item.isPut = true;
|
item.isPut = true;
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return resp;
|
return resp;
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
if (this.queryList && this.queryList.reload) {
|
if (this.queryList && this.queryList.reload) {
|
||||||
this.queryList.reload()
|
this.queryList.reload();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
doShow() {
|
doShow() {
|
||||||
this.show = true
|
this.show = true;
|
||||||
},
|
},
|
||||||
doClose() {
|
doClose() {
|
||||||
this.show = false;
|
this.show = false;
|
||||||
},
|
},
|
||||||
handlePut(index, row) {
|
handlePut(index, row) {
|
||||||
this.$emit('addRuleForm', index, row);
|
this.$emit('addRuleForm', index, row);
|
||||||
},
|
},
|
||||||
handlePop(index, row) {
|
handlePop(index, row) {
|
||||||
this.$emit('deleteForm', index, row);
|
this.$emit('deleteForm', index, row);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<el-step icon="el-icon-setting" />
|
<el-step icon="el-icon-setting" />
|
||||||
</el-steps>
|
</el-steps>
|
||||||
<el-card class="forms pack-rule">
|
<el-card class="forms pack-rule">
|
||||||
<el-button class="addList" size="small" @click="dialogSelect">{{$t('orderAuthor.addRecords')}}</el-button>
|
<el-button class="addList" size="small" @click="dialogSelect">{{ $t('orderAuthor.addRecords') }}</el-button>
|
||||||
<el-table
|
<el-table
|
||||||
:data="ruleList"
|
:data="ruleList"
|
||||||
border
|
border
|
||||||
@ -28,7 +28,7 @@
|
|||||||
<el-table-column prop="remains" :label="this.$t('orderAuthor.residualPermissionNumber')" width="80" />
|
<el-table-column prop="remains" :label="this.$t('orderAuthor.residualPermissionNumber')" width="80" />
|
||||||
<el-table-column :label="this.$t('global.operate')" width="60">
|
<el-table-column :label="this.$t('global.operate')" width="60">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="deleteForm(scope.$index, scope.row)">{{$t('global.delete')}}
|
<el-button type="text" size="small" @click="deleteForm(scope.$index, scope.row)">{{ $t('global.delete') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -36,9 +36,9 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
<div class="draft">
|
<div class="draft">
|
||||||
<el-button-group>
|
<el-button-group>
|
||||||
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{$t('orderAuthor.packaging')}}</el-button>
|
<el-button v-if="!urlInfo.url" type="primary" @click="packForm">{{ $t('orderAuthor.packaging') }}</el-button>
|
||||||
<el-button v-if="urlInfo.url" type="primary" @click="QrCodeShow">{{$t('orderAuthor.obtainQrCode')}}</el-button>
|
<el-button v-if="urlInfo.url" type="primary" @click="QrCodeShow">{{ $t('orderAuthor.obtainQrCode') }}</el-button>
|
||||||
<el-button type="primary" @click="turnback">{{$t('global.return')}}</el-button>
|
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
|
||||||
</el-button-group>
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<choose-permission
|
<choose-permission
|
||||||
|
@ -1,264 +1,261 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList">
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</QueryListPage>
|
<qr-code ref="qrCode" />
|
||||||
<qr-code ref="qrCode"></qr-code>
|
</div>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { superAdmin } from '@/router';
|
import { superAdmin } from '@/router';
|
||||||
import { listPackagePermission, restorePackagePermission, getPackageQrCode, permissionDistributeUnPackage } from '@/api/management/distribute';
|
import { listPackagePermission, restorePackagePermission, getPackageQrCode, permissionDistributeUnPackage } from '@/api/management/distribute';
|
||||||
import { UrlConfig } from '@/router/index';
|
import { UrlConfig } from '@/router/index';
|
||||||
import QrCode from "@/components/QrCode";
|
import QrCode from '@/components/QrCode';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'author',
|
name: 'Author',
|
||||||
components: {
|
components: {
|
||||||
QrCode
|
QrCode
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
EffectiveTypeList: [],
|
EffectiveTypeList: [],
|
||||||
PermissionTypeList: [],
|
PermissionTypeList: [],
|
||||||
pagerConfig: {
|
pagerConfig: {
|
||||||
pageSize: 'pageSize',
|
pageSize: 'pageSize',
|
||||||
pageIndex: 'pageNum'
|
pageIndex: 'pageNum'
|
||||||
},
|
},
|
||||||
queryForm: {
|
queryForm: {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
reset: true,
|
reset: true,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
'userMobile': {
|
'userMobile': {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('orderAuthor.founderPhone')
|
label: this.$t('orderAuthor.founderPhone')
|
||||||
},
|
},
|
||||||
'userName': {
|
'userName': {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
label: this.$t('orderAuthor.founder')
|
label: this.$t('orderAuthor.founder')
|
||||||
},
|
},
|
||||||
'permissionType': {
|
'permissionType': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.permissionType'),
|
label: this.$t('orderAuthor.permissionType'),
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'status': {
|
'status': {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: this.$t('orderAuthor.authorityStatus'),
|
label: this.$t('orderAuthor.authorityStatus'),
|
||||||
value: '1',
|
value: '1',
|
||||||
config: {
|
config: {
|
||||||
data: []
|
data: []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
queryList: {
|
queryList: {
|
||||||
query: this.queryFunction,
|
query: this.queryFunction,
|
||||||
selectCheckShow: false,
|
selectCheckShow: false,
|
||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||||
prop: 'organizationName'
|
prop: 'organizationName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.founder'),
|
title: this.$t('orderAuthor.founder'),
|
||||||
prop: 'userName'
|
prop: 'userName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.founderPhone'),
|
title: this.$t('orderAuthor.founderPhone'),
|
||||||
prop: 'userMobile'
|
prop: 'userMobile'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.mapName'),
|
title: this.$t('orderAuthor.mapName'),
|
||||||
prop: 'mapName',
|
prop: 'mapName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.mapProductName'),
|
title: this.$t('orderAuthor.mapProductName'),
|
||||||
prop: 'mapProductName',
|
prop: 'mapProductName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.courseName'),
|
title: this.$t('orderAuthor.courseName'),
|
||||||
prop: 'lessonName',
|
prop: 'lessonName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permissionType'),
|
title: this.$t('orderAuthor.permissionType'),
|
||||||
prop: 'permissionType',
|
prop: 'permissionType',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => { return '' }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.publicOrPrivate'),
|
title: this.$t('orderAuthor.publicOrPrivate'),
|
||||||
prop: 'canDistribute',
|
prop: 'canDistribute',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.canDistribute) {
|
switch (row.canDistribute) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
case false: return 'danger';
|
case false: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||||
prop: 'forever',
|
prop: 'forever',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether') },
|
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.forever) {
|
switch (row.forever) {
|
||||||
case true: return 'success';
|
case true: return 'success';
|
||||||
case false: return 'danger';
|
case false: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.startTime'),
|
title: this.$t('orderAuthor.startTime'),
|
||||||
prop: 'startTime',
|
prop: 'startTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
formatter: this.formatterDate
|
formatter: this.formatterDate
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.endTime'),
|
title: this.$t('orderAuthor.endTime'),
|
||||||
prop: 'endTime',
|
prop: 'endTime',
|
||||||
type: 'formatter',
|
type: 'formatter',
|
||||||
formatter: this.formatterDate
|
formatter: this.formatterDate
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$t('orderAuthor.authorityStatus'),
|
title: this.$t('orderAuthor.authorityStatus'),
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
type: 'tag',
|
type: 'tag',
|
||||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']) },
|
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||||
tagType: (row) => {
|
tagType: (row) => {
|
||||||
switch (row.status) {
|
switch (row.status) {
|
||||||
case '1': return 'success';
|
case '1': return 'success';
|
||||||
default: return 'danger';
|
default: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
title: this.$t('global.operate'),
|
title: this.$t('global.operate'),
|
||||||
width: '300',
|
width: this.$i18n.locale == 'en' ? '370': '300',
|
||||||
hide: (row) => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
|
hide: (row) => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.obtainQrCode'),
|
name: this.$t('orderAuthor.obtainQrCode'),
|
||||||
handleClick: this.handleRtCodeShow,
|
handleClick: this.handleRtCodeShow,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return true }
|
showControl: (row) => { return true; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.authorityDetails'),
|
name: this.$t('orderAuthor.authorityDetails'),
|
||||||
handleClick: this.handlePermissionDetail,
|
handleClick: this.handlePermissionDetail,
|
||||||
type: '',
|
type: '',
|
||||||
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04') }
|
showControl: (row) => { return row.status == '1' && (row.source == '02' || row.source == '04'); }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.recovery'),
|
name: this.$t('orderAuthor.recovery'),
|
||||||
handleClick: this.handleRestore,
|
handleClick: this.handleRestore,
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
showControl: (row) => { return row.status == '1' && row.source == '04' }
|
showControl: (row) => { return row.status == '1' && row.source == '04'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: this.$t('orderAuthor.unpacking'),
|
name: this.$t('orderAuthor.unpacking'),
|
||||||
handleClick: this.handleUnPackage,
|
handleClick: this.handleUnPackage,
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
showControl: (row) => { return row.status == '1' && row.source == '02' }
|
showControl: (row) => { return row.status == '1' && row.source == '02'; }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
actions: [
|
actions: [
|
||||||
{ text: this.$t('orderAuthor.privilegePackaging'), btnCode: 'employee_insert', handler: this.handlePackage },
|
{ text: this.$t('orderAuthor.privilegePackaging'), btnCode: 'employee_insert', handler: this.handlePackage }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadInitData();
|
this.loadInitData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadInitData() {
|
loadInitData() {
|
||||||
this.$Dictionary.effectiveType().then(list => {
|
this.$Dictionary.effectiveType().then(list => {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
||||||
})
|
});
|
||||||
this.$convertList(list, this.EffectiveTypeList, elem => {
|
this.$convertList(list, this.EffectiveTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.$Dictionary.permissionType().then(list => {
|
this.$Dictionary.permissionType().then(list => {
|
||||||
list.forEach(elem => {
|
list.forEach(elem => {
|
||||||
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name });
|
||||||
});
|
});
|
||||||
this.$convertList(list, this.PermissionTypeList, elem => {
|
this.$convertList(list, this.PermissionTypeList, elem => {
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
this.PermissionTypeList.push({ value: undefined, label: this.$t('orderAuthor.permissionPack') });
|
this.PermissionTypeList.push({ value: undefined, label: this.$t('orderAuthor.permissionPack') });
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
formatterDate(row, porpInfo) {
|
formatterDate(row, porpInfo) {
|
||||||
if (row.hasOwnProperty(porpInfo.property)) {
|
return row[porpInfo.property];
|
||||||
}
|
},
|
||||||
return row[porpInfo.property];
|
queryFunction(params) {
|
||||||
},
|
return listPackagePermission(params);
|
||||||
queryFunction(params) {
|
},
|
||||||
return listPackagePermission(params);
|
reloadTable() {
|
||||||
},
|
if (this.queryList && this.queryList.reload) {
|
||||||
reloadTable() {
|
this.queryList.reload();
|
||||||
if (this.queryList && this.queryList.reload) {
|
}
|
||||||
this.queryList.reload()
|
},
|
||||||
}
|
handlePermissionDetail(index, row) {
|
||||||
},
|
this.$router.push({ path: `${UrlConfig.orderauthor.transferDetail}/${row.id}` });
|
||||||
handlePermissionDetail(index, row) {
|
},
|
||||||
this.$router.push({ path: `${UrlConfig.orderauthor.transferDetail}/${row.id}` })
|
handleRtCodeShow(index, row) {
|
||||||
},
|
getPackageQrCode({ id: row.id }).then(resp => {
|
||||||
handleRtCodeShow(index, row) {
|
this.$refs.qrCode.doShow({
|
||||||
getPackageQrCode({ id: row.id }).then(resp => {
|
url: resp.data,
|
||||||
this.$refs.qrCode.doShow({
|
title: this.$t('orderAuthor.privilegeTransferQRCode')
|
||||||
url: resp.data,
|
});
|
||||||
title: this.$t('orderAuthor.privilegeTransferQRCode')
|
}).catch(() => {
|
||||||
});
|
this.$messageBox(this.$t('tip.getQRCodeFailure'));
|
||||||
}).catch(error => {
|
});
|
||||||
this.$messageBox(this.$t('tip.getQRCodeFailure'));
|
},
|
||||||
})
|
handleRestore(index, row) {
|
||||||
},
|
this.$confirm(this.$t('tip.recoveryPrivilegeTip'), this.$t('global.tips'), {
|
||||||
handleRestore(index, row) {
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
this.$confirm(this.$t('tip.recoveryPrivilegeTip'), this.$t('tip.hint'), {
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
type: 'warning'
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
}).then(() => {
|
||||||
type: 'warning'
|
restorePackagePermission(row.id).then(resp => {
|
||||||
}).then(() => {
|
this.reloadTable();
|
||||||
restorePackagePermission(row.id).then(resp => {
|
this.$message.success(this.$t('tip.recoveryPrivilegesSuccessful'));
|
||||||
this.reloadTable();
|
}).catch(() => {
|
||||||
this.$message.success(this.$t('tip.recoveryPrivilegesSuccessful'));
|
this.$messageBox(this.$t('tip.recoveryPrivilegesFailed'));
|
||||||
}).catch(error => {
|
});
|
||||||
this.$messageBox(this.$t('tip.recoveryPrivilegesFailed'));
|
}).catch(() => { });
|
||||||
})
|
},
|
||||||
}).catch(() => { });
|
handleUnPackage(index, row) {
|
||||||
},
|
this.$confirm(this.$t('tip.unpackingTip'), this.$t('global.tips'), {
|
||||||
handleUnPackage(index, row) {
|
confirmButtonText: this.$t('global.confirm'),
|
||||||
this.$confirm(this.$t('tip.unpackingTip'), this.$t('tip.hint'), {
|
cancelButtonText: this.$t('global.cancel'),
|
||||||
confirmButtonText: this.$t('tip.confirm'),
|
type: 'warning'
|
||||||
cancelButtonText: this.$t('tip.cancel'),
|
}).then(() => {
|
||||||
type: 'warning'
|
permissionDistributeUnPackage(row.id).then(resp => {
|
||||||
}).then(() => {
|
this.reloadTable();
|
||||||
permissionDistributeUnPackage(row.id).then(resp => {
|
this.$message.success(this.$t('tip.unpackingSuccessful'));
|
||||||
this.reloadTable();
|
}).catch(() => {
|
||||||
this.$message.success(this.$t('tip.unpackingSuccessful'));
|
this.$messageBox(this.$t('tip.unpackingFailed'));
|
||||||
}).catch(error => {
|
});
|
||||||
this.$messageBox(this.$t('tip.unpackingFailed'));
|
}).catch(() => { });
|
||||||
})
|
},
|
||||||
}).catch(() => { });
|
handlePackage() {
|
||||||
},
|
this.$router.push({ path: `${UrlConfig.orderauthor.trainferPackage}` });
|
||||||
handlePackage() {
|
}
|
||||||
this.$router.push({ path: `${UrlConfig.orderauthor.trainferPackage}` })
|
}
|
||||||
}
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user