Commit 4d15ad62 authored by zhuangxinwei's avatar zhuangxinwei

修改bug

parent e1005206
...@@ -89,7 +89,7 @@ export function updateMenu(data) { ...@@ -89,7 +89,7 @@ export function updateMenu(data) {
const businessId = data.businessId const businessId = data.businessId
data = Qs.stringify(data) data = Qs.stringify(data)
return request({ return request({
url: '/system/menu/update/'+ businessId, url: '/system/menu/update/' + businessId,
method: 'put', method: 'put',
data, data,
headers: { headers: {
......
...@@ -210,6 +210,7 @@ export default { ...@@ -210,6 +210,7 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.list = [] this.list = []
this.total = 0 this.total = 0
this.$message.error(response.message)
this.loading = false this.loading = false
} else { } else {
this.list = response.rows.map(item => { this.list = response.rows.map(item => {
......
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
ipaddr: undefined, ipaddr: undefined,
username: undefined, username: undefined,
status: undefined, status: undefined,
loginTime: '' loginTime: undefined
} }
} }
}, },
...@@ -207,6 +207,7 @@ export default { ...@@ -207,6 +207,7 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.list = [] this.list = []
this.total = 0 this.total = 0
this.$message.error(response.message)
this.loading = false this.loading = false
} else { } else {
this.list = response.rows this.list = response.rows
......
...@@ -147,7 +147,6 @@ ...@@ -147,7 +147,6 @@
<script> <script>
import { list, delOperLog, cleanOperLog, exportOperLog } from '@/api/monitor/operLog' import { list, delOperLog, cleanOperLog, exportOperLog } from '@/api/monitor/operLog'
import { delErrLog } from '@/api/monitor/errorLog'
export default { export default {
name: 'Operlog', name: 'Operlog',
...@@ -219,6 +218,7 @@ export default { ...@@ -219,6 +218,7 @@ export default {
if (response.code === 200) { if (response.code === 200) {
this.list = [] this.list = []
this.total = 0 this.total = 0
this.$message.error(response.message)
this.loading = false this.loading = false
} else { } else {
this.list = response.rows.map(item => { this.list = response.rows.map(item => {
......
...@@ -186,7 +186,16 @@ export default { ...@@ -186,7 +186,16 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 状态数据字典 // 状态数据字典
statusOptions: [], statusOptions: [
{
dictLabel: '正常',
dictValue: '1'
},
{
dictLabel: '停用',
dictValue: '0'
}
],
// 查询参数 // 查询参数
queryParams: { queryParams: {
deptName: undefined, deptName: undefined,
...@@ -235,9 +244,9 @@ export default { ...@@ -235,9 +244,9 @@ export default {
this.queryParams = { ...param } this.queryParams = { ...param }
} }
this.getList() this.getList()
this.getDicts('sys_normal_disable'.toUpperCase()).then(response => { // this.getDicts('sys_normal_disable'.toUpperCase()).then(response => {
this.statusOptions = response.data // this.statusOptions = response.data
}) // })
}, },
methods: { methods: {
/** 查询部门列表 */ /** 查询部门列表 */
......
...@@ -305,7 +305,7 @@ export default { ...@@ -305,7 +305,7 @@ export default {
return { return {
showSearch: '', showSearch: '',
getOptions: '', getOptions: '',
statusOptions: '', // statusOptions: '',
//状态默认选择 //状态默认选择
radio: '1', radio: '1',
test: '', test: '',
...@@ -328,16 +328,16 @@ export default { ...@@ -328,16 +328,16 @@ export default {
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
// 状态数据字典 // 状态数据字典
// statusOptions: [ statusOptions: [
// { {
// dictLabel: '正常', dictLabel: '正常',
// dictValue: '1' dictValue: '1'
// }, },
// { {
// dictLabel: '停用', dictLabel: '停用',
// dictValue: '0' dictValue: '0'
// } }
// ], ],
// 日期范围 // 日期范围
dateRange: [], dateRange: [],
// 查询参数 // 查询参数
...@@ -387,9 +387,9 @@ export default { ...@@ -387,9 +387,9 @@ export default {
this.queryParams = { ...param } this.queryParams = { ...param }
} }
this.getList() this.getList()
this.getDicts(dictCons['NORMAL_DISABLE']).then(response => { // this.getDicts(dictCons['NORMAL_DISABLE']).then(response => {
this.statusOptions = response.data // this.statusOptions = response.data
}) // })
// optionselect().then(response => { // optionselect().then(response => {
// this.options = response.data // this.options = response.data
// }) // })
......
...@@ -507,17 +507,18 @@ export default { ...@@ -507,17 +507,18 @@ export default {
}) })
}, },
handleStatusChange(row) { handleStatusChange(row) {
row.children = []
const text = row.flag === '0' ? '停用' : '启用' const text = row.flag === '0' ? '停用' : '启用'
this.$confirm('确认要' + text + '该菜单吗?', '提示', { this.$confirm('确认要' + text + '该菜单吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function() {
return updateMenu(row)
}).then(() => { }).then(() => {
this.$message({ updateMenu(row).then(() => {
message: text + '成功', this.$message({
type: 'success' message: text + '成功',
type: 'success'
})
}) })
}).catch(function() { }).catch(function() {
row.flag = row.flag === '0' ? '1' : '0' row.flag = row.flag === '0' ? '1' : '0'
......
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