Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
96c53328
Commit
96c53328
authored
Dec 22, 2021
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
0546af81
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
21 deletions
+45
-21
common.js
src/api/common/common.js
+6
-2
contractConfirm.vue
src/pages/contractConfirm.vue
+7
-4
contractSign.vue
src/pages/contractSign.vue
+29
-14
contractManage.vue
src/pages/sale/contractManage.vue
+3
-1
No files found.
src/api/common/common.js
View file @
96c53328
...
...
@@ -26,7 +26,7 @@ export function CommonConfig() {
return
{
FileConfig
:
{
FileUrl
:
'http://192.168.10.214:8130'
,
//本地服务器文件预览地址
UploadUrl
:
"http://192.168.10.214:8120"
,
//本地上传文件地址
UploadUrl
:
'http://192.168.10.214:8120'
}
}
...
...
@@ -250,6 +250,9 @@ export function UploadFileToSystem(uploadConfig, fileFullPath, fileObj, uploadLo
if
(
configObj
.
isOcr
&&
configObj
.
isOcr
==
1
)
{
url
+=
"&ocr=1"
}
if
(
configObj
.
isTencentOcr
&&
configObj
.
isTencentOcr
==
1
)
{
url
+=
"&isTencentOcr=1"
}
}
let
formData
=
new
FormData
()
formData
.
append
(
'myfile'
,
fileObj
)
...
...
@@ -269,7 +272,8 @@ export function UploadFileToSystem(uploadConfig, fileFullPath, fileObj, uploadLo
FileName
:
fileObj
.
name
,
FileUrl
:
uploadConfig
.
CustomDomain
+
jsonObj
.
FilePath
,
VideoCoverImg
:
uploadConfig
.
CustomDomain
+
jsonObj
.
VideoCoverImg
,
ExtFile
:
tempArray
ExtFile
:
tempArray
,
Message
:
jsonObj
.
Message
}
if
(
successCall
)
{
...
...
src/pages/contractConfirm.vue
View file @
96c53328
...
...
@@ -781,6 +781,7 @@
import
{
GetEducationContractInfo
}
from
'../api/sale/contract'
import
{
Encrypt
,
Decrypt
}
from
'../utils/encrypt'
export
default
{
data
()
{
...
...
@@ -795,8 +796,9 @@
};
},
created
()
{
if
(
this
.
$route
.
query
.
ContractId
)
{
this
.
gmsg
.
ContractId
=
this
.
$route
.
query
.
ContractId
;
if
(
this
.
$route
.
query
.
a
)
{
let
ContractId
=
Decrypt
(
decodeURIComponent
(
this
.
$route
.
query
.
a
));
this
.
gmsg
.
ContractId
=
ContractId
;
this
.
getList
();
}
else
{
this
.
gmsg
.
ContractId
=
7
;
...
...
@@ -820,8 +822,9 @@
this
.
$router
.
push
({
path
:
'/contractSign'
,
query
:
{
ContractId
:
this
.
gmsg
.
ContractId
,
Money
:
this
.
dataList
.
Money
a
:
encodeURIComponent
(
Encrypt
(
this
.
gmsg
.
ContractId
.
toString
())),
Money
:
this
.
dataList
.
Money
,
StudentName
:
this
.
dataList
.
StudentName
}
});
}
...
...
src/pages/contractSign.vue
View file @
96c53328
...
...
@@ -79,6 +79,7 @@
import
{
UploadSelfFile
}
from
'../api/common/common'
import
{
Encrypt
,
Decrypt
}
from
'../utils/encrypt'
export
default
{
...
...
@@ -101,7 +102,8 @@
BackMsg
:
{
Id
:
0
,
sign
:
''
}
},
StudentName
:
''
};
},
mounted
()
{
...
...
@@ -111,8 +113,12 @@
this
.
ctx
=
board
.
getContext
(
"2d"
);
// 二维绘图
this
.
ctx
.
strokeStyle
=
"#000"
;
// 颜色
this
.
ctx
.
lineWidth
=
5
;
// 线条宽度
if
(
this
.
$route
.
query
.
ContractId
)
{
this
.
msg
.
ContractId
=
this
.
$route
.
query
.
ContractId
;
if
(
this
.
$route
.
query
.
a
)
{
let
ContractId
=
Decrypt
(
decodeURIComponent
(
this
.
$route
.
query
.
a
));
this
.
msg
.
ContractId
=
ContractId
;
}
if
(
this
.
$route
.
query
.
StudentName
){
this
.
StudentName
=
this
.
$route
.
query
.
StudentName
}
if
(
this
.
$route
.
query
.
Money
)
{
this
.
Money
=
this
.
$route
.
query
.
Money
;
...
...
@@ -231,18 +237,30 @@
let
newArr
=
[];
var
fileName
=
`
${
_this
.
uuid
(
10
,
10
)}
.png`
;
var
path
=
`
/
assets/sign/`
;
var
path
=
`assets/sign/`
;
let
configObj
=
{
isOcr
:
1
is
Tencent
Ocr
:
1
}
newArr
.
push
(
_this
.
dataURLtoFile
(
_this
.
msg
.
Sign
,
fileName
));
console
.
log
(
newArr
[
0
],
'newArr[0]'
);
UploadSelfFile
(
path
,
newArr
[
0
],
x
=>
{
console
.
log
(
x
,
'xxxxxxx'
);
},
configObj
);
_this
.
SaveMsg
();
let
Msg
=
JSON
.
parse
(
x
.
Message
)
console
.
log
(
Msg
,
'msg'
);
if
(
Msg
&&
Msg
.
TextDetections
.
length
>
0
){
let
StuName
=
Msg
.
TextDetections
[
0
].
DetectedText
;
if
(
StuName
==
this
.
StudentName
){
_this
.
SaveMsg
();
}
else
{
_this
.
$q
.
notify
({
type
:
'negative'
,
position
:
"top"
,
message
:
`当前签名与合同主体不匹配请重新签名!`
})
_this
.
clearcanvas
();
return
}
}
},
configObj
)
};
};
},
...
...
@@ -294,9 +312,6 @@
//提交数据
SaveMsg
()
{
if
(
this
.
Type
==
1
)
{
console
.
log
(
this
.
msg
,
'msg'
);
console
.
log
(
this
.
base64ToBlob
(
this
.
msg
.
Sign
),
'Sign'
);
return
SetEducationContractSign
(
this
.
msg
).
then
(
res
=>
{
if
(
res
.
Code
==
1
)
{
this
.
$q
.
notify
({
...
...
@@ -365,7 +380,7 @@
this
.
$router
.
push
({
path
:
'/contractConfirm'
,
query
:
{
ContractId
:
this
.
msg
.
ContractId
a
:
encodeURIComponent
(
Encrypt
(
this
.
msg
.
ContractId
.
toString
())),
}
});
}
else
{
...
...
src/pages/sale/contractManage.vue
View file @
96c53328
...
...
@@ -264,6 +264,7 @@ import {
import
{
downloadLocalFile
}
from
"../../api/common/common"
;
import
eduinfoForm
from
"../../components/sale/eduinfo-form"
;
import
{
Encrypt
}
from
'../../utils/encrypt'
export
default
{
meta
:
{
title
:
"合同管理"
,
...
...
@@ -524,7 +525,8 @@ export default {
CopyUrl
(
item
)
{
var
oInput
=
document
.
createElement
(
"input"
);
var
url
=
window
.
location
.
host
;
oInput
.
value
=
url
+
"/#/contractConfirm"
+
`?ContractId=
${
item
.
Id
}
`
;
let
str
=
Encrypt
(
item
.
Id
.
toString
())
oInput
.
value
=
url
+
"/#/contractConfirm"
+
`?a=
${
encodeURIComponent
(
str
)}
`
;
document
.
body
.
appendChild
(
oInput
);
oInput
.
select
();
// 选择对象
document
.
execCommand
(
"Copy"
);
// 执行浏览器复制命令
...
...
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