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

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: { text: {
show: true, // 信号机名称显示 show: true, // 信号机名称显示
distance: 0, // 文字和灯杆的距离 distance: 3, // 文字和灯杆的距离
isAlignCenter: true, // 信号字体对其方式 isAlignCenter: false, // 信号字体对其方式
fontSize: 11, // 信号机名称字体大小 fontSize: 11, // 信号机名称字体大小
fontWeight: 'bold', // 信号机名称字体粗细 fontWeight: 'bold', // 信号机名称字体粗细
defaultColor: '#FFFFFF', // 信号灯字体默认色 defaultColor: '#FFFFFF', // 信号灯字体默认色

View File

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

View File

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

View File

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

View File

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