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
| <template>
| <div>
| <el-dialog
| :title="!dataForm.id ? '新增' : '完善信息'"
| append-to-body
| :close-on-click-modal="false"
| :visible.sync="visible"
| v-dialogDrag>
| <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmit()"
| label-width="140px">
| <el-row>
| <el-col :span="12">
| <el-form-item label="年份">
| <el-date-picker
| style="width: 100%"
| v-model="dataForm.year"
| value-format="yyyy"
| type="year"
| placeholder="选择年">
| </el-date-picker>
| </el-form-item>
| </el-col>
| <el-col :span="12">
| <el-form-item label="文书号">
| <el-input v-model="dataForm.number"></el-input>
| </el-form-item>
| </el-col>
| </el-row>
| <el-row>
| <el-col :span="12">
| <el-form-item label="当事人" prop="personName">
| <el-input v-model="dataForm.personName" placeholder="请输入当事人"></el-input>
| </el-form-item>
| </el-col>
| <el-col :span="12">
| <el-form-item label="身份证号码" prop="idCard">
| <el-input v-model="dataForm.idCard" placeholder="请输入身份证号码"></el-input>
| </el-form-item>
| </el-col>
| </el-row>
| </el-form>
| <span slot="footer" class="dialog-footer">
| <el-button @click="visible = false">取消</el-button>
| <el-button type="primary" @click="viewVord(dataForm)">预览</el-button>
| <el-button type="success" @click="downloadWord(dataForm)">下载</el-button>
| </span>
| </el-dialog>
| <WordView v-if="WordViewShow" ref="WordView"></WordView>
| </div>
| </template>
|
| <script>
| import WordView from './word-view/index'
| import {exportDoc} from '../../../libs/word'
|
| export default {
| components: {
| WordView
| },
| data() {
| return {
| WordViewShow: false, //word文档是否显示
| visible: false,
| loadingSubmit:false,
| dataForm: {
| year:'',
| number:'',
| personName:'',
| idCard: '',
| chufaCheckList:[],
| fakuanCheckList:[],
| personAddress:'',
| zfName1:'',
| zfName2:'',
| zfNum1:'',
| zfNum2:'',
| id:'',
| days: '0'
|
| },
| dataRule: {
|
| personName: [
| {required: true, message: '当事人不能为空', trigger: 'blur'}
| ],
| personAddress: [
| {required: true, message: '当事人地址不能为空', trigger: 'blur'}
| ],
| idCard: [
| {required: true, message: '身份证号不能为空', trigger: 'blur'}
| ],
| zfName1: [
| {required: true, message: '执法人员1不能为空', trigger: 'blur'}
| ],
| zfName2: [
| {required: true, message: '执法人员2不能为空', trigger: 'blur'}
| ],
| }
| }
| },
| methods: {
| init(id) {
| this.dataForm.id = id || null;
| this.visible = true;
| this.$nextTick(() => {
| this.$refs['dataForm'].resetFields()
| if (this.dataForm.id) {
| this.$byutil.getData(this,this.$systemconfig.basePath+'/ffzf/ticket/'+id,null,res=>{
| this.dataForm = res.data
| })
| }
| })
| },
| viewVord(data) { //word预览
| this.WordViewShow = true
| this.$nextTick(() => {
| this.$refs.WordView.initWord(data,'/words/administratorReturn.docx')
| })
| },
| downloadWord(data) { //word下载
|
| exportDoc(data,'/words/administratorReturn.docx','送达回证行政处罚决定书')
| },
| }
| }
| </script>
| <style lang="scss">
| .el-checkbox.flexDate{
| display: flex;
| align-items: baseline;
| .el-checkbox__label{
| display: flex;
| flex-wrap: wrap;
| line-height: 2;
| white-space: initial;
| }
| }
| </style>
| <style lang="scss" scoped>
| .flexDate{
| display: flex;
| span{
| margin-left: 5px;
| }
| }
| .dialog-footer{
| display: flex;
| justify-content: center;
| .el-button{
| margin: 0 5px;
| }
| }
| </style>
|
|