Commit 95137887 by 李少勇

Merge branch 'settle-test-20230110' of http://114.115.138.98:8900/fukai/vue-gjjs…

Merge branch 'settle-test-20230110' of http://114.115.138.98:8900/fukai/vue-gjjs into settle-test-20230110
parents 767f42e2 e36a7523
...@@ -496,6 +496,7 @@ ...@@ -496,6 +496,7 @@
</template> </template>
</el-dialog> </el-dialog>
</template> </template>
<div ref="file"></div>
</div> </div>
</template> </template>
<script> <script>
...@@ -503,6 +504,7 @@ import commonProcess from "~/mixin/commonProcess"; ...@@ -503,6 +504,7 @@ import commonProcess from "~/mixin/commonProcess";
import Api from "~/service/Api"; import Api from "~/service/Api";
import Utils from "~/utils/index"; import Utils from "~/utils/index";
import DocUtils from "~/utils/DocUtils"; import DocUtils from "~/utils/DocUtils";
let docx = require("docx-preview");
export default { export default {
inject: ['root'], inject: ['root'],
props: ['model', 'codes'], props: ['model', 'codes'],
...@@ -655,6 +657,7 @@ export default { ...@@ -655,6 +657,7 @@ export default {
u8arr[length] = bstr.charCodeAt(length); // 返回在指定的位置的字符的 Unicode 编码 u8arr[length] = bstr.charCodeAt(length); // 返回在指定的位置的字符的 Unicode 编码
} }
let blob = new Blob([u8arr]); let blob = new Blob([u8arr]);
docx.renderAsync(blob, this.$refs.file);
let hrefUrl = window.URL.createObjectURL(blob); let hrefUrl = window.URL.createObjectURL(blob);
let a = document.createElement('a'); let a = document.createElement('a');
a.href = hrefUrl; a.href = hrefUrl;
......
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