Commit 96c53328 authored by zhengke's avatar zhengke

修改

parent 0546af81
...@@ -26,7 +26,7 @@ export function CommonConfig() { ...@@ -26,7 +26,7 @@ export function CommonConfig() {
return { return {
FileConfig: { FileConfig: {
FileUrl: 'http://192.168.10.214:8130', //本地服务器文件预览地址 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 ...@@ -250,6 +250,9 @@ export function UploadFileToSystem(uploadConfig, fileFullPath, fileObj, uploadLo
if (configObj.isOcr && configObj.isOcr == 1) { if (configObj.isOcr && configObj.isOcr == 1) {
url += "&ocr=1" url += "&ocr=1"
} }
if (configObj.isTencentOcr && configObj.isTencentOcr == 1) {
url += "&isTencentOcr=1"
}
} }
let formData = new FormData() let formData = new FormData()
formData.append('myfile', fileObj) formData.append('myfile', fileObj)
...@@ -269,7 +272,8 @@ export function UploadFileToSystem(uploadConfig, fileFullPath, fileObj, uploadLo ...@@ -269,7 +272,8 @@ export function UploadFileToSystem(uploadConfig, fileFullPath, fileObj, uploadLo
FileName: fileObj.name, FileName: fileObj.name,
FileUrl: uploadConfig.CustomDomain + jsonObj.FilePath, FileUrl: uploadConfig.CustomDomain + jsonObj.FilePath,
VideoCoverImg: uploadConfig.CustomDomain + jsonObj.VideoCoverImg, VideoCoverImg: uploadConfig.CustomDomain + jsonObj.VideoCoverImg,
ExtFile: tempArray ExtFile: tempArray,
Message: jsonObj.Message
} }
if (successCall) { if (successCall) {
......
...@@ -781,6 +781,7 @@ ...@@ -781,6 +781,7 @@
import { import {
GetEducationContractInfo GetEducationContractInfo
} from '../api/sale/contract' } from '../api/sale/contract'
import { Encrypt,Decrypt} from '../utils/encrypt'
export default { export default {
data() { data() {
...@@ -795,8 +796,9 @@ ...@@ -795,8 +796,9 @@
}; };
}, },
created() { created() {
if (this.$route.query.ContractId) { if (this.$route.query.a) {
this.gmsg.ContractId = this.$route.query.ContractId; let ContractId = Decrypt(decodeURIComponent(this.$route.query.a));
this.gmsg.ContractId = ContractId;
this.getList(); this.getList();
}else{ }else{
this.gmsg.ContractId = 7; this.gmsg.ContractId = 7;
...@@ -820,8 +822,9 @@ ...@@ -820,8 +822,9 @@
this.$router.push({ this.$router.push({
path: '/contractSign', path: '/contractSign',
query: { query: {
ContractId: this.gmsg.ContractId, a: encodeURIComponent(Encrypt(this.gmsg.ContractId.toString())),
Money:this.dataList.Money Money:this.dataList.Money,
StudentName:this.dataList.StudentName
} }
}); });
} }
......
...@@ -79,6 +79,7 @@ ...@@ -79,6 +79,7 @@
import { import {
UploadSelfFile UploadSelfFile
} from '../api/common/common' } from '../api/common/common'
import { Encrypt,Decrypt} from '../utils/encrypt'
export default { export default {
...@@ -101,7 +102,8 @@ ...@@ -101,7 +102,8 @@
BackMsg: { BackMsg: {
Id: 0, Id: 0,
sign: '' sign: ''
} },
StudentName:''
}; };
}, },
mounted() { mounted() {
...@@ -111,8 +113,12 @@ ...@@ -111,8 +113,12 @@
this.ctx = board.getContext("2d"); // 二维绘图 this.ctx = board.getContext("2d"); // 二维绘图
this.ctx.strokeStyle = "#000"; // 颜色 this.ctx.strokeStyle = "#000"; // 颜色
this.ctx.lineWidth = 5; // 线条宽度 this.ctx.lineWidth = 5; // 线条宽度
if (this.$route.query.ContractId) { if (this.$route.query.a) {
this.msg.ContractId = this.$route.query.ContractId; 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) { if (this.$route.query.Money) {
this.Money = this.$route.query.Money; this.Money = this.$route.query.Money;
...@@ -231,18 +237,30 @@ ...@@ -231,18 +237,30 @@
let newArr = []; let newArr = [];
var fileName = `${_this.uuid(10,10)}.png`; var fileName = `${_this.uuid(10,10)}.png`;
var path = `/assets/sign/`; var path = `assets/sign/`;
let configObj= { let configObj= {
isOcr:1 isTencentOcr:1
} }
newArr.push(_this.dataURLtoFile(_this.msg.Sign, fileName)); newArr.push(_this.dataURLtoFile(_this.msg.Sign, fileName));
console.log(newArr[0],'newArr[0]');
UploadSelfFile(path, newArr[0], x => { UploadSelfFile(path, newArr[0], x => {
console.log(x, 'xxxxxxx'); console.log(x, 'xxxxxxx');
}, configObj); let Msg = JSON.parse(x.Message)
console.log(Msg,'msg');
if(Msg&&Msg.TextDetections.length>0){
_this.SaveMsg(); 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 @@ ...@@ -294,9 +312,6 @@
//提交数据 //提交数据
SaveMsg() { SaveMsg() {
if (this.Type == 1) { if (this.Type == 1) {
console.log(this.msg, 'msg');
console.log(this.base64ToBlob(this.msg.Sign), 'Sign');
return
SetEducationContractSign(this.msg).then(res => { SetEducationContractSign(this.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.$q.notify({ this.$q.notify({
...@@ -365,7 +380,7 @@ ...@@ -365,7 +380,7 @@
this.$router.push({ this.$router.push({
path: '/contractConfirm', path: '/contractConfirm',
query: { query: {
ContractId: this.msg.ContractId a: encodeURIComponent(Encrypt(this.msg.ContractId.toString())),
} }
}); });
} else { } else {
......
...@@ -264,6 +264,7 @@ import { ...@@ -264,6 +264,7 @@ import {
import { downloadLocalFile } from "../../api/common/common"; import { downloadLocalFile } from "../../api/common/common";
import eduinfoForm from "../../components/sale/eduinfo-form"; import eduinfoForm from "../../components/sale/eduinfo-form";
import { Encrypt } from '../../utils/encrypt'
export default { export default {
meta: { meta: {
title: "合同管理", title: "合同管理",
...@@ -524,7 +525,8 @@ export default { ...@@ -524,7 +525,8 @@ export default {
CopyUrl(item) { CopyUrl(item) {
var oInput = document.createElement("input"); var oInput = document.createElement("input");
var url = window.location.host; 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); document.body.appendChild(oInput);
oInput.select(); // 选择对象 oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令 document.execCommand("Copy"); // 执行浏览器复制命令
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment