正在显示
3 个修改的文件
包含
31 行增加
和
5 行删除
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | </el-table-column> | 37 | </el-table-column> |
38 | <!--<el-table-column prop="parameters" label="参数" width="100" sortable>--> | 38 | <!--<el-table-column prop="parameters" label="参数" width="100" sortable>--> |
39 | <!--</el-table-column>--> | 39 | <!--</el-table-column>--> |
40 | - <el-table-column prop="classname" label="系统类" width="100" sortable> | 40 | + <el-table-column prop="classname" label="系统类" show-overflow-tooltip="true" width="100" sortable> |
41 | </el-table-column> | 41 | </el-table-column> |
42 | <el-table-column prop="result" label="操作结果" min-width="200" sortable> | 42 | <el-table-column prop="result" label="操作结果" min-width="200" sortable> |
43 | </el-table-column> | 43 | </el-table-column> |
@@ -102,6 +102,19 @@ | @@ -102,6 +102,19 @@ | ||
102 | <el-radio class="radio" label="false" >否</el-radio> | 102 | <el-radio class="radio" label="false" >否</el-radio> |
103 | </el-radio-group> | 103 | </el-radio-group> |
104 | </el-form-item> | 104 | </el-form-item> |
105 | + <el-form-item lable="头像"> | ||
106 | + <el-upload | ||
107 | + class="avatar-uploader" | ||
108 | + action="http://127.0.0.1:7003/upload" | ||
109 | + :show-file-list="true" | ||
110 | + accept="image/jpeg,image/jpg,image/png" | ||
111 | + :on-success="handleAvatarSuccess" | ||
112 | + :before-upload="beforeAvatarUpload" | ||
113 | + > | ||
114 | + <img v-if="faceImageUrl" :src="faceImageUrl" class="avatar"> | ||
115 | + <i v-else class="el-icon-plus avatar-uploader-icon"></i> | ||
116 | + </el-upload> | ||
117 | + </el-form-item> | ||
105 | </el-form> | 118 | </el-form> |
106 | <div slot="footer" class="dialog-footer"> | 119 | <div slot="footer" class="dialog-footer"> |
107 | <el-button @click.native="editFormVisible = false">取消</el-button> | 120 | <el-button @click.native="editFormVisible = false">取消</el-button> |
@@ -170,7 +183,7 @@ | @@ -170,7 +183,7 @@ | ||
170 | <script> | 183 | <script> |
171 | import util from '../../common/js/util' | 184 | import util from '../../common/js/util' |
172 | import NProgress from 'nprogress' | 185 | import NProgress from 'nprogress' |
173 | - import { getUserList, removeUser, batchRemoveUser, editUser, addUser, setUserRole } from '../../api/api'; | 186 | + import { getUserListPage, removeUser, batchRemoveUser, editUser, addUser, setUserRole } from '../../api/api'; |
174 | import { getList} from '../../api/role_api'; | 187 | import { getList} from '../../api/role_api'; |
175 | import moment from 'moment' | 188 | import moment from 'moment' |
176 | export default { | 189 | export default { |
@@ -184,6 +197,7 @@ | @@ -184,6 +197,7 @@ | ||
184 | total: 0, | 197 | total: 0, |
185 | pageNum: 1, | 198 | pageNum: 1, |
186 | pageSize: 5, | 199 | pageSize: 5, |
200 | + faceImageUrl: '', | ||
187 | listLoading: false, | 201 | listLoading: false, |
188 | sels: [],//列表选中列 | 202 | sels: [],//列表选中列 |
189 | //编辑界面是否显示 | 203 | //编辑界面是否显示 |
@@ -255,10 +269,11 @@ | @@ -255,10 +269,11 @@ | ||
255 | let para = { | 269 | let para = { |
256 | pageNum: this.pageNum, | 270 | pageNum: this.pageNum, |
257 | pageSize: this.pageSize, | 271 | pageSize: this.pageSize, |
258 | - username: this.filters.username | 272 | + username: this.filters.username, |
273 | + realname: this.filters.realname | ||
259 | }; | 274 | }; |
260 | this.listLoading = true; | 275 | this.listLoading = true; |
261 | - getUserList(para).then((res) => { | 276 | + getUserListPage(para).then((res) => { |
262 | this.total = res.data.total; | 277 | this.total = res.data.total; |
263 | this.users = res.data.list; | 278 | this.users = res.data.list; |
264 | this.listLoading = false; | 279 | this.listLoading = false; |
@@ -373,7 +388,7 @@ | @@ -373,7 +388,7 @@ | ||
373 | 式; | 388 | 式; |
374 | */ | 389 | */ |
375 | /*moment 安装 npm install moment --save*/ | 390 | /*moment 安装 npm install moment --save*/ |
376 | - para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss'); | 391 | +// para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss'); |
377 | this.editLoading = false; | 392 | this.editLoading = false; |
378 | editUser(para).then((res) => { | 393 | editUser(para).then((res) => { |
379 | 394 | ||
@@ -459,11 +474,22 @@ | @@ -459,11 +474,22 @@ | ||
459 | }); | 474 | }); |
460 | console.log(para); | 475 | console.log(para); |
461 | }); | 476 | }); |
477 | + }, | ||
478 | + handleAvatarSuccess: function(response){ | ||
479 | + this.faceImageUrl = 'http://127.0.0.1:7003/'+response.data; | ||
480 | + }, | ||
481 | + beforeAvatarUpload: function () { | ||
482 | + | ||
462 | } | 483 | } |
463 | }, | 484 | }, |
464 | mounted() { | 485 | mounted() { |
465 | this.getUsers(); | 486 | this.getUsers(); |
487 | + }, | ||
488 | + computed: { | ||
489 | + hideShow() {//当图片多于一张的时候,就隐藏上传框 | ||
490 | + return this.file === '' ? false : true | ||
466 | } | 491 | } |
492 | + }, | ||
467 | } | 493 | } |
468 | 494 | ||
469 | </script> | 495 | </script> |
static/favicon.ico
0 → 100644
不能预览此文件类型
-
请 注册 或 登录 后发表评论