From d3d7aa9ebbc8265e8dab321d3cee98c385fa696d Mon Sep 17 00:00:00 2001
From: wangfei <3597712270@qq.com>
Date: 星期四, 03 四月 2025 15:01:43 +0800
Subject: [PATCH] 卧式缓存模块图片小片显示、系统管理模块新增系统配置页面
---
UI-Project/src/views/Identify/identifwutwo.vue | 4
UI-Project/src/views/Caching/cachingun.vue | 12 +
UI-Project/src/views/Caching/cachingbefore.vue | 21 +-
UI-Project/src/lang/en.js | 3
UI-Project/src/lang/py.js | 3
UI-Project/src/lang/zh.js | 6 +
UI-Project/src/router/index.js | 5
UI-Project/src/views/User/userpageNo.vue | 250 +++++++++++++++++++++++++++++++++++++++++
8 files changed, 289 insertions(+), 15 deletions(-)
diff --git a/UI-Project/src/lang/en.js b/UI-Project/src/lang/en.js
index cac5c4a..622334e 100644
--- a/UI-Project/src/lang/en.js
+++ b/UI-Project/src/lang/en.js
@@ -399,6 +399,9 @@
height:'Height',
},
productStock:{
+ configName:'閰嶇疆鍚�',
+ configCode:'閰嶇疆浠g爜',
+ configValue:'閰嶇疆鍊�',
addusers:'Add user',
username:'User name',
usernamea:'User name锛�',
diff --git a/UI-Project/src/lang/py.js b/UI-Project/src/lang/py.js
index cf00894..dbb89ea 100644
--- a/UI-Project/src/lang/py.js
+++ b/UI-Project/src/lang/py.js
@@ -398,6 +398,9 @@
height: '袙褘褋芯褌邪',
},
productStock: {
+ configName:'閰嶇疆鍚�',
+ configCode:'閰嶇疆浠g爜',
+ configValue:'閰嶇疆鍊�',
addusers: '袛芯斜邪胁褜褌械 锌芯谢褜蟹芯胁邪褌械谢械泄.',
username: '袠屑褟 锌芯谢褜蟹芯胁邪褌械谢褟.',
usernamea: '袠屑褟 锌芯谢褜蟹芯胁邪褌械谢褟.锛�',
diff --git a/UI-Project/src/lang/zh.js b/UI-Project/src/lang/zh.js
index 9d22654..1029ed7 100644
--- a/UI-Project/src/lang/zh.js
+++ b/UI-Project/src/lang/zh.js
@@ -398,6 +398,12 @@
height:'楂樺害',
},
productStock:{
+ addconfigName:'娣诲姞閰嶇疆',
+ editconfigName:'淇敼閰嶇疆',
+ configName:'閰嶇疆鍚�',
+ configCode:'閰嶇疆浠g爜',
+ configValue:'閰嶇疆鍊�',
+ configValuea:'閰嶇疆鍊硷細',
addusers:'娣诲姞鐢ㄦ埛',
username:'鐢ㄦ埛鍚�',
usernamea:'鐢ㄦ埛鍚嶏細',
diff --git a/UI-Project/src/router/index.js b/UI-Project/src/router/index.js
index 754d40c..c320bf6 100644
--- a/UI-Project/src/router/index.js
+++ b/UI-Project/src/router/index.js
@@ -221,6 +221,11 @@
path: '/User/permissions',
name: 'permissions',
component: () => import('../views/User/permissions.vue')
+ },
+ {
+ path: '/User/userpageNo',
+ name: 'userpageNo',
+ component: () => import('../views/User/userpageNo.vue')
}
]
},
diff --git a/UI-Project/src/views/Caching/cachingbefore.vue b/UI-Project/src/views/Caching/cachingbefore.vue
index 3ec1940..ddc46f0 100644
--- a/UI-Project/src/views/Caching/cachingbefore.vue
+++ b/UI-Project/src/views/Caching/cachingbefore.vue
@@ -34,12 +34,12 @@
}
tableDataa.value = data.EdgStorageCageinfos[0]
tableDatab.value = data.taskMessage
- // adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({
- // ...rect,
- // width: rect.width * 0.5 ,
- // id: rect.id * 10,
- // }));
-};
+ adjustedRects.value = data.EdgStorageCageinfos[0].map((rect, index) => ({
+ ...rect,
+ id: rect.id * 9,
+ showRect: !!data.EdgStorageCageinfos[0][index]?.details[0]
+ }));
+ };
// 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂�
const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
function parseAndSetTime() {
@@ -424,12 +424,13 @@
</el-card>
<div class="awatch">
<img src="../../assets/woshihuancun.png" alt="" style="width: 50%;height: 70%;margin-left: 30%;margin-top: 20px;position: relative;">
- <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;">
- <div
+ <div style="position: relative; width: 500px;height: 95px;margin-top: -142px;margin-left: 600px;">
+ <div
v-for="(rect, index) in adjustedRects"
- :key="rect"
+ v-show="rect.showRect"
+ :key="rect"
:style="{ position: 'absolute',
- top: `${rect.id}px`, left: `10px`, width: `${rect.width}px`, height: `5px`,
+ top: `${rect.id}px`, left: `10px`, width: `422px`, height: `3px`,
backgroundColor: '#409EFF'
}"
>
diff --git a/UI-Project/src/views/Caching/cachingun.vue b/UI-Project/src/views/Caching/cachingun.vue
index 3a5b1ed..5cfea5c 100644
--- a/UI-Project/src/views/Caching/cachingun.vue
+++ b/UI-Project/src/views/Caching/cachingun.vue
@@ -33,7 +33,12 @@
}
tableDataa.value = data.EdgStorageCageinfos[0]
tableDatab.value = data.taskMessage
-};
+ adjustedRects.value = data.EdgStorageCageinfos[0].map((rect, index) => ({
+ ...rect,
+ id: rect.id * 9,
+ showRect: !!data.EdgStorageCageinfos[0][index]?.details[0]
+ }));
+ };
// 鏍煎紡鍖栧悗绔椂闂村苟璁$畻涓�鍛ㄥ墠鐨勬椂闂�
const defaultTime = ref<[Date, Date]>([new Date(), new Date()]);
function parseAndSetTime() {
@@ -401,12 +406,13 @@
</el-card>
<div class="awatch">
<img src="../../assets/woshihuancun.png" alt="" style="width: 50%;height: 70%;margin-left: 30%;margin-top: 20px;position: relative;">
- <div style="position: relative; width: 500px;height: 95px;margin-top: -165px;margin-left: 450px;">
+ <div style="position: relative; width: 500px;height: 95px;margin-top: -222px;margin-left: 600px;">
<div
v-for="(rect, index) in adjustedRects"
+ v-show="rect.showRect"
:key="rect"
:style="{ position: 'absolute',
- top: `${rect.id}px`, left: `10px`, width: `${rect.width}px`, height: `5px`,
+ top: `${rect.id}px`, left: `10px`, width: `422px`, height: `3px`,
backgroundColor: '#409EFF'
}"
>
diff --git a/UI-Project/src/views/Identify/identifwutwo.vue b/UI-Project/src/views/Identify/identifwutwo.vue
index f86764f..c39e832 100644
--- a/UI-Project/src/views/Identify/identifwutwo.vue
+++ b/UI-Project/src/views/Identify/identifwutwo.vue
@@ -98,9 +98,9 @@
// 濡傛灉涓嶅瓨鍦紝鍒欐坊鍔犳柊鐭╁舰锛岄粯璁� isActive 涓� false
return {
...rect,
- xAxisa: rect.xAxis * scaleFactory,
+ xAxisa: rect.xAxis * scaleFactor,
yAxisa: (widthreturn - (rect.yAxis + rect.edgHeight)) * scaleFactory,
- width: rect.edgWidth * scaleFactory,
+ width: rect.edgWidth * scaleFactor,
height: rect.edgHeight * scaleFactory,
widtha: rect.edgWidth,
heighta: rect.edgHeight,
diff --git a/UI-Project/src/views/User/userpageNo.vue b/UI-Project/src/views/User/userpageNo.vue
new file mode 100644
index 0000000..1164937
--- /dev/null
+++ b/UI-Project/src/views/User/userpageNo.vue
@@ -0,0 +1,250 @@
+<script setup>
+import {Search} from "@element-plus/icons-vue";
+import {reactive} from "vue";
+import {useRouter} from "vue-router"
+const router = useRouter()
+const adda = ref(false)
+import request from "@/utils/request"
+import { ref, onMounted } from "vue";
+import { ElMessage, ElMessageBox } from 'element-plus'
+import { useI18n } from 'vue-i18n'
+const { t } = useI18n()
+let language = ref(localStorage.getItem('lang') || 'zh')
+const selectedProjectNoa = ref(null);
+const userName = ref('');
+const password = ref('');
+const tableData = ref([])
+const currentPage2 = ref(1)
+const totalRecords = ref(0)
+const configValue = ref('')
+const isEnable = ref('')
+ const listByUserName = async () => {
+ try {
+ const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{
+ pageNo: 1,
+ pageSize: 20,
+ configName: "",
+ configCode: "",
+ configValue: "",
+ isEnable: 0
+ });
+ 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) {
+ }
+};
+onMounted(() => {
+ listByUserName('');
+});
+const handlePageChange2 = (newPage) => {
+ currentPage2.value = newPage;
+ window.localStorage.setItem('pagenumber', currentPage2.value)
+ historicala(currentPage2.value);
+};
+const historicala = async (page) => {
+ try {
+ let page = window.localStorage.getItem('pagenumber')
+ const response = await request.post('/loadGlass/sys/sysConfig/queryConfigPage',{
+ pageNo: page,
+ pageSize: 20,
+ configName: "",
+ configCode: "",
+ configValue: "",
+ isEnable: 0
+ });
+ 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) {
+ }
+};
+// 澶勭悊缂栬緫鎸夐挳鐐瑰嚮
+function handleEdit(row) {
+ adda.value = true;
+ configValue.value = row.configValue
+ isEnable.value = row.isEnable
+ window.localStorage.setItem('id', row.id)
+ window.localStorage.setItem('configName', row.configName)
+ window.localStorage.setItem('configCode', row.configCode)
+}
+const optionsa = [
+ {
+ value: 0,
+ label: t('sorter.disable'),
+ },
+ {
+ value: 1,
+ 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')
+ try {
+ const response = await request.post('/loadGlass/sys/sysConfig/updateConfig',{
+ id: id,
+ configName: configName,
+ configCode: configCode,
+ configValue: configValue.value,
+ isEnable: isEnable.value
+ }
+ );
+ if (response.code === 200) {
+ ElMessage.success(response.message);
+ adda.value = false;
+ historicala(page)
+ } else {
+ ElMessage.error(response.message);
+ }
+ } catch (error) {
+ }
+};
+// 鏍煎紡鍖栨椂闂存埑涓哄勾鏈堟棩鏃堕棿瀛楃涓茬殑鍑芥暟
+function formatTimestamp(timestamp) {
+ const date = new Date(timestamp);
+ const year = date.getFullYear();
+ const month = String(date.getMonth() + 1).padStart(2, '0'); // 鏈堜唤浠�0寮�濮嬶紝闇�瑕佸姞1锛屽苟琛ラ浂
+ const day = String(date.getDate()).padStart(2, '0'); // 琛ラ浂
+ const hours = String(date.getHours()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
+ const minutes = String(date.getMinutes()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
+ const seconds = String(date.getSeconds()).padStart(2, '0'); // 琛ラ浂锛堝鏋滈渶瑕佹樉绀烘椂闂达級
+ return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+}
+</script>
+<template>
+ <div>
+ <el-card style="flex: 1;margin-left: 10px;margin-top: 20px;" >
+ <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;">
+ <el-table height="400" 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')"/>
+ <el-table-column prop="configValue" align="center" :label="$t('productStock.configValue')"/>
+ <el-table-column
+ align="center"
+ :label="$t('sorter.startstatus')"
+ prop="isEnable"
+ >
+ <template #default="scope">
+ <el-tag
+ :type="scope.row.isEnable === 1 ? 'success' : 'warning'"
+ >
+ {{ scope.row.isEnable === 1 ? $t('sorter.start') : $t('sorter.disable') }}
+ </el-tag>
+ </template>
+ </el-table-column>
+ <el-table-column prop="formattedCreateTime" align="center" :label="$t('film.createtime')"/>
+ <el-table-column prop="formattedUpdateTime" align="center" :label="$t('sorter.updateTime')" />
+ <el-table-column fixed="right" :label="$t('productStock.operate')" align="center" width="270">
+ <template #default="scope">
+ <el-button type="text" plain @click="handleEdit(scope.row)">{{ $t('productStock.exit') }}</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ </div>
+ <div style="margin-top: 20px;margin-left: 40%;">
+ <el-pagination
+ v-model:current-page="currentPage2"
+ :page-size="pageSize"
+ :size="large"
+ :disabled="disabled"
+ layout="prev, pager, next, jumper"
+ :total="totalRecords"
+ @current-change="handlePageChange2"
+ style="margin-top: 10px;"
+ />
+ </div>
+ </el-card>
+ </div>
+ <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-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.configValuea')" :required="true" style="width: 25vw">
+ <el-input :placeholder="$t('productStock.configValue')" v-model="configValue" autocomplete="off" style="width: 350px;"/>
+ </el-form-item></div></div>
+ </el-col>
+ </el-row>
+ <el-row style="margin-top: 10px;">
+ <el-col :span="6">
+ <div id="dt" style="font-size: 15px;">
+ <div>
+ <el-form-item :label="$t('searchOrder.startstatusa')" :required="true" style="width: 25vw;">
+ <el-select
+ :placeholder="$t('searchOrder.startstatus')"
+ clearable
+ style="width: 350px;"
+ v-model="isEnable">
+ <el-option
+ v-for="item in optionsa"
+ :key="item.value"
+ :label="item.label"
+ :value="item.value"
+ />
+ </el-select>
+ </el-form-item></div></div>
+ </el-col>
+ </el-row>
+ </el-form>
+ </el-form>
+ </div>
+ <template #footer>
+ <div id="dialog-footer">
+ <el-button type="primary" @click="getTableRowa">
+ {{ $t('productStock.sure') }}
+ </el-button>
+ <el-button @click="closeDialoga">{{ $t('productStock.cancel') }}</el-button>
+ </div>
+ </template>
+ </el-dialog>
+</template>
+<style scoped>
+#dt { display:block; float:left;line-height: 20px;margin-left: 100px;}
+#dta { display:block; float:left;line-height: 20px;margin-left: 80%;}
+#dialog-footer{
+ text-align: center;
+ margin-top: -15px;
+}
+#message{
+ text-align: center;
+ align-items: center;
+ color: black;
+ width: 200px;
+ height: 100px;
+ background-color: #337ecc;
+ margin-left: 28%;
+}
+#awatch{
+ height: 460px;
+ /* margin-top: -60px; */
+}
+</style>
\ No newline at end of file
--
Gitblit v1.8.0