From 2591d9565cda1c392a630ddfd988952c7ae65cda Mon Sep 17 00:00:00 2001
From: yang <1441163367@qq.com>
Date: 星期三, 28 十二月 2022 17:10:55 +0800
Subject: [PATCH] 第一版PAD
---
dist-11.4.rar | 0
/dev/null | 0
src/libs/word.js | 386 +++++++++++++++++++++---------------------
vue.config.js | 2
src/router/router.js | 4
src/router/axios.js | 36 ++--
src/router/pad/index.js | 32 ++-
src/views/padSunmaryProcedure/padFrom.vue | 10
src/views/padSunmaryProcedure/word_mange/mangeBL.vue | 4
src/views/padSunmaryProcedure/index.vue | 17 +
10 files changed, 254 insertions(+), 237 deletions(-)
diff --git a/dist-11.4.rar b/dist-11.4.rar
new file mode 100644
index 0000000..61d3996
--- /dev/null
+++ b/dist-11.4.rar
Binary files differ
diff --git a/public/wordes/TranscriptOfStatement.docx b/public/wordes/TranscriptOfStatement.docx
deleted file mode 100644
index 33c2ac1..0000000
--- a/public/wordes/TranscriptOfStatement.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/administrativeEnforcementDecision.docx b/public/wordes/administrativeEnforcementDecision.docx
deleted file mode 100644
index 279b360..0000000
--- a/public/wordes/administrativeEnforcementDecision.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/administrativePenaltyConfiscationProperty.docx b/public/wordes/administrativePenaltyConfiscationProperty.docx
deleted file mode 100644
index c5153e9..0000000
--- a/public/wordes/administrativePenaltyConfiscationProperty.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/administrativePenaltyRecord.docx b/public/wordes/administrativePenaltyRecord.docx
deleted file mode 100644
index d0f46e5..0000000
--- a/public/wordes/administrativePenaltyRecord.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/advanceNotice.docx b/public/wordes/advanceNotice.docx
deleted file mode 100644
index 1d15577..0000000
--- a/public/wordes/advanceNotice.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/ajdczj.docx b/public/wordes/ajdczj.docx
deleted file mode 100644
index 5e8b010..0000000
--- a/public/wordes/ajdczj.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/ajlydjb.docx b/public/wordes/ajlydjb.docx
deleted file mode 100644
index c33c2b9..0000000
--- a/public/wordes/ajlydjb.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/applicationForRights.docx b/public/wordes/applicationForRights.docx
deleted file mode 100644
index 72b3fcd..0000000
--- a/public/wordes/applicationForRights.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/caseGroupDiscussWord.docx b/public/wordes/caseGroupDiscussWord.docx
deleted file mode 100644
index 096e864..0000000
--- a/public/wordes/caseGroupDiscussWord.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/certificateOfService.docx b/public/wordes/certificateOfService.docx
deleted file mode 100644
index a7161c0..0000000
--- a/public/wordes/certificateOfService.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/chechCause.docx b/public/wordes/chechCause.docx
deleted file mode 100644
index 9219f29..0000000
--- a/public/wordes/chechCause.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/constraintExecute.docx b/public/wordes/constraintExecute.docx
deleted file mode 100644
index f0a2d91..0000000
--- a/public/wordes/constraintExecute.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/constraintExecuteDecide.docx b/public/wordes/constraintExecuteDecide.docx
deleted file mode 100644
index 99b98df..0000000
--- a/public/wordes/constraintExecuteDecide.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/correctionNotice.docx b/public/wordes/correctionNotice.docx
deleted file mode 100644
index 50f22ee..0000000
--- a/public/wordes/correctionNotice.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/dcxwtzs.docx b/public/wordes/dcxwtzs.docx
deleted file mode 100644
index 452de9c..0000000
--- a/public/wordes/dcxwtzs.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/evidence.docx b/public/wordes/evidence.docx
deleted file mode 100644
index 6e2ba7f..0000000
--- a/public/wordes/evidence.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/finalReport.docx b/public/wordes/finalReport.docx
deleted file mode 100644
index 9497c0a..0000000
--- a/public/wordes/finalReport.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/forceCaseDecide.docx b/public/wordes/forceCaseDecide.docx
deleted file mode 100644
index c601eb1..0000000
--- a/public/wordes/forceCaseDecide.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/forceCaseRecord.docx b/public/wordes/forceCaseRecord.docx
deleted file mode 100644
index e7fceb9..0000000
--- a/public/wordes/forceCaseRecord.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/hearingNotice.docx b/public/wordes/hearingNotice.docx
deleted file mode 100644
index 35ee73e..0000000
--- a/public/wordes/hearingNotice.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/inquiryCause.docx b/public/wordes/inquiryCause.docx
deleted file mode 100644
index 32609f5..0000000
--- a/public/wordes/inquiryCause.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/lasp.docx b/public/wordes/lasp.docx
deleted file mode 100644
index fad40c7..0000000
--- a/public/wordes/lasp.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/mswpclqd.docx b/public/wordes/mswpclqd.docx
deleted file mode 100644
index 0c79f68..0000000
--- a/public/wordes/mswpclqd.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/nowAdministrativePenaltyDecision.docx b/public/wordes/nowAdministrativePenaltyDecision.docx
deleted file mode 100644
index f664038..0000000
--- a/public/wordes/nowAdministrativePenaltyDecision.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/penaltyDecision.docx b/public/wordes/penaltyDecision.docx
deleted file mode 100644
index 46dab99..0000000
--- a/public/wordes/penaltyDecision.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/photosEvidence.docx b/public/wordes/photosEvidence.docx
deleted file mode 100644
index f32524d..0000000
--- a/public/wordes/photosEvidence.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/recordOfHearing.docx b/public/wordes/recordOfHearing.docx
deleted file mode 100644
index 252ce79..0000000
--- a/public/wordes/recordOfHearing.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/relieveForceDecide.docx b/public/wordes/relieveForceDecide.docx
deleted file mode 100644
index 318cf5c..0000000
--- a/public/wordes/relieveForceDecide.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/reviewOpinion.docx b/public/wordes/reviewOpinion.docx
deleted file mode 100644
index dc0e39a..0000000
--- a/public/wordes/reviewOpinion.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/samplingEvidenceForm.docx b/public/wordes/samplingEvidenceForm.docx
deleted file mode 100644
index 56cd0ac..0000000
--- a/public/wordes/samplingEvidenceForm.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/saveproofDisposeInform.docx b/public/wordes/saveproofDisposeInform.docx
deleted file mode 100644
index 4eb92bd..0000000
--- a/public/wordes/saveproofDisposeInform.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/ssxzqzcs.docx b/public/wordes/ssxzqzcs.docx
deleted file mode 100644
index 810d3e8..0000000
--- a/public/wordes/ssxzqzcs.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/ssxzqzcs1.docx b/public/wordes/ssxzqzcs1.docx
deleted file mode 100644
index b58862d..0000000
--- a/public/wordes/ssxzqzcs1.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/tolerance_exemption_notice.docx b/public/wordes/tolerance_exemption_notice.docx
deleted file mode 100644
index 87aeab7..0000000
--- a/public/wordes/tolerance_exemption_notice.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/xxdjbczjspb.docx b/public/wordes/xxdjbczjspb.docx
deleted file mode 100644
index e5f04c3..0000000
--- a/public/wordes/xxdjbczjspb.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/xxdjbczjwpcl.docx b/public/wordes/xxdjbczjwpcl.docx
deleted file mode 100644
index cdbe4e0..0000000
--- a/public/wordes/xxdjbczjwpcl.docx
+++ /dev/null
Binary files differ
diff --git a/public/wordes/xzcfjd.docx b/public/wordes/xzcfjd.docx
deleted file mode 100644
index f00a266..0000000
--- a/public/wordes/xzcfjd.docx
+++ /dev/null
Binary files differ
diff --git a/src/libs/word.js b/src/libs/word.js
index a2ca891..8b758e2 100644
--- a/src/libs/word.js
+++ b/src/libs/word.js
@@ -2,62 +2,65 @@
import PizZip from 'pizzip'
import JSZipUtils from 'jszip-utils'
import {saveAs} from 'file-saver'
+
let docx = require("docx-preview");
const ImageModule = require("docxtemplater-image-module-free");
const base64Regex =
- /^data:image\/(png|jpg|svg|svg\+xml);base64,/;
+ /^data:image\/(png|jpg|svg|svg\+xml);base64,/;
//涓嬭浇word锛屼笉甯﹀浘鐗�
-export const exportDoc = (e, path , dname) => {
- for (let attr in e) {
- if (e[attr] == null) {
- e[attr] = "";
- }
+export const exportDoc = (e, path, dname) => {
+ for (let attr in e) {
+ if (e[attr] == null) {
+ e[attr] = "";
}
- let docxsrc = path; //妯℃澘鏂囦欢鐨勪綅缃�
- let docxname = dname; //瀵煎嚭鏂囦欢鐨勫悕瀛�
- // 璇诲彇骞惰幏寰楁ā鏉挎枃浠剁殑浜岃繘鍒跺唴瀹�
- JSZipUtils.getBinaryContent(docxsrc, function (error, content) {
- // docxsrc鏄ā鏉裤�傛垜浠湪瀵煎嚭鐨勬椂鍊欙紝浼氭牴鎹妯℃澘鏉ュ鍑哄搴旂殑鏁版嵁
- // 鎶涘嚭寮傚父
- if (error) {
- throw error;
- }
+ }
+ let docxsrc = path; //妯℃澘鏂囦欢鐨勪綅缃�
+ let docxname = dname; //瀵煎嚭鏂囦欢鐨勫悕瀛�
+ // 璇诲彇骞惰幏寰楁ā鏉挎枃浠剁殑浜岃繘鍒跺唴瀹�
+ JSZipUtils.getBinaryContent(docxsrc, function (error, content) {
+ // docxsrc鏄ā鏉裤�傛垜浠湪瀵煎嚭鐨勬椂鍊欙紝浼氭牴鎹妯℃澘鏉ュ鍑哄搴旂殑鏁版嵁
+ // 鎶涘嚭寮傚父
+ if (error) {
+ throw error;
+ }
- // 鍒涘缓涓�涓狿izZip瀹炰緥锛屽唴瀹逛负妯℃澘鐨勫唴瀹�
- let zip = new PizZip(content);
- // 鍒涘缓骞跺姞杞絛ocx templater瀹炰緥瀵硅薄
- let doc = new docxtemplater().loadZip(zip);
- // 璁剧疆妯℃澘鍙橀噺鐨勫��
- doc.setData(e);
+ // 鍒涘缓涓�涓狿izZip瀹炰緥锛屽唴瀹逛负妯℃澘鐨勫唴瀹�
+ let zip = new PizZip(content);
+ // 鍒涘缓骞跺姞杞絛ocx templater瀹炰緥瀵硅薄
+ let doc = new docxtemplater().loadZip(zip);
+ // 璁剧疆妯℃澘鍙橀噺鐨勫��
+ doc.setData(e);
+ console.log(doc.setData(e), 'doc.setData(e);')
- try {
- //鏇挎崲鎵�鏈夋ā鏉垮彉閲�
- doc.render();
- } catch (error) {
- let e = {
- message: error.message,
- name: error.name,
- stack: error.stack,
- properties: error.properties
- };
- console.log(JSON.stringify({error: e}));
- throw error;
- }
-
- // 鐢熸垚涓�涓唬琛╠ocxtemplater瀵硅薄鐨剒ip鏂囦欢锛堜笉鏄竴涓湡瀹炵殑鏂囦欢锛岃�屾槸鍦ㄥ唴瀛樹腑鐨勮〃绀猴級
- let out = doc.getZip().generate({
- type: "blob",
- mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
- });
- // 灏嗙洰鏍囨枃浠跺璞′繚瀛樹负鐩爣绫诲瀷鐨勬枃浠讹紝骞跺懡鍚�
- saveAs(out, docxname);
+ try {
+ //鏇挎崲鎵�鏈夋ā鏉垮彉閲�
+ doc.render();
+ } catch (error) {
+ let e = {
+ message: error.message,
+ name: error.name,
+ stack: error.stack,
+ properties: error.properties
+ };
+ console.log(JSON.stringify({error: e}));
+ throw error;
+ }
+ console.log(doc, 'out~doc')
+ // 鐢熸垚涓�涓唬琛╠ocxtemplater瀵硅薄鐨剒ip鏂囦欢锛堜笉鏄竴涓湡瀹炵殑鏂囦欢锛岃�屾槸鍦ㄥ唴瀛樹腑鐨勮〃绀猴級
+ let out = doc.getZip().generate({
+ type: "blob",
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
});
+ console.log(doc.getZip().generate, 'doc.getZip().generate')
+ // 灏嗙洰鏍囨枃浠跺璞′繚瀛樹负鐩爣绫诲瀷鐨勬枃浠讹紝骞跺懡鍚�
+ saveAs(out, docxname);
+ });
};
//涓嬭浇word锛屽甫鍥剧墖
-export const exportDocWidthImg = (e, path , dname, imgSize) => {
+export const exportDocWidthImg = (e, path, dname, imgSize) => {
for (let attr in e) {
if (e[attr] == null) {
e[attr] = "";
@@ -81,15 +84,15 @@
// // 鍥剧墖澶勭悊
const opts = {}
opts.fileType = "docx";
- opts.getImage = (chartId) =>{
+ opts.getImage = (chartId) => {
return base64DataURLToArrayBuffer(chartId);
}
- opts.getSize = function(img, tagVlaue, tagName){ //鍥剧墖size
- if(imgSize.hasOwnProperty(tagName)) {
+ opts.getSize = function (img, tagVlaue, tagName) { //鍥剧墖size
+ if (imgSize.hasOwnProperty(tagName)) {
return imgSize[tagName]
- }else {
- return [100,100]
+ } else {
+ return [100, 100]
}
}
let imageModule = new ImageModule(opts);
@@ -123,172 +126,175 @@
}
//棰勮word锛屼笉甯﹀浘鐗囩殑
-export const viewD = (e, path , continer) => {
- for (let attr in e) {
- if (e[attr] == null) {
- e[attr] = "";
- }
+export const viewD = (e, path, continer) => {
+ for (let attr in e) {
+ if (e[attr] == null) {
+ e[attr] = "";
}
- let docxsrc = path; //妯℃澘鏂囦欢鐨勪綅缃�
- // 璇诲彇骞惰幏寰楁ā鏉挎枃浠剁殑浜岃繘鍒跺唴瀹�
- JSZipUtils.getBinaryContent(docxsrc, function (error, content) {
- // docxsrc鏄ā鏉裤�傛垜浠湪瀵煎嚭鐨勬椂鍊欙紝浼氭牴鎹妯℃澘鏉ュ鍑哄搴旂殑鏁版嵁
- // 鎶涘嚭寮傚父
- if (error) {
- throw error;
- }
+ }
+ let docxsrc = path; //妯℃澘鏂囦欢鐨勪綅缃�
+ // 璇诲彇骞惰幏寰楁ā鏉挎枃浠剁殑浜岃繘鍒跺唴瀹�
+ JSZipUtils.getBinaryContent(docxsrc, function (error, content) {
+ // docxsrc鏄ā鏉裤�傛垜浠湪瀵煎嚭鐨勬椂鍊欙紝浼氭牴鎹妯℃澘鏉ュ鍑哄搴旂殑鏁版嵁
+ // 鎶涘嚭寮傚父
+ if (error) {
+ throw error;
+ }
- // 鍒涘缓涓�涓狿izZip瀹炰緥锛屽唴瀹逛负妯℃澘鐨勫唴瀹�
- let zip = new PizZip(content);
- // 鍒涘缓骞跺姞杞絛ocx templater瀹炰緥瀵硅薄
- let doc = new docxtemplater().loadZip(zip);
- // 璁剧疆妯℃澘鍙橀噺鐨勫��
- doc.setData(e);
+ // 鍒涘缓涓�涓狿izZip瀹炰緥锛屽唴瀹逛负妯℃澘鐨勫唴瀹�
+ let zip = new PizZip(content);
+ // 鍒涘缓骞跺姞杞絛ocx templater瀹炰緥瀵硅薄
+ let doc = new docxtemplater().loadZip(zip);
+ // 璁剧疆妯℃澘鍙橀噺鐨勫��
+ doc.setData(e);
- try {
- //鏇挎崲鎵�鏈夋ā鏉垮彉閲�
- doc.render();
- } catch (error) {
- let e = {
- message: error.message,
- name: error.name,
- stack: error.stack,
- properties: error.properties
- };
- console.log(JSON.stringify({error: e}));
- throw error;
- }
+ try {
+ //鏇挎崲鎵�鏈夋ā鏉垮彉閲�
+ doc.render();
+ } catch (error) {
+ let e = {
+ message: error.message,
+ name: error.name,
+ stack: error.stack,
+ properties: error.properties
+ };
+ console.log(JSON.stringify({error: e}));
+ throw error;
+ }
- // 鐢熸垚涓�涓唬琛╠ocxtemplater瀵硅薄鐨剒ip鏂囦欢锛堜笉鏄竴涓湡瀹炵殑鏂囦欢锛岃�屾槸鍦ㄥ唴瀛樹腑鐨勮〃绀猴級
- let out = doc.getZip().generate({
- type: "blob",
- mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
- });
- docx.renderAsync(out, continer); // 娓叉煋鍒伴〉闈㈤瑙�
+ // 鐢熸垚涓�涓唬琛╠ocxtemplater瀵硅薄鐨剒ip鏂囦欢锛堜笉鏄竴涓湡瀹炵殑鏂囦欢锛岃�屾槸鍦ㄥ唴瀛樹腑鐨勮〃绀猴級
+ let out = doc.getZip().generate({
+ type: "blob",
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
});
+ console.log(out, 'out')
+ // window.android.toDownLoadWord(out)
+ docx.renderAsync(out, continer); // 娓叉煋鍒伴〉闈㈤瑙�
+ });
};
//棰勮甯﹀浘鐗囩殑word
-export const viewWithImg = (e, path , continer, imgSize) => {
- for (let attr in e) {
- if (e[attr] == null) {
- e[attr] = "";
- }
+export const viewWithImg = (e, path, continer, imgSize) => {
+ for (let attr in e) {
+ if (e[attr] == null) {
+ e[attr] = "";
}
- let docxsrc = path; //妯℃澘鏂囦欢鐨勪綅缃�
- JSZipUtils.getBinaryContent(docxsrc, function (error, content) {
- // docxsrc鏄ā鏉裤�傛垜浠湪瀵煎嚭鐨勬椂鍊欙紝浼氭牴鎹妯℃澘鏉ュ鍑哄搴旂殑鏁版嵁
- // 鎶涘嚭寮傚父
- if (error) {
- throw error;
- }
+ }
+ let docxsrc = path; //妯℃澘鏂囦欢鐨勪綅缃�
+ JSZipUtils.getBinaryContent(docxsrc, function (error, content) {
+ // docxsrc鏄ā鏉裤�傛垜浠湪瀵煎嚭鐨勬椂鍊欙紝浼氭牴鎹妯℃澘鏉ュ鍑哄搴旂殑鏁版嵁
+ // 鎶涘嚭寮傚父
+ if (error) {
+ throw error;
+ }
- const doc = new docxtemplater();
- // // 鍒涘缓涓�涓狿izZip瀹炰緥锛屽唴瀹逛负妯℃澘鐨勫唴瀹�
- const zip = new PizZip(content);
- doc.loadZip(zip)
- // // 鍥剧墖澶勭悊
- const opts = {}
- opts.fileType = "docx";
- opts.getImage = (chartId) =>{
- return base64DataURLToArrayBuffer(chartId);
- }
+ const doc = new docxtemplater();
+ // // 鍒涘缓涓�涓狿izZip瀹炰緥锛屽唴瀹逛负妯℃澘鐨勫唴瀹�
+ const zip = new PizZip(content);
+ doc.loadZip(zip)
+ // // 鍥剧墖澶勭悊
+ const opts = {}
+ opts.fileType = "docx";
+ opts.getImage = (chartId) => {
+ return base64DataURLToArrayBuffer(chartId);
+ }
- opts.getSize = function(img, tagVlaue, tagName){ //鍥剧墖size
- if(imgSize.hasOwnProperty(tagName)) {
- return imgSize[tagName]
- }else {
- return [100,100]
- }
- }
- let imageModule = new ImageModule(opts);
- doc.attachModule(imageModule);
- doc.setData(e);
+ opts.getSize = function (img, tagVlaue, tagName) { //鍥剧墖size
+ if (imgSize.hasOwnProperty(tagName)) {
+ return imgSize[tagName]
+ } else {
+ return [100, 100]
+ }
+ }
+ let imageModule = new ImageModule(opts);
+ doc.attachModule(imageModule);
+ doc.setData(e);
- try {
- // //鏇挎崲鎵�鏈夋ā鏉垮彉閲�
- doc.render();
- } catch (error) {
- let e = {
- message: error.message,
- name: error.name,
- stack: error.stack,
- properties: error.properties
- };
- console.log(JSON.stringify({error: e}));
- // throw error;
- }
+ try {
+ // //鏇挎崲鎵�鏈夋ā鏉垮彉閲�
+ doc.render();
+ } catch (error) {
+ let e = {
+ message: error.message,
+ name: error.name,
+ stack: error.stack,
+ properties: error.properties
+ };
+ console.log(JSON.stringify({error: e}));
+ // throw error;
+ }
- // 鐢熸垚涓�涓唬琛╠ocxtemplater瀵硅薄鐨剒ip鏂囦欢锛堜笉鏄竴涓湡瀹炵殑鏂囦欢锛岃�屾槸鍦ㄥ唴瀛樹腑鐨勮〃绀猴級
- let out = doc.getZip().generate({
- type: "blob",
- mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
- });
- docx.renderAsync(out, continer); // 娓叉煋鍒伴〉闈㈤瑙�
+ // 鐢熸垚涓�涓唬琛╠ocxtemplater瀵硅薄鐨剒ip鏂囦欢锛堜笉鏄竴涓湡瀹炵殑鏂囦欢锛岃�屾槸鍦ㄥ唴瀛樹腑鐨勮〃绀猴級
+ let out = doc.getZip().generate({
+ type: "blob",
+ mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
});
+ docx.renderAsync(out, continer); // 娓叉煋鍒伴〉闈㈤瑙�
+ });
};
+
function base64DataURLToArrayBuffer(dataURL) {
- const base64Regex = /^data:image\/(png|jpg|svg|svg\+xml);base64,/;
- if (!base64Regex.test(dataURL)) {
- return false;
- }
- const stringBase64 = dataURL.replace(base64Regex, "");
- let binaryString;
- if (typeof window !== "undefined") {
- binaryString = window.atob(stringBase64);
- } else {
- binaryString = new Buffer(stringBase64, "base64").toString("binary");
- }
- const len = binaryString.length;
- const bytes = new Uint8Array(len);
- for (let i = 0; i < len; i++) {
- const ascii = binaryString.charCodeAt(i);
- bytes[i] = ascii;
- }
- return bytes.buffer;
+ const base64Regex = /^data:image\/(png|jpg|svg|svg\+xml);base64,/;
+ if (!base64Regex.test(dataURL)) {
+ return false;
+ }
+ const stringBase64 = dataURL.replace(base64Regex, "");
+ let binaryString;
+ if (typeof window !== "undefined") {
+ binaryString = window.atob(stringBase64);
+ } else {
+ binaryString = new Buffer(stringBase64, "base64").toString("binary");
+ }
+ const len = binaryString.length;
+ const bytes = new Uint8Array(len);
+ for (let i = 0; i < len; i++) {
+ const ascii = binaryString.charCodeAt(i);
+ bytes[i] = ascii;
+ }
+ return bytes.buffer;
}
export const urlToBase64 = (url, callback) => {
- let image = new Image();
- //瑙e喅璺ㄥ煙闂
- image.setAttribute('crossOrigin', '*');
- image.src = url
- image.onload = () => {
- var canvas = document.createElement("canvas");
- canvas.width = image.width;
- canvas.height = image.height;
- var context = canvas.getContext('2d');
- context.drawImage(image, 0, 0, image.width, image.height);
- var quality = 0.8;
- //杩欓噷鐨刣ataurl灏辨槸base64绫诲瀷
- var dataURL = canvas.toDataURL("image/png", quality);
- callback ? callback(dataURL) : null; //璋冪敤鍥炶皟鍑芥暟
- }
+ let image = new Image();
+ //瑙e喅璺ㄥ煙闂
+ image.setAttribute('crossOrigin', '*');
+ image.src = url
+ image.onload = () => {
+ var canvas = document.createElement("canvas");
+ canvas.width = image.width;
+ canvas.height = image.height;
+ var context = canvas.getContext('2d');
+ context.drawImage(image, 0, 0, image.width, image.height);
+ var quality = 0.8;
+ //杩欓噷鐨刣ataurl灏辨槸base64绫诲瀷
+ var dataURL = canvas.toDataURL("image/png", quality);
+ callback ? callback(dataURL) : null; //璋冪敤鍥炶皟鍑芥暟
+ }
};
function base64Parser(dataURL) {
- if (
- typeof dataURL !== "string" ||
- !base64Regex.test(dataURL)
- ) {
- return false;
- }
- const stringBase64 = dataURL.replace(base64Regex, "");
+ if (
+ typeof dataURL !== "string" ||
+ !base64Regex.test(dataURL)
+ ) {
+ return false;
+ }
+ const stringBase64 = dataURL.replace(base64Regex, "");
- // For nodejs
- if (typeof Buffer !== "undefined" && Buffer.from) {
- return Buffer.from(stringBase64, "base64");
- }
+ // For nodejs
+ if (typeof Buffer !== "undefined" && Buffer.from) {
+ return Buffer.from(stringBase64, "base64");
+ }
- // For browsers :
- const binaryString = window.atob(stringBase64);
- const len = binaryString.length;
- const bytes = new Uint8Array(len);
- for (let i = 0; i < len; i++) {
- const ascii = binaryString.charCodeAt(i);
- bytes[i] = ascii;
- }
- return bytes.buffer;
+ // For browsers :
+ const binaryString = window.atob(stringBase64);
+ const len = binaryString.length;
+ const bytes = new Uint8Array(len);
+ for (let i = 0; i < len; i++) {
+ const ascii = binaryString.charCodeAt(i);
+ bytes[i] = ascii;
+ }
+ return bytes.buffer;
}
diff --git a/src/router/axios.js b/src/router/axios.js
index a11ba74..b8e6bf0 100644
--- a/src/router/axios.js
+++ b/src/router/axios.js
@@ -34,9 +34,9 @@
const TENANT_ID = getStore({ name: 'tenantId' })
const isToken = (config.headers || {}).isToken === false
const token = window.android.getAppToken()
- // const token = `dd271fdb-4b69-4eb3-a940-52d70232e56b`
+ // const token = `59866cb8-c5ba-4b2f-a367-3ab2f64f30c5`
if (token && !isToken) {
- config.headers['Authorization'] = 'bearer ' + token// token
+ config.headers['Authorization'] = 'Bearer ' + token// token
}
if (TENANT_ID) {
config.headers['TENANT-ID'] = TENANT_ID // 绉熸埛ID
@@ -47,7 +47,7 @@
config.data = serialize(config.data)
delete config.data.serialize
}
- config.headers['VERSION'] = 'lmm'
+ // config.headers['VERSION'] = 'GHX'
if (config.method === 'get'||config.params) {
config.paramsSerializer = function (params) {
let p ={};
@@ -73,27 +73,27 @@
// loadingInstance.close();
const status = Number(res.status) || 200
const message = res.data.msg || errorCode[status] || errorCode['default']
- /* if (status === 401) {
- // Message({
- // message: message,
- // type: 'error'
- // })
+ /*if (status === 401) {
+ Message({
+ message: message,
+ type: 'error'
+ })
handleError(message)
store.dispatch('FedLogOut').then(() => {
- router.push({ path: '/login' })
+ router.push({ path: '/pad' })
})
return
}*/
- // if (status !== 200 || res.data.code === 1) {
- // // Message({
- // // message: message,
- // // type: 'error'
- // // })
- // // handleError(message)
- // return handleError(message)
- // // return Promise.reject(new Error(message))
- // }
+ /*if (status !== 200 || res.data.code === 1) {
+ Message({
+ message: message,
+ type: 'error'
+ })
+ handleError(message)
+ return handleError(message)
+ // return Promise.reject(new Error(message))
+ }*/
return res
}, error => {
NProgress.done()
diff --git a/src/router/pad/index.js b/src/router/pad/index.js
index 1d21bd1..1f80958 100644
--- a/src/router/pad/index.js
+++ b/src/router/pad/index.js
@@ -5,26 +5,30 @@
path: '/pad',
component: padHome,
redirect: '/pad',
- meta: { noNeedLogin: true },
+ meta: {noNeedLogin: true},
children: [{
path: '/pad',
name: '绠�鏄撶▼搴忔浠�',
component: () =>
import(/* webpackChunkName: "page" */ '@/views/padSunmaryProcedure/index')
- },{
+ }, {
path: '/fromAdd',
name: '绠�鏄撶▼搴忔浠�',
component: () =>
import(/* webpackChunkName: "page" */ '@/views/padSunmaryProcedure/padFrom')
- },{
- path: '/padWord',
- name: '妗堜欢濉姤娴佺▼',
- component: () =>
- import(/* webpackChunkName: "page" */ '@/views/padSunmaryProcedure/padWord')
- },{
- path: '/WordYulan',
- name: 'word棰勮',
- component: () =>
- import(/* webpackChunkName: "page" */ '@/views/padSunmaryProcedure/word-view')
- }]
-}]
+ },
+ {
+ path: '/padWord',
+ name: '妗堜欢濉姤娴佺▼',
+ component: () =>
+ import(/* webpackChunkName: "page" */ '../../views/padSunmaryProcedure/padWord')
+ }
+ /*,{
+ path: '/WordYulan',
+ name: 'word棰勮',
+ component: () =>
+ import(/!* webpackChunkName: "page" *!/ '@/views/padSunmaryProcedure/word-view')
+ }*/
+ ]
+}
+]
diff --git a/src/router/router.js b/src/router/router.js
index ab69a19..ac1b936 100644
--- a/src/router/router.js
+++ b/src/router/router.js
@@ -23,10 +23,10 @@
const originalPush = VueRouter.prototype.push
const originalReplace = VueRouter.prototype.replace
//push
-VueRouter.prototype.push = function push(location, onResolve, onReject) {
+/*VueRouter.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
return originalPush.call(this, location).catch(err => err)
-}
+}*/
//replace
VueRouter.prototype.replace = function push(location, onResolve, onReject) {
if (onResolve || onReject) return originalReplace.call(this, location, onResolve, onReject)
diff --git a/src/views/padSunmaryProcedure/index.vue b/src/views/padSunmaryProcedure/index.vue
index 0e6f3a9..39745d1 100644
--- a/src/views/padSunmaryProcedure/index.vue
+++ b/src/views/padSunmaryProcedure/index.vue
@@ -77,7 +77,9 @@
isShow: false,
formInline: {
litigant: '',
- phone: ''
+ phone: '',
+ current:this.pageIndex,
+ size:this.pageSize
},
pageSize: 10,
pageIndex: 1,
@@ -99,14 +101,19 @@
getDataList(type) {
// this.$nextTick(()=>{
if (type == 0) {
- this.formInline.type = type
+ this.formInline.type = type;
+ this.formInline.current=this.pageIndex;
+ this.formInline.size=this.pageSize;
getObj(this.formInline).then(res => {
this.tableData = res.data.data.records
this.total =res.data.data.total
})
} else {
+ // this.formInline.type = type;
+ this.formInline.current=this.pageIndex;
+ this.formInline.size=this.pageSize;
// this.formInline.user=333
- getObj().then(res => {
+ getObj(this.formInline).then(res => {
this.tableData = res.data.data.records
})
}
@@ -139,12 +146,12 @@
sizeChangeHandle(val) {
this.pageSize = val;
this.pageIndex = 1;
- // this.getDataList();
+ this.getDataList(0);
},
// 褰撳墠椤�
currentChangeHandle(val) {
this.pageIndex = val;
- // this.getDataList();
+ this.getDataList(0);
},
}
}
diff --git a/src/views/padSunmaryProcedure/padFrom.vue b/src/views/padSunmaryProcedure/padFrom.vue
index 4c86cbc..1f30d69 100644
--- a/src/views/padSunmaryProcedure/padFrom.vue
+++ b/src/views/padSunmaryProcedure/padFrom.vue
@@ -184,12 +184,12 @@
},
init() {
// this.$nextTick(()=>{
- getIdByToken().then(res => {
- console.log(res, 'getIdByToken')
- let a = res.data.data;
+ // getIdByToken().then(res => {
+ // console.log(res, 'getIdByToken')
+ // let a = res.data.data;
// let b = parseInt(a)
- this.form.hanlderIds.push(a)
- })
+ // this.form.hanlderIds.push(a)
+ // })
//鏌ヨ鍔炴浜哄憳淇℃伅
getfindAll().then((res) => {
this.organPersons = res.data.data;
diff --git a/src/views/padSunmaryProcedure/word_mange/mangeBL.vue b/src/views/padSunmaryProcedure/word_mange/mangeBL.vue
index 836b98f..e7eb93b 100644
--- a/src/views/padSunmaryProcedure/word_mange/mangeBL.vue
+++ b/src/views/padSunmaryProcedure/word_mange/mangeBL.vue
@@ -66,7 +66,7 @@
<el-row>
<el-col :span="12">
<el-form-item label="璇㈤棶浜�">
- <el-input v-model="form.inquirerNameOne" placeholder="璇峰~鍐欒闂汉"></el-input>
+ <el-input v-model="form.inquisitorialNameOne" placeholder="璇峰~鍐欒闂汉"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -78,7 +78,7 @@
<el-row>
<el-col :span="12">
<el-form-item>
- <el-input v-model="form.inquirerNameTwo" placeholder="璇峰~鍐欒闂汉"></el-input>
+ <el-input v-model="form.inquisitorialNameTwo" placeholder="璇峰~鍐欒闂汉"></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
diff --git a/vue.config.js b/vue.config.js
index ded5ba0..5a33ce9 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -4,7 +4,7 @@
*/
// const url = 'http://localhost:9999'
// const url = 'http://192.168.0.164:9999'
-// const url = 'http://192.168.0.134:9999'
+// const url = 'http://192.168.0.126:9999/'
// const url = 'http://boying.tpddns.cn:9999/'
const url = 'http://36.138.175.42:9999/'
const webpack = require('webpack')
--
Gitblit v1.9.1