正在显示
8 个修改的文件
包含
97 行增加
和
89 行删除
@@ -7,13 +7,10 @@ | @@ -7,13 +7,10 @@ | ||
7 | <el-input v-model="filters.username" placeholder="账号"></el-input> | 7 | <el-input v-model="filters.username" placeholder="账号"></el-input> |
8 | </el-form-item> | 8 | </el-form-item> |
9 | <el-form-item> | 9 | <el-form-item> |
10 | - <el-input v-model="filters.methodname" placeholder="系统动作"></el-input> | ||
11 | - </el-form-item> | ||
12 | - <el-form-item> | ||
13 | <el-input v-model="filters.modelnamecn" placeholder="操作模块"></el-input> | 10 | <el-input v-model="filters.modelnamecn" placeholder="操作模块"></el-input> |
14 | </el-form-item> | 11 | </el-form-item> |
15 | <el-form-item> | 12 | <el-form-item> |
16 | - <el-button type="primary" v-on:click="getRoles()">查询</el-button> | 13 | + <el-button type="primary" v-on:click="getLogs()">查询</el-button> |
17 | </el-form-item> | 14 | </el-form-item> |
18 | </el-form> | 15 | </el-form> |
19 | </el-col> | 16 | </el-col> |
@@ -35,8 +32,6 @@ | @@ -35,8 +32,6 @@ | ||
35 | </el-table-column> | 32 | </el-table-column> |
36 | <el-table-column prop="modelnamecn" label="操作模块" width="120" sortable> | 33 | <el-table-column prop="modelnamecn" label="操作模块" width="120" sortable> |
37 | </el-table-column> | 34 | </el-table-column> |
38 | - <!--<el-table-column prop="parameters" label="参数" width="100" sortable>--> | ||
39 | - <!--</el-table-column>--> | ||
40 | <el-table-column prop="classname" label="系统类" show-overflow-tooltip="true" width="100" sortable> | 35 | <el-table-column prop="classname" label="系统类" show-overflow-tooltip="true" width="100" sortable> |
41 | </el-table-column> | 36 | </el-table-column> |
42 | <el-table-column prop="result" label="操作结果" min-width="200" sortable> | 37 | <el-table-column prop="result" label="操作结果" min-width="200" sortable> |
@@ -45,7 +40,7 @@ | @@ -45,7 +40,7 @@ | ||
45 | 40 | ||
46 | <!--工具条--> | 41 | <!--工具条--> |
47 | <el-col :span="24" class="toolbar"> | 42 | <el-col :span="24" class="toolbar"> |
48 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="10" :total="total" style="float:right;"> | 43 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="10" :total="total" style="float:right;"> |
49 | </el-pagination> | 44 | </el-pagination> |
50 | </el-col> | 45 | </el-col> |
51 | </section> | 46 | </section> |
@@ -59,7 +54,10 @@ | @@ -59,7 +54,10 @@ | ||
59 | export default { | 54 | export default { |
60 | data() { | 55 | data() { |
61 | return { | 56 | return { |
62 | - filters: {}, | 57 | + filters: { |
58 | + modelnamecn:'', | ||
59 | + username: '' | ||
60 | + }, | ||
63 | logs: [], | 61 | logs: [], |
64 | total: 0, | 62 | total: 0, |
65 | pageNum: 1, | 63 | pageNum: 1, |
@@ -78,13 +76,15 @@ | @@ -78,13 +76,15 @@ | ||
78 | }, | 76 | }, |
79 | handleCurrentChange(val) { | 77 | handleCurrentChange(val) { |
80 | this.pageNum = val; | 78 | this.pageNum = val; |
81 | - this.getRoles(); | 79 | + this.getLogs(); |
82 | }, | 80 | }, |
83 | //获取角色列表 | 81 | //获取角色列表 |
84 | getLogs() { | 82 | getLogs() { |
85 | let para = { | 83 | let para = { |
86 | pageNum: this.pageNum, | 84 | pageNum: this.pageNum, |
87 | pageSize: this.pageSize, | 85 | pageSize: this.pageSize, |
86 | + modelnamecn: this.filters.modelnamecn, | ||
87 | + username: this.filters.username | ||
88 | }; | 88 | }; |
89 | this.listLoading = true; | 89 | this.listLoading = true; |
90 | //NProgress.start(); | 90 | //NProgress.start(); |
@@ -112,28 +112,6 @@ | @@ -112,28 +112,6 @@ | ||
112 | selsChange: function (sels) { | 112 | selsChange: function (sels) { |
113 | this.sels = sels; | 113 | this.sels = sels; |
114 | }, | 114 | }, |
115 | - //批量删除 | ||
116 | - batchRemove: function () { | ||
117 | - var ids = this.sels.map(item => item.id).toString(); | ||
118 | - this.$confirm('确认删除选中记录吗?', '提示', { | ||
119 | - type: 'warning' | ||
120 | - }).then(() => { | ||
121 | - this.listLoading = true; | ||
122 | - //NProgress.start(); | ||
123 | - let para = { ids: ids }; | ||
124 | - batchRemove(para).then((res) => { | ||
125 | - this.listLoading = false; | ||
126 | - //NProgress.done(); | ||
127 | - this.$message({ | ||
128 | - message: '删除成功', | ||
129 | - type: 'success' | ||
130 | - }); | ||
131 | - this.getRoles(); | ||
132 | - }); | ||
133 | - }).catch(() => { | ||
134 | - | ||
135 | - }); | ||
136 | - } | ||
137 | }, | 115 | }, |
138 | mounted() { | 116 | mounted() { |
139 | this.getLogs(); | 117 | this.getLogs(); |
@@ -55,7 +55,7 @@ | @@ -55,7 +55,7 @@ | ||
55 | <!--工具条--> | 55 | <!--工具条--> |
56 | <el-col :span="24" class="toolbar"> | 56 | <el-col :span="24" class="toolbar"> |
57 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> | 57 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> |
58 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | 58 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> |
59 | </el-pagination> | 59 | </el-pagination> |
60 | </el-col> | 60 | </el-col> |
61 | 61 |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | <!--工具条--> | 40 | <!--工具条--> |
41 | <el-col :span="24" class="toolbar"> | 41 | <el-col :span="24" class="toolbar"> |
42 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> | 42 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> |
43 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | 43 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> |
44 | </el-pagination> | 44 | </el-pagination> |
45 | </el-col> | 45 | </el-col> |
46 | 46 |
@@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
40 | <!--工具条--> | 40 | <!--工具条--> |
41 | <el-col :span="24" class="toolbar"> | 41 | <el-col :span="24" class="toolbar"> |
42 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> | 42 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> |
43 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | 43 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> |
44 | </el-pagination> | 44 | </el-pagination> |
45 | </el-col> | 45 | </el-col> |
46 | 46 | ||
@@ -114,7 +114,7 @@ | @@ -114,7 +114,7 @@ | ||
114 | permIds: [], | 114 | permIds: [], |
115 | total: 0, | 115 | total: 0, |
116 | pageNum: 1, | 116 | pageNum: 1, |
117 | - pageSize: 5, | 117 | + pageSize: 10, |
118 | listLoading: false, | 118 | listLoading: false, |
119 | sels: [],//列表选中列 | 119 | sels: [],//列表选中列 |
120 | //编辑界面是否显示 | 120 | //编辑界面是否显示 |
@@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
38 | <!--工具条--> | 38 | <!--工具条--> |
39 | <el-col :span="24" class="toolbar"> | 39 | <el-col :span="24" class="toolbar"> |
40 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> | 40 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> |
41 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | 41 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> |
42 | </el-pagination> | 42 | </el-pagination> |
43 | </el-col> | 43 | </el-col> |
44 | 44 |
@@ -4,10 +4,10 @@ | @@ -4,10 +4,10 @@ | ||
4 | <el-col :span="24" class="toolbar" style="padding-bottom: 0px;"> | 4 | <el-col :span="24" class="toolbar" style="padding-bottom: 0px;"> |
5 | <el-form :inline="true" :model="filters"> | 5 | <el-form :inline="true" :model="filters"> |
6 | <el-form-item> | 6 | <el-form-item> |
7 | - <el-input v-model="filters.permName" placeholder="权限名称"></el-input> | 7 | + <el-input v-model="filters.name" placeholder="权限名称"></el-input> |
8 | </el-form-item> | 8 | </el-form-item> |
9 | <el-form-item> | 9 | <el-form-item> |
10 | - <el-button type="primary" v-on:click="getRoles()">查询</el-button> | 10 | + <el-button type="primary" v-on:click="getTableList()">查询</el-button> |
11 | </el-form-item> | 11 | </el-form-item> |
12 | <el-form-item> | 12 | <el-form-item> |
13 | <el-button type="primary" @click="handleAdd">新增</el-button> | 13 | <el-button type="primary" @click="handleAdd">新增</el-button> |
@@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
42 | <!--工具条--> | 42 | <!--工具条--> |
43 | <el-col :span="24" class="toolbar"> | 43 | <el-col :span="24" class="toolbar"> |
44 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> | 44 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> |
45 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | 45 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="pageSize" :total="total" style="float:right;"> |
46 | </el-pagination> | 46 | </el-pagination> |
47 | </el-col> | 47 | </el-col> |
48 | 48 | ||
@@ -50,20 +50,37 @@ | @@ -50,20 +50,37 @@ | ||
50 | <el-dialog title="编辑" v-model="editFormVisible" :close-on-click-modal="false"> | 50 | <el-dialog title="编辑" v-model="editFormVisible" :close-on-click-modal="false"> |
51 | <el-form :model="editForm" label-width="80px" :rules="editFormRules" ref="editForm"> | 51 | <el-form :model="editForm" label-width="80px" :rules="editFormRules" ref="editForm"> |
52 | <el-form-item label="ID"> | 52 | <el-form-item label="ID"> |
53 | - <span>{{editForm.roleId}}</span> | 53 | + <span>{{editForm.permissionId}}</span> |
54 | </el-form-item> | 54 | </el-form-item> |
55 | - <el-form-item label="权限名称"> | ||
56 | - <el-input v-model="editForm.roleName" auto-complete="off" placeholder="请输入权限名称:例如:ROLE_name"></el-input> | 55 | + <el-form-item label="权限名称" prop="name"> |
56 | + <el-input v-model="editForm.name" auto-complete="off" placeholder="请输入权限名称:例如:用户新增权限"></el-input> | ||
57 | </el-form-item> | 57 | </el-form-item> |
58 | - <el-form-item label="权限描述"> | 58 | + <el-form-item label="权限描述" prop="description"> |
59 | <el-input v-model="editForm.description" auto-complete="off" placeholder="请输入权限描述:例如:用户管理员"></el-input> | 59 | <el-input v-model="editForm.description" auto-complete="off" placeholder="请输入权限描述:例如:用户管理员"></el-input> |
60 | </el-form-item> | 60 | </el-form-item> |
61 | - <el-form-item label="权限排序"> | ||
62 | - <el-input v-model="editForm.roleSign" auto-complete="off" placeholder="请输入权限排序:例如:数字123"></el-input> | 61 | + <el-form-item label="权限总路径" prop="path"> |
62 | + <el-input v-model="editForm.path" auto-complete="off" placeholder="请输入父目录ID:例如:123"></el-input> | ||
63 | + </el-form-item> | ||
64 | + <el-form-item label="权限路径" prop="url"> | ||
65 | + <el-input v-model="editForm.url" auto-complete="off" placeholder="请输入权限描述:例如:/user/update"></el-input> | ||
66 | + </el-form-item> | ||
67 | + <el-form-item label="权限排序" prop="permissionOrder"> | ||
68 | + <el-input v-model="editForm.permissionOrder" auto-complete="off" placeholder="请输入权限排序:例如:123"></el-input> | ||
69 | + </el-form-item> | ||
70 | + <el-form-item label="父目录ID" prop="parentId"> | ||
71 | + <el-input v-model="editForm.parentId" auto-complete="off" placeholder="请输入父目录ID:例如:123"></el-input> | ||
72 | + </el-form-item> | ||
73 | + <el-form-item label="是否ismenu" prop="ismenu"> | ||
74 | + <el-switch | ||
75 | + v-model="editForm.ismenu" | ||
76 | + active-color="#13ce66" | ||
77 | + inactive-color="#ff4949" | ||
78 | + active-text="是" | ||
79 | + inactive-text="否" | ||
80 | + active-value="1" | ||
81 | + inactive-value="0"> | ||
82 | + </el-switch> | ||
63 | </el-form-item> | 83 | </el-form-item> |
64 | - <!--<el-form-item label="创建日期">--> | ||
65 | - <!--<el-date-picker type="date" placeholder="创建日期" v-model="editForm.creattime" value-format="yyyy-MM-dd HH:mm:ss" format="yyyy-MM-dd HH:mm:ss"></el-date-picker>--> | ||
66 | - <!--</el-form-item>--> | ||
67 | </el-form> | 84 | </el-form> |
68 | <div slot="footer" class="dialog-footer"> | 85 | <div slot="footer" class="dialog-footer"> |
69 | <el-button @click.native="editFormVisible = false">取消</el-button> | 86 | <el-button @click.native="editFormVisible = false">取消</el-button> |
@@ -80,17 +97,28 @@ | @@ -80,17 +97,28 @@ | ||
80 | <el-form-item label="权限描述" prop="description"> | 97 | <el-form-item label="权限描述" prop="description"> |
81 | <el-input v-model="addForm.description" auto-complete="off" placeholder="请输入权限描述:例如:用户管理员"></el-input> | 98 | <el-input v-model="addForm.description" auto-complete="off" placeholder="请输入权限描述:例如:用户管理员"></el-input> |
82 | </el-form-item> | 99 | </el-form-item> |
100 | + <el-form-item label="权限总路径" prop="path"> | ||
101 | + <el-input v-model="addForm.path" auto-complete="off" placeholder="请输入父目录ID:例如:123"></el-input> | ||
102 | + </el-form-item> | ||
83 | <el-form-item label="权限路径" prop="url"> | 103 | <el-form-item label="权限路径" prop="url"> |
84 | <el-input v-model="addForm.url" auto-complete="off" placeholder="请输入权限描述:例如:/user/update"></el-input> | 104 | <el-input v-model="addForm.url" auto-complete="off" placeholder="请输入权限描述:例如:/user/update"></el-input> |
85 | </el-form-item> | 105 | </el-form-item> |
86 | - <el-form-item label="权限排序" prop="permissionSign"> | ||
87 | - <el-input v-model="addForm.permissionSign" auto-complete="off" placeholder="请输入权限排序:例如:123"></el-input> | 106 | + <el-form-item label="权限排序" prop="permissionOrder"> |
107 | + <el-input v-model="addForm.permissionOrder" auto-complete="off" placeholder="请输入权限排序:例如:123"></el-input> | ||
88 | </el-form-item> | 108 | </el-form-item> |
89 | <el-form-item label="父目录ID" prop="parentId"> | 109 | <el-form-item label="父目录ID" prop="parentId"> |
90 | <el-input v-model="addForm.parentId" auto-complete="off" placeholder="请输入父目录ID:例如:123"></el-input> | 110 | <el-input v-model="addForm.parentId" auto-complete="off" placeholder="请输入父目录ID:例如:123"></el-input> |
91 | </el-form-item> | 111 | </el-form-item> |
92 | - <el-form-item label="父目录ID" prop="parentId"> | ||
93 | - <el-input v-model="addForm.parentId" auto-complete="off" placeholder="请输入父目录ID:例如:123"></el-input> | 112 | + <el-form-item label="是否ismenu" prop="ismenu"> |
113 | + <el-switch | ||
114 | + v-model="addForm.ismenu" | ||
115 | + active-color="#13ce66" | ||
116 | + inactive-color="#ff4949" | ||
117 | + active-text="是" | ||
118 | + inactive-text="否" | ||
119 | + active-value="1" | ||
120 | + inactive-value="0"> | ||
121 | + </el-switch> | ||
94 | </el-form-item> | 122 | </el-form-item> |
95 | </el-form> | 123 | </el-form> |
96 | <div slot="footer" class="dialog-footer"> | 124 | <div slot="footer" class="dialog-footer"> |
@@ -110,12 +138,12 @@ | @@ -110,12 +138,12 @@ | ||
110 | data() { | 138 | data() { |
111 | return { | 139 | return { |
112 | filters: { | 140 | filters: { |
113 | - permName: '' | 141 | + name: '' |
114 | }, | 142 | }, |
115 | tableList: [], | 143 | tableList: [], |
116 | total: 0, | 144 | total: 0, |
117 | pageNum: 1, | 145 | pageNum: 1, |
118 | - pageSize: 5, | 146 | + pageSize: 10, |
119 | listLoading: false, | 147 | listLoading: false, |
120 | sels: [],//列表选中列 | 148 | sels: [],//列表选中列 |
121 | //编辑界面是否显示 | 149 | //编辑界面是否显示 |
@@ -128,21 +156,37 @@ | @@ -128,21 +156,37 @@ | ||
128 | }, | 156 | }, |
129 | //编辑界面数据 | 157 | //编辑界面数据 |
130 | editForm: { | 158 | editForm: { |
131 | - roleId: 1, | 159 | + permissionId:'', |
132 | description: '', | 160 | description: '', |
133 | - roleName: '', | ||
134 | - roleSign: 1 | 161 | + name: '', |
162 | + url: '', | ||
163 | + path: '', | ||
164 | + parentId: '', | ||
165 | + ismenu: '', | ||
166 | + permissionOrder:'' | ||
135 | }, | 167 | }, |
136 | 168 | ||
137 | addFormVisible: false,//新增界面是否显示 | 169 | addFormVisible: false,//新增界面是否显示 |
138 | addLoading: false, | 170 | addLoading: false, |
139 | addFormRules: { | 171 | addFormRules: { |
140 | - roleName: [ | 172 | + name: [ |
141 | { required: true, message: '请输入权限名称', trigger: 'blur' } | 173 | { required: true, message: '请输入权限名称', trigger: 'blur' } |
142 | ], | 174 | ], |
143 | description: [ | 175 | description: [ |
144 | { required: true, message: '请输入权限描述', trigger: 'blur' } | 176 | { required: true, message: '请输入权限描述', trigger: 'blur' } |
145 | - ] | 177 | + ], |
178 | + paht: [ | ||
179 | + { required: true, message: '请输入总路径', trigger: 'blur' } | ||
180 | + ], | ||
181 | + url: [ | ||
182 | + { required: true, message: '请输入权限路径', trigger: 'blur' } | ||
183 | + ], | ||
184 | + permissionOrder: [ | ||
185 | + { required: true, message: '请输入排序字段', trigger: 'blur' } | ||
186 | + ], | ||
187 | + parentId: [ | ||
188 | + { required: true, message: '请输入父类ID', trigger: 'blur' } | ||
189 | + ] | ||
146 | }, | 190 | }, |
147 | //新增界面数据 | 191 | //新增界面数据 |
148 | addForm: { | 192 | addForm: { |
@@ -150,7 +194,9 @@ | @@ -150,7 +194,9 @@ | ||
150 | name: '', | 194 | name: '', |
151 | url: '', | 195 | url: '', |
152 | path: '', | 196 | path: '', |
153 | - parent_id: '', | 197 | + parentId: '', |
198 | + ismenu: '', | ||
199 | + permissionOrder:'' | ||
154 | 200 | ||
155 | } | 201 | } |
156 | 202 | ||
@@ -173,7 +219,7 @@ | @@ -173,7 +219,7 @@ | ||
173 | let para = { | 219 | let para = { |
174 | pageNum: this.pageNum, | 220 | pageNum: this.pageNum, |
175 | pageSize: this.pageSize, | 221 | pageSize: this.pageSize, |
176 | - name: this.filters.permName | 222 | + name: this.filters.name |
177 | }; | 223 | }; |
178 | this.listLoading = true; | 224 | this.listLoading = true; |
179 | //NProgress.start(); | 225 | //NProgress.start(); |
@@ -205,7 +251,7 @@ | @@ -205,7 +251,7 @@ | ||
205 | }).then(() => { | 251 | }).then(() => { |
206 | this.listLoading = true; | 252 | this.listLoading = true; |
207 | //NProgress.start(); | 253 | //NProgress.start(); |
208 | - let para = { userId: row.userId }; | 254 | + let para = { permissionId: row.permissionId }; |
209 | remove(para).then((res) => { | 255 | remove(para).then((res) => { |
210 | this.listLoading = false; | 256 | this.listLoading = false; |
211 | //NProgress.done(); | 257 | //NProgress.done(); |
@@ -213,7 +259,7 @@ | @@ -213,7 +259,7 @@ | ||
213 | message: '删除成功', | 259 | message: '删除成功', |
214 | type: 'success' | 260 | type: 'success' |
215 | }); | 261 | }); |
216 | - this.getRoles(); | 262 | + this.getTableList(); |
217 | }).catch((error) => { | 263 | }).catch((error) => { |
218 | this.listLoading = false; | 264 | this.listLoading = false; |
219 | alert(error); | 265 | alert(error); |
@@ -251,18 +297,6 @@ | @@ -251,18 +297,6 @@ | ||
251 | this.editLoading = true; | 297 | this.editLoading = true; |
252 | //NProgress.start(); | 298 | //NProgress.start(); |
253 | let para = Object.assign({}, this.editForm); | 299 | let para = Object.assign({}, this.editForm); |
254 | - //不需要提交的 去掉,后端不好接收 | ||
255 | - para.authorities = null; | ||
256 | - para.permissions = null; | ||
257 | - para.roles = null; | ||
258 | -// para.birth = (!para.birth || para.birth == '') ? '' : util.formatDate.format(new Date(para.birth), 'yyyy-MM-dd'); | ||
259 | - /* | ||
260 | - 查询之后格式this.filters.column.create_start_date中日期发生变化; | ||
261 | - Wed Aug 09 2017 00:00:00 GMT+0800 (中国标准时间) 变成了 "2017-08-08T16:00:00.000Z"; | ||
262 | - 所以使用 moment 日期格式化插件将时间转换成 [ Wed Aug 09 2017 00:00:00 GMT+0800 (中国标准时间) ] 格 | ||
263 | - 式; | ||
264 | - */ | ||
265 | - /*moment 安装 npm install moment --save*/ | ||
266 | para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss'); | 300 | para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss'); |
267 | this.editLoading = false; | 301 | this.editLoading = false; |
268 | edit(para).then((res) => { | 302 | edit(para).then((res) => { |
@@ -274,7 +308,7 @@ | @@ -274,7 +308,7 @@ | ||
274 | }); | 308 | }); |
275 | this.$refs['editForm'].resetFields(); | 309 | this.$refs['editForm'].resetFields(); |
276 | this.editFormVisible = false; | 310 | this.editFormVisible = false; |
277 | - this.getRoles(); | 311 | + this.getTableList(); |
278 | }).catch(error => alert(error)); | 312 | }).catch(error => alert(error)); |
279 | }); | 313 | }); |
280 | } | 314 | } |
@@ -298,7 +332,7 @@ | @@ -298,7 +332,7 @@ | ||
298 | }); | 332 | }); |
299 | this.$refs['addForm'].resetFields(); | 333 | this.$refs['addForm'].resetFields(); |
300 | this.addFormVisible = false; | 334 | this.addFormVisible = false; |
301 | - this.getRoles(); | 335 | + this.getTableList(); |
302 | }).catch(error => alert(error)); | 336 | }).catch(error => alert(error)); |
303 | }); | 337 | }); |
304 | } | 338 | } |
@@ -309,7 +343,7 @@ | @@ -309,7 +343,7 @@ | ||
309 | }, | 343 | }, |
310 | //批量删除 | 344 | //批量删除 |
311 | batchRemove: function () { | 345 | batchRemove: function () { |
312 | - var ids = this.sels.map(item => item.id).toString(); | 346 | + var ids = this.sels.map(item => item.permissionId).toString(); |
313 | this.$confirm('确认删除选中记录吗?', '提示', { | 347 | this.$confirm('确认删除选中记录吗?', '提示', { |
314 | type: 'warning' | 348 | type: 'warning' |
315 | }).then(() => { | 349 | }).then(() => { |
@@ -323,7 +357,7 @@ | @@ -323,7 +357,7 @@ | ||
323 | message: '删除成功', | 357 | message: '删除成功', |
324 | type: 'success' | 358 | type: 'success' |
325 | }); | 359 | }); |
326 | - this.getRoles(); | 360 | + this.getTableList(); |
327 | }); | 361 | }); |
328 | }).catch(() => { | 362 | }).catch(() => { |
329 | 363 |
@@ -41,7 +41,7 @@ | @@ -41,7 +41,7 @@ | ||
41 | <!--工具条--> | 41 | <!--工具条--> |
42 | <el-col :span="24" class="toolbar"> | 42 | <el-col :span="24" class="toolbar"> |
43 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> | 43 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> |
44 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> | 44 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="5" :total="total" style="float:right;"> |
45 | </el-pagination> | 45 | </el-pagination> |
46 | </el-col> | 46 | </el-col> |
47 | 47 |
@@ -56,7 +56,7 @@ | @@ -56,7 +56,7 @@ | ||
56 | <!--工具条--> | 56 | <!--工具条--> |
57 | <el-col :span="24" class="toolbar"> | 57 | <el-col :span="24" class="toolbar"> |
58 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> | 58 | <el-button type="danger" @click="batchRemove" :disabled="this.sels.length===0">批量删除</el-button> |
59 | - <el-pagination layout="prev, pager, next" @current-change="handleCurrentChange" :page-size="10" :total="total" style="float:right;"> | 59 | + <el-pagination layout="total, prev, pager, next" @current-change="handleCurrentChange" :page-size="10" :total="total" style="float:right;"> |
60 | </el-pagination> | 60 | </el-pagination> |
61 | </el-col> | 61 | </el-col> |
62 | 62 | ||
@@ -168,9 +168,9 @@ | @@ -168,9 +168,9 @@ | ||
168 | <el-form-item label="账号"> | 168 | <el-form-item label="账号"> |
169 | <span>{{roleEditForm.username}}</span> | 169 | <span>{{roleEditForm.username}}</span> |
170 | </el-form-item> | 170 | </el-form-item> |
171 | - <el-checkbox-group v-model="roleIds" size="small"> | ||
172 | - <el-checkbox-button v-for="role in roles" :label="role.roleId" :key="role.roleId" >{{role.description}}</el-checkbox-button> | ||
173 | - </el-checkbox-group> | 171 | + <el-checkbox-group v-model="roleIds" size="small"> |
172 | + <el-checkbox-button v-for="role in roles" :label="role.roleId" :key="role.roleId" >{{role.description}}</el-checkbox-button> | ||
173 | + </el-checkbox-group> | ||
174 | </el-form> | 174 | </el-form> |
175 | <div slot="footer" class="dialog-footer"> | 175 | <div slot="footer" class="dialog-footer"> |
176 | <el-button @click.native="roleFormVisible = false">取消</el-button> | 176 | <el-button @click.native="roleFormVisible = false">取消</el-button> |
@@ -346,9 +346,6 @@ | @@ -346,9 +346,6 @@ | ||
346 | }else { | 346 | }else { |
347 | alert(error); | 347 | alert(error); |
348 | } | 348 | } |
349 | - | ||
350 | - | ||
351 | - | ||
352 | }); | 349 | }); |
353 | 350 | ||
354 | }, | 351 | }, |
@@ -409,9 +406,8 @@ | @@ -409,9 +406,8 @@ | ||
409 | if (valid) { | 406 | if (valid) { |
410 | this.$confirm('确认提交吗?', '提示', {}).then(() => { | 407 | this.$confirm('确认提交吗?', '提示', {}).then(() => { |
411 | this.addLoading = true; | 408 | this.addLoading = true; |
412 | - //NProgress.start(); | ||
413 | let para = Object.assign({}, this.addForm); | 409 | let para = Object.assign({}, this.addForm); |
414 | - para.birth = (!para.birth || para.birth == '') ? '' : util.formatDate.format(new Date(para.birth), 'yyyy-MM-dd'); | 410 | +// para.birth = (!para.birth || para.birth == '') ? '' : util.formatDate.format(new Date(para.birth), 'yyyy-MM-dd'); |
415 | addUser(para).then((res) => { | 411 | addUser(para).then((res) => { |
416 | this.addLoading = false; | 412 | this.addLoading = false; |
417 | //NProgress.done(); | 413 | //NProgress.done(); |
-
请 注册 或 登录 后发表评论