create-jnrs-template-vue 1.2.4 → 1.2.6
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/jnrs-template-vue/README.md +9 -9
- package/jnrs-template-vue/package.json +6 -6
- package/jnrs-template-vue/public/favicon.ico +0 -0
- package/jnrs-template-vue/src/assets/styles/common.scss +12 -0
- package/jnrs-template-vue/src/assets/styles/init.scss +0 -12
- package/jnrs-template-vue/src/components/common/CardTable.vue +15 -14
- package/jnrs-template-vue/src/components/common/ImageView.vue +1 -1
- package/jnrs-template-vue/src/components/common/PdfView.vue +1 -1
- package/jnrs-template-vue/src/components/select/SelectManager.vue +7 -1
- package/jnrs-template-vue/src/layout/BlankLayout.vue +2 -2
- package/jnrs-template-vue/src/layout/RouterTabs.vue +3 -13
- package/jnrs-template-vue/src/layout/SideMenu.vue +1 -1
- package/jnrs-template-vue/src/layout/TopHeader.vue +5 -6
- package/jnrs-template-vue/src/locales/zhCn.ts +2 -2
- package/jnrs-template-vue/src/types/index.ts +2 -1
- package/jnrs-template-vue/src/views/demos/crud/index.vue +3 -3
- package/jnrs-template-vue/src/views/login/index.vue +25 -14
- package/jnrs-template-vue/src/views/system/mine/baseInfo.vue +1 -0
- package/package.json +2 -2
- /package/jnrs-template-vue/{eslint.config.js → eslint.config.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# jnrs-template-vue
|
|
2
2
|
|
|
3
3
|
## ✨ 介绍
|
|
4
|
-
巨能前端工程化开发,Vue
|
|
4
|
+
巨能前端工程化开发,Vue 项目信息化管理系统
|
|
5
5
|
|
|
6
6
|
## 💻 技术栈
|
|
7
7
|
TypeScript、Vue3 生态
|
|
@@ -16,30 +16,30 @@ pnpm build
|
|
|
16
16
|
#### 项目结构
|
|
17
17
|
```Text
|
|
18
18
|
jnrs-template-vue/
|
|
19
|
-
├──
|
|
20
|
-
├── node_modules/ # 项目依赖
|
|
21
|
-
├── viteMockServe/ # Mock 服务配置(用于开发环境模拟 API)
|
|
19
|
+
├── viteMockServe/ # Mock 服务配置
|
|
22
20
|
├── public/ # 静态资源
|
|
23
|
-
├── layout/ # 布局
|
|
24
21
|
├── src/ # 源码目录
|
|
25
22
|
│ ├── components/ # Vue 组件
|
|
26
23
|
│ ├── composables/ # 组合式函数
|
|
24
|
+
│ ├── layout/ # 布局
|
|
27
25
|
│ ├── views/ # 页面视图
|
|
28
26
|
│ ├── router/ # 路由配置
|
|
27
|
+
│ ├── api/ # 接口定义
|
|
28
|
+
│ ├── types/ # 类型定义
|
|
29
29
|
│ ├── store/ # 状态管理
|
|
30
30
|
│ ├── utils/ # 工具函数
|
|
31
|
+
│ ├── locales/ # 国际化
|
|
31
32
|
│ └── main.ts # 应用入口
|
|
32
33
|
├── index.html # HTML 入口文件
|
|
33
34
|
├── eslint.config.js # ESLint 配置文件
|
|
34
|
-
├── package.json #
|
|
35
|
+
├── package.json # 包管理配置
|
|
35
36
|
└── vite.config.ts # Vite 构建配置
|
|
36
37
|
├── tsconfig.json # TypeScript 配置
|
|
37
38
|
├── auto-imports.d.ts # 自动导入类型声明
|
|
38
39
|
├── components.d.ts # 全局组件类型声明
|
|
39
40
|
├── README.md # 项目文档
|
|
40
|
-
├── .env.
|
|
41
|
-
├── .env.
|
|
42
|
-
├── .env.production # 生产环境变量(全局)
|
|
41
|
+
├── .env.development # 开发环境变量
|
|
42
|
+
├── .env.production # 生产环境变量
|
|
43
43
|
├── .gitignore # Git 忽略规则
|
|
44
44
|
├── .prettierrc.json # Prettier 格式化配置
|
|
45
45
|
```
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jnrs-template-vue",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "JNRS
|
|
5
|
-
"author": "
|
|
3
|
+
"version": "1.2.6",
|
|
4
|
+
"description": "JNRS 信息化管理系统",
|
|
5
|
+
"author": "talia_tan",
|
|
6
6
|
"private": true,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"engines": {
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@element-plus/icons-vue": "^2.3.2",
|
|
22
|
-
"@jnrs/shared": "1.1.
|
|
23
|
-
"@jnrs/vue-core": "1.2.
|
|
22
|
+
"@jnrs/shared": "1.1.11",
|
|
23
|
+
"@jnrs/vue-core": "1.2.8",
|
|
24
24
|
"@vueuse/core": "^14.1.0",
|
|
25
25
|
"element-plus": "^2.11.9",
|
|
26
26
|
"pinia": "^3.0.4",
|
|
27
27
|
"pinia-plugin-persistedstate": "^4.7.1",
|
|
28
28
|
"vue": "^3.5.25",
|
|
29
|
-
"vue-i18n": "^
|
|
29
|
+
"vue-i18n": "^11.2.8"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@tsconfig/node22": "^22.0.5",
|
|
Binary file
|
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
* 业务功能通用样式表
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
/*
|
|
6
|
+
* 禁止用户选中页面元素
|
|
7
|
+
*/
|
|
8
|
+
.no_select {
|
|
9
|
+
-khtml-user-drag: none;
|
|
10
|
+
-webkit-user-drag: none;
|
|
11
|
+
-webkit-user-select: none;
|
|
12
|
+
-moz-user-select: none;
|
|
13
|
+
-ms-user-select: none;
|
|
14
|
+
user-select: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
5
17
|
.topBarBtn {
|
|
6
18
|
position: relative;
|
|
7
19
|
margin: 0 8px;
|
|
@@ -39,15 +39,3 @@ body {
|
|
|
39
39
|
min-width: 1280px;
|
|
40
40
|
height: 100%;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
/*
|
|
44
|
-
* 禁止用户选中页面元素
|
|
45
|
-
*/
|
|
46
|
-
.no-select {
|
|
47
|
-
-khtml-user-drag: none;
|
|
48
|
-
-webkit-user-drag: none;
|
|
49
|
-
-webkit-user-select: none;
|
|
50
|
-
-moz-user-select: none;
|
|
51
|
-
-ms-user-select: none;
|
|
52
|
-
user-select: none;
|
|
53
|
-
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
|
-
import type {
|
|
10
|
+
import type { Pagination, PageTableData } from '@/types'
|
|
11
11
|
import { ref, onActivated } from 'vue'
|
|
12
12
|
import { JnPagination, JnTable } from '@jnrs/vue-core/components'
|
|
13
13
|
import { debounce } from '@jnrs/shared/lodash'
|
|
@@ -16,7 +16,8 @@ interface Props {
|
|
|
16
16
|
/**
|
|
17
17
|
* 获取数据表格 api 函数
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
// eslint-disable-next-line
|
|
20
|
+
getTableDataApi?: (data?: Pagination) => Promise<PageTableData<any>>
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
const { getTableDataApi } = defineProps<Props>()
|
|
@@ -24,7 +25,7 @@ const { getTableDataApi } = defineProps<Props>()
|
|
|
24
25
|
const loading = ref(false)
|
|
25
26
|
const tableData = ref()
|
|
26
27
|
const total = ref(0)
|
|
27
|
-
const pagination = ref<Pagination>({ pageNo: 1, pageSize:
|
|
28
|
+
const pagination = ref<Pagination>({ pageNo: 1, pageSize: 20 })
|
|
28
29
|
|
|
29
30
|
const getTable = debounce(async () => {
|
|
30
31
|
if (!getTableDataApi) {
|
|
@@ -32,15 +33,13 @@ const getTable = debounce(async () => {
|
|
|
32
33
|
}
|
|
33
34
|
loading.value = true
|
|
34
35
|
try {
|
|
35
|
-
const res = await getTableDataApi(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}))
|
|
43
|
-
console.log(456)
|
|
36
|
+
const res = await getTableDataApi(pagination.value)
|
|
37
|
+
tableData.value =
|
|
38
|
+
res.list?.map((item) => ({
|
|
39
|
+
...item,
|
|
40
|
+
newImageFiles: item.imageDocument?.attachments,
|
|
41
|
+
newAttachmentFile: item.attachmentDocument?.attachments
|
|
42
|
+
})) || []
|
|
44
43
|
total.value = res.count
|
|
45
44
|
} catch (error) {
|
|
46
45
|
console.error(error)
|
|
@@ -50,10 +49,12 @@ const getTable = debounce(async () => {
|
|
|
50
49
|
}, 300)
|
|
51
50
|
|
|
52
51
|
onActivated(() => {
|
|
53
|
-
console.log(123)
|
|
54
|
-
|
|
55
52
|
getTable()
|
|
56
53
|
})
|
|
54
|
+
|
|
55
|
+
defineExpose({
|
|
56
|
+
getTable
|
|
57
|
+
})
|
|
57
58
|
</script>
|
|
58
59
|
|
|
59
60
|
<template>
|
|
@@ -12,9 +12,15 @@ import { JnSelectTemplate } from '@jnrs/vue-core/components'
|
|
|
12
12
|
</script>
|
|
13
13
|
|
|
14
14
|
<template>
|
|
15
|
-
<JnSelectTemplate
|
|
15
|
+
<JnSelectTemplate
|
|
16
|
+
tableName="项目经理"
|
|
17
|
+
:keyValue="{ name: 'manager', id: 'managerId', code: 'code' }"
|
|
18
|
+
optionSecondaryField="code"
|
|
19
|
+
:listApi="TableApi"
|
|
20
|
+
>
|
|
16
21
|
<template #table>
|
|
17
22
|
<el-table-column prop="manager" label="项目经理" align="center" sortable />
|
|
23
|
+
<el-table-column prop="code" label="编码" align="center" sortable />
|
|
18
24
|
</template>
|
|
19
25
|
</JnSelectTemplate>
|
|
20
26
|
</template>
|
|
@@ -99,19 +99,9 @@ const handleTabClick = (tab: TabsPaneContext) => {
|
|
|
99
99
|
</script>
|
|
100
100
|
|
|
101
101
|
<template>
|
|
102
|
-
<div class="routerTabs">
|
|
103
|
-
<el-tabs
|
|
104
|
-
v-
|
|
105
|
-
type="card"
|
|
106
|
-
@tab-remove="removeTab"
|
|
107
|
-
@tab-click="handleTabClick"
|
|
108
|
-
>
|
|
109
|
-
<el-tab-pane
|
|
110
|
-
v-for="item in menuTabs"
|
|
111
|
-
:key="item.name"
|
|
112
|
-
:name="item.name"
|
|
113
|
-
:closable="!isHome(item)"
|
|
114
|
-
>
|
|
102
|
+
<div class="routerTabs no_select">
|
|
103
|
+
<el-tabs v-model="activeRouterName" type="card" @tab-remove="removeTab" @tab-click="handleTabClick">
|
|
104
|
+
<el-tab-pane v-for="item in menuTabs" :key="item.name" :name="item.name" :closable="!isHome(item)">
|
|
115
105
|
<template #label>
|
|
116
106
|
<span>{{ tabLabel(item) }}</span>
|
|
117
107
|
</template>
|
|
@@ -13,7 +13,7 @@ const route = useRoute()
|
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
15
|
<template>
|
|
16
|
-
<el-aside class="sideMenu">
|
|
16
|
+
<el-aside class="sideMenu no_select">
|
|
17
17
|
<div class="logo" :class="{ logo_collapse: menuCollapse }">
|
|
18
18
|
<img class="logo_img" src="@/assets/images/common/jnrs-white.svg" alt="jnrs" />
|
|
19
19
|
<span class="logo_text">{{ $t('main.title') }}</span>
|
|
@@ -37,7 +37,7 @@ const showGlobalSetting = () => {
|
|
|
37
37
|
</script>
|
|
38
38
|
|
|
39
39
|
<template>
|
|
40
|
-
<div class="topHeader">
|
|
40
|
+
<div class="topHeader no_select">
|
|
41
41
|
<div class="left">
|
|
42
42
|
<el-icon
|
|
43
43
|
class="topBarBtn"
|
|
@@ -62,7 +62,8 @@ const showGlobalSetting = () => {
|
|
|
62
62
|
<el-popover placement="bottom" trigger="click" :teleported="false" :width="260" :hide-after="0">
|
|
63
63
|
<template #reference>
|
|
64
64
|
<span class="userMenu_reference">
|
|
65
|
-
<ImageView class="userMenu_avatar" :loadKeys="userInfo?.avatarFileName" />
|
|
65
|
+
<ImageView class="userMenu_avatar" :loadKeys="userInfo.avatarFileName" v-if="userInfo?.avatarFileName" />
|
|
66
|
+
<img class="userMenu_avatar" src="@/assets/images/common/avatar.png" v-else />
|
|
66
67
|
<span>{{ userInfo?.name }}</span>
|
|
67
68
|
<DictTag dictName="role" :value="userInfo.role" v-if="userInfo?.role" />
|
|
68
69
|
<el-icon class="userMenu_icon"><arrow-down /></el-icon>
|
|
@@ -136,15 +137,14 @@ $topHoverSize: 35px;
|
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
.userMenu_avatar {
|
|
139
|
-
width: $topHoverSize;
|
|
140
|
-
height: $topHoverSize;
|
|
140
|
+
width: $topHoverSize !important;
|
|
141
|
+
height: $topHoverSize !important;
|
|
141
142
|
border-radius: 50%;
|
|
142
143
|
margin-right: 4px;
|
|
143
144
|
overflow: hidden;
|
|
144
145
|
background: var(--jnrs-background-head);
|
|
145
146
|
}
|
|
146
147
|
.userMenu_icon {
|
|
147
|
-
margin-left: 4px;
|
|
148
148
|
color: var(--jnrs-font-primary-06);
|
|
149
149
|
}
|
|
150
150
|
}
|
|
@@ -178,7 +178,6 @@ $topHoverSize: 35px;
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
.userMenu_roleName {
|
|
181
|
-
margin-left: 4px;
|
|
182
181
|
color: var(--jnrs-color-primary);
|
|
183
182
|
}
|
|
184
183
|
}
|
|
@@ -25,7 +25,7 @@ interface ProcessedProjectItem extends ProjectItem {
|
|
|
25
25
|
const loading = ref(false)
|
|
26
26
|
const tableData = ref<ProcessedProjectItem[]>([])
|
|
27
27
|
const total = ref(0)
|
|
28
|
-
const pagination = ref<Pagination>({ pageNo: 1, pageSize:
|
|
28
|
+
const pagination = ref<Pagination>({ pageNo: 1, pageSize: 20 })
|
|
29
29
|
|
|
30
30
|
// 编辑
|
|
31
31
|
const editDialogRef = ref()
|
|
@@ -77,8 +77,8 @@ const getTable = debounce(async () => {
|
|
|
77
77
|
})
|
|
78
78
|
tableData.value = res.list.map((item) => ({
|
|
79
79
|
...item,
|
|
80
|
-
newImageFiles: item.imageDocument?.attachments
|
|
81
|
-
newAttachmentFile: item.attachmentDocument?.attachments
|
|
80
|
+
newImageFiles: item.imageDocument?.attachments,
|
|
81
|
+
newAttachmentFile: item.attachmentDocument?.attachments
|
|
82
82
|
}))
|
|
83
83
|
total.value = res.count
|
|
84
84
|
} catch (error) {
|
|
@@ -81,7 +81,7 @@ const submitForm = async () => {
|
|
|
81
81
|
</script>
|
|
82
82
|
|
|
83
83
|
<template>
|
|
84
|
-
<div class="
|
|
84
|
+
<div class="login no_select">
|
|
85
85
|
<div class="topFixed_right">
|
|
86
86
|
<el-icon class="topBarBtn" title="全局偏好设置" @click="showGlobalSetting()">
|
|
87
87
|
<el-icon><Setting /></el-icon>
|
|
@@ -131,7 +131,7 @@ const submitForm = async () => {
|
|
|
131
131
|
</el-form>
|
|
132
132
|
<div class="greeting">{{ $t('login.greeting') }}</div>
|
|
133
133
|
</div>
|
|
134
|
-
<div class="
|
|
134
|
+
<div class="copyright">Powered by JNRS TECH 2026</div>
|
|
135
135
|
</div>
|
|
136
136
|
</div>
|
|
137
137
|
</div>
|
|
@@ -139,7 +139,7 @@ const submitForm = async () => {
|
|
|
139
139
|
</template>
|
|
140
140
|
|
|
141
141
|
<style scoped lang="scss">
|
|
142
|
-
.
|
|
142
|
+
.login {
|
|
143
143
|
position: relative;
|
|
144
144
|
width: 100%;
|
|
145
145
|
height: 100%;
|
|
@@ -169,8 +169,6 @@ const submitForm = async () => {
|
|
|
169
169
|
align-items: center;
|
|
170
170
|
justify-content: space-around;
|
|
171
171
|
padding: 8px 16px;
|
|
172
|
-
// background: var(--jnrs-card-primary);
|
|
173
|
-
// border-radius: 10px;
|
|
174
172
|
}
|
|
175
173
|
|
|
176
174
|
.card {
|
|
@@ -184,7 +182,6 @@ const submitForm = async () => {
|
|
|
184
182
|
height: 500px;
|
|
185
183
|
border-radius: 15px;
|
|
186
184
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
|
|
187
|
-
background: radial-gradient(circle at center, #232a4c, #000);
|
|
188
185
|
overflow: hidden;
|
|
189
186
|
|
|
190
187
|
.card_left {
|
|
@@ -193,9 +190,8 @@ const submitForm = async () => {
|
|
|
193
190
|
align-items: center;
|
|
194
191
|
width: 50%;
|
|
195
192
|
height: 100%;
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
// background-size: 100% 100%;
|
|
193
|
+
background: radial-gradient(circle at center, #232a4c, #000);
|
|
194
|
+
box-shadow: 3px 0 6px rgba(0, 0, 0, 0.3);
|
|
199
195
|
|
|
200
196
|
.card_left_mid {
|
|
201
197
|
width: 50%;
|
|
@@ -233,9 +229,8 @@ const submitForm = async () => {
|
|
|
233
229
|
top: 0;
|
|
234
230
|
width: 100%;
|
|
235
231
|
height: 100%;
|
|
236
|
-
|
|
237
|
-
backdrop-filter: blur(
|
|
238
|
-
-webkit-backdrop-filter: blur(4px);
|
|
232
|
+
backdrop-filter: blur(2px);
|
|
233
|
+
-webkit-backdrop-filter: blur(2px);
|
|
239
234
|
}
|
|
240
235
|
|
|
241
236
|
.card_right_mid {
|
|
@@ -289,12 +284,28 @@ const submitForm = async () => {
|
|
|
289
284
|
}
|
|
290
285
|
}
|
|
291
286
|
|
|
292
|
-
.
|
|
287
|
+
.copyright {
|
|
293
288
|
position: absolute;
|
|
294
289
|
bottom: 5px;
|
|
295
290
|
font-size: 12px;
|
|
296
291
|
text-transform: uppercase;
|
|
297
|
-
color:
|
|
292
|
+
color: var(--jnrs-font-primary-01);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.light {
|
|
298
|
+
.card_right {
|
|
299
|
+
&::after {
|
|
300
|
+
background: var(--jnrs-card-primary-06);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.dark {
|
|
306
|
+
.card_right {
|
|
307
|
+
&::after {
|
|
308
|
+
background: var(--jnrs-card-primary-03);
|
|
298
309
|
}
|
|
299
310
|
}
|
|
300
311
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-jnrs-template-vue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "巨能前端工程化开发,Vue 项目模板脚手架",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"TypeScript",
|
|
10
10
|
"monorepo"
|
|
11
11
|
],
|
|
12
|
-
"author": "
|
|
12
|
+
"author": "talia_tan",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
File without changes
|