diff --git a/src/api/management/author.js b/src/api/management/author.js index 10835ee59..f1ab5456f 100644 --- a/src/api/management/author.js +++ b/src/api/management/author.js @@ -27,18 +27,10 @@ export function getPermissonDetail(id) { }); } -/** 获取权限list*/ -export function getPermissonList() { - return request({ - url: `/api/permission/list`, - method: 'get' - }); -} - /** 获取用户某课程某段时间内可用的权限数量*/ export function getTotalRemains(params) { return request({ - url: '/api/permission/totalRemains', + url: '/api/userPermission/totalRemains', method: 'get', params: params }); @@ -46,7 +38,7 @@ export function getTotalRemains(params) { /** 设置权限失效或有效*/ export function setLessonPermisson(data) { return request({ - url: `/api/permission/${data.id}/status`, + url: `/api/userPermission/${data.id}/status`, method: 'put', data: data }); @@ -57,7 +49,7 @@ export function setLessonPermisson(data) { */ export function queryPermissionSimulation(data) { return request({ - url: `/api/permission/${data.mapId}/${data.prdCode}/simulation`, + url: `/api/userPermission/${data.mapId}/${data.prdCode}/simulation`, method: 'get' }); } @@ -65,38 +57,28 @@ export function queryPermissionSimulation(data) { /** 获取大屏权限列表*/ export function queryPermissionScreen() { return request({ - url: `/api/permission/bigScreen`, + url: `/api/userPermission/bigScreen`, method: 'get' }); } -/** 更新课程权限*/ -/* -export function updateLessonPermisson(data) { - return request({ - url: '/api/permission', - method: 'put', - data: data - }); -} -*/ - -/** 删除课程权限*/ -/* -export function deleteLessonPermisson(id) { - return request({ - url: '/api/permission/' + id, - method: 'delete' - }); -} -*/ - /** * 用户权限列表 */ +export function listPermision(params) { + return request({ + url: `/api/userPermission`, + method: 'get', + params: params + }); +} + +/** + * 个人权限列表 + */ export function listUserPermision(params) { return request({ - url: `/api/permission/my`, + url: `/api/userPermission/my`, method: 'get', params: params }); @@ -110,10 +92,10 @@ export function getDistribute(id) { }); } -/** 用户权限列表 */ +/** 设置权限所有者 */ export function putPermissionOwner(data) { return request({ - url: `/api/permission/${data.id}/owner`, + url: `/api/userPermission/${data.id}/owner`, method: 'put', data: data.owner }); diff --git a/src/api/management/distribute.js b/src/api/management/distribute.js index f7424bbbc..5d68f8bbc 100644 --- a/src/api/management/distribute.js +++ b/src/api/management/distribute.js @@ -1,6 +1,6 @@ import request from '@/utils/request'; -/** 上课权限获取*/ +/** 权限转增*/ export function getLessons(data) { return request({ url: '/api/distribute/getLessons', @@ -9,15 +9,41 @@ export function getLessons(data) { }); } -/** 上课权限分发*/ +/** 权限分发*/ export function giveLessons(data) { return request({ - url: '/api/distribute/givePermission', + url: '/api/distribute/distribute', method: 'post', data: data }); } +/** 权限转增*/ +export function permissionTurnAdd(data) { + return request({ + url: '/api/distribute/transfer', + method: 'post', + data: data + }); +} + +/** 从订单分发权限(获取二维码)*/ +export function postDistribute(data) { + return request({ + url: `/api/distribute/${data.code}/distribute`, + method: 'post', + data: data + }); +} + +/** 权限获取*/ +export function getPermission(state) { + return request({ + url: `/api/distribute/getPermission?state=${state}`, + method: 'get' + }); +} + /** 接收课程权限*/ export function receiveLessons(data) { return request({ diff --git a/src/components/QueryListPage/QueryListPage.vue b/src/components/QueryListPage/QueryListPage.vue index ea6077051..05f0fbf74 100644 --- a/src/components/QueryListPage/QueryListPage.vue +++ b/src/components/QueryListPage/QueryListPage.vue @@ -63,8 +63,7 @@ :sortable="column.sortable" > import { getTotalRemains } from '@/api/management/author'; -import { PermissionType, OperatorModel } from '@/scripts/ConstDic'; +import { PermissionType } from '@/scripts/ConstDic'; import { giveLessons } from '@/api/management/distribute'; export default { @@ -47,6 +47,7 @@ export default { return form; }, rules() { + const that = this; const crules = { total: [ { required: true, message: this.$t('global.pleaseInputPermissionNumber'), trigger: 'change' }, @@ -55,7 +56,7 @@ export default { if (Number.isInteger(Number(value)) && Number(value) > 0) { callback(); } else { - callback(new Error(this.$t('global.permissionGreaterThen0'))); + callback(new Error(that.$t('global.permissionGreaterThen0'))); } }, trigger: 'blur' @@ -102,21 +103,19 @@ export default { this.maxTotal = 0; if (endTime && startTime) { const model = { - // lessonId: this.formModel.lessonId, startTime: startTime, endTime: endTime, - type: this.PermissionType - // mapId: this.mapId, - // mapProductCode: this.prdCode, + permissionType: this.PermissionType }; if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) { model['lessonId'] = this.formModel.lessonId; model['mapId'] = this.mapId; - model['mapProductCode'] = this.prdCode; + model['prdCode'] = this.prdCode; } else if (this.PermissionType == PermissionType.SIMULATION) { model['mapId'] = this.mapId; - model['mapProductCode'] = this.prdCode; + model['prdCode'] = this.prdCode; } + // 获取用户某课程某段时间内可用的权限数量 getTotalRemains(model).then(response => { this.maxTotal = response.data; if (this.maxTotal == 0) { @@ -146,23 +145,20 @@ export default { handleSure() { this.$refs.dataform.validateForm(() => { const model = { - // lessonId: this.formModel.lessonId, startTime: this.formModel.date[0], endTime: this.formModel.date[1], permissionType: this.PermissionType, - operator: OperatorModel.DISTRIBUTE, amount: this.formModel.total - // mapId: this.mapId, - // mapProductCode: this.prdCode, }; if (this.PermissionType == PermissionType.LESSON || this.PermissionType == PermissionType.EXAM) { model['lessonId'] = this.formModel.lessonId; model['mapId'] = this.mapId; - model['mapProductCode'] = this.prdCode; + model['prdCode'] = this.prdCode; } else if (this.PermissionType == PermissionType.SIMULATION) { model['mapId'] = this.mapId; - model['mapProductCode'] = this.prdCode; + model['prdCode'] = this.prdCode; } + // 权限分发请求 giveLessons(model).then(response => { const url = response.data; this.$emit('QrCodeShow', { diff --git a/src/views/components/limits/index.vue b/src/views/components/limits/index.vue index 195a155c7..dee3b4d6a 100644 --- a/src/views/components/limits/index.vue +++ b/src/views/components/limits/index.vue @@ -12,8 +12,7 @@ @@ -102,12 +101,12 @@ export default { }); return sums; }, - transfer(courseModel) { + transfer(courseModel) { // 转增 if (this.$refs) { this.$refs.transfer.doShow(courseModel); } }, - distribute(courseModel) { + distribute(courseModel) { // 分发 if (this.$refs) { this.$refs.distribute.doShow(courseModel); } diff --git a/src/views/components/limits/transfer.vue b/src/views/components/limits/transfer.vue index 238fa0a61..383c1d743 100644 --- a/src/views/components/limits/transfer.vue +++ b/src/views/components/limits/transfer.vue @@ -10,8 +10,8 @@ + diff --git a/src/views/orderauthor/order/draft.vue b/src/views/orderauthor/order/draft.vue index d6be9ea6b..6097a3a77 100644 --- a/src/views/orderauthor/order/draft.vue +++ b/src/views/orderauthor/order/draft.vue @@ -103,9 +103,6 @@ export default { }; }, computed: { - // turnbackBarTitle() { - // return ''; - // }, isAdd() { return this.type === 'ADD'; }, diff --git a/src/views/orderauthor/order/list.vue b/src/views/orderauthor/order/list.vue index 2ca09548b..b2a9f6937 100644 --- a/src/views/orderauthor/order/list.vue +++ b/src/views/orderauthor/order/list.vue @@ -3,6 +3,7 @@ + @@ -10,17 +11,19 @@ import { getOrderPageList } from '@/api/management/order'; import { getSellerList } from '@/api/management/user'; import { getOrganizationList } from '@/api/management/organization'; -import { giveLessons } from '@/api/management/distribute'; -import { OperatorModel } from '@/scripts/ConstDic'; +import { postDistribute } from '@/api/management/distribute'; +// import { OperatorModel } from '@/scripts/ConstDic'; import { UrlConfig } from '@/router/index'; import QrCode from '@/components/QrCode'; import CanDistribute from './canDistribute'; +import detail from './detail'; export default { name: 'List', components: { QrCode, - CanDistribute + CanDistribute, + detail }, data() { return { @@ -29,10 +32,9 @@ export default { OrderTypeList: [], PayTypeList: [], PayStatusList: [], - // OrganizationList: [], WhetherTypeList: [], EffectiveTypeList: [], - PermissionTypeList: [], + // PermissionTypeList: [], pagerConfig: { pageSize: 'pageSize', pageIndex: 'pageNum' @@ -51,13 +53,6 @@ export default { 'userName': { type: 'text', label: this.$t('orderAuthor.userName') - }, - 'permissionType': { - type: 'select', - label: this.$t('orderAuthor.permissionType'), - config: { - data: [] - } } } }, @@ -70,6 +65,7 @@ export default { title: this.$t('orderAuthor.organizationOrEnterprise'), prop: 'organizationName', type: 'tag', + width: '250', columnValue: (row) => { return row.organizationName; }, tagType: (row) => { return ''; } }, @@ -81,13 +77,13 @@ export default { title: this.$t('orderAuthor.commodityName'), prop: 'goodsName' }, - { - title: this.$t('orderAuthor.permissionType'), - prop: 'permissionType', - type: 'tag', - columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); }, - tagType: (row) => { return ''; } - }, + // { + // title: this.$t('orderAuthor.permissionType'), + // prop: 'permissionType', + // type: 'tag', + // columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); }, + // tagType: (row) => { return ''; } + // }, { title: this.$t('orderAuthor.permissionNumber'), prop: 'amount' @@ -111,39 +107,41 @@ export default { title: this.$t('orderAuthor.purchaseMonths'), prop: 'monthAmount' }, - { - title: this.$t('orderAuthor.totalPrice'), - prop: 'totalPrice' - }, - { - title: this.$t('orderAuthor.paymentMethod'), - prop: 'payWays', - type: 'tag', - columnValue: (row) => { return this.$convertField(row.payWays, this.PayTypeList, ['value', 'label']); }, - tagType: (row) => { return 'success'; } - }, + // { + // title: this.$t('orderAuthor.totalPrice'), + // prop: 'totalPrice' + // }, + // { + // title: this.$t('orderAuthor.paymentMethod'), + // prop: 'payWays', + // width: '130', + // type: 'tag', + // columnValue: (row) => { return this.$convertField(row.payWays, this.PayTypeList, ['value', 'label']); }, + // tagType: (row) => { return 'success'; } + // }, { title: this.$t('orderAuthor.creationDate'), - prop: 'createTime' - }, - { - title: this.$t('orderAuthor.orderType'), - prop: 'orderType', - type: 'tag', - columnValue: (row) => { return this.$convertField(row.orderType, this.OrderTypeList, ['value', 'label']); }, - tagType: (row) => { return 'success'; } - }, - { - title: this.$t('orderAuthor.contractNumber'), - prop: 'contractNo' - }, - { - title: this.$t('orderAuthor.businessType'), - prop: 'bizType', - type: 'tag', - columnValue: (row) => { return this.$convertField(row.bizType, this.BizTypeList, ['value', 'label']); }, - tagType: (row) => { return 'success'; } + prop: 'createTime', + width: '160' }, + // { + // title: this.$t('orderAuthor.orderType'), + // prop: 'orderType', + // type: 'tag', + // columnValue: (row) => { return this.$convertField(row.orderType, this.OrderTypeList, ['value', 'label']); }, + // tagType: (row) => { return 'success'; } + // }, + // { + // title: this.$t('orderAuthor.contractNumber'), + // prop: 'contractNo' + // }, + // { + // title: this.$t('orderAuthor.businessType'), + // prop: 'bizType', + // type: 'tag', + // columnValue: (row) => { return this.$convertField(row.bizType, this.BizTypeList, ['value', 'label']); }, + // tagType: (row) => { return 'success'; } + // }, { title: this.$t('orderAuthor.paymentStatus'), prop: 'payStatus', @@ -157,21 +155,21 @@ export default { } } }, - { - title: this.$t('orderAuthor.salesman'), - prop: 'sellerName', - type: 'tag', - columnValue: (row) => { return row.sellerName; }, - tagType: (row) => { return 'success'; } - }, + // { + // title: this.$t('orderAuthor.salesman'), + // prop: 'sellerName', + // type: 'tag', + // columnValue: (row) => { return row.sellerName; }, + // tagType: (row) => { return 'success'; } + // }, { type: 'button', title: this.$t('global.operate'), width: '260', buttons: [ { - name: this.$t('global.edit'), - handleClick: this.handleEdit + name: '详情', + handleClick: this.handleDetail }, { name: this.$t('orderAuthor.obtainQrCode'), @@ -201,7 +199,6 @@ export default { loadInitData() { this.queryForm.queryObject.organizationId.config.data.length = 0; getOrganizationList().then(response => { - // this.OrganizationList = response.data; response.data.forEach(elem => { this.queryForm.queryObject.organizationId.config.data.push({ value: elem.id, label: elem.name }); }); @@ -241,14 +238,14 @@ export default { }); }); - this.$Dictionary.permissionType().then(list => { - list.forEach(elem => { - this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name }); - }); - this.$convertList(list, this.PermissionTypeList, elem => { - return true; - }); - }); + // this.$Dictionary.permissionType().then(list => { + // list.forEach(elem => { + // 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); @@ -256,12 +253,12 @@ export default { 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 => { - } - }); + handleDetail(index, data) { + data.payWays = this.$convertField(data.payWays, this.PayTypeList, ['value', 'label']); + data.orderType = this.$convertField(data.orderType, this.OrderTypeList, ['value', 'label']); + data.bizType = this.$convertField(data.bizType, this.BizTypeList, ['value', 'label']); + data.payStatusZh = this.$convertField(data.payStatus, this.PayStatusList, ['value', 'label']); + this.$refs.detail.doShow(data); }, handleCanDistribute(index, data) { if (data.qrCodeGenerated) { @@ -273,21 +270,11 @@ export default { }, 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 + code: data.code, + canDistribute: data.canDistribute ? data.canDistribute : false }; - giveLessons(model).then(response => { + postDistribute(model).then(response => { this.reloadTable(); if (data.qrCodeGenerated) { this.$refs.qrCode.doShow({ diff --git a/src/views/orderauthor/permission/Qcode.vue b/src/views/orderauthor/permission/Qcode.vue new file mode 100644 index 000000000..ec465d922 --- /dev/null +++ b/src/views/orderauthor/permission/Qcode.vue @@ -0,0 +1,88 @@ + + + + + diff --git a/src/views/orderauthor/permission/draft/choosePermission.vue b/src/views/orderauthor/permission/draft/choosePermission.vue index 2604d1793..f7250cedf 100644 --- a/src/views/orderauthor/permission/draft/choosePermission.vue +++ b/src/views/orderauthor/permission/draft/choosePermission.vue @@ -73,6 +73,10 @@ export default { title: this.$t('orderAuthor.organizationOrEnterprise'), prop: 'organizationName' }, + { + title: '权限名称', + prop: 'permissionName' + }, { title: this.$t('orderAuthor.userName'), prop: 'userName' @@ -81,25 +85,25 @@ export default { title: this.$t('orderAuthor.userMobile'), prop: 'userMobile' }, - { - title: this.$t('orderAuthor.mapName'), - prop: 'mapName' - }, - { - title: this.$t('orderAuthor.mapProductName'), - prop: 'mapProductName' - }, - { - title: this.$t('orderAuthor.courseName'), - prop: 'lessonName' - }, - { - title: this.$t('orderAuthor.permissionType'), - prop: 'permissionType', - type: 'tag', - columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); }, - tagType: (row) => { return ''; } - }, + // { + // title: this.$t('orderAuthor.mapName'), + // prop: 'mapName' + // }, + // { + // title: this.$t('orderAuthor.mapProductName'), + // prop: 'mapProductName' + // }, + // { + // title: this.$t('orderAuthor.courseName'), + // prop: 'lessonName' + // }, + // { + // title: this.$t('orderAuthor.permissionType'), + // prop: 'permissionType', + // type: 'tag', + // columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); }, + // tagType: (row) => { return ''; } + // }, { title: this.$t('orderAuthor.publicOrPrivate'), prop: 'canDistribute', @@ -154,13 +158,13 @@ export default { name: this.$t('global.add'), handleClick: this.handlePut, type: '', - showControl: (row) => { return !row.isPut && row.permissionType; } + showControl: (row) => { return !row.isPut; } }, { name: this.$t('global.delete'), handleClick: this.handlePop, type: 'warning', - showControl: (row) => { return row.isPut && row.permissionType; } + showControl: (row) => { return row.isPut; } } ] } diff --git a/src/views/orderauthor/permission/draft/ruleForm.vue b/src/views/orderauthor/permission/draft/ruleForm.vue index b0f4c6bb4..575568487 100644 --- a/src/views/orderauthor/permission/draft/ruleForm.vue +++ b/src/views/orderauthor/permission/draft/ruleForm.vue @@ -16,16 +16,16 @@ style="width: 100%" :height="height-300" > - - + + + + + @@ -10,11 +11,13 @@ import { superAdmin } from '@/router'; import { listPackagePermission, restorePackagePermission, getPackageQrCode, permissionDistributeUnPackage } from '@/api/management/distribute'; import { UrlConfig } from '@/router/index'; import QrCode from '@/components/QrCode'; +import Qcode from './Qcode'; export default { name: 'Author', components: { - QrCode + QrCode, + Qcode }, data() { return { @@ -36,13 +39,13 @@ export default { type: 'text', label: this.$t('orderAuthor.founder') }, - 'permissionType': { - type: 'select', - label: this.$t('orderAuthor.permissionType'), - config: { - data: [] - } - }, + // 'permissionType': { + // type: 'select', + // label: this.$t('orderAuthor.permissionType'), + // config: { + // data: [] + // } + // }, 'status': { type: 'select', label: this.$t('orderAuthor.authorityStatus'), @@ -62,6 +65,10 @@ export default { title: this.$t('orderAuthor.organizationOrEnterprise'), prop: 'organizationName' }, + { + title: '权限名称', + prop: 'permissionName' + }, { title: this.$t('orderAuthor.founder'), prop: 'userName' @@ -70,25 +77,25 @@ export default { title: this.$t('orderAuthor.founderPhone'), prop: 'userMobile' }, - { - title: this.$t('orderAuthor.mapName'), - prop: 'mapName' - }, - { - title: this.$t('orderAuthor.mapProductName'), - prop: 'mapProductName' - }, - { - title: this.$t('orderAuthor.courseName'), - prop: 'lessonName' - }, - { - title: this.$t('orderAuthor.permissionType'), - prop: 'permissionType', - type: 'tag', - columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); }, - tagType: (row) => { return ''; } - }, + // { + // title: this.$t('orderAuthor.mapName'), + // prop: 'mapName' + // }, + // { + // title: this.$t('orderAuthor.mapProductName'), + // prop: 'mapProductName' + // }, + // { + // title: this.$t('orderAuthor.courseName'), + // prop: 'lessonName' + // }, + // { + // title: this.$t('orderAuthor.permissionType'), + // prop: 'permissionType', + // type: 'tag', + // columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); }, + // tagType: (row) => { return ''; } + // }, { title: this.$t('orderAuthor.publicOrPrivate'), prop: 'canDistribute', @@ -172,7 +179,8 @@ export default { } ], actions: [ - { text: this.$t('orderAuthor.privilegePackaging'), btnCode: 'employee_insert', handler: this.handlePackage } + { text: this.$t('orderAuthor.privilegePackaging'), btnCode: 'employee_insert', handler: this.handlePackage }, + { text: '领取权限', handler: this.handlerPermission, show: process.env.NODE_ENV == 'development' } ] } }; @@ -191,15 +199,15 @@ export default { return true; }); }); - this.$Dictionary.permissionType().then(list => { - list.forEach(elem => { - this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name }); - }); - this.$convertList(list, this.PermissionTypeList, elem => { - return true; - }); - this.PermissionTypeList.push({ value: undefined, label: this.$t('orderAuthor.permissionPack') }); - }); + // this.$Dictionary.permissionType().then(list => { + // list.forEach(elem => { + // this.queryForm.queryObject.permissionType.config.data.push({ value: elem.code, label: elem.name }); + // }); + // this.$convertList(list, this.PermissionTypeList, elem => { + // return true; + // }); + // this.PermissionTypeList.push({ value: undefined, label: this.$t('orderAuthor.permissionPack') }); + // }); }, formatterDate(row, porpInfo) { return row[porpInfo.property]; @@ -255,6 +263,9 @@ export default { }, handlePackage() { this.$router.push({ path: `${UrlConfig.orderauthor.trainferPackage}` }); + }, + handlerPermission() { + this.$refs.qcode.doShow(); } } }; diff --git a/src/views/orderauthor/rules/detail.vue b/src/views/orderauthor/rules/detail.vue deleted file mode 100644 index e0616a9dd..000000000 --- a/src/views/orderauthor/rules/detail.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - - diff --git a/src/views/orderauthor/rules/draft/choosePermission.vue b/src/views/orderauthor/rules/draft/choosePermission.vue deleted file mode 100644 index 2604d1793..000000000 --- a/src/views/orderauthor/rules/draft/choosePermission.vue +++ /dev/null @@ -1,221 +0,0 @@ - - - diff --git a/src/views/orderauthor/rules/draft/ruleForm.vue b/src/views/orderauthor/rules/draft/ruleForm.vue deleted file mode 100644 index b0f4c6bb4..000000000 --- a/src/views/orderauthor/rules/draft/ruleForm.vue +++ /dev/null @@ -1,242 +0,0 @@ - - - - diff --git a/src/views/orderauthor/rules/index.vue b/src/views/orderauthor/rules/index.vue index 60bca6762..e909ba95c 100644 --- a/src/views/orderauthor/rules/index.vue +++ b/src/views/orderauthor/rules/index.vue @@ -1,20 +1,23 @@ diff --git a/src/views/package/draft/editRule.vue b/src/views/package/draft/editRule.vue index 3b00b835e..67c882c76 100644 --- a/src/views/package/draft/editRule.vue +++ b/src/views/package/draft/editRule.vue @@ -2,7 +2,7 @@ - {{ isAdd? $t('global.add'): $t('global.edit') }} + {{ isAdd? $t('global.add'): $t('global.edit') }} {{ $t('global.cancel') }} @@ -78,6 +78,7 @@ export default { return form; }, rules() { + const that = this; const crules = { permissionType: [ { required: true, message: this.$t('rules.permissionTypeInput'), trigger: 'change' } @@ -101,7 +102,7 @@ export default { if (Number.isInteger(Number(value)) && Number(value) > 0) { callback(); } else { - callback(new Error(this.$t('rules.permissionNumberGreater0'))); + callback(new Error(that.$t('rules.permissionNumberGreater0'))); } }, trigger: 'blur' @@ -164,17 +165,17 @@ export default { const model = { startTime: startTime, endTime: endTime, - type: this.formModel.permissionType, + permissionType: this.formModel.permissionType, ownerId: this.formModel.ownerId }; if (this.formModel.permissionType == PermissionType.LESSON || this.formModel.permissionType == PermissionType.EXAM) { model['lessonId'] = this.formModel.lessonId; model['mapId'] = this.formModel.mapId; - model['mapProductCode'] = this.formModel.mapProductCode; + model['prdCode'] = this.formModel.mapProductCode; } else if (this.formModel.permissionType == PermissionType.SIMULATION) { model['mapId'] = this.formModel.mapId; - model['mapProductCode'] = this.formModel.mapProductCode; + model['prdCode'] = this.formModel.mapProductCode; } getTotalRemains(model).then(response => { @@ -230,7 +231,6 @@ export default { }); cb(results); } catch (error) { - console.error(error, '查询用户list'); cb(results); } } else { @@ -263,8 +263,8 @@ export default { this.show = false; }, draftRule() { - if (this.formModel.amount <= this.maxTotal && this.formModel.amount) { - this.$refs.dataform.validateForm(() => { + this.$refs.dataform.validateForm(() => { + if (this.formModel.amount <= this.maxTotal && this.formModel.amount) { if (this.isAdd) { this.$emit('addRuleForm', { operator: OperatorModel.TRANSFER, @@ -293,8 +293,8 @@ export default { }); } this.doClose(); - }); - } + } + }); } } }; diff --git a/src/views/package/index.vue b/src/views/package/index.vue index 746d6a8a7..6e9ae01bf 100644 --- a/src/views/package/index.vue +++ b/src/views/package/index.vue @@ -59,6 +59,11 @@ export default { selectCheckShow: false, indexShow: true, columns: [ + { + title: '权限名称', + width: '210', + prop: 'permissionName' + }, { title: this.$t('permission.permissionType'), prop: 'type', @@ -66,18 +71,6 @@ export default { columnValue: (row) => { return this.$convertField(row.type, this.PermissionTypeList, ['value', 'label']); }, tagType: (row) => { return ''; } }, - { - title: this.$t('permission.mapName'), - prop: 'mapName' - }, - { - title: this.$t('permission.mapProductName'), - prop: 'mapProductName' - }, - { - title: this.$t('permission.lessonName'), - prop: 'lessonName' - }, { title: this.$t('permission.permissionUseType'), prop: 'canDistribute', diff --git a/src/views/screenMonitor/detail/index.vue b/src/views/screenMonitor/detail/index.vue index 05a2f53d3..c19d5f684 100644 --- a/src/views/screenMonitor/detail/index.vue +++ b/src/views/screenMonitor/detail/index.vue @@ -1,217 +1,214 @@ +