Commit 96c53328 authored by zhengke's avatar zhengke

修改

parent 0546af81
......@@ -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) {
......
......@@ -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
}
});
}
......
......@@ -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
isTencentOcr: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);
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 {
......
......@@ -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"); // 执行浏览器复制命令
......
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