fix : 细节优化
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="handleSearch()" :icon="Search">搜索</el-button>
|
||||
<el-button type="primary" @click="getList" :icon="Search">搜索</el-button>
|
||||
<el-button @click="handleReset" :icon="Refresh">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -160,10 +160,7 @@ const formRules = ref({
|
||||
{required: true, message: "系统内置不能为空", trigger: "change"},
|
||||
],
|
||||
})
|
||||
//搜索功能
|
||||
const handleSearch = () => {
|
||||
getList()
|
||||
}
|
||||
|
||||
//重置搜索
|
||||
const handleReset = () => {
|
||||
queryForm.value.resetFields()
|
||||
|
||||
@@ -182,8 +182,12 @@ const getEditOption = (deptId) => {
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
getDeptList(queryParams).then(res => {
|
||||
list.value = res.data
|
||||
loading.value = false
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data
|
||||
loading.value = false
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
const getDetail = (deptId) => {
|
||||
|
||||
@@ -44,8 +44,10 @@
|
||||
<el-table-column prop="createTime" label="创建时间"/>
|
||||
<el-table-column label="操作" prop="operation">
|
||||
<template #default="scope">
|
||||
<el-button type="primary" v-if="scope.row.menuType!=='B'" size="mini" @click="handleAdd(scope.row)" link>新增</el-button>
|
||||
<div v-else style="display: inline-block"> </div>
|
||||
<el-button type="primary" v-if="scope.row.menuType!=='B'" size="mini" @click="handleAdd(scope.row)" link>新增
|
||||
</el-button>
|
||||
<div v-else style="display: inline-block">
|
||||
</div>
|
||||
<el-button type="primary" size="mini" @click="handleEdit(scope.row.menuId)" link>修改</el-button>
|
||||
<el-button type="primary" size="mini" @click="handleAssignRoles(scope.row)" link>分配角色</el-button>
|
||||
<popover-delete :name="scope.row.menuName" :type="'菜单'" @delete="handleDel(scope.row.menuId)"/>
|
||||
@@ -230,8 +232,12 @@ const getSelectIcon = (val) => {
|
||||
const getList = async () => {
|
||||
loading.value = true
|
||||
getMenuList(queryParams).then(res => {
|
||||
list.value = res.data
|
||||
loading.value = false
|
||||
if (res.code === 1000) {
|
||||
list.value = res.data
|
||||
loading.value = false
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,9 @@ const getList = async () => {
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
});
|
||||
}).catch(err => {
|
||||
loading.value = false;
|
||||
})
|
||||
};
|
||||
//查看详情
|
||||
const handleViewDetails = (noticeId) => {
|
||||
|
||||
@@ -332,7 +332,9 @@ const getList = async () => {
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
});
|
||||
}).catch(err => {
|
||||
loading.value = false;
|
||||
})
|
||||
};
|
||||
//查看公告详情
|
||||
const handleViewDetails = async (row) => {
|
||||
|
||||
@@ -141,12 +141,16 @@ const getList = async () => {
|
||||
...queryParams,
|
||||
...pageInfo
|
||||
}).then(res => {
|
||||
res.data.rows = res.data.rows.sort((a, b) => {
|
||||
return a.postSort - b.postSort
|
||||
})
|
||||
total.value = res.data.total;
|
||||
list.value = res.data.rows
|
||||
loading.value = false
|
||||
if (res.code === 1000) {
|
||||
res.data.rows = res.data.rows.sort((a, b) => {
|
||||
return a.postSort - b.postSort
|
||||
})
|
||||
total.value = res.data.total;
|
||||
list.value = res.data.rows
|
||||
loading.value = false
|
||||
} else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleReset = (instance) => {
|
||||
|
||||
@@ -284,6 +284,8 @@ const getList = async () => {
|
||||
list.value = res.data.rows
|
||||
total.value = res.data.total
|
||||
loading.value = false
|
||||
}else {
|
||||
ElMessage.error(res.msg);
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user