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_BASE_API = 'http://192.168.1.8:48080'
VUE_APP_BASE_API = 'http://192.168.0.33:48080'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -1,67 +1,14 @@
<template>
<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
class="s"
style="
margin: 8px 0;
padding: 4px 12px;
border: 1px solid #ccc;
background: #f3f3f3;
">
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
</div>
<SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<!-- 操作工具栏 -->
<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
:showSearch.sync="showSearch"
@queryTable="getList"></right-toolbar>
@ -205,17 +152,21 @@ export default {
name: 'reset',
},
{
type: 'button',
type: this.$auth.hasPermi('base:quality-inspection-type:create')
? 'button'
: '',
btnName: '新增',
name: 'add',
plain: true,
color: 'primary',
plain: true,
color: 'primary',
},
{
type: 'button',
type: this.$auth.hasPermi('base:quality-inspection-type:export')
? 'button'
: '',
btnName: '导出',
name: 'export',
color: 'warning'
color: 'warning',
},
],
};
@ -226,16 +177,24 @@ export default {
methods: {
/** search bar related */
handleSearchBarBtnClick(btn) {
console.log('btn', btn)
const keys = ['name'];
console.log('btn', btn);
switch (btn.btnName) {
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;
case 'reset':
this.$refs['search-bar'].resetForm();
this.$nextTick(() => {
this.getList();
});
this.resetQuery();
break;
}
},