Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
source-trace-manage-go
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tracing
source-trace-manage-go
Commits
b6fa960f
Commit
b6fa960f
authored
Aug 25, 2021
by
wcmoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 模版保存新增三种表现形式完成
parent
fa32a3a1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
51 additions
and
21 deletions
+51
-21
ImageUrlForm.vue
src/components/editTemplate/form/ImageUrlForm.vue
+5
-0
JSONForm.vue
src/components/editTemplate/form/JSONForm.vue
+24
-5
UrlPrefix.js
src/config/UrlPrefix.js
+5
-3
Template.ts
src/plugins/Template.ts
+13
-8
editTemplate.vue
src/views/template/editTemplate.vue
+1
-1
sy.sh
sy.sh
+3
-4
No files found.
src/components/editTemplate/form/ImageUrlForm.vue
View file @
b6fa960f
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
<base-form
<base-form
:label=
"property.label"
:label=
"property.label"
:watchValue=
"property.value"
:watchValue=
"property.value"
@
changeValue=
"change"
></base-form>
></base-form>
</
template
>
</
template
>
...
@@ -18,6 +19,10 @@ import {Property} from "@/plugins/types2";
...
@@ -18,6 +19,10 @@ import {Property} from "@/plugins/types2";
export
default
class
ImageUrlForm
extends
Vue
{
export
default
class
ImageUrlForm
extends
Vue
{
@
Prop
()
property
!
:
Property
;
@
Prop
()
property
!
:
Property
;
public
change
(
inputValue
:
string
)
{
this
.
property
.
value
=
inputValue
;
}
}
}
</
script
>
</
script
>
...
...
src/components/editTemplate/form/JSONForm.vue
View file @
b6fa960f
...
@@ -52,16 +52,35 @@ export default class JsonForm extends Vue {
...
@@ -52,16 +52,35 @@ export default class JsonForm extends Vue {
@
Watch
(
'jsons'
)
@
Watch
(
'jsons'
)
jsonsChange
()
{
jsonsChange
()
{
let
temp
:
any
=
{};
// this.property.value =
this
.
jsons
.
forEach
((
item
)
=>
{
temp
[
item
.
key
]
=
item
.
value
;
})
this
.
property
.
value
=
JSON
.
stringify
(
temp
);
}
}
mounted
()
{
mounted
()
{
console
.
log
(
this
.
property
);
const
o
=
JSON
.
parse
(
this
.
property
.
value
as
string
||
'{}'
);
this
.
jsons
=
[];
for
(
let
i
in
o
)
{
this
.
jsons
.
push
({
key
:
i
,
value
:
o
[
i
]
})
}
if
(
this
.
jsons
.
length
<=
0
)
{
this
.
jsons
.
push
({
key
:
''
,
value
:
''
})
}
}
}
public
change
()
{
public
change
()
{
let
temp
:
any
=
{};
this
.
jsons
.
forEach
((
item
)
=>
{
temp
[
item
.
key
]
=
item
.
value
;
})
this
.
property
.
value
=
JSON
.
stringify
(
temp
);
}
}
public
add
()
{
public
add
()
{
this
.
jsons
.
push
({
this
.
jsons
.
push
({
...
...
src/config/UrlPrefix.js
View file @
b6fa960f
const
configModules
=
{
const
configModules
=
{
// 溯源>测试环境
// 溯源>测试环境
"sy_test"
:
{
"sy_test"
:
{
CHAIN_BROWSER_URL_PREFIX
:
'http://
120.26.174.69:9032
/'
,
CHAIN_BROWSER_URL_PREFIX
:
'http://
47.114.159.142:8995
/'
,
INERFACE_URL_PREFIX
:
'http://172.16.101.87:46789'
,
INERFACE_URL_PREFIX
:
'http://172.16.101.87:46789'
,
/**
/**
* 网站入口配置
* 网站入口配置
...
@@ -19,8 +19,10 @@ const configModules = {
...
@@ -19,8 +19,10 @@ const configModules = {
"sy_prod"
:
{
"sy_prod"
:
{
// CHAIN_BROWSER_URL_PREFIX: 'https://cx.chain33.pro/',
// CHAIN_BROWSER_URL_PREFIX: 'https://cx.chain33.pro/',
// INERFACE_URL_PREFIX: 'https://sy.chain33.pro/api',
// INERFACE_URL_PREFIX: 'https://sy.chain33.pro/api',
CHAIN_BROWSER_URL_PREFIX
:
'http://172.16.101.87:8995/'
,
// CHAIN_BROWSER_URL_PREFIX: 'http://172.16.101.87:8995/',
INERFACE_URL_PREFIX
:
'http://172.16.101.87:8994/'
,
// INERFACE_URL_PREFIX: 'http://172.16.101.87:8994/',
CHAIN_BROWSER_URL_PREFIX
:
'http://47.114.159.142:8995/'
,
INERFACE_URL_PREFIX
:
'http://172.16.101.87:46789'
,
INDEX
:
{
INDEX
:
{
entry
:
'./src/entry/sy/main.ts'
,
entry
:
'./src/entry/sy/main.ts'
,
template
:
'./public/sy/index.html'
,
template
:
'./public/sy/index.html'
,
...
...
src/plugins/Template.ts
View file @
b6fa960f
import
{
import
{
PropertyType
,
RootUnit
as
RootUnitType
,
TemplateProperty
,
TmplSelectProperty
,
UnitProperty
,}
from
"./types"
;
PropertyType
,
import
{
Property
,
Unit
}
from
"./types2"
;
RootUnit
as
RootUnitType
,
TmplSelectProperty
,
TemplateProperty
,
UnitProperty
,
}
from
"./types"
;
import
{
Property
,
Unit
}
from
"./types2"
;
/**
/**
* 将本地模板转换为接口json
* 将本地模板转换为接口json
...
@@ -113,6 +107,17 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr
...
@@ -113,6 +107,17 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr
key
:
property
.
parent
.
title
===
'ext'
?
property
.
label
:
property
.
key
,
key
:
property
.
parent
.
title
===
'ext'
?
property
.
label
:
property
.
key
,
label
:
property
.
label
label
:
property
.
label
};
};
}
else
if
(
property
.
type
===
PropertyType
.
JSON
||
property
.
type
===
PropertyType
.
ImageUrl
)
{
return
{
data
:
{
format
:
'string'
,
type
:
'text'
,
value
:
property
.
value
},
type
:
property
.
type
,
key
:
property
.
label
,
label
:
property
.
label
};
}
else
if
(
property
.
type
===
PropertyType
.
Date
)
{
}
else
if
(
property
.
type
===
PropertyType
.
Date
)
{
return
{
return
{
data
:
{
data
:
{
...
...
src/views/template/editTemplate.vue
View file @
b6fa960f
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
}"
}"
>
>
<i
class=
"iconfont iconbaocun-"
></i>
<i
class=
"iconfont iconbaocun-"
></i>
保存模板
{{
TemplateType
}}
保存模板
</div>
</div>
</div>
</div>
</div>
</div>
...
...
sy.sh
View file @
b6fa960f
rm
-rf
sy
rm
-rf
sy
mv
dist sy
mv
dist sy
tar
-czf
sy.tar sy
tar
-czf
sy.tar sy
scp sy.tar root@
120.26.174.69:/usr/share/nginx/html
/sy.tar
scp sy.tar root@
47.114.159.142:/usr/share/nginx
/sy.tar
rm
-rf
sy.tar
rm
-rf
sy.tar
ssh root@120.26.174.69
'cd /usr/share/nginx/html && rm -rf sy && tar -xzf sy.tar && rm -rf sy.tar'
ssh root@47.114.159.142
'cd /usr/share/nginx && rm -rf sy && tar -xzf sy.tar && rm -rf sy.tar'
echo
'done. 👉 http://120.26.174.69/sy/(http://120.26.174.69:8994/)'
echo
'done. 👉 http://47.114.159.142:8994'
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment