[update]
This commit is contained in:
@@ -111,7 +111,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<span slot="action" slot-scope="text, record">
|
<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="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>
|
</span>
|
||||||
|
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -146,6 +146,9 @@
|
|||||||
import JInput from '@/components/jero/JInput'
|
import JInput from '@/components/jero/JInput'
|
||||||
import UserRecycleBinModal from './modules/UserRecycleBinModal'
|
import UserRecycleBinModal from './modules/UserRecycleBinModal'
|
||||||
import JSuperQuery from '@/components/jero/JSuperQuery'
|
import JSuperQuery from '@/components/jero/JSuperQuery'
|
||||||
|
import axios from 'axios'
|
||||||
|
import Vue from 'vue'
|
||||||
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserList',
|
name: 'UserList',
|
||||||
@@ -161,6 +164,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
token:Vue.ls.get(ACCESS_TOKEN),
|
||||||
description: this.$t('freezePasManagementPage'),
|
description: this.$t('freezePasManagementPage'),
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
recycleBinVisible: false,
|
recycleBinVisible: false,
|
||||||
@@ -260,7 +264,32 @@
|
|||||||
methods: {
|
methods: {
|
||||||
// 重置密码
|
// 重置密码
|
||||||
resetPassword(val) {
|
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) {
|
onSelectChange(val,value) {
|
||||||
this.selectedRowKeys = val
|
this.selectedRowKeys = val
|
||||||
|
|||||||
Reference in New Issue
Block a user