Merge branch 'test' of https://git.code.tencent.com/lian-cbtc/jl-client into test
This commit is contained in:
commit
a188121aac
@ -78,6 +78,7 @@ export default {
|
||||
],
|
||||
roleTypeList: [
|
||||
{label: '行调', value: 'DISPATCHER'},
|
||||
{label: 'NCC行调', value: 'NCC_DISPATCHER'},
|
||||
{label: '行值', value: 'STATION_SUPERVISOR'},
|
||||
{label: '司机', value: 'DRIVER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
|
@ -81,6 +81,7 @@ export default {
|
||||
],
|
||||
typeList: [
|
||||
{label: '行调', value: 'DISPATCHER'},
|
||||
{label: 'NCC行调', value: 'NCC_DISPATCHER'},
|
||||
{label: '通号', value: 'MAINTAINER'},
|
||||
{label: '车站值班员', value: 'STATION_SUPERVISOR'},
|
||||
{label: '车站助理', value: 'STATION_ASSISTANT'},
|
||||
|
@ -96,6 +96,9 @@ export default {
|
||||
treeData: [{
|
||||
labelName: '行调',
|
||||
children: []
|
||||
}, {
|
||||
labelName: 'NCC行调',
|
||||
children: []
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
children: []
|
||||
@ -174,6 +177,7 @@ export default {
|
||||
if (val && val.length) {
|
||||
this.memberData = this.$store.state.training.memberData;
|
||||
const dispatcherList = [];
|
||||
const nccDispatcherList = [];
|
||||
const electricDispatcherList = [];
|
||||
const depotDispatcherList = [];
|
||||
const stationSupervisorList = [];
|
||||
@ -197,6 +201,10 @@ export default {
|
||||
this.memberData[item.id].labelName = '行调' + (item.name || '');
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'NCC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = 'NCC行调' + (item.name || '');
|
||||
nccDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '电力调度' + (item.name || '');
|
||||
electricDispatcherList.push(this.memberData[item.id]);
|
||||
@ -272,6 +280,10 @@ export default {
|
||||
labelName: '行调',
|
||||
id: 'dispatcher',
|
||||
children: dispatcherList
|
||||
}, {
|
||||
labelName: 'NCC行调',
|
||||
id: 'nccDispatcher',
|
||||
children: nccDispatcherList
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
id: 'stationSupervisor',
|
||||
|
@ -66,7 +66,7 @@
|
||||
<div v-else-if="tabActive==2">工作台</div>
|
||||
<div v-else-if="tabActive==3">通讯录</div>
|
||||
</div>
|
||||
<EditGroup ref="editGroup" @createGroup="getGroupList" />
|
||||
<EditGroup ref="editGroup" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -162,6 +162,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
'$store.state.socket.conversationGroup.JOIN': function(val) {
|
||||
if (val.messageTips) {
|
||||
this.$message.success(`${val.messageTips}`);
|
||||
}
|
||||
this.getGroupList();
|
||||
},
|
||||
myMemberId() {
|
||||
this.getGroupList();
|
||||
}
|
||||
@ -229,7 +235,7 @@ export default {
|
||||
getGroupList(this.groupId).then(res => {
|
||||
console.log(res, '---res--');
|
||||
this.groupList = res.data;
|
||||
if (this.groupList && this.groupList[0]) {
|
||||
if (this.groupList && this.groupList[0] && !this.id) {
|
||||
this.id = this.groupList[0].id;
|
||||
}
|
||||
}).catch(err => {
|
||||
@ -272,6 +278,7 @@ export default {
|
||||
|
||||
<style lang='scss' scoped>
|
||||
.chatDialog {
|
||||
overflow: hidden;
|
||||
.pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
@ -47,10 +47,10 @@
|
||||
</div>
|
||||
<el-divider />
|
||||
<el-form ref="form" :model="form" label-width="80px">
|
||||
<el-form-item label="群名称:">
|
||||
<el-form-item label="群名称:" prop="name">
|
||||
<el-input v-model="form.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="群头像:">
|
||||
<el-form-item label="群头像:" prop="imageUrl">
|
||||
<div class="uploadImgDiv">
|
||||
<img v-if="form.imageUrl" :src="getImgUrl(form.imageUrl)" :alt="getImgUrl(form.imageUrl)">
|
||||
<i class="el-icon-plus" />
|
||||
@ -92,6 +92,9 @@ export default {
|
||||
treeData: [{
|
||||
labelName: '行调',
|
||||
children: []
|
||||
}, {
|
||||
labelName: 'NCC行调',
|
||||
children: []
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
children: []
|
||||
@ -156,18 +159,11 @@ export default {
|
||||
memberData() {
|
||||
return this.$store.state.training.memberData;
|
||||
},
|
||||
userId() {
|
||||
return this.$store.state.user.id;
|
||||
myMemberId() {
|
||||
return this.$store.state.training.myMemberId;
|
||||
},
|
||||
defaultCheckedKeys() {
|
||||
const list = [];
|
||||
const find = this.memberList.find(item => {
|
||||
return item.userId == this.userId;
|
||||
});
|
||||
if (find) {
|
||||
list.push(find.id);
|
||||
}
|
||||
return list;
|
||||
return [this.myMemberId];
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -182,10 +178,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.defaultCheckedKeys.forEach(id => {
|
||||
const node = this.memberData[id];
|
||||
node && this.selectTreeNode.push(node);
|
||||
});
|
||||
this.initData();
|
||||
},
|
||||
created() {
|
||||
this.getTreeData();
|
||||
@ -221,6 +214,7 @@ export default {
|
||||
if (val && val.length) {
|
||||
// this.memberData = this.$store.state.training.memberData;
|
||||
const dispatcherList = [];
|
||||
const nccDispatcherList = [];
|
||||
const electricDispatcherList = [];
|
||||
const depotDispatcherList = [];
|
||||
const stationSupervisorList = [];
|
||||
@ -244,6 +238,10 @@ export default {
|
||||
this.memberData[item.id].labelName = '行调' + (item.name || '');
|
||||
dispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'NCC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = 'NCC行调' + (item.name || '');
|
||||
nccDispatcherList.push(this.memberData[item.id]);
|
||||
break;
|
||||
case 'ELECTRIC_DISPATCHER':
|
||||
this.memberData[item.id].labelName = '电力调度' + (item.name || '');
|
||||
electricDispatcherList.push(this.memberData[item.id]);
|
||||
@ -317,8 +315,12 @@ export default {
|
||||
});
|
||||
this.treeData = [{
|
||||
labelName: '行调',
|
||||
id: 'dispatcher1',
|
||||
id: 'dispatcher',
|
||||
children: dispatcherList
|
||||
}, {
|
||||
labelName: 'NCC行调',
|
||||
id: 'nccDispatcher',
|
||||
children: nccDispatcherList
|
||||
}, {
|
||||
labelName: '车站值班员',
|
||||
id: 'stationSupervisor',
|
||||
@ -430,15 +432,21 @@ export default {
|
||||
};
|
||||
createGroup(this.groupId, params).then(res => {
|
||||
console.log(res, 'res');
|
||||
this.$refs.form.resetFields();
|
||||
this.initData();
|
||||
this.handleClose();
|
||||
this.$emit('createGroup');
|
||||
this.$message.success('创建会话群成功!');
|
||||
}).catch(err => {
|
||||
console.log(err, 'err');
|
||||
this.$message.error(`创建会话群失败!${err.message}`);
|
||||
});
|
||||
},
|
||||
initData() {
|
||||
this.$refs.form && this.$refs.form.resetFields();
|
||||
this.selectTreeNode = [];
|
||||
const node = this.memberData[this.myMemberId];
|
||||
node && this.selectTreeNode.push(node);
|
||||
this.$refs.tree && this.$refs.tree.setCheckedKeys([this.myMemberId]);
|
||||
},
|
||||
uploadLogo() {
|
||||
const pic = document.getElementById('upload_file_group');
|
||||
if (!pic.files || !pic.files[0]) {
|
||||
@ -514,6 +522,7 @@ export default {
|
||||
$imgWidth: 70px;
|
||||
$imgHeight: 70px;
|
||||
.editGroup {
|
||||
overflow: hidden;
|
||||
.body {
|
||||
height: 600px;
|
||||
.left,.right {
|
||||
|
@ -159,8 +159,6 @@
|
||||
<el-input-number v-model="batchForm.MAINTAINER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="行值:" prop="STATION_SUPERVISOR">
|
||||
<el-input-number v-model="batchForm.STATION_SUPERVISOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
@ -171,104 +169,95 @@
|
||||
<el-input-number v-model="batchForm.DRIVER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'METRO'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="车辆段/停车场调度:" prop="DEPOT_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.DEPOT_DISPATCHER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="车辆段/停车场信号楼:" prop="SIGNAL_BUILDING">
|
||||
<el-input-number v-model="batchForm.SIGNAL_BUILDING" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="车站助理:" prop="STATION_ASSISTANT">
|
||||
<el-input-number v-model="batchForm.STATION_ASSISTANT" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="车站站长:" prop="STATION_MASTER">
|
||||
<el-input-number v-model="batchForm.STATION_MASTER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="车站信号员:" prop="STATION_SIGNALER">
|
||||
<el-input-number v-model="batchForm.STATION_SIGNALER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="车站客运员:" prop="STATION_PASSENGER">
|
||||
<el-input-number v-model="batchForm.STATION_PASSENGER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="车站扳道员:" prop="STATION_SWITCH_MAN">
|
||||
<el-input-number v-model="batchForm.STATION_SWITCH_MAN" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="车站引导员:" prop="STATION_FACILITATOR">
|
||||
<el-input-number v-model="batchForm.STATION_FACILITATOR" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'RAILWAY'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="车站工务工:" prop="STATION_WORKER">
|
||||
<el-input-number v-model="batchForm.STATION_WORKER" size="small" :min="0" :max="1" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'RAILWAY'" :span="12">
|
||||
<el-form-item label="设备管理员:" prop="DEVICE_MANAGER">
|
||||
<el-input-number v-model="batchForm.DEVICE_MANAGER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'METRO'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="工电调度:" prop="ELECTRIC_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.ELECTRIC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="车务段段长:" prop="TRAIN_MASTER">
|
||||
<el-input-number v-model="batchForm.TRAIN_MASTER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row v-if="batchForm.systemType === 'METRO'">
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="值班主任:" prop="SHIFT_MANAGER">
|
||||
<el-input-number v-model="batchForm.SHIFT_MANAGER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="环控调度" prop="ENVIRONMENT_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.ENVIRONMENT_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col v-if="batchForm.systemType === 'METRO'" :span="12">
|
||||
<el-form-item label="电力工务" prop="STATION_ELECTRIC_WORKER">
|
||||
<el-input-number v-model="batchForm.STATION_ELECTRIC_WORKER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- -->
|
||||
<el-col :span="12">
|
||||
<el-form-item label="NCC行调:" prop="NCC_DISPATCHER">
|
||||
<el-input-number v-model="batchForm.NCC_DISPATCHER" size="small" :min="0" :step="1" :precision="0" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="batchCreate">批量创建</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="batchCreate">批量创建</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</div></el-tab-pane>
|
||||
<el-tab-pane class="view-control" label="一键生成" name="fourth" :lazy="lazy">
|
||||
<el-form ref="generationForm" :model="generationForm" label-width="120px" class="demo-ruleForm" size="small">
|
||||
<el-form-item label="系统:" prop="systemType">
|
||||
@ -451,6 +440,7 @@ export default {
|
||||
},
|
||||
batchForm: {
|
||||
DISPATCHER: 0,
|
||||
NCC_DISPATCHER: 0,
|
||||
STATION_SUPERVISOR: 0,
|
||||
DRIVER: 0,
|
||||
MAINTAINER: 0,
|
||||
@ -545,7 +535,11 @@ export default {
|
||||
name += findType.label;
|
||||
}
|
||||
name += '-';
|
||||
if (obj.type == 'DISPATCHER') {
|
||||
if (obj.type == 'NCC_DISPATCHER') {
|
||||
if (obj.name) {
|
||||
name += obj.name;
|
||||
}
|
||||
} else if (obj.type == 'DISPATCHER') {
|
||||
const findDeviceCode = this.disStationList.find(item => {
|
||||
return item.code == obj.deviceCode;
|
||||
});
|
||||
@ -652,6 +646,17 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.batchForm.NCC_DISPATCHER) {
|
||||
for (let i = 0; i < this.batchForm.NCC_DISPATCHER; i++) {
|
||||
const member = {
|
||||
id: this.getMemberId(this.batchForm.systemType),
|
||||
name: '',
|
||||
type: 'NCC_DISPATCHER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.batchForm.systemType].push(member);
|
||||
}
|
||||
}
|
||||
this.stationList.forEach(station => {
|
||||
if (!station.depot) {
|
||||
if (this.batchForm.STATION_SUPERVISOR) {
|
||||
@ -850,6 +855,7 @@ export default {
|
||||
resetForm() {
|
||||
this.batchForm = {
|
||||
DISPATCHER: 0,
|
||||
NCC_DISPATCHER: 0,
|
||||
STATION_SUPERVISOR: 0,
|
||||
DRIVER: 0,
|
||||
MAINTAINER: 0,
|
||||
@ -905,6 +911,13 @@ export default {
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberDispatcher);
|
||||
}
|
||||
const memberNccDispatcher = {
|
||||
id: this.getMemberId(this.generationForm.systemType),
|
||||
name: '',
|
||||
type: 'NCC_DISPATCHER',
|
||||
deviceCode: ''
|
||||
};
|
||||
memberMap[this.generationForm.systemType].push(memberNccDispatcher);
|
||||
this.stationList.forEach(station => {
|
||||
if (!station.depot) {
|
||||
const member = {
|
||||
|
Loading…
Reference in New Issue
Block a user