NEZ-3351 feat:asset 列表页面增加 license status 列和查询条件
This commit is contained in:
@@ -30,3 +30,19 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.licenseStatus{
|
||||
padding: 20px 15px;
|
||||
background: $--background-color-empty;
|
||||
border-radius: 3px;
|
||||
transform: translate(-40px,20px);
|
||||
.licenseStatus-title{
|
||||
color: $--color-text-regular;
|
||||
}
|
||||
.licenseStatus-date{
|
||||
color: $--color-text-primary;
|
||||
i{
|
||||
color: $--color-primary;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -989,6 +989,8 @@ export default {
|
||||
objectInfo.priority = val.valnum
|
||||
} else if (val.label === 'dashboardVarType') {
|
||||
objectInfo.varType = val.valnum
|
||||
} else if (val.label === 'licenseStatus') {
|
||||
objectInfo.licenseStatus = val.valnum
|
||||
} else if (typeof (val.valnum) === 'undefined' || val.valnum == '') {
|
||||
this.selectInfoList[val.label].forEach(item => {
|
||||
if (item.label === val.val) {
|
||||
@@ -1069,7 +1071,7 @@ export default {
|
||||
localStorage.setItem('nz-history-' + this.where, JSON.stringify(this.historyList))
|
||||
} else {
|
||||
this.historyList = JSON.parse(localStorage.getItem('nz-history-' + this.where))
|
||||
const findIndex = this.historyList.findIndex(item=> JSON.stringify(item) == JSON.stringify(this.select_list))
|
||||
const findIndex = this.historyList.findIndex(item => JSON.stringify(item) == JSON.stringify(this.select_list))
|
||||
if (findIndex !== -1) {
|
||||
this.historyList.splice(findIndex, 1)
|
||||
}
|
||||
|
||||
@@ -399,6 +399,15 @@ export default {
|
||||
value: 3,
|
||||
label: i18n.t('issue.low')
|
||||
}
|
||||
],
|
||||
licenseStatus: [
|
||||
{
|
||||
value: 1,
|
||||
label: i18n.t('licenseMange.licensed')
|
||||
}, {
|
||||
value: 0,
|
||||
label: i18n.t('licenseMange.notLicensed')
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -140,14 +140,52 @@
|
||||
</template>
|
||||
<template v-else-if="item.prop === 'brand'">{{scope.row.brand ? scope.row.brand.name : '-'}}</template>
|
||||
<template v-else-if="item.prop === 'purchaseDate'">{{scope.row.purchaseDate ? scope.row.purchaseDate : '-'}}</template>
|
||||
<!-- license -->
|
||||
<template v-else-if="item.prop === 'license'">
|
||||
<el-popover
|
||||
placement="right-start"
|
||||
trigger="hover"
|
||||
:open-delay="300"
|
||||
popper-class="licenseStatus nz-tooltip-bac"
|
||||
:disabled="!(scope.row.license&&scope.row.license.status==1)"
|
||||
>
|
||||
<div>
|
||||
<!-- dateIssued -->
|
||||
<div class="licenseStatus-title" style="margin-bottom:5px;">{{$t('licenseMange.dateIssue')}}</div>
|
||||
<div class="licenseStatus-date">
|
||||
<i class="nz-icon nz-icon-date margin-r-5"/>
|
||||
<span>{{ scope.row.license&&scope.row.license.dateIssued ? momentTz(scope.row.license.dateIssued ) : '-'}}</span>
|
||||
</div>
|
||||
<!-- dateExpires -->
|
||||
<div class="licenseStatus-title" style="margin-top:10px;margin-bottom:5px;">{{$t('licenseMange.dateExpire')}}</div>
|
||||
<div class="licenseStatus-date">
|
||||
<i class="nz-icon nz-icon-date margin-r-5"/>
|
||||
<span v-if="scope.row.license && scope.row.license.dateExpires == -1">{{$t('license.permanent')}}</span>
|
||||
<span v-else>{{ scope.row.license && scope.row.license.dateExpires ? momentTz(scope.row.license.dateExpires ) : '-'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- status -->
|
||||
<div slot="reference">
|
||||
<div v-if="scope.row.license&&scope.row.license.status == 1">
|
||||
<i class="nz-icon nz-icon-import-success1" style="color:#8dcb4b;"></i>
|
||||
<span>{{$t('licenseMange.licensed')}}</span>
|
||||
</div>
|
||||
<div v-if="scope.row.license&&scope.row.license.status == 0">
|
||||
<i class="nz-icon nz-icon-stop" style="color:#bebebe;"></i>
|
||||
<span>{{$t('licenseMange.notLicensed')}}</span>
|
||||
</div>
|
||||
<div v-else>-</div>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
<span v-else-if="item.prop === 'id'" :id="'globalSearch' + scope.row.id">{{scope.row[item.prop]}}</span>
|
||||
<template v-else>
|
||||
<span v-if="scope.row.fields&&scope.row.fields.find(field => field.name === item.prop)">
|
||||
{{scope.row.fields.find(field => field.name === item.prop).value.join(',')}}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{scope.row[item.prop]}}
|
||||
</span>
|
||||
<span v-if="scope.row.fields&&scope.row.fields.find(field => field.name === item.prop)">
|
||||
{{scope.row.fields.find(field => field.name === item.prop).value.join(',')}}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{scope.row[item.prop]}}
|
||||
</span>
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -324,6 +362,11 @@ export default {
|
||||
prop: 'purchaseDate',
|
||||
show: false,
|
||||
minWidth: 120
|
||||
}, {
|
||||
label: this.$t('licenseMange.licenseStatus'),
|
||||
prop: 'license',
|
||||
minWidth: 150,
|
||||
show: true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -67,16 +67,19 @@
|
||||
<span v-else>--</span>
|
||||
</div>
|
||||
</template>
|
||||
<span v-else-if="item.prop === 'dateIssued' || item.prop === 'dateExpires'">{{ scope.row[item.prop] ? momentTz(scope.row[item.prop] ) : '-'}}</span>
|
||||
<span v-else-if="item.prop === 'dateIssued' || item.prop === 'dateExpires'">
|
||||
<span v-if="scope.row[item.prop] == -1">{{$t('license.permanent')}}</span>
|
||||
<span v-else>{{ scope.row[item.prop] ? momentTz(scope.row[item.prop] ) : '-'}}</span>
|
||||
</span>
|
||||
<!-- status -->
|
||||
<template v-else-if="item.prop === 'status'">
|
||||
<div v-if="scope.row.status == 1">
|
||||
<i class="nz-icon nz-icon-import-success1" style="color:#8dcb4b;"></i>
|
||||
<span>{{$t('licenseMange.licensed')}}</span>
|
||||
</div>
|
||||
<div v-else-if="scope.row.status == 2">
|
||||
<div v-else-if="scope.row.status == 0">
|
||||
<i class="nz-icon nz-icon-stop" style="color:#bebebe;"></i>
|
||||
<span>{{ $t('licenseMange.notLicensed') }}</span>
|
||||
<span>{{$t('licenseMange.notLicensed')}}</span>
|
||||
</div>
|
||||
<div v-else>-</div>
|
||||
</template>
|
||||
@@ -194,7 +197,7 @@ export default {
|
||||
}, {
|
||||
label: this.$t('licenseMange.licenseStatus'),
|
||||
prop: 'status',
|
||||
minWidth: 200,
|
||||
minWidth: 150,
|
||||
show: true
|
||||
}, {
|
||||
label: this.$t('licenseMange.concurrency'),
|
||||
|
||||
@@ -336,6 +336,12 @@ export default {
|
||||
type: 'input',
|
||||
label: 'comment',
|
||||
disabled: false
|
||||
}, {
|
||||
name: this.$t('licenseMange.licenseStatus'),
|
||||
type: 'select',
|
||||
label: 'licenseStatus',
|
||||
readonly: true,
|
||||
disabled: false
|
||||
}]
|
||||
},
|
||||
|
||||
@@ -997,6 +1003,22 @@ export default {
|
||||
},
|
||||
jsonKey: 'val'
|
||||
},
|
||||
licenseStatus: {
|
||||
target: this.searchLabel,
|
||||
isSearchInput: true,
|
||||
propertyName: 'licenseStatus',
|
||||
type: 'string',
|
||||
defaultJson: {
|
||||
disabled: false,
|
||||
label: 'licenseStatus',
|
||||
name: 'licenseStatus',
|
||||
readonly: true,
|
||||
type: 'select',
|
||||
val: '',
|
||||
listStr: 'licenseStatus'
|
||||
},
|
||||
jsonKey: 'valnum'
|
||||
},
|
||||
dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||
typeIds: { target: this.searchCheckBox, propertyName: 'typeIds', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||
ping: { target: this.searchCheckBox, propertyName: 'ping', type: 'string', target2: this.selectValue, type2: 'array' },
|
||||
|
||||
Reference in New Issue
Block a user