NEZ-1422 feat: 新增字段,完善Date Expires,license_type=trial
This commit is contained in:
@@ -322,7 +322,6 @@
|
|||||||
border: 1px solid $--border-color-light;
|
border: 1px solid $--border-color-light;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
width: 700px;
|
width: 700px;
|
||||||
height: 370px;
|
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
.license-left {
|
.license-left {
|
||||||
@@ -412,7 +411,6 @@
|
|||||||
}
|
}
|
||||||
.license-left-body {
|
.license-left-body {
|
||||||
margin-left: 40px;
|
margin-left: 40px;
|
||||||
min-height: 280px;
|
|
||||||
.license-left-boyd-title {
|
.license-left-boyd-title {
|
||||||
font-family: Roboto-Medium;
|
font-family: Roboto-Medium;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@@ -429,7 +427,7 @@
|
|||||||
letter-spacing: 0;
|
letter-spacing: 0;
|
||||||
line-height: 22px;
|
line-height: 22px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
margin: 15px 0 25px 10px;
|
margin: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.license-left-footer {
|
.license-left-footer {
|
||||||
|
|||||||
@@ -81,12 +81,14 @@ export default {
|
|||||||
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
|
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
|
||||||
this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize)
|
this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize)
|
||||||
this.tools.loading = true
|
this.tools.loading = true
|
||||||
|
if (this.$route.fullPath.match(/\/(\S*)\?/)[1] !== 'snmp' || this.$route.fullPath.match(/\/(\S*)\?/)[1] !== 'template') {
|
||||||
const dataListParam = {
|
const dataListParam = {
|
||||||
...this.searchLabel,
|
...this.searchLabel,
|
||||||
...this.searchCheckBox
|
...this.searchCheckBox
|
||||||
}
|
}
|
||||||
const path = this.$route.fullPath.match(/\/(\S*)\?/)[1]
|
const path = this.$route.fullPath.match(/\/(\S*)\?/)[1]
|
||||||
this.updatePath(dataListParam, path)
|
this.updatePath(dataListParam, path)
|
||||||
|
}
|
||||||
this.$get(this.url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => {
|
this.$get(this.url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => {
|
||||||
this.tools.loading = false
|
this.tools.loading = false
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
@@ -376,55 +378,6 @@ export default {
|
|||||||
jsonKey: 'val'
|
jsonKey: 'val'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (path === 'template') {
|
|
||||||
searchKeys = {
|
|
||||||
// key: path 键
|
|
||||||
// value: vue set 参数
|
|
||||||
pageNo: { target: this.pageObj, propertyName: 'pageNo', type: 'number' },
|
|
||||||
pageSize: { target: this.pageObj, propertyName: 'pageSize', type: 'number' },
|
|
||||||
orderBy: { target: this.$data, propertyName: 'orderBy', type: 'string' },
|
|
||||||
ids: {
|
|
||||||
target: this.searchLabel,
|
|
||||||
propertyName: 'ids',
|
|
||||||
type: 'string',
|
|
||||||
defaultJson: {
|
|
||||||
disabled: false,
|
|
||||||
id: 'ids',
|
|
||||||
label: 'ids',
|
|
||||||
name: 'ID',
|
|
||||||
type: 'input',
|
|
||||||
val: ''
|
|
||||||
},
|
|
||||||
jsonKey: 'val'
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
target: this.searchLabel,
|
|
||||||
propertyName: 'name',
|
|
||||||
type: 'string',
|
|
||||||
defaultJson: {
|
|
||||||
disabled: false,
|
|
||||||
id: 'name',
|
|
||||||
label: 'name',
|
|
||||||
name: 'Name',
|
|
||||||
type: 'input',
|
|
||||||
val: ''
|
|
||||||
},
|
|
||||||
jsonKey: 'val'
|
|
||||||
},
|
|
||||||
gname: {
|
|
||||||
target: this.searchLabel,
|
|
||||||
propertyName: 'gname',
|
|
||||||
type: 'string',
|
|
||||||
defaultJson: {
|
|
||||||
disabled: false,
|
|
||||||
label: 'gname',
|
|
||||||
name: 'Group',
|
|
||||||
type: 'input',
|
|
||||||
val: ''
|
|
||||||
},
|
|
||||||
jsonKey: 'val'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (path === 'i18n') {
|
} else if (path === 'i18n') {
|
||||||
searchKeys = {
|
searchKeys = {
|
||||||
// key: path 键
|
// key: path 键
|
||||||
@@ -536,7 +489,7 @@ export default {
|
|||||||
jsonKey: 'val'
|
jsonKey: 'val'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (path === 'operationLog' || path === 'profile') {
|
} else if (path === 'operationLog') {
|
||||||
searchKeys = {
|
searchKeys = {
|
||||||
// key: path 键
|
// key: path 键
|
||||||
// value: vue set 参数
|
// value: vue set 参数
|
||||||
|
|||||||
@@ -12,14 +12,19 @@ export default {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.setSearchInput(val, qv)
|
this.setSearchInput(val, qv)
|
||||||
}, 200)
|
}, 200)
|
||||||
console.log()
|
|
||||||
qv && this.$set(val.target, val.propertyName, qv)
|
qv && this.$set(val.target, val.propertyName, qv)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 更新path,包含请求参数
|
// 更新path,包含请求参数
|
||||||
updatePath (param, path) {
|
updatePath (param, path) {
|
||||||
console.log(param)
|
console.log(param)
|
||||||
this.$router.replace({ path: path, query: param }).catch(err => {})
|
const params = lodash.cloneDeep(param)
|
||||||
|
Object.keys(params).forEach(key => {
|
||||||
|
if (!params[key]) {
|
||||||
|
delete params[key]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.$router.replace({ path: path, query: params }).catch(err => {})
|
||||||
},
|
},
|
||||||
setSearchInput (val, qv) {
|
setSearchInput (val, qv) {
|
||||||
let dataList = ''
|
let dataList = ''
|
||||||
@@ -35,7 +40,6 @@ export default {
|
|||||||
console.log(obj[val.jsonKey])
|
console.log(obj[val.jsonKey])
|
||||||
if (val.strKey) {
|
if (val.strKey) {
|
||||||
this.$refs[dataList].$refs.searchInput[val.listStr].map((e) => {
|
this.$refs[dataList].$refs.searchInput[val.listStr].map((e) => {
|
||||||
console.log(e)
|
|
||||||
obj[val.strKey] = e.name
|
obj[val.strKey] = e.name
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -401,7 +401,6 @@ export default {
|
|||||||
target: this.searchLabel,
|
target: this.searchLabel,
|
||||||
propertyName: 'name',
|
propertyName: 'name',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
|
||||||
defaultJson: {
|
defaultJson: {
|
||||||
disabled: false,
|
disabled: false,
|
||||||
id: 2,
|
id: 2,
|
||||||
@@ -413,9 +412,6 @@ export default {
|
|||||||
jsonKey: 'val'
|
jsonKey: 'val'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Object.keys(this.$route.query).forEach(key => {
|
|
||||||
this.$set(searchKeys[key].target, key, this.$route.query[key])
|
|
||||||
})
|
|
||||||
this.initQueryFromPath(searchKeys)
|
this.initQueryFromPath(searchKeys)
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted () {
|
||||||
|
|||||||
@@ -163,12 +163,12 @@ export default {
|
|||||||
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
|
this.$set(this.searchLabel, 'pageNo', this.pageObj.pageNo)
|
||||||
this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize)
|
this.$set(this.searchLabel, 'pageSize', this.pageObj.pageSize)
|
||||||
this.tools.loading = true
|
this.tools.loading = true
|
||||||
const assetParam = {
|
const alertRuleParam = {
|
||||||
...this.searchLabel,
|
...this.searchLabel,
|
||||||
...this.searchCheckBox
|
...this.searchCheckBox
|
||||||
}
|
}
|
||||||
const path = this.fromRoute.alertSilence
|
const path = this.fromRoute.alertSilence
|
||||||
this.updatePath(assetParam, path)
|
this.updatePath(alertRuleParam, path)
|
||||||
this.$get(this.url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => {
|
this.$get(this.url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => {
|
||||||
this.tools.loading = false
|
this.tools.loading = false
|
||||||
this.nowTime = this.utcTimeToTimezoneStr(response.time)
|
this.nowTime = this.utcTimeToTimezoneStr(response.time)
|
||||||
|
|||||||
@@ -839,7 +839,12 @@ export default {
|
|||||||
val: ''
|
val: ''
|
||||||
},
|
},
|
||||||
jsonKey: 'val'
|
jsonKey: 'val'
|
||||||
}
|
},
|
||||||
|
dcIds: { target: this.searchCheckBox, propertyName: 'dcIds', type: 'string' },
|
||||||
|
fields: { target: this.searchCheckBox, propertyName: 'fields', type: 'json' },
|
||||||
|
ping: { target: this.searchCheckBox, propertyName: 'ping', type: 'string' },
|
||||||
|
modelIds: { target: this.searchCheckBox, propertyName: 'modelIds', type: 'string' },
|
||||||
|
typeIds: { target: this.searchCheckBox, propertyName: 'typeIds', type: 'string' }
|
||||||
}
|
}
|
||||||
this.initQueryFromPath(searchKeys)
|
this.initQueryFromPath(searchKeys)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -15,8 +15,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="license-left-body">
|
<div class="license-left-body">
|
||||||
<div>
|
<div>
|
||||||
<div class="license-left-boyd-title" style="margin-top: 25px">{{$t('license.id')}}</div>
|
<div class="license-left-boyd-title" style="margin-top: 25px">{{$t('license.type')}}</div>
|
||||||
<div class="license-left-boyd-value">{{ licenseList.id ? licenseList.id : '-'}}</div>
|
<div class="license-left-boyd-value">{{ licenseMark.type ? licenseMark.type : '-'}}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="license-left-boyd-title">{{$t('license.organization')}}</div>
|
||||||
|
<div class="license-left-boyd-value">{{ licenseMark.organization ? licenseMark.organization : '-'}}</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div class="license-left-boyd-title">{{$t('license.id')}}</div>
|
||||||
|
<div class="license-left-boyd-value">{{ licenseMark.supportID ? licenseMark.supportID : '-'}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="license-left-boyd-title">{{$t('license.proDate')}}</div>
|
<div class="license-left-boyd-title">{{$t('license.proDate')}}</div>
|
||||||
@@ -27,11 +35,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="license-left-boyd-title">{{$t('license.expDate')}}</div>
|
<div class="license-left-boyd-title">{{$t('license.expDate')}}</div>
|
||||||
<div class="license-left-boyd-value" style="margin: 15px">
|
<div class="license-left-boyd-value">
|
||||||
<span v-if="expData.id === '20001' && expData.license.license_type === 'expiration'">{{formatDate(expData.license.exp_date)}}</span>
|
<span v-if="expData.id === '20001' && expData.license.license_type === 'expiration'">{{formatDate(expData.license.exp_date)}}</span>
|
||||||
<span v-else-if="expData.id === '20001' && expData.license.license_type === 'perpetual'">{{$t('license.permanent')}}</span>
|
<span v-else-if="expData.id === '20001' && expData.license.license_type === 'perpetual'">{{$t('license.permanent')}}</span>
|
||||||
<!-- <span v-else-if="expData.id === '20001' && expData.license.license_type === 'trial'">{{$t('license.validPeriod')}}: {{formatDate(time_start)}} ~ {{ formatDate(end_time(time_start + total_time))}}</span>-->
|
<span v-else-if="expData.id === '20001' && expData.license.license_type === 'trial'">{{formatDate(this.stateItem)}} ~ {{ formatDate(this.endItem)}}</span>
|
||||||
<!-- <span>{{$t('license.validPeriod')}} : {{formatDate(expData.license.time_start)}} ~ {{formatDate(expData.license.end_time)}}</span>-->
|
|
||||||
<span v-else>-</span>
|
<span v-else>-</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -93,6 +100,7 @@ export default {
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
licenseList: {},
|
licenseList: {},
|
||||||
|
licenseMark: {},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableTitle: [
|
tableTitle: [
|
||||||
{
|
{
|
||||||
@@ -108,17 +116,22 @@ export default {
|
|||||||
uploadFileList: [],
|
uploadFileList: [],
|
||||||
uploadFile: { file: '' },
|
uploadFile: { file: '' },
|
||||||
active: 0,
|
active: 0,
|
||||||
loading: true
|
loading: true,
|
||||||
|
stateItem: '',
|
||||||
|
endItem: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
licenseGetData () {
|
licenseGetData () {
|
||||||
this.$get('/sys/license/detail').then(res => {
|
this.$get('/sys/license/detail').then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
this.licenseMark = res.data.license
|
||||||
this.licenseList = res.data.license.hasp
|
this.licenseList = res.data.license.hasp
|
||||||
this.licenseList.feature.map(e => {
|
this.licenseList.feature.map(e => {
|
||||||
if (e.id === '20001') {
|
if (e.id === '20001') {
|
||||||
this.expData = e
|
this.expData = e
|
||||||
|
this.stateItem = e.time_start
|
||||||
|
this.endItem = e.end_time * 1 + e.time_start * 1
|
||||||
// this.expData.license.end_time = this.expData.license.time_start * 1 + this.expData.license.total_time * 1
|
// this.expData.license.end_time = this.expData.license.time_start * 1 + this.expData.license.total_time * 1
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -302,7 +302,6 @@ export default {
|
|||||||
name: 'Protocol',
|
name: 'Protocol',
|
||||||
readonly: true,
|
readonly: true,
|
||||||
type: 'selectString',
|
type: 'selectString',
|
||||||
|
|
||||||
val: ''
|
val: ''
|
||||||
},
|
},
|
||||||
jsonKey: 'val'
|
jsonKey: 'val'
|
||||||
|
|||||||
@@ -158,10 +158,12 @@ import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
|
|||||||
import { fromRoute } from '@/components/common/js/constants'
|
import { fromRoute } from '@/components/common/js/constants'
|
||||||
import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
|
import { randomcolor } from '@/components/common/js/radomcolor/randomcolor'
|
||||||
import { lineChartMove } from '@/components/common/js/common'
|
import { lineChartMove } from '@/components/common/js/common'
|
||||||
|
import routerPathParams from '@/components/common/mixin/routerPathParams'
|
||||||
// import chartData from './testData'
|
// import chartData from './testData'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'panel',
|
name: 'panel',
|
||||||
|
mixins: [routerPathParams],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
fromRoute,
|
fromRoute,
|
||||||
@@ -312,8 +314,14 @@ export default {
|
|||||||
this.showPanel = val
|
this.showPanel = val
|
||||||
this.showPanel.type = 'dashboard'
|
this.showPanel.type = 'dashboard'
|
||||||
this.filter.panelId = this.showPanel.id
|
this.filter.panelId = this.showPanel.id
|
||||||
|
this.panelId = this.showPanel.id
|
||||||
|
const param = {
|
||||||
|
panelId: this.panelId
|
||||||
|
}
|
||||||
// this.dateChange()
|
// this.dateChange()
|
||||||
// this.getTableData()
|
// this.getTableData()
|
||||||
|
const path = this.fromRoute.panel
|
||||||
|
this.updatePath(param, path)
|
||||||
this.getData(this.filter)
|
this.getData(this.filter)
|
||||||
this.$refs.chartList.cleanData()
|
this.$refs.chartList.cleanData()
|
||||||
},
|
},
|
||||||
@@ -600,7 +608,6 @@ export default {
|
|||||||
|
|
||||||
getTableData (clearShowPanel) {
|
getTableData (clearShowPanel) {
|
||||||
const vm = this
|
const vm = this
|
||||||
|
|
||||||
this.$get('visual/panel?type=dashboard&pageSize=-1').then(response => {
|
this.$get('visual/panel?type=dashboard&pageSize=-1').then(response => {
|
||||||
if (response.code === 200) {
|
if (response.code === 200) {
|
||||||
this.panelData = response.data.list
|
this.panelData = response.data.list
|
||||||
@@ -785,6 +792,16 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
const searchKeys = {
|
||||||
|
// key: path 键
|
||||||
|
// value: vue set 参数
|
||||||
|
panelId: { target: this, propertyName: 'panelId', type: 'number' }
|
||||||
|
}
|
||||||
|
setTimeout(() => {
|
||||||
|
this.showPanel.id = this.panelId
|
||||||
|
this.filter.panelId = this.panelId
|
||||||
|
})
|
||||||
|
this.initQueryFromPath(searchKeys)
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
this.$store.dispatch('dispatchPanelTime', {
|
this.$store.dispatch('dispatchPanelTime', {
|
||||||
time: this.searchTime,
|
time: this.searchTime,
|
||||||
|
|||||||
Reference in New Issue
Block a user