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
1e6738eb
Commit
1e6738eb
authored
Aug 25, 2021
by
wcmoon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 新增三种表现形式
parent
ad47808b
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
327 additions
and
32 deletions
+327
-32
TemplateManage.vue
src/components/category/TemplateManage.vue
+3
-3
ModifyPresentation.vue
src/components/editTemplate/ModifyPresentation.vue
+46
-5
PropertyItem.vue
src/components/editTemplate/PropertyItem.vue
+18
-0
ImageUrlForm.vue
src/components/editTemplate/form/ImageUrlForm.vue
+26
-0
JSONForm.vue
src/components/editTemplate/form/JSONForm.vue
+116
-0
TextArrayForm.vue
src/components/editTemplate/form/TextArrayForm.vue
+105
-0
UrlPrefix.js
src/config/UrlPrefix.js
+5
-5
categoryManage.vue
src/entry/gs/views/categoryManage/categoryManage.vue
+1
-1
Main.vue
src/entry/sy/views/Main.vue
+0
-1
types.ts
src/plugins/types.ts
+5
-2
state.ts
src/store/state.ts
+1
-1
editTemplate.vue
src/views/template/editTemplate.vue
+1
-14
No files found.
src/components/category/TemplateManage.vue
View file @
1e6738eb
...
@@ -216,6 +216,7 @@ export default {
...
@@ -216,6 +216,7 @@ export default {
);
);
}
else
{
}
else
{
this
.
getFolderList
();
this
.
getFolderList
();
if
(
!
this
.
TemplateDate
.
index
)
return
;
this
.
switchPersonalClassification
(
this
.
switchPersonalClassification
(
this
.
TemplateDate
.
item
,
this
.
TemplateDate
.
item
,
this
.
TemplateDate
.
index
this
.
TemplateDate
.
index
...
@@ -380,7 +381,7 @@ export default {
...
@@ -380,7 +381,7 @@ export default {
this
.
checkClassification
=
0
;
this
.
checkClassification
=
0
;
}
}
},
},
//个人模板or系统模板切换
//个人模板or系统模板切换
1 系统模板 0 个人模板
SwitchTemplate
(
key
)
{
SwitchTemplate
(
key
)
{
switch
(
key
)
{
switch
(
key
)
{
case
0
:
case
0
:
...
@@ -665,4 +666,4 @@ header {
...
@@ -665,4 +666,4 @@ header {
background: rgba(242, 244, 246, 1);
background: rgba(242, 244, 246, 1);
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/components/editTemplate/ModifyPresentation.vue
View file @
1e6738eb
...
@@ -142,13 +142,50 @@
...
@@ -142,13 +142,50 @@
<div
class=
"pic-box"
>
+
</div>
<div
class=
"pic-box"
>
+
</div>
</div>
</div>
</div>
</div>
<div
class=
"optional"
@
click=
"select(PropertyType.JSON)"
>
<i
:class=
"
{
iconfont: true,
'i--check': TypeNum === PropertyType.JSON,
iconxingzhuang2: TypeNum === PropertyType.JSON,
iconweixuanze: TypeNum !== PropertyType.JSON,
}"
>
</i>
<span
class=
"title"
>
JSON
</span>
<input
type=
"text"
class=
"half"
value
disabled=
"disabled"
/>
<input
type=
"text"
class=
"half"
value
disabled=
"disabled"
/>
</div>
<div
class=
"optional"
@
click=
"select(PropertyType.ImageUrl)"
>
<i
:class=
"
{
iconfont: true,
'i--check': TypeNum === PropertyType.ImageUrl,
iconxingzhuang2: TypeNum === PropertyType.ImageUrl,
iconweixuanze: TypeNum !== PropertyType.ImageUrl,
}"
>
</i>
<span
class=
"title"
>
图片链接
</span>
<input
type=
"text"
value
disabled=
"disabled"
/>
</div>
<div
class=
"optional"
@
click=
"select(PropertyType.TextArray)"
>
<i
:class=
"
{
iconfont: true,
'i--check': TypeNum === PropertyType.TextArray,
iconxingzhuang2: TypeNum === PropertyType.TextArray,
iconweixuanze: TypeNum !== PropertyType.TextArray,
}"
>
</i>
<span
class=
"title"
>
文本数组
</span>
<input
type=
"text"
value
disabled=
"disabled"
/>
</div>
<div
<div
class=
"optional"
class=
"optional"
@
click=
"select(PropertyType.Editor)"
@
click=
"select(PropertyType.Editor)"
>
>
<div
class=
"left"
>
<div
class=
"left"
>
<i
<i
:class=
"
{
:class=
"
{
iconfont: true,
iconfont: true,
'i--check': TypeNum === PropertyType.Editor,
'i--check': TypeNum === PropertyType.Editor,
iconxingzhuang2: TypeNum === PropertyType.Editor,
iconxingzhuang2: TypeNum === PropertyType.Editor,
...
@@ -229,10 +266,14 @@ input {
...
@@ -229,10 +266,14 @@ input {
text-indent: 12px;
text-indent: 12px;
color: #d8d8d8;
color: #d8d8d8;
margin-left: 8px;
margin-left: 8px;
&.half {
width: 66px;
}
}
}
.box {
.box {
width: 549px;
width: 549px;
height:
514
px;
height:
610
px;
background: rgba(255, 255, 255, 1);
background: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 20px 0px rgba(61, 118, 249, 0.18);
box-shadow: 0px 0px 20px 0px rgba(61, 118, 249, 0.18);
padding: 0 50px;
padding: 0 50px;
...
@@ -248,7 +289,7 @@ input {
...
@@ -248,7 +289,7 @@ input {
}
}
.center {
.center {
width: 494px;
width: 494px;
height:
274
px;
height:
370
px;
background: rgba(251, 251, 251, 1);
background: rgba(251, 251, 251, 1);
border: 1px solid rgba(240, 240, 240, 1);
border: 1px solid rgba(240, 240, 240, 1);
margin: 0 auto;
margin: 0 auto;
...
...
src/components/editTemplate/PropertyItem.vue
View file @
1e6738eb
...
@@ -56,6 +56,18 @@
...
@@ -56,6 +56,18 @@
@
changeValue=
"changeValue"
@
changeValue=
"changeValue"
:isDisabled=
"isDisabled"
:isDisabled=
"isDisabled"
></link-form>
></link-form>
<json-form
v-else-if=
"property.type === PropertyType.JSON"
:property=
"property"
/>
<image-url-form
v-else-if=
"property.type === PropertyType.ImageUrl"
:property=
"property"
/>
<text-array-form
v-else-if=
"property.type === PropertyType.TextArray"
:property=
"property"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -73,6 +85,9 @@ import EditorForm from "@/components/editTemplate/form/EditorForm.vue";
...
@@ -73,6 +85,9 @@ import EditorForm from "@/components/editTemplate/form/EditorForm.vue";
import
AudioForm
from
"@/components/editTemplate/form/AudioForm.vue"
;
import
AudioForm
from
"@/components/editTemplate/form/AudioForm.vue"
;
import
TextAreaForm
from
"@/components/editTemplate/form/TextAreaForm.vue"
;
import
TextAreaForm
from
"@/components/editTemplate/form/TextAreaForm.vue"
;
import
LinkForm
from
"@/components/editTemplate/form/LinkForm.vue"
;
import
LinkForm
from
"@/components/editTemplate/form/LinkForm.vue"
;
import
JsonForm
from
"@/components/editTemplate/form/JSONForm.vue"
;
import
ImageUrlForm
from
"@/components/editTemplate/form/ImageUrlForm.vue"
;
import
TextArrayForm
from
"@/components/editTemplate/form/TextArrayForm.vue"
;
@
Component
({
@
Component
({
components
:
{
components
:
{
BaseForm
,
BaseForm
,
...
@@ -85,6 +100,9 @@ import LinkForm from "@/components/editTemplate/form/LinkForm.vue";
...
@@ -85,6 +100,9 @@ import LinkForm from "@/components/editTemplate/form/LinkForm.vue";
AudioForm
,
AudioForm
,
TextAreaForm
,
TextAreaForm
,
LinkForm
,
LinkForm
,
JsonForm
,
ImageUrlForm
,
TextArrayForm
},
},
})
})
export
default
class
PropertyItem
extends
Vue
{
export
default
class
PropertyItem
extends
Vue
{
...
...
src/components/editTemplate/form/ImageUrlForm.vue
0 → 100644
View file @
1e6738eb
<
template
>
<base-form
:label=
"property.label"
:watchValue=
"property.value"
></base-form>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
}
from
"vue-property-decorator"
;
import
BaseForm
from
"./BaseForm.vue"
;
import
{
Property
}
from
"@/plugins/types2"
;
@
Component
({
components
:
{
BaseForm
}
})
export
default
class
ImageUrlForm
extends
Vue
{
@
Prop
()
property
!
:
Property
;
}
</
script
>
<
style
scoped
>
</
style
>
src/components/editTemplate/form/JSONForm.vue
0 → 100644
View file @
1e6738eb
<
template
>
<base-form
:label=
"property.label"
:watchValue=
"property.value"
:showInput=
"false"
class=
"json-form"
>
<div
class=
"lists"
>
<div
class=
"list"
v-for=
"(i, index) in jsons"
:key=
"index"
>
<input
class=
"input"
v-model=
"i.key"
@
input=
"change"
type=
"text"
placeholder=
"key"
/>
<input
class=
"input"
v-model=
"i.value"
@
input=
"change"
type=
"text"
placeholder=
"value"
/>
<div
class=
"del"
@
click=
"del(index)"
>
<i
class=
"iconfont iconshanchu-"
></i>
</div>
</div>
<div
class=
"add"
@
click=
"add"
>
<i
class=
"iconfont icontianjia"
></i>
</div>
</div>
</base-form>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"vue-property-decorator"
;
import
BaseForm
from
"./BaseForm.vue"
;
import
{
Property
}
from
"@/plugins/types2"
;
@
Component
({
components
:
{
BaseForm
}
})
export
default
class
JsonForm
extends
Vue
{
@
Prop
()
property
!
:
Property
;
public
jsons
=
[{
key
:
''
,
value
:
''
}];
mounted
()
{
console
.
log
(
this
.
property
);
}
public
change
()
{
}
public
add
()
{
this
.
jsons
.
push
({
key
:
''
,
value
:
''
})
}
public
del
(
index
:
number
)
{
if
(
this
.
jsons
.
length
<=
1
)
return
;
this
.
jsons
.
splice
(
index
,
1
);
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.json-form {
height: auto;
}
.list {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
}
.input {
width: 380px;
margin-right: 10px;
margin-top: 0;
flex-shrink: 0;
height: 44px;
}
.del {
height: 34px;
display: flex;
color: #eaeaea;
justify-content: center;
align-items: center;
cursor: pointer;
.iconfont {
font-size: 20px;
}
}
.add {
width: 34px;
height: 34px;
border-radius: 50%;
color: white;
display: flex;
background-color: #3f79fe;
justify-content: center;
align-items: center;
cursor: pointer;
margin: 10px 0;
}
</
style
>
src/components/editTemplate/form/TextArrayForm.vue
0 → 100644
View file @
1e6738eb
<
template
>
<base-form
:label=
"property.label"
:watchValue=
"property.value"
:showInput=
"false"
class=
"array-form"
>
<div
class=
"lists"
>
<div
class=
"list"
v-for=
"(item, index) in array"
:key=
"index"
>
<input
class=
"input"
type=
"text"
v-model=
"item.value"
:placeholder=
"'请输入' + property.label"
>
<div
class=
"del"
@
click=
"del(index)"
>
<i
class=
"iconfont iconshanchu-"
></i>
</div>
</div>
<div
class=
"add"
@
click=
"add"
>
<i
class=
"iconfont icontianjia"
></i>
</div>
</div>
</base-form>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
}
from
"vue-property-decorator"
;
import
BaseForm
from
"./BaseForm.vue"
;
import
{
Property
}
from
"@/plugins/types2"
;
@
Component
({
components
:
{
BaseForm
}
})
export
default
class
TextArray
extends
Vue
{
@
Prop
()
property
!
:
Property
;
public
array
=
[{
value
:
''
}];
public
add
()
{
this
.
array
.
push
({
value
:
''
})
}
public
del
(
index
:
number
)
{
if
(
this
.
array
.
length
<=
1
)
return
;
this
.
array
.
splice
(
index
,
1
);
}
}
</
script
>
<
style
scoped
lang=
"less"
>
.array-form {
height: auto;
}
.list {
display: flex;
justify-content: center;
align-items: center;
margin-top: 10px;
}
.input {
margin-right: 10px;
margin-top: 0;
flex-shrink: 0;
height: 44px;
width: 770px;
}
.del {
height: 34px;
display: flex;
color: #eaeaea;
justify-content: center;
align-items: center;
cursor: pointer;
.iconfont {
font-size: 20px;
}
}
.add {
width: 34px;
height: 34px;
border-radius: 50%;
color: white;
display: flex;
background-color: #3f79fe;
justify-content: center;
align-items: center;
cursor: pointer;
margin: 10px 0;
}
</
style
>
src/config/UrlPrefix.js
View file @
1e6738eb
...
@@ -2,7 +2,7 @@ const configModules = {
...
@@ -2,7 +2,7 @@ const configModules = {
// 溯源>测试环境
// 溯源>测试环境
"sy_test"
:
{
"sy_test"
:
{
CHAIN_BROWSER_URL_PREFIX
:
'http://120.26.174.69:9032/'
,
CHAIN_BROWSER_URL_PREFIX
:
'http://120.26.174.69:9032/'
,
INERFACE_URL_PREFIX
:
'http://172.16.101.87:467
90
'
,
INERFACE_URL_PREFIX
:
'http://172.16.101.87:467
89
'
,
/**
/**
* 网站入口配置
* 网站入口配置
*/
*/
...
@@ -17,10 +17,10 @@ const configModules = {
...
@@ -17,10 +17,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/'
,
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/entry/gs/views/categoryManage/categoryManage.vue
View file @
1e6738eb
...
@@ -192,6 +192,6 @@ export default class Template extends Vue {
...
@@ -192,6 +192,6 @@ export default class Template extends Vue {
}
}
.col_right--show {
.col_right--show {
display: block;
display: block;
overflow-y:
scroll
;
overflow-y:
auto
;
}
}
</
style
>
</
style
>
src/entry/sy/views/Main.vue
View file @
1e6738eb
...
@@ -44,7 +44,6 @@ export default class Main extends Vue {}
...
@@ -44,7 +44,6 @@ export default class Main extends Vue {}
.main_wrapper
{
.main_wrapper
{
flex
:
1
;
flex
:
1
;
min-height
:
0
;
min-height
:
0
;
overflow-y
:
scroll
;
background
:
white
;
background
:
white
;
height
:
100%
;
height
:
100%
;
}
}
...
...
src/plugins/types.ts
View file @
1e6738eb
...
@@ -17,10 +17,13 @@ export enum PropertyType {
...
@@ -17,10 +17,13 @@ export enum PropertyType {
Video
=
8
,
//视频
Video
=
8
,
//视频
Audio
=
9
,
// 音频
Audio
=
9
,
// 音频
TextArea
=
10
,
// 多行文本输入
TextArea
=
10
,
// 多行文本输入
Link
=
11
//外部链接
Link
=
11
,
//外部链接
JSON
=
12
,
ImageUrl
=
13
,
// 图片链接
TextArray
=
14
,
// 单行文本的数组
}
}
//to showstatus
//to showstatus
interface
Property
{
interface
Property
{
key
:
string
;
key
:
string
;
type
:
PropertyType
;
type
:
PropertyType
;
...
...
src/store/state.ts
View file @
1e6738eb
...
@@ -15,7 +15,7 @@ const state: StateTypes = {
...
@@ -15,7 +15,7 @@ const state: StateTypes = {
templateNum
:
0
,
//模板数量
templateNum
:
0
,
//模板数量
theAnchor
:
-
1
,
theAnchor
:
-
1
,
chainStatus
:
''
,
chainStatus
:
''
,
templateType
:
0
,
templateType
:
0
,
// 0 系统模板 1 个人模板
templateData
:
{},
templateData
:
{},
currentRoute
:
Number
(
sessionStorage
.
getItem
(
"currentRoute"
))
||
0
currentRoute
:
Number
(
sessionStorage
.
getItem
(
"currentRoute"
))
||
0
};
};
...
...
src/views/template/editTemplate.vue
View file @
1e6738eb
<
template
>
<
template
>
<div
class=
"add_template"
>
<div
class=
"add_template"
>
<!-- 提示用语 -->
<!--
<div
class=
"add-template__confirm"
v-if=
"returnConfirm"
>
<div
class=
"template-confirm__center"
>
<div
class=
"confirm-left"
>
<i
class=
"iconfont icongantanhao-xianxingyuankuang"
></i>
<p>
您还未保存,返回后信息不会保存。
</p>
</div>
<div
class=
"confirm-btn"
@
click=
"gogo"
>
继续返回
</div>
</div>
<i
class=
"iconfont iconjiufuqianbaoicon08"
@
click=
"backCancel"
></i>
</div>
-->
<!-- end -->
<div
class=
"add_template__center"
>
<div
class=
"add_template__center"
>
<div
<div
class=
"col_left"
class=
"col_left"
...
@@ -112,7 +100,7 @@
...
@@ -112,7 +100,7 @@
}"
}"
>
>
<i
class=
"iconfont iconbaocun-"
></i>
<i
class=
"iconfont iconbaocun-"
></i>
保存模板
保存模板
{{
TemplateType
}}
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -399,7 +387,6 @@ export default class editTemplate extends Vue {
...
@@ -399,7 +387,6 @@ export default class editTemplate extends Vue {
// 更新个人模板
// 更新个人模板
public
async
updateCustomize
()
{
public
async
updateCustomize
()
{
await
this
.
fileHandler
();
await
this
.
fileHandler
();
const
res
=
await
this
.
$ajax
({
const
res
=
await
this
.
$ajax
({
type
:
"put"
,
type
:
"put"
,
url
:
GO_URLS
.
updateCustomize
,
url
:
GO_URLS
.
updateCustomize
,
...
...
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