Merge branch 'dev' of https://git.qcloud.com/joylink/jl-nclient into dev
This commit is contained in:
commit
9b9be66ea0
@ -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
|
||||
});
|
||||
|
@ -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({
|
||||
|
@ -63,8 +63,7 @@
|
||||
:sortable="column.sortable"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="column.tagType(scope.row, scope.$index)">{{ column.columnValue(scope.row,
|
||||
scope.$index) }}</el-tag>
|
||||
<el-tag v-if="column.columnValue(scope.row, scope.$index)" :type="column.tagType(scope.row, scope.$index)">{{ column.columnValue(scope.row, scope.$index) }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -10,7 +10,7 @@ export default {
|
||||
permissionStatus: '权限状态',
|
||||
permissionUseType: '公用/专用',
|
||||
permissionTotal: '权限总数',
|
||||
permissionRemains: '生于权限',
|
||||
permissionRemains: '剩余权限',
|
||||
isForever: '是否永久',
|
||||
startTime: '开始时间',
|
||||
endTime: '结束时间',
|
||||
|
@ -28,6 +28,7 @@ export default {
|
||||
replayManage: '回放管理',
|
||||
|
||||
permissionManage: '权限管理',
|
||||
selfPermission: '我的权限',
|
||||
|
||||
pulishManage: '发布内容管理',
|
||||
publishMapManage: '发布地图管理',
|
||||
|
@ -304,9 +304,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
text: {
|
||||
show: true // 公里标名称显示
|
||||
},
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
// },
|
||||
kmPostShow: true, // 公里标显示
|
||||
kilometerPosition: 'down', // 公里标位置
|
||||
fontWeight: 'bold' // 文字错细
|
||||
|
@ -300,9 +300,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
text: {
|
||||
show: true // 公里标名称显示
|
||||
},
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
// },
|
||||
kmPostShow: false, // 公里标显示
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
@ -297,9 +297,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
text: {
|
||||
show: true // 公里标名称显示
|
||||
},
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
// },
|
||||
kmPostShow: false, // 公里标显示
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
@ -279,9 +279,9 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Station] = {
|
||||
text: {
|
||||
show: true // 公里标名称显示
|
||||
},
|
||||
// text: {
|
||||
// show: true // 公里标名称显示
|
||||
// },
|
||||
kmPostShow: true, // 公里标显示
|
||||
kilometerPosition: 'up' // 公里标朝向
|
||||
};
|
||||
|
@ -21,7 +21,7 @@ export default class Station extends Group {
|
||||
const model = this.model;
|
||||
const style = this.style;
|
||||
|
||||
if (style.Station.text.show) {
|
||||
if (model.visible) {
|
||||
// 公里标名称是否显示
|
||||
this.stationText = new ETextName({
|
||||
zlevel: this.zlevel,
|
||||
|
@ -742,7 +742,7 @@ export const asyncRouter = [
|
||||
path: 'manage',
|
||||
component: Package,
|
||||
meta: {
|
||||
i18n: 'router.permissionManage'
|
||||
i18n: 'router.selfPermission'
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -4,8 +4,8 @@ export function getBaseUrl() {
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
BASE_API = 'http://192.168.3.5:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.3.4:9000' // 琰培
|
||||
} else {
|
||||
BASE_API = process.env.VUE_APP_BASE_API;
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
<script>
|
||||
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', {
|
||||
|
@ -12,8 +12,7 @@
|
||||
<el-table-column prop="endTime" :label="`${$t('global.endTime')}`" />
|
||||
<el-table-column prop="forever" :label="`${$t('global.isForever')}`">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="scope.row.forever? 'success': 'primary'" disable-transitions>{{ $ConstSelect.translate(scope.row.forever,
|
||||
'Whether') }}</el-tag>
|
||||
<el-tag :type="scope.row.forever? 'success': 'primary'" disable-transitions>{{ $ConstSelect.translate(scope.row.forever, 'Whether') }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" :label="$t('global.total')" />
|
||||
@ -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);
|
||||
}
|
||||
|
@ -10,8 +10,8 @@
|
||||
|
||||
<script>
|
||||
import { getTotalRemains } from '@/api/management/author';
|
||||
import { giveLessons } from '@/api/management/distribute';
|
||||
import { PermissionType, OperatorModel } from '@/scripts/ConstDic';
|
||||
import { permissionTurnAdd } from '@/api/management/distribute';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
|
||||
export default {
|
||||
name: 'GoLsesson',
|
||||
@ -54,6 +54,7 @@ export default {
|
||||
return form;
|
||||
},
|
||||
rules() {
|
||||
const that = this;
|
||||
const crules = {
|
||||
total: [
|
||||
{ required: true, message: this.$t('global.pleaseInputPermissionNumber'), trigger: 'change' },
|
||||
@ -62,7 +63,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'
|
||||
@ -109,20 +110,17 @@ export default {
|
||||
this.maxTotal = 0;
|
||||
if (endTime && startTime) {
|
||||
const model = {
|
||||
// lessonId: this.formModel.lessonId,
|
||||
startTime: `${startTime} 00:00:00`,
|
||||
endTime: `${endTime} 23:59:59`,
|
||||
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;
|
||||
@ -153,24 +151,21 @@ export default {
|
||||
handleSure() {
|
||||
this.$refs.dataform.validateForm(() => {
|
||||
const model = {
|
||||
// lessonId: this.formModel.lessonId,
|
||||
startTime: `${this.formModel.date[0]} 00:00:00`,
|
||||
endTime: `${this.formModel.date[1]} 23:59:59`,
|
||||
amount: this.formModel.total,
|
||||
permissionType: this.PermissionType,
|
||||
operator: OperatorModel.TRANSFER
|
||||
// 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;
|
||||
}
|
||||
giveLessons(model).then(response => {
|
||||
// 转增
|
||||
permissionTurnAdd(model).then(response => {
|
||||
const url = response.data;
|
||||
this.$emit('QrCodeShow', {
|
||||
url: url,
|
||||
|
@ -95,11 +95,13 @@ export default {
|
||||
// 加载课程信息
|
||||
initLoadPage() {
|
||||
const data = {
|
||||
mapId: this.$route.query.mapId,
|
||||
lessonId: this.$route.params.lessonId,
|
||||
productType: this.$route.query.permissionType,
|
||||
mapProductCode: this.$route.query.prdCode
|
||||
permissionType: this.$route.query.permissionType
|
||||
};
|
||||
if (this.$route.query.permissionType != '04') {
|
||||
data['mapId'] = this.$route.query.mapId;
|
||||
data['prdCode'] = this.$route.query.prdCode;
|
||||
data['lessonId'] = this.$route.query.lessonId;
|
||||
}
|
||||
|
||||
getCommodityDetailByParams(data).then(response => {
|
||||
this.active = 0;
|
||||
|
@ -159,10 +159,10 @@ export default {
|
||||
};
|
||||
|
||||
(this.permissionList.filter(elem => { return elem.mapName == mapName; })|| []).forEach(elem => {
|
||||
if (elem.mapProductName == Object.keys(permissionMap)[Object.keys(permissionMap).length -1]) {
|
||||
permissionMap[`${elem.mapProductName}`] = elem.remains;
|
||||
if (elem.prdName == Object.keys(permissionMap)[Object.keys(permissionMap).length -1]) {
|
||||
permissionMap[`${elem.prdName}`] = elem.remains;
|
||||
} else {
|
||||
permissionMap[`${elem.mapProductName}-${permissionDict[elem.type]}`] = elem.remains;
|
||||
permissionMap[`${elem.prdName}-${permissionDict[elem.permissionType]}`] = elem.remains;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -94,7 +94,7 @@ export default {
|
||||
},
|
||||
hasPermssion() {
|
||||
let isShow = false;
|
||||
if (this.courseModel.pmsList.length) {
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
isShow = true;
|
||||
}
|
||||
return isShow;
|
||||
@ -190,15 +190,14 @@ export default {
|
||||
pmsList: resp.data.pmsList || [],
|
||||
PermissionType: PermissionType.SIMULATION
|
||||
};
|
||||
|
||||
const rest = await queryPermissionSimulation({ mapId: this.courseModel.mapId, prdCode: this.courseModel.prdCode });
|
||||
this.courseModel.pmsList = rest.data;
|
||||
if (!this.courseModel.pmsList.length) {
|
||||
if (!this.courseModel.pmsList) {
|
||||
this.tryUser = 1;
|
||||
const paras = {
|
||||
mapId: data.id,
|
||||
mapProductCode: data.code,
|
||||
productType: PermissionType.SIMULATION
|
||||
prdCode: data.code,
|
||||
permissionType: PermissionType.SIMULATION
|
||||
};
|
||||
|
||||
try {
|
||||
@ -258,7 +257,7 @@ export default {
|
||||
} else if (this.courseModel.prdType == '03') {
|
||||
this.createRoom();
|
||||
} else {
|
||||
if (this.courseModel.pmsList.length) {
|
||||
if (this.courseModel.pmsList && this.courseModel.pmsList.length) {
|
||||
this.jump();
|
||||
} else {
|
||||
if (this.tryTime <= 1) {
|
||||
|
@ -109,7 +109,7 @@ export default {
|
||||
price: res.data.price,
|
||||
remarks: res.data.remarks,
|
||||
detail: res.data.examDefinitionVOList || [],
|
||||
pmsList: res.data.permissionVOList,
|
||||
pmsList: res.data.permissionVOList || [],
|
||||
prdCode: res.data.prdCode,
|
||||
mapId: res.data.mapId,
|
||||
PermissionType: PermissionType.EXAM
|
||||
@ -131,14 +131,14 @@ export default {
|
||||
query: { lessonId: this.courseModel.id }
|
||||
});
|
||||
},
|
||||
transfer() {
|
||||
transfer() { // 转增
|
||||
this.loading = false;
|
||||
if (this.$refs) {
|
||||
this.activeName = 'second';
|
||||
this.$refs.limitList.transfer(this.courseModel);
|
||||
}
|
||||
},
|
||||
distribute() {
|
||||
distribute() { // 分发
|
||||
this.loading = false;
|
||||
if (this.$refs) {
|
||||
this.activeName = 'second';
|
||||
|
@ -316,6 +316,11 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
.mapPaint{
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.map-view {
|
||||
float: left;
|
||||
width: auto;
|
||||
|
@ -585,6 +585,10 @@ export default {
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
@import "src/styles/mixin.scss";
|
||||
|
||||
.view-control{
|
||||
height: calc(100% - 100px);
|
||||
}
|
||||
|
||||
.button_box{
|
||||
width: 100%;
|
||||
background: #f0f0f0;
|
||||
|
@ -182,7 +182,6 @@ export default {
|
||||
destinationCode: '', // 目的地码
|
||||
destinationCodePoint: { x: 0, y: 0 }, // 目的地码坐标
|
||||
destinationCodeShow: false, // 是否显示目的地码
|
||||
// nameShow: false,
|
||||
axleShow: false,
|
||||
namePoint: { x: 0, y: 0 },
|
||||
kmRangeRight: 0,
|
||||
@ -190,7 +189,6 @@ export default {
|
||||
region: '',
|
||||
logicSectionNum: [],
|
||||
logicSectionShow: false,
|
||||
// logicSectionNameShow: false,
|
||||
isStandTrack: false,
|
||||
standTrackName: '',
|
||||
standTrackNamePosition: { x: 0, y: 0 },
|
||||
@ -212,7 +210,6 @@ export default {
|
||||
sepTypeRight: '',
|
||||
offsetRight: 0,
|
||||
trainPosType: '01',
|
||||
// pointY: '',
|
||||
parentCode: '',
|
||||
points: [],
|
||||
isCurve: false
|
||||
@ -326,7 +323,6 @@ export default {
|
||||
{ prop: 'relSwitchCode', label: this.$t('map.relSwitchCode'), type: 'select', optionLabel: 'code&&name', optionValue: 'code', options: this.switchList, change: true, deviceChange: this.deviceChange, isHidden: !this.isRelSwitchCode, disabled: true },
|
||||
|
||||
{ prop: 'logicSectionShow', label: this.$t('map.displayLogicalExtents'), type: 'checkbox', isHidden: !this.isSwitchSectionShow }, // 1
|
||||
// { prop: 'logicSectionNameShow', label: this.$t('map.displayLogicalWxtentNames'), type: 'checkbox', disabled: this.islogicSectionNameShow, isHidden: !this.isSwitchSectionShow }, // 1
|
||||
{ prop: 'logicSectionNameSort', label: this.$t('map.logicSectionNameSort'), type: 'radio', isHidden: !this.isLogicSectionNameSort, radioList: [
|
||||
{value: true, label: this.$t('map.fromSmallToLarge')},
|
||||
{value: false, label: this.$t('map.fromLargeToSmall')}
|
||||
@ -457,9 +453,6 @@ export default {
|
||||
isStationAxleShow() {
|
||||
return this.editModel.section == '02';
|
||||
},
|
||||
// islogicSectionNameShow() {
|
||||
// return !this.editModel.logicSectionShow;
|
||||
// },
|
||||
isstandTrackNameShow() {
|
||||
return this.editModel.type !== '03' && this.editModel.isStandTrack;
|
||||
},
|
||||
@ -561,7 +554,6 @@ export default {
|
||||
x: selected.namePosition.x,
|
||||
y: selected.namePosition.y
|
||||
};
|
||||
// this.editModel.nameShow = selected.nameShow;
|
||||
this.editModel.axleShow = selected.axleShow;
|
||||
this.editModel.relStandCode = selected.relStandCode;
|
||||
this.editModel.leftStopPointOffset = selected.leftStopPointOffset;
|
||||
@ -581,7 +573,6 @@ export default {
|
||||
|
||||
this.editModel.logicSectionNum = selected.type === '01' ? selected.logicSectionNum : [0];
|
||||
this.editModel.logicSectionShow = selected.logicSectionShow;
|
||||
// this.editModel.logicSectionNameShow = selected.logicSectionNameShow;
|
||||
this.editModel.isStandTrack = selected.isStandTrack;
|
||||
this.editModel.standTrackName = selected.standTrackName;
|
||||
this.editModel.standTrackNamePosition = {
|
||||
@ -666,7 +657,6 @@ export default {
|
||||
axleShow: false,
|
||||
type: '02',
|
||||
namePosition: { x: 0, y: 0 },
|
||||
// nameShow: model.logicSectionNameShow,
|
||||
isStandTrack: false,
|
||||
standTrackName: model.standTrackName,
|
||||
standTrackNamePosition: {
|
||||
@ -695,7 +685,6 @@ export default {
|
||||
relSwitchCode: model.relSwitchCode,
|
||||
logicSectionNum: [],
|
||||
logicSectionShow: model.logicSectionShow,
|
||||
// logicSectionNameShow: model.logicSectionNameShow,
|
||||
stationCode: model.stationCode,
|
||||
linkCode: model.linkCode,
|
||||
offsetLeft: middleOffset * (index) + model.offsetLeft,
|
||||
@ -776,7 +765,6 @@ export default {
|
||||
code: uid,
|
||||
name: uname,
|
||||
type: '01',
|
||||
// nameShow: true,
|
||||
axleShow: false,
|
||||
isStandTrack: false,
|
||||
standTrackName: '',
|
||||
@ -797,7 +785,6 @@ export default {
|
||||
namePosition: { x: 0, y: 0 },
|
||||
logicSectionNum: [0],
|
||||
logicSectionShow: true,
|
||||
// logicSectionNameShow: true,
|
||||
logicSectionNameSort: true,
|
||||
linkCode: link.code,
|
||||
sepTypeLeft: '01',
|
||||
@ -880,8 +867,6 @@ export default {
|
||||
relStandCode: this.editModel.relStandCode,
|
||||
leftStopPointOffset: Number(this.editModel.leftStopPointOffset),
|
||||
rightStopPointOffset: Number(this.editModel.rightStopPointOffset),
|
||||
|
||||
// nameShow: this.editModel.nameShow,
|
||||
axleShow: this.editModel.axleShow,
|
||||
namePosition: {
|
||||
x: this.editModel.namePoint.x,
|
||||
@ -919,7 +904,6 @@ export default {
|
||||
points: JSON.parse(pointArr),
|
||||
logicSectionNum: this.editModel.logicSectionNum,
|
||||
logicSectionShow: this.editModel.logicSectionShow,
|
||||
// logicSectionNameShow: this.editModel.logicSectionNameShow,
|
||||
sepTypeLeft: this.editModel.sepTypeLeft,
|
||||
offsetLeft: this.editModel.offsetLeft,
|
||||
sepTypeRight: this.editModel.sepTypeRight,
|
||||
@ -947,15 +931,10 @@ export default {
|
||||
const model = this.buildEditModel();
|
||||
this.sectionList.forEach(section => {
|
||||
if (section.parentCode == model.code) {
|
||||
// section.nameShow = section.logicSectionNameShow = model.logicSectionNameShow;
|
||||
section.logicSectionShow = model.logicSectionShow;
|
||||
section.trainPosType = model.trainPosType;
|
||||
edits.push(section);
|
||||
}
|
||||
// if (section.points[0].y == this.editModel.pointY && section.points[section.points.length - 1].y == this.editModel.pointY) {
|
||||
// section.trainPosType = this.editModel.trainPosType;
|
||||
// edits.push(section);
|
||||
// }
|
||||
});
|
||||
edits.push(model);
|
||||
this.fieldS = '';
|
||||
@ -1005,7 +984,6 @@ export default {
|
||||
name: uidL,
|
||||
type: '01',
|
||||
parentCode: '',
|
||||
// nameShow: selected.nameShow,
|
||||
axleShow: selected.axleShow,
|
||||
isStandTrack: false,
|
||||
kmRangeRight: '',
|
||||
@ -1026,7 +1004,6 @@ export default {
|
||||
logicSectionNameSort: selected.logicSectionNameSort,
|
||||
logicSectionNum: selected.logicSectionNum,
|
||||
logicSectionShow: selected.logicSectionShow,
|
||||
// logicSectionNameShow: selected.logicSectionNameShow,
|
||||
sepTypeLeft: selected.sepTypeLeft,
|
||||
offsetLeft: selected.offsetLeft,
|
||||
sepTypeRight: '01',
|
||||
@ -1052,7 +1029,6 @@ export default {
|
||||
name: uidR,
|
||||
type: '01',
|
||||
parentCode: '',
|
||||
// nameShow: selected.nameShow,
|
||||
axleShow: selected.axleShow,
|
||||
isStandTrack: false,
|
||||
kmRangeRight: '',
|
||||
@ -1073,7 +1049,6 @@ export default {
|
||||
logicSectionNameSort: selected.logicSectionNameSort,
|
||||
logicSectionNum: selected.logicSectionNum,
|
||||
logicSectionShow: selected.logicSectionShow,
|
||||
// logicSectionNameShow: selected.logicSectionNameShow,
|
||||
sepTypeLeft: '01',
|
||||
offsetLeft: selected.offsetLeft,
|
||||
sepTypeRight: selected.sepTypeRight,
|
||||
@ -1165,7 +1140,6 @@ export default {
|
||||
});
|
||||
|
||||
if (lsection.points[lsection.points.length - 1].x == rsection.points[0].x && lsection.points[lsection.points.length - 1].y == rsection.points[0].y) {
|
||||
// model.nameShow = lsection.nameShow;
|
||||
model.axleShow = lsection.axleShow;
|
||||
model.logicSectionNum = lsection.logicSectionNum;
|
||||
model.logicSectionShow = lsection.logicSectionShow;
|
||||
@ -1174,7 +1148,6 @@ export default {
|
||||
model.offsetLeft = lsection.offsetLeft;
|
||||
model.sepTypeRight = rsection.sepTypeRight;
|
||||
model.offsetRight = lsection.offsetRight + rsection.offsetRight;
|
||||
// model.logicSectionNameShow = lsection.logicSectionNameShow;
|
||||
model.isCurve = lsection.isCurve;
|
||||
model.points = [
|
||||
{ x: lsection.points[0].x, y: lsection.points[0].y },
|
||||
@ -1186,7 +1159,6 @@ export default {
|
||||
this.$emit('addOrUpdateMapModel', model);
|
||||
}
|
||||
if (lsection.points[0].x == rsection.points[rsection.points.length - 1].x && lsection.points[0].y == rsection.points[rsection.points.length - 1].y) {
|
||||
// model.nameShow = rsection.nameShow;
|
||||
model.axleShow = rsection.axleShow;
|
||||
model.logicSectionNum = rsection.logicSectionNum;
|
||||
model.logicSectionShow = rsection.logicSectionShow;
|
||||
@ -1195,7 +1167,6 @@ export default {
|
||||
model.offsetLeft = rsection.offsetLeft;
|
||||
model.sepTypeRight = lsection.sepTypeRight;
|
||||
model.offsetRight = lsection.offsetRight + rsection.offsetRight;
|
||||
// model.logicSectionNameShow = rsection.logicSectionNameShow;
|
||||
model.isCurve = rsection.isCurve;
|
||||
model.points = [
|
||||
{ x: rsection.points[0].x, y: rsection.points[0].y },
|
||||
@ -1269,7 +1240,6 @@ export default {
|
||||
code: uid,
|
||||
name: sectiona.name || sectionb.name || sectionc.name,
|
||||
type: '03',
|
||||
// nameShow: true,
|
||||
axleShow: false,
|
||||
namePosition: point,
|
||||
isStandTrack: false,
|
||||
@ -1291,7 +1261,6 @@ export default {
|
||||
points: [{ x: 0, y: 0 }, { x: 0, y: 0 }],
|
||||
logicSectionNum: [0],
|
||||
logicSectionShow: false,
|
||||
// logicSectionNameShow: false,
|
||||
sepTypeLeft: '00',
|
||||
offsetLeft: 0,
|
||||
sepTypeRight: '00',
|
||||
|
@ -223,7 +223,6 @@ export default {
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
// { prop: 'nameShow', label: this.$t('map.signalDisplayName'), type: 'checkbox' },
|
||||
{ prop: 'lampPostType', label: this.$t('map.lampPostType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPostTypeList },
|
||||
{ prop: 'lampPositionType', label: this.$t('map.lampPositionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalLampPositionTypeList },
|
||||
{ prop: 'directionType', label: this.$t('map.signalDirectionType'), type: 'select', optionLabel: 'name', optionValue: 'code', options: this.SignalDirectionTypeList },
|
||||
|
@ -118,6 +118,7 @@ export default {
|
||||
{ prop: 'position.x', firstLevel: 'position', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px' },
|
||||
{ prop: 'position.y', firstLevel: 'position', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
|
||||
] },
|
||||
{ prop: 'visible', label: this.$t('map.stationstandShowName'), type: 'checkbox' },
|
||||
{ prop: 'nameFont', label: this.$t('map.stationNameFont'), type: 'font', placeholder: this.$t('tip.stationFont') },
|
||||
{ prop: 'nameFontColor', label: this.$t('map.stationNameFontColor'), type: 'color' },
|
||||
{ prop: 'kmRange', label: this.$t('map.stationKmRange'), type: 'number', min: 0, placeholder: this.$t('tip.meter') },
|
||||
@ -236,7 +237,6 @@ export default {
|
||||
zcCode: '',
|
||||
runPlanName: '',
|
||||
visible: true,
|
||||
nameShow: true,
|
||||
nameFont: '14px consolas',
|
||||
nameFontColor: '#FFFFFF',
|
||||
kmPost: '1000km~2000km',
|
||||
|
@ -6,6 +6,7 @@
|
||||
|
||||
<script>
|
||||
import { getLessonPermissonPageList } from '@/api/management/author';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
|
||||
export default {
|
||||
@ -15,6 +16,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
PermissionTypeList: [],
|
||||
mapList: [],
|
||||
ruleList: [
|
||||
{ value: true, label: '是' },
|
||||
{ value: false, label: '否' }
|
||||
@ -24,7 +26,7 @@ export default {
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '140px',
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'name': {
|
||||
@ -47,6 +49,13 @@ export default {
|
||||
{ value: false, label: '否' }
|
||||
]
|
||||
}
|
||||
},
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -66,6 +75,13 @@ export default {
|
||||
columnValue: (row) => { return this.$convertField(row.isPackage, this.ruleList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: '所属地图',
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permissionType'),
|
||||
prop: 'type',
|
||||
@ -110,7 +126,7 @@ export default {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
async loadInitData() {
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.type.config.data.push({ value: elem.code, label: elem.name });
|
||||
@ -119,6 +135,17 @@ export default {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
try {
|
||||
// 获取地图
|
||||
this.mapList = [];
|
||||
const res = await listPublishMap();
|
||||
res.data.forEach(elem => {
|
||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||
this.mapList.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
}
|
||||
},
|
||||
queryFunction(params) {
|
||||
return getLessonPermissonPageList(params);
|
||||
|
@ -36,6 +36,7 @@ export default {
|
||||
show: false,
|
||||
productTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
mapList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -48,26 +49,19 @@ export default {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.name')
|
||||
},
|
||||
productType: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.productType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
// productType: {
|
||||
// type: 'select',
|
||||
// label: this.$t('orderAuthor.productType'),
|
||||
// config: {
|
||||
// data: []
|
||||
// }
|
||||
// },
|
||||
mapId: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.map'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
status: {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.state'),
|
||||
config: {
|
||||
data: this.$ConstSelect.Status
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -81,28 +75,20 @@ export default {
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productType'),
|
||||
prop: 'productType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.productType, this.productTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.mapName'),
|
||||
prop: 'mapName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.productName'),
|
||||
prop: 'prdName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseName'),
|
||||
prop: 'lessonName'
|
||||
title: '权限名称',
|
||||
prop: 'permissionName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.price'),
|
||||
prop: 'price'
|
||||
},
|
||||
{
|
||||
title: '所属地图',
|
||||
prop: 'mapId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.mapId, this.mapList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.state'),
|
||||
prop: 'status',
|
||||
@ -160,20 +146,13 @@ export default {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
// 产品类型
|
||||
this.$Dictionary.productType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.productType.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.productTypeList, elem => {
|
||||
return true;
|
||||
});
|
||||
});
|
||||
try {
|
||||
// 获取地图
|
||||
this.mapList = [];
|
||||
const res = await listPublishMap();
|
||||
res.data.forEach(elem => {
|
||||
this.queryForm.queryObject.mapId.config.data.push({ value: elem.id, label: elem.name });
|
||||
this.mapList.push({ value: elem.id, label: elem.name });
|
||||
});
|
||||
} catch (error) {
|
||||
console.error(error, '获取发布地图');
|
||||
|
@ -52,7 +52,11 @@ export default {
|
||||
handleSure() {
|
||||
this.doClose();
|
||||
Object.assign(this.data, this.formModel);
|
||||
this.$emit('distribute', this.data);
|
||||
const model = {
|
||||
code: this.data.code,
|
||||
canDistribute: this.data.canDistribute ? this.data.canDistribute : false
|
||||
};
|
||||
this.$emit('distribute', model);
|
||||
},
|
||||
handleClose() {
|
||||
this.doClose();
|
||||
|
115
src/views/orderauthor/order/detail.vue
Normal file
115
src/views/orderauthor/order/detail.vue
Normal file
@ -0,0 +1,115 @@
|
||||
<template>
|
||||
<el-dialog title="订单详情" :visible.sync="show" width="500px" :before-do-close="doClose" :close-on-click-modal="false">
|
||||
<div>
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="height: 400px">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" class="data-box" />
|
||||
</el-scrollbar>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doClose">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'RouteDetail',
|
||||
components: {
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
formModel: {
|
||||
organizationName: '',
|
||||
userName: '',
|
||||
goodsName: '',
|
||||
amount: '',
|
||||
forever: '',
|
||||
startTime: '',
|
||||
monthAmount: '',
|
||||
totalPrice: '',
|
||||
payWays: '',
|
||||
createTime: '',
|
||||
orderType: '',
|
||||
contractNo: '',
|
||||
bizType: '',
|
||||
payStatusZh: '',
|
||||
sellerName: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
form() {
|
||||
const form = {
|
||||
labelWidth: '120px',
|
||||
items: [
|
||||
{ prop: 'organizationName', label: `${this.$t('orderAuthor.organizationOrEnterprise')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'userName', label: `${this.$t('orderAuthor.userName')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'goodsName', label: `${this.$t('orderAuthor.commodityName')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'amount', label: `${this.$t('orderAuthor.permissionNumber')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'forever', label: `${this.$t('orderAuthor.permanenceOrNot')}:`, type: 'radio', disabled: true, required: false, options: this.$ConstSelect.Whether },
|
||||
{ prop: 'startTime', label: `${this.$t('orderAuthor.startDate')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'monthAmount', label: `${this.$t('orderAuthor.purchaseMonths')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'totalPrice', label: `${this.$t('orderAuthor.totalPrice')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'payWays', label: `${this.$t('orderAuthor.paymentMethod')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'createTime', label: `${this.$t('orderAuthor.creationDate')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'orderType', label: `${this.$t('orderAuthor.orderType')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'contractNo', label: `${this.$t('orderAuthor.contractNumber')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'bizType', label: `${this.$t('orderAuthor.businessType')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'payStatusZh', label: `${this.$t('orderAuthor.paymentStatus')}:`, type: 'text', disabled: true },
|
||||
{ prop: 'sellerName', label: `${this.$t('orderAuthor.salesman')}:`, type: 'text', disabled: true }
|
||||
]
|
||||
|
||||
};
|
||||
return form;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
doShow(data) {
|
||||
this.show = true;
|
||||
this.formModel = {
|
||||
organizationName: data.organizationName,
|
||||
userName: data.userName,
|
||||
goodsName: data.goodsName,
|
||||
amount: data.amount,
|
||||
forever: data.forever,
|
||||
startTime: data.startTime,
|
||||
monthAmount: data.monthAmount,
|
||||
totalPrice: data.totalPrice,
|
||||
payWays: data.payWays,
|
||||
createTime: data.createTime,
|
||||
orderType: data.orderType,
|
||||
contractNo: data.contractNo,
|
||||
bizType: data.bizType,
|
||||
payStatusZh: data.payStatusZh,
|
||||
sellerName: data.sellerName
|
||||
};
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.draft {
|
||||
width: 400px;
|
||||
text-align: center;
|
||||
margin: 20px auto;
|
||||
}
|
||||
/deep/{
|
||||
.data-box .el-form-item {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
@ -103,9 +103,6 @@ export default {
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
// turnbackBarTitle() {
|
||||
// return '';
|
||||
// },
|
||||
isAdd() {
|
||||
return this.type === 'ADD';
|
||||
},
|
||||
|
@ -3,6 +3,7 @@
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<can-distribute ref="canDistribute" @distribute="distribute" />
|
||||
<qr-code ref="qrCode" />
|
||||
<detail ref="detail" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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({
|
||||
|
88
src/views/orderauthor/permission/Qcode.vue
Normal file
88
src/views/orderauthor/permission/Qcode.vue
Normal file
@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<el-dialog title="扫码" :visible.sync="centerDialogVisible" width="30%" center>
|
||||
<el-input v-model="input" :placeholder="$t('global.inputRoomNumber')" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">{{ $t('global.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="comit">{{ $t('global.confirm') }}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPermission } from '@/api/management/distribute';
|
||||
|
||||
export default {
|
||||
name: 'Dashboard',
|
||||
data() {
|
||||
return {
|
||||
centerDialogVisible: false,
|
||||
input: ''
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
doShow() {
|
||||
this.centerDialogVisible = true;
|
||||
},
|
||||
doClose() {
|
||||
this.centerDialogVisible = false;
|
||||
},
|
||||
async comit() {
|
||||
if (this.input) {
|
||||
try {
|
||||
await getPermission(`${this.input}`);
|
||||
this.centerDialogVisible = false;
|
||||
} catch (error) {
|
||||
this.$messageBox(`${this.$t('error.scanningError')}:${error.message}`);
|
||||
}
|
||||
} else {
|
||||
this.$messageBox(this.$t('global.inputRoomNumber'));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.dashboard {
|
||||
&-container {
|
||||
margin: 30px;
|
||||
}
|
||||
|
||||
&-text {
|
||||
font-size: 30px;
|
||||
line-height: 46px;
|
||||
}
|
||||
}
|
||||
|
||||
/deep/ .el-carousel {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.home-box {
|
||||
float: left;
|
||||
width: 100%;
|
||||
font-family: 'Microsoft YaHei';
|
||||
|
||||
.title {
|
||||
font-size: 45px;
|
||||
text-align: center;
|
||||
font-weight: 400;
|
||||
border-bottom: 2px dashed #333;
|
||||
padding-bottom: 15px;
|
||||
margin: 50px 200px 120px 200px;
|
||||
position: relative;
|
||||
|
||||
.logo-img {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 55px;
|
||||
}
|
||||
}
|
||||
|
||||
.card-box {
|
||||
width: 100%;
|
||||
padding: 0 300px;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -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; }
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -16,16 +16,16 @@
|
||||
style="width: 100%"
|
||||
:height="height-300"
|
||||
>
|
||||
<el-table-column prop="mapName" :label="this.$t('orderAuthor.mapName')" />
|
||||
<el-table-column prop="mapProductName" :label="this.$t('orderAuthor.mapProductName')" width="120" />
|
||||
<el-table-column prop="permissionName" label="权限名称" />
|
||||
<!-- <el-table-column prop="mapProductName" :label="this.$t('orderAuthor.mapProductName')" width="120" />
|
||||
<el-table-column prop="lessonName" :label="this.$t('orderAuthor.courseName')" width="100" />
|
||||
<el-table-column prop="permissionType" :label="this.$t('orderAuthor.permissionType')" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-table-column prop="permissionType" :label="this.$t('orderAuthor.permissionType')" width="100"> -->
|
||||
<!-- <template slot-scope="scope">
|
||||
{{ computedName(PermissionTypeList, scope.row.permissionType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" :label="this.$t('orderAuthor.totalPermissions')" width="80" />
|
||||
<el-table-column prop="remains" :label="this.$t('orderAuthor.residualPermissionNumber')" width="80" />
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="amount" :label="this.$t('orderAuthor.totalPermissions')" width="120" />
|
||||
<el-table-column prop="remains" :label="this.$t('orderAuthor.residualPermissionNumber')" width="120" />
|
||||
<el-table-column :label="this.$t('global.operate')" width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="deleteForm(scope.$index, scope.row)">{{ $t('global.delete') }}
|
||||
@ -37,7 +37,7 @@
|
||||
<div class="draft">
|
||||
<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="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.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
|
@ -2,6 +2,7 @@
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<qr-code ref="qrCode" />
|
||||
<qcode ref="qcode" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -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();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -1,174 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<div class="draft">
|
||||
<el-button-group>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.return') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getPermissionPackageDetail } from '@/api/management/distribute';
|
||||
|
||||
export default {
|
||||
name: 'TrainsferDetail',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
height: 0,
|
||||
WhetherTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
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.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',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.courseAuthorityStatus'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.$convertList(list, this.EffectiveTypeList, 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;
|
||||
});
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property];
|
||||
},
|
||||
queryFunction(params) {
|
||||
// if (params.permissionType) {
|
||||
return getPermissionPackageDetail(this.$route.params.permissionId, params);
|
||||
// }
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
turnback() {
|
||||
this.$router.go(-1);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.draft {
|
||||
width: 400px;
|
||||
text-align: center;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
@ -1,221 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="show"
|
||||
top="20px"
|
||||
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>
|
||||
|
||||
<script>
|
||||
import { listCanPackagePermission } from '@/api/management/distribute';
|
||||
|
||||
export default {
|
||||
name: 'Author',
|
||||
props: {
|
||||
ruleList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
effectiveTypeList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
permissionTypeList: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
param: '',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '100px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'permissionType': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'canDistribute': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.publicOrPrivate'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
queryList: {
|
||||
query: this.queryFunction,
|
||||
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.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',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
tagType: (row) => {
|
||||
switch (row.canDistribute) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||
tagType: (row) => {
|
||||
switch (row.forever) {
|
||||
case true: return 'success';
|
||||
case false: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
// {
|
||||
// title: '权限总数',
|
||||
// prop: 'amount'
|
||||
// },
|
||||
// {
|
||||
// title: '剩余权限数量',
|
||||
// prop: 'remains'
|
||||
// },
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '120',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.add'),
|
||||
handleClick: this.handlePut,
|
||||
type: '',
|
||||
showControl: (row) => { return !row.isPut && row.permissionType; }
|
||||
},
|
||||
{
|
||||
name: this.$t('global.delete'),
|
||||
handleClick: this.handlePop,
|
||||
type: 'warning',
|
||||
showControl: (row) => { return row.isPut && row.permissionType; }
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
return this.$t('orderAuthor.editPermissionRules');
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
PermissionTypeList: function (list) {
|
||||
if (list && list.length) {
|
||||
this.queryForm.queryObject.permissionType.config.data = list;
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.queryForm.queryObject.canDistribute.config.data = this.$ConstSelect.PermissionUseList;
|
||||
},
|
||||
methods: {
|
||||
formatterDate(row, porpInfo) {
|
||||
return String(row[porpInfo.property] || '').split(' ')[0];
|
||||
},
|
||||
async queryFunction(params) {
|
||||
const resp = await listCanPackagePermission(params);
|
||||
this.ruleList.forEach(elem => {
|
||||
resp.data.list.forEach(item => {
|
||||
if (item.id == elem.id) {
|
||||
item.isPut = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return resp;
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
this.queryList.reload();
|
||||
}
|
||||
},
|
||||
doShow() {
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
handlePut(index, row) {
|
||||
this.$emit('addRuleForm', index, row);
|
||||
},
|
||||
handlePop(index, row) {
|
||||
this.$emit('deleteForm', index, row);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,242 +0,0 @@
|
||||
<template>
|
||||
<el-card>
|
||||
<div class="pack-box" :style="{ height: height +'px' }">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" style="">
|
||||
<el-steps class="steps" :active="display">
|
||||
<el-step :title="this.$t('orderAuthor.selectPermissionsPackage')" icon="el-icon-edit" />
|
||||
<el-step icon="el-icon-setting" />
|
||||
</el-steps>
|
||||
<el-card class="forms pack-rule">
|
||||
<el-button class="addList" size="small" @click="dialogSelect">{{ $t('orderAuthor.addRecords') }}</el-button>
|
||||
<el-table
|
||||
:data="ruleList"
|
||||
border
|
||||
show-summary
|
||||
:summary-method="getSummaries"
|
||||
style="width: 100%"
|
||||
:height="height-300"
|
||||
>
|
||||
<el-table-column prop="mapName" :label="this.$t('orderAuthor.mapName')" />
|
||||
<el-table-column prop="mapProductName" :label="this.$t('orderAuthor.mapProductName')" width="120" />
|
||||
<el-table-column prop="lessonName" :label="this.$t('orderAuthor.courseName')" width="100" />
|
||||
<el-table-column prop="permissionType" :label="this.$t('orderAuthor.permissionType')" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ computedName(PermissionTypeList, scope.row.permissionType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="amount" :label="this.$t('orderAuthor.totalPermissions')" width="80" />
|
||||
<el-table-column prop="remains" :label="this.$t('orderAuthor.residualPermissionNumber')" width="80" />
|
||||
<el-table-column :label="this.$t('global.operate')" width="60">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="deleteForm(scope.$index, scope.row)">{{ $t('global.delete') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="draft">
|
||||
<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="QrCodeShow">{{ $t('orderAuthor.obtainQrCode') }}</el-button>
|
||||
<el-button type="primary" @click="turnback">{{ $t('global.back') }}</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
<choose-permission
|
||||
ref="choosePermission"
|
||||
:rule-list="ruleList"
|
||||
:effective-type-list="EffectiveTypeList"
|
||||
:permission-type-list="PermissionTypeList"
|
||||
@addRuleForm="addRuleForm"
|
||||
@deleteForm="deleteForm"
|
||||
/>
|
||||
</el-scrollbar>
|
||||
<qr-code ref="qrCode" />
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import { UrlConfig } from '@/router/index';
|
||||
import { permissionDistributePackage } from '@/api/management/distribute';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import ChoosePermission from './choosePermission';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
export default {
|
||||
name: 'PackRule',
|
||||
components: {
|
||||
ChoosePermission,
|
||||
QrCode
|
||||
},
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
display: 1,
|
||||
height: 0,
|
||||
urlInfo: {},
|
||||
ruleList: [],
|
||||
EffectiveTypeList: [],
|
||||
PermissionTypeList: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
turnback() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
resizeHandler: function () {
|
||||
this.height = this._clientHeight - 62;
|
||||
},
|
||||
computedName(list, code) {
|
||||
let name = '';
|
||||
list.forEach(elem => {
|
||||
if (elem.value == code) {
|
||||
name = elem.label;
|
||||
}
|
||||
});
|
||||
return name;
|
||||
},
|
||||
loadInitData() {
|
||||
this.EffectiveTypeList = [];
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
this.EffectiveTypeList = list.map(elem => { return { value: elem.code, label: elem.name }; });
|
||||
});
|
||||
|
||||
this.PermissionTypeList = [];
|
||||
this.$Dictionary.permissionType().then(list => {
|
||||
this.PermissionTypeList = list.map(elem => { return { value: elem.code, label: elem.name }; });
|
||||
});
|
||||
},
|
||||
getSummaries(param) {
|
||||
const { columns, data } = param;
|
||||
const sums = [];
|
||||
columns.forEach((column, index) => {
|
||||
if (index === 0) {
|
||||
sums[index] = this.$t('orderAuthor.totalNumber');
|
||||
return;
|
||||
}
|
||||
|
||||
if (index === 4 || index === 5) {
|
||||
const values = data.map(item => Number(item[column.property]));
|
||||
if (!values.every(value => isNaN(value))) {
|
||||
sums[index] = values.reduce((prev, curr) => {
|
||||
const value = Number(curr);
|
||||
if (!isNaN(value)) {
|
||||
return prev + curr;
|
||||
} else {
|
||||
return prev;
|
||||
}
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return sums;
|
||||
},
|
||||
dialogSelect(row) {
|
||||
this.$refs.choosePermission.doShow();
|
||||
},
|
||||
deleteForm(index, row) {
|
||||
const idx = this.ruleList.findIndex(elem => { return elem.id == row.id; });
|
||||
if (idx >= 0) {
|
||||
row['isPut'] = false;
|
||||
this.ruleList.splice(idx, 1);
|
||||
}
|
||||
EventBus.$emit('reloadTable', { index: index, list: row });
|
||||
},
|
||||
addRuleForm(index, row) {
|
||||
row['isPut'] = true;
|
||||
this.ruleList.push(row);
|
||||
EventBus.$emit('reloadTable', { index: index, list: row });
|
||||
},
|
||||
packForm() {
|
||||
if (this.ruleList && this.ruleList.length) {
|
||||
const dis = [];
|
||||
this.ruleList.forEach(elem => {
|
||||
dis.push(elem.id);
|
||||
});
|
||||
|
||||
permissionDistributePackage(dis).then(resp => {
|
||||
this.urlInfo = {
|
||||
url: resp.data,
|
||||
title: this.$t('orderAuthor.permissionToDistributeQRCode')
|
||||
};
|
||||
this.qrCodeShow();
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('tip.packagingFailed'));
|
||||
});
|
||||
} else {
|
||||
this.$messageBox(this.$t('tip.selectPackagingRecord'));
|
||||
}
|
||||
},
|
||||
qrCodeShow() {
|
||||
if (this.$refs) {
|
||||
this.$refs.qrCode.doShow(this.urlInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||
.pack-box {
|
||||
padding-top: 10px;
|
||||
|
||||
/deep/ {
|
||||
.el-step__icon.is-icon {
|
||||
width: 95px;
|
||||
}
|
||||
}
|
||||
|
||||
.steps {
|
||||
width: 980px;
|
||||
margin: 0 auto;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
.forms {
|
||||
width: 800px;
|
||||
margin: 0 auto;
|
||||
margin-top: 20px;
|
||||
padding: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
}
|
||||
|
||||
.pack-rule {
|
||||
.addList {
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
margin-bottom: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn-footer {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/deep/ .el-table__footer-wrapper {
|
||||
.is-leaf:nth-child(3) {
|
||||
font-size: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.draft {
|
||||
width: 400px;
|
||||
text-align: center;
|
||||
margin: 20px auto;
|
||||
}
|
||||
</style>
|
@ -1,20 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<select-role ref="selectRole" @reloadTable="reloadTable" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { superAdmin } from '@/router';
|
||||
import { listPackagePermission } from '@/api/management/distribute';
|
||||
// import { UrlConfig } from '@/router/index';
|
||||
import { listPermision } from '@/api/management/author';
|
||||
import selectRole from './selectRole/list';
|
||||
|
||||
export default {
|
||||
name: 'Author',
|
||||
components: {
|
||||
selectRole
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
PermissionTypeList: [],
|
||||
EffectiveTypeList: [],
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
@ -23,13 +26,19 @@ export default {
|
||||
labelWidth: '120px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
'userName': {
|
||||
type: 'text',
|
||||
label: this.$t('orderAuthor.userName')
|
||||
permissionType: {
|
||||
type: 'select',
|
||||
label: this.$t('permission.permissionType'),
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
},
|
||||
'userMobile': {
|
||||
type: 'text',
|
||||
label: this.$t('global.mobile')
|
||||
status: {
|
||||
type: 'select',
|
||||
label: '状态类型',
|
||||
config: {
|
||||
data: []
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -39,31 +48,19 @@ export default {
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('orderAuthor.organizationOrEnterprise'),
|
||||
prop: 'organizationName'
|
||||
title: '权限名称',
|
||||
width: '260',
|
||||
prop: 'permissionName'
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.founder'),
|
||||
prop: 'userName'
|
||||
title: this.$t('permission.permissionType'),
|
||||
prop: 'permissionType',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.permissionType, this.PermissionTypeList, ['value', 'label']); },
|
||||
tagType: (row) => { return ''; }
|
||||
},
|
||||
{
|
||||
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.publicOrPrivate'),
|
||||
title: this.$t('permission.permissionUseType'),
|
||||
prop: 'canDistribute',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.canDistribute, 'PermissionUseList'); },
|
||||
@ -75,7 +72,7 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.permanenceOrNot'),
|
||||
title: this.$t('permission.isForever'),
|
||||
prop: 'forever',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$ConstSelect.translate(row.forever, 'Whether'); },
|
||||
@ -87,24 +84,52 @@ export default {
|
||||
}
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.startTime'),
|
||||
title: this.$t('permission.permissionTotal'),
|
||||
prop: 'amount'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionRemains'),
|
||||
prop: 'remains'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.startTime'),
|
||||
prop: 'startTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.endTime'),
|
||||
title: this.$t('permission.endTime'),
|
||||
prop: 'endTime',
|
||||
type: 'formatter',
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.belonger'),
|
||||
prop: 'ownerName'
|
||||
},
|
||||
{
|
||||
title: this.$t('permission.permissionStatus'),
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
tagType: (row) => {
|
||||
switch (row.status) {
|
||||
case '1': return 'success';
|
||||
default: return 'danger';
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '200',
|
||||
hide: (row) => { return this.$store.state.user.roles.indexOf(superAdmin) < 0; },
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('permission.setBelonger'),
|
||||
handleClick: this.handleRoleVest,
|
||||
type: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@ -118,14 +143,33 @@ export default {
|
||||
this.loadInitData();
|
||||
},
|
||||
methods: {
|
||||
handleRoleVest(index, row) {
|
||||
this.$refs.selectRole.doShow(row.id);
|
||||
},
|
||||
loadInitData() {
|
||||
this.$Dictionary.effectiveType().then(list => {
|
||||
list.forEach(elem => {
|
||||
this.queryForm.queryObject.status.config.data.push({ value: elem.code, label: elem.name });
|
||||
});
|
||||
this.$convertList(list, this.EffectiveTypeList, 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;
|
||||
});
|
||||
});
|
||||
},
|
||||
formatterDate(row, porpInfo) {
|
||||
return row[porpInfo.property];
|
||||
},
|
||||
queryFunction(params) {
|
||||
return listPackagePermission(params);
|
||||
return listPermision(params);
|
||||
},
|
||||
reloadTable() {
|
||||
if (this.queryList && this.queryList.reload) {
|
||||
|
111
src/views/orderauthor/rules/selectRole/list.vue
Normal file
111
src/views/orderauthor/rules/selectRole/list.vue
Normal file
@ -0,0 +1,111 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="$t('permission.userList')"
|
||||
:visible.sync="show"
|
||||
top="20px"
|
||||
width="90%"
|
||||
:before-do-close="doClose"
|
||||
:close-on-click-modal="false"
|
||||
>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserList } from '@/api/management/user';
|
||||
import { putPermissionOwner } from '@/api/management/author';
|
||||
|
||||
export default {
|
||||
name: 'SelectRole',
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
roleId: '',
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('global.name')
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: getUserList,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('global.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.nickName'),
|
||||
prop: 'nickname'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.email'),
|
||||
prop: 'email'
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
title: this.$t('global.operate'),
|
||||
width: '250',
|
||||
buttons: [
|
||||
{
|
||||
name: this.$t('global.select'),
|
||||
handleClick: this.selectRole,
|
||||
showControl: (row) => {
|
||||
return row.id != this.$store.state.user.id;
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
currentModel: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
doShow(roleId) {
|
||||
this.roleId = roleId;
|
||||
this.show = true;
|
||||
},
|
||||
doClose() {
|
||||
this.show = false;
|
||||
},
|
||||
|
||||
selectRole(index, row) {
|
||||
this.$confirm(this.$t('permission.isSureSetBelonger').replace('{name}', row.name), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
putPermissionOwner({ id: this.roleId, owner: row }).then(resp => {
|
||||
this.$message.success(this.$t('permission.setSuccess'));
|
||||
this.show = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(() => {
|
||||
this.$messageBox(this.$t('error.setFailed'));
|
||||
});
|
||||
}).catch(() => { });
|
||||
},
|
||||
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -2,7 +2,7 @@
|
||||
<el-dialog :title="title" :visible.sync="show" width="800px" :before-close="doClose" center>
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" :disabled="disabled" @click="draftRule">{{ isAdd? $t('global.add'): $t('global.edit') }}
|
||||
<el-button type="primary" @click="draftRule">{{ isAdd? $t('global.add'): $t('global.edit') }}
|
||||
</el-button>
|
||||
<el-button @click="doClose">{{ $t('global.cancel') }}</el-button>
|
||||
</span>
|
||||
@ -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(() => {
|
||||
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();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -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',
|
||||
|
@ -8,48 +8,49 @@
|
||||
<span class="list-label">{{ $t('global.updateTime') }}</span>
|
||||
<span class="list-elem">{{ courseModel.updateTime }}</span>
|
||||
</p>
|
||||
<p class="list-item" v-if="!courseModel.pmsList.length">
|
||||
<p v-if="!courseModel.pmsList.length" class="list-item">
|
||||
<span class="list-label">{{ $t('screenMonitor.productTrialDuration') }}</span>
|
||||
<span class="list-elem">{{ showTryTime }}</span>
|
||||
</p>
|
||||
<p class="list-item">
|
||||
<span class="list-label">{{ $t('global.permissionList') }}</span>
|
||||
</p>
|
||||
<limit-list ref="limitList" :courseModel="courseModel" @initLoadPage="getScreenLists"></limit-list>
|
||||
<limit-list ref="limitList" :course-model="courseModel" @initLoadPage="getScreenLists" />
|
||||
<p style="display: flex; justify-content: center;">
|
||||
<span class="list-label"></span>
|
||||
<span class="list-label" />
|
||||
<el-button type="success" @click="buy">{{ $t('global.buy') }}</el-button>
|
||||
<el-button type="primary" @click="distribute" v-if="hasPermssion">{{$t('global.distributePermission')}}</el-button>
|
||||
<el-button type="primary" @click="transfer" v-if="hasPermssion">{{$t('global.transferQRCode')}}</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="distribute">{{ $t('global.distributePermission') }}</el-button>
|
||||
<el-button v-if="hasPermssion" type="primary" @click="transfer">{{ $t('global.transferQRCode') }}</el-button>
|
||||
<el-button type="primary" @click="start">{{ $t('screenMonitor.aTSScreenSimulation') }}</el-button>
|
||||
</p>
|
||||
</div>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="jump"></set-time>
|
||||
<set-time ref="setTime" @ConfirmSelectBeginTime="jump" />
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { getCourseLessonTree } from '@/api/management/exam';
|
||||
import { listPublishMap, getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { getPublishMapInfo } from '@/api/jmap/map';
|
||||
import { queryPermissionScreen } from '@/api/management/author';
|
||||
import { getGoodsTryUse } from '@/api/management/goods';
|
||||
import { PermissionType } from '@/scripts/ConstDic';
|
||||
import { launchFullscreen } from '@/utils/screen';
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import WindowResizeHandler from '@/mixin/WindowResizeHandler';
|
||||
import LimitList from "@/views/components/limits/index";
|
||||
import LimitList from '@/views/components/limits/index';
|
||||
import SetTime from '@/views/display/demon/setTime';
|
||||
import { bitScreenNotify } from '@/api/simulation';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailList',
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
],
|
||||
components: {
|
||||
LimitList,
|
||||
SetTime
|
||||
},
|
||||
filters: {
|
||||
},
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
height: '',
|
||||
@ -58,20 +59,15 @@
|
||||
name: '',
|
||||
skinCode: '',
|
||||
updateTime: '',
|
||||
pmsList: [],
|
||||
pmsList: []
|
||||
},
|
||||
goodsId: '',
|
||||
tryTime: 0,
|
||||
showTryTime: '0',
|
||||
tryUser: 0,
|
||||
EffectiveTypeList: [],
|
||||
screenList: [],
|
||||
}
|
||||
},
|
||||
mixins: [
|
||||
WindowResizeHandler
|
||||
],
|
||||
filters: {
|
||||
screenList: []
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
hasPermssion() {
|
||||
@ -101,59 +97,57 @@
|
||||
this.height = this._clientHeight;
|
||||
},
|
||||
async getScreenLists() {
|
||||
let res = await queryPermissionScreen();
|
||||
const res = await queryPermissionScreen();
|
||||
this.screenList = res.data;
|
||||
this.courseModel = {
|
||||
pmsList: this.screenList || [],
|
||||
pmsList: this.screenList || []
|
||||
};
|
||||
},
|
||||
async initLoadPage() {
|
||||
let that = this;
|
||||
let data = { id: this.$route.params.lessonId };
|
||||
const data = { id: this.$route.params.lessonId };
|
||||
if (parseInt(data.id)) {
|
||||
try {
|
||||
let res = await getPublishMapInfo(data.id);
|
||||
const res = await getPublishMapInfo(data.id);
|
||||
this.tryUser = 0;
|
||||
that.courseModel = {
|
||||
this.courseModel = {
|
||||
name: res.data.name,
|
||||
mapId: res.data.id,
|
||||
skinCode: res.data.skinCode,
|
||||
updateTime: res.data.updateTime,
|
||||
pmsList: that.screenList || [],
|
||||
PermissionType: PermissionType.SCREEN
|
||||
pmsList: this.screenList || [],
|
||||
permissionType: PermissionType.SCREEN
|
||||
};
|
||||
|
||||
this.$store.dispatch('training/setPrdType', res.data.prdType)
|
||||
let paras = {
|
||||
productType: PermissionType.SCREEN
|
||||
this.$store.dispatch('training/setPrdType', res.data.prdType);
|
||||
const paras = {
|
||||
permissionType: PermissionType.SCREEN
|
||||
};
|
||||
|
||||
if (!that.courseModel.pmsList.length) {
|
||||
if (!this.courseModel.pmsList.length) {
|
||||
this.tryUser = 1;
|
||||
try {
|
||||
let resp = await getGoodsTryUse(paras);
|
||||
const resp = await getGoodsTryUse(paras);
|
||||
if (resp.data.tryTime <= 0) {
|
||||
this.tryTime = 0;
|
||||
this.setTryTime(0)
|
||||
this.setTryTime(0);
|
||||
} else {
|
||||
this.tryTime = resp.data.tryTime;
|
||||
this.setTryTime(resp.data.tryTime)
|
||||
this.setTryTime(resp.data.tryTime);
|
||||
this.goodsId = resp.data.goodsId;
|
||||
}
|
||||
|
||||
} catch (err) {
|
||||
this.$messageBox(this.$t('error.acquisitionTimeFailed'))
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
this.$messageBox(this.$t('error.acquisitionTimeFailed'));
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
this.$messageBox(this.$t('error.refreshFailed'))
|
||||
};
|
||||
console.log(error);
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
}
|
||||
}
|
||||
},
|
||||
buy() {
|
||||
this.$router.push({
|
||||
path: `${UrlConfig.dp.pay}/${this.$route.params.lessonId}`,
|
||||
query: { permissionType: PermissionType.SCREEN, prdCode: this.courseModel.prdCode, mapId: this.courseModel.mapId }
|
||||
query: { permissionType: PermissionType.SCREEN }
|
||||
});
|
||||
},
|
||||
transfer() {
|
||||
@ -170,24 +164,28 @@
|
||||
this.$refs.setTime.doShow();
|
||||
},
|
||||
jump(model) {
|
||||
let data = { mapId: this.courseModel.mapId }
|
||||
const data = { mapId: this.courseModel.mapId };
|
||||
bitScreenNotify(data).then(resp => {
|
||||
let query = {
|
||||
skinCode: this.courseModel.skinCode, group: resp.data, prdType: '01', mapId: this.courseModel.mapId, try: this.tryUser, goodsId: this.goodsId, initTime: model.initTime,
|
||||
}
|
||||
const query = {
|
||||
skinCode: this.courseModel.skinCode,
|
||||
group: resp.data, prdType: '01',
|
||||
mapId: this.courseModel.mapId,
|
||||
try: this.tryUser,
|
||||
goodsId: this.goodsId,
|
||||
initTime: model.initTime
|
||||
};
|
||||
this.$router.push({ path: `${UrlConfig.display}/dp`, query: query });
|
||||
launchFullscreen();
|
||||
|
||||
}).catch(error => {
|
||||
this.$messageBox(this.$t('error.createSimulationFailed') + error.message);
|
||||
})
|
||||
});
|
||||
},
|
||||
start() {
|
||||
if (this.courseModel.pmsList.length) {
|
||||
this.selectBeginTime();
|
||||
} else {
|
||||
if (this.tryTime <= 0) {
|
||||
this.$confirm(this.$('tip.noPermissionHint'), this.$t('global.tips'), {
|
||||
this.$confirm(this.$t('tip.noPermissionHint'), this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
@ -198,20 +196,19 @@
|
||||
this.selectBeginTime();
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
setTryTime(val) {
|
||||
if (val <= 1) {
|
||||
this.showTryTime = `0`+ this.$t('global.minute');
|
||||
} else if (1 < val && val <= 60) {
|
||||
} else if (val > 1 && val <= 60) {
|
||||
this.showTryTime = '1'+ this.$t('global.minute');
|
||||
} else if (val > 60) {
|
||||
let time = parseInt(val / 60);
|
||||
const time = parseInt(val / 60);
|
||||
this.showTryTime = time+ this.$t('global.minutes');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
::-webkit-scrollbar {
|
||||
|
@ -31,9 +31,8 @@
|
||||
import FilterCity from '@/views/components/filterCity';
|
||||
import { listPublishMap } from '@/api/jmap/map';
|
||||
import { queryPermissionScreen } from '@/api/management/author';
|
||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||
|
||||
import { UrlConfig } from '@/router/index';
|
||||
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
|
||||
|
||||
export default {
|
||||
name: 'ExamDetailList',
|
||||
@ -80,7 +79,7 @@ export default {
|
||||
methods: {
|
||||
async getScreenLists() {
|
||||
const list = await queryPermissionScreen();
|
||||
this.screenList = list.data;
|
||||
this.screenList = list.data || [];
|
||||
},
|
||||
filterNode(value, data) {
|
||||
if (!value) return true;
|
||||
@ -126,10 +125,9 @@ export default {
|
||||
});
|
||||
}
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
}).catch(() => {
|
||||
this.$nextTick(() => { this.loading = false; });
|
||||
}).catch(error => {
|
||||
console.log(error);
|
||||
this.loading = false;
|
||||
this.$messageBox(this.$t('error.refreshFailed'));
|
||||
});
|
||||
|
@ -110,7 +110,7 @@ export default {
|
||||
price: response.data.price,
|
||||
remarks: response.data.remarks,
|
||||
detail: response.data.chapters,
|
||||
pmsList: response.data.pmsList,
|
||||
pmsList: response.data.pmsList || [],
|
||||
prdCode: response.data.prdCode,
|
||||
mapId: response.data.mapId,
|
||||
skinCode: response.data.skinCode,
|
||||
|
Loading…
Reference in New Issue
Block a user