zhanghua
2025-04-14 829f5116884f98643ffc5b2a548a600d40c0cedb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
<template>
  <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"
        >&#xa0;</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>身份证号或统一社会信用代码:</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
        >告知相关权利和义务的记录:我们今天依法进行勘验(检查)并了解有关情况,有关单位和个人应当积极配合,如实说明情况并提供文件、资料,不得拒绝、阻碍、隐瞒或者提供虚假情况。同时如果认为我们与本案有利害关系,可能影响公正办案,可以申请我们回避,并说明理由。请问是否需要执法人员回避?答:</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"
        >&#xa0;</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"
        >&#xa0;</span
      >
    </p>
    <p>
      <span style="font-family: Calibri; font-size: 10.5pt">&#xa0;</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>
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);
}
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) {},
    judgeLength(word, length, char) {
      let wordLength = word.length;
      for (let index = 0; wordLength + index < length; index++) {
        word += char ? "  " : " ";
      }
      return word;
    },
    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
 
          if (error) {
            throw error;
          }
          const zip = new PizZip(content);
          const doc = new Docxtemplater(zip, {
            paragraphLoop: true,
            linebreaks: true,
          });
          var data = that.form;
          data.jc_address = that.judgeLength(data.jc_address, 20, true);
          data.jc_user1 = that.judgeLength(data.jc_user1, 9, true);
          data.jc_user2 = that.judgeLength(data.jc_user2, 9, true);
          data.jc_card1 = that.judgeLength(data.jc_card1, 13, false);
          data.jc_card2 = that.judgeLength(data.jc_card2, 12, false);
          data.recorder = that.judgeLength(data.recorder, 9, true);
          data.weather = that.judgeLength(data.weather, 7, true);
          data.bjc_name = that.judgeLength(data.bjc_name, 16, true);
          data.bjc_code = that.judgeLength(data.bjc_code, 36, false);
          data.bjc_address = that.judgeLength(data.bjc_address, 11, true);
          data.bjc_phone = that.judgeLength(data.bjc_phone, 12, false);
          data.current_person = that.judgeLength(data.current_person, 12, true);
          data.position = that.judgeLength(data.position, 9, true);
          data.current_person_phone = that.judgeLength(
            data.current_person_phone,
            24,
            false
          );
          data.relation = that.judgeLength(data.relation, 6, true);
          data.eyewitness = that.judgeLength(data.eyewitness, 25, true);
 
          doc.setData(data);
          /*向文档中写入数据*/
          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: 805px;
  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>