From eeaddf88176b61b01db069c0939bdaaa3da23e69 Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期三, 23 四月 2025 08:43:20 +0800
Subject: [PATCH] 系统配置查询条件与编辑内容联动显示问题

---
 UI-Project/src/views/User/userpageNo.vue |   64 ++++++++++++++++++++++++--------
 1 files changed, 48 insertions(+), 16 deletions(-)

diff --git a/UI-Project/src/views/User/userpageNo.vue b/UI-Project/src/views/User/userpageNo.vue
index 1164937..51a02d8 100644
--- a/UI-Project/src/views/User/userpageNo.vue
+++ b/UI-Project/src/views/User/userpageNo.vue
@@ -11,22 +11,24 @@
 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)
 const configValue = ref('')
 const isEnable = ref('')
+const configValuesearch = ref('')
+const isEnablesearch = ref('')
   const listByUserName = async () => {  
   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 +47,31 @@
 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: configValuesearch.value,
+      isEnable: isEnablesearch.value !== '' ? isEnablesearch.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 +82,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 => ({
@@ -94,17 +121,12 @@
     label: t('sorter.start'),
   }
   ]
-// function closeDialoga(row) {
-//      adda.value = false;
-//      userName.value = '';
-//      nickName.value = '';
-//      password.value = '';
-// }
 // 缂栬緫
 const getTableRowa = async () => {
   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,
@@ -139,8 +161,18 @@
 <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="configValuesearch" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" @input="handleInputb" :placeholder="$t('productStock.configValue')" />
+    <el-select v-model="isEnablesearch" 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="400" ref="table" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"
+          <el-table height="700" ref="table" :header-cell-style="{ background: '#F2F3F5 ', color: '#1D2129' }"
             :data="tableData">
             <el-table-column prop="configName" align="center" :label="$t('productStock.configName')"/>
           <el-table-column prop="configCode" align="center" :label="$t('productStock.configCode')"/>
@@ -184,7 +216,7 @@
   <el-dialog v-model="adda" top="23vh" width="37%" :title="$t('productStock.reusername')" >
     <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;">
             <el-form ref="formRef" label-width="150px">
-      <el-form label-width="100px" label-position="right">
+      <el-form label-width="120px" label-position="right">
         <el-row style="margin-top: -15px;margin-bottom: -2px;">
           <el-col :span="6">
               <div id="dt" style="font-size: 15px;">
@@ -222,13 +254,13 @@
         <el-button type="primary" @click="getTableRowa">
           {{ $t('productStock.sure') }}
         </el-button>
-        <el-button @click="closeDialoga">{{ $t('productStock.cancel') }}</el-button>
+        <el-button @click="adda = false">{{ $t('productStock.cancel') }}</el-button>
       </div>
     </template>
   </el-dialog> 
 </template>
 <style scoped>
-#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
+#dt { display:block; float:left;line-height: 20px;margin-left: 150px;}
 #dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
 #dialog-footer{
   text-align: center;

--
Gitblit v1.8.0