Commit 106c96572f8cf303fc9469265d8f4050c60e9628
1 parent
c8e61114
修改未检人员页面,含新增、编辑、查看弹框信息
Showing
2 changed files
with
148 additions
and
83 deletions
juvenile-prosecution-vue/src/views/business/MinorList.vue
@@ -18,7 +18,8 @@ | @@ -18,7 +18,8 @@ | ||
18 | </a-form> | 18 | </a-form> |
19 | 19 | ||
20 | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | 20 | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
21 | - <a-button type="primary" icon="download" @click="handleExportXls('未检人员模板')" style="margin-left:8px;">模板导出</a-button> | 21 | + <a-button type="primary" icon="download" @click="handleExportXls('未检人员模板')" style="margin-left:8px;">模板导出 |
22 | + </a-button> | ||
22 | <a-upload style="margin-left:8px;" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" | 23 | <a-upload style="margin-left:8px;" name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" |
23 | :action="importExcelUrl" @change="handleImportExcel"> | 24 | :action="importExcelUrl" @change="handleImportExcel"> |
24 | <a-button type="primary" icon="import">导入</a-button> | 25 | <a-button type="primary" icon="import">导入</a-button> |
@@ -71,8 +72,8 @@ | @@ -71,8 +72,8 @@ | ||
71 | 72 | ||
72 | <minor-modal ref="modalForm" @ok="modalFormOk" /> | 73 | <minor-modal ref="modalForm" @ok="modalFormOk" /> |
73 | <!-- 详情 --> | 74 | <!-- 详情 --> |
74 | - <a-modal v-model:visible="infoVisible" title="未成年信息" :footer=null :width="1000" > | ||
75 | - <a-descriptions bordered layout="vertical" :column="4"> | 75 | + <a-modal v-model:visible="infoVisible" title="未成年信息" :footer=null :width="1000"> |
76 | + <a-descriptions bordered size="middle" :column="2" class="desc_info"> | ||
76 | <a-descriptions-item label="户号">{{ info.householdNum }}</a-descriptions-item> | 77 | <a-descriptions-item label="户号">{{ info.householdNum }}</a-descriptions-item> |
77 | <a-descriptions-item label="人员编号">{{ info.number }}</a-descriptions-item> | 78 | <a-descriptions-item label="人员编号">{{ info.number }}</a-descriptions-item> |
78 | <a-descriptions-item label="姓名">{{ info.name }}</a-descriptions-item> | 79 | <a-descriptions-item label="姓名">{{ info.name }}</a-descriptions-item> |
@@ -82,18 +83,18 @@ | @@ -82,18 +83,18 @@ | ||
82 | <a-descriptions-item label="学校名称">{{ info.schoolName }}</a-descriptions-item> | 83 | <a-descriptions-item label="学校名称">{{ info.schoolName }}</a-descriptions-item> |
83 | <a-descriptions-item label="入学年份">{{ info.startYear }}</a-descriptions-item> | 84 | <a-descriptions-item label="入学年份">{{ info.startYear }}</a-descriptions-item> |
84 | <a-descriptions-item label="是否失学">{{ info.school_dictText }}</a-descriptions-item> | 85 | <a-descriptions-item label="是否失学">{{ info.school_dictText }}</a-descriptions-item> |
85 | - <a-descriptions-item label="家庭住址" >{{ info.address }}</a-descriptions-item> | ||
86 | - <a-descriptions-item label="是否失学">{{ info.school_dictText }}</a-descriptions-item> | ||
87 | - <a-descriptions-item label="学校名称">{{ info.schoolName }}</a-descriptions-item> | ||
88 | <a-descriptions-item label="监护人">{{ info.guardian }}</a-descriptions-item> | 86 | <a-descriptions-item label="监护人">{{ info.guardian }}</a-descriptions-item> |
89 | <a-descriptions-item label="监护人关系">{{ info.relation }}</a-descriptions-item> | 87 | <a-descriptions-item label="监护人关系">{{ info.relation }}</a-descriptions-item> |
90 | - <a-descriptions-item label="重点关注原因" :span="2">{{ info.reason_dictText }}</a-descriptions-item> | ||
91 | - <a-descriptions-item label="特殊原因" :span="4">{{ info.specialReason }}</a-descriptions-item> | ||
92 | - <a-descriptions-item label="备注" :span="4">{{ info.remark }}</a-descriptions-item> | 88 | + <a-descriptions-item label="重点关注原因">{{ info.reason_dictText }}</a-descriptions-item> |
89 | + <a-descriptions-item label="特殊原因" :span="2">{{ info.specialReason }}</a-descriptions-item> | ||
90 | + <a-descriptions-item label="家庭住址" :span="2">{{ info.address }}</a-descriptions-item> | ||
91 | + <a-descriptions-item label="备注" :span="2">{{ info.remark }}</a-descriptions-item> | ||
93 | </a-descriptions> | 92 | </a-descriptions> |
94 | - <a-tabs v-model:activeKey="activeKey"> | 93 | + <a-tabs v-model:activeKey="activeKey" type="card"> |
95 | <a-tab-pane key="1" tab="家庭成员"> | 94 | <a-tab-pane key="1" tab="家庭成员"> |
96 | - <a-table bordered :columns="familyColumns" :data-source="familyDatas" :scroll="{ x: true }" rowKey="id" :loading="familyLoading" :pagination="familyPagination"> | 95 | + <a-table bordered :columns="familyColumns" :data-source="familyDatas" :scroll="{ x: '100%', y: 240 }" |
96 | + rowKey="id" | ||
97 | + :loading="familyLoading" :pagination="familyPagination" size="middle" class="j-table-force-nowrap"> | ||
97 | <span slot="num" slot-scope="text,record"> | 98 | <span slot="num" slot-scope="text,record"> |
98 | <j-ellipsis :value="text" :length="8" /> | 99 | <j-ellipsis :value="text" :length="8" /> |
99 | </span> | 100 | </span> |
@@ -113,7 +114,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' | @@ -113,7 +114,7 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' | ||
113 | import { GetAge } from '@/utils/util' | 114 | import { GetAge } from '@/utils/util' |
114 | import MinorModal from './modules/MinorModal' | 115 | import MinorModal from './modules/MinorModal' |
115 | import '@/assets/less/TableExpand.less' | 116 | import '@/assets/less/TableExpand.less' |
116 | -import { getAction,downFile } from '@api/manage' | 117 | +import { getAction, downFile } from '@api/manage' |
117 | import { FormTypes } from '@/utils/JEditableTableUtil' | 118 | import { FormTypes } from '@/utils/JEditableTableUtil' |
118 | //引入JS方法 | 119 | //引入JS方法 |
119 | import { filterDictTextByCache } from '@/components/dict/JDictSelectUtil' | 120 | import { filterDictTextByCache } from '@/components/dict/JDictSelectUtil' |
@@ -229,33 +230,40 @@ export default { | @@ -229,33 +230,40 @@ export default { | ||
229 | { | 230 | { |
230 | title: '姓名', | 231 | title: '姓名', |
231 | align: 'center', | 232 | align: 'center', |
233 | + width: 80, | ||
232 | dataIndex: 'name' | 234 | dataIndex: 'name' |
233 | }, | 235 | }, |
234 | { | 236 | { |
235 | title: '身份证号', | 237 | title: '身份证号', |
236 | align: 'center', | 238 | align: 'center', |
239 | + width: 170, | ||
237 | dataIndex: 'identity' | 240 | dataIndex: 'identity' |
238 | }, | 241 | }, |
239 | { | 242 | { |
240 | title: '与户主的关系', | 243 | title: '与户主的关系', |
241 | align: 'center', | 244 | align: 'center', |
245 | + width: 120, | ||
242 | dataIndex: 'relation' | 246 | dataIndex: 'relation' |
243 | }, | 247 | }, |
244 | { | 248 | { |
245 | title: '行政区划', | 249 | title: '行政区划', |
246 | align: 'center', | 250 | align: 'center', |
251 | + width: 120, | ||
247 | dataIndex: 'division', | 252 | dataIndex: 'division', |
248 | scopedSlots: { customRender: 'longText' } | 253 | scopedSlots: { customRender: 'longText' } |
249 | }, | 254 | }, |
250 | { | 255 | { |
251 | title: '现住址', | 256 | title: '现住址', |
252 | align: 'center', | 257 | align: 'center', |
258 | + width: 200, | ||
259 | + ellipsis: true, | ||
253 | dataIndex: 'address', | 260 | dataIndex: 'address', |
254 | scopedSlots: { customRender: 'longText' } | 261 | scopedSlots: { customRender: 'longText' } |
255 | }, | 262 | }, |
256 | { | 263 | { |
257 | title: '是否犯罪', | 264 | title: '是否犯罪', |
258 | align: 'center', | 265 | align: 'center', |
266 | + width: 100, | ||
259 | dataIndex: 'crime', | 267 | dataIndex: 'crime', |
260 | customRender: (text) => { | 268 | customRender: (text) => { |
261 | //字典值翻译通用方法 | 269 | //字典值翻译通用方法 |
@@ -265,12 +273,16 @@ export default { | @@ -265,12 +273,16 @@ export default { | ||
265 | { | 273 | { |
266 | title: '犯罪原因', | 274 | title: '犯罪原因', |
267 | align: 'center', | 275 | align: 'center', |
276 | + width: 200, | ||
277 | + ellipsis: true, | ||
268 | dataIndex: 'reason', | 278 | dataIndex: 'reason', |
269 | scopedSlots: { customRender: 'longText' } | 279 | scopedSlots: { customRender: 'longText' } |
270 | }, | 280 | }, |
271 | { | 281 | { |
272 | title: '其他参考信息', | 282 | title: '其他参考信息', |
273 | align: 'center', | 283 | align: 'center', |
284 | + width: 200, | ||
285 | + ellipsis: true, | ||
274 | dataIndex: 'other', | 286 | dataIndex: 'other', |
275 | scopedSlots: { customRender: 'longText' } | 287 | scopedSlots: { customRender: 'longText' } |
276 | } | 288 | } |
@@ -286,7 +298,7 @@ export default { | @@ -286,7 +298,7 @@ export default { | ||
286 | showQuickJumper: true, | 298 | showQuickJumper: true, |
287 | total: 0 | 299 | total: 0 |
288 | }, | 300 | }, |
289 | - familyLoading:false, | 301 | + familyLoading: false |
290 | } | 302 | } |
291 | }, | 303 | }, |
292 | created() { | 304 | created() { |
@@ -302,19 +314,19 @@ export default { | @@ -302,19 +314,19 @@ export default { | ||
302 | return GetAge(identity) | 314 | return GetAge(identity) |
303 | }, | 315 | }, |
304 | handleDetail(record) { | 316 | handleDetail(record) { |
305 | - var that = this; | ||
306 | - that.info = record; | ||
307 | - that.infoVisible = true; | ||
308 | - that.familyDatas=[]; | ||
309 | - if(null!==record.householdNum && ''!==record.householdNum && undefined!==record.householdNum){ | 317 | + var that = this |
318 | + that.info = record | ||
319 | + that.infoVisible = true | ||
320 | + that.familyDatas = [] | ||
321 | + if (null !== record.householdNum && '' !== record.householdNum && undefined !== record.householdNum) { | ||
310 | let params = { householdNum: record.householdNum } | 322 | let params = { householdNum: record.householdNum } |
311 | - that.familyLoading=true; | 323 | + that.familyLoading = true |
312 | getAction(this.url.familys, params).then(res => { | 324 | getAction(this.url.familys, params).then(res => { |
313 | if (res.success) { | 325 | if (res.success) { |
314 | - that.familyLoading=false; | 326 | + that.familyLoading = false |
315 | that.familyDatas = res.result || [] | 327 | that.familyDatas = res.result || [] |
316 | } else { | 328 | } else { |
317 | - that.familyLoading=false; | 329 | + that.familyLoading = false |
318 | } | 330 | } |
319 | }) | 331 | }) |
320 | } | 332 | } |
@@ -371,8 +383,28 @@ export default { | @@ -371,8 +383,28 @@ export default { | ||
371 | </style> | 383 | </style> |
372 | 384 | ||
373 | <style> | 385 | <style> |
374 | -.ant-modal-body{ | ||
375 | - max-height: 700px; | ||
376 | - overflow-y: auto; | 386 | +.j-table-force-nowrap .ant-table-body { |
387 | + scrollbar-width: thin; | ||
377 | } | 388 | } |
378 | -</style> | 389 | + |
390 | +/* 设置滚动条的样式 */ | ||
391 | +.j-table-force-nowrap .ant-table-body::-webkit-scrollbar { | ||
392 | + width: 10px; | ||
393 | + height: 10px; | ||
394 | +} | ||
395 | + | ||
396 | +/* 滚动槽 */ | ||
397 | +.j-table-force-nowrap .ant-table-body::-webkit-scrollbar-track { | ||
398 | + background: #f5f5f5; | ||
399 | +} | ||
400 | + | ||
401 | +/* 滚动条滑块 */ | ||
402 | +.j-table-force-nowrap .ant-table-body::-webkit-scrollbar-thumb { | ||
403 | + background: #dedede; | ||
404 | + -webkit-box-shadow: none; | ||
405 | +} | ||
406 | + | ||
407 | +.desc_info .ant-descriptions-item-label { | ||
408 | + width: 140px; | ||
409 | +} | ||
410 | +</style> | ||
379 | \ No newline at end of file | 411 | \ No newline at end of file |
juvenile-prosecution-vue/src/views/business/modules/MinorModal.vue
@@ -36,13 +36,11 @@ | @@ -36,13 +36,11 @@ | ||
36 | <j-dict-select-tag v-model="model.gender" dictCode="sex" placeholder="请选择性别" /> | 36 | <j-dict-select-tag v-model="model.gender" dictCode="sex" placeholder="请选择性别" /> |
37 | </a-form-model-item> | 37 | </a-form-model-item> |
38 | </a-col> | 38 | </a-col> |
39 | - </a-row> | ||
40 | - <a-col :span="12"> | ||
41 | - <a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="identity"> | ||
42 | - <a-input v-model="model.identity" placeholder="请输入身份证号"></a-input> | ||
43 | - </a-form-model-item> | ||
44 | - </a-col> | ||
45 | - <a-row> | 39 | + <a-col :span="12"> |
40 | + <a-form-model-item label="身份证号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="identity"> | ||
41 | + <a-input v-model="model.identity" placeholder="请输入身份证号"></a-input> | ||
42 | + </a-form-model-item> | ||
43 | + </a-col> | ||
46 | <a-col :span="12"> | 44 | <a-col :span="12"> |
47 | <a-form-model-item label="学校名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="schoolName"> | 45 | <a-form-model-item label="学校名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="schoolName"> |
48 | <a-input v-model="model.schoolName" placeholder="请输入学校名称"></a-input> | 46 | <a-input v-model="model.schoolName" placeholder="请输入学校名称"></a-input> |
@@ -53,21 +51,12 @@ | @@ -53,21 +51,12 @@ | ||
53 | <a-input v-model="model.startYear" placeholder="请输入入学年份"></a-input> | 51 | <a-input v-model="model.startYear" placeholder="请输入入学年份"></a-input> |
54 | </a-form-model-item> | 52 | </a-form-model-item> |
55 | </a-col> | 53 | </a-col> |
56 | - </a-row> | ||
57 | - <a-row> | ||
58 | <a-col :span="12"> | 54 | <a-col :span="12"> |
59 | <a-form-model-item label="是否失学" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="school"> | 55 | <a-form-model-item label="是否失学" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="school"> |
60 | <j-dict-select-tag v-model="model.school" dictCode="school_status" placeholder="请选择是否失学" /> | 56 | <j-dict-select-tag v-model="model.school" dictCode="school_status" placeholder="请选择是否失学" /> |
61 | </a-form-model-item> | 57 | </a-form-model-item> |
62 | </a-col> | 58 | </a-col> |
63 | <a-col :span="12"> | 59 | <a-col :span="12"> |
64 | - <a-form-model-item label="家庭住址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> | ||
65 | - <a-textarea v-model="model.address" placeholder="请输入家庭住址" :rows="1" ></a-textarea> | ||
66 | - </a-form-model-item> | ||
67 | - </a-col> | ||
68 | - </a-row> | ||
69 | - <a-row> | ||
70 | - <a-col :span="12"> | ||
71 | <a-form-model-item label="监护人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guardian"> | 60 | <a-form-model-item label="监护人" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="guardian"> |
72 | <a-input v-model="model.guardian" placeholder="请输入监护人"></a-input> | 61 | <a-input v-model="model.guardian" placeholder="请输入监护人"></a-input> |
73 | </a-form-model-item> | 62 | </a-form-model-item> |
@@ -77,41 +66,43 @@ | @@ -77,41 +66,43 @@ | ||
77 | <a-input v-model="model.relation" placeholder="请输入监护人关系"></a-input> | 66 | <a-input v-model="model.relation" placeholder="请输入监护人关系"></a-input> |
78 | </a-form-model-item> | 67 | </a-form-model-item> |
79 | </a-col> | 68 | </a-col> |
80 | - </a-row> | ||
81 | - <a-row> | ||
82 | <a-col :span="12"> | 69 | <a-col :span="12"> |
83 | - <a-form-model-item label="重点关注原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reason"> | ||
84 | - <j-dict-select-tag v-model="model.reason" dictCode="attention_reason" placeholder="请选择重点关注原因" /> | 70 | + <a-form-model-item label="家庭住址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="address"> |
71 | + <a-textarea v-model="model.address" placeholder="请输入家庭住址" :rows="1"></a-textarea> | ||
85 | </a-form-model-item> | 72 | </a-form-model-item> |
86 | </a-col> | 73 | </a-col> |
87 | <a-col :span="12"> | 74 | <a-col :span="12"> |
88 | <a-form-model-item label="特殊原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specialReason"> | 75 | <a-form-model-item label="特殊原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="specialReason"> |
89 | - <a-textarea v-model="model.specialReason" placeholder="请输入特殊原因"></a-textarea> | 76 | + <a-textarea v-model="model.specialReason" placeholder="请输入特殊原因" :rows="1"></a-textarea> |
77 | + </a-form-model-item> | ||
78 | + </a-col> | ||
79 | + <a-col :span="12"> | ||
80 | + <a-form-model-item label="重点关注原因" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="reason"> | ||
81 | + <j-dict-select-tag v-model="model.reason" dictCode="attention_reason" placeholder="请选择重点关注原因" /> | ||
90 | </a-form-model-item> | 82 | </a-form-model-item> |
91 | </a-col> | 83 | </a-col> |
92 | <a-col :span="12"> | 84 | <a-col :span="12"> |
93 | <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> | 85 | <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark"> |
94 | - <a-textarea v-model="model.remark" placeholder="请输入备注"></a-textarea> | 86 | + <a-textarea v-model="model.remark" placeholder="请输入备注" :rows="1"></a-textarea> |
95 | </a-form-model-item> | 87 | </a-form-model-item> |
96 | </a-col> | 88 | </a-col> |
97 | </a-row> | 89 | </a-row> |
98 | </a-form-model> | 90 | </a-form-model> |
99 | </j-form-container> | 91 | </j-form-container> |
100 | <!-- 子表单区域 --> | 92 | <!-- 子表单区域 --> |
101 | - <a-tabs activeKey="1" style="margin-top: -20px"> | 93 | + <a-tabs activeKey="1" type="card"> |
102 | <a-tab-pane tab="家庭成员" key="1" :forceRender="true"> | 94 | <a-tab-pane tab="家庭成员" key="1" :forceRender="true"> |
103 | <j-editable-table | 95 | <j-editable-table |
96 | + class="main_table" | ||
104 | ref="editableTable" | 97 | ref="editableTable" |
105 | :loading="familyLoading" | 98 | :loading="familyLoading" |
106 | sticky :columns="columns" | 99 | sticky :columns="columns" |
107 | :dataSource="dataSource" | 100 | :dataSource="dataSource" |
108 | - :maxHeight="190" | 101 | + :maxHeight="192" |
109 | :rowNumber="true" | 102 | :rowNumber="true" |
110 | :rowSelection="true" | 103 | :rowSelection="true" |
111 | :actionButton="true" /> | 104 | :actionButton="true" /> |
112 | - | ||
113 | </a-tab-pane> | 105 | </a-tab-pane> |
114 | - | ||
115 | </a-tabs> | 106 | </a-tabs> |
116 | </a-spin> | 107 | </a-spin> |
117 | </j-modal> | 108 | </j-modal> |
@@ -133,17 +124,16 @@ export default { | @@ -133,17 +124,16 @@ export default { | ||
133 | return { | 124 | return { |
134 | confirmLoading: false, | 125 | confirmLoading: false, |
135 | title: '', | 126 | title: '', |
136 | - width: 800, | ||
137 | visible: false, | 127 | visible: false, |
138 | disableSubmit: false, | 128 | disableSubmit: false, |
139 | model: {}, | 129 | model: {}, |
140 | labelCol: { | 130 | labelCol: { |
141 | xs: { span: 24 }, | 131 | xs: { span: 24 }, |
142 | - sm: { span: 6 } | 132 | + sm: { span: 5 } |
143 | }, | 133 | }, |
144 | wrapperCol: { | 134 | wrapperCol: { |
145 | xs: { span: 24 }, | 135 | xs: { span: 24 }, |
146 | - sm: { span: 16 } | 136 | + sm: { span: 19 } |
147 | }, | 137 | }, |
148 | labelCol2: { | 138 | labelCol2: { |
149 | xs: { span: 24 }, | 139 | xs: { span: 24 }, |
@@ -154,12 +144,12 @@ export default { | @@ -154,12 +144,12 @@ export default { | ||
154 | sm: { span: 20 } | 144 | sm: { span: 20 } |
155 | }, | 145 | }, |
156 | validatorRules: { | 146 | validatorRules: { |
157 | - householdNum:[ { required: true, message: '请输入户号' },], | ||
158 | - name:[ { required: true, message: '请输入姓名' },], | ||
159 | - gender:[ { required: true, message: '请选择性别' },], | ||
160 | - identity:[ {required: true,validator:this.validateIdCard}], | ||
161 | - relation:[ { required: true, message: '请输入监护人关系' },], | ||
162 | - guardian:[ { required: true, message: '请输入监护人' },], | 147 | + householdNum: [{ required: true, message: '请输入户号' }], |
148 | + name: [{ required: true, message: '请输入姓名' }], | ||
149 | + gender: [{ required: true, message: '请选择性别' }], | ||
150 | + identity: [{ required: true, validator: this.validateIdCard }], | ||
151 | + relation: [{ required: true, message: '请输入监护人关系' }], | ||
152 | + guardian: [{ required: true, message: '请输入监护人' }] | ||
163 | }, | 153 | }, |
164 | url: { | 154 | url: { |
165 | add: '/sys/minor/add', | 155 | add: '/sys/minor/add', |
@@ -173,7 +163,7 @@ export default { | @@ -173,7 +163,7 @@ export default { | ||
173 | { | 163 | { |
174 | title: '户号', | 164 | title: '户号', |
175 | key: 'householdNum', | 165 | key: 'householdNum', |
176 | - width: '250px', | 166 | + width: '230px', |
177 | type: FormTypes.input, | 167 | type: FormTypes.input, |
178 | defaultValue: '', | 168 | defaultValue: '', |
179 | placeholder: '请输入${title}', | 169 | placeholder: '请输入${title}', |
@@ -182,7 +172,7 @@ export default { | @@ -182,7 +172,7 @@ export default { | ||
182 | { | 172 | { |
183 | title: '人员编号', | 173 | title: '人员编号', |
184 | key: 'number', | 174 | key: 'number', |
185 | - width: '180px', | 175 | + width: '230px', |
186 | type: FormTypes.input, | 176 | type: FormTypes.input, |
187 | defaultValue: '', | 177 | defaultValue: '', |
188 | placeholder: '请输入${title}', | 178 | placeholder: '请输入${title}', |
@@ -191,7 +181,7 @@ export default { | @@ -191,7 +181,7 @@ export default { | ||
191 | { | 181 | { |
192 | title: '姓名', | 182 | title: '姓名', |
193 | key: 'name', | 183 | key: 'name', |
194 | - width: '180px', | 184 | + width: '100px', |
195 | type: FormTypes.input, | 185 | type: FormTypes.input, |
196 | defaultValue: '', | 186 | defaultValue: '', |
197 | placeholder: '请输入${title}', | 187 | placeholder: '请输入${title}', |
@@ -200,20 +190,20 @@ export default { | @@ -200,20 +190,20 @@ export default { | ||
200 | { | 190 | { |
201 | title: '身份证号', | 191 | title: '身份证号', |
202 | key: 'identity', | 192 | key: 'identity', |
203 | - width: '200px', | 193 | + width: '190px', |
204 | type: FormTypes.input, | 194 | type: FormTypes.input, |
205 | defaultValue: '', | 195 | defaultValue: '', |
206 | placeholder: '请输入${title}', | 196 | placeholder: '请输入${title}', |
207 | validateRules: [{ | 197 | validateRules: [{ |
208 | // pattern: '/(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)/', | 198 | // pattern: '/(^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$)|(^[1-9]\\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}$)/', |
209 | - pattern:'^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$', | 199 | + pattern: '^\d{6}(18|19|20)?\d{2}(0[1-9]|1[012])(0[1-9]|[12]\d|3[01])\d{3}(\d|[xX])$', |
210 | message: '${title}格式不正确' | 200 | message: '${title}格式不正确' |
211 | }] | 201 | }] |
212 | }, | 202 | }, |
213 | { | 203 | { |
214 | title: '与户主的关系', | 204 | title: '与户主的关系', |
215 | key: 'relation', | 205 | key: 'relation', |
216 | - width: '180px', | 206 | + width: '120px', |
217 | type: FormTypes.input, | 207 | type: FormTypes.input, |
218 | defaultValue: '', | 208 | defaultValue: '', |
219 | placeholder: '请输入${title}', | 209 | placeholder: '请输入${title}', |
@@ -231,15 +221,15 @@ export default { | @@ -231,15 +221,15 @@ export default { | ||
231 | { | 221 | { |
232 | title: '现住址', | 222 | title: '现住址', |
233 | key: 'address', | 223 | key: 'address', |
234 | - width: '180px', | 224 | + width: '200px', |
235 | type: FormTypes.input_pop, | 225 | type: FormTypes.input_pop, |
236 | defaultValue: '', | 226 | defaultValue: '', |
237 | - placeholder: '请输入${title}', | 227 | + placeholder: '请输入${title}' |
238 | }, | 228 | }, |
239 | { | 229 | { |
240 | title: '是否犯罪', | 230 | title: '是否犯罪', |
241 | key: 'crime', | 231 | key: 'crime', |
242 | - width: '200px', | 232 | + width: '100px', |
243 | type: FormTypes.select, | 233 | type: FormTypes.select, |
244 | options: [], | 234 | options: [], |
245 | dictCode: 'is_crime', | 235 | dictCode: 'is_crime', |
@@ -249,18 +239,18 @@ export default { | @@ -249,18 +239,18 @@ export default { | ||
249 | { | 239 | { |
250 | title: '犯罪原因', | 240 | title: '犯罪原因', |
251 | key: 'reason', | 241 | key: 'reason', |
252 | - width: '250px', | 242 | + width: '200px', |
253 | type: FormTypes.input_pop, | 243 | type: FormTypes.input_pop, |
254 | defaultValue: '', | 244 | defaultValue: '', |
255 | - placeholder: '请输入${title}', | 245 | + placeholder: '请输入${title}' |
256 | }, | 246 | }, |
257 | { | 247 | { |
258 | title: '其他参考信息', | 248 | title: '其他参考信息', |
259 | key: 'other', | 249 | key: 'other', |
260 | - width: '250px', | 250 | + width: '200px', |
261 | type: FormTypes.input_pop, | 251 | type: FormTypes.input_pop, |
262 | defaultValue: '', | 252 | defaultValue: '', |
263 | - placeholder: '请输入${title}', | 253 | + placeholder: '请输入${title}' |
264 | } | 254 | } |
265 | ] | 255 | ] |
266 | } | 256 | } |
@@ -283,17 +273,17 @@ export default { | @@ -283,17 +273,17 @@ export default { | ||
283 | this.modelDefault = JSON.parse(JSON.stringify(this.model)) | 273 | this.modelDefault = JSON.parse(JSON.stringify(this.model)) |
284 | }, | 274 | }, |
285 | methods: { | 275 | methods: { |
286 | - getAgeByIdentity(identity){ | ||
287 | - return GetAge(identity); | 276 | + getAgeByIdentity(identity) { |
277 | + return GetAge(identity) | ||
288 | }, | 278 | }, |
289 | - validateIdCard(rule,value,callback){ | 279 | + validateIdCard(rule, value, callback) { |
290 | console.log(value) | 280 | console.log(value) |
291 | - if(undefined==value || null==value || ''==value){ | ||
292 | - callback("请输入正确的公民身份号码!"); | ||
293 | - }else if ( !value || new RegExp(/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/).test(value)){ | ||
294 | - callback(); | ||
295 | - }else{ | ||
296 | - callback("请输入正确的公民身份号码!"); | 281 | + if (undefined == value || null == value || '' == value) { |
282 | + callback('请输入正确的公民身份号码!') | ||
283 | + } else if (!value || new RegExp(/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{7}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}$)/).test(value)) { | ||
284 | + callback() | ||
285 | + } else { | ||
286 | + callback('请输入正确的公民身份号码!') | ||
297 | } | 287 | } |
298 | }, | 288 | }, |
299 | // 获取所有的editableTable实例 | 289 | // 获取所有的editableTable实例 |
@@ -304,7 +294,7 @@ export default { | @@ -304,7 +294,7 @@ export default { | ||
304 | }, | 294 | }, |
305 | 295 | ||
306 | add() { | 296 | add() { |
307 | - this.dataSource=[]; | 297 | + this.dataSource = [] |
308 | // 默认新增一条数据 | 298 | // 默认新增一条数据 |
309 | this.getAllTable().then(editableTables => { | 299 | this.getAllTable().then(editableTables => { |
310 | editableTables[0].add() | 300 | editableTables[0].add() |
@@ -397,5 +387,48 @@ export default { | @@ -397,5 +387,48 @@ export default { | ||
397 | </script> | 387 | </script> |
398 | 388 | ||
399 | <style scoped> | 389 | <style scoped> |
390 | +.ant-form-item { | ||
391 | + margin-bottom: 10px; | ||
392 | +} | ||
393 | +</style> | ||
394 | + | ||
395 | +<style> | ||
396 | +.main_table .input-table .thead { | ||
397 | + overflow-y: auto; | ||
398 | +} | ||
400 | 399 | ||
400 | +.main_table .input-table .thead .tr { | ||
401 | + overflow-y: auto; | ||
402 | +} | ||
403 | + | ||
404 | +.main_table .input-table .scroll-view { | ||
405 | + overflow-y: auto; | ||
406 | + scrollbar-width: thin; | ||
407 | +} | ||
408 | + | ||
409 | +/* 设置滚动条的样式 */ | ||
410 | +.main_table .input-table .scroll-view::-webkit-scrollbar { | ||
411 | + width: 10px; | ||
412 | + height: 10px; | ||
413 | +} | ||
414 | + | ||
415 | +/* 滚动槽 */ | ||
416 | +.main_table .input-table .scroll-view::-webkit-scrollbar-track { | ||
417 | + background: #f5f5f5; | ||
418 | +} | ||
419 | + | ||
420 | +/* 滚动条滑块 */ | ||
421 | +.main_table .input-table .scroll-view::-webkit-scrollbar-thumb { | ||
422 | + background: #dedede; | ||
423 | + -webkit-box-shadow: none; | ||
424 | +} | ||
425 | + | ||
426 | +.main_table .ant-row-flex { | ||
427 | + margin-top: -55px; | ||
428 | + flex-flow: row-reverse; | ||
429 | +} | ||
430 | + | ||
431 | +.main_table .ant-row-flex .action-button { | ||
432 | + margin-bottom: 20px; | ||
433 | +} | ||
401 | </style> | 434 | </style> |
402 | \ No newline at end of file | 435 | \ No newline at end of file |