feat:天平连接
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed, nextTick, onBeforeUnmount, reactive, ref } from 'vue'
|
||||
import sysApi from '@/nx/api/sys'
|
||||
import nx from '@/nx'
|
||||
import { aesEncrypt } from './utils/aes'
|
||||
|
||||
const props = defineProps({
|
||||
@@ -196,7 +196,7 @@ function resetState() {
|
||||
async function loadCaptcha() {
|
||||
loading.value = true
|
||||
try {
|
||||
const res = await sysApi.getCaptchaCode({ captchaType: props.captchaType })
|
||||
const res = await nx.$api.sys.getCaptchaCode({ captchaType: props.captchaType })
|
||||
if (res && (res.repCode === '0000' || res.code === 0)) {
|
||||
const data = res.repData || res.data || {}
|
||||
captchaState.originalImageBase64 = data.originalImageBase64 || ''
|
||||
@@ -292,7 +292,7 @@ async function submitVerification() {
|
||||
? aesEncrypt(JSON.stringify(point), captchaState.secretKey)
|
||||
: JSON.stringify(point)
|
||||
|
||||
const res = await sysApi.verifyCaptcha({
|
||||
const res = await nx.$api.sys.verifyCaptcha({
|
||||
captchaType: props.captchaType,
|
||||
token: captchaState.token,
|
||||
pointJson: payload
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -64,6 +64,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['update:showPopup'])
|
||||
// Data
|
||||
const curSample = ref({})
|
||||
const curParameterKey = ref('')
|
||||
@@ -79,7 +80,7 @@ const getAllIndexes = arr => {
|
||||
}
|
||||
|
||||
const close = () => {
|
||||
uni.$emit('sample-detail-popup_close')
|
||||
emit('update:showPopup', false)
|
||||
}
|
||||
|
||||
const getSampleData = () => {
|
||||
|
||||
@@ -30,5 +30,6 @@ export function getUpgradeBaseUrl() {
|
||||
return uni.getStorageSync('upgradeBaseUrl')
|
||||
}
|
||||
export function getWebSocketUrl() {
|
||||
return uni.getStorageSync('base_url').replace('/api', '') + '/ws'
|
||||
// return uni.getStorageSync('base_url').replace('/api', '') + '/ws'
|
||||
return 'ws://localhost:8330'
|
||||
}
|
||||
|
||||
112
nx/api/auncel.js
112
nx/api/auncel.js
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@ import request from '@/nx/request'
|
||||
//获取实验室设备
|
||||
const getDeviceLaboratoryListBy = params => {
|
||||
return request({
|
||||
url: '/qms/lims/deviceLaboratory/list',
|
||||
url: '/qms/resource/device-infomation/page',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
import request from '@/nx/request'
|
||||
|
||||
// 根据用户id获取计量点
|
||||
const getMeasurePointByUserId = params => {
|
||||
return request({
|
||||
url: '/mas-iot/user-measure-point/listByUserId',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 根据用户id及计量点id获取计量点
|
||||
const getMeasurePointByUserIdAndMeasurePointId = params => {
|
||||
return request({
|
||||
url: '/mas-iot/user-measure-point/findByUserIdAndMeasurePointId',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//获取物料信息
|
||||
const getGoodsListBy = params => {
|
||||
return request({
|
||||
url: '/mas-lims/bas-goods/oldGoodsListBy',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取发货方
|
||||
const getSellerListBy = params => {
|
||||
return request({
|
||||
url: '/mas-lims/bas-businesses/oldSellerListBy',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
//获取收货方
|
||||
const getBuyerListBy = params => {
|
||||
return request({
|
||||
url: '/mas-lims/bas-businesses/oldBuyerListBy',
|
||||
method: 'GET',
|
||||
params: {
|
||||
...params
|
||||
},
|
||||
custom: {
|
||||
isApiEncryption: false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default {
|
||||
getGoodsListBy,
|
||||
getSellerListBy,
|
||||
getBuyerListBy,
|
||||
getMeasurePointByUserId,
|
||||
getMeasurePointByUserIdAndMeasurePointId
|
||||
}
|
||||
@@ -130,6 +130,8 @@ http.interceptors.response.use(
|
||||
// $store('user').setToken(response.header.authorization || response.header.Authorization)
|
||||
// }
|
||||
|
||||
const userStore = $store('user')
|
||||
const isLogin = userStore.isLogin
|
||||
response.config.custom.showLoading && closeLoading()
|
||||
|
||||
console.log('response', JSON.parse(JSON.stringify(response.data)))
|
||||
@@ -193,6 +195,9 @@ http.interceptors.response.use(
|
||||
title: msg || response.config.custom.errorMsg,
|
||||
icon: 'none'
|
||||
})
|
||||
if (code === 401) {
|
||||
userStore.logout(true)
|
||||
}
|
||||
}
|
||||
|
||||
if ((code === 0 || code === 200) && response.config.custom.showSuccess) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user