福州列车显示调整&表单组件button增加loading
This commit is contained in:
parent
d0e862823a
commit
3b171130f9
@ -139,9 +139,10 @@
|
||||
:key="idx"
|
||||
size="mini"
|
||||
style="margin-top: 5px;"
|
||||
:loading="scope.row['loading'+idx]"
|
||||
:type="button.type ? button.type : 'primary'"
|
||||
:disabled="isTableBtnDisabled(button, scope.$index, scope.row)"
|
||||
@click="button.handleClick(scope.$index, scope.row) "
|
||||
@click="button.handleClick(scope.$index, scope.row, idx) "
|
||||
>{{ getTableBtnName(button.name, scope.$index, scope.row) }}</el-button>
|
||||
</template>
|
||||
</template>
|
||||
|
@ -121,7 +121,7 @@ class SkinCode extends defaultStyle {
|
||||
};
|
||||
|
||||
this[deviceType.Signal] = {
|
||||
distance: 10, // 设备距离区段的距离
|
||||
distance: 3, // 设备距离区段的距离
|
||||
post: {
|
||||
standardLength: 6, // 高柱长度
|
||||
standardHeight: 6, // 灯柱高度
|
||||
@ -544,12 +544,12 @@ class SkinCode extends defaultStyle {
|
||||
changeTrainWidth: true, // 是否根据车身上车组号、服务号、车次号、目的地码显示情况改变列车长度
|
||||
specialTrainType: [
|
||||
{
|
||||
type: '03',
|
||||
type: 'MANUAL',
|
||||
serviceNumber: 'MM',
|
||||
nameFormat: 'serviceNumber:groupNumber'
|
||||
},
|
||||
{
|
||||
type: '02',
|
||||
type: 'HEAD',
|
||||
nameFormat: 'targetCode:groupNumber'
|
||||
}
|
||||
], // 特殊列车类型需设置显示格式
|
||||
@ -558,6 +558,14 @@ class SkinCode extends defaultStyle {
|
||||
trainBodyFillColor: '#000000', // 列车车身填充颜色
|
||||
trainNameFormat: 'targetCode:serviceNumber:tripNumber'// 列车显示格式
|
||||
},
|
||||
soonerOrLater: {
|
||||
level: 3,
|
||||
serviceNumber: true,
|
||||
destinationCode: true, // 目的地号颜色改变
|
||||
earlyColor: '#00FF00',
|
||||
lateColor: '#800000',
|
||||
normalColor: '#FFF'
|
||||
},
|
||||
directionArrow: {
|
||||
},
|
||||
hsda: {
|
||||
@ -583,7 +591,9 @@ class SkinCode extends defaultStyle {
|
||||
trainTargetNumber: {
|
||||
groupNumberPrefix: '000', // 车组号前缀
|
||||
defaultGroupNumber: 'EEE', // 默认车组号
|
||||
trainTargetNumberOffset: {x: -1, y: 1}// 车组号偏移量
|
||||
trainTargetNumberOffset: {x: -1, y: 1}, // 车组号偏移量
|
||||
headTypeColor: '#FFFF00', // 头码车车组号显示颜色
|
||||
manualTypeColor: '#FFFF00' // 人工车车组号显示颜色
|
||||
},
|
||||
trainHead: {
|
||||
trainHeadRectHeight: 15, // 列车车头矩形高度
|
||||
|
@ -84,15 +84,11 @@ export default class Line2 extends Group {
|
||||
setState(model) {
|
||||
if (!this.isShowShape) return;
|
||||
/** 设置屏蔽门开关*/
|
||||
// if (model.name == 'Psd44') {
|
||||
// console.log(model, model.screenDoorOpenStatus, '1 为关门 0 为开门');
|
||||
// }
|
||||
model.screenDoorOpenStatus == 0 && this.openDoor(); /** 开门*/
|
||||
model.screenDoorOpenStatus != 0 && this.closeDoor(); /** 关门*/
|
||||
|
||||
model.alarmStatus && this.alarm(); /** 收到警报(西安二号线样式) */
|
||||
model.emergencyDepart && this.emergencyDepart(); /** 紧急出发按钮激活(西安二号线样式) */
|
||||
|
||||
// /** 设置屏蔽门状态*/
|
||||
// switch (model.screenDoorStatus) {
|
||||
// case '01':
|
||||
|
@ -12,14 +12,27 @@ class EMouse extends Group {
|
||||
this.create();
|
||||
}
|
||||
create() {
|
||||
let destinationText = '';
|
||||
switch (this.device.model.destinationStatus) {
|
||||
case '01': destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点'; break;
|
||||
case '02': destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点'; break;
|
||||
case '03': destinationText = LangStorage.getLang() == 'en' ? 'early seriously' : '严重早点'; break;
|
||||
case '04': destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点'; break;
|
||||
case '05': destinationText = LangStorage.getLang() == 'en' ? 'late seriously ' : '严重晚点'; break;
|
||||
default: destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知'; break;
|
||||
let destinationText = LangStorage.getLang() == 'en' ? 'unknown' : '未知';
|
||||
if (this.device.style.Train.soonerOrLater && this.device.style.Train.soonerOrLater.level === 5) {
|
||||
if (this.device.model.dt > 120) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'early seriously' : '严重早点';
|
||||
} else if (this.device.mode.dt >= 15 && this.device.mode.dt <= 120) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
|
||||
} else if (this.device.mode.dt >= -120 && this.device.mode.dt <= -15) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点';
|
||||
} else if (this.device.mode.dt < -120) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'late seriously ' : '严重晚点';
|
||||
} else {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
|
||||
}
|
||||
} else if (this.device.style.Train.soonerOrLater && this.device.style.Train.soonerOrLater.level === 3) {
|
||||
if (this.device.model.dt > 120) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'early' : '早点';
|
||||
} else if (this.device.model.dt < -120) {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'late' : '晚点';
|
||||
} else {
|
||||
destinationText = LangStorage.getLang() == 'en' ? 'on time' : '准点';
|
||||
}
|
||||
}
|
||||
let trainType = '';
|
||||
switch (this.device.model.type) {
|
||||
|
@ -381,13 +381,16 @@ export default class TrainBody extends Group {
|
||||
} else if (this.style.Train.soonerOrLater && this.style.Train.soonerOrLater.level === 3) {
|
||||
if (dt > 120) {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.earlyColor});
|
||||
this.style.Train.soonerOrLater.destinationCode && this.textTrainNumber && this.textTrainNumber.setStyle({textFill: this.style.Train.soonerOrLater.earlyColor});
|
||||
this.style.Train.soonerOrLater.trainBody && this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.earlyColor});
|
||||
} else if (dt < -120) {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.lateColor});
|
||||
this.style.Train.soonerOrLater.destinationCode && this.textTrainNumber && this.textTrainNumber.setStyle({textFill: this.style.Train.soonerOrLater.lateColor});
|
||||
this.style.Train.soonerOrLater.trainBody && this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.lateColor});
|
||||
} else {
|
||||
this.style.Train.soonerOrLater.serviceNumber && this.textTrainServer && this.textTrainServer.setStyle({textFill: this.style.Train.soonerOrLater.normalColor});
|
||||
this.style.Train.soonerOrLater.trainBody && this.trainBodyBox && this.trainBodyBox.setColor({stroke: this.style.Train.soonerOrLater.normalColor});
|
||||
this.style.Train.soonerOrLater.destinationCode && this.textTrainNumber && this.textTrainNumber.setStyle({textFill: this.style.Train.soonerOrLater.normalColor});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,11 +2,11 @@ export function getBaseUrl() {
|
||||
let BASE_API;
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
// BASE_API = 'https://joylink.club/jlcloud';
|
||||
BASE_API = 'https://test.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.41:9000'; // 张赛
|
||||
// BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
BASE_API = 'http://192.168.3.82:9000'; // 杜康
|
||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||
|
@ -256,12 +256,14 @@ export default {
|
||||
},
|
||||
|
||||
// 导出地图 json
|
||||
async handleExportMap(index, row) {
|
||||
async handleExportMap(index, row, idx) {
|
||||
this.$confirm('您是否导出地图数据?', this.$t('global.tips'), {
|
||||
confirmButtonText: this.$t('global.confirm'),
|
||||
cancelButtonText: this.$t('global.cancel'),
|
||||
type: 'warning'
|
||||
}).then(async () => {
|
||||
this.$set(row, 'loading' + idx, true);
|
||||
console.log(row);
|
||||
const res = await getPublishMapExport(row.id);
|
||||
const resultData = res.data;
|
||||
if (resultData === false) {
|
||||
@ -283,7 +285,8 @@ export default {
|
||||
el.download = `${resultData.name}.json`;
|
||||
el.click();
|
||||
urlObject.revokeObjectURL(url);
|
||||
}).catch(() => { });
|
||||
this.$set(row, 'loading' + idx, false);
|
||||
}).catch(() => { this.$set(row, 'loading' + idx, false); });
|
||||
},
|
||||
|
||||
// 导出地图 exls
|
||||
|
Loading…
Reference in New Issue
Block a user