Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
f1e44a9ee8
@ -86,3 +86,17 @@ export function getPermissionQuickly(mapId, count) {
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
/** 收回用户权限到权限分发中 */
|
||||
export function putUserPermissionBackPackage(id) {
|
||||
return request({
|
||||
url: `/api/userPermission/${id}/back`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
/** 收回用户权限(专用)到用户权限中 */
|
||||
export function putUserPermissionBackUser(id) {
|
||||
return request({
|
||||
url: `/api/userPermission/${id}/back/up`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
@ -75,3 +75,10 @@ export function createProjectPackage(projectCode, num) {
|
||||
method: 'post'
|
||||
});
|
||||
}
|
||||
/** 收回从该权限分发获取的用户权限 */
|
||||
export function putDistributeBack(id) {
|
||||
return request({
|
||||
url: `/api/distribute/${id}/back`,
|
||||
method: 'put'
|
||||
});
|
||||
}
|
||||
|
@ -43,6 +43,14 @@ export function saveUserSubscribe(data) {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询管理员和超管*/
|
||||
export function getAdminAndSuperAdminList() {
|
||||
return request({
|
||||
url: `/api/user/adminAndSuperAdmin`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 修改用户信息
|
||||
export function updateUserInfo(data) {
|
||||
return request({
|
||||
|
@ -17,7 +17,7 @@
|
||||
<template v-if="checkColumnIndex(rIndex, index)">
|
||||
<el-col :key="index" :span="24/columnNum*field.columnNeed">
|
||||
<template v-if="checkFieldType(field, 'text', name)">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-input
|
||||
v-model="formModel[name]"
|
||||
type="text"
|
||||
@ -27,7 +27,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="checkFieldType(field, 'date', name)">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-date-picker
|
||||
v-model="formModel[name]"
|
||||
type="date"
|
||||
@ -37,7 +37,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="checkFieldType(field, 'daterange', name)">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-date-picker
|
||||
v-model="formModel[name]"
|
||||
type="daterange"
|
||||
@ -47,7 +47,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="checkFieldType(field, 'time', name)">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-time-picker
|
||||
v-model="formModel[name]"
|
||||
type="time"
|
||||
@ -57,7 +57,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="checkFieldType(field, 'timerange', name)">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-time-picker
|
||||
v-model="formModel[name]"
|
||||
type="timerange"
|
||||
@ -68,7 +68,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="checkFieldType(field, 'datetime', name)">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-date-picker
|
||||
v-model="formModel[name]"
|
||||
type="datetime"
|
||||
@ -78,7 +78,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="checkFieldType(field, 'datetimerange', name)">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-date-picker
|
||||
v-model="formModel[name]"
|
||||
type="datetimerange"
|
||||
@ -88,7 +88,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="checkFieldType(field, 'select', name)">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-select
|
||||
v-if="field.show !== false && !(field.noClearable)"
|
||||
:ref="name"
|
||||
@ -125,7 +125,7 @@
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template v-else-if="checkFieldType(field, 'complete')">
|
||||
<el-form-item :prop="name" :label="field.label">
|
||||
<el-form-item v-if="!field.hide" :prop="name" :label="field.label">
|
||||
<el-autocomplete
|
||||
v-if="field.show !== false"
|
||||
v-model="formModel[name]"
|
||||
@ -215,9 +215,9 @@ export default {
|
||||
}
|
||||
},
|
||||
columnNum: {
|
||||
type: Number,
|
||||
type: Number,
|
||||
default() {
|
||||
return 4;
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.83:9000'; // 旭强 有线
|
||||
// BASE_API = 'http://192.168.8.114:9000'; // 旭强 无线
|
||||
// BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
||||
BASE_API = 'http://192.168.3.120:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
|
@ -43,30 +43,42 @@ export default {
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
// {
|
||||
// title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
// prop: 'organizationName'
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('orderAuthor.userName'),
|
||||
// prop: 'userName'
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('orderAuthor.userMobile'),
|
||||
// prop: 'userMobile'
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('orderAuthor.mapName'),
|
||||
// prop: 'mapName'
|
||||
// },
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
title: '商品名称',
|
||||
prop: 'permissionName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.userName'),
|
||||
prop: 'userName'
|
||||
title: '商品数量',
|
||||
prop: 'amount'
|
||||
},
|
||||
{
|
||||
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: '商品单价',
|
||||
prop: 'price'
|
||||
},
|
||||
// {
|
||||
// title: this.$t('orderAuthor.mapProductName'),
|
||||
// prop: 'mapProductName'
|
||||
// },
|
||||
// {
|
||||
// title: this.$t('orderAuthor.courseName'),
|
||||
// prop: 'lessonName'
|
||||
// },
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'permissionType',
|
||||
|
@ -9,12 +9,14 @@
|
||||
|
||||
<script>
|
||||
import { admin } from '@/router/index';
|
||||
import { listPackagePermission, restorePackagePermission, getPackageQrCode, setCommodityStatus } from '@/api/management/distribute';
|
||||
import { listPackagePermission, restorePackagePermission, getPackageQrCode, setCommodityStatus, putDistributeBack } from '@/api/management/distribute';
|
||||
import { UrlConfig } from '@/scripts/ConstDic';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import Qcode from './Qcode';
|
||||
import ProjectPackage from './projectPackage';
|
||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { getOrganizationList } from '@/api/management/organization';
|
||||
// import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||
import { getAdminAndSuperAdminList } from '@/api/management/user';
|
||||
|
||||
export default {
|
||||
name: 'Author',
|
||||
@ -32,16 +34,30 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
labelWidth: '100px',
|
||||
reset: false,
|
||||
queryObject: {
|
||||
mapId: {
|
||||
organizationId: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.mapName'),
|
||||
label: '组织机构',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
creatorId: {
|
||||
type: 'select',
|
||||
label: '创建者',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
// mapId: {
|
||||
// type: 'select',
|
||||
// label: this.$t('orderAuthor.mapName'),
|
||||
// config: {
|
||||
// data: []
|
||||
// }
|
||||
// },
|
||||
canDistribute: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.publicOrPrivate'),
|
||||
@ -167,10 +183,16 @@ export default {
|
||||
showControl: (row) => { return row.amount !== row.remains; }
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.recovery'),
|
||||
name: '权限回退',
|
||||
handleClick: this.handleRestore,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.status == '1' && row.canRestore; }
|
||||
},
|
||||
{
|
||||
name: '回收分发权限',
|
||||
handleClick: this.handleRestoreUser,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.status == '1' && row.canRestore && row.amount !== row.remains; }
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -196,11 +218,22 @@ export default {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
getPublishMapListOnline().then(resp => {
|
||||
getOrganizationList().then(resp => {
|
||||
resp.data.forEach(elem => {
|
||||
this.queryForm.queryObject.mapId.config.data.push({value: elem.id, label: elem.name});
|
||||
this.queryForm.queryObject.organizationId.config.data.push({ value: '' + elem.id, label: elem.name });
|
||||
});
|
||||
});
|
||||
getAdminAndSuperAdminList().then(resp => {
|
||||
console.log(resp, '====');
|
||||
resp.data.forEach(elem => {
|
||||
this.queryForm.queryObject.creatorId.config.data.push({ value: '' + elem.id, label: elem.name });
|
||||
});
|
||||
});
|
||||
// getPublishMapListOnline().then(resp => {
|
||||
// resp.data.forEach(elem => {
|
||||
// this.queryForm.queryObject.mapId.config.data.push({value: elem.id, label: elem.name});
|
||||
// });
|
||||
// });
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property] ? row[porpInfo.property] : this.$t('global.perpetual');
|
||||
@ -227,7 +260,7 @@ export default {
|
||||
});
|
||||
},
|
||||
handleRestore(index, row) {
|
||||
this.$confirm(this.$t('tip.recoveryPrivilegeTip'), this.$t('global.tips'), {
|
||||
this.$confirm('该分发权限是否回退到用户权限', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
@ -240,6 +273,20 @@ export default {
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleRestoreUser(index, row) {
|
||||
this.$confirm('是否回收用户领取的权限', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
putDistributeBack(row.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('tip.recoveryPrivilegesSuccessful'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.recoveryPrivilegesFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handlerPermission() {
|
||||
this.$refs.qcode.doShow();
|
||||
},
|
||||
|
@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPermision, setLessonPermisson } from '@/api/management/author';
|
||||
import { listPermision, setLessonPermisson, putUserPermissionBackPackage, putUserPermissionBackUser } from '@/api/management/author';
|
||||
import Detail from './detail';
|
||||
import Belong from './belong';
|
||||
// import localStore from 'storejs';
|
||||
@ -33,10 +33,7 @@ export default {
|
||||
queryObject: {
|
||||
userName: {
|
||||
type: 'text',
|
||||
label: this.$t('permission.userName'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
label: this.$t('permission.userName')
|
||||
},
|
||||
status: {
|
||||
type: 'select',
|
||||
@ -58,9 +55,8 @@ export default {
|
||||
distributeId: {
|
||||
type: 'text',
|
||||
label: this.$t('permission.distributeId'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
value: this.$route.query.distributeId || ''
|
||||
// hide: true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -157,7 +153,7 @@ export default {
|
||||
width: '300',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('orderAuthor.setupFailure'),
|
||||
name: this.$t('orderAuthor.setupFailure'), // 设置失效
|
||||
handleClick: this.handleEfficacy,
|
||||
type: 'warning',
|
||||
showControl: (row) => {
|
||||
@ -165,7 +161,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('orderAuthor.transferAttribution'),
|
||||
name: this.$t('orderAuthor.transferAttribution'), // 转赠归属
|
||||
handleClick: this.handleBelongs,
|
||||
type: '',
|
||||
showControl: (row) => {
|
||||
@ -173,10 +169,22 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: this.$t('global.details'),
|
||||
name: this.$t('global.details'), // 详情
|
||||
handleClick: this.handleRoleVest,
|
||||
type: '',
|
||||
showControl: (row) => { return !row.permissionType; }
|
||||
},
|
||||
{
|
||||
name: '回收到权限集',
|
||||
handleClick: this.handleRestorePackage,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.status === '1' && !row.canDistribute; }
|
||||
},
|
||||
{
|
||||
name: '回收到用户',
|
||||
handleClick: this.handleRestoreUser,
|
||||
type: 'danger',
|
||||
showControl: (row) => { return row.status === '1' && !row.canDistribute; }
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -211,7 +219,36 @@ export default {
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property] ? row[porpInfo.property] : this.$t('global.perpetual');
|
||||
},
|
||||
handleRestorePackage(index, row) {
|
||||
this.$confirm('是否回收该用户权限到权限包中', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
putUserPermissionBackPackage(row.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('tip.recoveryPrivilegesSuccessful'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.recoveryPrivilegesFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
handleRestoreUser(index, row) {
|
||||
this.$confirm('是否回收该用户权限到用户权限中', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
putUserPermissionBackUser(row.id).then(resp => {
|
||||
this.reloadTable();
|
||||
this.$message.success(this.$t('tip.recoveryPrivilegesSuccessful'));
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.recoveryPrivilegesFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
queryFunction(params) {
|
||||
// params.distributeId = this.$route.query.distributeId;
|
||||
return listPermision(params);
|
||||
},
|
||||
reloadTable() {
|
||||
|
Loading…
Reference in New Issue
Block a user