fix: bug#10817

This commit is contained in:
leiqiaochu 2023-03-23 18:17:11 +08:00
parent 7c7a585c43
commit cb035bce38
3 changed files with 23 additions and 28 deletions

View File

@ -48,7 +48,7 @@ export const category = (data: any) => server.post('/device/category/_tree', dat
/**
*
*/
export const getProviders = () => server.get('/gateway/device/providers')
export const getProviders = (terms?:any) => server.get('/gateway/device/providers',terms)
/**
*

View File

@ -418,6 +418,8 @@ import { marked } from 'marked';
import type { TableColumnType } from 'ant-design-vue';
import { useMenuStore } from '@/store/menu';
import _ from 'lodash';
import encodeQuery from '@/utils/encodeQuery';
const tableRef = ref();
const formRef = ref();
const menuStore = useMenuStore();
@ -501,14 +503,15 @@ const query = reactive({
return new Promise((res) => {
getProviders().then((resp: any) => {
listData.value = [];
console.log(description.value);
if (isNoCommunity) {
listData.value = (resp?.result || []).map(
(item: any) => ({
label: item.name,
value: item.id,
}),
);
(resp?.result || []).map((item: any) => {
if (item.id != 'plugin_gateway') {
listData.value.push({
label: item.name,
value: item.id,
});
}
});
} else {
listData.value = (resp?.result || [])
.filter((i: any) =>
@ -568,17 +571,7 @@ const query = reactive({
});
const param = ref<Record<string, any>>({
pageSize: 4,
terms: [
{
terms: [
{
column: 'channel',
termType: 'nin',
value: 'plugin',
},
],
},
],
terms: [],
});
const queryParams = ref<Record<string, any>>({});
/**
@ -1085,10 +1078,10 @@ nextTick(() => {
font-weight: 400;
font-size: 12px;
}
.changeBtn{
.changeBtn {
margin: 0 0 0 20px;
color: #315EFB;
color: #315efb;
background: #ffffff;
border: 1px solid #315EFB
border: 1px solid #315efb;
}
</style>

View File

@ -447,12 +447,14 @@ const query = reactive({
listData.value = [];
// const list = () => {
if (isNoCommunity) {
listData.value = (resp?.result || []).map(
(item: any) => ({
label: item.name,
value: item.id,
}),
);
(resp?.result || []).map((item: any) => {
if (item.id != 'plugin_gateway') {
listData.value.push({
label: item.name,
value: item.id,
});
}
});
} else {
listData.value = (resp?.result || [])
.filter((i: any) =>