Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
# Conflicts: # src/jmapNew/config/skinCode/xian_01.js
This commit is contained in:
commit
f5cfb5f787
@ -89,21 +89,6 @@ export function getCompanyMemberPaging(companyId) {
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
/** 更新单位成员信息 */
|
||||
export function putCompanyMember(companyId, data) {
|
||||
return request({
|
||||
url: `/api/company/${companyId}/refUserInfo`,
|
||||
method: 'put',
|
||||
data
|
||||
});
|
||||
}
|
||||
/** 删除单位成员信息 */
|
||||
export function deleteCompanyMember(companyId, memberId) {
|
||||
return request({
|
||||
url: `/api/company/${companyId}/refUserInfo/${memberId}`,
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
/** 查询职位信息 */
|
||||
export function getPositionInfo(positionId) {
|
||||
return request({
|
||||
@ -187,3 +172,11 @@ export function queryDeptInfoPaging(params) {
|
||||
params
|
||||
});
|
||||
}
|
||||
/** 取消单位的部门成员关系 */
|
||||
export function deleteDepartUserRelation(data) {
|
||||
return request({
|
||||
url: `/api/company/departUserInfo`,
|
||||
method: 'delete',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
@ -41,3 +41,11 @@ export function deleteIscs(id) {
|
||||
method: 'delete'
|
||||
});
|
||||
}
|
||||
// 查询地图下是否有ISCS数据
|
||||
export function queryHasIscs(params) {
|
||||
return request({
|
||||
url: `/api/v1/iscs/hasData`,
|
||||
method: 'get',
|
||||
params
|
||||
});
|
||||
}
|
||||
|
@ -12,6 +12,7 @@ export const keyboardEvents = {
|
||||
ALT_O: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_O'},
|
||||
ALT_E: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_E'},
|
||||
ALT_S: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_S'},
|
||||
ALT_D: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_D'}
|
||||
ALT_D: {altKey: true, ctrlKey: false, shiftKey: false, event: 'Alt_D'},
|
||||
TAB: {altKey: false, ctrlKey: false, shiftKey: false, event: 'Tab'}
|
||||
};
|
||||
|
||||
|
@ -153,7 +153,8 @@ class SkinCode extends defaultStyle {
|
||||
greenColor: '#00FF00', // 信号灯绿色
|
||||
yellowColor: '#FFFF00', // 信号灯黄色
|
||||
whiteColor: '#FFFFFF', // 信号灯白色
|
||||
blueColor: '#0070C0' // 信号灯蓝色
|
||||
blueColor: '#0070C0', // 信号灯蓝色
|
||||
faultType: 'flash' // 信号机故障类型 (flash为福州一号线与西安一三号线特殊类型,太阳)
|
||||
},
|
||||
route: {
|
||||
direction: false, // 自动进路方向
|
||||
|
@ -10,9 +10,9 @@
|
||||
<el-dropdown-item>
|
||||
<span style="display:block;" @click="handleDetail">{{ $t('global.personalDetails') }}</span>
|
||||
</el-dropdown-item>
|
||||
<!--<el-dropdown-item>-->
|
||||
<!--<span style="display:block;" @click="handleOrganization">{{ $t('global.organization') }}</span>-->
|
||||
<!--</el-dropdown-item>-->
|
||||
<el-dropdown-item v-if="companyAdmin">
|
||||
<span style="display:block;" @click="handleOrganization">{{ $t('global.organization') }}</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item>
|
||||
<span style="display:block;" @click="logout">{{ $t('global.exit') }}</span>
|
||||
</el-dropdown-item>
|
||||
@ -37,6 +37,9 @@ export default {
|
||||
computed: {
|
||||
username() {
|
||||
return this.$store.state.user.nickname;
|
||||
},
|
||||
companyAdmin() {
|
||||
return this.$store.state.user.companyAdmin;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -7,12 +7,6 @@ import 'nprogress/nprogress.css';
|
||||
import { getToken, removeToken, getSessionStorage } from '@/utils/auth';
|
||||
import localStore from 'storejs';
|
||||
|
||||
// function hasPermission(roles, permissionRoles) {
|
||||
// if (roles.indexOf(admin) >= 0) return true;
|
||||
// if (!permissionRoles) return true;
|
||||
// return roles.some(role => permissionRoles.indexOf(role) >= 0);
|
||||
// }
|
||||
|
||||
const whiteList = ['/login', '/design/login', '/gzzbxy/relay', '/authorization', '/AUSline', '/AUStool']; // 不重定向白名单
|
||||
|
||||
for (const val in loginInfo) {
|
||||
|
@ -19,7 +19,9 @@ const user = {
|
||||
wxUnionId: '',
|
||||
account: '',
|
||||
projectDevice: '',
|
||||
companyId: ''
|
||||
companyId: '',
|
||||
companyAdmin: false,
|
||||
companyName: ''
|
||||
},
|
||||
|
||||
mutations: {
|
||||
@ -53,6 +55,12 @@ const user = {
|
||||
SET_COMPANYID: (state, companyId) => {
|
||||
state.companyId = companyId;
|
||||
},
|
||||
SET_COMPANYADMIN: (state, companyAdmin) => {
|
||||
state.companyAdmin = companyAdmin;
|
||||
},
|
||||
SET_COMPANYNAME: (state, companyName) => {
|
||||
state.companyName = companyName;
|
||||
},
|
||||
CLEAR_AUTO_PARAMS: () => {
|
||||
Cookies.remove('UserDesignName');
|
||||
Cookies.remove('UserDesignToken');
|
||||
@ -128,6 +136,8 @@ const user = {
|
||||
commit('SET_WXID', user.wxId);
|
||||
commit('SET_WXUNIONID', user.wxUnionId);
|
||||
commit('SET_COMPANYID', user.companyId);
|
||||
commit('SET_COMPANYADMIN', user.companyAdmin);
|
||||
commit('SET_COMPANYNAME', user.companyName);
|
||||
resolve(user);
|
||||
}).catch(error => {
|
||||
reject(error);
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://api.joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||
// BASE_API = 'http://192.168.8.107:9000'; // 袁琪
|
||||
// BASE_API = 'http://192.168.8.129:9000'; // 旭强
|
||||
// BASE_API = 'http://192.168.8.119:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -56,7 +56,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-back" @click="back">返回</div>
|
||||
<div v-if="!noPreLogout" class="bottom-back" @click="back">返回</div>
|
||||
<div v-if="noPreLogout" class="bottom-back" @click="quit">退出</div>
|
||||
<!-- :class="{'disable_box': alarmInfo}" -->
|
||||
<div class="bottom-back" @click="handleAlarmInfo">
|
||||
报警
|
||||
@ -308,6 +309,11 @@ export default {
|
||||
manage:{name:'管理', type:'totalSystem', id: 'manage', active:false, icon:iscs_icon9 }
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
noPreLogout() {
|
||||
return this.$route.query.noPreLogout;
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
$route() {
|
||||
const data = Object.values(this.buttonList);
|
||||
@ -453,6 +459,9 @@ export default {
|
||||
this.$message.error('清除仿真失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
quit() {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -427,7 +427,9 @@ export default {
|
||||
}
|
||||
});
|
||||
// { label: '全部集中站', value: 'allConcentrateStation', active: false, sign: 'DEVICE_STATION' },
|
||||
stationSupervisorList['ALL_STATION'] = { label: '所有车站', value: 'allStation', active: false, sign: 'ALL_STATION' };
|
||||
if (this.$store.state.training.prdType == '02') {
|
||||
stationSupervisorList['ALL_STATION'] = { label: '所有车站', value: 'allStation', active: false, sign: 'ALL_STATION' };
|
||||
}
|
||||
driverList['ALL_TRAIN'] = { label: '所有司机', value: 'allTrain', show: false, active: false, sign: 'ALL_TRAIN' };
|
||||
this.treeData = [{
|
||||
label: '行调',
|
||||
@ -663,8 +665,34 @@ export default {
|
||||
// this.$message.success('创建会话成功!');
|
||||
this.createLoading = false;
|
||||
}).catch((error) => {
|
||||
this.$message.error(error.code == '3005' ? '创建会话失败:仿真会话成员忙线中!' : '创建会话失败:' + error.message);
|
||||
this.$message.error(error.code == '5000' ? '创建会话失败:仿真会话成员忙线中!' : '创建会话失败:' + error.message);
|
||||
this.createLoading = false;
|
||||
// 待后端处理
|
||||
this.memberIdList.forEach(each=>{
|
||||
this.treeData.forEach(data => {
|
||||
if (data.children) {
|
||||
const member = data.children[each];
|
||||
if (member) {
|
||||
member.isConnect = false;
|
||||
member.loading = false;
|
||||
member.active = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
if (this.memberObject == 'ALL_STATION') {
|
||||
const stationList = this.treeData[1].children;
|
||||
const member = stationList['ALL_STATION'];
|
||||
member.active = false;
|
||||
member.loading = false;
|
||||
member.isConnect = false;
|
||||
} else if (this.memberObject == 'ALL_TRAIN') {
|
||||
const trainList = this.treeData[2].children;
|
||||
const train = trainList['ALL_TRAIN'];
|
||||
train.active = false;
|
||||
train.loading = false;
|
||||
train.isConnect = false;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.userString = '请选择人员';
|
||||
|
@ -4,9 +4,13 @@
|
||||
<div class="closeFalutChoose" @click="closeFaultChoose">
|
||||
<span class="el-icon-close closeFalutChooseIn" />
|
||||
</div>
|
||||
<!-- <div class="minimizeFalutChoose">
|
||||
<span class="el-icon-close closeFalutChooseIn" />
|
||||
</div> -->
|
||||
<el-card class="triggerFaultInfo">
|
||||
<el-table :data="faultList" height="300" border style="width: 100%">
|
||||
<el-table-column prop="targetDeviceCode" label="目标设备" width="180">
|
||||
<el-button type="primary" size="small" style="margin-bottom:10px;" @click="isTableShow=!isTableShow">{{ isTableShow?'隐藏列表':'显示列表' }}</el-button>
|
||||
<el-table v-if="isTableShow" :data="faultList" height="300" border style="width: 100%;font-size:13px;">
|
||||
<el-table-column prop="targetDeviceCode" label="目标设备" width="220">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${deviceMap[scope.row.targetDeviceType]}${formatNameByCode(scope.row.targetDeviceCode)}` }}</span>
|
||||
</template>
|
||||
@ -21,7 +25,7 @@
|
||||
<!--<span>{{ scope.row.condition.type === 'DEVICE'?'设备':'时间' }}</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column prop="condition" label="列车" width="150">
|
||||
<el-table-column prop="condition" label="列车" width="100">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${deviceMap[scope.row.condition.triggerDeviceType] || ''}${formatNameByCode(scope.row.condition.triggerDeviceCode)}` }}</span>
|
||||
</template>
|
||||
@ -31,12 +35,12 @@
|
||||
<!--<span>{{ formatTriggerStatus(scope.row.condition) }}</span>-->
|
||||
<!--</template>-->
|
||||
<!--</el-table-column>-->
|
||||
<el-table-column prop="condition" label="到达区段" width="150">
|
||||
<el-table-column prop="condition" label="到达区段" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ `${formatNameByCode(scope.row.condition.triggerAssociatedDeviceCode)}` }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="condition.condition.triggerTime" label="触发时间" width="180" />
|
||||
<el-table-column prop="condition.condition.triggerTime" label="触发时间" width="150" />
|
||||
<el-table-column prop="triggeringTime" label="故障状态">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.triggeringTime? '已触发': '未触发' }}</span>
|
||||
@ -49,71 +53,71 @@
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<div class="card">
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<el-button style="float: right; padding: 3px 0" type="text" @click="addRulesCreate">新增</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="form" :model="faultRule" :inline="true" label-width="100px" style="margin-left:15px;">
|
||||
<el-form-item label="目标设备">
|
||||
<!-- faultRule.targetDeviceCode -->
|
||||
<el-input v-model="targetDeviceName" disabled size="small" class="inputModelClass" style="width: 300px;" />
|
||||
<!--<el-button :type="field === 'targetActive' ? 'danger' : 'primary'" size="small" @click="hover('targetActive')">{{ $t('map.activate') }}</el-button>-->
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="触发方式">-->
|
||||
<!--<el-select v-model="triggerMode" size="small" style="width: 200px;" @change="changeTriggerMode">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in triggerModeList"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="故障类型">
|
||||
<el-select v-model="faultRule.faultType" placeholder="请选择" class="inputModelClass" size="small" style="width: 300px;">
|
||||
<el-option
|
||||
v-for="item in faultTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="列车">
|
||||
<!-- faultRule.condition.triggerDeviceCode -->
|
||||
<el-input v-model="triggerDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerActive' ? 'danger' : 'primary'" size="small" @click="hover('triggerActive')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<!--<el-form-item v-if="triggerMode === 'DEVICE'" label="触发状态">-->
|
||||
<!--<!– <el-input v-model="faultRule.condition.triggerDeviceStatus" size="small" class="inputModelClass" /> –>-->
|
||||
<!--<el-select v-model="faultRule.condition.triggerDeviceStatus" placeholder="请选择" class="inputModelClass" size="small" style="width: 200px;">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in triggerStatusList"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="到达区段">
|
||||
<el-input v-model="triggerAssociatedDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerAssociated'? 'danger': 'primary'" size="small" @click="hover('triggerAssociated')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'TIME'" label="触发时间">
|
||||
<el-date-picker
|
||||
v-model="faultRule.condition.triggerTime"
|
||||
size="small"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
<div class="targetCard">
|
||||
<!-- <el-card class="box-card"> -->
|
||||
<div class="targetCardHead">
|
||||
<el-button style="padding:3px 0" type="text" @click="addRulesCreate">新增</el-button>
|
||||
</div>
|
||||
<div>
|
||||
<el-form ref="form" :model="faultRule" :inline="true" label-width="100px" style="margin-left:15px;">
|
||||
<el-form-item label="目标设备" class="targetFormItem">
|
||||
<!-- faultRule.targetDeviceCode -->
|
||||
<el-input v-model="targetDeviceName" disabled size="small" class="inputModelClass" style="width: 300px;" />
|
||||
<!--<el-button :type="field === 'targetActive' ? 'danger' : 'primary'" size="small" @click="hover('targetActive')">{{ $t('map.activate') }}</el-button>-->
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="触发方式">-->
|
||||
<!--<el-select v-model="triggerMode" size="small" style="width: 200px;" @change="changeTriggerMode">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in triggerModeList"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item label="故障类型" class="targetFormItem">
|
||||
<el-select v-model="faultRule.faultType" placeholder="请选择" class="inputModelClass" size="small" style="width: 300px;">
|
||||
<el-option
|
||||
v-for="item in faultTypeList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="列车" class="targetFormItem">
|
||||
<!-- faultRule.condition.triggerDeviceCode -->
|
||||
<el-input v-model="triggerDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerActive' ? 'danger' : 'primary'" size="small" @click="hover('triggerActive')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<!--<el-form-item v-if="triggerMode === 'DEVICE'" label="触发状态">-->
|
||||
<!--<!– <el-input v-model="faultRule.condition.triggerDeviceStatus" size="small" class="inputModelClass" /> –>-->
|
||||
<!--<el-select v-model="faultRule.condition.triggerDeviceStatus" placeholder="请选择" class="inputModelClass" size="small" style="width: 200px;">-->
|
||||
<!--<el-option-->
|
||||
<!--v-for="item in triggerStatusList"-->
|
||||
<!--:key="item.value"-->
|
||||
<!--:label="item.label"-->
|
||||
<!--:value="item.value"-->
|
||||
<!--/>-->
|
||||
<!--</el-select>-->
|
||||
<!--</el-form-item>-->
|
||||
<el-form-item v-if="triggerMode === 'DEVICE'" label="到达区段" class="targetFormItem">
|
||||
<el-input v-model="triggerAssociatedDevice" size="small" disabled class="inputModelClass" style="width: 240px;" />
|
||||
<el-button :type="field === 'triggerAssociated'? 'danger': 'primary'" size="small" @click="hover('triggerAssociated')">{{ $t('map.activate') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="triggerMode === 'TIME'" label="触发时间" class="targetFormItem">
|
||||
<el-date-picker
|
||||
v-model="faultRule.condition.triggerTime"
|
||||
size="small"
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- </el-card> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -143,6 +147,7 @@ export default {
|
||||
dialogShow: false,
|
||||
loading: false,
|
||||
isAdd:false,
|
||||
isTableShow:true,
|
||||
deviceMap: {},
|
||||
simulationFault:{},
|
||||
faultList: [],
|
||||
@ -582,7 +587,7 @@ export default {
|
||||
<style scoped rel="stylesheet/scss" lang="scss">
|
||||
.triggerFaultInfo{
|
||||
margin-bottom:10px;
|
||||
padding: 10px 0px 10px 15px;
|
||||
padding: 10px 10px 10px 15px;
|
||||
}
|
||||
.triggerFaultList{
|
||||
font-size: 14px;
|
||||
@ -627,4 +632,20 @@ export default {
|
||||
margin-left: 5px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.targetCard{
|
||||
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
|
||||
border-top: 1px #ebeef5 solid;
|
||||
}
|
||||
.targetFormItem{
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.targetCardHead{
|
||||
padding: 5px;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
border-bottom: 1px #f4f4f4 solid;
|
||||
text-align: right;
|
||||
padding-right: 15px;
|
||||
}
|
||||
</style>
|
||||
|
@ -14,7 +14,7 @@
|
||||
<!-- notScript && -->
|
||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
</el-button-group>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
<!-- <el-button v-if="!isLocalStation" size="small" :type="faultMode ? 'danger' : ''" @click="changeDirectiveMode()">指令模式</el-button> -->
|
||||
</template>
|
||||
</div>
|
||||
@ -38,6 +38,7 @@ import { getSessionStorage } from '@/utils/auth';
|
||||
import { getToken } from '@/utils/auth';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
|
||||
// 右上角操作
|
||||
export default {
|
||||
@ -128,6 +129,13 @@ export default {
|
||||
this.viewDisabled = false;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData() {
|
||||
this.$store.dispatch('runPlan/clear').then(() => {
|
||||
|
@ -24,7 +24,7 @@
|
||||
<el-button v-if="running" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('display.schema.previewRunDiagram') }}</el-button>
|
||||
<el-button v-if="!running" size="small" type="warning" @click="loadRunPlan">{{ $t('display.schema.loadRunDiagram') }}</el-button>
|
||||
</el-button-group>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="!isScheduling" size="small" :type="faultMode ? '':'primary' " @click="changeOperateMode()">{{ faultMode?'切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
</template>
|
||||
</div>
|
||||
<!-- 菜单按钮列表 -->
|
||||
@ -133,6 +133,11 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if (!this.isScheduling) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
});
|
||||
await this.initLoadData();
|
||||
},
|
||||
async beforeDestroy() {
|
||||
|
@ -349,6 +349,8 @@ export default {
|
||||
switch (hook) {
|
||||
case 'Update': this.$store.dispatch('map/setKeyboardEnter');
|
||||
break;
|
||||
case 'Tab': EventBus.$emit('CheckFaultModeEvent');
|
||||
break;
|
||||
}
|
||||
},
|
||||
async simulationReset() {
|
||||
|
@ -6,7 +6,7 @@
|
||||
<!--</el-select>-->
|
||||
<el-button-group>
|
||||
<el-button v-if="userRole=== 'STATION_SUPERVISOR' && !$route.query.projectDevice" size="small" @click="goIbp">IBP盘</el-button>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" @click="goBigScreen">大屏</el-button>
|
||||
<el-button v-if="userRole=== 'DISPATCHER' && !$route.query.projectDevice" size="small" :disabled="!hasBigScreen" @click="goBigScreen">大屏</el-button>
|
||||
<el-button v-if="userRole==='DISPATCHER' && !$route.query.projectDevice" size="small" @click="goIscs">ISCS</el-button>
|
||||
<el-button v-if="running && !dataError && $route.query.type !== 'ILW'" size="small" :disabled="viewDisabled" @click="viewRunPlan">{{ $t('joinTraining.runGraphPreview') }}</el-button>
|
||||
<template v-if="isAdmin">
|
||||
@ -14,9 +14,9 @@
|
||||
{{ $t('joinTraining.runGraphLoading') }}</el-button><!-- 运行图加载 -->
|
||||
</template>
|
||||
</el-button-group>
|
||||
<el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式':'切换到故障模式' }}</el-button>
|
||||
<el-button v-if="(isAdmin || $route.query.type === 'ILW') && !dataError && !isScreen" size="small" :type="faultMode ? '' : 'primary' " @click="changeOperateMode()">{{ faultMode?' 切换到普通模式[Tab]':'切换到故障模式[Tab]' }}</el-button>
|
||||
<!-- isCenter && !dataError && !isAdmin 此判断用于以后(目前 暂时不用) -->
|
||||
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式':'切换到指令模式' }}</el-button>
|
||||
<el-button v-if="isShowDirective" size="small" :type="directiveMode ? 'primary' : ''" @click="changeDirectiveMode()">{{ directiveMode? '切换到普通模式[Tab]':'切换到指令模式[Tab]' }}</el-button>
|
||||
</div>
|
||||
<join-run-plan-view v-if="running && !dataError" ref="runPlanView" :group="group" />
|
||||
<select-ibp ref="selectIbp" />
|
||||
@ -32,6 +32,8 @@ import JoinRunPlanView from '@/views/newMap/displayNew/demon/runPlanView';
|
||||
import SelectIbp from '@/views/newMap/displayNew/demon/selectIbp';
|
||||
import { getIbpInfoByStation } from '@/api/ibp';
|
||||
import { loadRunPlanData } from '@/utils/loaddata';
|
||||
import { EventBus } from '@/scripts/event-bus';
|
||||
import { queryHasIscs } from '@/api/iscs';
|
||||
export default {
|
||||
name: 'MenuDemonSchema',
|
||||
components:{
|
||||
@ -102,6 +104,9 @@ export default {
|
||||
...mapGetters('runPlan', [
|
||||
'stations'
|
||||
]),
|
||||
...mapGetters('map', [
|
||||
'bigScreenConfig'
|
||||
]),
|
||||
running() {
|
||||
return this.$store.state.training.started;
|
||||
},
|
||||
@ -113,6 +118,9 @@ export default {
|
||||
},
|
||||
isShowDirective() { // 哈尔滨项目 行调设备显示
|
||||
return this.$route.query.type == 'CW' && this.project == 'heb';
|
||||
},
|
||||
hasBigScreen() {
|
||||
return this.bigScreenConfig.bigScreenSplitConfig && this.bigScreenConfig.bigScreenSplitConfig.length;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -139,6 +147,14 @@ export default {
|
||||
},
|
||||
async mounted() {
|
||||
this.userId = this.$store.state.user.id;
|
||||
EventBus.$on('CheckFaultModeEvent', () => {
|
||||
if ((this.isAdmin || this.$route.query.type === 'ILW') && !this.dataError && !this.isScreen) {
|
||||
this.changeOperateMode();
|
||||
}
|
||||
if (this.isShowDirective) {
|
||||
this.changeDirectiveMode();
|
||||
}
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
loadRunData(opt) {
|
||||
@ -204,16 +220,24 @@ export default {
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
goIscs() {
|
||||
const routeData = this.$router.resolve({
|
||||
path:`/displayIscs/system`,
|
||||
query:{
|
||||
lineCode: this.$route.query.lineCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
group: this.$route.query.group,
|
||||
noPreLogout: true
|
||||
queryHasIscs({mapId: this.$route.query.mapId}).then(resp => {
|
||||
if (resp.data) {
|
||||
const routeData = this.$router.resolve({
|
||||
path:`/displayIscs/system`,
|
||||
query:{
|
||||
lineCode: this.$route.query.lineCode,
|
||||
mapId: this.$route.query.mapId,
|
||||
group: this.$route.query.group,
|
||||
noPreLogout: true
|
||||
}
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
} else {
|
||||
this.$messageBox('该地图线路暂无ISCS数据!');
|
||||
}
|
||||
}).catch(() => {
|
||||
this.$message.error('查询ISCS数据异常');
|
||||
});
|
||||
window.open(routeData.href, '_blank', 'noopener noreferrer');
|
||||
},
|
||||
// 点击ibp预览
|
||||
goIbp() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="back_box">
|
||||
<el-button :loading="loadingStudentInfo" type="text" class="uploadDemo" style="margin-top: 10px;">
|
||||
<el-button v-if="companyAdmin" :loading="loadingStudentInfo" type="text" class="uploadDemo" style="margin-top: 10px;">
|
||||
<input
|
||||
id="importResults"
|
||||
ref="files"
|
||||
@ -14,38 +14,49 @@
|
||||
</el-button>
|
||||
<el-button type="text" @click="goBack">返回</el-button>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" type="card" @tab-click="handleClick">
|
||||
<el-tabs v-model="activeName" type="card">
|
||||
<el-tab-pane label="部门管理" name="first">
|
||||
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" />
|
||||
<div style="font-size: 22px;text-align: center;">{{ $store.state.user.companyName }}</div>
|
||||
<div style="position: relative;transform: translateX(-50%);left: 50%;padding: 20px;width: 500px;">
|
||||
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick">
|
||||
<div slot-scope="{ node, data }" style="display: flex;justify-content: space-between;align-items: center;width: 100%;">
|
||||
<div>{{ data.name }}</div>
|
||||
<div>
|
||||
<el-button type="text" @click="() => editDept(data)">编辑</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-tree>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="成员管理" name="second">
|
||||
<el-form :inline="true" size="small" :model="formInline">
|
||||
<el-row>
|
||||
<el-col :span="21" :offset="1">
|
||||
<el-form-item label="班级">
|
||||
<el-select v-model="formInline.classId" placeholder="班级">
|
||||
<el-option
|
||||
v-for="item in classList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table :data="tableData" border style="width: 100%">
|
||||
<el-table-column prop="studentId" label="学号" />
|
||||
<el-row>
|
||||
<el-col :span="21" :offset="1">
|
||||
<span>班级</span>
|
||||
<el-select v-model="classId" size="small" placeholder="班级">
|
||||
<el-option
|
||||
v-for="item in classList"
|
||||
:key="item.departmentId"
|
||||
:label="item.departmentName"
|
||||
:value="item.departmentId"
|
||||
/>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-button type="primary" size="small" @click="onSubmit">查询</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table :data="tableData" border style="width: 100%;margin-top: 10px;" :max-height="height">
|
||||
<el-table-column prop="account" label="学号" />
|
||||
<el-table-column prop="name" label="姓名" />
|
||||
<el-table-column prop="classId" label="班级" />
|
||||
<el-table-column prop="companyName" label="组织" />
|
||||
<el-table-column prop="departmentName" label="班级" />
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div style="text-align: center;">
|
||||
<div style="text-align: center;padding: 10px;">
|
||||
<el-pagination
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[10, 20, 30, 50, 100]"
|
||||
@ -58,11 +69,22 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-dialog
|
||||
title="修改部门名称"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%"
|
||||
>
|
||||
<el-input v-model="newDeptName" />
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="updateDeptName">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCompanyDeptInfo, importCompanyMember, queryDeptInfoPaging } from '@/api/company';
|
||||
import { getCompanyDeptInfo, importCompanyMember, queryDeptInfoPaging, getAllDeptTree, deleteDepartUserRelation, updateDeptInfo } from '@/api/company';
|
||||
import { convertSheetToList } from '@/utils/runPlan';
|
||||
import XLSX from 'xlsx';
|
||||
|
||||
@ -70,60 +92,89 @@ export default {
|
||||
name: 'Organization',
|
||||
data() {
|
||||
return {
|
||||
activeName: 'first',
|
||||
defaultProps: '',
|
||||
activeName: 'second',
|
||||
defaultProps: {
|
||||
children: 'childDept',
|
||||
label: 'name'
|
||||
},
|
||||
currentPage: 1,
|
||||
totalNum: 0,
|
||||
pageSize: 10,
|
||||
data: [],
|
||||
tableData: [],
|
||||
loadingStudentInfo: false,
|
||||
formInline: {
|
||||
classId: ''
|
||||
},
|
||||
classId: '',
|
||||
classList: [],
|
||||
queryList: {
|
||||
query: queryDeptInfoPaging,
|
||||
selectCheckShow: false,
|
||||
indexShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: '学号',
|
||||
prop: 'studentID'
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: '班级',
|
||||
prop: 'classId'
|
||||
}
|
||||
]
|
||||
}
|
||||
dialogVisible:false,
|
||||
editDeptInfo: '',
|
||||
newDeptName: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
companyId() {
|
||||
return this.$store.state.user.companyId;
|
||||
},
|
||||
companyAdmin() {
|
||||
return this.$store.state.user.companyAdmin;
|
||||
},
|
||||
height() {
|
||||
return this.$store.state.app.height - 240;
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
getCompanyDeptInfo(this.companyId).then(resp => {
|
||||
console.log(resp);
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
});
|
||||
this.classList = [];
|
||||
this.data = [];
|
||||
this.getCompanyDept();
|
||||
this.getDeptTree();
|
||||
},
|
||||
methods: {
|
||||
onSubmit() {
|
||||
console.log('submit!');
|
||||
if (this.classId) {
|
||||
const params = { deptId: this.classId, pageSize: this.pageSize, pageNum: this.currentPage };
|
||||
queryDeptInfoPaging(params).then(resp => {
|
||||
this.pageSize = resp.data.pageSize;
|
||||
this.currentPage = resp.data.pageNum;
|
||||
this.totalNum = resp.data.total;
|
||||
this.tableData = resp.data.list;
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$message.error('查询学生信息失败!');
|
||||
});
|
||||
} else {
|
||||
this.$message.error('请选择班级!');
|
||||
}
|
||||
},
|
||||
getCompanyDept() {
|
||||
getCompanyDeptInfo(this.companyId).then(resp => {
|
||||
this.classList = resp.data;
|
||||
if (!this.classId && this.classList && this.classList.length) {
|
||||
this.classId = this.classList[0].departmentId;
|
||||
this.onSubmit();
|
||||
}
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$message.error('查询部门信息失败!');
|
||||
});
|
||||
},
|
||||
getDeptTree() {
|
||||
if (this.companyAdmin) {
|
||||
getAllDeptTree(this.companyId).then(resp => {
|
||||
this.data = resp.data;
|
||||
}).catch(error => {
|
||||
console.error(error);
|
||||
this.$message.error('获取部门树信息失败!');
|
||||
});
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
console.log(val);
|
||||
console.log(val);
|
||||
this.pageSize = val;
|
||||
this.onSubmit();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(val);
|
||||
console.log(val);
|
||||
this.currentPage = val;
|
||||
this.onSubmit();
|
||||
},
|
||||
importResults(e) {
|
||||
const obj = this.$refs.files;
|
||||
@ -133,6 +184,36 @@ export default {
|
||||
obj.value = '';
|
||||
}
|
||||
},
|
||||
editDept(data) {
|
||||
this.editDeptInfo = data;
|
||||
this.newDeptName = data.name;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
updateDeptName() {
|
||||
updateDeptInfo(this.editDeptInfo.id, {name: this.newDeptName}).then(resp => {
|
||||
this.dialogVisible = false;
|
||||
this.getDeptTree();
|
||||
this.getCompanyDept();
|
||||
}).catch(() => {
|
||||
this.$message.error('更新部门信息失败!');
|
||||
});
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
const _that = this;
|
||||
const data = { userId:row.userId, departmentId:row.departmentId };
|
||||
this.$confirm('是否确认删除成员部门关系?', this.$t('tip.hint'), {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
deleteDepartUserRelation(data).then(response => {
|
||||
_that.onSubmit();
|
||||
}).catch(() => {
|
||||
_that.$message.error('删除成员部门关系失败!');
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
handleImportResults(file) {
|
||||
const studentData = { depart: '', parentDepart: '', companyUsers:[] };
|
||||
if (file) {
|
||||
@ -171,13 +252,17 @@ export default {
|
||||
studentData.companyUsers = students;
|
||||
}
|
||||
that.loadingStudentInfo = true;
|
||||
console.log(that.companyId);
|
||||
importCompanyMember(that.companyId, studentData).then(resp => {
|
||||
that.$message.success('学生信息导入成功!');
|
||||
that.getCompanyDept();
|
||||
that.getDeptTree();
|
||||
}).catch((error) => {
|
||||
that.$message.error('学生信息导入失败:' + error.message);
|
||||
that.loadingStudentInfo = false;
|
||||
});
|
||||
} catch (error) {
|
||||
that.$message.warning(`解析成绩单失败:${error}`);
|
||||
that.$message.warning(`解析学生信息表失败:${error}`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -190,9 +275,6 @@ export default {
|
||||
}, 200);
|
||||
}
|
||||
},
|
||||
handleClick() {
|
||||
this.dialogVisible = false;
|
||||
},
|
||||
goBack() {
|
||||
this.$router.go(-1);
|
||||
},
|
||||
|
@ -2,7 +2,6 @@
|
||||
<div>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
<edit-company ref="editCompany" @reloadTable="reloadTable" />
|
||||
<company-manager ref="companyManager" @reloadTable="reloadTable" />
|
||||
<qr-code ref="qrCode" />
|
||||
</div>
|
||||
</template>
|
||||
@ -11,13 +10,11 @@
|
||||
import { getCompanyListPaging, deleteCompany } from '@/api/company';
|
||||
import EditCompany from './add';
|
||||
import QrCode from '@/components/QrCode';
|
||||
import CompanyManager from './manager';
|
||||
export default {
|
||||
name: 'CompanyManage',
|
||||
components: {
|
||||
EditCompany,
|
||||
QrCode,
|
||||
CompanyManager
|
||||
QrCode
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -64,10 +61,6 @@ export default {
|
||||
name: this.$t('global.edit'),
|
||||
handleClick: this.handleUpdate
|
||||
},
|
||||
{
|
||||
name: '绑定管理人员',
|
||||
handleClick: this.setManager
|
||||
},
|
||||
{
|
||||
name: '生成二维码',
|
||||
handleClick: this.handleGenerateQrCode
|
||||
@ -103,9 +96,6 @@ export default {
|
||||
handleUpdate(index, row) {
|
||||
this.$refs.editCompany.doShow(row);
|
||||
},
|
||||
setManager(index, row) {
|
||||
this.$refs.companyManager.doShow(row.id);
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.reload();
|
||||
},
|
||||
|
@ -1,141 +0,0 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="绑定单位管理人员"
|
||||
:visible.sync="dialogVisible"
|
||||
width="80%"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getUserList } from '@/api/management/user';
|
||||
import { getCompanyList, setCompanyManager } from '@/api/company';
|
||||
export default {
|
||||
name: 'Manager',
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false,
|
||||
companyId: '',
|
||||
companyMap: {},
|
||||
pagerConfig: {
|
||||
pageSize: 'pageSize',
|
||||
pageIndex: 'pageNum'
|
||||
},
|
||||
queryForm: {
|
||||
labelWidth: '80px',
|
||||
beforeQuery: this.addParams,
|
||||
reset: true,
|
||||
queryObject: {
|
||||
name: {
|
||||
type: 'text',
|
||||
label: this.$t('system.name')
|
||||
},
|
||||
roles: {
|
||||
type: 'select',
|
||||
label: this.$t('system.roles'),
|
||||
config: {
|
||||
data: this.$ConstSelect.roleList
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
queryList: {
|
||||
query: getUserList,
|
||||
onSelectionChange: this.handleSelectionChange,
|
||||
selectAllClick: this.selectAllClick,
|
||||
selectCheckShow: true,
|
||||
columns: [
|
||||
{
|
||||
title: this.$t('system.name'),
|
||||
prop: 'name'
|
||||
},
|
||||
{
|
||||
title: this.$t('system.nickname'),
|
||||
prop: 'nickname'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.mobile'),
|
||||
prop: 'mobile'
|
||||
},
|
||||
{
|
||||
title: this.$t('global.email'),
|
||||
prop: 'email'
|
||||
},
|
||||
{
|
||||
title: '单位',
|
||||
prop: 'companyId',
|
||||
type: 'tag',
|
||||
columnValue: (row) => { return this.getCompanyName(row.companyId); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
},
|
||||
{
|
||||
title: this.$t('system.roles'),
|
||||
prop: 'roles',
|
||||
type: 'tagMore',
|
||||
columnValue: (row) => { return this.$convertField(row.roles, this.$ConstSelect.roleList, ['value', 'label'], true); },
|
||||
tagType: (row) => { return 'success'; }
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.companyMap = {};
|
||||
getCompanyList().then(resp => {
|
||||
if (resp && resp.data && resp.data.length) {
|
||||
resp.data.forEach(item => {
|
||||
this.companyMap[item.id] = item.name;
|
||||
});
|
||||
}
|
||||
}).catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
doShow(companyId) {
|
||||
this.dialogVisible = true;
|
||||
this.companyId = companyId;
|
||||
this.$nextTick(() => {
|
||||
this.reloadTable();
|
||||
});
|
||||
},
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.companyId = '';
|
||||
},
|
||||
getCompanyName(companyId) {
|
||||
return this.companyMap[companyId];
|
||||
},
|
||||
reloadTable() {
|
||||
this.queryList.queryReload();
|
||||
},
|
||||
addParams(params) {
|
||||
params.companyId = this.companyId;
|
||||
return params;
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
},
|
||||
selectAllClick(val) {
|
||||
const userIds = [];
|
||||
val && val.forEach(item => {
|
||||
userIds.push(item.id);
|
||||
});
|
||||
setCompanyManager(this.companyId, userIds).then(resp => {
|
||||
this.$message.success('绑定单位管理员成功!');
|
||||
this.dialogVisible = false;
|
||||
this.$emit('reloadTable');
|
||||
}).catch(error => {
|
||||
this.$message.error('绑定单位管理员失败!');
|
||||
console.error(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
@ -137,7 +137,6 @@ export default {
|
||||
},
|
||||
forTree(item) {
|
||||
item.children && item.children.forEach(childrenItem => {
|
||||
// childrenItem.key = item.id + childrenItem.id + childrenItem.type;
|
||||
childrenItem.key = item.key + '-' + childrenItem.id;
|
||||
if (childrenItem.children && childrenItem.children.length) {
|
||||
this.forTree(childrenItem);
|
||||
|
Loading…
Reference in New Issue
Block a user