fix: bug#11021、11047、11088
This commit is contained in:
parent
4782c510d5
commit
c7137ea8e5
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<template v-if="isPermission">
|
||||
<template v-if="popConfirm">
|
||||
<j-popconfirm :overlayStyle='{minWidth: "180px"}' v-bind="popConfirm" :disabled="!isPermission || props.disabled">
|
||||
<j-popconfirm :overlayStyle='{width: "220px"}' v-bind="popConfirm" :disabled="!isPermission || props.disabled">
|
||||
<j-tooltip v-if="tooltip" v-bind="tooltip">
|
||||
<slot v-if="noButton"></slot>
|
||||
<j-button v-else v-bind="props" :disabled="_isPermission" :style="props.style">
|
||||
|
|
|
@ -135,6 +135,7 @@
|
|||
v-model:value="formData.configuration.authType"
|
||||
:options="Options['auth-types']"
|
||||
@change="changeAuthType"
|
||||
:column="2"
|
||||
/>
|
||||
</j-form-item>
|
||||
<j-form-item
|
||||
|
|
|
@ -257,6 +257,7 @@ const getActions = (
|
|||
state === 'enabled' ? '请先禁用该组件,再删除。' : '删除',
|
||||
},
|
||||
popConfirm: {
|
||||
placement: 'topRight',
|
||||
title: '该操作将会删除下属采集器与点位,确定删除?',
|
||||
onConfirm: async () => {
|
||||
const res = await remove(data.id);
|
||||
|
|
|
@ -212,6 +212,9 @@ const handleClick = () => {
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.card-header-left {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.card-item {
|
||||
|
|
|
@ -64,7 +64,8 @@
|
|||
hasPermission="DataCollect/Collector:delete"
|
||||
:popConfirm="{
|
||||
title: `确定删除?`,
|
||||
onConfirm: () => handlDelete(),
|
||||
onConfirm: () =>
|
||||
handlBatchDelete(),
|
||||
}"
|
||||
>
|
||||
<template #icon
|
||||
|
@ -101,9 +102,11 @@
|
|||
>
|
||||
<template #title>
|
||||
<slot name="title">
|
||||
<Ellipsis style="width: calc(100% - 10px)">
|
||||
<div class="card-box-title">
|
||||
{{ slotProps.name }}
|
||||
</div>
|
||||
</Ellipsis>
|
||||
</slot>
|
||||
</template>
|
||||
<template #action>
|
||||
|
@ -184,7 +187,7 @@
|
|||
</p>
|
||||
<p>
|
||||
{{
|
||||
moment(
|
||||
dayjs(
|
||||
propertyValue.get(
|
||||
slotProps.id,
|
||||
)?.timestamp,
|
||||
|
@ -195,24 +198,42 @@
|
|||
</div>
|
||||
|
||||
<div class="card-box-content-right">
|
||||
<Ellipsis
|
||||
style="
|
||||
width: calc(100% - 10px);
|
||||
margin-bottom: 10px;
|
||||
"
|
||||
>
|
||||
<div
|
||||
v-if="getRight1(slotProps)"
|
||||
class="card-box-content-right-1"
|
||||
>
|
||||
<span>{{
|
||||
getQuantity(slotProps)
|
||||
}}</span>
|
||||
<span>{{ getAddress(slotProps) }}</span>
|
||||
<span>{{
|
||||
getScaleFactor(slotProps)
|
||||
}}</span>
|
||||
<span>
|
||||
{{ getQuantity(slotProps) }}
|
||||
</span>
|
||||
<span>
|
||||
{{ getAddress(slotProps) }}
|
||||
</span>
|
||||
<span>
|
||||
{{ getScaleFactor(slotProps) }}
|
||||
</span>
|
||||
</div>
|
||||
</Ellipsis>
|
||||
<Ellipsis
|
||||
style="
|
||||
width: calc(100% - 10px);
|
||||
margin-bottom: 10px;
|
||||
"
|
||||
>
|
||||
<div class="card-box-content-right-2">
|
||||
<span>{{ getText(slotProps) }}</span>
|
||||
<span>{{
|
||||
getText(slotProps)
|
||||
}}</span>
|
||||
<span>{{
|
||||
getInterval(slotProps)
|
||||
}}</span>
|
||||
</div>
|
||||
</Ellipsis>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -262,7 +283,7 @@ import { colorMap, getState } from '../data.ts';
|
|||
import { cloneDeep } from 'lodash-es';
|
||||
import { getWebSocket } from '@/utils/websocket';
|
||||
import { map } from 'rxjs/operators';
|
||||
import moment from 'moment';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const props = defineProps({
|
||||
data: {
|
||||
|
@ -404,6 +425,7 @@ const handlEdit = (data: any) => {
|
|||
}
|
||||
current.value = cloneDeep(data);
|
||||
};
|
||||
|
||||
const handlDelete = async (id: string | undefined = undefined) => {
|
||||
spinning.value = true;
|
||||
const res = !id
|
||||
|
@ -416,6 +438,18 @@ const handlDelete = async (id: string | undefined = undefined) => {
|
|||
}
|
||||
spinning.value = false;
|
||||
};
|
||||
|
||||
const handlBatchDelete = () => {
|
||||
if (_selectedRowKeys.value.length === 0) {
|
||||
onlyMessage('请先选择', 'warning');
|
||||
return;
|
||||
} else {
|
||||
console.log(2);
|
||||
|
||||
handlDelete();
|
||||
}
|
||||
};
|
||||
|
||||
const handlBatchUpdate = () => {
|
||||
if (_selectedRowKeys.value.length === 0) {
|
||||
onlyMessage('请先选择', 'warning');
|
||||
|
@ -590,7 +624,7 @@ const handleSearch = (e: any) => {
|
|||
</script>
|
||||
<style lang="less" scoped>
|
||||
.card-box {
|
||||
min-width: 480px;
|
||||
// min-width: 480px;
|
||||
a {
|
||||
color: #474747;
|
||||
z-index: 1;
|
||||
|
@ -638,7 +672,6 @@ const handleSearch = (e: any) => {
|
|||
span {
|
||||
margin: 0 5px 0 0;
|
||||
}
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.card-box-content-right-2 {
|
||||
span {
|
||||
|
|
Loading…
Reference in New Issue