7ae33a74 by liangyifan

fqsq

1 parent 914d2b2e
1 <template> 1 <template>
2 <div> 2 <div>
3 3 <lb-table :column="InformationTable" border :key="key" :heightNum="390" :pagination="false" heightNumSetting
4 :data="tableData">
5 </lb-table>
4 </div> 6 </div>
5 </template> 7 </template>
6 <script> 8 <script>
7 9 let column = [
10 {
11 width: '60',
12 renderHeader: (h, scope) => {
13 return <i class="el-icon-plus pointer" onClick={() => { this.handleAdd() }} style="color:#409EFF"></i>
14 },
15 render: (h, scope) => {
16 return (
17 <i class="el-icon-minus pointer" onClick={() => { this.handleMinus(scope.$index, scope.row) }}></i>
18 )
19 }
20 },
21 {
22 label: '身份证读卡器',
23 align: 'center',
24 render: (h, scope) => {
25 return <el-button type="text" icon="el-icon-delete" onClick={() => { this.readClick(scope) }}>读取</el-button>
26 }
27 },
28 {
29 prop: "xm",
30 label: "姓名/名称",
31 },
32 {
33 prop: "zjzl",
34 label: "证件种类",
35 },
36 {
37 prop: "zjh",
38 label: "证件号",
39 },
40 {
41 prop: "fr",
42 label: "法人",
43 },
44 {
45 label: '操作',
46 width: '80',
47 align: 'center',
48 fixed: 'right',
49 render: (h, scope) => {
50 return <el-button type="text" icon="el-icon-delete" onClick={() => { vm.editClick(scope) }}>修改</el-button>
51 }
52 }
53 ]
8 export default { 54 export default {
9 /**注册组件*/ 55 /**注册组件*/
10 components: {}, 56 components: {},
11 data () { 57 data () {
12 return { 58 return {
13 59 key: 0,
60 tableData:[{
61 xm: '12',
62 zjzl: '32',
63 zjh: '123',
64 fr: "213123",
65 }],
66 InformationTable:column
14 }; 67 };
15 }, 68 },
69 watch: {
70 tableData: {
71 handler (newValue, oldValue) {
72 this.$emit('updateValue', newValue)
73 },
74 deep: true
75 }
76 },
77 created(){},
78 methods:{
79 // 添加
80 handleAdd () {
81 this.tableData.push(
82 {
83 xm: '',
84 zjzl: '',
85 zjh: '',
86 fr: "",
87 }
88 )
89 this.key++
90 },
91 // 减
92 handleMinus (index, row) {
93 this.tableData.splice(index, 1)
94 },
95 // 身份证读取
96 readClick(){},
97
98 // 修改
99 editClick(){},
100 }
16 } 101 }
17 </script> 102 </script>
18 <style scoped lang='scss'> 103 <style scoped lang='scss'>
......
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
161 import InformationTable from './InformationTable' 161 import InformationTable from './InformationTable'
162 export default { 162 export default {
163 /**注册组件*/ 163 /**注册组件*/
164 components: {}, 164 components: {InformationTable},
165 data () { 165 data () {
166 return { 166 return {
167 qllxOption:[], 167 qllxOption:[],
...@@ -199,9 +199,7 @@ export default { ...@@ -199,9 +199,7 @@ export default {
199 } 199 }
200 }; 200 };
201 }, 201 },
202 components:{ 202
203 InformationTable
204 },
205 methods: { 203 methods: {
206 204
207 }, 205 },
......