fix:修改编辑不显示用户引导 以及打包 将模板打入zip

This commit is contained in:
zhangyu
2022-06-10 15:40:33 +08:00
parent 3068c0444a
commit cbdbe4bf32
6 changed files with 14 additions and 7 deletions

View File

@@ -104,7 +104,6 @@ if (arg === 'html' || devStart === 'dev:html') {
baseConfig.module.rules.unshift({ baseConfig.module.rules.unshift({
include: [ include: [
resolve('src/entrance/app'), resolve('src/entrance/app'),
resolve('src/components/common/alert'),
resolve('src/components/common/bottomBox'), resolve('src/components/common/bottomBox'),
resolve('src/components/common/detailView'), resolve('src/components/common/detailView'),
resolve('src/components/common/elSelect'), resolve('src/components/common/elSelect'),

View File

@@ -312,7 +312,8 @@ if (process.env.NODE_ENV == 'development') {
onEnd: [ onEnd: [
{ {
move: [ move: [
{ source: path.join(__dirname, '../dist', '/static/config.json'), destination: path.join(__dirname, '../dist/config.json') } { source: path.join(__dirname, '../dist', '/static/config.json'), destination: path.join(__dirname, '../dist/config.json') },
{ source: path.join(__dirname, '../exportHtml', '/exportHtml.html'), destination: path.join(__dirname, '../dist/exportHtml.html') }
], ],
mkdir: [ mkdir: [
@@ -345,7 +346,8 @@ if (process.env.NODE_ENV == 'development') {
onEnd: [ onEnd: [
{ {
move: [ move: [
{ source: path.join(__dirname, '../dist', '/static/config.json'), destination: path.join(__dirname, '../dist/config.json') } { source: path.join(__dirname, '../dist', '/static/config.json'), destination: path.join(__dirname, '../dist/config.json') },
{ source: path.join(__dirname, '../exportHtml', '/exportHtml.html'), destination: path.join(__dirname, '../dist/exportHtml.html') }
], ],
mkdir: [ mkdir: [
@@ -371,7 +373,7 @@ if (process.env.NODE_ENV == 'development') {
if (arg === 'html') { if (arg === 'html') {
plugin.onStart[0].delete.push(path.join(__dirname, '../exportHtml/')) plugin.onStart[0].delete.push(path.join(__dirname, '../exportHtml/'))
plugin.onEnd[0].copy.push( plugin.onEnd[0].copy.push(
{ source: path.join(__dirname, '../dist', '/index.html'), destination: path.join(__dirname, '../exportHtml', '/index.html') } { source: path.join(__dirname, '../dist', '/index.html'), destination: path.join(__dirname, '../exportHtml', '/exportHtml.html') }
) )
} }
webpackConfig.plugins.push( webpackConfig.plugins.push(

View File

@@ -210,6 +210,7 @@ export default {
this.showBasicInfo = !this.showBasicInfo this.showBasicInfo = !this.showBasicInfo
}, },
init () { init () {
if (window.dataJson) { return }
this.loading = true this.loading = true
const weekDays = this.getWeeksTime() const weekDays = this.getWeeksTime()
if (this.trendTimer) { if (this.trendTimer) {

View File

@@ -436,9 +436,14 @@ export default {
} }
case 'system': { case 'system': {
this.chartData = [] this.chartData = []
if (this.chartInfo.type === 'assetInfo' || this.chartInfo.type === 'endpointInfo') {
this.chartData = this.dataJson[this.chartInfo.id + '_' + 0].data
this.loading = false
break
}
this.chartData.push(this.dataJson[this.chartInfo.id + '_' + 0].result) this.chartData.push(this.dataJson[this.chartInfo.id + '_' + 0].result)
}
break break
}
case 'misc': { case 'misc': {
this.loading = false this.loading = false
setTimeout(() => { setTimeout(() => {

View File

@@ -21,7 +21,7 @@ export default {
this.messageParams.route = route this.messageParams.route = route
this.messageParams.params = params this.messageParams.params = params
this.closeMessage = this.$message({ this.closeMessage = this.$message({
duration: 2000, duration: showNext ? 5000 : 2000,
dangerouslyUseHTMLString: true, dangerouslyUseHTMLString: true,
type: 'success', type: 'success',
message: `<div>${msg} <span class="message-next ${showNext ? '' : 'hidden'}"><span class="message-next-continue">${this.$t('overall.continue')}</span> <span id="assetAdd" class="message-next-content">${this.$t(nextText)}</span></span></div>`, message: `<div>${msg} <span class="message-next ${showNext ? '' : 'hidden'}"><span class="message-next-continue">${this.$t('overall.continue')}</span> <span id="assetAdd" class="message-next-content">${this.$t(nextText)}</span></span></div>`,

View File

@@ -753,7 +753,7 @@ export default {
this.$post(this.url, params).then(res => { this.$post(this.url, params).then(res => {
this.prevent_opt.save = false this.prevent_opt.save = false
if (res.code === 200) { if (res.code === 200) {
this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { assetId: res.data.id }, true, 'guide.addEndpoint') this.messageShow(this.$t('tip.saveSuccess'), '/endpoint', { assetId: res.data.id }, false, 'guide.addEndpoint')
this.esc(true) this.esc(true)
} else { } else {
this.$message.error(res.msg) this.$message.error(res.msg)