Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
liangzhen
/
framework-tools-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 0690e95b
authored
Mar 25, 2024
by
史敦盼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
端口号修改统一90端口
1 parent
f7450639
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
117 additions
and
113 deletions
.env.production
public/drawio/extention/js/exScratchpad.js
vue.config.js
.env.production
View file @
0690e95
NODE_ENV = 'production'
VUE_APP_BASE_URL = "http://192.168.0.120:
7003
"
VUE_APP_BASE_URL = "http://192.168.0.120:
90
"
public/drawio/extention/js/exScratchpad.js
View file @
0690e95
function
initSetScratchpad
()
{
//左侧便签本初始化数据
$
.
ajax
({
method
:
"post"
,
url
:
`http://
${
ajaxUrl
}
:7003/short-cut-model/qSCMList`
,
data
:
JSON
.
stringify
({}),
success
:
function
(
result
)
{
let
images
=
[];
result
.
data
.
forEach
(
item
=>
{
images
.
push
({
xml
:
item
.
icon
,
h
:
item
.
height
,
w
:
item
.
width
,
title
:
item
.
title
?
item
.
title
:
null
})
})
// console.log(images)
let
xml
=
'<mxlibrary>'
+
JSON
.
stringify
(
images
,
null
,
2
)
+
'</mxlibrary>'
;
let
request
=
window
.
indexedDB
.
open
(
'database'
,
2
);
function
initSetScratchpad
()
{
//左侧便签本初始化数据
$
.
ajax
({
method
:
'post'
,
url
:
`http://
${
ajaxUrl
}
:90/short-cut-model/qSCMList`
,
data
:
JSON
.
stringify
({}),
success
:
function
(
result
)
{
let
images
=
[]
result
.
data
.
forEach
((
item
)
=>
{
images
.
push
({
xml
:
item
.
icon
,
h
:
item
.
height
,
w
:
item
.
width
,
title
:
item
.
title
?
item
.
title
:
null
,
})
})
// console.log(images)
let
xml
=
'<mxlibrary>'
+
JSON
.
stringify
(
images
,
null
,
2
)
+
'</mxlibrary>'
request
.
onsuccess
=
function
(
event
)
{
let
db
=
request
.
result
;
let
trx
=
db
.
transaction
(
'filesInfo'
,
'readwrite'
);
let
trx2
=
db
.
transaction
(
'files'
,
'readwrite'
);
let
request
=
window
.
indexedDB
.
open
(
'database'
,
2
)
trx
.
objectStore
(
'filesInfo'
).
put
({
title
:
'.scratchpad'
,
size
:
xml
.
length
,
lastModified
:
Date
.
now
(),
type
:
'L'
})
request
.
onsuccess
=
function
(
event
)
{
let
db
=
request
.
result
let
trx
=
db
.
transaction
(
'filesInfo'
,
'readwrite'
)
let
trx2
=
db
.
transaction
(
'files'
,
'readwrite'
)
trx2
.
objectStore
(
'files'
).
put
({
title
:
'.scratchpad'
,
data
:
xml
})
}
},
error
:
function
(
error
)
{
console
.
error
(
error
)
}
});
trx
.
objectStore
(
'filesInfo'
).
put
({
title
:
'.scratchpad'
,
size
:
xml
.
length
,
lastModified
:
Date
.
now
(),
type
:
'L'
,
})
trx2
.
objectStore
(
'files'
).
put
({
title
:
'.scratchpad'
,
data
:
xml
,
})
}
},
error
:
function
(
error
)
{
console
.
error
(
error
)
},
})
// const images = [
// {
// aspect: "fixed",
// data: "data:image/svg+xml;base64,PHN2ZyB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWw6c3BhY2U9InByZXNlcnZlIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeT0iMHB4IiB4PSIwcHgiIHZlcnNpb249IjEuMSI+JiN4YTsJPG1ldGFkYXRhPiYjeGE7CQlTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3d3dy5vbmxpbmV3ZWJmb250cy5jb20vaWNvbiYjeGE7CTwvbWV0YWRhdGE+JiN4YTsJPGc+JiN4YTsJCTxnPiYjeGE7CQkJPHBhdGggZD0iTTIxNS4zLDEwMS41bDEzLjksMjQuMWwtOTcuNSw1LjNsMjIuNSwzOWw0My41LDQuN2w4LDEzLjhsLTU3LjUsMjIuM0wxMDYuMiwyNDZsLTguMS0xNGwxNy45LTQwLjRsLTIyLTM4LjFsLTUzLjMsODEuN2wtMTMuOS0yNC4xbDM3LjgtMTA4LjVsLTM0LTU4LjhjLTYuMy0xMS0zLTI0LjgsNy41LTMwLjljMTAuNS02LDI0LjItMiwzMC41LDguOWwzMy42LDU4LjFMMjE1LjMsMTAxLjV6IE0yMTMuOCwxMTcuM2wtNC40LTcuNmwtMTEzLTIxLjZMNjAuOCwyNi4zYy0zLjgtNi42LTExLjktOS4xLTE4LTUuNnMtOCwxMS44LTQuMiwxOC40bDM2LjEsNjIuNEwzNi44LDIxMC4xbDQuNCw3LjZsNTMuMy04MS43bDMxLjgsNTUuMWwtMTcuOSw0MC40bDAuMywwLjVsMzQuNS0yOWwxLjMtMC42bDQ3LjktMTguNmwtMC40LTAuNmwtNDMuNS00LjdsLTMyLjMtNTUuOUwyMTMuOCwxMTcuM3oiIGZpbGw9IiMwMDAwMDAiLz4mI3hhOwkJPC9nPiYjeGE7CTwvZz4mI3hhOzwvc3ZnPg==",
// h: 256,
// title: "svg",
// w: 256
// }
// ];
// const images = [
// {
// aspect: "fixed",
// data: "data:image/svg+xml;base64,PHN2ZyB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWw6c3BhY2U9InByZXNlcnZlIiB2aWV3Qm94PSIwIDAgMjU2IDI1NiIgeT0iMHB4IiB4PSIwcHgiIHZlcnNpb249IjEuMSI+JiN4YTsJPG1ldGFkYXRhPiYjeGE7CQlTdmcgVmVjdG9yIEljb25zIDogaHR0cDovL3d3dy5vbmxpbmV3ZWJmb250cy5jb20vaWNvbiYjeGE7CTwvbWV0YWRhdGE+JiN4YTsJPGc+JiN4YTsJCTxnPiYjeGE7CQkJPHBhdGggZD0iTTIxNS4zLDEwMS41bDEzLjksMjQuMWwtOTcuNSw1LjNsMjIuNSwzOWw0My41LDQuN2w4LDEzLjhsLTU3LjUsMjIuM0wxMDYuMiwyNDZsLTguMS0xNGwxNy45LTQwLjRsLTIyLTM4LjFsLTUzLjMsODEuN2wtMTMuOS0yNC4xbDM3LjgtMTA4LjVsLTM0LTU4LjhjLTYuMy0xMS0zLTI0LjgsNy41LTMwLjljMTAuNS02LDI0LjItMiwzMC41LDguOWwzMy42LDU4LjFMMjE1LjMsMTAxLjV6IE0yMTMuOCwxMTcuM2wtNC40LTcuNmwtMTEzLTIxLjZMNjAuOCwyNi4zYy0zLjgtNi42LTExLjktOS4xLTE4LTUuNnMtOCwxMS44LTQuMiwxOC40bDM2LjEsNjIuNEwzNi44LDIxMC4xbDQuNCw3LjZsNTMuMy04MS43bDMxLjgsNTUuMWwtMTcuOSw0MC40bDAuMywwLjVsMzQuNS0yOWwxLjMtMC42bDQ3LjktMTguNmwtMC40LTAuNmwtNDMuNS00LjdsLTMyLjMtNTUuOUwyMTMuOCwxMTcuM3oiIGZpbGw9IiMwMDAwMDAiLz4mI3hhOwkJPC9nPiYjeGE7CTwvZz4mI3hhOzwvc3ZnPg==",
// h: 256,
// title: "svg",
// w: 256
// }
// ];
// 若为压缩的xml,则内容是diagram的内容
// 若为压缩的xml,则内容是diagram的内容
}
function
saveScratchpad
(
data
)
{
//左侧便签本保存数据
let
params
=
[];
if
(
data
.
length
>
0
)
{
data
.
forEach
(
item
=>
{
params
.
push
({
icon
:
item
.
xml
,
height
:
item
.
h
,
width
:
item
.
w
,
title
:
item
.
title
?
item
.
title
:
null
,
sort
:
1
})
})
}
else
{
params
=
[];
}
$
.
ajax
({
method
:
"post"
,
url
:
`http://
${
ajaxUrl
}
:7003/short-cut-model/cSCModel`
,
data
:
JSON
.
stringify
(
params
),
contentType
:
'application/json'
,
success
:
function
(
result
)
{
console
.
log
(
result
)
},
error
:
function
(
error
)
{
console
.
error
(
error
)
}
});
}
\ No newline at end of file
function
saveScratchpad
(
data
)
{
//左侧便签本保存数据
let
params
=
[]
if
(
data
.
length
>
0
)
{
data
.
forEach
((
item
)
=>
{
params
.
push
({
icon
:
item
.
xml
,
height
:
item
.
h
,
width
:
item
.
w
,
title
:
item
.
title
?
item
.
title
:
null
,
sort
:
1
,
})
})
}
else
{
params
=
[]
}
$
.
ajax
({
method
:
'post'
,
url
:
`http://
${
ajaxUrl
}
:90/short-cut-model/cSCModel`
,
data
:
JSON
.
stringify
(
params
),
contentType
:
'application/json'
,
success
:
function
(
result
)
{
console
.
log
(
result
)
},
error
:
function
(
error
)
{
console
.
error
(
error
)
},
})
}
vue.config.js
View file @
0690e95
const
{
defineConfig
}
=
require
(
'@vue/cli-service'
);
const
ip
=
'43.143.211.42'
;
const
{
defineConfig
}
=
require
(
'@vue/cli-service'
)
// 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
({
transpileDependencies
:
true
,
//如果是hash模式, publicPath:"";如果是history, publicPath:"/"
// publicPath: "/",
devServer
:
{
proxy
:
{
'/api/file'
:
{
target
:
`http://
${
ip
}
:7005`
,
changeOrigin
:
true
,
// secure: false,
pathRewrite
:
{
'^/api/file'
:
''
},
},
'/api/network'
:
{
target
:
`http://
${
ip
}
:7003`
,
changeOrigin
:
true
,
// secure: false,
pathRewrite
:
{
'^/api/network'
:
''
},
},
'/api'
:
{
target
:
`http://
${
ip
}
:7004`
,
changeOrigin
:
true
,
// secure: false,
pathRewrite
:
{
'^/api'
:
''
},
},
}
},
chainWebpack
:
config
=>
{
config
.
plugin
(
'html'
).
tap
(
args
=>
{
args
[
0
].
title
=
'数字化架构设计与管控微应用'
;
return
args
;
})
},
transpileDependencies
:
true
,
//如果是hash模式, publicPath:"";如果是history, publicPath:"/"
// publicPath: "/",
devServer
:
{
hot
:
true
,
proxy
:
{
'/api/file'
:
{
target
:
`http://
${
ip
}
:90`
,
changeOrigin
:
true
,
// secure: false,
pathRewrite
:
{
'^/api/file'
:
''
},
},
'/api/network'
:
{
target
:
`http://
${
ip
}
:90`
,
changeOrigin
:
true
,
// secure: false,
pathRewrite
:
{
'^/api/network'
:
''
},
},
'/api'
:
{
target
:
`http://
${
ip
}
:90`
,
changeOrigin
:
true
,
// secure: false,
pathRewrite
:
{
'^/api'
:
''
},
},
},
},
chainWebpack
:
(
config
)
=>
{
config
.
plugin
(
'html'
).
tap
((
args
)
=>
{
args
[
0
].
title
=
'数字化架构设计与管控支撑工具'
return
args
})
},
})
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment