fix: bug#10481、10480、10471、10487、10477
This commit is contained in:
parent
914e495f2e
commit
5670470fcf
|
@ -238,6 +238,8 @@ watch(
|
||||||
* @param value
|
* @param value
|
||||||
*/
|
*/
|
||||||
let validateChannelId = async (_rule: Rule, value: string) => {
|
let validateChannelId = async (_rule: Rule, value: string) => {
|
||||||
|
// ID非必填, 没有输入ID时, 不校验ID是否存在
|
||||||
|
if (!value) return;
|
||||||
const { result } = await ChannelApi.validateField({
|
const { result } = await ChannelApi.validateField({
|
||||||
deviceId: route.query.id,
|
deviceId: route.query.id,
|
||||||
channelId: value,
|
channelId: value,
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
:checkStyle="true"
|
:checkStyle="true"
|
||||||
:disabled="!!route.query.id"
|
:disabled="!!route.query.id"
|
||||||
v-model="formData.channel"
|
v-model="formData.channel"
|
||||||
|
@change="formData.productId = undefined"
|
||||||
/>
|
/>
|
||||||
</j-form-item>
|
</j-form-item>
|
||||||
<j-row :gutter="24">
|
<j-row :gutter="24">
|
||||||
|
@ -264,7 +265,7 @@ const formData = ref({
|
||||||
name: '',
|
name: '',
|
||||||
channel: 'gb28181-2016',
|
channel: 'gb28181-2016',
|
||||||
photoUrl: getImage('/device-media.png'),
|
photoUrl: getImage('/device-media.png'),
|
||||||
productId: '',
|
productId: undefined,
|
||||||
others: {
|
others: {
|
||||||
access_pwd: '',
|
access_pwd: '',
|
||||||
},
|
},
|
||||||
|
|
|
@ -92,6 +92,23 @@
|
||||||
</template>
|
</template>
|
||||||
</CardBox>
|
</CardBox>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #channelNumber="slotProps">
|
||||||
|
{{ slotProps.channelNumber || 0 }}
|
||||||
|
</template>
|
||||||
|
<template #provider="slotProps">
|
||||||
|
{{ providerType[slotProps.provider] }}
|
||||||
|
</template>
|
||||||
|
<template #state="slotProps">
|
||||||
|
<j-badge
|
||||||
|
:text="slotProps.state?.text"
|
||||||
|
:status="
|
||||||
|
slotProps.state?.value === 'online'
|
||||||
|
? 'success'
|
||||||
|
: 'error'
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
<template #action="slotProps">
|
<template #action="slotProps">
|
||||||
<j-space :size="16">
|
<j-space :size="16">
|
||||||
<template
|
<template
|
||||||
|
@ -139,6 +156,8 @@ const columns = [
|
||||||
title: 'ID',
|
title: 'ID',
|
||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
|
width: 200,
|
||||||
|
fixed: 'left',
|
||||||
search: {
|
search: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
},
|
},
|
||||||
|
@ -169,6 +188,8 @@ const columns = [
|
||||||
title: '通道数量',
|
title: '通道数量',
|
||||||
dataIndex: 'channelNumber',
|
dataIndex: 'channelNumber',
|
||||||
key: 'channelNumber',
|
key: 'channelNumber',
|
||||||
|
scopedSlots: true,
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '厂商',
|
title: '厂商',
|
||||||
|
@ -182,7 +203,7 @@ const columns = [
|
||||||
title: '产品名称',
|
title: '产品名称',
|
||||||
dataIndex: 'productId',
|
dataIndex: 'productId',
|
||||||
key: 'productId',
|
key: 'productId',
|
||||||
scopedSlots: true,
|
// scopedSlots: true,
|
||||||
search: {
|
search: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: () =>
|
options: () =>
|
||||||
|
@ -215,6 +236,7 @@ const columns = [
|
||||||
dataIndex: 'state',
|
dataIndex: 'state',
|
||||||
key: 'state',
|
key: 'state',
|
||||||
scopedSlots: true,
|
scopedSlots: true,
|
||||||
|
width: 100,
|
||||||
search: {
|
search: {
|
||||||
type: 'select',
|
type: 'select',
|
||||||
options: [
|
options: [
|
||||||
|
@ -325,7 +347,8 @@ const getActions = (
|
||||||
key: 'delete',
|
key: 'delete',
|
||||||
text: '删除',
|
text: '删除',
|
||||||
tooltip: {
|
tooltip: {
|
||||||
title: '在线设备无法删除',
|
title:
|
||||||
|
data.state.value === 'online' ? '在线设备无法删除' : '删除',
|
||||||
},
|
},
|
||||||
disabled: data.state.value === 'online',
|
disabled: data.state.value === 'online',
|
||||||
popConfirm: {
|
popConfirm: {
|
||||||
|
|
Loading…
Reference in New Issue