File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 54
54
<el-table-column prop =" status" label =" 状态" :formatter =" statusFormat" width =" 100" >
55
55
<template slot-scope="scope">
56
56
<el-tag
57
- :type =" scope.row.status === '1' ? 'danger' : 'success'"
57
+ :type =" scope.row.status === 1 ? 'danger' : 'success'"
58
58
disable-transitions
59
59
>{{ statusFormat(scope.row) }}</el-tag >
60
60
</template >
@@ -185,7 +185,8 @@ export default {
185
185
status: undefined
186
186
},
187
187
// 表单参数
188
- form: {},
188
+ form: {
189
+ },
189
190
// 表单校验
190
191
rules: {
191
192
parentId: [
@@ -271,11 +272,11 @@ export default {
271
272
deptId: undefined ,
272
273
parentId: undefined ,
273
274
deptName: undefined ,
274
- sorc : undefined ,
275
+ sort : 10 ,
275
276
leader: undefined ,
276
277
phone: undefined ,
277
278
email: undefined ,
278
- status: ' 0 '
279
+ status: ' 2 '
279
280
}
280
281
},
281
282
/** 搜索按钮操作 */
@@ -300,6 +301,8 @@ export default {
300
301
301
302
getDept (row .deptId ).then (response => {
302
303
this .form = response .data
304
+ this .form .status = String (this .form .status )
305
+ this .form .sort = String (this .form .sort )
303
306
this .open = true
304
307
this .title = ' 修改部门'
305
308
this .isEdit = true
@@ -309,6 +312,8 @@ export default {
309
312
submitForm : function () {
310
313
this .$refs [' form' ].validate (valid => {
311
314
if (valid) {
315
+ this .form .status = parseInt (this .form .status )
316
+ this .form .sort = parseInt (this .form .sort )
312
317
if (this .form .deptId !== undefined ) {
313
318
updateDept (this .form , this .form .deptId ).then (response => {
314
319
if (response .code === 200 ) {
You can’t perform that action at this time.
0 commit comments