create-jnrs-vue 1.2.24 → 1.2.26
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-vue/package.json +5 -5
- package/jnrs-vue/src/api/demos/index.ts +19 -6
- package/jnrs-vue/src/api/system/index.ts +1 -1
- package/jnrs-vue/src/layout/SideMenu.vue +1 -2
- package/jnrs-vue/src/layout/TopHeader.vue +1 -3
- package/jnrs-vue/src/views/login/index.vue +1 -1
- package/jnrs-vue/src/views/visual/index.vue +2 -5
- package/jnrs-vue/tsconfig.json +3 -2
- package/package.json +6 -3
package/jnrs-vue/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jnrs-vue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.26",
|
|
4
4
|
"description": "JNRS 信息化管理系统",
|
|
5
5
|
"author": "talia_tan",
|
|
6
6
|
"private": true,
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@element-plus/icons-vue": "^2.3.2",
|
|
22
|
-
"@jnrs/
|
|
23
|
-
"@jnrs/
|
|
24
|
-
"@jnrs/
|
|
22
|
+
"@jnrs/lingshu-smart": "2.2.7",
|
|
23
|
+
"@jnrs/shared": "1.1.20",
|
|
24
|
+
"@jnrs/vue-core": "1.2.14",
|
|
25
25
|
"@vueuse/core": "^14.1.0",
|
|
26
26
|
"element-plus": "^2.13.3",
|
|
27
27
|
"pinia": "^3.0.4",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"npm-run-all2": "^8.0.4",
|
|
45
45
|
"prettier": "3.6.2",
|
|
46
46
|
"sass": "^1.94.2",
|
|
47
|
-
"typescript": "~
|
|
47
|
+
"typescript": "~6.0.2",
|
|
48
48
|
"unplugin-auto-import": "^20.3.0",
|
|
49
49
|
"unplugin-vue-components": "^29.2.0",
|
|
50
50
|
"vite": "^7.2.2",
|
|
@@ -104,19 +104,18 @@ export const NoNeedAuthApi = () => {
|
|
|
104
104
|
return axiosRequest({
|
|
105
105
|
url: '/auth/no',
|
|
106
106
|
method: 'post',
|
|
107
|
-
noAuth: true
|
|
107
|
+
noAuth: true // 是否需要权限,默认为 false
|
|
108
108
|
})
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/**
|
|
112
112
|
* 测试 无权限
|
|
113
|
-
* @param showErrorMsg 是否显示错误信息
|
|
114
113
|
*/
|
|
115
114
|
export const NoAuthApi = (showErrorMsg: boolean) => {
|
|
116
115
|
return axiosRequest({
|
|
117
116
|
url: '/auth/no',
|
|
118
117
|
method: 'post',
|
|
119
|
-
showErrorMsg
|
|
118
|
+
showErrorMsg // 是否显示错误信息,默认为 true
|
|
120
119
|
})
|
|
121
120
|
}
|
|
122
121
|
|
|
@@ -137,7 +136,7 @@ export const EditProjectApi = (data: EditProject) => {
|
|
|
137
136
|
return axiosRequest({
|
|
138
137
|
url: '/demos/save',
|
|
139
138
|
method: 'post',
|
|
140
|
-
data: objectToFormData(data) //
|
|
139
|
+
data: objectToFormData(data) // 请求体如果为 formData 类型,使用 objectToFormData 方法转换
|
|
141
140
|
})
|
|
142
141
|
}
|
|
143
142
|
|
|
@@ -164,11 +163,11 @@ export const DeleteProjectApi = (id: string) => {
|
|
|
164
163
|
/**
|
|
165
164
|
* 列表数据
|
|
166
165
|
*/
|
|
167
|
-
export const ProjectListApi = (
|
|
166
|
+
export const ProjectListApi = (params?: ProjectQuery): Promise<IPageTableData<Project>> => {
|
|
168
167
|
return axiosRequest({
|
|
169
168
|
url: '/demos/table',
|
|
170
169
|
method: 'get',
|
|
171
|
-
|
|
170
|
+
params
|
|
172
171
|
})
|
|
173
172
|
}
|
|
174
173
|
|
|
@@ -203,3 +202,17 @@ export const ExportApi = (data: Record<string, unknown>): Promise<Blob> => {
|
|
|
203
202
|
data
|
|
204
203
|
})
|
|
205
204
|
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* axios 方式下载文件
|
|
208
|
+
* @param uniqueFileName 文件唯一名称(列表中一般是在 item.attachmentDocument/imageDocument.attachments[].uniqueFileName)
|
|
209
|
+
* @returns Blob
|
|
210
|
+
*/
|
|
211
|
+
export const FileApi = (uniqueFileName: string): Promise<Blob> => {
|
|
212
|
+
return axiosRequest({
|
|
213
|
+
url: '/files/' + uniqueFileName,
|
|
214
|
+
method: 'get',
|
|
215
|
+
responseType: 'blob', // 响应类型为 blob
|
|
216
|
+
showErrorMsg: false // 不显示错误信息
|
|
217
|
+
})
|
|
218
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { computed } from 'vue'
|
|
3
|
-
import { storeToRefs } from 'pinia'
|
|
4
3
|
import { useRoute } from '@jnrs/vue-core/router'
|
|
5
4
|
import { useSystemStore, useMenuStore } from '@jnrs/vue-core/pinia'
|
|
6
5
|
import SideMenuItem from './SideMenuItem.vue'
|
|
7
6
|
|
|
8
7
|
const systemStore = useSystemStore()
|
|
9
|
-
const
|
|
8
|
+
const menuCollapse = computed(() => systemStore.menuCollapse)
|
|
10
9
|
const { toggleCollapse } = systemStore
|
|
11
10
|
const { menus } = useMenuStore()
|
|
12
11
|
const route = useRoute()
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { ref } from 'vue'
|
|
3
|
-
import { storeToRefs } from 'pinia'
|
|
4
3
|
import { ElLoading, ElMessageBox } from 'element-plus'
|
|
5
4
|
import { handleRouter } from '@jnrs/vue-core/router'
|
|
6
5
|
import { GlobalSetting } from '@jnrs/vue-core/components'
|
|
@@ -16,7 +15,6 @@ const { userInfo, clearAuth } = useAuthStore()
|
|
|
16
15
|
const { clearMenu } = useMenuStore()
|
|
17
16
|
|
|
18
17
|
const systemStore = useSystemStore()
|
|
19
|
-
const { documentFullscreen } = storeToRefs(systemStore)
|
|
20
18
|
const { toggleFullScreen } = systemStore
|
|
21
19
|
const globalSettingRef = ref()
|
|
22
20
|
|
|
@@ -75,7 +73,7 @@ const showGlobalSetting = () => {
|
|
|
75
73
|
<Setting />
|
|
76
74
|
</el-icon>
|
|
77
75
|
<el-icon class="topBarBtn" :title="$t('layout.topBarBtn.fullscreenToggle')" @click="toggleFullScreen()">
|
|
78
|
-
<component :is="!documentFullscreen ? 'FullScreen' : 'Rank'" />
|
|
76
|
+
<component :is="!systemStore.documentFullscreen ? 'FullScreen' : 'Rank'" />
|
|
79
77
|
</el-icon>
|
|
80
78
|
<!-- 头像和用户名 -->
|
|
81
79
|
<el-popover placement="bottom" trigger="click" :teleported="false" :width="260" :hide-after="0">
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { type IMsgIdMessage, type ITypeDataMessage, isMsgIdMessage, isTypeDataMessage } from '@/types'
|
|
3
|
-
import { storeToRefs } from 'pinia'
|
|
4
3
|
import { useWebSocket } from '@jnrs/vue-core/composables'
|
|
5
4
|
import { useRouter } from '@jnrs/vue-core/router'
|
|
6
5
|
import { useSystemStore } from '@jnrs/vue-core/pinia'
|
|
7
6
|
|
|
8
7
|
const router = useRouter()
|
|
9
8
|
const systemStore = useSystemStore()
|
|
10
|
-
const { documentFullscreen } = storeToRefs(systemStore)
|
|
11
|
-
const { toggleFullScreen } = systemStore
|
|
12
9
|
|
|
13
10
|
const { isLoading, wsStateInfo } = useWebSocket({
|
|
14
11
|
url: '/ws/monitor',
|
|
@@ -44,8 +41,8 @@ const { isLoading, wsStateInfo } = useWebSocket({
|
|
|
44
41
|
</div>
|
|
45
42
|
</div>
|
|
46
43
|
<div class="visual_head_right">
|
|
47
|
-
<span class="btn" @click="toggleFullScreen">
|
|
48
|
-
{{ !documentFullscreen ? '启用全屏' : '退出全屏' }}
|
|
44
|
+
<span class="btn" @click="systemStore.toggleFullScreen">
|
|
45
|
+
{{ !systemStore.documentFullscreen ? '启用全屏' : '退出全屏' }}
|
|
49
46
|
</span>
|
|
50
47
|
<span class="btn" @click="router.push('/')">返回首页</span>
|
|
51
48
|
</div>
|
package/jnrs-vue/tsconfig.json
CHANGED
|
@@ -18,8 +18,9 @@
|
|
|
18
18
|
"baseUrl": ".",
|
|
19
19
|
"paths": {
|
|
20
20
|
"@/*": ["src/*"]
|
|
21
|
-
}
|
|
21
|
+
},
|
|
22
|
+
"ignoreDeprecations": "6.0" // 消除 6+ 警告
|
|
22
23
|
},
|
|
23
|
-
"include": ["src/**/*", "vite.config.ts"
|
|
24
|
+
"include": ["src/**/*", "vite.config.ts"],
|
|
24
25
|
"exclude": ["node_modules", "dist"]
|
|
25
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-jnrs-vue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.26",
|
|
4
4
|
"description": "巨能前端工程化开发,Vue 项目模板脚手架",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue",
|
|
@@ -31,9 +31,12 @@
|
|
|
31
31
|
"pnpm": ">=9.0.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
+
"fs-extra": "^11.2.0",
|
|
34
35
|
"minimist": "^1.2.8",
|
|
35
|
-
"prompts": "^2.4.2"
|
|
36
|
-
|
|
36
|
+
"prompts": "^2.4.2"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"typescript": "~6.0.2"
|
|
37
40
|
},
|
|
38
41
|
"scripts": {
|
|
39
42
|
"release": "node ./scripts/release.mjs"
|