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

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,14 +263,18 @@ export default {
}).catch(() => { }); }).catch(() => { });
}, },
// // json
async handleExportMap(index, row) { async handleExportMap(index, row) {
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 res = await getPublishMapExport(row.id);
const resultData = res.data; const resultData = res.data;
if (resultData === false) { if (resultData === false) {
return; return;
} }
// const self = this; // const self = this;
// import('@/utils/Export2Excel').then(excel => { // import('@/utils/Export2Excel').then(excel => {
// self.queryExportData(resultData).then(data => { // self.queryExportData(resultData).then(data => {
@ -279,7 +283,6 @@ export default {
// self.$message.error(`${this.$t('error.exportException')}:${error.message}`); // self.$message.error(`${this.$t('error.exportException')}:${error.message}`);
// }); // });
// }); // });
const content = new Blob([JSON.stringify(resultData)]); const content = new Blob([JSON.stringify(resultData)]);
const urlObject = window.URL || window.webkitURL || window; const urlObject = window.URL || window.webkitURL || window;
const url = urlObject.createObjectURL(content); const url = urlObject.createObjectURL(content);
@ -288,9 +291,10 @@ export default {
el.download = `${resultData.name}.json`; el.download = `${resultData.name}.json`;
el.click(); el.click();
urlObject.revokeObjectURL(url); 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;