Merge branch 'dev-3.3' of git.mesalab.cn:nezha/nezha-fronted into dev-3.3
This commit is contained in:
@@ -54,14 +54,14 @@ export default {
|
||||
|
||||
},
|
||||
initChart () {
|
||||
setTimeout(() => {
|
||||
this.dataList = this.dataList.map(item => {
|
||||
return {
|
||||
...item
|
||||
// hide: item.name.indexOf(this.filter.searchName) === -1, // 搜索条件
|
||||
}
|
||||
})
|
||||
}, 100)
|
||||
// setTimeout(() => {
|
||||
// this.dataList = this.dataList.map(item => {
|
||||
// return {
|
||||
// ...item
|
||||
// // hide: item.name.indexOf(this.filter.searchName) === -1, // 搜索条件
|
||||
// }
|
||||
// })
|
||||
// }, 100)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
||||
@@ -582,6 +582,9 @@ export default {
|
||||
this.$emit('showFullscreen', show, this.chartInfo)
|
||||
},
|
||||
groupShow (flag) {
|
||||
if (this.chartInfo.type === 'group' && !flag) {
|
||||
this.chartData = lodash.get(this, 'chartInfo.children', [])
|
||||
}
|
||||
this.chartInfo.param.collapse = flag
|
||||
this.groupInit()
|
||||
bus.$emit('groupMove', '', '', true)
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import bus from '@/libs/bus'
|
||||
export default {
|
||||
name: 'deleteButton',
|
||||
props: {
|
||||
@@ -44,6 +45,7 @@ export default {
|
||||
if (response.code === 200) {
|
||||
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
|
||||
this.$emit('after')
|
||||
bus.$emit('delTableRow', this.deleteObjs.map(item => item.id))
|
||||
} else {
|
||||
this.$message.error(response.msg)
|
||||
}
|
||||
|
||||
@@ -71,7 +71,13 @@ const newcn = {
|
||||
talon: {
|
||||
enable: '启用'
|
||||
}
|
||||
|
||||
},
|
||||
validate: {
|
||||
required: '必填项',
|
||||
host: '不合法的IP',
|
||||
number: '必须是数字',
|
||||
port: '不合法的端口',
|
||||
special: '不能包含特殊字符'
|
||||
},
|
||||
profile: {
|
||||
username: '用户名'
|
||||
|
||||
@@ -80,6 +80,13 @@ const newen = {
|
||||
enable: 'Enable'
|
||||
}
|
||||
},
|
||||
validate: {
|
||||
required: 'Required',
|
||||
host: 'Invalid Host',
|
||||
number: 'Numberic',
|
||||
port: 'Invalid port',
|
||||
special: 'Cannot contain special characters'
|
||||
},
|
||||
profile: {
|
||||
username: 'User name'
|
||||
},
|
||||
|
||||
@@ -161,6 +161,7 @@ export default {
|
||||
self.delFlag = true
|
||||
this.$message({ duration: 2000, type: 'success', message: this.$t('tip.deleteSuccess') })
|
||||
self.getTableData()
|
||||
bus.$emit('delTableRow', [row.id])
|
||||
} else {
|
||||
this.$message.error(response.msg)
|
||||
}
|
||||
@@ -354,6 +355,8 @@ export default {
|
||||
}
|
||||
if (this.$route.query.orderBy && !this.isSubList) {
|
||||
this.orderBy = this.$route.query.orderBy
|
||||
} else if (this.isSubList) {
|
||||
return
|
||||
}
|
||||
let searchKeys = {}
|
||||
if (path === 'dc') {
|
||||
|
||||
@@ -244,7 +244,7 @@ export default {
|
||||
tempEndpoint: {},
|
||||
tempEndpoint2: {},
|
||||
assetLoading: true,
|
||||
rightBox: { show: false, title: this.$t('overall.createEndpoin'), isEdit: false },
|
||||
rightBox: { show: false, title: this.$t('overall.createEndpoint'), isEdit: false },
|
||||
optionType: 'batch',
|
||||
blankEndpoint: {
|
||||
id: '',
|
||||
|
||||
@@ -268,7 +268,7 @@ export default {
|
||||
tempEndpoint: {},
|
||||
tempEndpoint2: {},
|
||||
assetLoading: true,
|
||||
rightBox: { show: false, title: this.$t('overall.createEndpoin'), isEdit: false },
|
||||
rightBox: { show: false, title: this.$t('overall.createEndpoint'), isEdit: false },
|
||||
optionType: 'batchAdd',
|
||||
endpointTableTitle: [ // 原始table列
|
||||
{
|
||||
|
||||
@@ -157,7 +157,7 @@ export default {
|
||||
tempEndpoint: {},
|
||||
tempEndpoint2: {},
|
||||
assetLoading: true,
|
||||
rightBox: { show: false, title: this.$t('overall.createEndpoin'), isEdit: false },
|
||||
rightBox: { show: false, title: this.$t('overall.createEndpoint'), isEdit: false },
|
||||
blankEndpoint: {
|
||||
id: '',
|
||||
projectId: '',
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
{{ $t("project.module.batchEndpoint")}}
|
||||
</span>
|
||||
<span v-if="optionType === 'add'">
|
||||
{{ $t("overall.createEndpoin")}}
|
||||
{{ $t("overall.createEndpoint")}}
|
||||
</span>
|
||||
<span v-if="optionType === 'batchAdd'">
|
||||
{{ $t("overall.createEndpoin")}}
|
||||
{{ $t("overall.createEndpoint")}}
|
||||
</span>
|
||||
</div>
|
||||
<!-- end--标题-->
|
||||
|
||||
@@ -104,6 +104,7 @@ import { fromRoute } from '@/components/common/js/constants'
|
||||
import bottomBox from '@/components/common/bottomBox/bottomBox'
|
||||
import { bottomBoxWindow } from '@/components/common/js/tools'
|
||||
import panelChart from '@/components/chart/panelChart'
|
||||
import bus from '@/libs/bus'
|
||||
export default {
|
||||
name: 'nzDataList',
|
||||
components: {
|
||||
@@ -154,7 +155,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
sign:'',
|
||||
sign: '',
|
||||
fromRoute: fromRoute,
|
||||
/* 二级页面相关 */
|
||||
bottomBox: {
|
||||
@@ -175,7 +176,23 @@ export default {
|
||||
timeRange: [new Date(), new Date()]
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
bus.$on('delTableRow', this.delTableRow)
|
||||
},
|
||||
methods: {
|
||||
delTableRow (ids) { // 接收一个 删除的id数组 判断当前底部弹窗id 是否包含 包含则关闭当前弹窗
|
||||
if (ids.indexOf(this.bottomBox.object.id) !== -1) {
|
||||
this.bottomBox = {
|
||||
object: {},
|
||||
mainResizeShow: true, // dom高度改变时是否展示|隐藏
|
||||
subResizeShow: true,
|
||||
isFullScreen: false, // 全屏状态
|
||||
showSubList: false, // 是否显示二级列表
|
||||
targetTab: '', // 显示二级列表中的哪个页签
|
||||
inTransform: false // 搜索框相关,搜索条件下拉框是否在transform里
|
||||
}
|
||||
}
|
||||
},
|
||||
updateCustomTableTitle (custom) {
|
||||
this.$emit('update:customTableTitle', custom)
|
||||
},
|
||||
@@ -225,6 +242,9 @@ export default {
|
||||
this.showLayout = [...n]
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeDestroy () {
|
||||
bus.$off('delTableRow', this.delTableRow)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -92,9 +92,9 @@
|
||||
class="date-range-history-item"
|
||||
@click="historyChange(item)"
|
||||
>
|
||||
{{ timeFormate(item.start) }}
|
||||
{{ momentTz(item.start) }}
|
||||
{{ $t("dashboard.panel.to") }}
|
||||
{{ timeFormate(item.end) }}
|
||||
{{ momentTz(item.end) }}
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -340,8 +340,8 @@ export default {
|
||||
}
|
||||
this.isCustom = true
|
||||
this.rangeHistory.unshift({
|
||||
start: item[0],
|
||||
end: item[1]
|
||||
start: this.momentStrToTimestamp(item[0]),
|
||||
end: this.momentStrToTimestamp(item[1])
|
||||
})
|
||||
localStorage.setItem(
|
||||
'date-range-history' + this.sign,
|
||||
|
||||
@@ -447,6 +447,39 @@ export default {
|
||||
changeLocal: function (local) {
|
||||
this.language = local
|
||||
this.$i18n.locale = local
|
||||
this.setRules()
|
||||
},
|
||||
setRules () {
|
||||
this.dbRules = {
|
||||
host: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{ validator: host, trigger: 'blur' }
|
||||
],
|
||||
port: [{ validator: port, trigger: 'blur' }],
|
||||
name: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
username: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
||||
}
|
||||
this.redisRules = {
|
||||
host: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('validate.required'),
|
||||
trigger: 'blur'
|
||||
},
|
||||
{ validator: host, trigger: 'blur' }
|
||||
],
|
||||
port: [{ validator: port, trigger: 'blur' }]
|
||||
}
|
||||
this.sysRules = {
|
||||
username: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
pin: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }],
|
||||
haVip: [{ required: true, message: this.$t('validate.required'), trigger: 'blur' }]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user