Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
XieYongHong 2023-07-10 20:12:20 +08:00
commit 19706fec7b
2 changed files with 69 additions and 110 deletions

View File

@ -94,7 +94,7 @@
<template #label>
通知Token
<j-tooltip
title="自定义token,可用于验证请求是否来自OneNet"
title="填写OneNet数据推送配置中设置的Token"
>
<AIcon
type="QuestionCircleOutlined"

View File

@ -1,14 +1,6 @@
<template>
<j-modal
class="add-device-or-product-dialog-container"
title="绑定"
width="1440px"
:maskClosable="false"
@ok="confirm"
:confirmLoading="loading"
@cancel="cancel"
visible
>
<j-modal class="add-device-or-product-dialog-container" title="绑定" width="1440px" :maskClosable="false" @ok="confirm"
:confirmLoading="loading" @cancel="cancel" visible>
<h5 class="row">
<AIcon type="ExclamationCircleOutlined" style="margin-right: 6px" />
只能分配有共享权限的资产数据
@ -16,12 +8,7 @@
<div class="row">
<span style="margin-right: 8px">批量配置</span>
<j-switch
v-model:checked="bulkBool"
checked-children="开"
un-checked-children="关"
style="width: 56px"
/>
<j-switch v-model:checked="bulkBool" checked-children="" un-checked-children="" style="width: 56px" />
</div>
<div v-show="bulkBool">
<j-checkbox-group v-model:value="bulkList" :options="options" />
@ -45,44 +32,28 @@
:columns="columns"
>
<template #card="slotProps">
<CardBox
:value="slotProps"
:actions="[{ key: 1 }]"
v-bind="slotProps"
:active="
table._selectedRowKeys.value.includes(slotProps.id)
"
@click="table.onSelectChange"
:status="slotProps.state?.value"
:statusText="slotProps.state?.text"
:statusNames="{
<CardBox :value="slotProps" :actions="[{ key: 1 }]" v-bind="slotProps" :active="table._selectedRowKeys.value.includes(slotProps.id)
" @click="table.onSelectChange" :status="slotProps.state?.value"
:statusText="slotProps.state?.text" :statusNames="{
online: 'processing',
offline: 'error',
notActive: 'warning',
}"
>
}">
<template #img>
<slot name="img">
<img
:src="getImage('/device-product.png')"
style="cursor: pointer"
/>
<img :src="getImage('/device-product.png')" style="cursor: pointer" />
</slot>
</template>
<template #content>
<h3 class="card-item-content-title" style='margin-bottom: 18px;'>
<Ellipsis style="width: calc(100% - 100px);"
>
<Ellipsis style="width: calc(100% - 100px);">
{{ slotProps.name }}
</Ellipsis>
</h3>
<j-row>
<j-col :span="12">
<div class="card-item-content-text">ID</div>
<div
style="cursor: pointer"
class="card-item-content-value"
>
<div style="cursor: pointer" class="card-item-content-value">
{{ slotProps.id }}
</div>
</j-col>
@ -90,17 +61,10 @@
<div class="card-item-content-text">
资产权限
</div>
<div
style="cursor: pointer"
class="card-item-content-value"
@click="(e) => e.stopPropagation()"
>
<j-checkbox-group
v-model:value="
slotProps.selectPermissions
"
:options="slotProps.permissionList"
/>
<div style="cursor: pointer" class="card-item-content-value"
@click="(e) => e.stopPropagation()">
<j-checkbox-group v-model:value="slotProps.selectPermissions
" :options="slotProps.permissionList" />
</div>
</j-col>
</j-row>
@ -109,27 +73,16 @@
</template>
<template #permission="slotProps">
<div
style="cursor: pointer"
class="card-item-content-value"
@click="(e) => e.stopPropagation()"
>
<j-checkbox-group
v-model:value="slotProps.selectPermissions"
:options="slotProps.permissionList"
/>
<div style="cursor: pointer" class="card-item-content-value" @click="(e) => e.stopPropagation()">
<j-checkbox-group v-model:value="slotProps.selectPermissions" :options="slotProps.permissionList" />
</div>
</template>
<template #state="slotProps">
<BadgeStatus
:status="slotProps.state.value"
:text="slotProps.state.text"
:statusNames="{
<BadgeStatus :status="slotProps.state.value" :text="slotProps.state.text" :statusNames="{
online: 'processing',
offline: 'error',
notActive: 'warning',
}"
></BadgeStatus>
}"></BadgeStatus>
</template>
<template #registryTime="slotProps">
<span>{{
@ -468,9 +421,13 @@ table.init();
// table._selectedRowKeys.value = okRows.map((item) => item.id);
// };
// fix: bug#10749
const selectChange = (keys: string[], rows: any[]) => {
table.selectedRows = rows;
table._selectedRowKeys.value = keys;
const selectChange = (record: any,selected: boolean,selectedRows: any,) => {
if(selected){
table._selectedRowKeys.value.push(record?.id)
}else{
}
console.log(record,selected,selectedRows);
};
const cancel = () => {
@ -489,11 +446,13 @@ const search = (query: any) => {
height: calc(100vh - 400px);
overflow-y: auto;
}
h5 {
padding: 12px;
background-color: #f6f6f6;
font-size: 14px;
}
.row {
margin-bottom: 12px;
}