更新
This commit is contained in:
@@ -79,8 +79,9 @@
|
||||
</uni-list>
|
||||
</view>
|
||||
<view class="button-group">
|
||||
<view v-if="!wantUpdate" class="button red" @tap="update">修改</view>
|
||||
<view v-if="!wantUpdate" class="button orange" @tap="update">修改</view>
|
||||
<view v-else class="button blue" @tap="submit">保存</view>
|
||||
<view class="button special red" @tap="deleteData">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -98,7 +99,7 @@
|
||||
postData: {
|
||||
phone: '',
|
||||
userName: '',
|
||||
password:'',
|
||||
password: '',
|
||||
sysUserRoleList: [],
|
||||
oilCompanyInfoList: [],
|
||||
},
|
||||
@@ -134,6 +135,28 @@
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
deleteData() {
|
||||
uni.showModal({
|
||||
title: '确定删除吗?',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
serve.deleteByUserId({
|
||||
id: this.postData.id
|
||||
}).then(res => {
|
||||
if (res.code === 20000) {
|
||||
uni.showToast({
|
||||
title: res.msg,
|
||||
icon: 'none'
|
||||
})
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
getByUserId() {
|
||||
serve.getByUserId(this.postData.id).then(res => {
|
||||
this.$set(this.postData, 'sysUserRoleList', res.data.sysUserRoleList)
|
||||
@@ -159,7 +182,7 @@
|
||||
WrongText: '请选择所属权限'
|
||||
}
|
||||
}
|
||||
if(this.isAdd) {
|
||||
if (this.isAdd) {
|
||||
needCheckMap['password'] = {
|
||||
tacitly: '',
|
||||
WrongText: '请输入用户密码'
|
||||
@@ -344,9 +367,13 @@
|
||||
color: #fff;
|
||||
border-radius: 10rpx;
|
||||
|
||||
// &:nth-of-type(2) {
|
||||
// margin-top: 50rpx;
|
||||
// }
|
||||
&.special {
|
||||
margin-top: 35rpx;
|
||||
}
|
||||
|
||||
&.orange {
|
||||
background: #FF8C00;
|
||||
}
|
||||
|
||||
&.red {
|
||||
background: #EA0000;
|
||||
|
||||
Reference in New Issue
Block a user