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