Commit 0d1fb809 by chehuidong

bh

parent d3051cd6
...@@ -619,10 +619,12 @@ export default { ...@@ -619,10 +619,12 @@ export default {
}, },
methods: { methods: {
spentChange(v, item) { spentChange(v, item) {
axios.post('platform/user/update', { axios
.post('platform/user/update', {
...item, ...item,
cost: v, cost: v,
}).then(() => { })
.then(() => {
this.getList() this.getList()
}) })
}, },
...@@ -640,12 +642,6 @@ export default { ...@@ -640,12 +642,6 @@ export default {
}, },
authorization(item, e) { authorization(item, e) {
e && e.stopPropagation() e && e.stopPropagation()
axios.post('sysDeviceInfo/auditApply', {
id: item.id,
}).then((res) => {
this.$message.success(res.message)
this.getList()
})
}, },
authorizationDel(item, e) { authorizationDel(item, e) {
e && e.stopPropagation() e && e.stopPropagation()
...@@ -654,23 +650,10 @@ export default { ...@@ -654,23 +650,10 @@ export default {
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {})
axios.post('sysDeviceInfo/delApply', {
id: item.id,
}).then((res) => {
this.$message.success(res.message)
this.getList()
})
})
.catch(() => {}) .catch(() => {})
}, },
getRoleList(userId) {
axios.post('sysDeviceInfo/getList', { userId }).then(
(res) => {
this.details = res.data
},
)
},
resetPwd(e, row) { resetPwd(e, row) {
e && e.stopPropagation() e && e.stopPropagation()
this.$confirm('确认要重置密码?', '提示', { this.$confirm('确认要重置密码?', '提示', {
...@@ -679,22 +662,24 @@ export default { ...@@ -679,22 +662,24 @@ export default {
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
axios.post('platform/user/resetPassword/' + row.id).then( axios
(res) => { .post('platform/user/resetPassword/' + row.id)
.then((res) => {
this.$alert( this.$alert(
'重置成功\n\r 新密码为:' + '重置成功\n\r 新密码为:' +
res.data.passWord, res.data.passWord,
) )
}, })
)
}) })
.catch(() => {}) .catch(() => {})
}, },
enableChange(val, row) { enableChange(val, row) {
axios.post('platform/user/setEnableStatus', { axios
.post('platform/user/setEnableStatus', {
enable: val, enable: val,
userId: row.id, userId: row.id,
}).then((res) => { })
.then((res) => {
this.$message.success(res.message) this.$message.success(res.message)
this.getList() this.getList()
}) })
...@@ -705,10 +690,12 @@ export default { ...@@ -705,10 +690,12 @@ export default {
return return
} }
axios.post('platform/user/setBindingStatus', { axios
.post('platform/user/setBindingStatus', {
bindStatus: !row.bindStatus, bindStatus: !row.bindStatus,
userId: row.id, userId: row.id,
}).then((res) => { })
.then((res) => {
this.$message.success(res.message) this.$message.success(res.message)
this.getList() this.getList()
}) })
...@@ -729,7 +716,6 @@ export default { ...@@ -729,7 +716,6 @@ export default {
currentTabFn(val) { currentTabFn(val) {
if (val.row) { if (val.row) {
this.formId = val.row.id this.formId = val.row.id
this.getRoleList(val.row.id)
} }
}, },
// 修改新增 // 修改新增
...@@ -743,9 +729,11 @@ export default { ...@@ -743,9 +729,11 @@ export default {
if (!this.formId) { if (!this.formId) {
return this.$message('请勾选至少一条记录') return this.$message('请勾选至少一条记录')
} }
axios.get('platform/user/axios.get', { axios
.get('platform/user/axios.get', {
id: v.id, id: v.id,
}).then((res) => { })
.then((res) => {
const funcRoleIds = [] const funcRoleIds = []
const dataRoleIds = [] const dataRoleIds = []
if (res.data.roleIds) { if (res.data.roleIds) {
...@@ -801,27 +789,16 @@ export default { ...@@ -801,27 +789,16 @@ export default {
getList() { getList() {
const { pageSize, currentPage } = const { pageSize, currentPage } =
this.paginationOptions this.paginationOptions
axios.post('platform/user/list_page', { axios
.post('platform/user/list_page', {
pageSize, pageSize,
currentPage, currentPage,
...this.searchForm, ...this.searchForm,
}).then((res) => { })
.then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.sourceData = res.data.records this.sourceData = res.data.records
this.paginationOptions.total = res.data.total this.paginationOptions.total = res.data.total
if (this.sourceData.length > 0) {
this.$nextTick(() => {
let row
if (this.formId) {
row = this.sourceData.find(
(item) => item.id === this.formId,
)
} else {
row = this.sourceData[0]
}
this.getRoleList(row.id)
})
}
} else { } else {
this.$alert(res.message, '错误提示', { this.$alert(res.message, '错误提示', {
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
...@@ -916,9 +893,11 @@ export default { ...@@ -916,9 +893,11 @@ export default {
type: 'warning', type: 'warning',
}) })
.then(() => { .then(() => {
axios.get('platform/user/delete', { axios
.get('platform/user/delete', {
ids: ids, ids: ids,
}).then((res) => { })
.then((res) => {
if (res.code === 200) { if (res.code === 200) {
this.$message({ this.$message({
type: 'success', type: 'success',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment