style:字典
Showing
4 changed files
with
41 additions
and
34 deletions
... | @@ -45,11 +45,11 @@ export default { | ... | @@ -45,11 +45,11 @@ export default { |
45 | column: [], | 45 | column: [], |
46 | columns: [ | 46 | columns: [ |
47 | { | 47 | { |
48 | width: '60', | 48 | width: '70', |
49 | renderHeader: (h, scope) => { | 49 | renderHeader: (h, scope) => { |
50 | return (<div> | 50 | return (<div> |
51 | { | 51 | { |
52 | this.details.isenable == 2 ? | 52 | this.details.isenable === '0' ? |
53 | <span>序号</span> : | 53 | <span>序号</span> : |
54 | <i class="el-icon-plus" onClick={() => { this.handleAdd() }} style="cursor:pointer;color:#409EFF"></i> | 54 | <i class="el-icon-plus" onClick={() => { this.handleAdd() }} style="cursor:pointer;color:#409EFF"></i> |
55 | } | 55 | } |
... | @@ -68,14 +68,14 @@ export default { | ... | @@ -68,14 +68,14 @@ export default { |
68 | render: (h, scope) => { | 68 | render: (h, scope) => { |
69 | return ( | 69 | return ( |
70 | <div> | 70 | <div> |
71 | <el-input placeholder="字典项编码" disabled={this.details.isenable == 2} v-show={scope.row.codeShow} v-fo value={scope.row[scope.column.property]} | 71 | <el-input placeholder="字典项编码" disabled={this.details.isenable === '0'} v-show={scope.row.codeShow} v-fo value={scope.row[scope.column.property]} |
72 | onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }} | 72 | onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }} |
73 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> | 73 | onInput={(val) => { scope.row[scope.column.property] = val }} maxlength='8'></el-input> |
74 | 74 | ||
75 | 75 | ||
76 | <el-input placeholder="字典项编码" disabled={this.details.isenable == 2} v-show={!scope.row.codeShow} value={scope.row[scope.column.property]} | 76 | <el-input placeholder="字典项编码" disabled={this.details.isenable === '0'} v-show={!scope.row.codeShow} value={scope.row[scope.column.property]} |
77 | onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }} | 77 | onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }} |
78 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> | 78 | onInput={(val) => { scope.row[scope.column.property] = val }} maxlength='8'></el-input> |
79 | </div> | 79 | </div> |
80 | ) | 80 | ) |
81 | } | 81 | } |
... | @@ -86,11 +86,11 @@ export default { | ... | @@ -86,11 +86,11 @@ export default { |
86 | render: (h, scope) => { | 86 | render: (h, scope) => { |
87 | return ( | 87 | return ( |
88 | <div> | 88 | <div> |
89 | <el-input placeholder="字典项编码" disabled={this.details.isenable == 2} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]} | 89 | <el-input placeholder="字典项编码" disabled={this.details.isenable === '0'} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]} |
90 | onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }} | 90 | onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }} |
91 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> | 91 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> |
92 | 92 | ||
93 | <el-input placeholder="字典项名称" disabled={this.details.isenable == 2} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]} | 93 | <el-input placeholder="字典项名称" disabled={this.details.isenable === '0'} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]} |
94 | onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }} | 94 | onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }} |
95 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> | 95 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> |
96 | </div> | 96 | </div> |
... | @@ -98,32 +98,19 @@ export default { | ... | @@ -98,32 +98,19 @@ export default { |
98 | } | 98 | } |
99 | }, | 99 | }, |
100 | { | 100 | { |
101 | prop: 'isenable', | ||
102 | width: '160', | ||
103 | label: '是否禁用', | ||
104 | render: (h, scope) => { | ||
105 | return ( | ||
106 | <el-radio-group disabled={this.details.isenable == 2} v-model={scope.row.isenable}> | ||
107 | <el-radio label="1">启用</el-radio> | ||
108 | <el-radio label="0">禁用</el-radio> | ||
109 | </el-radio-group> | ||
110 | ) | ||
111 | } | ||
112 | }, | ||
113 | { | ||
114 | prop: 'normcode', | 101 | prop: 'normcode', |
115 | label: '部标编码', | 102 | label: '部标编码', |
116 | width: '100', | 103 | width: '100', |
117 | render: (h, scope) => { | 104 | render: (h, scope) => { |
118 | return ( | 105 | return ( |
119 | <div> | 106 | <div> |
120 | <el-input placeholder="部标编码" disabled={this.details.isenable == 2} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]} | 107 | <el-input placeholder="部标编码" disabled={this.details.isenable === '0'} v-show={scope.row.normcodeShow} v-fo value={scope.row[scope.column.property]} |
121 | onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }} | 108 | onFocus={() => { this.itemShowFalse(); scope.row.normcodeShow = true; }} |
122 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> | 109 | onInput={(val) => { scope.row[scope.column.property] = val }} maxlength='8'></el-input> |
123 | 110 | ||
124 | <el-input placeholder="部标编码" disabled={this.details.isenable == 2} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]} | 111 | <el-input placeholder="部标编码" disabled={this.details.isenable === '0'} v-show={!scope.row.normcodeShow} value={scope.row[scope.column.property]} |
125 | onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }} | 112 | onFocus={() => { this.itemShowFalse(); scope.row.normcodeShow = true; }} |
126 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> | 113 | onInput={(val) => { scope.row[scope.column.property] = val }} maxlength='8'></el-input> |
127 | </div> | 114 | </div> |
128 | ) | 115 | ) |
129 | } | 116 | } |
... | @@ -134,18 +121,31 @@ export default { | ... | @@ -134,18 +121,31 @@ export default { |
134 | render: (h, scope) => { | 121 | render: (h, scope) => { |
135 | return ( | 122 | return ( |
136 | <div> | 123 | <div> |
137 | <el-input placeholder="部标名称" disabled={this.details.isenable == 2} v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]} | 124 | <el-input placeholder="部标名称" disabled={this.details.isenable === '0'} v-show={scope.row.normnameShow} v-fo value={scope.row[scope.column.property]} |
138 | onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }} | 125 | onFocus={() => { this.itemShowFalse(); scope.row.normnameShow = true; }} |
139 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> | 126 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> |
140 | 127 | ||
141 | <el-input placeholder="部标名称" disabled={this.details.isenable == 2} v-show={!scope.row.nameShow} value={scope.row[scope.column.property]} | 128 | <el-input placeholder="部标名称" disabled={this.details.isenable === '0'} v-show={!scope.row.normnameShow} value={scope.row[scope.column.property]} |
142 | onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }} | 129 | onFocus={() => { this.itemShowFalse(); scope.row.normnameShow = true; }} |
143 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> | 130 | onInput={(val) => { scope.row[scope.column.property] = val }}></el-input> |
144 | </div> | 131 | </div> |
145 | ) | 132 | ) |
146 | } | 133 | } |
147 | }, | 134 | }, |
148 | { | 135 | { |
136 | prop: 'isenable', | ||
137 | width: '160', | ||
138 | label: '是否禁用', | ||
139 | render: (h, scope) => { | ||
140 | return ( | ||
141 | <el-radio-group disabled={this.details.isenable === '0'} v-model={scope.row.isenable}> | ||
142 | <el-radio label="1">启用</el-radio> | ||
143 | <el-radio label="0">禁用</el-radio> | ||
144 | </el-radio-group> | ||
145 | ) | ||
146 | } | ||
147 | }, | ||
148 | { | ||
149 | width: '130', | 149 | width: '130', |
150 | label: '移动', | 150 | label: '移动', |
151 | render: (h, scope) => { | 151 | render: (h, scope) => { |
... | @@ -197,9 +197,14 @@ export default { | ... | @@ -197,9 +197,14 @@ export default { |
197 | data.forEach((item, index) => { | 197 | data.forEach((item, index) => { |
198 | if (index == 0) { | 198 | if (index == 0) { |
199 | item.codeShow = true | 199 | item.codeShow = true |
200 | item.nameShow = false | ||
201 | item.normcodeShow = false | ||
202 | item.normnameShow = false | ||
200 | } else { | 203 | } else { |
201 | item.codeShow = false | 204 | item.codeShow = false |
202 | item.nameShow = false | 205 | item.nameShow = false |
206 | item.normcodeShow = false | ||
207 | item.normnameShow = false | ||
203 | } | 208 | } |
204 | if (isAdd) { | 209 | if (isAdd) { |
205 | item.index = index + 1 | 210 | item.index = index + 1 |
... | @@ -213,6 +218,8 @@ export default { | ... | @@ -213,6 +218,8 @@ export default { |
213 | this.tableData.forEach((item, index) => { | 218 | this.tableData.forEach((item, index) => { |
214 | item.codeShow = false | 219 | item.codeShow = false |
215 | item.nameShow = false | 220 | item.nameShow = false |
221 | item.normcodeShow = false | ||
222 | item.normnameShow = false | ||
216 | }) | 223 | }) |
217 | }, | 224 | }, |
218 | handleMinus (index, row) { | 225 | handleMinus (index, row) { | ... | ... |
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | </el-col> | 17 | </el-col> |
18 | </el-row> | 18 | </el-row> |
19 | </el-form> | 19 | </el-form> |
20 | <lb-table :column="column" border :key="key" :heightNum="405" :pagination="false" :data="tableData"> | 20 | <lb-table :column="column" border :key="key" heightNumSetting :pagination="false" :data="tableData"> |
21 | </lb-table> | 21 | </lb-table> |
22 | </div> | 22 | </div> |
23 | </template> | 23 | </template> | ... | ... |
... | @@ -17,8 +17,7 @@ | ... | @@ -17,8 +17,7 @@ |
17 | </el-col> | 17 | </el-col> |
18 | </el-row> | 18 | </el-row> |
19 | </el-form> | 19 | </el-form> |
20 | <lb-table :column="column" border :key="key" :heightNum="390" :pagination="false" heightNumSetting | 20 | <lb-table :column="column" border :key="key" :pagination="false" heightNumSetting :data="tableData"> |
21 | :data="tableData"> | ||
22 | </lb-table> | 21 | </lb-table> |
23 | </div> | 22 | </div> |
24 | </template> | 23 | </template> | ... | ... |
-
Please register or sign in to post a comment