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
65529b8a
Commit
65529b8a
authored
Oct 09, 2021
by
wcmoon
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'sy' of gitlab.33.cn:zl/source-trace-manage-go into sy
parents
83f5a82a
9169d86c
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
576 additions
and
283 deletions
+576
-283
.env.sy_build
.env.sy_build
+0
-0
.env.sy_prod_build
.env.sy_prod_build
+0
-4
.env.sy_test
.env.sy_test
+3
-2
AddTemplate.vue
src/components/TemplateManage/AddTemplate.vue
+13
-1
CopyTemplate.vue
src/components/TemplateManage/CopyTemplate.vue
+9
-1
TemplateManage.vue
src/components/category/TemplateManage.vue
+19
-10
ModifyTitle.vue
src/components/editTemplate/ModifyTitle.vue
+1
-0
SetBar.vue
src/components/editTemplate/SetBar.vue
+18
-18
AudioForm.vue
src/components/editTemplate/form/AudioForm.vue
+34
-9
ImageForm.vue
src/components/editTemplate/form/ImageForm.vue
+27
-2
ImageUrlForm.vue
src/components/editTemplate/form/ImageUrlForm.vue
+41
-28
JSONForm.vue
src/components/editTemplate/form/JSONForm.vue
+57
-40
PDFForms.vue
src/components/editTemplate/form/PDFForms.vue
+14
-2
SelectForm.vue
src/components/editTemplate/form/SelectForm.vue
+17
-5
TextArrayForm.vue
src/components/editTemplate/form/TextArrayForm.vue
+44
-31
VideoForm.vue
src/components/editTemplate/form/VideoForm.vue
+45
-15
IncrementalDataList.vue
src/components/newProductList/IncrementalDataList.vue
+77
-35
emailLogin.vue
src/components/signin/emailLogin.vue
+24
-12
phoneLogin.vue
src/components/signin/phoneLogin.vue
+24
-12
setPassword.vue
src/components/signin/setPassword.vue
+41
-20
Home.vue
src/entry/sy/views/Home.vue
+8
-3
filter.ts
src/utils/tool/filter.ts
+10
-0
editTemplate.vue
src/views/template/editTemplate.vue
+10
-9
readOnly.vue
src/views/template/readOnly.vue
+38
-22
vue.config.js
vue.config.js
+2
-2
No files found.
.env.sy_
test_
build
→
.env.sy_build
View file @
65529b8a
File moved
.env.sy_prod_build
deleted
100644 → 0
View file @
83f5a82a
NODE_ENV = 'production'
VUE_APP_CURRENTMODE = 'sy_prod'
VUE_APP_VERSION = '0'
\ No newline at end of file
.env.sy_test
View file @
65529b8a
NODE_ENV = '
development
'
VUE_APP_CURRENTMODE = 'sy_
test
'
NODE_ENV = '
production
'
VUE_APP_CURRENTMODE = 'sy_
prod
'
VUE_APP_VERSION = '0'
\ No newline at end of file
src/components/TemplateManage/AddTemplate.vue
View file @
65529b8a
...
...
@@ -8,7 +8,12 @@
placeholder=
"请输入模板名称"
/>
<el-select
v-model=
"value"
placeholder=
"请选择"
>
<el-option
v-for=
"item in MyCategories"
:key=
"item.value"
:label=
"item.name"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in MyCategories"
:key=
"item.value"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
<button
class=
"dialog_add-btn_confirm"
@
click=
"checkForm"
>
确定
</button>
<button
class=
"dialog_add-btn_cancel"
@
click=
"closeDialog"
>
取消
</button>
...
...
@@ -28,8 +33,15 @@ export default {
value
:
""
,
};
},
props
:
{
activeId
:
{
type
:
Number
,
},
},
components
:
{
DialogInput
},
created
()
{
this
.
value
=
this
.
activeId
;
this
.
getFolderList
();
},
methods
:
{
...
...
src/components/TemplateManage/CopyTemplate.vue
View file @
65529b8a
...
...
@@ -27,7 +27,14 @@ export default {
components
:
{
DialogInput
,
},
props
:
[
"TemplateID"
],
props
:
{
activeId
:
{
type
:
Number
,
},
TemplateID
:
{
type
:
Number
,
},
},
data
()
{
return
{
isErrorShowing
:
false
,
...
...
@@ -40,6 +47,7 @@ export default {
},
mounted
()
{
this
.
getFolderList
();
this
.
value
=
this
.
activeId
;
this
.
gettemplate
(
this
.
TemplateID
);
},
methods
:
{
...
...
src/components/category/TemplateManage.vue
View file @
65529b8a
...
...
@@ -56,8 +56,9 @@
@click="switchPersonalClassification(item, index)"
v-for="(item, index) in MyCategories"
:key="index"
:title="item.name"
>
{{
item
.
name
}}
{{
item
.
name
|
stringCutting
(
7
)
}}
<i
@
click
.
stop=
"editorClassification(item, index)"
v-if=
"checkClassification === index && index !== 0"
...
...
@@ -136,6 +137,7 @@
showMask
>
<add-template
:activeId=
"activeId"
@
close=
"AddTemplatePopups = false"
@
successCallback=
"addSuccess"
/>
...
...
@@ -144,6 +146,7 @@
<common-dialog
v-if=
"CopyShow"
@
closePopup=
"CopyShow = false"
showMask
>
<copy-template
:TemplateID=
"TemplateID"
:activeId=
"activeId"
@
successCallback=
"successCallback"
@
close=
"CopyShow = false"
/>
...
...
@@ -186,6 +189,7 @@ export default {
renameShow
:
false
,
itemName
:
""
,
itemID
:
-
1
,
activeId
:
0
,
};
},
components
:
{
...
...
@@ -253,6 +257,7 @@ export default {
// 复制
copy
(
item
)
{
this
.
CopyShow
=
true
;
this
.
activeId
=
this
.
MyCategories
[
this
.
checkClassification
].
id
;
this
.
onMenuBlur
();
this
.
TemplateID
=
item
.
id
;
},
...
...
@@ -266,7 +271,7 @@ export default {
},
});
if
(
res
)
{
this
.
checkClassification
=
0
;
//
this.checkClassification = 0;
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
...
...
@@ -308,10 +313,11 @@ export default {
},
addSuccess
(
val
)
{
this
.
AddTemplatePopups
=
false
;
this
.
checkClassification
=
0
;
//
this.checkClassification = 0;
this
.
getpersonalList
(
val
);
},
AddTemplate
()
{
this
.
activeId
=
this
.
MyCategories
[
this
.
checkClassification
].
id
;
this
.
AddTemplatePopups
=
true
;
},
// 关闭弹窗
...
...
@@ -353,10 +359,10 @@ export default {
this
.
checkClassification
=
index
;
this
.
getpersonalList
(
item
.
id
);
},
//
个人模板>添加分类回调
//
分类下模板操作成功反馈
successCallback
()
{
this
.
ClassificationPopups
=
false
;
this
.
CopyShow
=
false
;
if
(
this
.
ClassificationPopups
)
this
.
ClassificationPopups
=
false
;
if
(
this
.
CopyShow
)
this
.
CopyShow
=
false
;
this
.
getFolderList
();
},
// 添加分类
...
...
@@ -376,9 +382,8 @@ export default {
});
if
(
res
)
{
this
.
MyCategories
=
res
.
data
.
results
;
if
(
this
.
TemplateDate
.
index
)
return
;
this
.
getpersonalList
(
this
.
MyCategories
[
0
].
id
);
this
.
checkClassification
=
0
;
this
.
getpersonalList
(
this
.
MyCategories
[
this
.
checkClassification
].
id
);
}
},
//个人模板or系统模板切换 1 系统模板 0 个人模板
...
...
@@ -442,12 +447,16 @@ export default {
}
},
async
search
()
{
if
(
this
.
key
===
""
)
return
;
if
(
this
.
key
===
""
)
{
this
.
getpersonalList
(
this
.
MyCategories
[
this
.
checkClassification
].
id
);
return
;
}
const
res
=
await
this
.
$ajax
({
url
:
GO_URLS
.
searchCustomize
,
type
:
"post"
,
params
:
{
key
:
this
.
key
,
folder_id
:
this
.
MyCategories
[
this
.
checkClassification
].
id
,
},
});
if
(
res
)
{
...
...
src/components/editTemplate/ModifyTitle.vue
View file @
65529b8a
...
...
@@ -4,6 +4,7 @@
<dialog-input
class=
"dialog_add-form dialog_add-input_name"
v-model=
"editTitle"
maxlength=
"10"
:errorShowing=
"isErrorShowing"
placeholder=
"请输入标题名称"
/>
...
...
src/components/editTemplate/SetBar.vue
View file @
65529b8a
...
...
@@ -96,28 +96,28 @@
<i
class=
"iconfont iconshangchuanwenjianbeifen"
></i>
</div>
</set-select-item>
<!--
<set-select-item-->
<!-- label="JSON"-->
<!-- :selected="type === PropertyType.JSON"-->
<!-- :disabled="selectedDisabled"-->
<!-- @click.native="handleSelect(PropertyType.JSON)"-->
<!-- >-->
<!--
<div
class=
"menu-item-example menu-item-example_input_half"
></div>
-->
<!--
<div
class=
"menu-item-example menu-item-example_input_half"
></div>
-->
<!--
</set-select-item>
-->
<!--
<set-select-item-->
<!-- label="JSON"-->
<!-- :selected="type === PropertyType.JSON"-->
<!-- :disabled="selectedDisabled"-->
<!-- @click.native="handleSelect(PropertyType.JSON)"-->
<!-- >-->
<!--
<div
class=
"menu-item-example menu-item-example_input_half"
></div>
-->
<!--
<div
class=
"menu-item-example menu-item-example_input_half"
></div>
-->
<!--
</set-select-item>
-->
<set-select-item
label=
"图片链接"
:selected=
"type === PropertyType.ImageUrl"
:disabled=
"selectedDisabled"
@
click
.
native=
"handleSelect(PropertyType.ImageUrl)"
label=
"图片链接"
:selected=
"type === PropertyType.ImageUrl"
:disabled=
"selectedDisabled"
@
click
.
native=
"handleSelect(PropertyType.ImageUrl)"
>
<div
class=
"menu-item-example menu-item-example_input"
></div>
</set-select-item>
<set-select-item
label=
"文本数组"
:selected=
"type === PropertyType.TextArray"
:disabled=
"selectedDisabled"
@
click
.
native=
"handleSelect(PropertyType.TextArray)"
label=
"文本数组"
:selected=
"type === PropertyType.TextArray"
:disabled=
"selectedDisabled"
@
click
.
native=
"handleSelect(PropertyType.TextArray)"
>
<div
class=
"menu-item-example menu-item-example_input"
></div>
</set-select-item>
...
...
@@ -163,7 +163,7 @@ export default class SetBar extends Vue {
@
Prop
()
public
selectTarget
!
:
Unit
|
Property
|
null
;
public
PropertyType
=
PropertyType
;
public
editTitle
=
``
;
public
titleLength
=
10
0
;
public
titleLength
=
10
;
public
get
type
()
{
const
target
=
this
.
selectTarget
;
...
...
src/components/editTemplate/form/AudioForm.vue
View file @
65529b8a
...
...
@@ -56,7 +56,9 @@ export default {
},
mounted
()
{
if
(
Array
.
isArray
(
this
.
property
.
value
))
{
this
.
property
.
value
=
this
.
property
.
value
.
filter
(
item
=>
item
.
value
!==
''
);
this
.
property
.
value
=
this
.
property
.
value
.
filter
(
(
item
)
=>
item
.
value
!==
""
);
}
if
(
this
.
property
.
value
.
length
>
0
)
{
let
hashes
=
[];
...
...
@@ -85,12 +87,25 @@ export default {
this
.
showAudio
=
true
;
},
deleteAudios
(
index
)
{
this
.
localHash
.
splice
(
index
,
1
);
this
.
localObjects
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
localHash
.
splice
(
index
,
1
);
this
.
localObjects
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
},
// 上传文件
upFile
()
{
...
...
@@ -113,10 +128,20 @@ export default {
},
async
fileChange
(
e
)
{
const
file
=
e
.
target
.
files
[
0
];
e
.
target
.
value
=
null
;
//清空值
if
(
!
file
)
return
;
// 限制相同文件的上传
const
state
=
this
.
localObjects
.
some
((
item
)
=>
item
.
name
===
file
.
name
);
if
(
state
)
{
this
.
$message
({
message
:
"不可重复上传该音频文件"
,
type
:
"warning"
,
});
return
;
}
if
(
file
.
size
>
10485760
)
{
this
.
$message
({
message
:
"上传
文件超过最大限制
"
,
message
:
"上传
音频大小不可超过10M
"
,
type
:
"warning"
,
});
return
;
...
...
@@ -185,7 +210,7 @@ export default {
line-height: 36px;
color: rgba(121, 125, 132, 1);
background: #f6f6f7;
border: 1px solid #
DCDFE
6;
border: 1px solid #
dcdfe
6;
.iconyinpin2 {
font-size: 24px;
vertical-align: sub;
...
...
src/components/editTemplate/form/ImageForm.vue
View file @
65529b8a
...
...
@@ -22,7 +22,7 @@
<img
class=
"list-item-img"
:src=
"item.url || item.dataUrl"
/>
<i
class=
"iconfont iconshanchu3"
@
click=
"deleteimg(item, index)"
@
click
.
stop
=
"deleteimg(item, index)"
></i>
</div>
<div
class=
"add_wrapper"
>
...
...
@@ -122,13 +122,38 @@ export default class ImageForm extends Vue {
}
// 删除图片
deleteimg
(
item
:
any
,
index
:
number
)
{
this
.
imageInfo
.
imgList
.
splice
(
index
,
1
);
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
imageInfo
.
imgList
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
}
public
fileChange
(
e
:
any
)
{
const
file
:
File
=
e
.
target
.
files
[
0
];
if
(
!
file
)
{
return
;
}
if
(
file
.
size
>
5242880
)
{
this
.
$message
({
message
:
"上传图片大小不可超过5M"
,
type
:
"warning"
,
});
return
;
}
const
fr
=
new
FileReader
();
fr
.
onload
=
(
event
:
any
)
=>
{
this
.
imageInfo
.
imgList
.
push
({
...
...
src/components/editTemplate/form/ImageUrlForm.vue
View file @
65529b8a
...
...
@@ -5,18 +5,14 @@
<div
class=
"label-text"
:title=
"property.label"
>
{{
property
.
label
}}
</div>
</div>
<div
class=
"lists"
>
<div
class=
"list"
v-for=
"(item, index) in array"
:key=
"index"
>
<div
class=
"list"
v-for=
"(item, index) in array"
:key=
"index"
>
<input
@
change=
"change"
class=
"input"
type=
"text"
v-model=
"item.value"
:placeholder=
"'请输入' + property.label"
>
@
change=
"change"
class=
"input"
type=
"text"
v-model=
"item.value"
:placeholder=
"'请输入' + property.label"
/
>
<div
class=
"del"
@
click=
"del(index)"
>
<i
class=
"iconfont iconshanchu-"
></i>
</div>
...
...
@@ -30,42 +26,61 @@
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"vue-property-decorator"
;
import
{
Property
}
from
"@/plugins/types2"
;
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"vue-property-decorator"
;
import
{
Property
}
from
"@/plugins/types2"
;
@
Component
export
default
class
ImageUrlForm
extends
Vue
{
@
Prop
()
property
!
:
Property
;
public
array
=
[{
value
:
''
}];
public
array
=
[
{
value
:
""
,
},
];
@
Watch
(
'array'
)
@
Watch
(
"array"
)
public
arrayChange
()
{
this
.
property
.
value
=
this
.
array
.
map
(
item
=>
String
(
item
.
value
));
this
.
property
.
value
=
this
.
array
.
map
(
(
item
)
=>
String
(
item
.
value
));
}
mounted
()
{
if
(
!
Array
.
isArray
(
this
.
property
.
value
))
return
;
this
.
array
=
this
.
property
.
value
.
map
((
value
:
string
)
=>
{
return
{
value
};
})
return
{
value
};
})
;
}
public
change
(
inputValue
:
string
)
{
this
.
property
.
value
=
this
.
array
.
map
(
item
=>
String
(
item
.
value
));
this
.
property
.
value
=
this
.
array
.
map
(
(
item
)
=>
String
(
item
.
value
));
}
public
add
()
{
this
.
array
.
push
({
value
:
''
})
value
:
""
,
})
;
}
public
del
(
index
:
number
)
{
public
del
(
index
:
number
)
{
if
(
this
.
array
.
length
<=
1
)
return
;
this
.
array
.
splice
(
index
,
1
);
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
array
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
}
}
</
script
>
...
...
@@ -114,7 +129,7 @@ export default class ImageUrlForm extends Vue {
box-sizing: border-box;
min-height: 44px;
border-radius: 4px;
border: 1px solid #
DCDFE
6; /* todo 边框、背景色ui图颜色不一致 */
border: 1px solid #
dcdfe
6; /* todo 边框、背景色ui图颜色不一致 */
outline: none;
padding-left: 24px;
font-size: 14px;
...
...
@@ -145,8 +160,6 @@ export default class ImageUrlForm extends Vue {
}
}
.add {
width: 34px;
height: 34px;
...
...
src/components/editTemplate/form/JSONForm.vue
View file @
65529b8a
<
template
>
<base-form
:label=
"property.label"
:watchValue=
"property.value"
:showInput=
"false"
class=
"json-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"
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"
class=
"input"
v-model=
"i.value"
@
input=
"change"
type=
"text"
placeholder=
"value"
/>
<div
class=
"del"
@
click=
"del(index)"
>
<i
class=
"iconfont iconshanchu-"
></i>
...
...
@@ -35,64 +35,82 @@
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"vue-property-decorator"
;
import
BaseForm
from
"./BaseForm.vue"
;
import
{
Property
}
from
"@/plugins/types2"
;
import
{
Property
}
from
"@/plugins/types2"
;
@
Component
({
components
:
{
BaseForm
}
BaseForm
,
}
,
})
export
default
class
JsonForm
extends
Vue
{
@
Prop
()
property
!
:
Property
;
public
jsons
=
[{
key
:
''
,
value
:
''
}];
public
jsons
=
[
{
key
:
""
,
value
:
""
,
},
];
@
Watch
(
'jsons'
)
@
Watch
(
"jsons"
)
jsonsChange
()
{
let
temp
:
any
=
{};
let
temp
:
any
=
{};
this
.
jsons
.
forEach
((
item
)
=>
{
temp
[
item
.
key
]
=
item
.
value
;
})
})
;
this
.
property
.
value
=
JSON
.
stringify
(
temp
);
}
mounted
()
{
const
o
=
JSON
.
parse
(
this
.
property
.
value
as
string
||
'{}'
);
const
o
=
JSON
.
parse
(
(
this
.
property
.
value
as
string
)
||
"{}"
);
this
.
jsons
=
[];
for
(
let
i
in
o
)
{
this
.
jsons
.
push
({
key
:
i
,
value
:
o
[
i
]
})
value
:
o
[
i
]
,
})
;
}
if
(
this
.
jsons
.
length
<=
0
)
{
this
.
jsons
.
push
({
key
:
''
,
value
:
''
})
key
:
""
,
value
:
""
,
})
;
}
}
public
change
()
{
let
temp
:
any
=
{};
let
temp
:
any
=
{};
this
.
jsons
.
forEach
((
item
)
=>
{
temp
[
item
.
key
]
=
item
.
value
;
})
})
;
this
.
property
.
value
=
JSON
.
stringify
(
temp
);
}
public
add
()
{
this
.
jsons
.
push
({
key
:
''
,
value
:
''
})
key
:
""
,
value
:
""
,
})
;
}
public
del
(
index
:
number
)
{
public
del
(
index
:
number
)
{
if
(
this
.
jsons
.
length
<=
1
)
return
;
this
.
jsons
.
splice
(
index
,
1
);
}
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
jsons
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
}
}
</
script
>
...
...
@@ -139,5 +157,4 @@ export default class JsonForm extends Vue {
cursor: pointer;
margin: 10px 0;
}
</
style
>
src/components/editTemplate/form/PDFForms.vue
View file @
65529b8a
...
...
@@ -47,7 +47,9 @@ export default {
this
.
label
=
this
.
property
.
label
;
// 数据回显
if
(
Array
.
isArray
(
this
.
property
.
value
))
{
this
.
property
.
value
=
this
.
property
.
value
.
filter
(
item
=>
item
.
value
!==
''
);
this
.
property
.
value
=
this
.
property
.
value
.
filter
(
(
item
)
=>
item
.
value
!==
""
);
}
if
(
this
.
property
.
value
.
length
>
0
)
{
this
.
pdfSHOW
=
true
;
...
...
@@ -88,10 +90,20 @@ export default {
},
async
fileChange
(
e
)
{
const
file
=
e
.
target
.
files
[
0
];
e
.
target
.
value
=
null
;
//清空值
if
(
!
file
)
return
;
// 限制相同文件的上传
const
state
=
this
.
localObjects
.
some
((
item
)
=>
item
.
name
===
file
.
name
);
if
(
state
)
{
this
.
$message
({
message
:
"不可重复上传该PDF文件"
,
type
:
"warning"
,
});
return
;
}
if
(
file
.
size
>
10485760
)
{
this
.
$message
({
message
:
"上传
文件超过最大限制
"
,
message
:
"上传
PDF大小不可超过10M
"
,
type
:
"warning"
,
});
return
;
...
...
src/components/editTemplate/form/SelectForm.vue
View file @
65529b8a
...
...
@@ -8,7 +8,11 @@
:iconDown=
"true"
>
<ul
v-if=
"selectShowing"
class=
"menu"
@
click
.
stop
@
mousedown
.
stop
>
<li
v-for=
"(item, index) in property.options"
class=
"menu-item"
:key=
"item.id"
>
<li
v-for=
"(item, index) in property.options"
class=
"menu-item"
:key=
"item.id"
>
<input
class=
"menu-item-input"
v-model=
"property.options[index]"
...
...
@@ -16,7 +20,11 @@
placeholder=
"请输入下拉内容"
@
click=
"chooseLabel(index)"
/>
<i
v-if=
"index===0"
class=
"iconfont icontianjiafenlei menu-item-icon_add"
@
click=
"addOptions"
></i>
<i
v-if=
"index === 0"
class=
"iconfont icontianjiafenlei menu-item-icon_add"
@
click=
"addOptions"
></i>
<i
v-else
class=
"iconfont iconshanchu2 menu-item-icon_delete"
...
...
@@ -41,8 +49,8 @@ import { getUuid } from "@/utils/tool";
*/
@
Component
({
components
:
{
BaseForm
}
BaseForm
,
}
,
})
export
default
class
SelectForm
extends
Vue
{
// todo 需求ui未给清,已第一行显示添加按钮实现,第一行删不了,无查重和必填
...
...
@@ -75,7 +83,7 @@ export default class SelectForm extends Vue {
public
onHindOptions
()
{
this
.
property
.
options
=
this
.
property
.
options
.
filter
(
item
=>
item
.
length
>
0
(
item
)
=>
item
.
length
>
0
);
this
.
selectShowing
=
false
;
document
.
removeEventListener
(
"mousedown"
,
this
.
onHindOptions
);
...
...
@@ -84,6 +92,10 @@ export default class SelectForm extends Vue {
</
script
>
<
style
scoped
lang=
"less"
>
/deep/ input {
padding-right: 60px;
}
.menu {
z-index: 1;
position: absolute;
...
...
src/components/editTemplate/form/TextArrayForm.vue
View file @
65529b8a
...
...
@@ -5,18 +5,14 @@
<div
class=
"label-text"
:title=
"property.label"
>
{{
property
.
label
}}
</div>
</div>
<div
class=
"lists"
>
<div
class=
"list"
v-for=
"(item, index) in array"
:key=
"index"
>
<div
class=
"list"
v-for=
"(item, index) in array"
:key=
"index"
>
<input
@
change=
"change"
class=
"input"
type=
"text"
v-model=
"item.value"
:placeholder=
"'请输入' + property.label"
>
@
change=
"change"
class=
"input"
type=
"text"
v-model=
"item.value"
:placeholder=
"'请输入' + property.label"
/
>
<div
class=
"del"
@
click=
"del(index)"
>
<i
class=
"iconfont iconshanchu-"
></i>
</div>
...
...
@@ -30,46 +26,66 @@
</
template
>
<
script
lang=
"ts"
>
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"vue-property-decorator"
;
import
{
Component
,
Prop
,
Vue
,
Watch
}
from
"vue-property-decorator"
;
import
BaseForm
from
"./BaseForm.vue"
;
import
{
Property
}
from
"@/plugins/types2"
;
import
{
Property
}
from
"@/plugins/types2"
;
@
Component
({
components
:
{
BaseForm
}
BaseForm
,
}
,
})
export
default
class
TextArray
extends
Vue
{
@
Prop
()
property
!
:
Property
;
public
array
=
[{
value
:
''
}];
public
array
=
[
{
value
:
""
,
},
];
@
Watch
(
'array'
)
@
Watch
(
"array"
)
public
arrayChange
()
{
this
.
property
.
value
=
this
.
array
.
map
(
item
=>
String
(
item
.
value
));
this
.
property
.
value
=
this
.
array
.
map
(
(
item
)
=>
String
(
item
.
value
));
}
mounted
()
{
if
(
!
Array
.
isArray
(
this
.
property
.
value
))
return
;
this
.
array
=
this
.
property
.
value
.
map
((
value
:
string
)
=>
{
return
{
value
};
})
return
{
value
};
})
;
}
change
()
{
this
.
property
.
value
=
this
.
array
.
map
(
item
=>
String
(
item
.
value
));
this
.
property
.
value
=
this
.
array
.
map
(
(
item
)
=>
String
(
item
.
value
));
}
public
add
()
{
this
.
array
.
push
({
value
:
''
})
value
:
""
,
})
;
}
public
del
(
index
:
number
)
{
public
del
(
index
:
number
)
{
if
(
this
.
array
.
length
<=
1
)
return
;
this
.
array
.
splice
(
index
,
1
);
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
this
.
array
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
}
}
</
script
>
...
...
@@ -118,7 +134,7 @@ export default class TextArray extends Vue {
box-sizing: border-box;
min-height: 44px;
border-radius: 4px;
border: 1px solid #
DCDFE
6; /* todo 边框、背景色ui图颜色不一致 */
border: 1px solid #
dcdfe
6; /* todo 边框、背景色ui图颜色不一致 */
outline: none;
padding-left: 24px;
font-size: 14px;
...
...
@@ -149,8 +165,6 @@ export default class TextArray extends Vue {
}
}
.add {
width: 34px;
height: 34px;
...
...
@@ -163,5 +177,4 @@ export default class TextArray extends Vue {
cursor: pointer;
margin: 10px 0;
}
</
style
>
src/components/editTemplate/form/VideoForm.vue
View file @
65529b8a
...
...
@@ -32,11 +32,7 @@
@
change=
"fileChange"
/>
<!-- 视频预览 -->
<common-dialog
v-if=
"showVideo"
@
closePopup=
"showVideo = false"
showMask
>
<common-dialog
v-if=
"showVideo"
@
closePopup=
"showVideo = false"
showMask
>
<div>
<video
controls=
"controls"
style=
"outline: none"
:src=
"Vurl"
></video>
</div>
...
...
@@ -79,7 +75,9 @@ export default {
created
()
{
// 数据回显
if
(
Array
.
isArray
(
this
.
property
.
value
))
{
this
.
property
.
value
=
this
.
property
.
value
.
filter
(
item
=>
item
.
value
!==
''
);
this
.
property
.
value
=
this
.
property
.
value
.
filter
(
(
item
)
=>
item
.
value
!==
""
);
}
if
(
this
.
property
.
value
.
length
>
0
&&
this
.
isFlag
)
{
this
.
isFlag
=
false
;
...
...
@@ -126,11 +124,28 @@ export default {
},
// 删除当前视频||终止上传
termination
(
index
)
{
if
(
xhr
)
{
xhr
.
abort
();
}
this
.
hashList
.
splice
(
index
,
1
);
this
.
locaVideos
.
splice
(
index
,
1
);
this
.
$confirm
(
"此操作将永久删除该文件, 是否继续?"
,
"提示"
,
{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
,
})
.
then
(()
=>
{
if
(
xhr
)
{
xhr
.
abort
();
}
this
.
hashList
.
splice
(
index
,
1
);
this
.
locaVideos
.
splice
(
index
,
1
);
this
.
$message
({
type
:
"success"
,
message
:
"删除成功!"
,
});
})
.
catch
(()
=>
{
this
.
$message
({
type
:
"info"
,
message
:
"已取消删除"
,
});
});
},
//
upFile
()
{
...
...
@@ -139,17 +154,26 @@ export default {
// 视频上传
fileChange
(
e
)
{
const
file
=
e
.
target
.
files
[
0
];
e
.
target
.
value
=
null
;
//清空值
if
(
!
file
)
return
;
// 限制相同文件的上传
const
state
=
this
.
locaVideos
.
some
((
item
)
=>
item
.
name
===
file
.
name
);
if
(
state
)
{
this
.
$message
({
message
:
"不可重复上传该视频文件"
,
type
:
"warning"
,
});
return
;
}
if
(
file
.
type
&&
file
.
type
.
indexOf
(
"video/"
)
>=
0
)
{
//
file.size单位为字节B
//
限制文件大小
if
(
file
.
size
>
20971520
)
{
this
.
$message
({
message
:
"上传视频
超过最大限制
"
,
message
:
"上传视频
大小不可超过20M
"
,
type
:
"warning"
,
});
return
;
}
e
.
target
.
value
=
""
;
this
.
UpladFile
(
file
);
}
else
{
this
.
$message
({
...
...
@@ -174,6 +198,7 @@ export default {
var
that
=
this
;
// 防止xhr改变this指向
xhr
.
upload
.
onprogress
=
function
(
event
)
{
if
(
event
.
lengthComputable
)
{
// 上传相同文件会进入这里
const
state
=
that
.
locaVideos
.
some
((
item
)
=>
item
.
name
===
file
.
name
);
if
(
state
)
{
// 存在
...
...
@@ -200,6 +225,11 @@ export default {
uploadComplete
(
xhr
)
{
//服务断接收完文件返回的结果
this
.
hashList
.
push
(
JSON
.
parse
(
xhr
.
target
.
response
).
data
.
hash
);
console
.
log
(
this
.
hashList
);
this
.
$message
({
type
:
"success"
,
message
:
"上传成功!"
,
});
this
.
locaVideos
[
this
.
locaVideos
.
length
-
1
].
url
=
JSON
.
parse
(
xhr
.
target
.
response
).
data
.
url
;
...
...
@@ -247,7 +277,7 @@ export default {
width: 151px;
background: #f6f6f7;
border-radius: 4px;
border: 1px solid #
DCDFE
6;
border: 1px solid #
dcdfe
6;
color: #353535;
line-height: 36px;
text-align: center;
...
...
src/components/newProductList/IncrementalDataList.vue
View file @
65529b8a
...
...
@@ -28,28 +28,42 @@
</div>
<span
class=
"content-number"
>
{{
serialNumber
(
index
)
}}
</span>
</li>
<li
class=
"content-name"
@
click=
"showProduct(item, index)"
>
{{
item
.
name
}}
</li>
<li
class=
"content-name"
@
click=
"showProduct(item, index)"
>
{{
item
.
name
}}
</li>
<li
class=
"content-time"
>
{{
item
.
update_time
|
formatTime
}}
</li>
<li
class=
"content-chain"
>
<div
class=
"content-the-above-link"
v-if=
"item.status === 2"
>
已上链
</div>
<div
class=
"content-the-above-link"
v-if=
"item.status === 2"
>
已上链
</div>
<div
class=
"content-on-the-chain"
v-if=
"item.status === 0"
@
click=
"$emit('upload', item)"
>
点击上链
</div>
>
点击上链
</div>
<div
v-if=
"item.status === 1"
class=
"content-status-ing"
>
上链中
</div>
<div
v-if=
"item.status === 3"
class=
"content-status--fail"
@
click=
"$emit('upload', item)"
>
上链失败
</div>
<div
v-if=
"item.status === 4"
class=
"content-the-above-link"
>
隐藏中
</div>
<div
v-if=
"item.status === 5"
class=
"content-the-above-link"
>
已隐藏
</div>
>
上链失败
</div>
<div
v-if=
"item.status === 4"
class=
"content-the-above-link"
>
隐藏中
</div>
<div
v-if=
"item.status === 5"
class=
"content-the-above-link"
>
已隐藏
</div>
<div
v-if=
"item.status === 6"
class=
"content-status--fail"
@
click=
"$emit('privacy-settings', item)"
>
隐藏失败
</div>
>
隐藏失败
</div>
</li>
<li
class=
"content-qrcode"
>
<div
class=
"content-code-box"
>
...
...
@@ -68,7 +82,9 @@
<img
:src=
"QRcode"
/>
</div>
<div
class=
"imgbox"
v-else
>
<img
src=
"https://f10.baidu.com/it/u=557133877,2120362237&fm=72"
/>
<img
src=
"https://f10.baidu.com/it/u=557133877,2120362237&fm=72"
/>
</div>
<p
@
click=
"QRdownload(item)"
>
下载二维码
</p>
<p
class=
"copy-address"
@
click=
"CopyAddress(item)"
>
复制地址
</p>
...
...
@@ -89,7 +105,11 @@
]"
></i>
<!-- 浮动弹框 -->
<ul
class=
"set-menu block-ul"
v-if=
"checkBlock === index"
@
mousedown
.
stop
>
<ul
class=
"set-menu block-ul"
v-if=
"checkBlock === index"
@
mousedown
.
stop
>
<li
@
click=
"handleChain(item)"
>
查看区块链
</li>
<li
@
click=
"CopyAddress(item)"
>
复制存证地址
</li>
</ul>
...
...
@@ -98,7 +118,10 @@
</li>
<li
class=
"content-set"
>
<div
class=
"set-btn_wrapper"
>
<i
@
click
.
stop=
"openSet(item, index)"
class=
"iconfont icongengduocaozuo"
></i>
<i
@
click
.
stop=
"openSet(item, index)"
class=
"iconfont icongengduocaozuo"
></i>
<ul
class=
"set-menu"
v-if=
"checkSet === index"
@
mousedown
.
stop
>
<li
v-if=
"item.status === 2 || item.status === 6"
...
...
@@ -106,20 +129,28 @@
$emit('privacy-settings', item);
checkSet = -1;
"
>
隐私设置
</li>
<li
v-if=
"item.status === 2"
@
click=
"increment(item, index)"
>
增量更新
</li>
>
隐私设置
</li>
<li
v-if=
"item.status === 2"
@
click=
"increment(item, index)"
>
增量更新
</li>
<li
@
click=
"
$emit('create-copy', item);
checkSet = -1;
"
>
创建副本
</li>
>
创建副本
</li>
<li
@
click=
"
$emit('delete-goods', item);
checkSet = -1;
"
>
删除
</li>
>
删除
</li>
</ul>
</div>
</li>
...
...
@@ -128,7 +159,11 @@
style=
"width: 100%; overflow-y: auto; max-height: 250px"
v-show=
"expandTheListIndex === index"
>
<ul
class=
"incremental-list"
v-for=
"(item2, index2) in item.incrementList"
:key=
"index2"
>
<ul
class=
"incremental-list"
v-for=
"(item2, index2) in item.incrementList"
:key=
"index2"
>
<li
class=
"incremental-icon"
>
<i
class=
"iconfont"
...
...
@@ -137,7 +172,12 @@
]"
></i>
</li>
<li
class=
"incremental-name"
@
click=
"enterDetails(item2, item, index)"
>
{{
item2
.
name
}}
</li>
<li
class=
"incremental-name"
@
click=
"enterDetails(item2, item, index)"
>
{{
item2
.
name
|
stringCutting
(
7
)
}}
</li>
<li
class=
"incremental-time"
>
{{
item2
.
update_time
|
formatTime
}}
</li>
<li
class=
"incremental-state"
>
<span
v-if=
"item2.status === 2"
class=
"state-ban"
>
已上链
</span>
...
...
@@ -145,7 +185,8 @@
v-if=
"item2.status === 0"
class=
"state-start"
@
click=
"$emit('incremental-chain', item2, item)"
>
点击上链
</span>
>
点击上链
</span
>
<span
v-if=
"item2.status === 1"
class=
"state-ing"
>
上链中
</span>
<span
v-if=
"item2.status === 3"
class=
"state-fail"
>
上链失败
</span>
<span
v-if=
"item2.status === 5"
class=
"state-ing"
>
已隐藏
</span>
...
...
@@ -159,7 +200,8 @@
:class=
"
{
'span-ban': item2.status === 1 || item2.status === 2,
}"
>删除
</span>
>删除
</span
>
<span
class=
"span-ban"
>
复制
</span>
</div>
</li>
...
...
@@ -179,11 +221,11 @@ export default {
checkBlock
:
-
1
,
checkSet
:
-
1
,
expandTheListIndex
:
-
1
,
QRcode
:
""
// 二维码路劲
QRcode
:
""
,
// 二维码路劲
};
},
watch
:
{
getInfoList
:
function
(
newv
,
oldv
)
{
getInfoList
:
function
(
newv
,
oldv
)
{
this
.
expandTheListIndex
=
-
1
;
if
(
this
.
$store
.
state
.
theAnchor
!=
-
1
)
{
this
.
expandTheList
(
...
...
@@ -191,23 +233,23 @@ export default {
this
.
$store
.
state
.
theAnchor
);
}
}
}
,
},
computed
:
{
// 获取存证信息列表
getInfoList
:
function
()
{
getInfoList
:
function
()
{
return
this
.
$store
.
state
.
listOfInformation
;
},
// 获取当前页码
getPage
:
function
()
{
getPage
:
function
()
{
return
this
.
$store
.
state
.
page
;
},
// 序号
serialNumber
:
function
(
index
)
{
return
function
(
index
)
{
serialNumber
:
function
(
index
)
{
return
function
(
index
)
{
return
(
this
.
getPage
-
1
)
*
10
+
(
index
+
1
);
};
}
}
,
},
methods
:
{
increment
(
item
,
index
)
{
...
...
@@ -223,8 +265,8 @@ export default {
query
:
{
personalTemplateId
:
item
.
id
,
//父级id
personalTemplateName
:
item
.
name
,
// 父级name
childId
:
item2
.
id
// 当前存证id
}
childId
:
item2
.
id
,
// 当前存证id
}
,
});
},
// 展开增量数据列表
...
...
@@ -239,8 +281,8 @@ export default {
params
:
{
base_hash
:
item
.
hash
,
page
:
1
,
page_size
:
10
}
page_size
:
10
,
}
,
});
if
(
res
)
{
let
list
=
res
.
data
.
results
;
...
...
@@ -269,7 +311,7 @@ export default {
document
.
body
.
removeChild
(
input
);
this
.
$message
({
message
:
"复制成功,请右键粘贴使用"
,
type
:
"success"
type
:
"success"
,
});
},
// 二维码下载
...
...
@@ -295,8 +337,8 @@ export default {
this
.
$router
.
push
({
path
:
"/editTemplate"
,
query
:
{
personalTemplateId
:
item
.
id
}
personalTemplateId
:
item
.
id
,
}
,
});
},
openSet
(
item
,
index
)
{
...
...
@@ -316,8 +358,8 @@ export default {
this
.
checkQR
=
index
;
this
.
QRcode
=
await
getQR
(
item
.
hash
);
document
.
addEventListener
(
"mousedown"
,
this
.
onHindMenu
);
}
}
}
,
}
,
};
</
script
>
...
...
src/components/signin/emailLogin.vue
View file @
65529b8a
...
...
@@ -4,55 +4,64 @@
<h1>
邮箱登录
</h1>
<div
class=
"tip"
>
您还可以进行
<span
@
click=
"changeLogin"
>
{{
loginMethod
}}
</span>
登录
<span
@
click=
"changeLogin"
>
{{
loginMethod
}}
</span
>
登录
</div>
<div>
<el-input
placeholder=
"请输入邮箱地址"
class=
"input-box"
v-model
.
trim=
"email"
@
input=
"email
=email.replace(/[\u4e00-\u9fa5]/ig,
'')"
@
input=
"email
= email.replace(/[\u4e00-\u9fa5]/gi,
'')"
/>
<!-- code输入框 -->
<div
class=
"el-input input-box input-box__code"
v-if=
"loginType
===
1"
>
<div
class=
"el-input input-box input-box__code"
v-if=
"loginType
===
1"
>
<input
type=
"text"
maxlength=
"9"
autocomplete=
"off"
v-model
.
trim=
"code"
@
input=
"code
=code.replace(/[^\d]/g,
'')"
@
input=
"code
= code.replace(/[^\d]/g,
'')"
class=
"el-input__inner"
placeholder=
"请输入邮箱验证码"
/>
<div
class=
"btn
"
:class=
"
{ btn: true, 'btn-js__active': curIntervalSeconds === 0 }
"
@click="getCode"
>
{{
curIntervalSeconds
===
0
?
'发送验证码'
:
curIntervalSeconds
+
'秒后重新发送'
}}
</div>
>
{{
curIntervalSeconds
===
0
?
"发送验证码"
:
curIntervalSeconds
+
"秒后重新发送"
}}
</div>
</div>
<!-- 密码输入框 -->
<div
class=
"el-input input-box input-password"
v-if=
"loginType
===
0"
>
<div
class=
"el-input input-box input-password"
v-if=
"loginType
===
0"
>
<input
:type=
"[openOrClose
?'password':
'text']"
:type=
"[openOrClose
? 'password' :
'text']"
maxlength=
"30"
autocomplete=
"off"
v-model
.
trim=
"password"
@
input=
"password
=password.replace(/[\u4e00-\u9fa5]/ig,
'')"
@
input=
"password
= password.replace(/[\u4e00-\u9fa5]/gi,
'')"
class=
"el-input__inner"
placeholder=
"请输入密码"
/>
<div
class=
"icon"
@
click=
"changeOpen"
>
<i
class=
"iconfont"
:class=
"[openOrClose
?'iconYJ':
'iconYC']"
></i>
<i
class=
"iconfont"
:class=
"[openOrClose
? 'iconYJ' :
'iconYC']"
></i>
</div>
</div>
<!-- 底部登录按钮 -->
<div
class=
"sign-in-btn"
@
click=
"loginStart"
>
登录
</div>
<!-- 记住密码or设置密码等 -->
<div
class=
"operation-box"
v-if=
"loginType
===
0"
>
<div
class=
"operation-box"
v-if=
"loginType
===
0"
>
<div
class=
"left-link-zone"
>
<el-checkbox
v-model=
"isAutoLogin"
>
记住密码
</el-checkbox>
</div>
<div
class=
"right-link-zone"
>
<a
href=
"javascript:void(0)"
class=
"set-up"
@
click=
"SetPassword(2)"
>
设置密码
</a>
<a
href=
"javascript:void(0)"
class=
"set-up"
@
click=
"SetPassword(2)"
>
设置密码
</a
>
<a
href=
"javascript:void(0)"
@
click=
"SetPassword(3)"
>
忘记密码
</a>
</div>
</div>
...
...
@@ -291,6 +300,9 @@ export default {
background: rgba(244, 244, 244, 1);
border-radius: 3px;
}
.btn-js__active {
color: #3f79fe;
}
}
.input-password {
position: relative;
...
...
src/components/signin/phoneLogin.vue
View file @
65529b8a
...
...
@@ -4,7 +4,8 @@
<h1>
手机登录
</h1>
<div
class=
"tip"
>
您还可以进行
<span
@
click=
"changeLogin"
>
{{
loginMethod
}}
</span>
登录
<span
@
click=
"changeLogin"
>
{{
loginMethod
}}
</span
>
登录
</div>
<div>
<el-input
...
...
@@ -12,48 +13,56 @@
class=
"input-box"
v-model
.
trim=
"phone"
maxlength=
"11"
@
input=
"phone
=phone.replace(/[^\d]/g,
'')"
@
input=
"phone
= phone.replace(/[^\d]/g,
'')"
/>
<!-- code输入框 -->
<div
class=
"el-input input-box input-box__code"
v-if=
"loginType
===
1"
>
<div
class=
"el-input input-box input-box__code"
v-if=
"loginType
===
1"
>
<input
type=
"text"
maxlength=
"9"
autocomplete=
"off"
v-model
.
trim=
"code"
@
input=
"code
=code.replace(/[^\d]/g,
'')"
@
input=
"code
= code.replace(/[^\d]/g,
'')"
class=
"el-input__inner"
placeholder=
"请输入短信验证码"
/>
<div
class=
"btn
"
:class=
"
{ btn: true, 'btn-js__active': curIntervalSeconds === 0 }
"
@click="getCode"
>
{{
curIntervalSeconds
===
0
?
'发送验证码'
:
curIntervalSeconds
+
'秒后重新发送'
}}
</div>
>
{{
curIntervalSeconds
===
0
?
"发送验证码"
:
curIntervalSeconds
+
"秒后重新发送"
}}
</div>
</div>
<!-- 密码输入框 -->
<div
class=
"el-input input-box input-password"
v-if=
"loginType
===
0"
>
<div
class=
"el-input input-box input-password"
v-if=
"loginType
===
0"
>
<input
:type=
"[openOrClose
?'password':
'text']"
:type=
"[openOrClose
? 'password' :
'text']"
maxlength=
"30"
autocomplete=
"off"
v-model
.
trim=
"password"
@
input=
"password
=password.replace(/[\u4e00-\u9fa5]/ig,
'')"
@
input=
"password
= password.replace(/[\u4e00-\u9fa5]/gi,
'')"
class=
"el-input__inner"
placeholder=
"请输入密码"
/>
<div
class=
"icon"
@
click=
"changeOpen"
>
<i
class=
"iconfont"
:class=
"[openOrClose
?'iconYJ':
'iconYC']"
></i>
<i
class=
"iconfont"
:class=
"[openOrClose
? 'iconYJ' :
'iconYC']"
></i>
</div>
</div>
<!-- 底部登录按钮 -->
<div
class=
"sign-in-btn"
@
click=
"loginStart"
>
登录
</div>
<!-- 记住密码or设置密码等 -->
<div
class=
"operation-box"
v-if=
"loginType
===
0"
>
<div
class=
"operation-box"
v-if=
"loginType
===
0"
>
<div
class=
"left-link-zone"
>
<el-checkbox
v-model=
"isAutoLogin"
>
记住密码
</el-checkbox>
</div>
<div
class=
"right-link-zone"
>
<a
href=
"javascript:void(0)"
class=
"set-up"
@
click=
"SetPassword(0)"
>
设置密码
</a>
<a
href=
"javascript:void(0)"
class=
"set-up"
@
click=
"SetPassword(0)"
>
设置密码
</a
>
<a
href=
"javascript:void(0)"
@
click=
"SetPassword(1)"
>
忘记密码
</a>
</div>
</div>
...
...
@@ -297,6 +306,9 @@ export default {
background: rgba(244, 244, 244, 1);
border-radius: 3px;
}
.btn-js__active {
color: #3f79fe;
}
}
.input-password {
position: relative;
...
...
src/components/signin/setPassword.vue
View file @
65529b8a
<
template
>
<div>
<h1>
{{
title
}}
</h1>
<h1>
{{
title
}}
</h1>
<el-input
placeholder=
"请输入手机号"
class=
"input-box"
v-model=
"phone"
v-if=
"getType
===0||getType===
1"
v-if=
"getType
=== 0 || getType ===
1"
maxlength=
"11"
@
input=
"phone
=phone.replace(/[^\d]/g,
'')"
@
input=
"phone
= phone.replace(/[^\d]/g,
'')"
/>
<el-input
v-if=
"getType
===2||getType===
3"
v-if=
"getType
=== 2 || getType ===
3"
placeholder=
"请输入邮箱地址"
class=
"input-box"
v-model
.
trim=
"email"
@
blur=
"cheack"
@
input=
"email
=email.replace(/[\u4e00-\u9fa5]/ig,
'')"
@
input=
"email
= email.replace(/[\u4e00-\u9fa5]/gi,
'')"
/>
<!-- code输入框 -->
<div
class=
"el-input input-box input-box__code"
v-if=
"getType===0||getType===1"
>
<div
class=
"el-input input-box input-box__code"
v-if=
"getType === 0 || getType === 1"
>
<input
type=
"text"
maxlength=
"9"
autocomplete=
"off"
v-model=
"code"
@
input=
"code
=code.replace(/[^\d]/g,
'')"
@
input=
"code
= code.replace(/[^\d]/g,
'')"
class=
"el-input__inner"
placeholder=
"请输入短信验证码"
/>
<div
class=
"btn
"
:class=
"
{ btn: true, 'btn-js__active': curIntervalSeconds === 0 }
"
@click="getCode"
>
{{
curIntervalSeconds
===
0
?
'发送验证码'
:
curIntervalSeconds
+
'秒后重新发送'
}}
</div>
>
{{
curIntervalSeconds
===
0
?
"发送验证码"
:
curIntervalSeconds
+
"秒后重新发送"
}}
</div>
</div>
<div
class=
"el-input input-box input-box__code"
v-if=
"getType===2||getType===3"
>
<div
class=
"el-input input-box input-box__code"
v-if=
"getType === 2 || getType === 3"
>
<input
type=
"text"
maxlength=
"9"
autocomplete=
"off"
v-model
.
trim=
"code"
@
input=
"code
=code.replace(/[^\d]/g,
'')"
@
input=
"code
= code.replace(/[^\d]/g,
'')"
class=
"el-input__inner"
placeholder=
"请输入邮箱验证码"
/>
<div
class=
"btn
"
:class=
"
{ btn: true, 'btn-js__active': curIntervalSeconds === 0 }
"
@click="getEmailCode"
>
{{
curIntervalSeconds
===
0
?
'发送验证码'
:
curIntervalSeconds
+
'秒后重新发送'
}}
</div>
>
{{
curIntervalSeconds
===
0
?
"发送验证码"
:
curIntervalSeconds
+
"秒后重新发送"
}}
</div>
</div>
<!-- 密码输入框 -->
<div
class=
"el-input input-box input-password"
>
<input
:type=
"[openOrClose1
?'password':
'text']"
:type=
"[openOrClose1
? 'password' :
'text']"
maxlength=
"30"
autocomplete=
"off"
v-model
.
trim=
"passwordOne"
@
input=
"passwordOne
=passwordOne.replace(/[\u4e00-\u9fa5]/ig,
'')"
@
input=
"passwordOne
= passwordOne.replace(/[\u4e00-\u9fa5]/gi,
'')"
class=
"el-input__inner"
placeholder=
"请输入密码"
/>
<div
class=
"icon"
@
click=
"changeOpen1"
>
<i
class=
"iconfont"
:class=
"[openOrClose1
?'iconYJ':
'iconYC']"
></i>
<i
class=
"iconfont"
:class=
"[openOrClose1
? 'iconYJ' :
'iconYC']"
></i>
</div>
</div>
<div
class=
"el-input input-box input-password"
>
<input
:type=
"[openOrClose2
?'password':
'text']"
:type=
"[openOrClose2
? 'password' :
'text']"
maxlength=
"30"
autocomplete=
"off"
v-model
.
trim=
"passwordTwo"
@
input=
"passwordTwo
=passwordTwo.replace(/[\u4e00-\u9fa5]/ig,
'')"
@
input=
"passwordTwo
= passwordTwo.replace(/[\u4e00-\u9fa5]/gi,
'')"
class=
"el-input__inner"
placeholder=
"请再次确认密码"
/>
<div
class=
"icon"
@
click=
"changeOpen2"
>
<i
class=
"iconfont"
:class=
"[openOrClose2
?'iconYJ':
'iconYC']"
></i>
<i
class=
"iconfont"
:class=
"[openOrClose2
? 'iconYJ' :
'iconYC']"
></i>
</div>
</div>
<div
class=
"sign-in-btn"
@
click=
"setPassword"
>
{{
title
}}
</div>
<div
class=
"sign-in-btn"
@
click=
"setPassword"
>
{{
title
}}
</div>
<div
class=
"sign-in-btn--bgw"
@
click=
"goback"
>
返回登录
</div>
</div>
</
template
>
...
...
@@ -423,6 +441,9 @@ h1 {
background: rgba(244, 244, 244, 1);
border-radius: 3px;
}
.btn-js__active {
color: #3f79fe;
}
}
.sign-in-btn {
width: 441px;
...
...
src/entry/sy/views/Home.vue
View file @
65529b8a
...
...
@@ -82,7 +82,11 @@
</section>
<!-- 主页第二个模块 我们的优势 -->
<section
class=
"home-2"
>
<img
class=
"home-2-icon"
src=
"../../../assets/images/Home/home-2-icon.png"
alt
/>
<img
class=
"home-2-icon"
src=
"../../../assets/images/Home/home-2-icon.png"
alt
/>
<span
class=
"home-title"
>
我们的优势
</span>
<div
class=
"home-2-in"
>
<div
class=
"content"
>
...
...
@@ -179,7 +183,7 @@
<span
class=
"home-5-text"
>
不需要注册和审批只需手机登录就可以直接使用
</span
>
<span
class=
"home-5-btn cursor-pointer"
@
click=
"
$router.push(`/login`
)"
<span
class=
"home-5-btn cursor-pointer"
@
click=
"
toLoginPanel(
)"
>
免费使用
</span
>
</section>
...
...
@@ -227,8 +231,9 @@
</
template
>
<
script
lang=
"ts"
>
import
{
Vue
}
from
"vue-property-decorator"
;
import
{
Component
,
Vue
}
from
"vue-property-decorator"
;
let
UrlPrefixObj
=
require
(
"@/config/UrlPrefix"
);
@
Component
({})
export
default
class
Home
extends
Vue
{
public
featuresContent
=
[
{
text
:
`产品资料隐私性`
},
...
...
src/utils/tool/filter.ts
View file @
65529b8a
...
...
@@ -36,9 +36,18 @@ export let formatTime = (timestamp: any, format: string = 'Y-M-D h:m:s') => {
return
format
;
}
// 字符串切割
export
function
stringCutting
(
str
:
string
,
length
:
number
)
{
if
(
str
.
length
>
length
)
{
return
`
${
str
.
substr
(
0
,
length
)}
...`
;
}
else
{
return
str
;
}
}
const
globalFilters
=
(
Vue
:
typeof
_Vue
)
=>
{
Vue
.
filter
(
'filterPhone'
,
filterPhone
)
Vue
.
filter
(
'formatTime'
,
formatTime
)
Vue
.
filter
(
'stringCutting'
,
stringCutting
)
}
export
default
globalFilters
\ No newline at end of file
src/views/template/editTemplate.vue
View file @
65529b8a
...
...
@@ -45,8 +45,9 @@
v-for="(item, index) in existingEvidenceList"
:key="index"
@click="DataHandover(item, index)"
:title="item.name"
>
{{
item
.
name
}}
{{
item
.
name
|
stringCutting
(
7
)
}}
<i
class=
"iconfont iconwsmp-bianji"
v-show=
"item.status === 0"
...
...
@@ -273,7 +274,7 @@ export default class editTemplate extends Vue {
public
isShowBar
:
boolean
=
false
;
// 展开右栏
public
isShowBanner
=
false
;
//banner图组件显示or隐藏
public
SelectTemplateShow
:
Boolean
=
false
;
// 选择模板显示or隐藏
public
personalTemplateId
:
string
=
''
;
//个人存证id
public
personalTemplateId
:
string
=
""
;
//个人存证id
public
saveState
:
Number
=
0
;
// 保存存证需要的状态
public
ShowPastData
:
Boolean
=
false
;
// 显示过往数据
public
isShowToChainDialog
:
Boolean
=
false
;
//控制上链弹窗显示or隐藏
...
...
@@ -284,8 +285,8 @@ export default class editTemplate extends Vue {
public
isModifyTitleShow
:
Boolean
=
false
;
//修改标题
public
modifyFormsShow
:
Boolean
=
false
;
// 改变表现形式
public
existingEvidenceList
:
any
=
[];
//增量数据列表
public
checkId
:
string
=
''
;
public
incrementId
:
string
=
''
;
public
checkId
:
string
=
""
;
public
incrementId
:
string
=
""
;
public
isShowAddRootDialog
:
boolean
=
false
;
public
displayData
:
any
=
[];
public
TemplateType
:
number
=
0
;
...
...
@@ -589,8 +590,8 @@ export default class editTemplate extends Vue {
await
this
.
fileHandler
();
var
newDetail
=
new
Array
();
newDetail
=
formatApiJson
(
this
.
rootUnitList
);
// return
console
.
log
(
newDetail
);
// return
;
// 更新ext数据
for
(
let
index
=
0
;
index
<
newDetail
.
length
;
index
++
)
{
const
element
=
newDetail
[
index
];
...
...
@@ -762,13 +763,13 @@ export default class editTemplate extends Vue {
child
.
startEdit
();
this
.
displayData
=
[];
this
.
incrementId
=
item
.
id
;
this
.
personalTemplateId
=
''
;
this
.
personalTemplateId
=
""
;
this
.
getincrement
(
item
.
id
);
this
.
saveState
=
2
;
}
else
{
// 切换至第一条数据
this
.
personalTemplateId
=
item
.
id
;
this
.
incrementId
=
''
;
this
.
incrementId
=
""
;
this
.
ShowPastData
=
true
;
this
.
saveState
=
1
;
this
.
information
(
2
);
...
...
@@ -811,7 +812,7 @@ export default class editTemplate extends Vue {
}
// 上链请求
async
uploadConfirm
()
{
this
.
incrementId
===
''
this
.
incrementId
===
""
?
this
.
witnessTheChain
()
:
this
.
incrementWitnessTheChain
();
}
...
...
src/views/template/readOnly.vue
View file @
65529b8a
...
...
@@ -12,7 +12,7 @@
<div
class=
"info-content"
v-if=
"item2.type === 0"
>
{{
item2
.
data
.
value
}}
</div>
<div
class=
"info-content"
v-if=
"item2.type === 10"
>
<div
class=
"info-content
info-content--area
"
v-if=
"item2.type === 10"
>
{{
item2
.
data
.
value
}}
</div>
<!-- 选择器 -->
...
...
@@ -82,7 +82,7 @@
v-for=
"(item3, index3) in item2.data"
:key=
"index3"
>
<img
:src=
"item3.value"
/>
<img
:src=
"item3.value"
/>
<div
class=
"ibox"
@
click=
"displayPicture(item3.value)"
>
<i
class=
"iconfont iconfangda"
></i>
</div>
...
...
@@ -90,23 +90,31 @@
</div>
<!-- 图片链接 -->
<div
class=
"info-content"
v-if=
"item2.type === 13"
>
<div
class=
"imgbox"
v-for=
"(item3, index) in item2.data"
:key=
"index"
>
<img
:src=
"item3.value"
/>
<div
class=
"imgbox"
v-for=
"(item3, index) in item2.data"
:key=
"index"
>
<img
:src=
"item3.value"
/>
<div
class=
"ibox"
@
click=
"displayPicture(item3.value)"
>
<i
class=
"iconfont iconfangda"
></i>
</div>
</div>
</div>
<!-- JSON -->
<!--
<div
class=
"info-content"
v-if=
"item2.type === 12"
>
-->
<!--
<div
class=
"jsonbox"
v-for=
"(item3, index) in jsons"
:key=
"index"
>
-->
<!--
<div
class=
"key"
>
{{
item3
.
key
}}
:
</div>
-->
<!--
<div
class=
"value"
>
{{
item3
.
value
}}
</div>
-->
<!--
</div>
-->
<!--
</div>
-->
<!--
<div
class=
"info-content"
v-if=
"item2.type === 12"
>
-->
<!--
<div
class=
"jsonbox"
v-for=
"(item3, index) in jsons"
:key=
"index"
>
-->
<!--
<div
class=
"key"
>
{{
item3
.
key
}}
:
</div>
-->
<!--
<div
class=
"value"
>
{{
item3
.
value
}}
</div>
-->
<!--
</div>
-->
<!--
</div>
-->
<!-- 文本数组 -->
<div
class=
"info-content"
v-if=
"item2.type === 14"
>
<div
class=
"textbox"
v-for=
"(item3, index) in item2.data"
:key=
"index"
>
<div
class=
"textbox"
v-for=
"(item3, index) in item2.data"
:key=
"index"
>
<div
class=
"value"
>
{{
item3
.
value
}}
</div>
</div>
</div>
...
...
@@ -142,7 +150,7 @@ export default {
Magnifier
:
false
,
// 图片放大器组件
List
:
[],
// 展示用数据组
pcUrl
:
""
,
jsons
:
[]
// JSON 类型时的展示数据
jsons
:
[]
,
// JSON 类型时的展示数据
};
},
computed
:
{},
...
...
@@ -206,7 +214,7 @@ export default {
}
else
if
(
element
.
type
===
1
)
{
// 图片
if
(
Array
.
isArray
(
element
.
data
))
{
element
.
data
=
element
.
data
.
filter
(
item
=>
item
.
value
!==
''
);
element
.
data
=
element
.
data
.
filter
(
(
item
)
=>
item
.
value
!==
""
);
}
for
(
let
index2
=
0
;
index2
<
element
.
data
.
length
;
index2
++
)
{
const
img
=
element
.
data
[
index2
].
value
;
...
...
@@ -234,26 +242,25 @@ export default {
if
(
index2
===
element
.
data
.
length
-
1
)
this
.
$forceUpdate
();
}
}
else
if
(
element
.
type
===
12
)
{
let
jsondata
=
JSON
.
parse
(
element
.
data
.
value
||
'{}'
);
let
jsondata
=
JSON
.
parse
(
element
.
data
.
value
||
"{}"
);
let
list
=
[];
for
(
let
i
in
jsondata
)
{
list
.
push
({
type
:
0
,
label
:
i
,
key
:
''
,
key
:
""
,
data
:
{
value
:
jsondata
[
i
],
format
:
"string"
,
type
:
"text"
}
})
type
:
"text"
,
}
,
})
;
}
element
.
data
=
list
;
// this.$forceUpdate();
}
else
if
(
element
.
type
===
13
)
{
if
(
Array
.
isArray
(
element
.
data
))
{
element
.
data
=
element
.
data
.
filter
(
item
=>
item
.
value
!==
''
);
element
.
data
=
element
.
data
.
filter
(
(
item
)
=>
item
.
value
!==
""
);
}
}
}
...
...
@@ -371,6 +378,9 @@ li {
overflow: hidden;
max-width: calc(100% - 110px);
color: rgba(53, 53, 53, 1);
a {
color: rgba(63, 121, 254, 1);
}
.info-content--video {
margin-bottom: 24px;
video {
...
...
@@ -384,7 +394,7 @@ li {
border: 1px solid rgba(235, 235, 235, 1);
float: left;
position: relative;
margin-bottom:
0
;
margin-bottom:
6px
;
margin-right: 6px;
&:hover {
.ibox {
...
...
@@ -415,7 +425,8 @@ li {
.jsonbox {
display: flex;
.key, .value {
.key,
.value {
margin-bottom: 10px;
}
...
...
@@ -433,6 +444,11 @@ li {
}
}
}
.info-content--area {
word-wrap: break-word;
white-space: pre-wrap;
}
.info-content--two {
background: rgba(249, 249, 249, 1);
}
...
...
vue.config.js
View file @
65529b8a
let
UrlPrefixObj
=
require
(
'./src/config/UrlPrefix.js'
)
module
.
exports
=
{
publicPath
:
"./"
,
//相对路径
outputDir
:
'sy'
,
configureWebpack
:
{
},
...
...
@@ -10,7 +10,7 @@ module.exports = {
open
:
true
,
proxy
:
{
'^/api'
:
{
target
:
'http://172.16.101.87:467
89
/'
,
target
:
'http://172.16.101.87:467
90
/'
,
pathRewrite
:
{
'^/api'
:
''
,
},
...
...
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