@bams-app/touch-startr 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # project-startr
2
+
3
+ ## Project setup
4
+ ```
5
+ yarn install
6
+ ```
7
+
8
+ ### Compiles and hot-reloads for development
9
+ ```
10
+ yarn serve
11
+ ```
12
+
13
+ ### Compiles and minifies for production
14
+ ```
15
+ yarn build
16
+ ```
17
+
18
+ ### Lints and fixes files
19
+ ```
20
+ yarn lint
21
+ ```
22
+
23
+ ### Customize configuration
24
+ See [Configuration Reference](https://cli.vuejs.org/config/).
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ presets: [
3
+ '@vue/cli-plugin-babel/preset'
4
+ ],
5
+ plugins: [
6
+ '@babel/plugin-transform-class-static-block'
7
+ ]
8
+ }
package/jsconfig.json ADDED
@@ -0,0 +1,14 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "module": "esnext",
5
+ "baseUrl": "./",
6
+ "moduleResolution": "node",
7
+ "paths": {
8
+ "@/*": ["src/*"],
9
+ "@bams-app/*": ["../../packages/*"],
10
+ "@components-entry": ["../../../build-components-entry.js"]
11
+ },
12
+ "lib": ["esnext", "dom", "dom.iterable", "scripthost"]
13
+ }
14
+ }
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@bams-app/touch-startr",
3
+ "version": "0.1.3",
4
+ "files": [
5
+ "src",
6
+ "public",
7
+ "vue.config.js",
8
+ "babel.config.js",
9
+ "jsconfig.json"
10
+ ],
11
+ "scripts": {
12
+ "serve": "vue-cli-service serve",
13
+ "build": "vue-cli-service build",
14
+ "lint": "vue-cli-service lint"
15
+ },
16
+ "dependencies": {
17
+ "@bams-app/app-layout": "*",
18
+ "@bams-app/base": "*",
19
+ "@bams-app/i18n": "*",
20
+ "@bams-app/message-voice": "*",
21
+ "@bams-app/service": "*",
22
+ "@bams-app/theme": "*",
23
+ "@bams-app/utils": "*",
24
+ "@bams-app/version-check": "*",
25
+ "ant-design-vue": "4.2.6",
26
+ "core-js": "^3.8.3",
27
+ "vue": "^3.5.24",
28
+ "vue-router": "4"
29
+ },
30
+ "devDependencies": {
31
+ "@babel/core": "^7.12.16",
32
+ "@babel/eslint-parser": "^7.12.16",
33
+ "@bams-app/configs": "*",
34
+ "@bams-app/ui-dev-server": "*",
35
+ "@vue/cli-plugin-babel": "~5.0.0",
36
+ "@vue/cli-plugin-eslint": "~5.0.0",
37
+ "@vue/cli-service": "~5.0.0",
38
+ "eslint": "^7.32.0",
39
+ "eslint-plugin-vue": "^8.0.3",
40
+ "less-loader": "^7.3.0",
41
+ "sass-loader": "^10.1.1"
42
+ },
43
+ "eslintConfig": {
44
+ "root": true,
45
+ "env": {
46
+ "node": true
47
+ },
48
+ "extends": [
49
+ "plugin:vue/vue3-essential",
50
+ "eslint:recommended"
51
+ ],
52
+ "parserOptions": {
53
+ "parser": "@babel/eslint-parser"
54
+ },
55
+ "rules": {}
56
+ },
57
+ "browserslist": [
58
+ "> 1%",
59
+ "last 2 versions",
60
+ "not dead",
61
+ "not ie 11"
62
+ ]
63
+ }
Binary file
@@ -0,0 +1,41 @@
1
+ <!doctype html>
2
+ <html lang="">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta http-equiv="X-UA-Compatible" content="IE=edge" />
6
+ <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
+ <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
8
+ <title><%= process.env.VUE_APP_TITLE %></title>
9
+ <link rel="dx-theme" data-theme="material.blue.light" href="/bams-assets/devextreme/css/dx.material.blue.light.css" data-active="true" />
10
+ <link rel="dx-theme" data-theme="material.blue.dark" href="/bams-assets/devextreme/css/dx.material.blue.dark.css" data-active="false" />
11
+ <link rel="dx-theme" data-theme="material.lime.light" href="/bams-assets/devextreme/css/dx.material.lime.light.css" data-active="false" />
12
+ <link rel="dx-theme" data-theme="material.lime.dark" href="/bams-assets/devextreme/css/dx.material.lime.dark.css" data-active="false" />
13
+ <link rel="dx-theme" data-theme="material.orange.light" href="/bams-assets/devextreme/css/dx.material.orange.light.css" data-active="false" />
14
+ <link rel="dx-theme" data-theme="material.orange.dark" href="/bams-assets/devextreme/css/dx.material.orange.dark.css" data-active="false" />
15
+ <link rel="dx-theme" data-theme="material.purple.light" href="/bams-assets/devextreme/css/dx.material.purple.light.css" data-active="false" />
16
+ <link rel="dx-theme" data-theme="material.purple.dark" href="/bams-assets/devextreme/css/dx.material.purple.dark.css" data-active="false" />
17
+ <link rel="dx-theme" data-theme="material.teal.light" href="/bams-assets/devextreme/css/dx.material.teal.light.css" data-active="false" />
18
+ <link rel="dx-theme" data-theme="material.teal.dark" href="/bams-assets/devextreme/css/dx.material.teal.dark.css" data-active="false" />
19
+ </head>
20
+ <body>
21
+ <noscript>
22
+ <strong
23
+ >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to
24
+ continue.</strong
25
+ >
26
+ </noscript>
27
+ <div id="app"></div>
28
+
29
+ <% if (process.env.NODE_ENV === 'production') { %>
30
+ <script src="/bams-assets/vue3/dist/vue.global.prod.js"></script>
31
+ <script src="/bams-assets/vue-router3/dist/vue-router.global.prod.js"></script>
32
+ <script src="/bams-assets/pinia/dist/pinia.iife.prod.js"></script>
33
+ <% } else { %>
34
+ <script src="/bams-assets/vue3/dist/vue.global.js"></script>
35
+ <script src="/bams-assets/vue-router3/dist/vue-router.global.js"></script>
36
+ <script src="/bams-assets/pinia/dist/pinia.iife.prod.js"></script>
37
+ <% } %>
38
+ <script src="/bams-assets/axios/dist-1.13.2/axios.min.js"></script>
39
+ <!-- built files will be auto injected -->
40
+ </body>
41
+ </html>
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": "1.0.10",
3
+ "build_time": "2026-08-11 10:00:00",
4
+ "image": "bams-startr-web",
5
+ "app": "bams_startr"
6
+ }
package/src/App.vue ADDED
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <main class="app">
3
+ <a-config-provider :locale="antdLocale" :theme="antdThemeConfig">
4
+ <router-view />
5
+ <!-- 全局消息通知 / 语音播报 -->
6
+ <MessageVoice />
7
+ </a-config-provider>
8
+ </main>
9
+ </template>
10
+
11
+ <script setup>
12
+ import { computed } from "vue";
13
+ import { theme as antdTheme } from "ant-design-vue";
14
+ import { useI18nContext } from "@bams-app/i18n";
15
+ import { useAntdThemeConfig, useThemeStore } from "@bams-app/theme";
16
+ import { MessageVoice } from "@bams-app/app-layout";
17
+
18
+ const themeStore = useThemeStore();
19
+ const i18n = useI18nContext();
20
+ const antdLocale = computed(() => i18n.antdLocale.value);
21
+ const antdThemeConfig = useAntdThemeConfig(themeStore, antdTheme);
22
+ </script>
23
+
24
+ <style scoped lang="scss">
25
+ .app {
26
+ height: 100vh;
27
+ background: var(--bams-page-bg);
28
+ }
29
+ </style>
Binary file
@@ -0,0 +1,58 @@
1
+ <template>
2
+ <div class="hello">
3
+ <h1>{{ msg }}</h1>
4
+ <p>
5
+ For a guide and recipes on how to configure / customize this project,<br>
6
+ check out the
7
+ <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
8
+ </p>
9
+ <h3>Installed CLI Plugins</h3>
10
+ <ul>
11
+ <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
12
+ <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
13
+ </ul>
14
+ <h3>Essential Links</h3>
15
+ <ul>
16
+ <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
17
+ <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
18
+ <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
19
+ <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
20
+ <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
21
+ </ul>
22
+ <h3>Ecosystem</h3>
23
+ <ul>
24
+ <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
25
+ <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
26
+ <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
27
+ <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
28
+ <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
29
+ </ul>
30
+ </div>
31
+ </template>
32
+
33
+ <script>
34
+ export default {
35
+ name: 'HelloWorld',
36
+ props: {
37
+ msg: String
38
+ }
39
+ }
40
+ </script>
41
+
42
+ <!-- Add "scoped" attribute to limit CSS to this component only -->
43
+ <style scoped>
44
+ h3 {
45
+ margin: 40px 0 0;
46
+ }
47
+ ul {
48
+ list-style-type: none;
49
+ padding: 0;
50
+ }
51
+ li {
52
+ display: inline-block;
53
+ margin: 0 10px;
54
+ }
55
+ a {
56
+ color: #42b983;
57
+ }
58
+ </style>
package/src/main.js ADDED
@@ -0,0 +1,24 @@
1
+ import { createApp } from 'vue'
2
+ import App from './App.vue'
3
+ import router from './router'
4
+
5
+ import bamsBase from "@bams-app/base";
6
+ const app = createApp(App)
7
+
8
+ // 动态加载组件入口并挂载到 window.ui,实现“无感”加载
9
+ import * as uiComponents from '@components-entry';
10
+ window.ui = Object.assign(window.ui || {}, uiComponents);
11
+
12
+ import WorkLayout from "@bams-app/app-layout/src/layout-touch/index";
13
+
14
+ // 版本变化检测:默认关闭,需 VUE_APP_ENABLE_VERSION_CHECK=true 开启;开发环境自动进入调试模式
15
+ import { setupVersionCheck } from "@bams-app/version-check";
16
+ setupVersionCheck({ debug: process.env.NODE_ENV === "development" });
17
+
18
+ // 关闭Vue警告
19
+ app.config.warnHandler = () => { }
20
+ // 或者使用更严格的方式:
21
+ // app.config.silent = true
22
+ app.use(bamsBase, { router, WorkLayout })
23
+ // app.use(router)
24
+ app.$mount('#app')
@@ -0,0 +1,30 @@
1
+ import { createRouter, createWebHistory } from 'vue-router'
2
+ import HomeView from '../views/HomeView.vue'
3
+ import AboutView from '../views/AboutView.vue'
4
+ import LoginView from '../views/LoginView.vue'
5
+
6
+ const routes = [
7
+ {
8
+ path: '/',
9
+ name: 'index1',
10
+ // redirect: '/bams/work/home',
11
+ component: HomeView
12
+ },
13
+ {
14
+ path: '/about',
15
+ name: 'about',
16
+ component: AboutView
17
+ },
18
+ {
19
+ path: '/login',
20
+ name: 'login',
21
+ component: LoginView
22
+ }
23
+ ]
24
+
25
+ const router = createRouter({
26
+ history: createWebHistory(process.env.BASE_URL),
27
+ routes
28
+ })
29
+
30
+ export default router
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <div class="about">
3
+ <h1>About Page</h1>
4
+ <p>This is an about page created with Vue Router.</p>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ export default {
10
+ name: "AboutView",
11
+ };
12
+ </script>
@@ -0,0 +1,12 @@
1
+ <template>
2
+ <div class="home">
3
+ <h1>Home Page</h1>
4
+ <p>Welcome to the Vue 3 + Vue CLI project!</p>
5
+ </div>
6
+ </template>
7
+
8
+ <script>
9
+ export default {
10
+ name: "HomeView",
11
+ };
12
+ </script>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <UiLoginComponent :callback-url="callbackUrl" :sys-code="sysCode" @login-success="onLoginSuccess" />
3
+ </template>
4
+
5
+ <script setup>
6
+ import { computed } from "vue";
7
+ import { useRoute } from "vue-router";
8
+ import { auth } from "@bams-app/utils";
9
+ // 编译阶段根据环境变量通过通用插槽别名选择组件
10
+ import UiLoginComponent from "@configurable/login";
11
+
12
+ const route = useRoute();
13
+ const sysCode = computed(() => auth.getSysCode());
14
+ const callbackUrl = computed(() => route.query.callback_url || "/");
15
+ console.log("回调地址:", decodeURIComponent(callbackUrl.value));
16
+
17
+ const onLoginSuccess = ({ token, userData }) => {
18
+ console.log("登录成功回调", { token, userData });
19
+ };
20
+ </script>
21
+
22
+ <style scoped></style>
package/vue.config.js ADDED
@@ -0,0 +1,19 @@
1
+ const path = require('path')
2
+ const { defineConfig } = require('@vue/cli-service')
3
+ const { merge } = require('@bams-app/configs/config-utils')
4
+ const { getAppBaseConfig } = require('@bams-app/configs/vue.config.app-base')
5
+
6
+ // 项目根:CLI 打包时经 WORK_PROJECT_ROOT 注入(用户项目根),仓库内回退为仓库根(work/apps/<app> 上溯三层)
7
+ const projectRoot = process.env.WORK_PROJECT_ROOT || path.resolve(__dirname, '../../../')
8
+
9
+ module.exports = defineConfig(merge({}, getAppBaseConfig({ projectRoot }), {
10
+ outputDir: path.resolve(projectRoot, 'dist'),
11
+ devServer: {
12
+ proxy: {
13
+ "/bams_mes_touch/bams-startr": {
14
+ target: "http://192.168.7.11:8085",
15
+ changeOrigin: true,
16
+ }
17
+ }
18
+ }
19
+ }))