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({ $.ajax({
method: "post", method: 'post',
url: `http://${ajaxUrl}:7003/short-cut-model/qSCMList`, url: `http://${ajaxUrl}:90/short-cut-model/qSCMList`,
data: JSON.stringify({}), data: JSON.stringify({}),
success: function(result) { success: function (result) {
let images = []; let images = []
result.data.forEach(item => { result.data.forEach((item) => {
images.push({ images.push({
xml: item.icon, xml: item.icon,
h: item.height, h: item.height,
w: item.width, w: item.width,
title: item.title ? item.title : null title: item.title ? item.title : null,
}) })
}) })
// console.log(images) // console.log(images)
let xml = '<mxlibrary>'+JSON.stringify(images, null, 2)+'</mxlibrary>'; let xml = '<mxlibrary>' + JSON.stringify(images, null, 2) + '</mxlibrary>'
let request = window.indexedDB.open('database', 2); let request = window.indexedDB.open('database', 2)
request.onsuccess = function (event) { request.onsuccess = function (event) {
let db = request.result; let db = request.result
let trx = db.transaction('filesInfo', 'readwrite'); let trx = db.transaction('filesInfo', 'readwrite')
let trx2 = db.transaction('files', 'readwrite'); let trx2 = db.transaction('files', 'readwrite')
trx.objectStore('filesInfo').put({ trx.objectStore('filesInfo').put({
title: '.scratchpad', title: '.scratchpad',
size: xml.length, size: xml.length,
lastModified: Date.now(), lastModified: Date.now(),
type: 'L' type: 'L',
}) })
trx2.objectStore('files').put({ trx2.objectStore('files').put({
title: '.scratchpad', title: '.scratchpad',
data: xml data: xml,
}) })
} }
}, },
error: function(error) { error: function (error) {
console.error(error) console.error(error)
} },
}); })
// const images = [ // const images = [
// { // {
...@@ -55,32 +55,33 @@ function initSetScratchpad() {//左侧便签本初始化数据 ...@@ -55,32 +55,33 @@ function initSetScratchpad() {//左侧便签本初始化数据
// 若为压缩的xml,则内容是diagram的内容 // 若为压缩的xml,则内容是diagram的内容
} }
function saveScratchpad(data) {//左侧便签本保存数据 function saveScratchpad(data) {
//左侧便签本保存数据
let params = []; let params = []
if(data.length > 0) { if (data.length > 0) {
data.forEach(item => { data.forEach((item) => {
params.push({ params.push({
icon: item.xml, icon: item.xml,
height: item.h, height: item.h,
width: item.w, width: item.w,
title: item.title ? item.title : null, title: item.title ? item.title : null,
sort: 1 sort: 1,
}) })
}) })
}else { } else {
params = []; params = []
} }
$.ajax({ $.ajax({
method: "post", method: 'post',
url: `http://${ajaxUrl}:7003/short-cut-model/cSCModel`, url: `http://${ajaxUrl}:90/short-cut-model/cSCModel`,
data: JSON.stringify(params), data: JSON.stringify(params),
contentType: 'application/json', contentType: 'application/json',
success: function(result) { success: function (result) {
console.log(result) console.log(result)
}, },
error: function(error) { error: function (error) {
console.error(error) console.error(error)
} },
}); })
} }
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: {
hot: true,
proxy: { proxy: {
'/api/file': { '/api/file': {
target: `http://${ip}:7005`, target: `http://${ip}:90`,
changeOrigin: true, changeOrigin: true,
// secure: false, // secure: false,
pathRewrite: { '^/api/file': '' }, pathRewrite: { '^/api/file': '' },
}, },
'/api/network': { '/api/network': {
target: `http://${ip}:7003`, target: `http://${ip}:90`,
changeOrigin: true, changeOrigin: true,
// secure: false, // secure: false,
pathRewrite: { '^/api/network': '' }, pathRewrite: { '^/api/network': '' },
}, },
'/api': { '/api': {
target: `http://${ip}:7004`, target: `http://${ip}:90`,
changeOrigin: true, changeOrigin: true,
// secure: false, // secure: false,
pathRewrite: { '^/api': '' }, 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!