From ac0a84de04b09d7b7693520b56a030d30f1af62b Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期一, 07 四月 2025 15:41:47 +0800
Subject: [PATCH] 系统配置新增筛选
---
UI-Project/src/views/User/userpageNo.vue | 49 +++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/UI-Project/src/views/User/userpageNo.vue b/UI-Project/src/views/User/userpageNo.vue
index 4f4e866..9783098 100644
--- a/UI-Project/src/views/User/userpageNo.vue
+++ b/UI-Project/src/views/User/userpageNo.vue
@@ -11,8 +11,8 @@
const { t } = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
const selectedProjectNoa = ref(null);
-const userName = ref('');
-const password = ref('');
+const configName = ref('');
+const configCode = ref('');
const tableData = ref([])
const currentPage2 = ref(1)
const totalRecords = ref(0)
@@ -22,11 +22,11 @@
try {
const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{
pageNo: 1,
- pageSize: 20,
+ pageSize: 10,
configName: "",
configCode: "",
configValue: "",
- isEnable: 0
+ isEnable: -1
});
if (response.code === 200) {
const formattedData = response.data.records.map(record => ({
@@ -45,6 +45,32 @@
onMounted(() => {
listByUserName('');
});
+ const handleClick = async () => {
+ try {
+ const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{
+ pageNo: 1,
+ pageSize: 10,
+ configName: configName.value,
+ configCode: configCode.value,
+ configValue: configValue.value,
+ // isEnable: isEnable.value
+ isEnable: isEnable.value !== '' ? isEnable.value : -1,
+
+ });
+ if (response.code === 200) {
+ const formattedData = response.data.records.map(record => ({
+ ...record,
+ formattedCreateTime: formatTimestamp(record.createTime),
+ formattedUpdateTime: formatTimestamp(record.updateTime),
+ }));
+ tableData.value = formattedData;
+ totalRecords.value = response.data.total/2 || 0
+ } else {
+ ElMessage.warning(response.data);
+ }
+ } catch (error) {
+ }
+};
const handlePageChange2 = (newPage) => {
currentPage2.value = newPage;
window.localStorage.setItem('pagenumber', currentPage2.value)
@@ -55,11 +81,11 @@
let page = window.localStorage.getItem('pagenumber')
const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{
pageNo: page,
- pageSize: 20,
+ pageSize: 10,
configName: "",
configCode: "",
configValue: "",
- isEnable: 0
+ isEnable: -1
});
if (response.code === 200) {
const formattedData = response.data.records.map(record => ({
@@ -99,6 +125,7 @@
let configName = window.localStorage.getItem('configName')
let configCode = window.localStorage.getItem('configCode')
let id = window.localStorage.getItem('id')
+ let page = window.localStorage.getItem('pagenumber')
try {
const response = await request.post('/loadGlass/sys/sysConfig/updateConfig',{
id: id,
@@ -133,6 +160,16 @@
<template>
<div>
<el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" >
+ <div style="display: flex;width: 1770px;">
+ <el-input v-model="configName" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('productStock.configName')" />
+ <el-input v-model="configCode" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputa" :placeholder="$t('productStock.configCode')" />
+ <el-input v-model="configValue" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('productStock.configValue')" />
+ <el-select v-model="isEnable" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('sorter.startstatus')">
+ <el-option :label="$t('sorter.start')" value="1"></el-option>
+ <el-option :label="$t('sorter.disable')" value="0"></el-option>
+ </el-select>
+ <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button>
+ </div>
<div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
<el-table height="750" ref="table" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"
:data="tableData">
--
Gitblit v1.8.0