fix:代码块类目模块页优化

This commit is contained in:
xjh 2023-07-05 11:20:22 +08:00
parent 045df7b934
commit 66699dabed

View File

@ -38,12 +38,15 @@
<el-button type="primary" @click="getList()" icon="ElIconSearch"> <el-button type="primary" @click="getList()" icon="ElIconSearch">
搜索 搜索
</el-button> </el-button>
<el-button @click="reset()" icon="ElIconRefresh">
重置
</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-space style="margin-bottom: 10px;"> <el-space style="margin-bottom: 10px;">
<!-- 添加代码块类目 --> <!-- 添加代码块类目 -->
<el-col :span="1"> <el-col :span="1">
<el-button type="primary" @click="addCodeModuleCategoryDialogVisible = true"> 添加 </el-button> <el-button icon="ElIconPlus" type="primary" @click="addCodeModuleCategoryDialogVisible = true"> 添加 </el-button>
</el-col> </el-col>
<!-- 下拉操作 --> <!-- 下拉操作 -->
<el-dropdown v-if="selectionData.length"> <el-dropdown v-if="selectionData.length">
@ -188,8 +191,8 @@ const params = reactive({
}); });
const dataList = ref([]) const dataList = ref([])
function getList() { async function getList() {
getCodeModuleCategoryList(params).then((res) => { await getCodeModuleCategoryList(params).then((res) => {
if (res.code == 0) { if (res.code == 0) {
dataList.value = res.data dataList.value = res.data
pageCount.value = res.count pageCount.value = res.count
@ -198,9 +201,26 @@ function getList() {
} }
getList() getList()
async function reset() {
params.code_module_category_name = "";
params.code_module_category_ps = "";
params.code_module_category_global_mode = "";
params.code_module_category_library_type = "";
params.customer = "";
params.code_module_category_audit = "";
params.page = 1;
params.limit = 10;
getList()
}
// //
async function handleEditOrder(data) { async function handleEditOrder(data) {
const { code, msg } = await editCodeModuleCategory(data); const { code, msg } = await editCodeModuleCategory(data);
if (code == 0) {
ElMessage.success(msg);
} else {
ElMessage.error(msg);
}
getList(); getList();
} }