修改页面
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
<text class="label">人脸图片:</text>
|
||||
<image
|
||||
class="face-image"
|
||||
:src="employeeDetail.img || '/static/ic_avg.png'"
|
||||
:src="imgUrl || '/static/ic_avg.png'"
|
||||
mode="aspectFill"
|
||||
/>
|
||||
</view>
|
||||
@@ -84,6 +84,7 @@ export default {
|
||||
return {
|
||||
pageType: 'handle', // 'handle' 或 'detail'
|
||||
employeeDetail: {},
|
||||
imgUrl: '',
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -97,14 +98,19 @@ export default {
|
||||
queryEmployee() {
|
||||
this.$u.api.unit.queryEmployeeById(this.employeeDetail).then(res => {
|
||||
this.employeeDetail = res.data;
|
||||
this.$u.api.getImageUrl({}, this.employeeDetail.img).then(res=>{
|
||||
if (res.code == 200) {
|
||||
this.imgUrl= this.vuex_config.imgUrl +res.data[0].url;
|
||||
}
|
||||
});
|
||||
});
|
||||
console.log(this.employeeDetail);
|
||||
},
|
||||
// 新增状态变更方法
|
||||
changeStatus(newState) {
|
||||
this.employeeDetail.state = newState;
|
||||
},
|
||||
saveInfo() {
|
||||
console.log(this.employeeDetail);
|
||||
this.$u.api.unit.updateEmployee(this.employeeDetail).then(res => {
|
||||
if (res.code === 200) {
|
||||
uni.showToast({
|
||||
|
Reference in New Issue
Block a user