fix : 复制功能组件替换

This commit is contained in:
likexuan
2022-10-20 17:08:16 +08:00
parent de3f4ccc3c
commit ddb4fa4cc9
16 changed files with 156 additions and 114 deletions

View File

@@ -121,16 +121,18 @@
</el-popover> </el-popover>
</template> </template>
<template v-else-if="item.prop === 'name'"> <template v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'expr'"> <template v-else-if="item.prop === 'expr'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </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>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
@@ -188,10 +190,11 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
import chartDataFormat from '@/components/chart/chartDataFormat' import chartDataFormat from '@/components/chart/chartDataFormat'
export default { export default {
name: 'alertRuleTable', name: 'alertRuleTable',
components: { deleteButton }, components: { deleteButton, copy },
mixins: [table], mixins: [table],
props: { props: {
loading: Boolean loading: Boolean

View File

@@ -97,10 +97,11 @@
{{ utcTimeToTimezoneStr(scope.row[item.prop]) }} {{ utcTimeToTimezoneStr(scope.row[item.prop]) }}
</template> </template>
<template v-else-if="item.prop === 'name'"> <template v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{ <span v-else-if="scope.row[item.prop]">{{
scope.row[item.prop] || "-" scope.row[item.prop] || "-"
@@ -201,11 +202,13 @@ import { calcDurationByStringTimeB } from '@/components/common/js/tools'
import nzAlertTag from '../../../page/alert/nzAlertTag' import nzAlertTag from '../../../page/alert/nzAlertTag'
import { sameLabels } from '@/components/common/js/constants' import { sameLabels } from '@/components/common/js/constants'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'alertSilenceTable', name: 'alertSilenceTable',
components: { components: {
nzAlertTag, nzAlertTag,
deleteButton deleteButton,
copy
}, },
mixins: [table], mixins: [table],
props: { props: {

View File

@@ -36,22 +36,25 @@
</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'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop].name' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text"> {{scope.row[item.prop] ? scope.row[item.prop].name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop].name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop].name:'-'}}
</div> </template>
</copy>
</div> </div>
<div v-else-if="item.prop === 'name'"> <div v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</div> </div>
<div v-else-if="item.prop === 'metaKey'"> <div v-else-if="item.prop === 'metaKey'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row[item.prop] || '-'}}</span> <template slot="copy-text">
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</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>
@@ -127,10 +130,11 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'assetLabelTable', name: 'assetLabelTable',
mixins: [table], mixins: [table],
components: { deleteButton }, components: { deleteButton, copy },
props: { props: {
loading: Boolean loading: Boolean
}, },

View File

@@ -111,10 +111,11 @@
<span v-else> - </span> <span v-else> - </span>
</template> </template>
<template v-else-if="item.prop === 'sn'"> <template v-else-if="item.prop === 'sn'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.sn ? scope.row.sn : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.sn" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.sn)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'talon'"> <template v-else-if="item.prop === 'talon'">
<div v-if="scope.row['clientState']===1"> <div v-if="scope.row['clientState']===1">

View File

@@ -53,16 +53,18 @@
<!-- </el-popover> --> <!-- </el-popover> -->
</span> </span>
<template v-else-if="item.prop === 'name'"> <template v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'host'"> <template v-else-if="item.prop === 'host'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
<template v-else>-</template> <template v-else>-</template>
@@ -128,6 +130,7 @@ import table from '@/components/common/mixin/table'
import { agent } from '@/components/common/js/constants' import { agent } from '@/components/common/js/constants'
import alertStateInfo from '@/components/common/alert/alertStateInfo' import alertStateInfo from '@/components/common/alert/alertStateInfo'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'agentTable', name: 'agentTable',
props: { props: {
@@ -135,7 +138,7 @@ export default {
}, },
mixins: [table], mixins: [table],
components: { components: {
alertStateInfo, deleteButton alertStateInfo, deleteButton, copy
}, },
data () { data () {
return { return {

View File

@@ -42,10 +42,11 @@
{{findTypeLabel(scope.row)}} {{findTypeLabel(scope.row)}}
</span> </span>
<template v-else-if="item.prop === 'name'"> <template v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span> <span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span>
<template v-else>-</template> <template v-else>-</template>
@@ -102,10 +103,11 @@
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import { chart as chartConstant } from '@/components/common/js/constants' import { chart as chartConstant } from '@/components/common/js/constants'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'chartTmplTable', name: 'chartTmplTable',
mixins: [table], mixins: [table],
components: { deleteButton }, components: { deleteButton, copy },
props: { props: {
loading: Boolean loading: Boolean
}, },

View File

@@ -42,10 +42,11 @@
<template v-else>-</template> <template v-else>-</template>
</template> </template>
<template v-if="item.prop === 'name'"> <template v-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<template v-if="item.prop === 'type'"> <template v-if="item.prop === 'type'">
<template v-if="scope.row.type"> <template v-if="scope.row.type">
@@ -114,12 +115,13 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'credentialsTable', name: 'credentialsTable',
props: { props: {
loading: Boolean loading: Boolean
}, },
components: { deleteButton }, components: { deleteButton, copy },
mixins: [table], mixins: [table],
data () { data () {
return { return {

View File

@@ -90,10 +90,11 @@
</span> </span>
</template> </template>
<template v-else-if="item.prop === 'name'"> <template v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </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>
@@ -152,11 +153,12 @@ import table from '@/components/common/mixin/table'
import { showTableTooltip, hideTableTooltip } from '@/components/common/js/tools' import { showTableTooltip, hideTableTooltip } from '@/components/common/js/tools'
import alertDaysInfo from '@/components/common/alert/alertDaysInfo' import alertDaysInfo from '@/components/common/alert/alertDaysInfo'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'dcTable', name: 'dcTable',
mixins: [table], mixins: [table],
components: { components: {
alertDaysInfo, deleteButton alertDaysInfo, deleteButton, copy
}, },
props: { props: {
loading: Boolean loading: Boolean

View File

@@ -36,16 +36,18 @@
</template> </template>
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<template v-if="item.prop === 'name'"> <template v-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'expression'"> <template v-else-if="item.prop === 'expression'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span> <span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span>
<template v-else>-</template> <template v-else>-</template>
@@ -99,10 +101,11 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'exprTmplTable', name: 'exprTmplTable',
mixins: [table], mixins: [table],
components: { deleteButton }, components: { deleteButton, copy },
props: { props: {
loading: Boolean loading: Boolean
}, },

View File

@@ -36,20 +36,22 @@
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<span v-if="item.prop === 'dc'">{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}</span> <span v-if="item.prop === 'dc'">{{scope.row[item.prop]?scope.row[item.prop].name:'-'}}</span>
<template v-else-if="item.prop === 'CIDR'"> <template v-else-if="item.prop === 'CIDR'">
<div class="document-copy-block"> <copy :copyData='scope.row.addr + "/" + scope.row.mask' :showInfo='scope.row.addr || scope.row.mask'>
<span class="document-copy-text">{{ scope.row.addr }}/{{scope.row.mask}}</span> <template slot="copy-text">
<i v-if="scope.row.addr || scope.row.mask" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.addr + '/' + scope.row.mask)" :title="$t('overall.copyText')"></i> {{ scope.row.addr }}/{{scope.row.mask}}
</div> </template>
</copy>
</template> </template>
<span v-else-if="item.prop === 'type'"> <span v-else-if="item.prop === 'type'">
<template v-if="scope.row.type === 4">IPV4</template> <template v-if="scope.row.type === 4">IPV4</template>
<template v-else-if="scope.row.type === 6">IPV6</template> <template v-else-if="scope.row.type === 6">IPV6</template>
</span> </span>
<template v-else-if="item.prop === 'name'"> <template v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
<span v-else>-</span> <span v-else>-</span>
@@ -105,11 +107,13 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'ipamTable', name: 'ipamTable',
mixins: [table], mixins: [table],
components: { components: {
deleteButton deleteButton,
copy
}, },
props: { props: {
loading: Boolean loading: Boolean

View File

@@ -43,10 +43,11 @@
</div> </div>
</template> </template>
<template v-else-if="item.prop === 'name'"> <template v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'modelsDetail' && scope.row['modelsDetail'] && scope.row['modelsDetail'].length >0" > <template v-else-if="item.prop === 'modelsDetail' && scope.row['modelsDetail'] && scope.row['modelsDetail'].length >0" >
<div style="height: 100%"> <div style="height: 100%">
@@ -129,11 +130,12 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
import axios from 'axios' import axios from 'axios'
export default { export default {
name: 'mibTable', name: 'mibTable',
mixins: [table], mixins: [table],
components: { deleteButton }, components: { deleteButton, copy },
props: { props: {
loading: Boolean loading: Boolean
}, },

View File

@@ -43,22 +43,25 @@
</template> </template>
</template> </template>
<template v-else-if="item.prop === 'name'"> <template v-else-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.name ? scope.row.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'brand'"> <template v-else-if="item.prop === 'brand'">
<div class="document-copy-block"> <copy :copyData='scope.row.brand.name' :showInfo='scope.row.brand.name'>
<span class="document-copy-text">{{scope.row.brand.name}}</span> <template slot="copy-text">
<i v-if="scope.row.brand.name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.brand.name)" :title="$t('overall.copyText')"></i> {{scope.row.brand.name}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'type'"> <template v-else-if="item.prop === 'type'">
<div class="document-copy-block"> <copy :copyData='scope.row.type.name' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row.type ? scope.row.type.name : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row.type" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.type.name)" :title="$t('overall.copyText')"></i> {{scope.row.type ? scope.row.type.name : '-'}}
</div> </template>
</copy>
</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'">
@@ -122,10 +125,11 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'modelTable', name: 'modelTable',
mixins: [table], mixins: [table],
components: { deleteButton }, components: { deleteButton, copy },
props: { props: {
loading: Boolean loading: Boolean
}, },

View File

@@ -38,19 +38,21 @@
</template> </template>
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<template v-if="item.prop === 'name'"> <template v-if="item.prop === 'name'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row[item.prop]}}</span> <template slot="copy-text">
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'type'"> <template v-else-if="item.prop === 'type'">
{{scope.row[item.prop]}} {{scope.row[item.prop]}}
</template> </template>
<template v-else-if="item.prop === 'project'"> <template v-else-if="item.prop === 'project'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop].name' :showInfo='scope.row[item.prop].name'>
<span class="document-copy-text">{{scope.row[item.prop].name}}</span> <template slot="copy-text">
<i v-if="scope.row[item.prop].name" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop].name)" :title="$t('overall.copyText')"></i> {{scope.row[item.prop].name}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="item.prop === 'endpointNum'"> <template v-else-if="item.prop === 'endpointNum'">
<span class="endpoint-num" @click="showBottomBox('endpoint', scope.row)"> <span class="endpoint-num" @click="showBottomBox('endpoint', scope.row)">
@@ -132,10 +134,11 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'moduleTable', name: 'moduleTable',
mixins: [table], mixins: [table],
components: { deleteButton }, components: { deleteButton, copy },
props: { props: {
loading: Boolean loading: Boolean
}, },

View File

@@ -39,6 +39,7 @@
</template> </template>
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<template v-if="item.prop === 'name'"> <template v-if="item.prop === 'name'">
<div class="document-copy-block"> <div class="document-copy-block">
<span class="document-copy-text">{{scope.row[item.prop]}}</span> <span class="document-copy-text">{{scope.row[item.prop]}}</span>
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i> <i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row.name)" :title="$t('overall.copyText')"></i>

View File

@@ -37,16 +37,18 @@
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<template v-if="item.prop === 'name'"> <template v-if="item.prop === 'name'">
<template v-if="scope.row.i18n"> <template v-if="scope.row.i18n">
<div class="document-copy-block"> <copy :copyData='$t(scope.row.i18n)' :showInfo='$t(scope.row.i18n)'>
<span class="document-copy-text">{{$t(scope.row.i18n)}}</span> <template slot="copy-text">
<i v-if="$t(scope.row.i18n)" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy($t(scope.row.i18n))" :title="$t('overall.copyText')"></i> {{$t(scope.row.i18n)}}
</div> </template>
</copy>
</template> </template>
<template v-else-if="scope.row.name"> <template v-else-if="scope.row.name">
<div class="document-copy-block"> <copy :copyData='$t(scope.row.name)' :showInfo='$t(scope.row.name)'>
<span class="document-copy-text">{{scope.row.name}}</span> <template slot="copy-text">
<i v-if="$t(scope.row.name)" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy($t(scope.row.name))" :title="$t('overall.copyText')"></i> {{scope.row.name}}
</div> </template>
</copy>
</template> </template>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
@@ -102,10 +104,11 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'roleTable', name: 'roleTable',
mixins: [table], mixins: [table],
components: { deleteButton }, components: { deleteButton, copy },
props: { props: {
loading: Boolean loading: Boolean
}, },

View File

@@ -79,10 +79,11 @@
<span v-else-if="scope.row[item.prop] === 'zh'">简体中文</span> <span v-else-if="scope.row[item.prop] === 'zh'">简体中文</span>
</template> </template>
<template v-else-if="item.prop === 'email'"> <template v-else-if="item.prop === 'email'">
<div class="document-copy-block"> <copy :copyData='scope.row[item.prop]' :showInfo='scope.row[item.prop]'>
<span class="document-copy-text">{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</span> <template slot="copy-text">
<i v-if="scope.row[item.prop]" class="nz-icon nz-icon-override" style="visibility: hidden" @click="onCopy(scope.row[item.prop])" :title="$t('overall.copyText')"></i> {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</div> </template>
</copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span>
<span v-else>-</span> <span v-else>-</span>
@@ -140,10 +141,11 @@
<script> <script>
import table from '@/components/common/mixin/table' import table from '@/components/common/mixin/table'
import deleteButton from '@/components/common/deleteButton' import deleteButton from '@/components/common/deleteButton'
import copy from '@/components/common/copy'
export default { export default {
name: 'userTable', name: 'userTable',
mixins: [table], mixins: [table],
components: { deleteButton }, components: { deleteButton, copy },
props: { props: {
loading: Boolean loading: Boolean
}, },