| | |
| | | </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", |
| | |
| | | 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) |
| | |
| | | }, |
| | | //点击预览 |
| | | 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); |