test #47

Merged
gtz217 merged 273 commits from test into master 2023-10-17 08:53:54 +08:00
2 changed files with 28 additions and 69 deletions
Showing only changes of commit 6fdc9b2826 - Show all commits

View File

@ -5,7 +5,7 @@ ENV = 'development'
VUE_APP_TITLE = 芋道管理系统 VUE_APP_TITLE = 芋道管理系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.1.8:48080' VUE_APP_BASE_API = 'http://192.168.0.33:48080'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -1,67 +1,14 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px">
<el-form-item label="检测类型名称" prop="name">
<el-input
v-model="queryParams.name"
placeholder="请输入检测类型名称"
clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">
搜索
</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<div <SearchBar
class="s" :formConfigs="searchBarFormConfig"
style=" ref="search-bar"
margin: 8px 0; @headBtnClick="handleSearchBarBtnClick" />
padding: 4px 12px;
border: 1px solid #ccc;
background: #f3f3f3;
">
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
</div>
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['base:quality-inspection-type:create']">
新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
:loading="exportLoading"
v-hasPermi="['base:quality-inspection-type:export']">
导出
</el-button>
</el-col>
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList"></right-toolbar> @queryTable="getList"></right-toolbar>
@ -205,17 +152,21 @@ export default {
name: 'reset', name: 'reset',
}, },
{ {
type: 'button', type: this.$auth.hasPermi('base:quality-inspection-type:create')
? 'button'
: '',
btnName: '新增', btnName: '新增',
name: 'add', name: 'add',
plain: true, plain: true,
color: 'primary', color: 'primary',
}, },
{ {
type: 'button', type: this.$auth.hasPermi('base:quality-inspection-type:export')
? 'button'
: '',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'warning' color: 'warning',
}, },
], ],
}; };
@ -226,20 +177,28 @@ export default {
methods: { methods: {
/** search bar related */ /** search bar related */
handleSearchBarBtnClick(btn) { handleSearchBarBtnClick(btn) {
console.log('btn', btn) const keys = ['name'];
console.log('btn', btn);
switch (btn.btnName) { switch (btn.btnName) {
case 'search': case 'search':
this.getList(); keys.forEach((key) => {
this.queryParams[key] = btn[key] || null;
});
this.handleQuery();
break;
case 'add':
this.handleAdd();
break;
case 'export':
this.handleExport();
break; break;
case 'reset': case 'reset':
this.$refs['search-bar'].resetForm(); this.$refs['search-bar'].resetForm();
this.$nextTick(() => { this.resetQuery();
this.getList();
});
break; break;
} }
}, },
/** 查询列表 */ /** 查询列表 */
getList() { getList() {
this.loading = true; this.loading = true;