diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 24bb58b..26226a9 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -25,7 +25,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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ // 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')!,
timeout: 1000 * 60 * 2,
responseType: 'json',
})
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 24bb58b..26226a9 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -25,7 +25,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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ // 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')!,
timeout: 1000 * 60 * 2,
responseType: 'json',
})
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.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 24bb58b..26226a9 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -25,7 +25,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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ // 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')!,
timeout: 1000 * 60 * 2,
responseType: 'json',
})
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/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue
index 2490650..4dd7e64 100644
--- a/src/components/AddressSelect/AddressSelect.vue
+++ b/src/components/AddressSelect/AddressSelect.vue
@@ -54,8 +54,10 @@
areaName: '',
address: '',
})
+// 国家变化
function countryChange(countryCode: string, clear = true) {
if (clear) {
+ addressObj.countryName = countries.find(item => item.code === countryCode)!.CNName
addressObj.province = ''
addressObj.provinceName = ''
addressObj.city = ''
@@ -72,6 +74,7 @@
// 省份变化
function provinceChange(provinceId: string, clear = true) {
if (clear) {
+ addressObj.provinceName = provinceList.value.find(item => item.id === provinceId)!.areaName
addressObj.city = ''
addressObj.cityName = ''
addressObj.area = ''
@@ -86,6 +89,7 @@
// 城市变化
function cityChange(cityId: string, clear = true) {
if (clear) {
+ addressObj.cityName = cityList.value.find(item => item.id === cityId)!.areaName
addressObj.area = ''
addressObj.areaName = ''
}
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 24bb58b..26226a9 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -25,7 +25,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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ // 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')!,
timeout: 1000 * 60 * 2,
responseType: 'json',
})
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/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue
index 2490650..4dd7e64 100644
--- a/src/components/AddressSelect/AddressSelect.vue
+++ b/src/components/AddressSelect/AddressSelect.vue
@@ -54,8 +54,10 @@
areaName: '',
address: '',
})
+// 国家变化
function countryChange(countryCode: string, clear = true) {
if (clear) {
+ addressObj.countryName = countries.find(item => item.code === countryCode)!.CNName
addressObj.province = ''
addressObj.provinceName = ''
addressObj.city = ''
@@ -72,6 +74,7 @@
// 省份变化
function provinceChange(provinceId: string, clear = true) {
if (clear) {
+ addressObj.provinceName = provinceList.value.find(item => item.id === provinceId)!.areaName
addressObj.city = ''
addressObj.cityName = ''
addressObj.area = ''
@@ -86,6 +89,7 @@
// 城市变化
function cityChange(cityId: string, clear = true) {
if (clear) {
+ addressObj.cityName = cityList.value.find(item => item.id === cityId)!.areaName
addressObj.area = ''
addressObj.areaName = ''
}
diff --git a/src/main.ts b/src/main.ts
index 3cfb61f..0fb2450 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,12 +1,14 @@
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import print from 'vue3-print-nb'
+import axios from 'axios'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import dayjs from 'dayjs'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
// 加载 svg 图标
@@ -34,4 +36,13 @@
}
directive(app)
-app.mount('#app')
+axios.get('./config/config.json').then((result) => {
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ window.localStorage.setItem('baseURL', result.data.baseUrl)
+ window.localStorage.setItem('wsURL', result.data.wsURL)
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
+
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 24bb58b..26226a9 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -25,7 +25,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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ // 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')!,
timeout: 1000 * 60 * 2,
responseType: 'json',
})
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/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue
index 2490650..4dd7e64 100644
--- a/src/components/AddressSelect/AddressSelect.vue
+++ b/src/components/AddressSelect/AddressSelect.vue
@@ -54,8 +54,10 @@
areaName: '',
address: '',
})
+// 国家变化
function countryChange(countryCode: string, clear = true) {
if (clear) {
+ addressObj.countryName = countries.find(item => item.code === countryCode)!.CNName
addressObj.province = ''
addressObj.provinceName = ''
addressObj.city = ''
@@ -72,6 +74,7 @@
// 省份变化
function provinceChange(provinceId: string, clear = true) {
if (clear) {
+ addressObj.provinceName = provinceList.value.find(item => item.id === provinceId)!.areaName
addressObj.city = ''
addressObj.cityName = ''
addressObj.area = ''
@@ -86,6 +89,7 @@
// 城市变化
function cityChange(cityId: string, clear = true) {
if (clear) {
+ addressObj.cityName = cityList.value.find(item => item.id === cityId)!.areaName
addressObj.area = ''
addressObj.areaName = ''
}
diff --git a/src/main.ts b/src/main.ts
index 3cfb61f..0fb2450 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,12 +1,14 @@
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import print from 'vue3-print-nb'
+import axios from 'axios'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import dayjs from 'dayjs'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
// 加载 svg 图标
@@ -34,4 +36,13 @@
}
directive(app)
-app.mount('#app')
+axios.get('./config/config.json').then((result) => {
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ window.localStorage.setItem('baseURL', result.data.baseUrl)
+ window.localStorage.setItem('wsURL', result.data.wsURL)
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
+
diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts
index 6191543..c558f21 100644
--- a/src/store/modules/websocket.ts
+++ b/src/store/modules/websocket.ts
@@ -8,7 +8,10 @@
// wsUrl: `ws://${import.meta.env.VITE_APP_API_BASEURL.split('://')[1]}/websocket/`,
// wsUrl: 'ws://192.168.2.96:8085/websocket/',
// wsUrl: 'ws://192.168.2.96:8088/websocket/', // 内网
- wsUrl: 'ws://222.187.140.114:8896/websocket/', // 外网
+ // wsUrl: 'ws://222.187.140.114:8896/websocket/', // 外网
+ // wsUrl: 'ws://139.198.29.133:8092/websocket/',
+ wsUrl: `ws://${window.localStorage.getItem('wsURL')}/websocket/`,
+
// wsUrl: 'ws://111.198.10.15:21609/websocket/', // 测试环境
websocket: null, // ws连接
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 24bb58b..26226a9 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -25,7 +25,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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ // 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')!,
timeout: 1000 * 60 * 2,
responseType: 'json',
})
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/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue
index 2490650..4dd7e64 100644
--- a/src/components/AddressSelect/AddressSelect.vue
+++ b/src/components/AddressSelect/AddressSelect.vue
@@ -54,8 +54,10 @@
areaName: '',
address: '',
})
+// 国家变化
function countryChange(countryCode: string, clear = true) {
if (clear) {
+ addressObj.countryName = countries.find(item => item.code === countryCode)!.CNName
addressObj.province = ''
addressObj.provinceName = ''
addressObj.city = ''
@@ -72,6 +74,7 @@
// 省份变化
function provinceChange(provinceId: string, clear = true) {
if (clear) {
+ addressObj.provinceName = provinceList.value.find(item => item.id === provinceId)!.areaName
addressObj.city = ''
addressObj.cityName = ''
addressObj.area = ''
@@ -86,6 +89,7 @@
// 城市变化
function cityChange(cityId: string, clear = true) {
if (clear) {
+ addressObj.cityName = cityList.value.find(item => item.id === cityId)!.areaName
addressObj.area = ''
addressObj.areaName = ''
}
diff --git a/src/main.ts b/src/main.ts
index 3cfb61f..0fb2450 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,12 +1,14 @@
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import print from 'vue3-print-nb'
+import axios from 'axios'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import dayjs from 'dayjs'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
// 加载 svg 图标
@@ -34,4 +36,13 @@
}
directive(app)
-app.mount('#app')
+axios.get('./config/config.json').then((result) => {
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ window.localStorage.setItem('baseURL', result.data.baseUrl)
+ window.localStorage.setItem('wsURL', result.data.wsURL)
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
+
diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts
index 6191543..c558f21 100644
--- a/src/store/modules/websocket.ts
+++ b/src/store/modules/websocket.ts
@@ -8,7 +8,10 @@
// wsUrl: `ws://${import.meta.env.VITE_APP_API_BASEURL.split('://')[1]}/websocket/`,
// wsUrl: 'ws://192.168.2.96:8085/websocket/',
// wsUrl: 'ws://192.168.2.96:8088/websocket/', // 内网
- wsUrl: 'ws://222.187.140.114:8896/websocket/', // 外网
+ // wsUrl: 'ws://222.187.140.114:8896/websocket/', // 外网
+ // wsUrl: 'ws://139.198.29.133:8092/websocket/',
+ wsUrl: `ws://${window.localStorage.getItem('wsURL')}/websocket/`,
+
// wsUrl: 'ws://111.198.10.15:21609/websocket/', // 测试环境
websocket: null, // ws连接
diff --git a/src/views/business/schedule/order/components/selectCustomer.vue b/src/views/business/schedule/order/components/selectCustomer.vue
new file mode 100644
index 0000000..e14bed7
--- /dev/null
+++ b/src/views/business/schedule/order/components/selectCustomer.vue
@@ -0,0 +1,220 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 24bb58b..26226a9 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -25,7 +25,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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ // 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')!,
timeout: 1000 * 60 * 2,
responseType: 'json',
})
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/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue
index 2490650..4dd7e64 100644
--- a/src/components/AddressSelect/AddressSelect.vue
+++ b/src/components/AddressSelect/AddressSelect.vue
@@ -54,8 +54,10 @@
areaName: '',
address: '',
})
+// 国家变化
function countryChange(countryCode: string, clear = true) {
if (clear) {
+ addressObj.countryName = countries.find(item => item.code === countryCode)!.CNName
addressObj.province = ''
addressObj.provinceName = ''
addressObj.city = ''
@@ -72,6 +74,7 @@
// 省份变化
function provinceChange(provinceId: string, clear = true) {
if (clear) {
+ addressObj.provinceName = provinceList.value.find(item => item.id === provinceId)!.areaName
addressObj.city = ''
addressObj.cityName = ''
addressObj.area = ''
@@ -86,6 +89,7 @@
// 城市变化
function cityChange(cityId: string, clear = true) {
if (clear) {
+ addressObj.cityName = cityList.value.find(item => item.id === cityId)!.areaName
addressObj.area = ''
addressObj.areaName = ''
}
diff --git a/src/main.ts b/src/main.ts
index 3cfb61f..0fb2450 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,12 +1,14 @@
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import print from 'vue3-print-nb'
+import axios from 'axios'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import dayjs from 'dayjs'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
// 加载 svg 图标
@@ -34,4 +36,13 @@
}
directive(app)
-app.mount('#app')
+axios.get('./config/config.json').then((result) => {
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ window.localStorage.setItem('baseURL', result.data.baseUrl)
+ window.localStorage.setItem('wsURL', result.data.wsURL)
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
+
diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts
index 6191543..c558f21 100644
--- a/src/store/modules/websocket.ts
+++ b/src/store/modules/websocket.ts
@@ -8,7 +8,10 @@
// wsUrl: `ws://${import.meta.env.VITE_APP_API_BASEURL.split('://')[1]}/websocket/`,
// wsUrl: 'ws://192.168.2.96:8085/websocket/',
// wsUrl: 'ws://192.168.2.96:8088/websocket/', // 内网
- wsUrl: 'ws://222.187.140.114:8896/websocket/', // 外网
+ // wsUrl: 'ws://222.187.140.114:8896/websocket/', // 外网
+ // wsUrl: 'ws://139.198.29.133:8092/websocket/',
+ wsUrl: `ws://${window.localStorage.getItem('wsURL')}/websocket/`,
+
// wsUrl: 'ws://111.198.10.15:21609/websocket/', // 测试环境
websocket: null, // ws连接
diff --git a/src/views/business/schedule/order/components/selectCustomer.vue b/src/views/business/schedule/order/components/selectCustomer.vue
new file mode 100644
index 0000000..e14bed7
--- /dev/null
+++ b/src/views/business/schedule/order/components/selectCustomer.vue
@@ -0,0 +1,220 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 4adf506..251f768 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -5,8 +5,8 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import type { IOrderDetail, ISampleList, dictType } from './orderList_interface'
import selectSample from './selectSample.vue'
+import selectCustomer from './components/selectCustomer.vue'
import { UploadFile } from '@/api/measure/file'
-import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getDictByCode } from '@/api/system/dict'
diff --git a/.env.production b/.env.production
index 69cf472..7fb8c5b 100644
--- a/.env.production
+++ b/.env.production
@@ -12,7 +12,9 @@
# ------------------ 内网 --------------------------
# VITE_APP_API_BASEURL = http://192.168.2.96:8088
# ------------------ 外网 --------------------------
-VITE_APP_API_BASEURL = http://222.187.140.114:8896
+# VITE_APP_API_BASEURL = http://222.187.140.114:8896
+VITE_APP_API_BASEURL = http://139.198.29.133:8092
+
# 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空
VITE_APP_DEBUG_TOOL =
diff --git a/public/config/config.json b/public/config/config.json
new file mode 100644
index 0000000..9a09996
--- /dev/null
+++ b/public/config/config.json
@@ -0,0 +1,5 @@
+{
+ "title":"计量业务系统",
+ "baseUrl": "http://111.198.10.15:21609",
+ "wsURL": "111.198.10.15:21609"
+}
diff --git a/src/api/business/subpackage/apply.ts b/src/api/business/subpackage/apply.ts
index cf8d998..ad17a5a 100644
--- a/src/api/business/subpackage/apply.ts
+++ b/src/api/business/subpackage/apply.ts
@@ -1,6 +1,7 @@
/**
* 分包项目申请接口
*/
+import type { AnyColumn } from 'element-plus/es/components/table-v2/src/common'
import request from '../../index'
import type { IListQuery } from '@/views/business/subpackage/subpackage-interface'
@@ -77,9 +78,9 @@
}
// 分包页面 样品列表
-export function listPageBySubpackage(data: object) {
+export function listPageBySubpackage(data: AnyColumn) {
return request({
- url: '/customer/sample/listPageBySubpackage',
+ url: `/customer/sample/listPageBySubpackage?offset=${data.offset}&limit=${data.limit}`,
method: 'post',
data,
})
diff --git a/src/api/business/subpackage/certificate.ts b/src/api/business/subpackage/certificate.ts
index 1b994e2..9e3ce0a 100644
--- a/src/api/business/subpackage/certificate.ts
+++ b/src/api/business/subpackage/certificate.ts
@@ -48,3 +48,12 @@
data,
})
}
+
+// 删除
+export function delCertificate(data: { id: string }) {
+ return request({
+ url: '/business/outsourceCertificate/delete',
+ method: 'post',
+ data,
+ })
+}
diff --git a/src/api/index.ts b/src/api/index.ts
index 24bb58b..26226a9 100644
--- a/src/api/index.ts
+++ b/src/api/index.ts
@@ -25,7 +25,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: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL,
+ // 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')!,
timeout: 1000 * 60 * 2,
responseType: 'json',
})
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/components/AddressSelect/AddressSelect.vue b/src/components/AddressSelect/AddressSelect.vue
index 2490650..4dd7e64 100644
--- a/src/components/AddressSelect/AddressSelect.vue
+++ b/src/components/AddressSelect/AddressSelect.vue
@@ -54,8 +54,10 @@
areaName: '',
address: '',
})
+// 国家变化
function countryChange(countryCode: string, clear = true) {
if (clear) {
+ addressObj.countryName = countries.find(item => item.code === countryCode)!.CNName
addressObj.province = ''
addressObj.provinceName = ''
addressObj.city = ''
@@ -72,6 +74,7 @@
// 省份变化
function provinceChange(provinceId: string, clear = true) {
if (clear) {
+ addressObj.provinceName = provinceList.value.find(item => item.id === provinceId)!.areaName
addressObj.city = ''
addressObj.cityName = ''
addressObj.area = ''
@@ -86,6 +89,7 @@
// 城市变化
function cityChange(cityId: string, clear = true) {
if (clear) {
+ addressObj.cityName = cityList.value.find(item => item.id === cityId)!.areaName
addressObj.area = ''
addressObj.areaName = ''
}
diff --git a/src/main.ts b/src/main.ts
index 3cfb61f..0fb2450 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,12 +1,14 @@
import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import print from 'vue3-print-nb'
+import axios from 'axios'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import dayjs from 'dayjs'
import App from './App.vue'
import pinia from './store'
import router from './router'
import useSettingsStore from './store/modules/settings'
+import request from '@/api/index'
// 自定义指令
import directive from '@/utils/directive'
// 加载 svg 图标
@@ -34,4 +36,13 @@
}
directive(app)
-app.mount('#app')
+axios.get('./config/config.json').then((result) => {
+ request.defaults.baseURL = result.data.baseUrl // 设置默认请求网址
+ app.config.globalProperties.config = result.data
+ window.localStorage.setItem('baseURL', result.data.baseUrl)
+ window.localStorage.setItem('wsURL', result.data.wsURL)
+ app.mount('#app')
+}).catch((error) => {
+ console.error(`get baseConfig error...${error}`)
+})
+
diff --git a/src/store/modules/websocket.ts b/src/store/modules/websocket.ts
index 6191543..c558f21 100644
--- a/src/store/modules/websocket.ts
+++ b/src/store/modules/websocket.ts
@@ -8,7 +8,10 @@
// wsUrl: `ws://${import.meta.env.VITE_APP_API_BASEURL.split('://')[1]}/websocket/`,
// wsUrl: 'ws://192.168.2.96:8085/websocket/',
// wsUrl: 'ws://192.168.2.96:8088/websocket/', // 内网
- wsUrl: 'ws://222.187.140.114:8896/websocket/', // 外网
+ // wsUrl: 'ws://222.187.140.114:8896/websocket/', // 外网
+ // wsUrl: 'ws://139.198.29.133:8092/websocket/',
+ wsUrl: `ws://${window.localStorage.getItem('wsURL')}/websocket/`,
+
// wsUrl: 'ws://111.198.10.15:21609/websocket/', // 测试环境
websocket: null, // ws连接
diff --git a/src/views/business/schedule/order/components/selectCustomer.vue b/src/views/business/schedule/order/components/selectCustomer.vue
new file mode 100644
index 0000000..e14bed7
--- /dev/null
+++ b/src/views/business/schedule/order/components/selectCustomer.vue
@@ -0,0 +1,220 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 4adf506..251f768 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -5,8 +5,8 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import type { IOrderDetail, ISampleList, dictType } from './orderList_interface'
import selectSample from './selectSample.vue'
+import selectCustomer from './components/selectCustomer.vue'
import { UploadFile } from '@/api/measure/file'
-import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getDictByCode } from '@/api/system/dict'
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 721a49c..2fb9552 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 4adf506..251f768 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -5,8 +5,8 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import type { IOrderDetail, ISampleList, dictType } from './orderList_interface'
import selectSample from './selectSample.vue'
+import selectCustomer from './components/selectCustomer.vue'
import { UploadFile } from '@/api/measure/file'
-import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getDictByCode } from '@/api/system/dict'
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 721a49c..2fb9552 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 4adf506..251f768 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -5,8 +5,8 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import type { IOrderDetail, ISampleList, dictType } from './orderList_interface'
import selectSample from './selectSample.vue'
+import selectCustomer from './components/selectCustomer.vue'
import { UploadFile } from '@/api/measure/file'
-import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getDictByCode } from '@/api/system/dict'
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 721a49c..2fb9552 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 4adf506..251f768 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -5,8 +5,8 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import type { IOrderDetail, ISampleList, dictType } from './orderList_interface'
import selectSample from './selectSample.vue'
+import selectCustomer from './components/selectCustomer.vue'
import { UploadFile } from '@/api/measure/file'
-import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getDictByCode } from '@/api/system/dict'
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 721a49c..2fb9552 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 4adf506..251f768 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -5,8 +5,8 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import type { IOrderDetail, ISampleList, dictType } from './orderList_interface'
import selectSample from './selectSample.vue'
+import selectCustomer from './components/selectCustomer.vue'
import { UploadFile } from '@/api/measure/file'
-import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getDictByCode } from '@/api/system/dict'
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 721a49c..2fb9552 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -1,7 +1,7 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 确定
+
+
+ 取消
+
+
+
+
diff --git a/src/views/business/schedule/order/orderEdit.vue b/src/views/business/schedule/order/orderEdit.vue
index 4adf506..251f768 100644
--- a/src/views/business/schedule/order/orderEdit.vue
+++ b/src/views/business/schedule/order/orderEdit.vue
@@ -5,8 +5,8 @@
import type { FormInstance, FormRules, UploadUserFile } from 'element-plus'
import type { IOrderDetail, ISampleList, dictType } from './orderList_interface'
import selectSample from './selectSample.vue'
+import selectCustomer from './components/selectCustomer.vue'
import { UploadFile } from '@/api/measure/file'
-import selectCustomer from '@/views/customer/sample/list/selectCustomer.vue'
import type { ICustomer } from '@/views/customer/customerInfo/customer_interface'
import showPhoto from '@/views/system/tool/showPhoto.vue'
import { getDictByCode } from '@/api/system/dict'
diff --git a/src/views/business/subpackage/certificate/list.vue b/src/views/business/subpackage/certificate/list.vue
index 721a49c..2fb9552 100644
--- a/src/views/business/subpackage/certificate/list.vue
+++ b/src/views/business/subpackage/certificate/list.vue
@@ -1,7 +1,7 @@