NEZ-1035 fix: group chart 编辑页面无法打开
This commit is contained in:
@@ -569,17 +569,18 @@ export default {
|
|||||||
return [x, y]
|
return [x, y]
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (self.pieData[0].data.length > 0) {
|
if (self.pieData[0]) {
|
||||||
getChart(self.chartIndex).clear()
|
if (self.pieData[0].data.length > 0) {
|
||||||
getChart(self.chartIndex).setOption(self.option)// 创建图表
|
getChart(self.chartIndex).clear()
|
||||||
self.noData = false
|
getChart(self.chartIndex).setOption(self.option)// 创建图表
|
||||||
} else {
|
self.noData = false
|
||||||
self.noData = true
|
} else {
|
||||||
self.option = chartConfig.getOption('noData')
|
self.noData = true
|
||||||
getChart(self.chartIndex).clear()
|
self.option = chartConfig.getOption('noData')
|
||||||
getChart(self.chartIndex).setOption(self.option)// 创建图表
|
getChart(self.chartIndex).clear()
|
||||||
|
getChart(self.chartIndex).setOption(self.option)// 创建图表
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.$refs['localLoading' + self.chartIndex].endLoading()
|
self.$refs['localLoading' + self.chartIndex].endLoading()
|
||||||
self.firstShow = true // 展示操作按键
|
self.firstShow = true // 展示操作按键
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export function nzNumber (rule, value, callback) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function noSpecialChar (rule, value, callback) {
|
export function noSpecialChar (rule, value, callback) {
|
||||||
const charReg = /\w+/
|
const charReg = /^[a-z0-9A-Z-]+$/
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (charReg.test(value)) {
|
if (charReg.test(value)) {
|
||||||
callback()
|
callback()
|
||||||
|
|||||||
@@ -579,6 +579,7 @@ const en = {
|
|||||||
usize: 'Must be number(1 - 47)',
|
usize: 'Must be number(1 - 47)',
|
||||||
fileSize: 'File exceed max size', // File exceed max size.
|
fileSize: 'File exceed max size', // File exceed max size.
|
||||||
port: 'Invalid port',
|
port: 'Invalid port',
|
||||||
|
special: 'Cannot contain special characters',
|
||||||
url: 'Invalid URL',
|
url: 'Invalid URL',
|
||||||
uSize: 'Must be number(1 - 47)',
|
uSize: 'Must be number(1 - 47)',
|
||||||
requiredIdc: 'dc is required',
|
requiredIdc: 'dc is required',
|
||||||
|
|||||||
@@ -653,8 +653,9 @@ export default {
|
|||||||
showAllBasicOption: false,
|
showAllBasicOption: false,
|
||||||
rules: {
|
rules: {
|
||||||
name: [
|
name: [
|
||||||
{ validator: this.optionType === 'batch' ? '' : noSpecialChar, trigger: 'change' },
|
{ required: true, message: this.$t('validate.required'), trigger: 'change' },
|
||||||
{ required: true, message: this.$t('validate.required'), trigger: 'change' }
|
{ validator: this.optionType === 'batch' ? '' : noSpecialChar, trigger: 'change' }
|
||||||
|
|
||||||
],
|
],
|
||||||
assetId: [
|
assetId: [
|
||||||
{ required: !(this.optionType === 'batch'), message: this.$t('validate.required'), trigger: 'change' }
|
{ required: !(this.optionType === 'batch'), message: this.$t('validate.required'), trigger: 'change' }
|
||||||
|
|||||||
Reference in New Issue
Block a user