Merge branch 'dev' of https://git.cloud.tencent.com/joylink/jl-nclient into dev
This commit is contained in:
commit
eb26f87560
@ -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;
|
||||
|
@ -122,6 +122,10 @@ export default {
|
||||
min: 0,
|
||||
max: 0
|
||||
},
|
||||
// graphic: {
|
||||
// type: 'line',
|
||||
// progressive: true
|
||||
// },
|
||||
series: [],
|
||||
dataZoom: [
|
||||
{
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div>
|
||||
<div class="display-draft">
|
||||
<el-button-group>
|
||||
<el-button v-if="isAdmin || isIBP" type="warning" @click="jumpIbp">IBP盘</el-button>
|
||||
<el-button v-if="isIBP" type="warning" @click="jumpIbp">IBP盘</el-button>
|
||||
<el-button v-if="isDriver" type="jumpjlmap3d" @click="jumpjlmap3d">司机视角</el-button>
|
||||
<template v-if="isAdmin">
|
||||
<el-button type="success" :disabled="isDisable" @click="selectBeginTime">按计划行车</el-button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="'订阅地图'" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center>
|
||||
<el-dialog :title="'订阅地图'" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
|
||||
<el-form ref="form" v-model="formModel" label-width="120px">
|
||||
<el-form-item label="订阅地图列表:" prop="mapIdList">
|
||||
<el-select v-model="formModel.mapIdList" clearable multiple placeholder="请输入关键词" style="width: 80%">
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="$t('system.editUserPermission')" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="$t('system.editUserPermission')" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">确 定</el-button>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisibles" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisibles" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{ height: '280px', width:'100%' }">
|
||||
<el-tree
|
||||
ref="tree"
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center>
|
||||
<el-dialog :title="title" :visible.sync="dialogVisible" width="30%" :before-close="handleClose" center :close-on-click-modal="false">
|
||||
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="this.$t('orderAuthor.trainingList')"
|
||||
title="订单选择商品"
|
||||
:visible.sync="show"
|
||||
top="20px"
|
||||
width="90%"
|
||||
|
@ -48,7 +48,7 @@ export default {
|
||||
// },
|
||||
'status': {
|
||||
type: 'select',
|
||||
label: this.$t('orderAuthor.authorityStatus'),
|
||||
label: '状态',
|
||||
value: '1',
|
||||
config: {
|
||||
data: []
|
||||
@ -142,7 +142,7 @@ export default {
|
||||
formatter: this.formatterDate
|
||||
},
|
||||
{
|
||||
title: this.$t('orderAuthor.authorityStatus'),
|
||||
title: '状态',
|
||||
prop: 'status',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.$convertField(row.status, this.EffectiveTypeList, ['value', 'label']); },
|
||||
|
@ -119,7 +119,7 @@ export default {
|
||||
{
|
||||
title: this.$t('permission.belonger'),
|
||||
prop: 'ownerName',
|
||||
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) != -1 || this.$store.state.user.roles.indexOf(admin) < 0; }
|
||||
isShow: () => { return this.$store.state.user.roles.indexOf(superAdmin) > 0 || this.$store.state.user.roles.indexOf(admin) > 0; }
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
|
@ -147,7 +147,7 @@ export default {
|
||||
type: 'warning',
|
||||
handleClick: this.handleEfficacy,
|
||||
showControl: (row) => {
|
||||
return (this.$route.query.lessonId ? row.creatorId == this.userId : true) && row.status == 1;
|
||||
return !this.$route.query.lessonId && row.status == 1;
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -155,7 +155,7 @@ export default {
|
||||
type: 'warning',
|
||||
handleClick: this.handleDelete,
|
||||
showControl: (row) => {
|
||||
return this.$route.query.lessonId && row.status == 1;
|
||||
return this.$route.query.lessonId && row.status == 1 && row.creatorId == this.userId;
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -221,6 +221,7 @@ export default {
|
||||
queryFunction(params) {
|
||||
if (this.$route.query.lessonId) {
|
||||
params.lessonId = this.$route.query.lessonId;
|
||||
params.status = '1';
|
||||
}
|
||||
return getExamList(params);
|
||||
},
|
||||
|
@ -42,7 +42,7 @@
|
||||
<i
|
||||
v-if="userId == roomInfo.creatorId"
|
||||
class="el-icon-close delPerson"
|
||||
@click="handleDelEquipment(nor, index)"
|
||||
@click="handleDelUserForStation(nor, index, stationListForEquipment, equipmentList)"
|
||||
/>
|
||||
<div style="float: right; margin-right: 15px;">
|
||||
<el-select
|
||||
@ -50,10 +50,10 @@
|
||||
placeholder="请选择"
|
||||
size="mini"
|
||||
:disabled="userId != roomInfo.creatorId"
|
||||
@change="changeEquipment(nor)"
|
||||
@change="handleChangeUser(nor, 'Attendant', stationListForEquipment, equipmentList)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stationList"
|
||||
v-for="item in stationListForEquipment"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
@ -132,12 +132,34 @@
|
||||
<i
|
||||
v-if="userId == roomInfo.creatorId"
|
||||
class="el-icon-close delPerson"
|
||||
@click="handleDelUser(ibpList, nor, index)"
|
||||
@click="handleDelUserForStation(nor, index, stationListForIBP, ibpList)"
|
||||
/>
|
||||
<div style="float: right; margin-right: 15px;">
|
||||
<el-select
|
||||
v-model="nor.deviceCode"
|
||||
placeholder="请选择"
|
||||
size="mini"
|
||||
:disabled="userId != roomInfo.creatorId"
|
||||
@change="handleChangeUser(nor, 'IBP', stationListForIBP, ibpList)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in stationListForIBP"
|
||||
:key="item.code"
|
||||
:label="item.name"
|
||||
:value="item.code"
|
||||
:disabled="item.disabled"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div v-if="userId == roomInfo.creatorId" class="add-box">
|
||||
<el-button icon="el-icon-plus" circle plain @click="addingRoles('ibp', '增加IBP')" />
|
||||
<el-button
|
||||
icon="el-icon-plus"
|
||||
circle
|
||||
plain
|
||||
@click="addingRoles('ibp', '增加IBP')"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -281,6 +303,28 @@ export default {
|
||||
computed: {
|
||||
height() {
|
||||
return this.$store.state.app.height - 95;
|
||||
},
|
||||
stationListForEquipment() {
|
||||
return this.stationList.filter(elem => { return elem.centralized; }).map(item => {
|
||||
const elem = { code: item.code, name: item.name, disabled: false };
|
||||
this.equipmentList.forEach(nor => {
|
||||
if (elem.code == nor.deviceCode) {
|
||||
elem.disabled = true;
|
||||
}
|
||||
});
|
||||
return elem;
|
||||
});
|
||||
},
|
||||
stationListForIBP() {
|
||||
return this.stationList.map(item => {
|
||||
const elem = { code: item.code, name: item.name, disabled: false };
|
||||
this.ibpList.forEach(nor => {
|
||||
if (elem.code == nor.deviceCode) {
|
||||
elem.disabled = true;
|
||||
}
|
||||
});
|
||||
return elem;
|
||||
});
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -446,7 +490,13 @@ export default {
|
||||
this.num++;
|
||||
break;
|
||||
case 'IBP':
|
||||
this.ibpList.push(item);
|
||||
this.ibpList.forEach((nor, index) => {
|
||||
if (nor.id == item.id) { // 修改状态
|
||||
this.ibpList.splice(index, 1);
|
||||
this.num--;
|
||||
}
|
||||
});
|
||||
this.ibpList.push(item); // 新增
|
||||
this.num++;
|
||||
break;
|
||||
default:
|
||||
@ -507,19 +557,7 @@ export default {
|
||||
|
||||
// 获取设备集中站
|
||||
const resp = await getStationList(res.data.mapId);
|
||||
resp.data.forEach(item => {
|
||||
if (item.centralized) {
|
||||
this.stationList.push(item);
|
||||
}
|
||||
});
|
||||
this.stationList.forEach(item => {
|
||||
item.disabled = false;
|
||||
this.equipmentList.forEach(nor => {
|
||||
if (item.code == nor.deviceCode) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.stationList = resp.data;
|
||||
},
|
||||
// 获取观众席list 分配角色 Admin 管理员 Instructor 教员 Dispatcher 行调 Attendant 车站 Audience 观众 Driver 司机 Repair 通号 IBP IBP盘
|
||||
async getUserList() {
|
||||
@ -636,24 +674,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// 设置所属集中站信息
|
||||
changeEquipment(val) {
|
||||
const params = [{
|
||||
id: val.id,
|
||||
nickName: val.nickName,
|
||||
userRole: 'Attendant',
|
||||
deviceCode: val.deviceCode
|
||||
}];
|
||||
putUserRoles(params, this.$route.query.group);
|
||||
this.stationList.forEach(item => {
|
||||
item.disabled = false;
|
||||
this.equipmentList.forEach(nor => {
|
||||
if (item.code == nor.deviceCode) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
// 打开弹窗
|
||||
addingRoles(name, title) {
|
||||
this.listName = name;
|
||||
@ -712,7 +732,7 @@ export default {
|
||||
this.messageInfo('分配角色数量已超过可分配角色总数!', 'error');
|
||||
}
|
||||
this.treeData.forEach(item => {
|
||||
if (item.userRole == '' || item.userRole == 'Audience') {
|
||||
if (item.userRole == '' || item.userRole == 'Audience' || item.userRole == 'IBP') {
|
||||
item.select = false;
|
||||
}
|
||||
});
|
||||
@ -728,15 +748,32 @@ export default {
|
||||
});
|
||||
});
|
||||
},
|
||||
handleChangeUser(val, role, stationList, list) {
|
||||
const params = [{
|
||||
id: val.id,
|
||||
nickName: val.nickName,
|
||||
userRole: role,
|
||||
deviceCode: val.deviceCode
|
||||
}];
|
||||
putUserRoles(params, this.$route.query.group);
|
||||
stationList.forEach(item => {
|
||||
item.disabled = false;
|
||||
list.forEach(nor => {
|
||||
if (item.code == nor.deviceCode) {
|
||||
item.disabled = true;
|
||||
}
|
||||
});
|
||||
});
|
||||
},
|
||||
handleDelUser(list, item, index) {
|
||||
list.splice(index, 1);
|
||||
this.handleProperty(item);
|
||||
},
|
||||
handleDelEquipment(item, index) {
|
||||
this.equipmentList.splice(index, 1);
|
||||
this.stationList.forEach(item => {
|
||||
handleDelUserForStation(item, index, stationList, list) {
|
||||
list.splice(index, 1);
|
||||
stationList.forEach(item => {
|
||||
item.disabled = false;
|
||||
this.equipmentList.forEach(nor => {
|
||||
list.forEach(nor => {
|
||||
if (item.code == nor.deviceCode) {
|
||||
item.disabled = true;
|
||||
}
|
||||
@ -744,7 +781,7 @@ export default {
|
||||
});
|
||||
this.handleProperty(item);
|
||||
},
|
||||
handleProperty(item) {
|
||||
handleProperty(item, role) {
|
||||
const treeIndex = this.treeData.findIndex(nor => nor.id == item.id);
|
||||
if (treeIndex > -1) {
|
||||
this.num--;
|
||||
|
Loading…
Reference in New Issue
Block a user