From 66a8754e17eb6ecbc3fd251be683dd15408e3869 Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期四, 17 十一月 2022 17:40:11 +0800
Subject: [PATCH] 文书管理
---
src/views/operate/writManager/components/inquest_record/edit.vue | 337 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 333 insertions(+), 4 deletions(-)
diff --git a/src/views/operate/writManager/components/inquest_record/edit.vue b/src/views/operate/writManager/components/inquest_record/edit.vue
index ecd9d33..72869e7 100644
--- a/src/views/operate/writManager/components/inquest_record/edit.vue
+++ b/src/views/operate/writManager/components/inquest_record/edit.vue
@@ -1,8 +1,337 @@
<template>
- <div>inquest_record</div>
+ <div class="content">
+ <p style="text-align: center">
+ <input
+ placeholder="濉啓琛屾斂鎵ф硶鏈哄叧鍚嶇О"
+ v-model="form.org_name"
+ style="font-family: 鏂规灏忔爣瀹嬬畝浣�; font-size: 22pt; text-align: center"
+ />
+ </p>
+ <p style="text-align: center">
+ <span style="font-family: 鏂规灏忔爣瀹嬬畝浣�; font-size: 22pt"
+ >鐜板満鍕橀獙锛堟鏌ワ級绗斿綍</span
+ >
+ </p>
+ <p>
+ <span style="font-family: 'Times New Roman'; font-size: 14pt"
+ > </span
+ >
+ </p>
+ <p>
+ <span>鍕橀獙锛堟鏌ワ級鏃堕棿锛�</span>
+ <input style="width: 100px" v-model="form.jc_year" /><span>骞�</span>
+ <input style="width: 60px" v-model="form.jc_month" /><span>鏈�</span
+ ><input style="width: 60px" v-model="form.jc_day" /><span>鏃�</span
+ ><input style="width: 60px" v-model="form.jc_begin_h" /><span>鏃�</span
+ ><input style="width: 60px" v-model="form.jc_begin_m" /><span>鍒嗚嚦</span
+ ><input style="width: 60px" v-model="form.jc_end_h" /><span>鏃�</span
+ ><input style="width: 60px" v-model="form.jc_end_m" /><span>鍒�</span>
+ </p>
+ <p>
+ <span>鍕橀獙锛堟鏌ワ級鍦扮偣锛�</span
+ ><input style="width: 610px" v-model="form.jc_address" />
+ </p>
+ <p>
+ <span>鍕橀獙锛堟鏌ワ級浜猴細</span
+ ><input style="width: 260px" v-model="form.jc_user1" /><span
+ >鎵ф硶璇佸彿锛�</span
+ ><input style="width: 275px" v-model="form.jc_card1" />
+ </p>
+ <p style="text-indent: 112pt">
+ <input style="width: 260px" v-model="form.jc_user2" /><span
+ >鎵ф硶璇佸彿锛�</span
+ ><input style="width: 275px" v-model="form.jc_card2" />
+ </p>
+ <p>
+ <span>璁皗{ "\u3000\u3000" }}褰晎{ "\u3000\u3000" }}浜猴細</span
+ ><input style="width: 260px" v-model="form.recorder" />
+ <span>澶╂皵鎯呭喌锛�</span
+ ><input style="width: 275px" v-model="form.weather" />
+ </p>
+ <p>
+ <span>琚嫎楠岋紙妫�鏌ワ級浜哄鍚嶆垨鍚嶇О锛�</span
+ ><input style="width: 515px" v-model="form.bjc_name" />
+ </p>
+ <p>
+ <span>韬唤璇佸彿鎴栫粺涓�绀句細淇$敤浠g爜锛�</span
+ ><input style="width: 515px" v-model="form.bjc_code" />
+ </p>
+ <p>
+ <span>浣忓潃鎴栦綇鎵�锛�</span
+ ><input style="width: 300px" v-model="form.bjc_address" /><span
+ >鑱旂郴鐢佃瘽锛�</span
+ ><input style="width: 272px" v-model="form.bjc_phone" />
+ </p>
+ <p>
+ <span>鍦ㄥ満浜猴細</span
+ ><input style="width: 340px" v-model="form.current_person" /><span
+ >鑱屽姟锛�</span
+ ><input style="width: 308px" v-model="form.position" />
+ </p>
+ <p>
+ <span>鑱旂郴鐢佃瘽锛�</span
+ ><input style="width: 300px" v-model="form.current_person_phone" /><span
+ >涓庢湰妗堝叧绯伙細</span
+ ><input style="width: 275px" v-model="form.relation" />
+ </p>
+ <p>
+ <span>瑙佽瘉浜猴細</span
+ ><input style="width: 706px" v-model="form.eyewitness" />
+ </p>
+ <p style="text-indent: 24pt">
+ <span>鍑虹ず璇佷欢銆佽〃鏄庤韩浠界殑璁板綍锛氭垜浠槸</span
+ ><input style="width: 400px" v-model="form.enforcement_team" /><span
+ >鐨勮鏀挎墽娉曚汉鍛橈紝杩欐槸鎴戜滑鐨勬墽娉曡瘉浠讹紙鍑虹ず璇佷欢锛夛紝璇疯繃鐩‘璁ゃ�傜瓟锛�</span
+ ><input style="width: 400px" v-model="form.answer1" />
+ </p>
+ <p style="text-indent: 24pt">
+ <span
+ >鍛婄煡鐩稿叧鏉冨埄鍜屼箟鍔$殑璁板綍锛氭垜浠粖澶╀緷娉曡繘琛屽嫎楠岋紙妫�鏌ワ級骞朵簡瑙f湁鍏虫儏鍐碉紝鏈夊叧鍗曚綅鍜屼釜浜哄簲褰撶Н鏋侀厤鍚堬紝濡傚疄璇存槑鎯呭喌骞舵彁渚涙枃浠躲�佽祫鏂欙紝涓嶅緱鎷掔粷銆侀樆纰嶃�侀殣鐬掓垨鑰呮彁渚涜櫄鍋囨儏鍐点�傚悓鏃跺鏋滆涓烘垜浠笌鏈鏈夊埄瀹冲叧绯伙紝鍙兘褰卞搷鍏鍔炴锛屽彲浠ョ敵璇锋垜浠洖閬匡紝骞惰鏄庣悊鐢便�傝闂槸鍚﹂渶瑕佹墽娉曚汉鍛樺洖閬匡紵绛旓細</span
+ ><input style="width: 400px" v-model="form.answer2" />
+ </p>
+ <p style="text-indent: 24pt">
+ <span>鐜板満鍕橀獙锛堟鏌ワ級鎯呭喌锛�</span
+ ><input style="width: 700px" v-model="form.situation" /><span
+ class="underline"
+ >锛堢瑪褰曞熬椤靛簲娉ㄦ槑鈥滀笂杩扮瑪褰曞唴瀹癸紝璁板綍灞炲疄鈥濓級
+ </span>
+ </p>
+ <p style="margin: 0pt 3.5pt 0pt 0pt">
+ <span style="font-family: 'Times New Roman'; font-size: 14pt"
+ > </span
+ >
+ </p>
+ <p style="margin: 0pt 3.5pt 0pt 0pt">
+ <span>琚嫎楠岋紙妫�鏌ワ級浜虹鍚嶏細</span
+ ><span class="underline">{{
+ "\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000"
+ }}</span
+ ><span>{{ "\u3000" }}</span
+ ><span class="underline">{{ "\u3000\u3000\u3000\u3000\u3000" }}</span
+ ><span>骞�</span><span class="underline">{{ "\u3000\u3000\u3000" }}</span
+ ><span>鏈�</span><span class="underline">{{ "\u3000\u3000\u3000" }}</span
+ ><span>鏃�</span>
+ </p>
+ <p style="margin: 0pt 3.5pt 0pt 0pt">
+ <span>鍕橀獙锛堟鏌ワ級浜虹鍚嶏細</span
+ ><span class="underline">{{
+ "\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000"
+ }}</span
+ ><span>銆�</span
+ ><span class="underline">{{
+ "\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000"
+ }}</span
+ ><span>{{ "\u3000" }}</span
+ ><span class="underline">{{ "\u3000\u3000\u3000\u3000\u3000" }}</span
+ ><span>骞�</span><span class="underline">{{ "\u3000\u3000\u3000" }}</span
+ ><span>鏈�</span><span class="underline">{{ "\u3000\u3000\u3000" }}</span
+ ><span>鏃�</span>
+ </p>
+ <p style="margin: 0pt 3.5pt 0pt 0pt">
+ <span>璁板綍浜虹鍚嶏細</span><span>聽 </span
+ ><span class="underline">{{
+ "\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000"
+ }}</span
+ ><span>{{ "\u3000" }}</span
+ ><span class="underline">{{ "\u3000\u3000\u3000\u3000\u3000" }}</span
+ ><span>骞�</span><span class="underline">{{ "\u3000\u3000\u3000" }}</span
+ ><span>鏈�</span><span class="underline">{{ "\u3000\u3000\u3000" }}</span
+ ><span>鏃�</span>
+ </p>
+ <p style="margin: 0pt 3.5pt 0pt 0pt">
+ <span>瑙佽瘉浜虹鍚嶏細</span
+ ><span class="underline">{{
+ "\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000\u3000"
+ }}</span
+ ><span>{{ "\u3000" }}</span
+ ><span class="underline">{{ "\u3000\u3000\u3000\u3000\u3000" }}</span
+ ><span>骞�</span><span class="underline">{{ "\u3000\u3000\u3000" }}</span
+ ><span>鏈�</span><span class="underline">{{ "\u3000\u3000\u3000" }}</span
+ ><span>鏃�</span>
+ </p>
+ <p style="margin: 0pt 3.5pt 0pt 0pt">
+ <span>澶囨敞锛�</span><span>锛堝鏈夎璇佷汉锛屽簲澶囨敞瑙佽瘉浜鸿韩浠界瓑鍩烘湰淇℃伅锛�</span>
+ </p>
+ <p
+ style="
+ line-height: 22pt;
+ margin: 0pt;
+ orphans: 0;
+ text-align: right;
+ widows: 0;
+ "
+ >
+ <span style="font-family: 'Times New Roman'; font-size: 14pt"
+ > </span
+ >
+ </p>
+ <p>
+ <span style="font-family: Calibri; font-size: 10.5pt"> </span>
+ </p>
+
+ <div class="optionBtn">
+ <el-button
+ type="primary"
+ class="btn submit"
+ @click.native.prevent="handleSubmit"
+ >淇� 瀛�
+ </el-button>
+
+ <el-button
+ type="primary"
+ class="btn submit"
+ @click.native.prevent="handlePrint"
+ >鎵� 鍗�
+ </el-button>
+
+ <el-button
+ type="primary"
+ class="btn submit"
+ @click.native.prevent="handleExport"
+ >瀵煎嚭word
+ </el-button>
+ </div>
+ </div>
</template>
<script>
-export default {
-
+import { createNamespacedHelpers } from "vuex";
+const { mapActions } = createNamespacedHelpers("writ");
+import JSZipUtils from "jszip-utils";
+import Docxtemplater from "docxtemplater";
+import PizZip from "pizzip";
+import { saveAs } from "file-saver";
+function loadFile(url, callback) {
+ JSZipUtils.getBinaryContent(url, callback);
}
-</script>
\ No newline at end of file
+export default {
+ data() {
+ return {
+ form: {
+ org_name: "", //琛屾斂鏈哄叧鍚嶇О
+ jc_year: "", //妫�鏌ユ椂闂�-骞�
+ jc_month: "", //妫�鏌ユ椂闂�-鏈�
+ jc_day: "", //妫�鏌ユ椂闂�-鏃�
+ jc_begin_h: "", //妫�鏌ユ椂闂�-寮�濮嬫椂
+ jc_begin_m: "", //妫�鏌ユ椂闂�-寮�濮嬪垎
+ jc_end_h: "", //妫�鏌ユ椂闂�-缁撴潫鏃�
+ jc_end_m: "", //妫�鏌ユ椂闂�-缁撴潫鍒�
+ jc_address: "", //妫�鏌ュ湴鐐�
+ jc_user1: "", //妫�鏌ヤ汉1-鍚嶅瓧
+ jc_card1: "", //妫�鏌ヤ汉1-璇佸彿
+ jc_user2: "", //妫�鏌ヤ汉2-鍚嶅瓧
+ jc_card2: "", //妫�鏌ヤ汉2-璇佸彿
+ recorder: "", //璁板綍浜�
+ weather: "", //澶╂皵鎯呭喌
+ bjc_name: "", //琚鏌ヤ汉濮撳悕鎴栧悕绉�
+ bjc_code: "", //琚鏌ヨ韩浠借瘉鎴栫ぞ浼氫俊鐢ㄤ唬鐮�
+ bjc_address: "", //琚鏌ヤ汉浣忓潃
+ bjc_phone: "", //琚鏌ヤ汉鐢佃瘽
+ current_person: "", //鍦ㄥ満浜�
+ position: "", //鑱屽姟
+ current_person_phone: "", //鍦ㄥ満浜虹數璇�
+ relation: "", //涓庢湰妗堝叧绯�
+ eyewitness: "", //瑙佽瘉浜�
+ enforcement_team: "", //鎵ф硶鍗曚綅
+ answer1: "", //鍥炵瓟1
+ answer2: "", //鍥炵瓟2
+ situation: "", //鐜板満妫�鏌ユ儏鍐�
+ },
+ };
+ },
+ created() {
+ if (this.writ && this.writ.value) {
+ this.form = JSON.parse(this.writ.value);
+ }
+ },
+ methods: {
+ ...mapActions(["updateWrit"]),
+
+ handleSubmit() {
+ var data = {
+ baseCaseId: this.writ.baseCaseId,
+ value: JSON.stringify(this.form),
+ };
+ this.updateWrit(data).then((res) => {
+ this.$message({
+ type: "success",
+ message: "淇濆瓨鎴愬姛",
+ });
+ this.$emit("closeDialog", { flag: false, index: 1 });
+ });
+ },
+ handlePrint(e) {},
+ handleExport(e) {
+ let that = this;
+ loadFile(
+ /*鑾峰彇doc妯$増*/
+ "/inquest_record.docx", //"https://docxtemplater.com/tag-example.docx"
+ function (error, content) {
+ // eslint-disable-next-line no-debugger
+ debugger;
+ if (error) {
+ throw error;
+ }
+ const zip = new PizZip(content);
+ const doc = new Docxtemplater(zip, {
+ paragraphLoop: true,
+ linebreaks: true,
+ });
+ debugger;
+ doc.setData(that.form);
+ /*鍚戞枃妗d腑鍐欏叆鏁版嵁*/
+ doc.render();
+
+ /*杈撳嚭鏂囨。*/
+ const out = doc.getZip().generate({
+ type: "blob",
+ mimeType:
+ "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
+ });
+ // Output the document using Data-URI
+ saveAs(out, "鐜板満鍕橀獙锛堟鏌ワ級绗斿綍.docx");
+ }
+ );
+ },
+ },
+ props: ["writ", "changeDialog"],
+};
+</script>
+
+<style scoped>
+.content {
+ width: 90%;
+ margin: auto;
+ line-height: 2 !important;
+}
+p {
+ margin: 0pt;
+ orphans: 0;
+ text-align: justify;
+ widows: 0;
+}
+span {
+ font-family: 浠垮畫_GB2312;
+ font-size: 14pt;
+}
+
+.underline {
+ text-decoration: underline;
+}
+input {
+ outline-style: none;
+ border: 0px;
+ border-bottom: 1px solid #000;
+ padding: 5px 15px;
+ font-size: 14pt;
+ font-family: "Microsoft soft";
+}
+
+.optionBtn {
+ display: flex;
+ margin-top: 20px;
+ justify-content: center;
+}
+.btn {
+ padding: 12px 50px;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.8.0