调整代码,处理线路皮肤默认配置

This commit is contained in:
zyy 2020-04-17 16:41:59 +08:00
parent 795ad48e32
commit f0610f8a0a
5 changed files with 41 additions and 36 deletions

View File

@ -128,8 +128,8 @@ class SkinCode extends defaultStyle {
},
text: {
show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色

View File

@ -128,8 +128,8 @@ class SkinCode extends defaultStyle {
},
text: {
show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色

View File

@ -146,8 +146,8 @@ class SkinCode extends defaultStyle {
},
text: {
show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式
distance: 3, // 文字和灯杆的距离
isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: 'white', // 信号灯字体默认色

View File

@ -3,6 +3,7 @@ import store from '@/store/index_APP_TARGET';
import router from './router/index_APP_TARGET';
import {PermissionParam} from '@/scripts/ProjectConfig';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import { admin} from './router/index_APP_TARGET';
import { getToken, removeToken} from '@/utils/auth';
import { LoginParams } from '@/utils/login';

View File

@ -117,11 +117,11 @@ export default {
name: this.$t('global.exportMap'),
handleClick: this.handleExportMap
},
{
name: this.$t('global.export'),
handleClick: this.handleExportMapSame,
showControl: () => { return process.env.NODE_ENV === 'development'; }
},
// {
// name: this.$t('global.export'),
// handleClick: this.handleExportMapSame,
// showControl: () => { return process.env.NODE_ENV === 'development'; }
// },
{
name: this.$t('publish.setTheProject'),
handleClick: this.handleSetProject
@ -263,34 +263,38 @@ export default {
}).catch(() => { });
},
//
// json
async handleExportMap(index, row) {
const res = await getPublishMapExport(row.id);
const resultData = res.data;
if (resultData === false) {
return;
}
// const self = this;
// import('@/utils/Export2Excel').then(excel => {
// self.queryExportData(resultData).then(data => {
// excel.export_json_excel(data, resultData.name);
// }).catch(error => {
// self.$message.error(`${this.$t('error.exportException')}:${error.message}`);
// });
// });
const content = new Blob([JSON.stringify(resultData)]);
const urlObject = window.URL || window.webkitURL || window;
const url = urlObject.createObjectURL(content);
const el = document.createElement('a');
el.href = url;
el.download = `${resultData.name}.json`;
el.click();
urlObject.revokeObjectURL(url);
this.$confirm('您是否导出地图数据?', this.$t('global.tips'), {
confirmButtonText: this.$t('global.confirm'),
cancelButtonText: this.$t('global.cancel'),
type: 'warning'
}).then(async () => {
const res = await getPublishMapExport(row.id);
const resultData = res.data;
if (resultData === false) {
return;
}
// const self = this;
// import('@/utils/Export2Excel').then(excel => {
// self.queryExportData(resultData).then(data => {
// excel.export_json_excel(data, resultData.name);
// }).catch(error => {
// self.$message.error(`${this.$t('error.exportException')}:${error.message}`);
// });
// });
const content = new Blob([JSON.stringify(resultData)]);
const urlObject = window.URL || window.webkitURL || window;
const url = urlObject.createObjectURL(content);
const el = document.createElement('a');
el.href = url;
el.download = `${resultData.name}.json`;
el.click();
urlObject.revokeObjectURL(url);
}).catch(() => { });
},
//
// exls
async handleExportMapSame(index, row) {
const res = await getPublishMapExport(row.id);
const resultData = res.data;