From 105e36dfd740d96c916d0065c37217aa69e2184c Mon Sep 17 00:00:00 2001 From: yang <1441163367@qq.com> Date: 星期五, 28 十月 2022 14:27:00 +0800 Subject: [PATCH] 修改问题 --- src/views/padSunmaryProcedure/word_mange/mangeBL.vue | 54 +++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 39 insertions(+), 15 deletions(-) diff --git a/src/views/padSunmaryProcedure/word_mange/mangeBL.vue b/src/views/padSunmaryProcedure/word_mange/mangeBL.vue index 48376c8..ee565f3 100644 --- a/src/views/padSunmaryProcedure/word_mange/mangeBL.vue +++ b/src/views/padSunmaryProcedure/word_mange/mangeBL.vue @@ -130,14 +130,15 @@ </el-form> <div style="text-align: center"> <el-button v-if="form.registerState=='0'||form.registerState==null" @click="dataFormSubmit('0')">淇濆瓨</el-button> - <el-button type="primary" @click="viewVord(form)">棰勮</el-button> + <el-button type="primary" @click="viewVord(form.id)">棰勮</el-button> <el-button type="success" @click="downloadWord(form)">涓嬭浇</el-button> </div> </el-main> </template> <script> -import {inquiry, inquiryquestion} from '../../../api/News/pad' +import {createword, inquiry, inquiryquestion} from '../../../api/News/pad' +import {viewD, exportDoc, urlToBase64, viewWithImg, exportDocWidthImg} from "@/libs/word" export default { name: "mangeBL", @@ -187,6 +188,7 @@ methods: { getDataList() { inquiryquestion(this.id).then(res => { + console.log(res,'res') this.form = res.data.data this.value1.push(res.data.data.startTime) this.value1.push(res.data.data.endTime) @@ -226,28 +228,50 @@ }, //鐐瑰嚮棰勮 viewVord(data) { - // let wordData = this.transforData(data); - this.$router.push({ + /*if (data){ + this.dataFormSubmit(); + createword(data).then(res =>{ + // console.log(this.form.id) + console.log(res,'123456') + // window.android.toPreviewWord() + }) + }else { + createword(data).then(res =>{ + // console.log(this.form.id) + console.log(res,'123456') + // window.android.toPreviewWord() + }) + }*/ + createword(data).then(res =>{ + // console.log(this.form.id) + console.log(res,'123456') + window.android.toPreviewWord(res.data.data) + }).catch(err=>{ + console.log(err,'閿欒'); + }) + + + + /*this.$router.push({ path: '/WordYulan', query: { wordData: data, src:'/wordes/inquiryCause.docx', name:'璋冩煡璇㈤棶绗斿綍', } - }) + })*/ }, //鐐瑰嚮涓嬭浇 downloadWord(data){ - this.$router.push({ - path: '/WordYulan', - query: { - downWordData: data, - src:'/wordes/inquiryCause.docx', - name:'璋冩煡璇㈤棶绗斿綍', - } - }) - // WordView.methods.exportDoc(wordData, "/wordes/inquiryCause.docx", "璋冩煡璇㈤棶绗斿綍.docx") - }, + window.android.toDownLoadWord() + console.log(exportDoc(data, '/wordes/inquiryCause.docx','璋冩煡璇㈤棶绗斿綍'),'aaaa') + createword(data).then(res =>{ + // console.log(this.form.id) + console.log(res,'123456') + window.android.toPreviewWord(res.data.data) + }).catch(err=>{ + console.log(err,'閿欒'); + }) }, // 閬嶅巻鏁版嵁 transforData(obj) { let s = JSON.stringify(obj); -- Gitblit v1.9.1