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