From 2a158bb96daa1254a0b3d0de1961afbda59f8308 Mon Sep 17 00:00:00 2001 From: zhangxiaoxu123 <819527061@qq.com> Date: 星期三, 26 十月 2022 14:41:33 +0800 Subject: [PATCH] 细节 --- src/views/padSunmaryProcedure/word_mange/mangeJD.vue | 50 +++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 39 insertions(+), 11 deletions(-) diff --git a/src/views/padSunmaryProcedure/word_mange/mangeJD.vue b/src/views/padSunmaryProcedure/word_mange/mangeJD.vue index 4dd5f7e..61b8c95 100644 --- a/src/views/padSunmaryProcedure/word_mange/mangeJD.vue +++ b/src/views/padSunmaryProcedure/word_mange/mangeJD.vue @@ -111,9 +111,9 @@ </el-form> <div style="text-align: center"> - <el-button v-if="form.registerState=='0'" @click="dataFormSubmit('0')">淇濆瓨</el-button> - <el-button type="primary" @click="viewVord(dataForm)">棰勮</el-button> - <el-button v-if="form.registerState=='1'"type="success" @click="downloadWord(dataForm)">涓嬭浇</el-button> + <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 v-if="form.registerState=='1'" type="success" @click="downloadWord(form)">涓嬭浇</el-button> </div> </el-main> </template> @@ -124,9 +124,9 @@ export default { name: "mangeJD", - props: ['id'], data() { return { + id:'', form: { unitName: "", litigant: "", @@ -138,26 +138,54 @@ } } }, - created() { + mounted() { + this.id = this.$store.state.user.id this.init(); }, methods: { init() { - nowpenaltydecision(this.id).then(res => { - this.form = res.data.data + this.$nextTick(() => { + nowpenaltydecision(this.id).then(res => { + this.form = res.data.data + }) }) }, //鐐瑰嚮淇濆瓨鏁版嵁 dataFormSubmit() { - this.form.startTime = this.value1[0] - this.form.endTime = this.value1[1] - this.form.registerId = this.id + /*this.form.startTime = this.value1[0] + this.form.endTime = this.value1[1]*/ + //this.form.registerId = this.id inquiry(this.form).then(res => { if (res.data.code == 0) { this.$message.success("淇濆瓨鎴愬姛"); } }) - } + }, + //鐐瑰嚮棰勮 + viewVord(data) { + // let wordData = this.transforData(data); + this.$router.push({ + path: '/WordYulan', + query: { + wordData: data, + src: '/wordes/penaltyDecision.docx', + name: '澶勭綒鍐冲畾涔�', + } + }) + }, + //鐐瑰嚮涓嬭浇 + downloadWord(data) { + this.$router.push({ + path: '/WordYulan', + query: { + id: this.id, + downWordData: data, + src: '/wordes/penaltyDecision.docx', + name: '澶勭綒鍐冲畾涔�', + } + }) + // WordView.methods.exportDoc(wordData, "/wordes/inquiryCause.docx", "璋冩煡璇㈤棶绗斿綍.docx") + }, }, } </script> -- Gitblit v1.9.1