diff --git a/src/components/NGTools/NGResult.vue b/src/components/NGTools/NGResult.vue
index 683543c..4360b70 100644
--- a/src/components/NGTools/NGResult.vue
+++ b/src/components/NGTools/NGResult.vue
@@ -3,7 +3,8 @@
GB/T 17747
-
+
@@ -37,7 +38,8 @@
AGA No10
-
+
@@ -63,15 +65,8 @@
-
+
@@ -80,7 +75,8 @@
GB/T 11062
-
+
@@ -120,7 +116,8 @@
其他
-
+
@@ -158,169 +155,202 @@
+
+ 井下液面深度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /* 可按需添加样式 */
+ .app-container {
+ height: 100%;
+ }
+
+ .flex-form {
+ display: grid;
+ /* 优化后的自适应规则 */
+ grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
+ gap: 5px;
+ }
+
\ No newline at end of file
diff --git a/src/components/NGTools/meterPar.vue b/src/components/NGTools/meterPar.vue
index 5585fdd..5e6fcac 100644
--- a/src/components/NGTools/meterPar.vue
+++ b/src/components/NGTools/meterPar.vue
@@ -186,9 +186,9 @@
-
+
diff --git a/src/views/ngtools/FlowCal/index.vue b/src/views/ngtools/FlowCal/index.vue
index 376db95..c3b3ba7 100644
--- a/src/views/ngtools/FlowCal/index.vue
+++ b/src/views/ngtools/FlowCal/index.vue
@@ -94,9 +94,9 @@
dCdCalMethod: 0,
dMeterFactor: 2354,
dPulseNum: 12000,
- dVFlowMax: 50,
- dVFlowMin: 8,
- dVFlowCon: 0.025,
+ dVFlowMax: 30,
+ dVFlowMin: 12,
+ dVFlowCon: 0.03,
dPfRangeMin: 0,
dPfRangeMax: 0,
dDpRangeMin: 0,
@@ -233,8 +233,7 @@
calcBtnFlow();
} else if (['4', '5', '6', '7', ].includes(dMeterType.value)) {
calc();
- }
- else if ([ '20'].includes(dMeterType.value)) {
+ } else if (['20'].includes(dMeterType.value)) {
calcBtnWaterDeep();
}
};
@@ -259,7 +258,7 @@
try {
console.log(parentMeterPar.value)
console.log(dMeterType.value)
- const res = await calcNGPar(parentMeterPar.value);
+ const res = await calcNGPar(parentMeterPar.value);
parentNGResult.value = res.data;
activeTab.value = 'meterresult';
console.log('Response:', res);
@@ -268,7 +267,7 @@
}
};
-// 液面深度
+ // 液面深度
const calcBtnWaterDeep = async () => {
console.log(parentMeterPar.value);
if (parentMeterPar.value.dngComponents === '') {
@@ -286,8 +285,8 @@
try {
console.log(parentMeterPar.value)
console.log(dMeterType.value)
- const res = await calcWaterDeep(parentMeterPar.value);
-
+ const res = await calcWaterDeep(parentMeterPar.value);
+
parentNGResult.value = res.data;
diff --git a/vite.config.js b/vite.config.js
index 03313da..a70e1cc 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,79 +1,86 @@
-import { defineConfig, loadEnv } from 'vite'
+import {
+ defineConfig,
+ loadEnv
+} from 'vite'
import path from 'path'
import createVitePlugins from './vite/plugins'
// https://vitejs.dev/config/
-export default defineConfig(({ mode, command }) => {
- const env = loadEnv(mode, process.cwd())
- const { VITE_APP_ENV, VITE_BASE_ROUTER } = env
- return {
- // 部署生产环境和开发环境下的URL。
- // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
- // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
- base: VITE_APP_ENV === 'production' ? VITE_BASE_ROUTER : VITE_BASE_ROUTER,
- plugins: createVitePlugins(env, command === 'build'),
- resolve: {
- // https://cn.vitejs.dev/config/#resolve-alias
- alias: {
- // 设置路径
- '~': path.resolve(__dirname, './'),
- // 设置别名
- '@': path.resolve(__dirname, './src'),
- '@lib': path.resolve(__dirname, './lib'),
- },
- // https://cn.vitejs.dev/config/#resolve-extensions
- extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
- },
- // vite 相关配置
- server: {
- port: 80,
- host: true,
- open: false, // 启动时是否启动自动打开浏览器
- proxy: {
- // https://cn.vitejs.dev/config/#server-proxy
- '/dev-api': {
-
- target: 'http://192.168.3.19:9999',
- changeOrigin: true,
- rewrite: (p) => p.replace(/^\/dev-api/, '')
- },
- '/v3': {
- target: 'http://ngtools.cn:9999',
- changeOrigin: true,
- rewrite: (p) => p.replace(/^\/dev-api/, '')
- }
- }
- },
- //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
- css: {
- preprocessorOptions: {
- scss: {
- api: 'modern-compiler'
- }
- },
- postcss: {
- plugins: [
- {
- postcssPlugin: 'internal:charset-removal',
- AtRule: {
- charset: (atRule) => {
- if (atRule.name === 'charset') {
- atRule.remove();
- }
- }
- }
- }
- ]
- }
- },
- optimizeDeps: {
- include: [
- '@lib/vform/designer.umd.js',
- ]
- },
- build: {
- commonjsOptions: {
- include: /node_modules|lib/
- }
- }
- }
-})
+export default defineConfig(({
+ mode,
+ command
+}) => {
+ const env = loadEnv(mode, process.cwd())
+ const {
+ VITE_APP_ENV,
+ VITE_BASE_ROUTER
+ } = env
+ return {
+ // 部署生产环境和开发环境下的URL。
+ // 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
+ // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
+ base: VITE_APP_ENV === 'production' ? VITE_BASE_ROUTER : VITE_BASE_ROUTER,
+ plugins: createVitePlugins(env, command === 'build'),
+ resolve: {
+ // https://cn.vitejs.dev/config/#resolve-alias
+ alias: {
+ // 设置路径
+ '~': path.resolve(__dirname, './'),
+ // 设置别名
+ '@': path.resolve(__dirname, './src'),
+ '@lib': path.resolve(__dirname, './lib'),
+ },
+ // https://cn.vitejs.dev/config/#resolve-extensions
+ extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
+ },
+ // vite 相关配置
+ server: {
+ port: 80,
+ host: true,
+ open: false, // 启动时是否启动自动打开浏览器
+ proxy: {
+ // https://cn.vitejs.dev/config/#server-proxy
+ '/dev-api': {
+
+ target: 'http://10.75.166.198:9999',
+ changeOrigin: true,
+ rewrite: (p) => p.replace(/^\/dev-api/, '')
+ },
+ '/v3': {
+ target: 'http://ngtools.cn:9999',
+ changeOrigin: true,
+ rewrite: (p) => p.replace(/^\/dev-api/, '')
+ }
+ }
+ },
+ //fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
+ css: {
+ preprocessorOptions: {
+ scss: {
+ api: 'modern-compiler'
+ }
+ },
+ postcss: {
+ plugins: [{
+ postcssPlugin: 'internal:charset-removal',
+ AtRule: {
+ charset: (atRule) => {
+ if (atRule.name === 'charset') {
+ atRule.remove();
+ }
+ }
+ }
+ }]
+ }
+ },
+ optimizeDeps: {
+ include: [
+ '@lib/vform/designer.umd.js',
+ ]
+ },
+ build: {
+ commonjsOptions: {
+ include: /node_modules|lib/
+ }
+ }
+ }
+})
\ No newline at end of file