diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts
index 363a960..804eea2 100644
--- a/src/api/system/dept.ts
+++ b/src/api/system/dept.ts
@@ -1,8 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 组织查询
export function getDeptList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/dept/list`,
method: 'get',
params,
@@ -11,6 +15,7 @@
// 组织机构树列表
export function getDeptTreeList(params?: { deptType: string }) {
return request({
+ // baseURL,
url: `${prefix}/dept/tree`,
method: 'get',
params,
@@ -20,6 +25,7 @@
// 组织机构树列表
export function getDeptTreeListByPid(pid: string) {
return request({
+ // baseURL,
url: `${prefix}/dept/listByPid`,
method: 'get',
params: {
@@ -30,6 +36,7 @@
// 根据角色获取组织机构树列表
export function getDeptTreeByRole(roleId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByRoleId`,
method: 'get',
params: {
@@ -41,6 +48,7 @@
// 添加组织机构
export function addDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/add',
method: 'post',
data,
@@ -49,6 +57,7 @@
// 修改组织机构
export function updateDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/update',
method: 'post',
data,
@@ -57,6 +66,7 @@
// 删除组织机构
export function delDept(id: string) {
return request({
+ // baseURL,
url: '/sys/dept/delete',
method: 'post',
data: {
@@ -68,6 +78,7 @@
// 资源类型列表
export function getDeptTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/deptType`,
method: 'get',
})
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts
index 363a960..804eea2 100644
--- a/src/api/system/dept.ts
+++ b/src/api/system/dept.ts
@@ -1,8 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 组织查询
export function getDeptList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/dept/list`,
method: 'get',
params,
@@ -11,6 +15,7 @@
// 组织机构树列表
export function getDeptTreeList(params?: { deptType: string }) {
return request({
+ // baseURL,
url: `${prefix}/dept/tree`,
method: 'get',
params,
@@ -20,6 +25,7 @@
// 组织机构树列表
export function getDeptTreeListByPid(pid: string) {
return request({
+ // baseURL,
url: `${prefix}/dept/listByPid`,
method: 'get',
params: {
@@ -30,6 +36,7 @@
// 根据角色获取组织机构树列表
export function getDeptTreeByRole(roleId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByRoleId`,
method: 'get',
params: {
@@ -41,6 +48,7 @@
// 添加组织机构
export function addDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/add',
method: 'post',
data,
@@ -49,6 +57,7 @@
// 修改组织机构
export function updateDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/update',
method: 'post',
data,
@@ -57,6 +66,7 @@
// 删除组织机构
export function delDept(id: string) {
return request({
+ // baseURL,
url: '/sys/dept/delete',
method: 'post',
data: {
@@ -68,6 +78,7 @@
// 资源类型列表
export function getDeptTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/deptType`,
method: 'get',
})
diff --git a/src/api/system/login.ts b/src/api/system/login.ts
index 9b594da..e127482 100644
--- a/src/api/system/login.ts
+++ b/src/api/system/login.ts
@@ -24,6 +24,7 @@
// 登出
export function logout() {
+ window.localStorage.clear() // 清除loacalStorage所有数据
return request.get(`${prefix}user/logout`)
}
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts
index 363a960..804eea2 100644
--- a/src/api/system/dept.ts
+++ b/src/api/system/dept.ts
@@ -1,8 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 组织查询
export function getDeptList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/dept/list`,
method: 'get',
params,
@@ -11,6 +15,7 @@
// 组织机构树列表
export function getDeptTreeList(params?: { deptType: string }) {
return request({
+ // baseURL,
url: `${prefix}/dept/tree`,
method: 'get',
params,
@@ -20,6 +25,7 @@
// 组织机构树列表
export function getDeptTreeListByPid(pid: string) {
return request({
+ // baseURL,
url: `${prefix}/dept/listByPid`,
method: 'get',
params: {
@@ -30,6 +36,7 @@
// 根据角色获取组织机构树列表
export function getDeptTreeByRole(roleId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByRoleId`,
method: 'get',
params: {
@@ -41,6 +48,7 @@
// 添加组织机构
export function addDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/add',
method: 'post',
data,
@@ -49,6 +57,7 @@
// 修改组织机构
export function updateDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/update',
method: 'post',
data,
@@ -57,6 +66,7 @@
// 删除组织机构
export function delDept(id: string) {
return request({
+ // baseURL,
url: '/sys/dept/delete',
method: 'post',
data: {
@@ -68,6 +78,7 @@
// 资源类型列表
export function getDeptTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/deptType`,
method: 'get',
})
diff --git a/src/api/system/login.ts b/src/api/system/login.ts
index 9b594da..e127482 100644
--- a/src/api/system/login.ts
+++ b/src/api/system/login.ts
@@ -24,6 +24,7 @@
// 登出
export function logout() {
+ window.localStorage.clear() // 清除loacalStorage所有数据
return request.get(`${prefix}user/logout`)
}
diff --git a/src/api/system/role.ts b/src/api/system/role.ts
index 30b0f48..6fae6a3 100644
--- a/src/api/system/role.ts
+++ b/src/api/system/role.ts
@@ -1,9 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
// 角色查询
export function getRoleList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/role/list`,
method: 'get',
params,
@@ -12,6 +15,7 @@
// 角色机构树列表
export function getRoleTreeList() {
return request({
+ // baseURL,
url: `${prefix}/role/tree`,
method: 'get',
})
@@ -19,6 +23,7 @@
// 根据用户获取角色机构树列表
export function getRoleTreeListByUser(userId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByUserId`,
method: 'get',
params: {
@@ -30,6 +35,7 @@
// 添加角色机构
export function addRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/add`,
method: 'post',
data,
@@ -38,6 +44,7 @@
// 修改角色机构
export function updateRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/update`,
method: 'post',
data,
@@ -46,6 +53,7 @@
// 删除角色机构
export function delRole(id: string) {
return request({
+ // baseURL,
url: `${prefix}/role/delete`,
method: 'post',
data: {
@@ -57,6 +65,7 @@
// 功能授权
export function funcAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/role/funcAuthor',
method: 'post',
data: {
@@ -68,6 +77,7 @@
// 数据授权
export function dataAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: `${prefix}/role/dataAuthor`,
method: 'post',
data: {
@@ -80,6 +90,7 @@
// 角色类型列表
export function getDataScopeTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/dataScopeType`,
method: 'get',
})
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts
index 363a960..804eea2 100644
--- a/src/api/system/dept.ts
+++ b/src/api/system/dept.ts
@@ -1,8 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 组织查询
export function getDeptList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/dept/list`,
method: 'get',
params,
@@ -11,6 +15,7 @@
// 组织机构树列表
export function getDeptTreeList(params?: { deptType: string }) {
return request({
+ // baseURL,
url: `${prefix}/dept/tree`,
method: 'get',
params,
@@ -20,6 +25,7 @@
// 组织机构树列表
export function getDeptTreeListByPid(pid: string) {
return request({
+ // baseURL,
url: `${prefix}/dept/listByPid`,
method: 'get',
params: {
@@ -30,6 +36,7 @@
// 根据角色获取组织机构树列表
export function getDeptTreeByRole(roleId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByRoleId`,
method: 'get',
params: {
@@ -41,6 +48,7 @@
// 添加组织机构
export function addDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/add',
method: 'post',
data,
@@ -49,6 +57,7 @@
// 修改组织机构
export function updateDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/update',
method: 'post',
data,
@@ -57,6 +66,7 @@
// 删除组织机构
export function delDept(id: string) {
return request({
+ // baseURL,
url: '/sys/dept/delete',
method: 'post',
data: {
@@ -68,6 +78,7 @@
// 资源类型列表
export function getDeptTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/deptType`,
method: 'get',
})
diff --git a/src/api/system/login.ts b/src/api/system/login.ts
index 9b594da..e127482 100644
--- a/src/api/system/login.ts
+++ b/src/api/system/login.ts
@@ -24,6 +24,7 @@
// 登出
export function logout() {
+ window.localStorage.clear() // 清除loacalStorage所有数据
return request.get(`${prefix}user/logout`)
}
diff --git a/src/api/system/role.ts b/src/api/system/role.ts
index 30b0f48..6fae6a3 100644
--- a/src/api/system/role.ts
+++ b/src/api/system/role.ts
@@ -1,9 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
// 角色查询
export function getRoleList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/role/list`,
method: 'get',
params,
@@ -12,6 +15,7 @@
// 角色机构树列表
export function getRoleTreeList() {
return request({
+ // baseURL,
url: `${prefix}/role/tree`,
method: 'get',
})
@@ -19,6 +23,7 @@
// 根据用户获取角色机构树列表
export function getRoleTreeListByUser(userId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByUserId`,
method: 'get',
params: {
@@ -30,6 +35,7 @@
// 添加角色机构
export function addRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/add`,
method: 'post',
data,
@@ -38,6 +44,7 @@
// 修改角色机构
export function updateRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/update`,
method: 'post',
data,
@@ -46,6 +53,7 @@
// 删除角色机构
export function delRole(id: string) {
return request({
+ // baseURL,
url: `${prefix}/role/delete`,
method: 'post',
data: {
@@ -57,6 +65,7 @@
// 功能授权
export function funcAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/role/funcAuthor',
method: 'post',
data: {
@@ -68,6 +77,7 @@
// 数据授权
export function dataAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: `${prefix}/role/dataAuthor`,
method: 'post',
data: {
@@ -80,6 +90,7 @@
// 角色类型列表
export function getDataScopeTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/dataScopeType`,
method: 'get',
})
diff --git a/src/api/system/user.ts b/src/api/system/user.ts
index 1f8697d..ad39cbb 100644
--- a/src/api/system/user.ts
+++ b/src/api/system/user.ts
@@ -1,6 +1,9 @@
// import qs from 'qs'
import request from '../index'
const prefix = 'sys/'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 修改密码
export function changePwd(data: { oldPwd: string; newPwd: string }) {
return request.post(`${prefix}mgr/changePwd`, data)
@@ -8,6 +11,7 @@
// 用户列表
export function getUserList(params: object) {
return request({
+ // baseURL,
url: `${prefix}mgr/list`,
method: 'get',
params,
@@ -16,15 +20,28 @@
// 添加用户
export function addUser(data: object) {
- return request.post('system/mgr/add', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/add`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/add', data)
}
// 修改用户
export function updateUser(data: object) {
- return request.post('system/mgr/update', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/update`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/update', data)
}
// 删除用户
export function delUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/delete`,
method: 'post',
data,
@@ -34,6 +51,7 @@
// 冻结用户
export function freezeUserApi(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/freeze`,
method: 'post',
data,
@@ -42,6 +60,7 @@
// 冻结用户
export function unfreezeUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/unfreeze`,
method: 'post',
data,
@@ -51,6 +70,7 @@
// 重置用户密码
export function resetPwdApi(data: object) {
return request({
+ // baseURL,
url: 'sys/mgr/reset',
method: 'post',
data,
@@ -60,6 +80,7 @@
// 分配角色
export function roleAssign(userId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/mgr/roleAssign',
method: 'post',
data: {
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts
index 363a960..804eea2 100644
--- a/src/api/system/dept.ts
+++ b/src/api/system/dept.ts
@@ -1,8 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 组织查询
export function getDeptList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/dept/list`,
method: 'get',
params,
@@ -11,6 +15,7 @@
// 组织机构树列表
export function getDeptTreeList(params?: { deptType: string }) {
return request({
+ // baseURL,
url: `${prefix}/dept/tree`,
method: 'get',
params,
@@ -20,6 +25,7 @@
// 组织机构树列表
export function getDeptTreeListByPid(pid: string) {
return request({
+ // baseURL,
url: `${prefix}/dept/listByPid`,
method: 'get',
params: {
@@ -30,6 +36,7 @@
// 根据角色获取组织机构树列表
export function getDeptTreeByRole(roleId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByRoleId`,
method: 'get',
params: {
@@ -41,6 +48,7 @@
// 添加组织机构
export function addDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/add',
method: 'post',
data,
@@ -49,6 +57,7 @@
// 修改组织机构
export function updateDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/update',
method: 'post',
data,
@@ -57,6 +66,7 @@
// 删除组织机构
export function delDept(id: string) {
return request({
+ // baseURL,
url: '/sys/dept/delete',
method: 'post',
data: {
@@ -68,6 +78,7 @@
// 资源类型列表
export function getDeptTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/deptType`,
method: 'get',
})
diff --git a/src/api/system/login.ts b/src/api/system/login.ts
index 9b594da..e127482 100644
--- a/src/api/system/login.ts
+++ b/src/api/system/login.ts
@@ -24,6 +24,7 @@
// 登出
export function logout() {
+ window.localStorage.clear() // 清除loacalStorage所有数据
return request.get(`${prefix}user/logout`)
}
diff --git a/src/api/system/role.ts b/src/api/system/role.ts
index 30b0f48..6fae6a3 100644
--- a/src/api/system/role.ts
+++ b/src/api/system/role.ts
@@ -1,9 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
// 角色查询
export function getRoleList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/role/list`,
method: 'get',
params,
@@ -12,6 +15,7 @@
// 角色机构树列表
export function getRoleTreeList() {
return request({
+ // baseURL,
url: `${prefix}/role/tree`,
method: 'get',
})
@@ -19,6 +23,7 @@
// 根据用户获取角色机构树列表
export function getRoleTreeListByUser(userId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByUserId`,
method: 'get',
params: {
@@ -30,6 +35,7 @@
// 添加角色机构
export function addRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/add`,
method: 'post',
data,
@@ -38,6 +44,7 @@
// 修改角色机构
export function updateRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/update`,
method: 'post',
data,
@@ -46,6 +53,7 @@
// 删除角色机构
export function delRole(id: string) {
return request({
+ // baseURL,
url: `${prefix}/role/delete`,
method: 'post',
data: {
@@ -57,6 +65,7 @@
// 功能授权
export function funcAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/role/funcAuthor',
method: 'post',
data: {
@@ -68,6 +77,7 @@
// 数据授权
export function dataAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: `${prefix}/role/dataAuthor`,
method: 'post',
data: {
@@ -80,6 +90,7 @@
// 角色类型列表
export function getDataScopeTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/dataScopeType`,
method: 'get',
})
diff --git a/src/api/system/user.ts b/src/api/system/user.ts
index 1f8697d..ad39cbb 100644
--- a/src/api/system/user.ts
+++ b/src/api/system/user.ts
@@ -1,6 +1,9 @@
// import qs from 'qs'
import request from '../index'
const prefix = 'sys/'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 修改密码
export function changePwd(data: { oldPwd: string; newPwd: string }) {
return request.post(`${prefix}mgr/changePwd`, data)
@@ -8,6 +11,7 @@
// 用户列表
export function getUserList(params: object) {
return request({
+ // baseURL,
url: `${prefix}mgr/list`,
method: 'get',
params,
@@ -16,15 +20,28 @@
// 添加用户
export function addUser(data: object) {
- return request.post('system/mgr/add', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/add`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/add', data)
}
// 修改用户
export function updateUser(data: object) {
- return request.post('system/mgr/update', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/update`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/update', data)
}
// 删除用户
export function delUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/delete`,
method: 'post',
data,
@@ -34,6 +51,7 @@
// 冻结用户
export function freezeUserApi(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/freeze`,
method: 'post',
data,
@@ -42,6 +60,7 @@
// 冻结用户
export function unfreezeUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/unfreeze`,
method: 'post',
data,
@@ -51,6 +70,7 @@
// 重置用户密码
export function resetPwdApi(data: object) {
return request({
+ // baseURL,
url: 'sys/mgr/reset',
method: 'post',
data,
@@ -60,6 +80,7 @@
// 分配角色
export function roleAssign(userId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/mgr/roleAssign',
method: 'post',
data: {
diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue
index ef7bd91..906c4ba 100644
--- a/src/components/DeptSelect/index.vue
+++ b/src/components/DeptSelect/index.vue
@@ -68,28 +68,28 @@
function fetchPcode() {
// 如果未指定需要展示的部门类型,获取全部部门
if (!props.deptType) {
- if (dictStore.allDeptList.length === 0) { // 如果store中未存储,从服务器上获取
- getDeptTreeList().then((res) => {
- const list = res.data
- dictStore.setAllDeptList(list)
- refreshList(list)
- })
- }
- else {
- refreshList(dictStore.allDeptList)
- }
+ // if (dictStore.allDeptList.length === 0) { // 如果store中未存储,从服务器上获取
+ getDeptTreeList().then((res) => {
+ const list = res.data
+ dictStore.setAllDeptList(list)
+ refreshList(list)
+ })
+ // }
+ // else {
+ // refreshList(dictStore.allDeptList)
+ // }
}
else { // 如果指定了需要展示的部门类型
- if (dictStore.companyList.length === 0) { // 如果store中未存储,从服务器上获取
- getDeptTreeList({ deptType: props.deptType }).then((res) => {
- const list = res.data
- dictStore.setAllCompanyList(list)
- refreshList(list)
- })
- }
- else {
- refreshList(dictStore.companyList)
- }
+ // if (dictStore.companyList.length === 0) { // 如果store中未存储,从服务器上获取
+ getDeptTreeList({ deptType: props.deptType }).then((res) => {
+ const list = res.data
+ dictStore.setAllCompanyList(list)
+ refreshList(list)
+ })
+ // }
+ // else {
+ // refreshList(dictStore.companyList)
+ // }
}
}
function refreshList(list: DeptTreeNode[]) {
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts
index 363a960..804eea2 100644
--- a/src/api/system/dept.ts
+++ b/src/api/system/dept.ts
@@ -1,8 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 组织查询
export function getDeptList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/dept/list`,
method: 'get',
params,
@@ -11,6 +15,7 @@
// 组织机构树列表
export function getDeptTreeList(params?: { deptType: string }) {
return request({
+ // baseURL,
url: `${prefix}/dept/tree`,
method: 'get',
params,
@@ -20,6 +25,7 @@
// 组织机构树列表
export function getDeptTreeListByPid(pid: string) {
return request({
+ // baseURL,
url: `${prefix}/dept/listByPid`,
method: 'get',
params: {
@@ -30,6 +36,7 @@
// 根据角色获取组织机构树列表
export function getDeptTreeByRole(roleId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByRoleId`,
method: 'get',
params: {
@@ -41,6 +48,7 @@
// 添加组织机构
export function addDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/add',
method: 'post',
data,
@@ -49,6 +57,7 @@
// 修改组织机构
export function updateDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/update',
method: 'post',
data,
@@ -57,6 +66,7 @@
// 删除组织机构
export function delDept(id: string) {
return request({
+ // baseURL,
url: '/sys/dept/delete',
method: 'post',
data: {
@@ -68,6 +78,7 @@
// 资源类型列表
export function getDeptTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/deptType`,
method: 'get',
})
diff --git a/src/api/system/login.ts b/src/api/system/login.ts
index 9b594da..e127482 100644
--- a/src/api/system/login.ts
+++ b/src/api/system/login.ts
@@ -24,6 +24,7 @@
// 登出
export function logout() {
+ window.localStorage.clear() // 清除loacalStorage所有数据
return request.get(`${prefix}user/logout`)
}
diff --git a/src/api/system/role.ts b/src/api/system/role.ts
index 30b0f48..6fae6a3 100644
--- a/src/api/system/role.ts
+++ b/src/api/system/role.ts
@@ -1,9 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
// 角色查询
export function getRoleList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/role/list`,
method: 'get',
params,
@@ -12,6 +15,7 @@
// 角色机构树列表
export function getRoleTreeList() {
return request({
+ // baseURL,
url: `${prefix}/role/tree`,
method: 'get',
})
@@ -19,6 +23,7 @@
// 根据用户获取角色机构树列表
export function getRoleTreeListByUser(userId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByUserId`,
method: 'get',
params: {
@@ -30,6 +35,7 @@
// 添加角色机构
export function addRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/add`,
method: 'post',
data,
@@ -38,6 +44,7 @@
// 修改角色机构
export function updateRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/update`,
method: 'post',
data,
@@ -46,6 +53,7 @@
// 删除角色机构
export function delRole(id: string) {
return request({
+ // baseURL,
url: `${prefix}/role/delete`,
method: 'post',
data: {
@@ -57,6 +65,7 @@
// 功能授权
export function funcAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/role/funcAuthor',
method: 'post',
data: {
@@ -68,6 +77,7 @@
// 数据授权
export function dataAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: `${prefix}/role/dataAuthor`,
method: 'post',
data: {
@@ -80,6 +90,7 @@
// 角色类型列表
export function getDataScopeTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/dataScopeType`,
method: 'get',
})
diff --git a/src/api/system/user.ts b/src/api/system/user.ts
index 1f8697d..ad39cbb 100644
--- a/src/api/system/user.ts
+++ b/src/api/system/user.ts
@@ -1,6 +1,9 @@
// import qs from 'qs'
import request from '../index'
const prefix = 'sys/'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 修改密码
export function changePwd(data: { oldPwd: string; newPwd: string }) {
return request.post(`${prefix}mgr/changePwd`, data)
@@ -8,6 +11,7 @@
// 用户列表
export function getUserList(params: object) {
return request({
+ // baseURL,
url: `${prefix}mgr/list`,
method: 'get',
params,
@@ -16,15 +20,28 @@
// 添加用户
export function addUser(data: object) {
- return request.post('system/mgr/add', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/add`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/add', data)
}
// 修改用户
export function updateUser(data: object) {
- return request.post('system/mgr/update', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/update`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/update', data)
}
// 删除用户
export function delUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/delete`,
method: 'post',
data,
@@ -34,6 +51,7 @@
// 冻结用户
export function freezeUserApi(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/freeze`,
method: 'post',
data,
@@ -42,6 +60,7 @@
// 冻结用户
export function unfreezeUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/unfreeze`,
method: 'post',
data,
@@ -51,6 +70,7 @@
// 重置用户密码
export function resetPwdApi(data: object) {
return request({
+ // baseURL,
url: 'sys/mgr/reset',
method: 'post',
data,
@@ -60,6 +80,7 @@
// 分配角色
export function roleAssign(userId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/mgr/roleAssign',
method: 'post',
data: {
diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue
index ef7bd91..906c4ba 100644
--- a/src/components/DeptSelect/index.vue
+++ b/src/components/DeptSelect/index.vue
@@ -68,28 +68,28 @@
function fetchPcode() {
// 如果未指定需要展示的部门类型,获取全部部门
if (!props.deptType) {
- if (dictStore.allDeptList.length === 0) { // 如果store中未存储,从服务器上获取
- getDeptTreeList().then((res) => {
- const list = res.data
- dictStore.setAllDeptList(list)
- refreshList(list)
- })
- }
- else {
- refreshList(dictStore.allDeptList)
- }
+ // if (dictStore.allDeptList.length === 0) { // 如果store中未存储,从服务器上获取
+ getDeptTreeList().then((res) => {
+ const list = res.data
+ dictStore.setAllDeptList(list)
+ refreshList(list)
+ })
+ // }
+ // else {
+ // refreshList(dictStore.allDeptList)
+ // }
}
else { // 如果指定了需要展示的部门类型
- if (dictStore.companyList.length === 0) { // 如果store中未存储,从服务器上获取
- getDeptTreeList({ deptType: props.deptType }).then((res) => {
- const list = res.data
- dictStore.setAllCompanyList(list)
- refreshList(list)
- })
- }
- else {
- refreshList(dictStore.companyList)
- }
+ // if (dictStore.companyList.length === 0) { // 如果store中未存储,从服务器上获取
+ getDeptTreeList({ deptType: props.deptType }).then((res) => {
+ const list = res.data
+ dictStore.setAllCompanyList(list)
+ refreshList(list)
+ })
+ // }
+ // else {
+ // refreshList(dictStore.companyList)
+ // }
}
}
function refreshList(list: DeptTreeNode[]) {
diff --git a/src/main.ts b/src/main.ts
index 96c2b03..07904e8 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -41,6 +41,8 @@
console.log(result)
request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
app.config.globalProperties.config = result.data
+ window.localStorage.setItem('baseURL', result.data.baseUrl)
+ window.localStorage.setItem('baseUrlAccount', result.data.baseUrlAccount)
app.mount('#app')
}).catch((error) => {
console.error(`get baseConfig error...${error}`)
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts
index 363a960..804eea2 100644
--- a/src/api/system/dept.ts
+++ b/src/api/system/dept.ts
@@ -1,8 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 组织查询
export function getDeptList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/dept/list`,
method: 'get',
params,
@@ -11,6 +15,7 @@
// 组织机构树列表
export function getDeptTreeList(params?: { deptType: string }) {
return request({
+ // baseURL,
url: `${prefix}/dept/tree`,
method: 'get',
params,
@@ -20,6 +25,7 @@
// 组织机构树列表
export function getDeptTreeListByPid(pid: string) {
return request({
+ // baseURL,
url: `${prefix}/dept/listByPid`,
method: 'get',
params: {
@@ -30,6 +36,7 @@
// 根据角色获取组织机构树列表
export function getDeptTreeByRole(roleId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByRoleId`,
method: 'get',
params: {
@@ -41,6 +48,7 @@
// 添加组织机构
export function addDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/add',
method: 'post',
data,
@@ -49,6 +57,7 @@
// 修改组织机构
export function updateDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/update',
method: 'post',
data,
@@ -57,6 +66,7 @@
// 删除组织机构
export function delDept(id: string) {
return request({
+ // baseURL,
url: '/sys/dept/delete',
method: 'post',
data: {
@@ -68,6 +78,7 @@
// 资源类型列表
export function getDeptTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/deptType`,
method: 'get',
})
diff --git a/src/api/system/login.ts b/src/api/system/login.ts
index 9b594da..e127482 100644
--- a/src/api/system/login.ts
+++ b/src/api/system/login.ts
@@ -24,6 +24,7 @@
// 登出
export function logout() {
+ window.localStorage.clear() // 清除loacalStorage所有数据
return request.get(`${prefix}user/logout`)
}
diff --git a/src/api/system/role.ts b/src/api/system/role.ts
index 30b0f48..6fae6a3 100644
--- a/src/api/system/role.ts
+++ b/src/api/system/role.ts
@@ -1,9 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
// 角色查询
export function getRoleList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/role/list`,
method: 'get',
params,
@@ -12,6 +15,7 @@
// 角色机构树列表
export function getRoleTreeList() {
return request({
+ // baseURL,
url: `${prefix}/role/tree`,
method: 'get',
})
@@ -19,6 +23,7 @@
// 根据用户获取角色机构树列表
export function getRoleTreeListByUser(userId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByUserId`,
method: 'get',
params: {
@@ -30,6 +35,7 @@
// 添加角色机构
export function addRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/add`,
method: 'post',
data,
@@ -38,6 +44,7 @@
// 修改角色机构
export function updateRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/update`,
method: 'post',
data,
@@ -46,6 +53,7 @@
// 删除角色机构
export function delRole(id: string) {
return request({
+ // baseURL,
url: `${prefix}/role/delete`,
method: 'post',
data: {
@@ -57,6 +65,7 @@
// 功能授权
export function funcAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/role/funcAuthor',
method: 'post',
data: {
@@ -68,6 +77,7 @@
// 数据授权
export function dataAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: `${prefix}/role/dataAuthor`,
method: 'post',
data: {
@@ -80,6 +90,7 @@
// 角色类型列表
export function getDataScopeTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/dataScopeType`,
method: 'get',
})
diff --git a/src/api/system/user.ts b/src/api/system/user.ts
index 1f8697d..ad39cbb 100644
--- a/src/api/system/user.ts
+++ b/src/api/system/user.ts
@@ -1,6 +1,9 @@
// import qs from 'qs'
import request from '../index'
const prefix = 'sys/'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 修改密码
export function changePwd(data: { oldPwd: string; newPwd: string }) {
return request.post(`${prefix}mgr/changePwd`, data)
@@ -8,6 +11,7 @@
// 用户列表
export function getUserList(params: object) {
return request({
+ // baseURL,
url: `${prefix}mgr/list`,
method: 'get',
params,
@@ -16,15 +20,28 @@
// 添加用户
export function addUser(data: object) {
- return request.post('system/mgr/add', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/add`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/add', data)
}
// 修改用户
export function updateUser(data: object) {
- return request.post('system/mgr/update', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/update`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/update', data)
}
// 删除用户
export function delUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/delete`,
method: 'post',
data,
@@ -34,6 +51,7 @@
// 冻结用户
export function freezeUserApi(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/freeze`,
method: 'post',
data,
@@ -42,6 +60,7 @@
// 冻结用户
export function unfreezeUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/unfreeze`,
method: 'post',
data,
@@ -51,6 +70,7 @@
// 重置用户密码
export function resetPwdApi(data: object) {
return request({
+ // baseURL,
url: 'sys/mgr/reset',
method: 'post',
data,
@@ -60,6 +80,7 @@
// 分配角色
export function roleAssign(userId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/mgr/roleAssign',
method: 'post',
data: {
diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue
index ef7bd91..906c4ba 100644
--- a/src/components/DeptSelect/index.vue
+++ b/src/components/DeptSelect/index.vue
@@ -68,28 +68,28 @@
function fetchPcode() {
// 如果未指定需要展示的部门类型,获取全部部门
if (!props.deptType) {
- if (dictStore.allDeptList.length === 0) { // 如果store中未存储,从服务器上获取
- getDeptTreeList().then((res) => {
- const list = res.data
- dictStore.setAllDeptList(list)
- refreshList(list)
- })
- }
- else {
- refreshList(dictStore.allDeptList)
- }
+ // if (dictStore.allDeptList.length === 0) { // 如果store中未存储,从服务器上获取
+ getDeptTreeList().then((res) => {
+ const list = res.data
+ dictStore.setAllDeptList(list)
+ refreshList(list)
+ })
+ // }
+ // else {
+ // refreshList(dictStore.allDeptList)
+ // }
}
else { // 如果指定了需要展示的部门类型
- if (dictStore.companyList.length === 0) { // 如果store中未存储,从服务器上获取
- getDeptTreeList({ deptType: props.deptType }).then((res) => {
- const list = res.data
- dictStore.setAllCompanyList(list)
- refreshList(list)
- })
- }
- else {
- refreshList(dictStore.companyList)
- }
+ // if (dictStore.companyList.length === 0) { // 如果store中未存储,从服务器上获取
+ getDeptTreeList({ deptType: props.deptType }).then((res) => {
+ const list = res.data
+ dictStore.setAllCompanyList(list)
+ refreshList(list)
+ })
+ // }
+ // else {
+ // refreshList(dictStore.companyList)
+ // }
}
}
function refreshList(list: DeptTreeNode[]) {
diff --git a/src/main.ts b/src/main.ts
index 96c2b03..07904e8 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -41,6 +41,8 @@
console.log(result)
request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
app.config.globalProperties.config = result.data
+ window.localStorage.setItem('baseURL', result.data.baseUrl)
+ window.localStorage.setItem('baseUrlAccount', result.data.baseUrlAccount)
app.mount('#app')
}).catch((error) => {
console.error(`get baseConfig error...${error}`)
diff --git a/src/utils/useTemplateDownload.ts b/src/utils/useTemplateDownload.ts
new file mode 100644
index 0000000..67feef4
--- /dev/null
+++ b/src/utils/useTemplateDownload.ts
@@ -0,0 +1,37 @@
+import { ElMessage } from 'element-plus'
+import { download } from './download'
+import { getFileListPage, getPhotoUrl } from '@/api/system/tool'
+/**
+ * 模板下载
+ * @param modelName 模块名称
+ */
+export default function useTemplateDownload(modelName: string) {
+ const searchQuery = { // 获取模板文件名称请求参数
+ fileName: '', // 文件名称
+ moduleName: modelName, // 模块名
+ downloadNo: '',
+ limit: 20,
+ offset: 1,
+ ids: [],
+ } // 查询参数
+ let minioFileName = ''
+ let fileName = '' // 文件名称
+ getFileListPage(searchQuery as any).then((res) => {
+ if (res.code === 200) {
+ if (res.data && res.data.rows.length) {
+ minioFileName = res.data.rows[0].minioFileName
+ fileName = res.data.rows[0].fileName
+ if (minioFileName) {
+ getPhotoUrl(minioFileName).then((res) => {
+ download(res.data, fileName)
+ }).catch(() => {
+ ElMessage.error('下载失败')
+ })
+ }
+ else {
+ ElMessage('无可下载内容')
+ }
+ }
+ }
+ })
+}
diff --git a/.env.development b/.env.development
index 4aea391..f2fee42 100644
--- a/.env.development
+++ b/.env.development
@@ -5,6 +5,8 @@
# VITE_APP_API_BASEURL = http://139.198.29.133:8089
# VITE_APP_API_BASEURL = http://111.198.10.15:21611
VITE_APP_API_BASEURL = http://192.168.8.101:5909
+# VITE_APP_API_BASEURL = http://111.198.10.15:21611
+# VITE_APP_API_BASEURL = http://192.168.8.107:5909
# VITE_APP_API_BASEURL = http://111.198.10.15:21710
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
diff --git a/.env.production b/.env.production
index 36e6ad3..7595683 100644
--- a/.env.production
+++ b/.env.production
@@ -4,7 +4,7 @@
VITE_APP_TITLE = 计量信息系统
VITE_SYS_TITLE = 受检设备管理系统
# 接口请求地址,会设置到 axios 的 baseURL 参数上
-VITE_APP_API_BASEURL = http://111.198.10.15:21611
+VITE_APP_API_BASEURL = http://127.0.0.1:5909
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d4aac11..4ffa026 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -106,7 +106,7 @@
vue-pdf-embed: 1.1.5_vue@3.2.44
vue-router: 4.1.6_vue@3.2.44
vue3-print-nb: 0.1.4
- vuedraggable: registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44
+ vuedraggable: 4.1.0_vue@3.2.44
xlsx: 0.18.5
devDependencies:
@@ -6945,6 +6945,10 @@
- supports-color
dev: true
+ /sortablejs/1.14.0:
+ resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==}
+ dev: false
+
/source-map-js/1.0.2:
resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
engines: {node: '>=0.10.0'}
@@ -8190,6 +8194,15 @@
vue: 3.2.44
dev: false
+ /vuedraggable/4.1.0_vue@3.2.44:
+ resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==}
+ peerDependencies:
+ vue: ^3.0.1
+ dependencies:
+ sortablejs: 1.14.0
+ vue: 3.2.44
+ dev: false
+
/wcwidth/1.0.1:
resolution: {integrity: sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==}
dependencies:
@@ -8788,12 +8801,6 @@
version: 2.0.0
dev: false
- registry.npmmirror.com/sortablejs/1.14.0:
- resolution: {integrity: sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/sortablejs/-/sortablejs-1.14.0.tgz}
- name: sortablejs
- version: 1.14.0
- dev: false
-
registry.npmmirror.com/string-width/4.2.3:
resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz}
name: string-width
@@ -8860,18 +8867,6 @@
vue: 3.2.44
dev: false
- registry.npmmirror.com/vuedraggable/4.1.0_vue@3.2.44:
- resolution: {integrity: sha512-FU5HCWBmsf20GpP3eudURW3WdWTKIbEIQxh9/8GE806hydR9qZqRRxRE3RjqX7PkuLuMQG/A7n3cfj9rCEchww==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/vuedraggable/-/vuedraggable-4.1.0.tgz}
- id: registry.npmmirror.com/vuedraggable/4.1.0
- name: vuedraggable
- version: 4.1.0
- peerDependencies:
- vue: ^3.0.1
- dependencies:
- sortablejs: registry.npmmirror.com/sortablejs/1.14.0
- vue: 3.2.44
- dev: false
-
registry.npmmirror.com/which-module/2.0.0:
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==, registry: https://registry.npm.taobao.org/, tarball: https://registry.npmmirror.com/which-module/-/which-module-2.0.0.tgz}
name: which-module
diff --git a/src/api/index.ts b/src/api/index.ts
index 87d5969..7dfe88a 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -24,7 +24,8 @@
}
const request = axios.create({
- baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ baseURL: window.localStorage.getItem('baseURL')!,
+ // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
timeout: 1000 * 60,
responseType: 'json',
})
diff --git a/src/api/system/dept.ts b/src/api/system/dept.ts
index 363a960..804eea2 100644
--- a/src/api/system/dept.ts
+++ b/src/api/system/dept.ts
@@ -1,8 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 组织查询
export function getDeptList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/dept/list`,
method: 'get',
params,
@@ -11,6 +15,7 @@
// 组织机构树列表
export function getDeptTreeList(params?: { deptType: string }) {
return request({
+ // baseURL,
url: `${prefix}/dept/tree`,
method: 'get',
params,
@@ -20,6 +25,7 @@
// 组织机构树列表
export function getDeptTreeListByPid(pid: string) {
return request({
+ // baseURL,
url: `${prefix}/dept/listByPid`,
method: 'get',
params: {
@@ -30,6 +36,7 @@
// 根据角色获取组织机构树列表
export function getDeptTreeByRole(roleId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByRoleId`,
method: 'get',
params: {
@@ -41,6 +48,7 @@
// 添加组织机构
export function addDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/add',
method: 'post',
data,
@@ -49,6 +57,7 @@
// 修改组织机构
export function updateDept(data: object) {
return request({
+ // baseURL,
url: '/sys/dept/update',
method: 'post',
data,
@@ -57,6 +66,7 @@
// 删除组织机构
export function delDept(id: string) {
return request({
+ // baseURL,
url: '/sys/dept/delete',
method: 'post',
data: {
@@ -68,6 +78,7 @@
// 资源类型列表
export function getDeptTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/deptType`,
method: 'get',
})
diff --git a/src/api/system/login.ts b/src/api/system/login.ts
index 9b594da..e127482 100644
--- a/src/api/system/login.ts
+++ b/src/api/system/login.ts
@@ -24,6 +24,7 @@
// 登出
export function logout() {
+ window.localStorage.clear() // 清除loacalStorage所有数据
return request.get(`${prefix}user/logout`)
}
diff --git a/src/api/system/role.ts b/src/api/system/role.ts
index 30b0f48..6fae6a3 100644
--- a/src/api/system/role.ts
+++ b/src/api/system/role.ts
@@ -1,9 +1,12 @@
import request from '../index'
const prefix = 'sys'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
// 角色查询
export function getRoleList(params: object) {
return request({
+ // baseURL,
url: `${prefix}/role/list`,
method: 'get',
params,
@@ -12,6 +15,7 @@
// 角色机构树列表
export function getRoleTreeList() {
return request({
+ // baseURL,
url: `${prefix}/role/tree`,
method: 'get',
})
@@ -19,6 +23,7 @@
// 根据用户获取角色机构树列表
export function getRoleTreeListByUser(userId: string) {
return request({
+ // baseURL,
url: `${prefix}/role/treeByUserId`,
method: 'get',
params: {
@@ -30,6 +35,7 @@
// 添加角色机构
export function addRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/add`,
method: 'post',
data,
@@ -38,6 +44,7 @@
// 修改角色机构
export function updateRole(data: object) {
return request({
+ // baseURL,
url: `${prefix}/role/update`,
method: 'post',
data,
@@ -46,6 +53,7 @@
// 删除角色机构
export function delRole(id: string) {
return request({
+ // baseURL,
url: `${prefix}/role/delete`,
method: 'post',
data: {
@@ -57,6 +65,7 @@
// 功能授权
export function funcAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/role/funcAuthor',
method: 'post',
data: {
@@ -68,6 +77,7 @@
// 数据授权
export function dataAuthor(roleId: string, ids: string[]) {
return request({
+ // baseURL,
url: `${prefix}/role/dataAuthor`,
method: 'post',
data: {
@@ -80,6 +90,7 @@
// 角色类型列表
export function getDataScopeTypeList() {
return request({
+ // baseURL,
url: `${prefix}/dict/code/dataScopeType`,
method: 'get',
})
diff --git a/src/api/system/user.ts b/src/api/system/user.ts
index 1f8697d..ad39cbb 100644
--- a/src/api/system/user.ts
+++ b/src/api/system/user.ts
@@ -1,6 +1,9 @@
// import qs from 'qs'
import request from '../index'
const prefix = 'sys/'
+// const baseURL = window.localStorage.getItem('baseUrlAccount')!
+// const baseURL = 'http://192.168.1.200:5910/'
+
// 修改密码
export function changePwd(data: { oldPwd: string; newPwd: string }) {
return request.post(`${prefix}mgr/changePwd`, data)
@@ -8,6 +11,7 @@
// 用户列表
export function getUserList(params: object) {
return request({
+ // baseURL,
url: `${prefix}mgr/list`,
method: 'get',
params,
@@ -16,15 +20,28 @@
// 添加用户
export function addUser(data: object) {
- return request.post('system/mgr/add', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/add`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/add', data)
}
// 修改用户
export function updateUser(data: object) {
- return request.post('system/mgr/update', data)
+ return request({
+ // baseURL,
+ url: `${prefix}mgr/update`,
+ method: 'post',
+ data,
+ })
+ // return request.post('system/mgr/update', data)
}
// 删除用户
export function delUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/delete`,
method: 'post',
data,
@@ -34,6 +51,7 @@
// 冻结用户
export function freezeUserApi(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/freeze`,
method: 'post',
data,
@@ -42,6 +60,7 @@
// 冻结用户
export function unfreezeUser(data: { id: string }) {
return request({
+ // baseURL,
url: `${prefix}mgr/unfreeze`,
method: 'post',
data,
@@ -51,6 +70,7 @@
// 重置用户密码
export function resetPwdApi(data: object) {
return request({
+ // baseURL,
url: 'sys/mgr/reset',
method: 'post',
data,
@@ -60,6 +80,7 @@
// 分配角色
export function roleAssign(userId: string, ids: string[]) {
return request({
+ // baseURL,
url: 'sys/mgr/roleAssign',
method: 'post',
data: {
diff --git a/src/components/DeptSelect/index.vue b/src/components/DeptSelect/index.vue
index ef7bd91..906c4ba 100644
--- a/src/components/DeptSelect/index.vue
+++ b/src/components/DeptSelect/index.vue
@@ -68,28 +68,28 @@
function fetchPcode() {
// 如果未指定需要展示的部门类型,获取全部部门
if (!props.deptType) {
- if (dictStore.allDeptList.length === 0) { // 如果store中未存储,从服务器上获取
- getDeptTreeList().then((res) => {
- const list = res.data
- dictStore.setAllDeptList(list)
- refreshList(list)
- })
- }
- else {
- refreshList(dictStore.allDeptList)
- }
+ // if (dictStore.allDeptList.length === 0) { // 如果store中未存储,从服务器上获取
+ getDeptTreeList().then((res) => {
+ const list = res.data
+ dictStore.setAllDeptList(list)
+ refreshList(list)
+ })
+ // }
+ // else {
+ // refreshList(dictStore.allDeptList)
+ // }
}
else { // 如果指定了需要展示的部门类型
- if (dictStore.companyList.length === 0) { // 如果store中未存储,从服务器上获取
- getDeptTreeList({ deptType: props.deptType }).then((res) => {
- const list = res.data
- dictStore.setAllCompanyList(list)
- refreshList(list)
- })
- }
- else {
- refreshList(dictStore.companyList)
- }
+ // if (dictStore.companyList.length === 0) { // 如果store中未存储,从服务器上获取
+ getDeptTreeList({ deptType: props.deptType }).then((res) => {
+ const list = res.data
+ dictStore.setAllCompanyList(list)
+ refreshList(list)
+ })
+ // }
+ // else {
+ // refreshList(dictStore.companyList)
+ // }
}
}
function refreshList(list: DeptTreeNode[]) {
diff --git a/src/main.ts b/src/main.ts
index 96c2b03..07904e8 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -41,6 +41,8 @@
console.log(result)
request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
app.config.globalProperties.config = result.data
+ window.localStorage.setItem('baseURL', result.data.baseUrl)
+ window.localStorage.setItem('baseUrlAccount', result.data.baseUrlAccount)
app.mount('#app')
}).catch((error) => {
console.error(`get baseConfig error...${error}`)
diff --git a/src/utils/useTemplateDownload.ts b/src/utils/useTemplateDownload.ts
new file mode 100644
index 0000000..67feef4
--- /dev/null
+++ b/src/utils/useTemplateDownload.ts
@@ -0,0 +1,37 @@
+import { ElMessage } from 'element-plus'
+import { download } from './download'
+import { getFileListPage, getPhotoUrl } from '@/api/system/tool'
+/**
+ * 模板下载
+ * @param modelName 模块名称
+ */
+export default function useTemplateDownload(modelName: string) {
+ const searchQuery = { // 获取模板文件名称请求参数
+ fileName: '', // 文件名称
+ moduleName: modelName, // 模块名
+ downloadNo: '',
+ limit: 20,
+ offset: 1,
+ ids: [],
+ } // 查询参数
+ let minioFileName = ''
+ let fileName = '' // 文件名称
+ getFileListPage(searchQuery as any).then((res) => {
+ if (res.code === 200) {
+ if (res.data && res.data.rows.length) {
+ minioFileName = res.data.rows[0].minioFileName
+ fileName = res.data.rows[0].fileName
+ if (minioFileName) {
+ getPhotoUrl(minioFileName).then((res) => {
+ download(res.data, fileName)
+ }).catch(() => {
+ ElMessage.error('下载失败')
+ })
+ }
+ else {
+ ElMessage('无可下载内容')
+ }
+ }
+ }
+ })
+}
diff --git a/src/views/system/fileConfiguration/addDDialog.vue b/src/views/system/fileConfiguration/addDDialog.vue
index c0eaeea..c953ac5 100644
--- a/src/views/system/fileConfiguration/addDDialog.vue
+++ b/src/views/system/fileConfiguration/addDDialog.vue
@@ -193,10 +193,10 @@
-
-
+
+
-
+
+
-
-
+
+
-
-
-
- {{ scope.row[column.value] }}
+
+ {{ scope.row[column.value] }}
-
+
{{ scope.row[column.value] }}
@@ -686,6 +686,8 @@