CN-64 feat: 搜索框联动,其他一些细节调整

This commit is contained in:
chenjinsong
2021-08-13 09:39:02 +08:00
parent 6eb33efa7a
commit c1bcc9394d
16 changed files with 340 additions and 171 deletions

View File

@@ -19,6 +19,7 @@ export const api = {
entityCount: '/interface/entity/total',
entityFilter: '/interface/entity/filter'
}
/* panel */
export async function getPanelList (params) {
return await getData(api.panel, params, true)

View File

@@ -1,4 +1,5 @@
import axios from 'axios'
import { storageKey } from '@/utils/constants'
axios.interceptors.request.use(config => {
const token = sessionStorage.getItem('cn-token')
@@ -41,6 +42,7 @@ axios.interceptors.response.use(
response => {
if (licenceErrorCode.indexOf(response.data.code) !== -1) {
window.location.href = '/'
sessionStorage.removeItem(storageKey.token)
} else if (response.status === 200) {
if (accountErrorCode.indexOf(response.data.code) !== -1) {
window.location.href = '/'

View File

@@ -75,7 +75,7 @@ export default function unitConvert (value, unitType, sourceUnit, targetUnit, do
return ['-', '']
}
}
if (!Number(value) && Number(value) !== 0) {
if (!value && value !== 0) {
return ['-', '']
} else {
switch (unitType) {