修改主体界面,部门设置和权限设置。

This commit is contained in:
廖德云 2025-11-29 22:04:33 +08:00
parent 311452fe4d
commit bb040b01fe
12 changed files with 110 additions and 109 deletions

View File

@ -1,10 +1,10 @@
# 页面标题
VITE_APP_TITLE = 天然气工具
VITE_APP_TITLE = 天然气工具
# 开发环境配置
VITE_APP_ENV = 'development'
# 天然气工具/开发环境
# 天然气工具/开发环境
VITE_APP_BASE_API = '/dev-api'
# 路由基础路径

View File

@ -1,10 +1,10 @@
# 页面标题
VITE_APP_TITLE =天然气工具
VITE_APP_TITLE =天然气工具
# 生产环境配置
VITE_APP_ENV = 'production'
# 天然气工具/生产环境
# 天然气工具/生产环境
VITE_APP_BASE_API = '/prod-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli

View File

@ -1,10 +1,10 @@
# 页面标题
VITE_APP_TITLE = 天然气工具
VITE_APP_TITLE = 天然气工具
# 生产环境配置
VITE_APP_ENV = 'staging'
# 天然气工具/生产环境
# 天然气工具/生产环境
VITE_APP_BASE_API = '/stage-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli

View File

@ -7,7 +7,7 @@
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="/favicon.ico">
<title>天然气工具</title>
<title>天然气工具</title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<style>
html,

View File

@ -1,8 +1,8 @@
{
"name": "NGTools",
"version": "1.0.0.0",
"description": "天然气工具",
"author": "Geek-XD",
"description": "天然气工具",
"author": "ldeyun",
"license": "MIT",
"type": "module",
"homepage": "https://ngtools.cn:3000",

View File

@ -1,19 +1,66 @@
<template>
<div v-loading="!settingsStore.inited" style="height: 100%;width: 100%;">
<router-view />
</div>
<div v-loading="!settingsStore.inited" style="height: 100%;width: 100%;">
<router-view />
</div>
</template>
<script setup>
import useSettingsStore from '@/store/modules/settings'
import { handleThemeStyle } from '@/utils/theme'
const settingsStore = useSettingsStore()
onMounted(() => {
nextTick(() => {
settingsStore.initSetting(() => {
//
handleThemeStyle(settingsStore.theme)
})
})
})
</script>
import useSettingsStore from '@/store/modules/settings'
import {
handleThemeStyle
} from '@/utils/theme'
import {
listConvert
} from '@/api/system/convert.js';
const settingsStore = useSettingsStore()
const unitData = ref([]);
const queryParams = ref({
pageNum: 1,
pageSize: 1000,
unitType: null,
unitName: null,
baseUnit: null,
conversionFactor: null,
unitTypeName: null,
status: null,
unitOrder: null
});
//
const groupByUnitType = (data) => {
return data.reduce((acc, unit) => {
const type = unit.unitType;
if (!acc[type]) acc[type] = [];
acc[type].push({
id: unit.id,
unitType: unit.unitType,
unitName: unit.unitName,
conversionFactor: unit.conversionFactor,
unitOrder: unit.unitOrder,
baseUnit: unit.baseUnit,
status: unit.status,
unitTypeName: unit.unitTypeName
});
return acc;
}, {});
};
const getList = async () => {
try {
const response = await listConvert(queryParams.value);
const unitDataGrouped = groupByUnitType(response.rows);
localStorage.setItem('unitData', JSON.stringify(unitDataGrouped));
} catch (error) {
console.error('获取单位数据失败:', error);
}
};
onMounted(() => {
getList();
nextTick(() => {
settingsStore.initSetting(() => {
//
handleThemeStyle(settingsStore.theme)
})
})
})
</script>

View File

@ -99,12 +99,12 @@
<el-form-item v-if="dMeterType === '0'" :style="{ width: selectWidth + 'px' }" label="等熵指数" prop="dKappa">
<el-input readonly v-model="meterResult.dKappa" placeholder="" />
</el-form-item>
<el-form-item v-if="dMeterType === '0'" :style="{ width: selectWidth + 'px' }" label="孔板锐利度系数Bk" prop="dBk">
<!-- <el-form-item v-if="dMeterType === '0'" :style="{ width: selectWidth + 'px' }" label="孔板锐利度系数Bk" prop="dBk">
<el-input readonly v-model="meterResult.dBk" placeholder="" />
</el-form-item>
<el-form-item v-if="dMeterType === '0'" :style="{ width: selectWidth + 'px' }" label="管道粗糙度系数 Gme" prop="dRoughNessPipe">
<el-input readonly v-model="meterResult.dRoughNessPipe" placeholder="" />
</el-form-item>
</el-form-item> -->
</el-form>
</div>
</template>

View File

@ -65,7 +65,7 @@ function setLayout() {
<div class="right-menu">
<template v-if="appStore.device !== 'mobile'">
<header-search id="header-search" class="right-menu-item" />
<!--
<el-tooltip content="gitee源码地址" effect="dark" placement="bottom">
<ruo-yi-gitee id="ruoyi-gitee" class="right-menu-item hover-effect svg-menu-item" />
</el-tooltip>
@ -76,7 +76,7 @@ function setLayout() {
<el-tooltip content="文档地址" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect svg-menu-item" />
</el-tooltip>
</el-tooltip> -->
<el-tooltip content="专注模式" effect="dark" placement="bottom">
<screenfull id="screenfull" class="right-menu-item hover-effect svg-menu-item" />

View File

@ -47,9 +47,9 @@ onMounted(async () => {
});
const features = [
{ icon: Document, text: '模块解耦' },
{ icon: ChatDotRound, text: '前沿技术' },
{ icon: User, text: '多端支持' }
{ icon: Document, text: '工艺及计量计算' },
{ icon: ChatDotRound, text: '标准规范数据' },
{ icon: User, text: '网站和小程序' }
];
const method = ref("password");
@ -72,8 +72,8 @@ const title = computed(() => import.meta.env.VITE_APP_TITLE || '后台管理系
</div>
<div class="container" :class="{ 'appear-animation': pageLoaded }">
<div class="container-left">
<h1>欢迎使用GEEK生态</h1>
<p>打造高效现代可扩展的企业级开发平台</p>
<h1>欢迎使用天然气工具箱</h1>
<p>持续打造天然气的工艺参数和流量计算资料查询工具箱</p>
<div class="features">
<div class="feature-item" v-for="(item, index) in features" :key="index">
<el-icon>
@ -83,9 +83,8 @@ const title = computed(() => import.meta.env.VITE_APP_TITLE || '后台管理系
</div>
</div>
<div class="success-stories">
<div class="story-counter">
<span class="counter">{{ successCount }}+</span>
<span class="counter-label">成功案例</span>
<div class="story-counter">
<span class="counter-label">持续开发中......</span>
</div>
</div>
</div>
@ -102,7 +101,7 @@ const title = computed(() => import.meta.env.VITE_APP_TITLE || '后台管理系
</div>
<!-- 底部 -->
<div class="el-auth-footer">
<span>Copyright © 2018-2024 若依Geek后台管理系统 All Rights Reserved.</span>
<span>Copyright © 2018-2024 Ruoyi-Geek All Rights Reserved.</span>
</div>
</div>
</template>

View File

@ -10,7 +10,8 @@ import { useStorage } from "@vueuse/core";
const props = defineProps<{
register: boolean,
captchaEnabled: boolean,
method: 'password' | 'phone' | 'email'
method: 'password'
// method: 'password' | 'phone' | 'email'
}>()
const userStore = useUserStore()

View File

@ -6,22 +6,22 @@
<el-col :lg="6" :md="8" :sm="24" :xs="24">
<el-card class="user-info-card">
<div class="user-profile">
<el-avatar :size="80" :src="userInfo.avatar || profile" />
<el-avatar :size="40" :src="userInfo.avatar || profile" />
<h2 class="welcome-text">欢迎回来{{ userInfo.name }}</h2>
<p class="user-role">{{ userInfo.roleName }}</p>
</div>
<div class="user-stats">
<div class="stat-item">
<div class="stat-value text-ellipsis" :title="formatDate(userInfo.loginDate) || '暂无'">
{{ formatDate(userInfo.loginDate) || '暂无' }}
</div>
<p class="stat-label">上次登录</p>
</div>
上次登录 {{ formatDate(userInfo.loginDate) || '暂无' }}
</div>
</div></div>
<div class="user-stats">
<div class="stat-item">
<div class="stat-value text-ellipsis" :title="userInfo.deptName || '暂无'">
{{ userInfo.deptName || '暂无' }}
所属部门{{ userInfo.deptName || '暂无' }}
</div>
<p class="stat-label">所属部门</p>
</div>
</div>
</el-card>
@ -63,8 +63,8 @@
<el-col :span="24">
<el-card class="welcome-card">
<div class="welcome-container">
<h1 class="welcome-title">欢迎使用 RuoYi-Geek-Vue3</h1>
<p class="welcome-desc">基于 Vue3TypeScriptViteElement-Plus 的后台管理系统</p>
<h1 class="welcome-title">欢迎使用天然气工具箱</h1>
<p class="welcome-desc">基于Ruoyi-Geek开源开发</p>
</div>
<el-row :gutter="20" class="feature-section">
@ -83,7 +83,7 @@
</el-card>
</el-col>
<!-- 移动端公告展示 -->
<!-- 移动端公告展示
<el-col :span="24">
<el-card class="notice-card show-on-small" v-loading="noticeLoading">
<template #header>
@ -113,10 +113,10 @@
</div>
<el-empty v-else description="暂无公告" />
</el-card>
</el-col>
</el-col> -->
<!-- 内置功能说明 -->
<el-col :span="24">
<!-- <el-col :span="24">
<el-card class="features-card">
<template #header>
<div class="card-header">
@ -140,7 +140,7 @@
</el-col>
</el-row>
</el-card>
</el-col>
</el-col> -->
</el-row>
</el-col>
</el-row>
@ -151,11 +151,7 @@
</el-dialog>
</div>
</template>
<script setup name="Index" lang="ts">
import { listConvert } from '@/api/system/convert.js';
<script setup name="Index" lang="ts">
import { ref, onMounted } from 'vue'
import { listNotice } from '@/api/system/notice'
import { parseTime } from '@/utils/ruoyi'
@ -167,50 +163,9 @@ import { useRouter, type RouteLocationRaw } from 'vue-router'
import { GeekResponseForList } from '@/types/request'
const unitData = ref([]);
const queryParams = ref({
pageNum: 1,
pageSize: 1000,
unitType: null,
unitName: null,
baseUnit: null,
conversionFactor: null,
unitTypeName: null,
status: null,
unitOrder: null
});
//
const groupByUnitType = (data) => {
return data.reduce((acc, unit) => {
const type = unit.unitType;
if (!acc[type]) acc[type] = [];
acc[type].push({
id: unit.id,
unitType: unit.unitType,
unitName: unit.unitName,
conversionFactor: unit.conversionFactor,
unitOrder: unit.unitOrder,
baseUnit: unit.baseUnit,
status: unit.status,
unitTypeName: unit.unitTypeName
});
return acc;
}, {});
};
const getList = async () => {
try {
const response = await listConvert(queryParams.value);
const unitDataGrouped = groupByUnitType(response.rows);
localStorage.setItem('unitData', JSON.stringify(unitDataGrouped));
} catch (error) {
console.error('获取单位数据失败:', error);
}
};
const router = useRouter()
const dPipeD=ref(0)
const dLenUnit=ref(0)
interface Feature {
icon: string;
title: string;
@ -242,18 +197,18 @@ interface Notice {
const features = ref<Feature[]>([
{
icon: 'Monitor',
title: '技术先进',
description: '采用Vue3、TypeScript等最新技术栈保持与时俱进'
title: '严格执行标准',
description: '全部采用相关国家和行业标准的算法。'
},
{
icon: 'SetUp',
title: '简单易用',
description: '开箱即用的后台解决方案,内置完整的权限验证系统'
title: '确保计算准确',
description: '计算结果准确,用标准计算实例验证。'
},
{
icon: 'Document',
title: '规范开发',
description: '遵循最佳实践,统一的编码规范,让项目更易维护'
title: '多端灵活好用',
description: '开发了web端、移动APP以及微信小程序方便使用'
}
])
@ -328,7 +283,6 @@ const viewMoreNotices = () => {
onMounted(() => {
userInfo.getInfo()
getNoticeList()
getList();
})
</script>
@ -403,7 +357,7 @@ onMounted(() => {
.welcome-text {
margin: 15px 0 5px;
font-size: 1.2em;
font-size: 1.1em;
color: var(--el-text-color-primary);
}
@ -423,7 +377,7 @@ onMounted(() => {
text-align: center;
.stat-value {
font-size: 1.1em;
font-size: 1.0em;
color: var(--el-text-color-primary);
margin-bottom: 5px;
}

View File

@ -31,12 +31,12 @@ export default defineConfig(({ mode, command }) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://localhost:9090',
target: 'http://ngtools.cn:9999',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
},
'/v3': {
target: 'http://localhost:9090',
target: 'http://ngtools.cn:9999',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')
}