NEZ-1965 feat :增加列表页面内容复制功能
This commit is contained in:
@@ -35,17 +35,20 @@
|
|||||||
>
|
>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<template v-if="item.prop === 'alertRule'">
|
<template v-if="item.prop === 'alertRule'">
|
||||||
<div v-if="scope.row.alertRule&&scope.row.alertRule.name" >
|
<div v-if="scope.row.alertRule&&scope.row.alertRule.name" class="document-copy-block">
|
||||||
<span
|
<span class="document-copy-text"
|
||||||
@mouseenter="alertMessageHover(scope.row, true, $event)"
|
@mouseenter="alertMessageHover(scope.row, true, $event)"
|
||||||
@mouseleave="alertMessageHover(scope.row, false)"
|
@mouseleave="alertMessageHover(scope.row, false)"
|
||||||
>{{scope.row.alertRule?scope.row.alertRule.name : '--'}}</span>
|
>{{scope.row.alertRule?scope.row.alertRule.name : '--'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.alertRule.name)" :title="$t('overall.copyText')"></i>
|
||||||
</div>
|
</div>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop === 'summary'">
|
<template v-else-if="item.prop === 'summary'">
|
||||||
<template v-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<div class="document-copy-block">
|
||||||
<template v-else>-</template>
|
<span class="document-copy-text">{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop === 'description'">
|
<template v-else-if="item.prop === 'description'">
|
||||||
<template v-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<template v-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||||
|
|||||||
@@ -36,7 +36,22 @@
|
|||||||
</template>
|
</template>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
<div v-if="item.prop === 'group'">
|
<div v-if="item.prop === 'group'">
|
||||||
{{scope.row[item.prop] ? scope.row[item.prop].name : '-'}}
|
<div class="document-copy-block">
|
||||||
|
<span class="document-copy-text"> {{scope.row[item.prop] ? scope.row[item.prop].name : '-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop].name)" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="item.prop === 'name'">
|
||||||
|
<div class="document-copy-block">
|
||||||
|
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else-if="item.prop === 'metaKey'">
|
||||||
|
<div class="document-copy-block">
|
||||||
|
<span class="document-copy-text">{{scope.row[item.prop] || '-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if=" item.prop === 'display' ">
|
<div v-else-if=" item.prop === 'display' ">
|
||||||
<div v-if="scope.row[item.prop] === 1">Enabled</div>
|
<div v-if="scope.row[item.prop] === 1">Enabled</div>
|
||||||
|
|||||||
@@ -88,6 +88,12 @@
|
|||||||
{{scope.row[item.prop]}}
|
{{scope.row[item.prop]}}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="item.prop === 'name'">
|
||||||
|
<div class="document-copy-block">
|
||||||
|
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<span v-else-if="item.prop === 'id'" :id="'globalSearch' + scope.row.id">{{scope.row[item.prop]}}</span>
|
<span v-else-if="item.prop === 'id'" :id="'globalSearch' + scope.row.id">{{scope.row[item.prop]}}</span>
|
||||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
|
|||||||
@@ -42,11 +42,23 @@
|
|||||||
<span>-</span>
|
<span>-</span>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="item.prop === 'name'">
|
||||||
|
<div class="document-copy-block">
|
||||||
|
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template v-else-if="item.prop === 'brand'">
|
<template v-else-if="item.prop === 'brand'">
|
||||||
{{scope.row.brand.name}}
|
<div class="document-copy-block">
|
||||||
|
<span class="document-copy-text">{{scope.row.brand.name}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.brand.name)" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="item.prop === 'type'">
|
<template v-else-if="item.prop === 'type'">
|
||||||
{{scope.row.type ? scope.row.type.name : '-'}}
|
<div class="document-copy-block">
|
||||||
|
<span class="document-copy-text">{{scope.row.type ? scope.row.type.name : '-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.type.name)" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<span v-else-if="item.prop === 'createTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
|
<span v-else-if="item.prop === 'createTime'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
|
||||||
<template v-else-if="item.prop === 'assetNum'">
|
<template v-else-if="item.prop === 'assetNum'">
|
||||||
|
|||||||
@@ -132,7 +132,12 @@
|
|||||||
<pl-table v-if="showTable" ref="resultTable" v-my-loading="loading" :datas="resultData" :empty-text="$t('overall.noData')" :pagination-show="false" :row-height="28"
|
<pl-table v-if="showTable" ref="resultTable" v-my-loading="loading" :datas="resultData" :empty-text="$t('overall.noData')" :pagination-show="false" :row-height="28"
|
||||||
border class="mib-browser-table" size="small" style="width: 100%; height: 100%" use-virtual>
|
border class="mib-browser-table" size="small" style="width: 100%; height: 100%" use-virtual>
|
||||||
<pl-table-column v-slot="{row}" label="Name/OID">
|
<pl-table-column v-slot="{row}" label="Name/OID">
|
||||||
|
<div class="document-copy-block">
|
||||||
|
<div class="document-copy-text">
|
||||||
<div class="too-long-split" @click="searchParam.oid = row.oid">{{row.name ? row.name : row.oid}}</div>
|
<div class="too-long-split" @click="searchParam.oid = row.oid">{{row.name ? row.name : row.oid}}</div>
|
||||||
|
</div>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(row.name ? row.name : row.oid)" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
</pl-table-column>
|
</pl-table-column>
|
||||||
<pl-table-column v-slot="{row}" label="Value">
|
<pl-table-column v-slot="{row}" label="Value">
|
||||||
<template><div @click="searchParam.oid = row.oid">{{row.value}}</div></template>
|
<template><div @click="searchParam.oid = row.oid">{{row.value}}</div></template>
|
||||||
|
|||||||
@@ -83,6 +83,12 @@
|
|||||||
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i>
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-else-if="item.prop === 'name'">
|
||||||
|
<div class="document-copy-block">
|
||||||
|
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span>
|
||||||
|
<i class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
|
||||||
<template v-else>-</template>
|
<template v-else>-</template>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user