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
8a82c5eb
Commit
8a82c5eb
authored
Mar 20, 2021
by
zenglun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交部分代码
parent
e4d34245
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
746 additions
and
92 deletions
+746
-92
index.html
public/gs/index.html
+0
-10
AddChildDialog.vue
src/components/editTemplate/AddChildDialog.vue
+2
-2
incrementalDataList.vue
...gs/components/incrementalDataList/incrementalDataList.vue
+4
-6
preview.vue
src/entry/gs/components/preview/preview.vue
+126
-0
productList.vue
src/entry/gs/components/productList/productList.vue
+1
-1
templatePopup.vue
src/entry/gs/components/templatePopup/templatePopup.vue
+515
-0
editTemplate.vue
src/entry/gs/views/editTemplate/editTemplate.vue
+98
-73
No files found.
public/gs/index.html
View file @
8a82c5eb
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
...
...
@@ -8,16 +7,8 @@
<link
rel=
"icon"
href=
"./gs/favicon.ico"
>
<title>
甘肃电网
</title>
<script
src=
"./gs/tinymce/tinymce.min.js"
></script>
</head>
<body>
<div
id=
"app"
></div>
</body>
<script>
// const tinymceCDN = window.location.origin + '/tinymce/tinymce.min.js'
// console.log(tinymceCDN);
</script>
</html>
\ No newline at end of file
src/components/editTemplate/AddChildDialog.vue
View file @
8a82c5eb
...
...
@@ -179,9 +179,9 @@ export default class AddChildDialog extends Vue {
background: transparent;
outline: none;
&::placeholder {
//
&::placeholder {
}
//
}
}
.c-dialog-btn_wrapper {
...
...
src/entry/gs/components/incrementalDataList/incrementalDataList.vue
View file @
8a82c5eb
...
...
@@ -124,7 +124,7 @@
<span
v-if=
"item2.status === 3"
class=
"state-fail"
>
上链失败
</span>
<span
v-if=
"item2.status === 5"
class=
"state-ing"
>
已隐藏
</span>
</li>
<
li
class=
"center-placeholder--one"
></li
>
<
!--
<li
class=
"center-placeholder--one"
></li>
--
>
<li
class=
"center-placeholder--two"
></li>
<li
class=
"incremental-operation"
>
<div
class=
"btn-box"
>
...
...
@@ -494,14 +494,12 @@ export default {
li {
line-height: 30px;
height: 30px;
// overflow: hidden;
}
.incremental-icon {
height: 30px;
background: white;
// width: 123px;
padding-left: 50px;
color: #
3f79fe
;
color: #
0CC399
;
i {
font-size: 12px;
}
...
...
@@ -521,7 +519,7 @@ export default {
}
.state-start {
font-size: 12px;
color:
rgba(63, 121, 254, 1)
;
color:
#0CC399
;
cursor: pointer;
}
.state-ban {
...
...
@@ -548,7 +546,7 @@ export default {
background: #fafafb;
// border: 1px solid #000;
span {
color: #
3f79fe
;
color: #
0CC399
;
padding-right: 10%;
float: right;
cursor: pointer;
...
...
src/entry/gs/components/preview/preview.vue
0 → 100644
View file @
8a82c5eb
<
template
>
<div
class=
"body"
>
<div
class=
"body-top"
>
<span
class=
"body-top__left"
@
click=
"returnTemplate('Return')"
>
返回模板
</span
>
预览
<span
class=
"body-top__right"
@
click=
"returnTemplate('Use')"
>
使用
</span>
</div>
<!-- 预览部分 -->
<div
class=
"body-center"
>
<root-unit
v-for=
"item in templateInfo"
:unit=
"item"
:key=
"item.id"
/>
</div>
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
,
Prop
}
from
"vue-property-decorator"
;
import
{
GO_URLS
}
from
"@/config/URLS"
;
import
{
Unit
}
from
"@/plugins/types2"
;
// 取本地数据转换函数
import
{
formatTemplateApi2Local
}
from
"@/plugins/Template"
;
import
RootUnit
from
"@/components/editTemplate/RootUnit.vue"
;
@
Component
({
components
:
{
RootUnit
,
},
})
export
default
class
preview
extends
Vue
{
@
Prop
({
type
:
Number
,
default
:
0
})
systemTemplateId
!
:
0
;
@
Prop
({
type
:
Boolean
,
default
:
true
})
isActive
!
:
boolean
;
public
templateInfo
:
Unit
[]
=
[];
// 周期函数
public
created
()
{
this
.
obtainTemplateInformation
();
// if (this.systemTemplateId) {
// this.templateInfo = formatTemplateApi2Local(JSON.parse(this.detail));
// }
}
// 返回模板
public
returnTemplate
(
val
:
string
)
{
this
.
$emit
(
"returnTemplate"
,
val
);
}
// 查询模板
public
async
obtainTemplateInformation
()
{
// 获取个人模板||获取系统模板
// let url = "";
// if (this.isActive) {
// url = URLS.SYS_TMPL_GET;
// } else {
// url = URLS.TEMPLATE_DETAIL;
// }
const
data
=
await
this
.
$ajax
({
type
:
"get"
,
params
:
{
id
:
this
.
systemTemplateId
,
},
url
:
GO_URLS
.
getSystemTemplate
,
});
if
(
data
&&
data
.
data
.
detail
)
{
this
.
templateInfo
=
formatTemplateApi2Local
(
JSON
.
parse
(
data
.
data
.
detail
));
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
/deep/.root_unit {
pointer-events: none;
.input-box {
input {
width: 500px;
}
}
.date-picker {
width: 500px;
}
}
.body {
width: 932px;
height: 640px;
background: rgba(255, 255, 255, 1);
border-radius: 10px;
// pointer-events: none;
.body-top {
height: 68px;
line-height: 68px;
text-align: center;
border-bottom: 1px solid #e9e9e9;
font-size: 22px;
font-weight: 500;
color: rgba(53, 53, 53, 1);
.body-top__right,
.body-top__left {
width: 90px;
height: 40px;
background: rgba(239, 239, 239, 1);
border-radius: 4px;
line-height: 40px;
font-size: 14px;
text-align: center;
font-weight: 400;
color: rgba(41, 41, 41, 1);
margin-top: 14px;
cursor: pointer;
}
.body-top__left {
float: left;
margin-left: 24px;
}
.body-top__right {
float: right;
margin-right: 24px;
}
}
.body-center {
height: 571px;
width: 100%;
// pointer-events: none;
border-radius: 0 0 10px 10px;
overflow-y: auto;
padding-left: 18px;
padding-top: 20px;
}
}
</
style
>
\ No newline at end of file
src/entry/gs/components/productList/productList.vue
View file @
8a82c5eb
...
...
@@ -958,7 +958,7 @@ export default {
.chain-content .part-bottom .chain-btn {
font-size: 14px;
color: white;
background-color: #
3f79fe
;
background-color: #
0CC399
;
border-radius: 4px;
width: 120px;
height: 40px;
...
...
src/entry/gs/components/templatePopup/templatePopup.vue
0 → 100644
View file @
8a82c5eb
<
template
>
<div
class=
"body"
>
<h1>
选择模板
</h1>
<!--
<div
class=
"body_add"
v-if=
"!isActive"
@
click=
"addTemplate"
>
<i
class=
"iconfont iconjiahao"
></i>
添加新模板
</div>
-->
<div
class=
"body_center"
>
<div
class=
"left"
>
<span
:class=
"
{ 'span--check': isActive, classification: true }"
@click="systemSelected"
>
<div
class=
"up"
>
<i
class=
"iconfont icongengduo1"
></i>
</div>
系统模板
</span>
<!--
<div>
-->
<ul
class=
"system-list"
:style=
"showHeight"
>
<li
v-for=
"(item, index) in SystemList"
:key=
"index"
@
click=
"check(item, index)"
>
<i
class=
"iconfont iconwenjianjia"
></i>
<span
:class=
"
{ 'name--check': index === checkIndex }">
{{
item
.
folder_name
}}
</span>
</li>
</ul>
<!--
</div>
-->
<span
:class=
"
{ 'span--check': !isActive, classification: true }"
@click="my"
>
<div
class=
"up"
:class=
"
{ 'up--down': true }">
<i
class=
"iconfont icongengduo1"
></i>
</div>
我的模板
</span>
<!-- 个人模板>分类 -->
<ul
class=
"system-list"
:style=
"showHeight2"
>
<li
v-for=
"(item, index) in PersonalClassification"
:key=
"index"
@
click=
"checkMy(item, index)"
>
<i
class=
"iconfont iconwenjianjia"
></i>
<span
:class=
"
{ 'name--check': index === checkIndex2 }">
{{
item
.
name
}}
</span>
</li>
</ul>
<!-- 分类模块暂时隐藏 -->
<!--
<classification-tree
v-if=
"isActive"
@
SelectedCategory=
"SelectedCategory"
></classification-tree>
-->
</div>
<div
class=
"right"
>
<ul>
<li
v-for=
"(item, index) in ListOfDetails"
:key=
"index"
@
click=
"selection(item, index)"
>
<!--
<img
src=
"https://f10.baidu.com/it/u=557133877,2120362237&fm=72"
v-if=
"isActive && !item.image_url"
/>
-->
<img
:src=
"item.image_url"
v-if=
"isActive && item.image_url"
/>
<img
v-if=
"!isActive"
src=
"../../../../assets/images/category/self-tmpl-bg.png"
class=
"img_my"
/>
<span
:class=
"
{ my: !isActive }">
{{
item
.
name
}}
</span>
<div
class=
"iconbox"
:class=
"
{ iconbox_my: !isActive }">
<i
class=
"iconfont iconxingzhuang2"
v-if=
"coordinate === index"
></i>
<i
class=
"iconfont iconweixuanze"
v-else
></i>
</div>
</li>
</ul>
<!-- 页码组件 -->
<!--
<pagination
class=
"pager"
v-model=
"page"
:total=
"total"
@
change=
"pagechange"
:size=
"9"
></pagination>
-->
</div>
<!-- 个人模板列表 -->
</div>
<!-- 底部按钮 -->
<div
class=
"body_footer"
>
<div
class=
"btn btn--preview"
@
click=
"preview"
>
预览
</div>
<div
class=
"btn btn--determine"
@
click=
"Determine"
>
确定
</div>
</div>
<!-- 预览弹窗 -->
<common-dialog
v-if=
"previewWindow"
@
closePopup=
"previewWindow = false"
showMask
class=
"template-popup__style"
>
<preview
:systemTemplateId=
"systemTemplateId"
:isActive=
"isActive"
@
returnTemplate=
"returnTemplate"
></preview>
<!--
<template-popup></template-popup>
-->
<!--
<Increments
:id=
"infoId"
@
update=
"IncrementUpdate"
@
close=
"showIncrements=false"
></Increments>
-->
</common-dialog>
<!--
<first-add
v-if=
"addTemplateShow"
:stepData=
"2"
@
finish=
"handleFinishAdd"
></first-add>
-->
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Vue
,
Prop
}
from
"vue-property-decorator"
;
import
{
GO_URLS
}
from
"@/config/URLS"
;
import
CommonDialog
from
"@/components/CommonDialog.vue"
;
// 公共组件
import
preview
from
"../preview/preview.vue"
;
//类目组件
@
Component
({
components
:
{
CommonDialog
,
preview
,
},
})
// @Prop()
export
default
class
TemplatePopup
extends
Vue
{
@
Prop
()
proofType
!
:
number
;
public
isActive
:
Boolean
=
true
;
// 系统模板true,个人模板false
public
SystemList
:
[]
=
[];
// 展示用数据
public
coordinate
:
Number
=
-
1
;
// 基准值
public
templateId
:
Number
=
0
;
public
categoryIdList
:
[]
=
[];
public
previewWindow
:
Boolean
=
false
;
//预览窗口
public
systemTemplateId
:
number
=
0
;
public
ListOfDetails
:
[]
=
[];
public
checkIndex
:
number
=
0
;
public
checkIndex2
:
number
=
-
1
;
public
PersonalClassification
:
[]
=
[];
public
BenchmarkHeight
:
number
=
31
;
public
BenchmarkHeight2
:
number
=
31
;
public
created
()
{
this
.
getSystemTemplateList
();
}
//个人模板>分类>模板列表
public
async
getpersonalList
(
id
:
number
)
{
const
res
=
await
this
.
$ajax
({
type
:
"post"
,
url
:
GO_URLS
.
personalList
,
params
:
{
id
:
[
id
],
},
});
if
(
res
)
{
if
(
res
.
data
.
results
[
0
].
detail
)
{
this
.
ListOfDetails
=
res
.
data
.
results
[
0
].
detail
;
}
else
{
this
.
ListOfDetails
=
[];
}
}
}
// 系统模板>分类选中效果
public
check
(
item
:
{
detail
:
[]
},
index
:
number
)
{
this
.
checkIndex
=
index
;
this
.
coordinate
=
-
1
;
// }
if
(
item
.
detail
)
{
this
.
ListOfDetails
=
item
.
detail
;
}
else
{
this
.
ListOfDetails
=
[];
}
}
// 个人模板>分类选中效果
public
checkMy
(
item
:
{
id
:
number
},
index
:
number
)
{
this
.
checkIndex2
=
index
;
this
.
coordinate
=
-
1
;
this
.
getpersonalList
(
item
.
id
);
}
// 系统模板>分类样式
get
showHeight
()
{
return
{
height
:
this
.
SystemList
.
length
*
this
.
BenchmarkHeight
+
"px"
,
};
}
// 个人模板>分类样式
get
showHeight2
()
{
return
{
height
:
this
.
PersonalClassification
.
length
*
this
.
BenchmarkHeight2
+
"px"
,
};
}
// 选定模板
public
Determine
()
{
if
(
this
.
systemTemplateId
===
0
)
{
this
.
$message
({
message
:
"请先选中模板,再进行该操作"
,
type
:
"warning"
,
});
return
;
}
// 关闭预览窗口
if
(
this
.
previewWindow
)
this
.
previewWindow
=
false
;
this
.
$emit
(
"Determine"
,
this
.
systemTemplateId
);
}
// 预览结束
public
returnTemplate
(
val
:
string
)
{
if
(
val
===
"Use"
)
{
this
.
Determine
();
}
else
{
this
.
previewWindow
=
false
;
}
}
// 预览
public
preview
()
{
if
(
this
.
systemTemplateId
===
0
)
{
this
.
$message
({
message
:
"请先选中模板,再进行预览"
,
type
:
"warning"
,
});
return
;
}
this
.
previewWindow
=
true
;
}
// 模板选中
public
selection
(
item
:
any
,
index
:
number
)
{
this
.
systemTemplateId
=
item
.
id
;
this
.
coordinate
=
index
;
}
// 获取系统模板列表
public
async
getSystemTemplateList
()
{
const
res
=
await
this
.
$ajax
({
type
:
"post"
,
url
:
GO_URLS
.
systemList
,
});
if
(
res
)
{
if
(
!
res
.
data
.
results
)
{
this
.
SystemList
=
[];
}
else
{
this
.
SystemList
=
res
.
data
.
results
;
this
.
check
(
res
.
data
.
results
[
0
],
0
);
}
}
}
// 获取我的模板列表
public
async
getFolderList
()
{
const
res
=
await
this
.
$ajax
({
type
:
"post"
,
url
:
GO_URLS
.
folderList
,
params
:
{
page
:
1
,
page_size
:
100
,
template_type
:
1
,
},
});
if
(
res
)
{
this
.
checkMy
(
res
.
data
.
results
[
0
],
0
);
return
res
.
data
.
results
;
}
}
// 个人模板>分类>获取模板列表
public
async
getMyTemplateList
()
{
const
res
=
await
this
.
getFolderList
();
if
(
!
res
)
return
false
;
this
.
PersonalClassification
=
res
;
}
// 切换到系统模板
public
systemSelected
()
{
// isActive true为系统模板,false为个人模板
if
(
this
.
isActive
)
{
if
(
this
.
BenchmarkHeight
===
31
)
{
this
.
BenchmarkHeight
=
0
;
}
else
{
this
.
BenchmarkHeight
=
31
;
}
}
else
{
this
.
isActive
=
true
;
this
.
coordinate
=
-
1
;
//初始化模板选中状态
this
.
PersonalClassification
=
[];
// 初始化个人模板列表的数据
this
.
getSystemTemplateList
();
//获取系统模板列表数据
}
}
// 切换到我的模板
public
my
()
{
if
(
!
this
.
isActive
)
{
if
(
this
.
BenchmarkHeight2
===
31
)
{
this
.
BenchmarkHeight2
=
0
;
}
else
{
this
.
BenchmarkHeight2
=
31
;
}
}
else
{
this
.
isActive
=
false
;
this
.
coordinate
=
-
1
;
this
.
SystemList
=
[];
this
.
ListOfDetails
=
[];
this
.
getMyTemplateList
();
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.system-list {
list-style: none;
overflow: hidden;
transition: 0.3s;
width: 132px;
max-height: 300px;
overflow-y: auto;
margin: 0;
padding: 0;
margin-left: 14px;
padding-top: 10px;
// &::-webkit-scrollbar {
// // display: none;
// // width: 2px;
// }
li {
padding-top: 10px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(53, 53, 53, 1);
cursor: pointer;
color: #353535;
text-align: left;
// &:first-child {
// // padding-top: 20px;
// }
// &:last-child {
// padding-bottom: 10px;
// }
i {
font-size: 12px;
padding-left: 10px;
padding-right: 6px;
}
span {
width: 84px;
overflow: hidden;
display: inline-block;
white-space: nowrap;
vertical-align: bottom;
text-overflow: ellipsis;
}
.name--check {
color: #0CC399 !important;
}
}
}
.template-popup__style {
border-radius: 10px !important;
overflow: hidden;
/deep/.dialog_content {
background: none;
max-height: none;
}
}
.body {
width: 932px;
height: 640px;
background: rgba(255, 255, 255, 1);
border-radius: 10px;
h1 {
font-size: 22px;
font-weight: 500;
line-height: 68px;
margin: 0;
text-align: center;
color: rgba(53, 53, 53, 1);
border-bottom: 1px solid #e9e9e9;
}
// .pager {
// margin-top: 8px;
// text-align: right;
// padding-right: 13px;
// }
.body_add {
position: absolute;
cursor: pointer;
top: 26px;
color: #4a90e2;
right: 26px;
font-size: 14px;
font-weight: 500;
color: rgba(74, 144, 226, 1);
i {
font-size: 12px;
margin-right: 10px;
vertical-align: middle;
}
}
.body_center {
border-bottom: 1px solid #e9e9e9;
height: 460px;
padding-top: 9px;
//
.left {
width: 160px;
height: 100%;
text-align: center;
float: left;
.classification {
width: 132px;
cursor: pointer;
height: 28px;
background: rgba(245, 247, 255, 1);
border-radius: 4px;
line-height: 28px;
text-align: center;
margin-top: 10px;
display: inline-block;
font-size: 12px;
font-weight: 400;
position: relative;
color: rgba(53, 53, 53, 1);
}
.up {
position: absolute;
// color: white;
right: 12px;
top: -1px;
transition: transform 0.3s ease-in-out;
transform: rotate(90deg);
i {
font-size: 12px;
}
}
.up--down {
transform: rotate(-90deg);
}
.span--check {
background: #0CC399;
color: white;
}
}
.right {
float: left;
width: 771px;
height: 100%;
ul {
margin: 0;
padding: 0;
height: 405px;
overflow: hidden;
margin-top: 9px;
li {
list-style: none;
width: 238px;
float: left;
position: relative;
cursor: pointer;
height: 121px;
margin-bottom: 14px;
margin-right: 16px;
border-radius: 5px;
border: 1px solid #f5f7ff;
.iconbox {
position: absolute;
top: 8px;
right: 8px;
color: white;
.iconxingzhuang2 {
background: white;
border-radius: 50%;
color: #00e7c0;
}
}
.iconbox_my {
color: #cacadd;
}
img {
width: 100%;
height: 100%;
border-radius: 5px;
}
span {
position: absolute;
left: 22px;
top: 14px;
font-size: 16px;
font-weight: 600;
color: rgba(255, 255, 255, 1);
}
.my {
color: rgba(53, 53, 53, 1);
}
}
}
}
}
.body_footer {
height: 100px;
line-height: 100px;
text-align: center;
.btn {
display: inline-block;
width: 120px;
height: 40px;
line-height: 40px;
font-size: 14px;
font-weight: 400;
cursor: pointer;
border-radius: 4px;
}
.btn--preview {
background: rgba(236, 236, 236, 1);
color: rgba(92, 100, 118, 1);
margin-right: 10px;
}
.btn--determine {
margin-left: 10px;
color: white;
background: #0CC399;
}
}
}
</
style
>
\ No newline at end of file
src/entry/gs/views/editTemplate/editTemplate.vue
View file @
8a82c5eb
...
...
@@ -2,7 +2,11 @@
<div
class=
"add_template"
>
<!-- end -->
<div
class=
"add_template__center"
>
<div
class=
"col_left"
:class=
"
{ col_left_full: !isShowBar }" @click="onCancelSelected">
<div
class=
"col_left"
:class=
"
{ col_left_full: !isShowBar }"
@click="onCancelSelected"
>
<header
class=
"header"
>
<button
class=
"header-btn_back"
@
click=
"back"
>
<i
class=
"iconfont iconZUO1 header-btn_back-icon"
></i>
...
...
@@ -17,23 +21,18 @@
<!-- 新增三个按钮 -->
<div
class=
"header-btnbox"
v-if=
"!ShowPastData"
>
<div
class=
"header-btnbox__btn"
@
click=
"UpperChain"
>
<span>
<i
class=
"iconfont iconshanglian"
></i>
</span>
上链
<span>
<i
class=
"iconfont iconshanglian"
></i>
</span>
上链
</div>
<div
class=
"header-btnbox__btn"
@
click=
"SelectTemplate"
>
<span>
<i
class=
"iconfont iconxuanzemoban"
></i>
</span>
选择模板
<span>
<i
class=
"iconfont iconxuanzemoban"
></i>
</span>
选择模板
</div>
<div
class=
"header-btnbox__btn"
@
click=
"uploadBanner"
v-if=
"existingEvidenceList.length
<
1
"
>
<span>
<i
class=
"iconfont iconshenglvehao1"
></i>
</span>
上传banner图
<span>
<i
class=
"iconfont iconshenglvehao1"
></i>
</span
>
上传banner图
</div>
</div>
</name-editor>
...
...
@@ -46,7 +45,10 @@
@click="DataHandover(item, index)"
>
{{
item
.
name
}}
<i
class=
"iconfont iconwsmp-bianji"
v-show=
"item.status === 0"
></i>
<i
class=
"iconfont iconwsmp-bianji"
v-show=
"item.status === 0"
></i>
</li>
</ul>
</header>
...
...
@@ -112,7 +114,11 @@
@
select-type=
"changeType"
@
delete=
"deleteItem"
></set-bar>
<div
class=
"col_right-switch"
ref=
"col_right_switch"
@
click=
"isShowBar = !isShowBar"
>
<div
class=
"col_right-switch"
ref=
"col_right_switch"
@
click=
"isShowBar = !isShowBar"
>
<i
class=
"iconfont iconxiangxia col_right-switch-icon"
:class=
"
{ 'js-col_right-switch-icon_left': !isShowBar }"
...
...
@@ -145,11 +151,16 @@
<div
class=
"chain-dialog"
v-show=
"isShowToChainDialog"
>
<div
class=
"chain-mask"
@
click=
"isShowToChainDialog = false"
></div>
<div
class=
"chain-content"
>
<i
class=
"iconfont iconjiufuqianbaoicon08"
@
click=
"isShowToChainDialog = false"
></i>
<i
class=
"iconfont iconjiufuqianbaoicon08"
@
click=
"isShowToChainDialog = false"
></i>
<img
src=
"../../../../assets/images/category/chain_notice.png"
/>
<div
class=
"part-bottom"
>
<h3>
上链提示
</h3>
<p
class=
"line-one"
>
信息上链后,即将展示在区块链上以作永恒记录,如有虚假,
</p>
<p
class=
"line-one"
>
信息上链后,即将展示在区块链上以作永恒记录,如有虚假,
</p>
<p
class=
"line-two"
>
登记⽅需⾃愿承担由此产⽣的⼀切后果。
</p>
<div
class=
"chain-btn"
@
click=
"uploadConfirm"
>
确定上链
</div>
</div>
...
...
@@ -169,11 +180,22 @@
/>
</common-dialog>
<!-- 修改标题 -->
<common-dialog
v-if=
"isModifyTitleShow"
@
closePopup=
"isModifyTitleShow = false"
showMask
>
<modify-title
:selectedEditItem=
"selectedEditItem"
@
close=
"isModifyTitleShow = false"
></modify-title>
<common-dialog
v-if=
"isModifyTitleShow"
@
closePopup=
"isModifyTitleShow = false"
showMask
>
<modify-title
:selectedEditItem=
"selectedEditItem"
@
close=
"isModifyTitleShow = false"
></modify-title>
</common-dialog>
<!-- 改变形式 -->
<common-dialog
v-if=
"modifyFormsShow"
@
closePopup=
"modifyFormsShow = false"
showMask
>
<common-dialog
v-if=
"modifyFormsShow"
@
closePopup=
"modifyFormsShow = false"
showMask
>
<modify-presentation
:selectedEditItem=
"selectedEditItem"
@
select-type=
"changeType"
...
...
@@ -181,13 +203,16 @@
></modify-presentation>
</common-dialog>
<common-dialog
v-if=
"ClassificationPopups"
@
closePopup=
"ClassificationPopups = false"
showMask
>
<common-dialog
v-if=
"ClassificationPopups"
@
closePopup=
"ClassificationPopups = false"
showMask
>
<choose-classification
@
successCallback=
"successCallback"
@
close=
"ClassificationPopups = false"
/>
</common-dialog>
</div>
</
template
>
<
script
lang=
"ts"
>
...
...
@@ -206,7 +231,7 @@ import SetBar from "../../components/setBar/setBar.vue";
import
RootUnit
from
"@/components/editTemplate/RootUnit.vue"
;
import
ModifyPresentation
from
"@/components/editTemplate/ModifyPresentation.vue"
;
//修改表现形式
import
banner
from
"../../components/banner/banner.vue"
;
import
TemplatePopup
from
"
@/views/template/T
emplatePopup.vue"
;
import
TemplatePopup
from
"
../../components/templatePopup/t
emplatePopup.vue"
;
import
AddChildDialog
from
"@/components/editTemplate/AddChildDialog.vue"
;
//添加下一级
import
AddRootDialog
from
"../../components/addRootDialog/addRootDialog.vue"
;
import
ModifyTitle
from
"@/components/editTemplate/ModifyTitle.vue"
;
//修改标题
...
...
@@ -229,9 +254,9 @@ import ChooseClassification from "@/components/editTemplate/ChooseClassification
AddRootDialog
,
ModifyTitle
,
Uncertified
,
ChooseClassification
ChooseClassification
,
// guide
}
}
,
})
export
default
class
editTemplate
extends
Vue
{
public
isShowAddChildDialog
:
boolean
=
false
;
// 子级添加弹窗
...
...
@@ -330,17 +355,17 @@ export default class editTemplate extends Vue {
folder_id
:
val
,
name
:
this
.
templateName
,
info
:
this
.
templateName
,
detail
:
JSON
.
stringify
(
newrout
)
}
detail
:
JSON
.
stringify
(
newrout
)
,
}
,
});
if
(
res
)
{
this
.
$message
({
message
:
"创建成功"
,
type
:
"success"
type
:
"success"
,
});
this
.
$router
.
push
({
path
:
"/categoryManage"
,
query
:
{
type
:
"MyTemplate"
}
query
:
{
type
:
"MyTemplate"
}
,
});
}
}
...
...
@@ -358,17 +383,17 @@ export default class editTemplate extends Vue {
params
:
{
id
:
Number
(
this
.
$route
.
query
.
personalTemplate
),
name
:
this
.
templateName
,
detail
:
JSON
.
stringify
(
formatApiJson
(
this
.
rootUnitList
))
}
detail
:
JSON
.
stringify
(
formatApiJson
(
this
.
rootUnitList
))
,
}
,
});
if
(
res
)
{
this
.
$message
({
message
:
"更新成功"
,
type
:
"success"
type
:
"success"
,
});
this
.
$router
.
push
({
path
:
"/categoryManage"
,
query
:
{
type
:
"MyTemplate"
}
query
:
{
type
:
"MyTemplate"
}
,
});
}
}
...
...
@@ -377,9 +402,9 @@ export default class editTemplate extends Vue {
const
res
=
await
this
.
$ajax
({
type
:
"get"
,
params
:
{
id
:
this
.
personalTemplateId
id
:
this
.
personalTemplateId
,
},
url
:
GO_URLS
.
proof
url
:
GO_URLS
.
proof
,
});
if
(
res
)
{
// 第一步
...
...
@@ -422,7 +447,7 @@ export default class editTemplate extends Vue {
public
async
getincrement
(
id
:
number
)
{
const
res
=
await
this
.
$ajax
({
type
:
"get"
,
url
:
GO_URLS
.
incrementId
+
`/`
+
id
url
:
GO_URLS
.
incrementId
+
`/`
+
id
,
});
if
(
res
)
{
// 第三步
...
...
@@ -470,8 +495,8 @@ export default class editTemplate extends Vue {
type
:
"get"
,
url
:
GO_URLS
.
getSystemTemplate
,
params
:
{
id
:
id
}
id
:
id
,
}
,
});
if
(
res
)
{
// 获取模板数据
...
...
@@ -536,15 +561,15 @@ export default class editTemplate extends Vue {
detail
:
JSON
.
stringify
(
newDetail
),
id
:
this
.
incrementId
,
name
:
this
.
templateName
,
note
:
this
.
localData
}
note
:
this
.
localData
,
}
,
});
if
(
res
)
{
this
.
$message
({
message
:
"编辑成功"
,
type
:
"success"
type
:
"success"
,
});
this
.
$router
.
push
(
"/categoryManage"
);
//
this.$router.push("/categoryManage");
}
}
// 更新普通存证
...
...
@@ -591,13 +616,13 @@ export default class editTemplate extends Vue {
id
:
Number
(
this
.
$route
.
query
.
personalTemplateId
),
name
:
this
.
templateName
,
detail
:
JSON
.
stringify
(
newDetail
),
note
:
this
.
localData
}
note
:
this
.
localData
,
}
,
});
if
(
res
)
{
this
.
$message
({
message
:
"编辑成功"
,
type
:
"success"
type
:
"success"
,
});
}
}
...
...
@@ -613,43 +638,43 @@ export default class editTemplate extends Vue {
data
:
{
type
:
"text"
,
format
:
"string"
,
value
:
this
.
templateName
value
:
this
.
templateName
,
},
type
:
0
,
key
:
"存证名称"
,
label
:
"存证名称"
label
:
"存证名称"
,
},
{
data
:
{
type
:
"text"
,
format
:
"hash"
,
value
:
"null"
value
:
"null"
,
},
type
:
0
,
key
:
"basehash"
,
label
:
"basehash"
label
:
"basehash"
,
},
{
data
:
{
type
:
"text"
,
format
:
"hash"
,
value
:
"null"
value
:
"null"
,
},
type
:
0
,
key
:
"prehash"
,
label
:
"prehash"
label
:
"prehash"
,
},
{
data
:
{
type
:
"text"
,
format
:
"string"
,
value
:
this
.
MemoryCardType
value
:
this
.
MemoryCardType
,
},
type
:
0
,
key
:
"存证类型"
,
label
:
"存证类型"
}
]
label
:
"存证类型"
,
}
,
]
,
};
var
newDetail
=
new
Array
();
newDetail
=
formatApiJson
(
this
.
rootUnitList
);
...
...
@@ -668,15 +693,15 @@ export default class editTemplate extends Vue {
userIcon
:
this
.
$store
.
state
.
userInfos
.
icon
||
""
,
evidenceName
:
this
.
templateName
,
stepName
:
""
,
banners
:
[]
})
}
banners
:
[]
,
})
,
}
,
});
if
(
res
)
{
this
.
personalTemplateId
=
res
.
data
.
id
;
this
.
$message
({
message
:
"创建成功"
,
type
:
"success"
type
:
"success"
,
});
}
}
...
...
@@ -692,15 +717,15 @@ export default class editTemplate extends Vue {
params
:
{
base_hash
:
hash
,
page
:
1
,
page_size
:
10
}
page_size
:
10
,
}
,
});
if
(
res
)
{
// 第二步
var
firstData
=
{
name
:
this
.
templateName
,
id
:
this
.
personalTemplateId
,
hash
:
hash
hash
:
hash
,
};
res
.
data
.
results
.
push
(
firstData
);
this
.
existingEvidenceList
=
res
.
data
.
results
;
...
...
@@ -742,9 +767,9 @@ export default class editTemplate extends Vue {
const
data
=
await
this
.
$ajax
({
type
:
"get"
,
params
:
{
id
:
val
id
:
val
,
},
url
:
GO_URLS
.
getSystemTemplate
url
:
GO_URLS
.
getSystemTemplate
,
});
if
(
data
&&
data
.
data
.
detail
)
{
this
.
MemoryCardType
=
data
.
data
.
name
;
...
...
@@ -783,12 +808,12 @@ export default class editTemplate extends Vue {
const
res
=
await
this
.
$ajax
({
type
:
"post"
,
url
:
GO_URLS
.
sendBlockIncrementChain
,
params
:
{
id
:
this
.
incrementId
}
params
:
{
id
:
this
.
incrementId
}
,
});
if
(
res
)
{
this
.
$message
({
type
:
"success"
,
message
:
"上链信息提交成功!"
message
:
"上链信息提交成功!"
,
});
this
.
isShowToChainDialog
=
false
;
this
.
$router
.
push
(
"/categoryManage"
);
...
...
@@ -802,13 +827,13 @@ export default class editTemplate extends Vue {
const
res
=
await
this
.
$ajax
({
type
:
"post"
,
url
:
GO_URLS
.
sendBlockChian
,
params
:
{
id
:
this
.
personalTemplateId
}
params
:
{
id
:
this
.
personalTemplateId
}
,
});
if
(
res
)
{
// this.getList();
this
.
$message
({
type
:
"success"
,
message
:
"上链信息提交成功!"
message
:
"上链信息提交成功!"
,
});
this
.
isShowToChainDialog
=
false
;
this
.
$router
.
push
(
"/categoryManage"
);
...
...
@@ -893,7 +918,7 @@ export default class editTemplate extends Vue {
?
target
.
parent
.
changeChild2Unit
(
target
)
:
target
;
name
.
forEach
(
item
=>
{
name
.
forEach
(
(
item
)
=>
{
newTarget
.
addInputChildren
(
item
);
});
}
...
...
@@ -915,12 +940,12 @@ export default class editTemplate extends Vue {
private
getFiles
(
apiUnits
:
any
[])
{
let
files
:
File
[]
=
[];
let
fileInfos
:
ImageInfo
[]
=
[];
apiUnits
.
forEach
(
l1
=>
{
apiUnits
.
forEach
(
(
l1
)
=>
{
l1
.
children
.
forEach
((
l2
:
any
)
=>
{
if
(
l2
.
type
===
PropertyType
.
Image
)
{
let
dd
=
Array
.
from
(
l2
.
value
);
if
(
dd
)
{
(
dd
as
ImageItem
[]).
forEach
(
img
=>
{
(
dd
as
ImageItem
[]).
forEach
(
(
img
)
=>
{
if
(
img
.
file
)
{
files
.
push
(
img
.
file
);
}
...
...
@@ -932,7 +957,7 @@ export default class editTemplate extends Vue {
});
return
{
files
,
fileInfos
fileInfos
,
};
}
// 图片上传请求
...
...
@@ -940,7 +965,7 @@ export default class editTemplate extends Vue {
const
res
=
await
this
.
$ajax
({
type
:
"post"
,
url
:
GO_URLS
.
upload
+
`?file_type=png`
,
params
:
formData
params
:
formData
,
});
if
(
res
)
{
return
(
res
as
ResUploadFiles
).
data
;
...
...
@@ -1026,8 +1051,8 @@ export default class editTemplate extends Vue {
padding: 0;
.existing-evidence__list {
color: white;
background: #
3f79fe
;
border: 1px solid #
3f79fe
;
background: #
0cc399
;
border: 1px solid #
0cc399
;
}
li {
list-style: none;
...
...
@@ -1137,7 +1162,7 @@ export default class editTemplate extends Vue {
.chain-content .part-bottom .chain-btn {
font-size: 14px;
color: white;
background-color: #0
CC
399;
background-color: #0
cc
399;
border-radius: 4px;
width: 120px;
height: 40px;
...
...
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