...
|
...
|
@@ -102,6 +102,19 @@ |
|
|
<el-radio class="radio" label="false" >否</el-radio>
|
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
|
<el-form-item lable="头像">
|
|
|
<el-upload
|
|
|
class="avatar-uploader"
|
|
|
action="http://127.0.0.1:7003/upload"
|
|
|
:show-file-list="true"
|
|
|
accept="image/jpeg,image/jpg,image/png"
|
|
|
:on-success="handleAvatarSuccess"
|
|
|
:before-upload="beforeAvatarUpload"
|
|
|
>
|
|
|
<img v-if="faceImageUrl" :src="faceImageUrl" class="avatar">
|
|
|
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button @click.native="editFormVisible = false">取消</el-button>
|
...
|
...
|
@@ -170,7 +183,7 @@ |
|
|
<script>
|
|
|
import util from '../../common/js/util'
|
|
|
import NProgress from 'nprogress'
|
|
|
import { getUserList, removeUser, batchRemoveUser, editUser, addUser, setUserRole } from '../../api/api';
|
|
|
import { getUserListPage, removeUser, batchRemoveUser, editUser, addUser, setUserRole } from '../../api/api';
|
|
|
import { getList} from '../../api/role_api';
|
|
|
import moment from 'moment'
|
|
|
export default {
|
...
|
...
|
@@ -184,6 +197,7 @@ |
|
|
total: 0,
|
|
|
pageNum: 1,
|
|
|
pageSize: 5,
|
|
|
faceImageUrl: '',
|
|
|
listLoading: false,
|
|
|
sels: [],//列表选中列
|
|
|
//编辑界面是否显示
|
...
|
...
|
@@ -255,10 +269,11 @@ |
|
|
let para = {
|
|
|
pageNum: this.pageNum,
|
|
|
pageSize: this.pageSize,
|
|
|
username: this.filters.username
|
|
|
username: this.filters.username,
|
|
|
realname: this.filters.realname
|
|
|
};
|
|
|
this.listLoading = true;
|
|
|
getUserList(para).then((res) => {
|
|
|
getUserListPage(para).then((res) => {
|
|
|
this.total = res.data.total;
|
|
|
this.users = res.data.list;
|
|
|
this.listLoading = false;
|
...
|
...
|
@@ -373,7 +388,7 @@ |
|
|
式;
|
|
|
*/
|
|
|
/*moment 安装 npm install moment --save*/
|
|
|
para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss');
|
|
|
// para.creattime = moment(para.creattime).format('YYYY-MM-DD HH:mm:ss');
|
|
|
this.editLoading = false;
|
|
|
editUser(para).then((res) => {
|
|
|
|
...
|
...
|
@@ -459,11 +474,22 @@ |
|
|
});
|
|
|
console.log(para);
|
|
|
});
|
|
|
},
|
|
|
handleAvatarSuccess: function(response){
|
|
|
this.faceImageUrl = 'http://127.0.0.1:7003/'+response.data;
|
|
|
},
|
|
|
beforeAvatarUpload: function () {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getUsers();
|
|
|
},
|
|
|
computed: {
|
|
|
hideShow() {//当图片多于一张的时候,就隐藏上传框
|
|
|
return this.file === '' ? false : true
|
|
|
}
|
|
|
},
|
|
|
}
|
|
|
|
|
|
</script>
|
...
|
...
|
|