From 21a76af55c4da5f1999e9dd24690b2449a7a18a7 Mon Sep 17 00:00:00 2001
From: ZengTao <2773468879@qq.com>
Date: 星期四, 05 六月 2025 14:19:41 +0800
Subject: [PATCH] 磨边模块大屏代码迁移
---
UI-Project/src/views/User/userpageNo.vue | 78 ++++++++++++++++++++++++++++++++-------
1 files changed, 64 insertions(+), 14 deletions(-)
diff --git a/UI-Project/src/views/User/userpageNo.vue b/UI-Project/src/views/User/userpageNo.vue
index 4f4e866..1ef997c 100644
--- a/UI-Project/src/views/User/userpageNo.vue
+++ b/UI-Project/src/views/User/userpageNo.vue
@@ -11,22 +11,26 @@
const { t } = useI18n()
let language = ref(localStorage.getItem('lang') || 'zh')
const selectedProjectNoa = ref(null);
-const userName = ref('');
-const password = ref('');
+const configName = ref('');
+const configNamesearch = ref('');
+const configCode = ref('');
+const configCodesearch = 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 => ({
@@ -34,8 +38,8 @@
formattedCreateTime: formatTimestamp(record.createTime),
formattedUpdateTime: formatTimestamp(record.updateTime),
}));
- tableData.value = formattedData;
- totalRecords.value = response.data.total/2 || 0
+ tableData.value = formattedData;
+ totalRecords.value = response.data.pages*10
} else {
ElMessage.warning(response.data);
}
@@ -45,6 +49,31 @@
onMounted(() => {
listByUserName('');
});
+ const handleClick = async () => {
+ try {
+ const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{
+ pageNo: 1,
+ pageSize: 10,
+ configName: configNamesearch.value,
+ configCode: configCodesearch.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.pages*10
+ } else {
+ ElMessage.warning(response.data);
+ }
+ } catch (error) {
+ }
+};
const handlePageChange2 = (newPage) => {
currentPage2.value = newPage;
window.localStorage.setItem('pagenumber', currentPage2.value)
@@ -55,11 +84,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 => ({
@@ -67,8 +96,8 @@
formattedCreateTime: formatTimestamp(record.createTime),
formattedUpdateTime: formatTimestamp(record.updateTime),
}));
- tableData.value = formattedData;
- totalRecords.value = response.data.total/2 || 0
+ tableData.value = formattedData;
+ totalRecords.value = response.data.pages*10
} else {
ElMessage.warning(response.data);
}
@@ -80,6 +109,7 @@
adda.value = true;
configValue.value = row.configValue
isEnable.value = row.isEnable
+ configName.value = row.configName
window.localStorage.setItem('id', row.id)
window.localStorage.setItem('configName', row.configName)
window.localStorage.setItem('configCode', row.configCode)
@@ -99,6 +129,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,8 +164,18 @@
<template>
<div>
<el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" >
+ <div style="display: flex;width: 1770px;">
+ <el-input v-model="configNamesearch" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('productStock.configName')" />
+ <el-input v-model="configCodesearch" 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="750" 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')"/>
@@ -175,11 +216,20 @@
</div>
</el-card>
</div>
- <el-dialog v-model="adda" top="23vh" width="37%" :title="$t('productStock.reusername')" >
+ <el-dialog v-model="adda" top="23vh" width="37%" >
<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;">
+ <div>
+ <el-form-item :label="$t('productStock.configNamea')" :required="true" style="width: 25vw">
+ <el-input :placeholder="$t('productStock.configName')" disabled v-model="configName" autocomplete="off" style="width: 350px;"/>
+ </el-form-item></div></div>
+ </el-col>
+ </el-row>
+ <el-row style="margin-top: 10px;margin-bottom: -2px;">
<el-col :span="6">
<div id="dt" style="font-size: 15px;">
<div>
@@ -222,7 +272,7 @@
</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