Commit 0690e95b by 史敦盼

端口号修改统一90端口

1 parent f7450639
NODE_ENV = 'production' NODE_ENV = 'production'
VUE_APP_BASE_URL = "http://192.168.0.120:7003" VUE_APP_BASE_URL = "http://192.168.0.120:90"
function initSetScratchpad() {//左侧便签本初始化数据 function initSetScratchpad() {
$.ajax({ //左侧便签本初始化数据
method: "post", $.ajax({
url: `http://${ajaxUrl}:7003/short-cut-model/qSCMList`, method: 'post',
data: JSON.stringify({}), url: `http://${ajaxUrl}:90/short-cut-model/qSCMList`,
success: function(result) { data: JSON.stringify({}),
let images = []; success: function (result) {
result.data.forEach(item => { let images = []
images.push({ result.data.forEach((item) => {
xml: item.icon, images.push({
h: item.height, xml: item.icon,
w: item.width, h: item.height,
title: item.title ? item.title : null w: item.width,
}) title: item.title ? item.title : null,
}) })
// console.log(images) })
let xml = '<mxlibrary>'+JSON.stringify(images, null, 2)+'</mxlibrary>'; // console.log(images)
let xml = '<mxlibrary>' + JSON.stringify(images, null, 2) + '</mxlibrary>'
let request = window.indexedDB.open('database', 2);
request.onsuccess = function (event) { let request = window.indexedDB.open('database', 2)
let db = request.result;
let trx = db.transaction('filesInfo', 'readwrite');
let trx2 = db.transaction('files', 'readwrite');
trx.objectStore('filesInfo').put({ request.onsuccess = function (event) {
title: '.scratchpad', let db = request.result
size: xml.length, let trx = db.transaction('filesInfo', 'readwrite')
lastModified: Date.now(), let trx2 = db.transaction('files', 'readwrite')
type: 'L'
})
trx2.objectStore('files').put({ trx.objectStore('filesInfo').put({
title: '.scratchpad', title: '.scratchpad',
data: xml size: xml.length,
}) lastModified: Date.now(),
} type: 'L',
}, })
error: function(error) {
console.error(error)
}
});
trx2.objectStore('files').put({
title: '.scratchpad',
data: xml,
})
}
},
error: function (error) {
console.error(error)
},
})
// const images = [ // const images = [
// { // {
// aspect: "fixed", // aspect: "fixed",
// data: "data:image/svg+xml;base64,PHN2ZyB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1s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ub3JnLzIwMDAvc3ZnIiB4bWw6c3BhY2U9InByZXNlcnZlIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeT0iMHB4IiB4PSIwcHgiIHZlcnNpb249IjEuMSI+JiN4YTsJPG1ldGFkYXRhPiYjeGE7CQlTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3d3dy5vbmxpbmV3ZWJmb250cy5jb20vaWNvbiYjeGE7CTwvbWV0YWRhdGE+JiN4YTsJPGc+JiN4YTsJCTxnPiYjeGE7CQkJPHBhdGggZD0iTTIxNS4zLDEwMS41bDEzLjksMjQuMWwtOTcuNSw1LjNsMjIuNSwzOWw0My41LDQuN2w4LDEzLjhsLTU3LjUsMjIuM0wxMDYuMiwyNDZsLTguMS0xNGwxNy45LTQwLjRsLTIyLTM4LjFsLTUzLjMsODEuN2wtMTMuOS0yNC4xbDM3LjgtMTA4LjVsLTM0LTU4LjhjLTYuMy0xMS0zLTI0LjgsNy41LTMwLjljMTAuNS02LDI0LjItMiwzMC41LDguOWwzMy42LDU4LjFMMjE1LjMsMTAxLjV6IE0yMTMuOCwxMTcuM2wtNC40LTcuNmwtMTEzLTIxLjZMNjAuOCwyNi4zYy0zLjgtNi42LTExLjktOS4xLTE4LTUuNnMtOCwxMS44LTQuMiwxOC40bDM2LjEsNjIuNEwzNi44LDIxMC4xbDQuNCw3LjZsNTMuMy04MS43bDMxLjgsNTUuMWwtMTcuOSw0MC40bDAuMywwLjVsMzQuNS0yOWwxLjMtMC42bDQ3LjktMTguNmwtMC40LTAuNmwtNDMuNS00LjdsLTMyLjMtNTUuOUwyMTMuOCwxMTcuM3oiIGZpbGw9IiMwMDAwMDAiLz4mI3hhOwkJPC9nPiYjeGE7CTwvZz4mI3hhOzwvc3ZnPg==",
// h: 256, // h: 256,
// title: "svg", // title: "svg",
// w: 256 // w: 256
// } // }
// ]; // ];
// 若为压缩的xml,则内容是diagram的内容 // 若为压缩的xml,则内容是diagram的内容
} }
function saveScratchpad(data) {//左侧便签本保存数据 function saveScratchpad(data) {
//左侧便签本保存数据
let params = [];
if(data.length > 0) { let params = []
data.forEach(item => { if (data.length > 0) {
params.push({ data.forEach((item) => {
icon: item.xml, params.push({
height: item.h, icon: item.xml,
width: item.w, height: item.h,
title: item.title ? item.title : null, width: item.w,
sort: 1 title: item.title ? item.title : null,
}) sort: 1,
}) })
}else { })
params = []; } else {
} params = []
$.ajax({ }
method: "post", $.ajax({
url: `http://${ajaxUrl}:7003/short-cut-model/cSCModel`, method: 'post',
data: JSON.stringify(params), url: `http://${ajaxUrl}:90/short-cut-model/cSCModel`,
contentType: 'application/json', data: JSON.stringify(params),
success: function(result) { contentType: 'application/json',
console.log(result) success: function (result) {
}, console.log(result)
error: function(error) { },
console.error(error) error: function (error) {
} console.error(error)
}); },
} })
\ No newline at end of file }
const { defineConfig } = require('@vue/cli-service'); const { defineConfig } = require('@vue/cli-service')
const ip = '43.143.211.42'; // const ip = '43.143.211.42'
// const ip = '172.20.10.7' // 李振
// const ip = '172.20.10.9' // 何鹏
const ip = '192.168.0.120'
module.exports = defineConfig({ module.exports = defineConfig({
transpileDependencies: true, transpileDependencies: true,
//如果是hash模式, publicPath:"";如果是history, publicPath:"/" //如果是hash模式, publicPath:"";如果是history, publicPath:"/"
// publicPath: "/", // publicPath: "/",
devServer: { devServer: {
proxy: { hot: true,
'/api/file': { proxy: {
target: `http://${ip}:7005`, '/api/file': {
changeOrigin: true, target: `http://${ip}:90`,
// secure: false, changeOrigin: true,
pathRewrite: { '^/api/file': '' }, // secure: false,
}, pathRewrite: { '^/api/file': '' },
'/api/network': { },
target: `http://${ip}:7003`, '/api/network': {
changeOrigin: true, target: `http://${ip}:90`,
// secure: false, changeOrigin: true,
pathRewrite: { '^/api/network': '' }, // secure: false,
}, pathRewrite: { '^/api/network': '' },
'/api': { },
target: `http://${ip}:7004`, '/api': {
changeOrigin: true, target: `http://${ip}:90`,
// secure: false, changeOrigin: true,
pathRewrite: { '^/api': '' }, // secure: false,
}, pathRewrite: { '^/api': '' },
} },
}, },
chainWebpack: config => { },
config.plugin('html').tap(args => { chainWebpack: (config) => {
args[0].title = '数字化架构设计与管控微应用'; config.plugin('html').tap((args) => {
return args; args[0].title = '数字化架构设计与管控支撑工具'
}) return args
}, })
},
}) })
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!