This commit is contained in:
fan 2023-05-11 15:21:55 +08:00
commit 86eff63658
4 changed files with 445 additions and 48 deletions

View File

@ -0,0 +1,310 @@
<template>
<el-dialog v-dialogDrag class="ningbo-01__systerm train-info" :title="title" :visible.sync="show" width="460px" :before-close="doClose" :z-index="2000" :modal="false" :close-on-click-modal="false">
<el-select
v-model="groupNumber"
filterable
size="small"
style="width: 100%;"
:disabled="false"
@change="changeTrain"
>
<el-option
v-for="trainNumber in activeTrainList"
:key="trainNumber"
:label="trainNumber"
:value="trainNumber"
/>
</el-select>
<div class="tabsBox">
<div v-for="(item,index) in tabsList" :key="index" class="simulate-tabs-button" :class="[tabType===item.value?'active':'']" @click="changeTabs(item.value)">{{ item.label }}</div>
</div>
<el-table :data="tableData" :show-header="false" border height="460">
<el-table-column prop="key" label="key" />
<el-table-column prop="value" label="value" />
</el-table>
</el-dialog>
</template>
<script>
import { mapGetters } from 'vuex';
import {TrainType} from '@/scripts/ConstDic';
import LangStorage from '@/utils/lang';
export default {
name: 'TrainDetail',
data() {
return {
tabsList: [
{ label: '基本信息', value: 'baseInfo' }
// { label: '', value: 'groupInfo' },
// { label: '', value: 'planInfo' },
// { label: 'ATC', value: 'atcInfo' },
// { label: '', value: 'carInfo' }
],
baseInfo: [],
groupInfo: [],
planInfo: [],
atcInfo: [],
carInfo: [],
dialogShow: false,
groupNumber: '',
tabType: 'baseInfo'
};
},
computed: {
...mapGetters('map', [
'map'
]),
show() {
return this.dialogShow && !this.$store.state.menuOperation.break;
},
title() {
return '列车信息';
},
activeTrainList() {
return this.$store.state.map.activeTrainList;
},
tableData() {
return this[this.tabType] ? this[this.tabType] : [];
},
stationNames() {
return new Map(this.$store.state.map.map.stationList.map(s=>[s.code, s.name]));
}
},
methods: {
changeTrain(val) {
const train = this.$store.getters['map/getDeviceByCode'](val);
console.log('🚀 ~ file: trainDetail.vue:70 ~ changeTrain ~ val:', val, train);
if (train) {
this.initData(train);
}
},
doShow(selected) {
this.initData(selected);
this.dialogShow = true;
},
doClose() {
this.dialogShow = false;
},
changeTabs(type) {
switch (type) {
case 'baseInfo':
this.tabType = 'baseInfo';
break;
case 'groupInfo':
this.tabType = 'groupInfo';
break;
case 'planInfo':
this.tabType = 'planInfo';
break;
case 'atcInfo':
this.tabType = 'atcInfo';
break;
case 'carInfo':
this.tabType = 'carInfo';
break;
}
},
initData(model) {
this.groupNumber = model.groupNumber;
let direction = model.right == 1;
if (!this.$store.state.map.mapConfig.upRight) {
direction = model.right != 1;
}
const physicalSection = this.$store.getters['map/getDeviceByCode'](model.physicalCode);
let closeDoorTip = '';
if (physicalSection && physicalSection.standTrack) {
const stationStand = this.$store.state.map.map.stationStandList.find(item => item.standTrackCode === physicalSection.code);
if ((stationStand.right && model.right) || (!stationStand.right && !model.right)) {
if (stationStand.inside) {
closeDoorTip = '左开右关';
} else {
closeDoorTip = '左关右开';
}
} else {
if (stationStand.inside) {
closeDoorTip = '左关右开';
} else {
closeDoorTip = '左开右关';
}
}
}
const turnBackStrategyMap = new Map([
['NONE', '无折返'],
['DEFAULT', '默认'],
['AUTO', '自动换端'],
['UNMANNED', '无人折返']
]);
const turnBackStatusMap = new Map([
['NON', '无折返'],
['INIT', '初始化'],
['TO', '开往折返轨'],
['STOP', '到达折返轨停稳'],
['EXIT', '开出折返轨']
]);
const highAtpModeMap = {
AM_C: 'AM',
SM_C: 'SM',
AM_I: 'AM',
SM_I: 'SM',
RM: 'RM'
};
const highSignalControlMap = {
AM_C: 'CTC',
SM_C: 'CTC',
AM_I: 'ITC',
SM_I: 'ITC',
RM: 'IL'
};
this.baseInfo = [
{key: '列车类型', value: TrainType[model.type] || ''},
{key: '来源', value: '人工标记'},
{key: '车组号', value: model.groupNumber || ''},
{key: '表号', value: model.serviceNumber || ''},
{key: '车次号', value: model.tripNumber || ''},
{key: '目的地号', value: model.destinationCode || ''},
{key: '早晚点', value: this.getTimeStatus(model)},
{key: '运行方向', value: direction ? '上行' : '下行'},
{key: 'ATP报告方向', value: direction ? '上行' : '下行'},
{key: '起点站名', value: this.stationNames.get(model.startStation) || ''},
{key: '终点站名', value: this.stationNames.get(model.endStation) || ''},
{key: '占用轨道', value: `${model.sectionModel ? (model.sectionModel.parentName ? model.sectionModel.parentName : model.sectionModel.name) : ''}`},
{key: '所在车站', value: this.stationNames.get(model.stationCode)},
{key: '车次通信', value: '通信车'},
{key: '运行时间', value: `${model.runningTime}s`},
{key: '停站时间', value: `${model.parkingRemainTime < 0 ? '无效' : `${model.parkingRemainTime}s`}`},
{key: '扣车状态', value: `${ model.hold ? '扣车' : '正常'}`},
{key: '车载扣车', value: `不执行`},
{key: '跳停状态', value: `${model.jump ? '跳停' : '正常'}`},
{key: '停稳状态', value: `${!model.stop ? '未停稳' : '停稳'}`},
{key: '阻塞状态', value: ``},
{key: '列车状态', value: `${model.runLevel === 'CBTC' ? 'CTC' : model.runLevel}`},
{key: '最高信号系统控制', value: `${highSignalControlMap[model.preselectionMode]}`},
{key: '驾驶模式', value: `${model.driveMode}模式`},
{key: '最高ATP模式', value: `${highAtpModeMap[model.preselectionMode]}`},
{key: 'ATP1状态', value: `激活`},
{key: 'ATP2状态', value: `备用`},
{key: '速度', value: `${model.speed || 0} km/h`},
{key: '车门状态', value: `${model.doorCloseLock ? '关闭' : closeDoorTip}`},
{key: '制动状态', value: `无紧急制动`},
{key: '停车保证', value: `可保证停车`},
{key: '站台无法进入', value: ``},
{key: '前方站台停车点', value: `中间`},
{key: '折返策略', value: `${turnBackStrategyMap.get(model.turnBackStrategy) || ''}`},
{key: '折返状态', value: `${turnBackStatusMap.get(model.turnBackStatus)}`},
{key: '屏蔽门开门许可', value: ``},
{key: '运营里程', value: '无效'},
{key: '总重量', value: `196T`},
{key: '车长', value: `11860cm`},
{key: '列车编组', value: `1`}
];
// this.baseInfo = [
// {key: '', value: model.groupNumber || ''},
// {key: '', value: model.tripNumber || ''},
// {key: '', value: model.serviceNumber || ''},
// {key: '', value: model.destinationCode || ''},
// {key: '', value: TrainType[model.type] || ''},
// {key: '', value: ''},
// {key: '', value: this.stationNames.get(model.stationCode)},
// {key: '', value: `${model.sectionModel ? (model.sectionModel.parentName ? model.sectionModel.parentName : model.sectionModel.name) : ''}`},
// {key: '', value: `${model.runLevel === 'CBTC' ? 'CTC' : model.runLevel}`},
// {key: 'ATP', value: 'ATP'},
// {key: '', value: `${!model.stop ? '' : ''}`}
// ];
this.groupInfo = [
{key: '车组号', value: model.groupNumber || ''},
{key: '设备ID', value: '1'},
{key: '车头号1', value: ''},
{key: '车头号2', value: ''},
{key: '车厢号1', value: ''},
{key: '车厢号2', value: ''},
{key: '车厢号3', value: ''},
{key: '车厢号4', value: ''},
{key: '车厢号5', value: ''},
{key: '车厢号6', value: ''},
{key: '车厢号7', value: ''},
{key: '车厢号8', value: ''}
];
this.planInfo = [
{key: '车组号', value: model.groupNumber || ''},
{key: '单程号', value: model.tripNumber || ''},
{key: '服务号', value: model.serviceNumber || ''},
{key: '运行等级', value: model.runLevel},
{key: '状态', value: this.getTimeStatus(model)},
{key: '计划偏离', value: model.dt},
{key: '停站时间', value: `${model.parkingRemainTime < 0 ? '无效' : `${model.parkingRemainTime}s`}`},
{key: '计划到站', value: ''},
{key: '计划到点', value: ''},
{key: '计划发点', value: ''},
{key: '终端发车站台', value: ''},
{key: '终端发车时间', value: ''},
{key: '预计离开站台', value: ''},
{key: '预计离开时间', value: ''},
{key: '预计到达站台', value: ''},
{key: '预计到达时间', value: ''},
{key: '区间运行时分', value: ''}
];
this.atcInfo = [
{key: '车组号', value: model.groupNumber || ''},
{key: '单程号', value: model.tripNumber || ''},
{key: '服务号', value: model.serviceNumber || ''},
{key: '运行方向', value: model.right ? '上行' : '下行'},
{key: '有效驾驶模式', value: `${model.driveMode}模式`},
{key: '速度', value: `${model.speed || 0} km/h`},
{key: '司机号', value: ''},
{key: 'ATC状态', value: '全部有效'},
{key: '扣车状态', value: model.runControlStatus === '01' ? '正常' : model.runControlStatus === '03' ? '跳停' : '扣车'},
{key: '车门状态', value: model.speed ? '关闭' : '开启'},
{key: '驾驶模式', value: `${model.driveMode}模式`},
{key: '车载目的地号', value: model.destinationCode || ''}
];
this.carInfo = [];
},
getTimeStatus(model) {
const device = model.instance;
let destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知';
if (device.model.dt > 120) {
destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
} else if (device.model.dt < -120) {
destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点';
} else {
destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
}
return destinationText;
}
}
};
</script>
<style lang="scss" scoped>
.tabsBox {
display: flex;
justify-content: space-between;
margin-top: 5px;
margin-bottom: 5px;
.simulate-tabs-button {
border-top: solid 1px #FBFAEF;
border-left: solid 1px #FBFAEF;
border-bottom: solid 1px #858273;
border-right: solid 1px #858273;
width: 80px;
height: 28px;
font-size: 14px;
line-height: 28px;
text-align: center;
cursor: pointer;
&:hover{
border-top: solid 1px #858273;
border-left: solid 1px #858273;
border-bottom: solid 1px #FBFAEF;
border-right: solid 1px #FBFAEF;
}
}
.active{
border-top: solid 1px #858273;
border-left: solid 1px #858273;
border-bottom: solid 1px #FBFAEF;
border-right: solid 1px #FBFAEF;
}
}
</style>

View File

@ -11,6 +11,7 @@
<trainSetWorkATP ref="trainSetWorkATP" />
<speed-limit ref="speedLimit" pop-class="ningbo-01__systerm" />
<set-fault ref="setFault" pop-class="ningbo-01__systerm" />
<train-detail ref="trainDetail" />
</div>
</template>
@ -32,6 +33,7 @@ import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
import { DeviceMenu, OperateMode } from '@/scripts/ConstDic';
import CMD from '@/scripts/cmdPlugin/CommandEnum';
import { menuOperate, commitOperate } from '@/jmapNew/theme/components/utils/menuOperate';
import TrainDetail from './dialog/trainDetail';
export default {
name: 'MenuTrain',
@ -46,7 +48,8 @@ export default {
TrainSetWork,
trainSetWorkATP,
SetFault,
SpeedLimit
SpeedLimit,
TrainDetail
},
props: {
selected: {
@ -137,7 +140,7 @@ export default {
},
{
label: '列车信息',
handler: this.undeveloped,
handler: this.trainDetail,
cmdType: CMD.TrainWindow.CMD_Train_Init_Plan,
isShow: selected => selected && selected._type === 'Train'
}
@ -239,6 +242,9 @@ export default {
}
},
methods: {
trainDetail() {
this.$refs.trainDetail.doShow(this.selected);
},
initMenu() {
//
this.menu = [];

View File

@ -72,6 +72,7 @@ import { startTraining, endTraining, getPublishTrainingDetail, loadPublishTraini
import ScenePlayRole from './scenePlayRole';
import TestResult from './testResult';
import { EventBus } from '@/scripts/event-bus';
import Handler from '@/scripts/cmdPlugin/newHandler';
export default {
name: 'TipTrainingDetail',
components: {
@ -156,6 +157,7 @@ export default {
this.$store.dispatch('trainingNew/changeTeachMode', this.demoMode);
},
handlerStart() {
Handler.clear();
if (this.trainingDetail.type === 'SCENE' && !this.examSwitch) {
this.$refs.scenePlayRole.doShow();
} else {

View File

@ -293,7 +293,7 @@
</div>
</el-tab-pane>
<el-tab-pane class="view-control" label="会话群" name="six" :lazy="lazy">
<el-tabs v-model="conversationActive" class="card" style="height: calc(100% - 46px)">
<el-tabs v-model="conversationActive" class="card" style="height: 100%">
<el-tab-pane class="view-control" label="地铁CBTC" name="METRO">
<div style="height: 100%;overflow-y: auto;padding: 5px;">
<el-row :gutter="5" style="margin-bottom: 5px;">
@ -311,7 +311,7 @@
<div class="uploadImgDiv">
<img v-if="item.imageUrl" :src="getImgUrl(item.imageUrl)" :alt="getImgUrl(item.imageUrl)">
<i class="el-icon-plus" />
<input :id="'upload_file_METRO' + index" ref="files" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo('METRO', index)">
<input :id="'upload_file_METRO' + index" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo('METRO', index)">
</div>
</el-col>
<el-col :span="5">
@ -320,8 +320,8 @@
</el-select>
</el-col>
<el-col :span="8">
<el-select v-model="item.memberIds" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberMetroList)">
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberMetroList)">
<el-option v-for="elem in memberMetroList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -347,7 +347,7 @@
<div class="uploadImgDiv">
<img v-if="item.imageUrl" :src="getImgUrl(item.imageUrl)" :alt="getImgUrl(item.imageUrl)">
<i class="el-icon-plus" />
<input :id="'upload_file_RAILWAY' + index" ref="files" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo('RAILWAY', index)">
<input :id="'upload_file_RAILWAY' + index" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo('RAILWAY', index)">
</div>
</el-col>
<el-col :span="5">
@ -356,8 +356,8 @@
</el-select>
</el-col>
<el-col :span="8">
<el-select v-model="item.memberIds" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberRailwayList)">
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberRailwayList)">
<el-option v-for="elem in memberRailwayList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -383,7 +383,7 @@
<div class="uploadImgDiv">
<img v-if="item.imageUrl" :src="getImgUrl(item.imageUrl)" :alt="getImgUrl(item.imageUrl)">
<i class="el-icon-plus" />
<input :id="'upload_file_EMERGENCY' + index" ref="files" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo('EMERGENCY', index)">
<input :id="'upload_file_EMERGENCY' + index" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo('EMERGENCY', index)">
</div>
</el-col>
<el-col :span="5">
@ -392,8 +392,8 @@
</el-select>
</el-col>
<el-col :span="8">
<el-select v-model="item.memberIds" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberEmergencyList)">
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
<el-select v-model="item.memberIds" :class="{disabledClear: item.memberIds.length ==1}" multiple collapse-tags placeholder="请选择" size="mini" :title="getMemberTitle(item.memberIds, memberEmergencyList)">
<el-option v-for="elem in memberEmergencyList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="item.memberIds.length ==1 && item.memberIds.includes(elem.id)" />
</el-select>
</el-col>
<el-col :span="3" style="text-align: center;">
@ -402,12 +402,42 @@
</el-row>
</div>
</el-tab-pane>
<el-tab-pane class="view-control" label="新建会话群" name="create">
<div style="height: 100%;overflow-y:auto;padding: 5px;">
<el-form ref="conversationForm" :model="conversationForm" label-width="150px" :rules="conversationRules" size="small">
<el-form-item label="系统:" prop="systemType">
<el-select v-model="conversationForm.systemType" placeholder="请选择" @change="resetConversationForm">
<el-option v-for="item in systemList" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
<el-form-item label="群名称:" prop="name">
<el-input v-model="conversationForm.name" style="width: 200px;" />
</el-form-item>
<el-form-item label="群头像:" prop="imageUrl">
<div class="uploadImgDiv" style="margin: 0">
<img v-if="conversationForm.imageUrl" :src="getImgUrl(conversationForm.imageUrl)" :alt="getImgUrl(conversationForm.imageUrl)">
<i class="el-icon-plus" />
<input id="upload_file_" type="file" class="input_file_box" accept="image/jpeg,image/png" @change="uploadLogo()">
</div>
</el-form-item>
<el-form-item label="群主:" prop="leaderId">
<el-select v-model="conversationForm.leaderId" placeholder="请选择" style="width: 200px;" :title="getMemberTitle(conversationForm.leaderId, getFormMemberList)">
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" />
</el-select>
</el-form-item>
<el-form-item label="群成员:" prop="memberIds">
<el-select v-model="conversationForm.memberIds" :class="{disabledClear: conversationForm.memberIds.length ==1}" style="width: 200px;" multiple collapse-tags placeholder="请选择" :title="getMemberTitle(conversationForm.memberIds, getFormMemberList)">
<el-option v-for="elem in getFormMemberList" :key="elem.id" :label="getLabel(elem)" :value="elem.id" :disabled="conversationForm.memberIds.length ==1 && conversationForm.memberIds.includes(elem.id)" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="createConversation">确定</el-button>
<el-button @click="resetConversationForm">重置</el-button>
</el-form-item>
</el-form>
</div>
</el-tab-pane>
</el-tabs>
<div class="button_box">
<el-button-group class="map-draft-group">
<el-button type="primary" size="small" @click="createConversation">新建会话群</el-button>
</el-button-group>
</div>
</el-tab-pane>
</el-tabs>
</template>
@ -469,7 +499,23 @@ export default {
},
disStationList: [],
stationShow: ['STATION_SUPERVISOR', 'DEPOT_DISPATCHER', 'SIGNAL_BUILDING', 'STATION_ASSISTANT', 'STATION_MASTER', 'STATION_SIGNALER', 'STATION_PASSENGER', 'STATION_SWITCH_MAN',
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER']
'STATION_FACILITATOR', 'STATION_WORKER', 'DEVICE_MANAGER'],
conversationForm: {
systemType: 'METRO',
id: '',
name: '',
imageUrl: '',
leaderId: '',
memberIds: []
},
conversationRules: {
leaderId: [
{ required: true, message: '请选择群主', trigger: 'change' }
],
memberIds: [
{ type: 'array', required: true, message: '请至少选择一个群成员', trigger: 'change' }
]
}
};
},
computed: {
@ -495,6 +541,14 @@ export default {
},
conversationEmergencyList() {
return this.$store.state.map.map.conversationGroupMap.EMERGENCY;
},
getFormMemberList() {
const conversationMap = { METRO: this.memberMetroList, RAILWAY: this.memberRailwayList, EMERGENCY: this.memberEmergencyList };
let list = [];
if (conversationMap[this.conversationForm.systemType]) {
list = conversationMap[this.conversationForm.systemType];
}
return list;
}
},
watch: {
@ -504,6 +558,9 @@ export default {
this.initDisStationList();
},
methods: {
resetConversationForm() {
this.$refs.conversationForm.resetFields();
},
getMemberTitle(val, list) {
const mapList = {};
list.forEach(item => {
@ -570,35 +627,40 @@ export default {
}
},
createConversation() {
const list = [];
this.conversationMetroList.forEach(item => {
if (item.id) {
list.push(item.id);
this.$refs.conversationForm.validate((valid) => {
if (valid) {
const list = [];
this.conversationMetroList.forEach(item => {
if (item.id) {
list.push(item.id);
}
});
this.conversationRailwayList.forEach(item => {
if (item.id) {
list.push(item.id);
}
});
this.conversationEmergencyList.forEach(item => {
if (item.id) {
list.push(item.id);
}
});
const maxNum = list.length ? Math.max(...list) : 0;
const obj = {
id: maxNum + 1,
name: this.conversationForm.name,
imageUrl: this.conversationForm.imageUrl,
leaderId: this.conversationForm.leaderId,
memberIds: this.conversationForm.memberIds
};
console.log('🚀 ~ file: index.vue:584 ~ createConversation ~ obj:', obj);
const conversationMap = { METRO: this.conversationMetroList, RAILWAY: this.conversationRailwayList, EMERGENCY: this.conversationEmergencyList };
if (conversationMap[this.conversationForm.systemType]) {
conversationMap[this.conversationForm.systemType].push(obj);
}
this.resetConversationForm();
}
});
this.conversationRailwayList.forEach(item => {
if (item.id) {
list.push(item.id);
}
});
this.conversationEmergencyList.forEach(item => {
if (item.id) {
list.push(item.id);
}
});
const maxNum = list.length ? Math.max(...list) : 0;
const obj = {
id: maxNum + 1,
name: '',
imageUrl: '',
leaderId: '',
memberIds: []
};
console.log('🚀 ~ file: index.vue:584 ~ createConversation ~ obj:', obj);
const conversationMap = { METRO: this.conversationMetroList, RAILWAY: this.conversationRailwayList, EMERGENCY: this.conversationEmergencyList };
if (conversationMap[this.conversationActive]) {
conversationMap[this.conversationActive].push(obj);
}
},
initDisStationList() {
getDisStationList(this.$route.params.mapId).then(resp => {
@ -1071,7 +1133,11 @@ export default {
memberMap[this.clearForm.systemType].splice(0, memberMap[this.clearForm.systemType].length);
},
uploadLogo(type, index) {
const pic = document.getElementById('upload_file_' + type + index);
let t = '';
if (type) {
t = type + index;
}
const pic = document.getElementById('upload_file_' + t);
if (!pic.files || !pic.files[0]) {
return;
}
@ -1107,8 +1173,12 @@ export default {
xhr.send(file);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status == 200) {
if (conversationMap[type] && conversationMap[type][index]) {
conversationMap[type][index].imageUrl = params.fileName;
if (type) {
if (conversationMap[type] && conversationMap[type][index]) {
conversationMap[type][index].imageUrl = params.fileName;
}
} else {
that.conversationForm.imageUrl = params.fileName;
}
} else if (xhr.status != 200) {
that.$message.error('上传失败,请稍后再试');
@ -1159,4 +1229,13 @@ $imgHeight: 70px;
cursor: pointer;
}
}
.disabledClear {
/deep/ .el-select__tags {
.el-tag {
.el-tag__close {
display: none !important;
}
}
}
}
</style>