[update]
This commit is contained in:
@@ -111,7 +111,7 @@
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)" style='margin-right: 10px' v-has="'sys:user:edit'">{{$t('edit')}}</a>
|
||||
<a @click="resetPassword(record)" >{{$t('resetPassword')}}</a>
|
||||
<a @click="resetPassword(record)" v-has="'sys:user:resetpass'">{{$t('resetPassword')}}</a>
|
||||
</span>
|
||||
|
||||
</a-table>
|
||||
@@ -146,6 +146,9 @@
|
||||
import JInput from '@/components/jero/JInput'
|
||||
import UserRecycleBinModal from './modules/UserRecycleBinModal'
|
||||
import JSuperQuery from '@/components/jero/JSuperQuery'
|
||||
import axios from 'axios'
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'UserList',
|
||||
@@ -161,6 +164,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
token:Vue.ls.get(ACCESS_TOKEN),
|
||||
description: this.$t('freezePasManagementPage'),
|
||||
queryParam: {},
|
||||
recycleBinVisible: false,
|
||||
@@ -260,7 +264,32 @@
|
||||
methods: {
|
||||
// 重置密码
|
||||
resetPassword(val) {
|
||||
console.log(val,'valll')
|
||||
let _this = this
|
||||
axios({
|
||||
url: `/jero-boot/sys/user/updatePassword?username=${val.username}`,
|
||||
method: 'get',
|
||||
transformRequest: [function (data) {
|
||||
let ret = ''
|
||||
for (let it in data) {
|
||||
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
|
||||
}
|
||||
return ret
|
||||
}],
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded',
|
||||
'X-Access-Token':_this.token
|
||||
}
|
||||
})
|
||||
.then( (res) =>{
|
||||
if (res.data.success) {
|
||||
_this.$message.success(res.data.result)
|
||||
}else{
|
||||
_this.$message.warning(res.data.result)
|
||||
}
|
||||
})
|
||||
.catch( (error) =>{
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
onSelectChange(val,value) {
|
||||
this.selectedRowKeys = val
|
||||
|
||||
Reference in New Issue
Block a user