其它投入品管理分类实现

This commit is contained in:
沈鸿 2025-06-17 09:43:12 +08:00
parent 7193836ea9
commit 4795bfb6f6
3 changed files with 29 additions and 9 deletions

View File

@ -13,9 +13,9 @@ VITE_APP_SUB_GSR = '//localhost:9530/new-digital-agriculture-screen/'
VITE_APP_BASE_API = '/apis' VITE_APP_BASE_API = '/apis'
VITE_APP_UPLOAD_API = '/uploadApis' VITE_APP_UPLOAD_API = '/uploadApis'
# 阿里云接口地址 # 阿里云接口地址
VITE_APP_BASE_URL = 'http://47.109.205.240:8080' # VITE_APP_BASE_URL = 'http://47.109.205.240:8080'
VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300' # VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9300'
# 内网接口地址 # 内网接口地址
# VITE_APP_BASE_URL = 'http://192.168.18.99:8080' VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
# VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080' # VITE_APP_UPLOAD_URL = 'http://192.168.18.99:8080'
# VITE_APP_VIST_URL = 'http://192.168.18.99' # VITE_APP_VIST_URL = 'http://192.168.18.99'

View File

@ -9,11 +9,11 @@ VITE_APP_BASE_API = '/apis'
VITE_APP_UPLOAD_API = '/uploadApis' VITE_APP_UPLOAD_API = '/uploadApis'
# 阿里云接口地址 # 阿里云接口地址
VITE_APP_BASE_URL = 'http://47.109.205.240:8080' # VITE_APP_BASE_URL = 'http://47.109.205.240:8080'
VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9204' # VITE_APP_UPLOAD_URL = 'http://47.109.205.240:9204'
# 内网测试库接口地址 # 内网测试库接口地址
# VITE_APP_BASE_URL = 'http://192.168.18.99:8080' VITE_APP_BASE_URL = 'http://192.168.18.99:8080'
# 本地开发接口地址 # 本地开发接口地址
# VITE_APP_BASE_URL = 'http://192.168.18.74:8080' # VITE_APP_BASE_URL = 'http://192.168.18.74:8080'

View File

@ -9,6 +9,14 @@
<el-button type="primary" @click="searchData">搜索</el-button> <el-button type="primary" @click="searchData">搜索</el-button>
<el-button @click="resetSearch">重置</el-button> <el-button @click="resetSearch">重置</el-button>
</div> </div>
<div class="search-tabs">
<el-tabs v-model="activeTab" @tab-click="handleTabChange">
<el-tab-pane label="全部" name="all" />
<el-tab-pane label="地膜" name="地膜" />
<el-tab-pane label="滴灌带" name="滴灌带" />
<el-tab-pane label="防草布" name="防草布" />
</el-tabs>
</div>
</template> </template>
<template #menu-left><el-button type="primary" icon="Plus" @click="openDialog">新增</el-button></template> <template #menu-left><el-button type="primary" icon="Plus" @click="openDialog">新增</el-button></template>
<template #menu="scope"> <template #menu="scope">
@ -34,8 +42,8 @@
</el-form> </el-form>
<template #footer> <template #footer>
<span class="dialog-footer custom-footer"> <span class="dialog-footer custom-footer">
<el-button @click="dialogVisible = false" class="custom-button">取消</el-button> <el-button class="custom-button" @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submitForm" class="custom-button">确定</el-button> <el-button type="primary" class="custom-button" @click="submitForm">确定</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
@ -93,6 +101,7 @@ const searchForm = reactive({
// avue-crud // avue-crud
const crudRef = ref(null); const crudRef = ref(null);
const activeTab = ref('all');
// //
const tableData = ref([...initialTableData]); const tableData = ref([...initialTableData]);
@ -142,7 +151,18 @@ const options = reactive({
}, },
], ],
}); });
const handleTabChange = (tab) => {
if (tab.props.name === 'all') {
//
tableData.value = [...initialTableData];
} else {
//
tableData.value = initialTableData.filter((item) => item.name.includes(tab.props.name) || item.remark.includes(tab.props.name));
}
//
pagination.currentPage = 1;
pagination.total = tableData.value.length;
};
// //
const dialogVisible = ref(false); const dialogVisible = ref(false);
const isEdit = ref(false); const isEdit = ref(false);