fix: bug#10439
This commit is contained in:
parent
0200d1d419
commit
83a9f9f0cb
|
@ -13,8 +13,10 @@ export default {
|
|||
del: (id: string) => server.remove(`/media/device/${id}`),
|
||||
// 更新通道
|
||||
updateChannels: (id: string) => server.post(`/media/device/${id}/channels/_sync`),
|
||||
// 查询产品列表
|
||||
// post查询产品列表
|
||||
queryProductList: (data: any) => server.post<ProductType[]>(`/device/product/_query/no-paging`, data),
|
||||
// get获取产品
|
||||
getProductList: (data: any) => server.get(`/device/product/_query/no-paging?paging=false`, data),
|
||||
// 快速添加产品
|
||||
saveProduct: (data: any) => server.post<any>(`/device/product`, data),
|
||||
// 产品发布
|
||||
|
|
|
@ -20,9 +20,8 @@
|
|||
</div>
|
||||
<div class="right">
|
||||
<pro-search
|
||||
type="simple"
|
||||
:columns="columns"
|
||||
target="product"
|
||||
target="channel"
|
||||
@search="handleSearch"
|
||||
/>
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@ import { message } from 'ant-design-vue';
|
|||
import { getImage } from '@/utils/comm';
|
||||
import { PROVIDER_OPTIONS } from '@/views/media/Device/const';
|
||||
import { providerType } from './const';
|
||||
import encodeQuery from '@/utils/encodeQuery';
|
||||
|
||||
import { useMenuStore } from 'store/menu';
|
||||
|
||||
|
@ -153,14 +154,14 @@ const columns = [
|
|||
},
|
||||
{
|
||||
title: '接入方式',
|
||||
dataIndex: 'type',
|
||||
key: 'type',
|
||||
dataIndex: 'provider',
|
||||
key: 'provider',
|
||||
scopedSlots: true,
|
||||
search: {
|
||||
type: 'select',
|
||||
options: PROVIDER_OPTIONS,
|
||||
handleValue: (v: any) => {
|
||||
return '123';
|
||||
return v;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -184,12 +185,28 @@ const columns = [
|
|||
scopedSlots: true,
|
||||
search: {
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '固定地址', value: 'fixed-media' },
|
||||
{ label: 'GB/T28181', value: 'gb28181-2016' },
|
||||
],
|
||||
options: () =>
|
||||
new Promise((resolve) => {
|
||||
DeviceApi.getProductList(
|
||||
encodeQuery({
|
||||
terms: {
|
||||
messageProtocol$in: [
|
||||
'gb28181-2016',
|
||||
'fixed-media',
|
||||
],
|
||||
},
|
||||
}),
|
||||
).then((resp: any) => {
|
||||
resolve(
|
||||
resp.result.map((pItem: any) => ({
|
||||
label: pItem.name,
|
||||
value: pItem.id,
|
||||
})),
|
||||
);
|
||||
});
|
||||
}),
|
||||
handleValue: (v: any) => {
|
||||
return '123';
|
||||
return v;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -206,7 +223,7 @@ const columns = [
|
|||
{ label: '在线', value: 'online' },
|
||||
],
|
||||
handleValue: (v: any) => {
|
||||
return '123';
|
||||
return v;
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue