fix: 1.Subscribe实体详情页top 应用样式调整;2.插件列表展示内容过滤;
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
v-model:custom-table-title="tools.customTableTitle"
|
||||
:api="url"
|
||||
:from="fromRoute.plugin"
|
||||
:layout="['columnCustomize','search']"
|
||||
:layout="['columnCustomize']"
|
||||
@search="search"
|
||||
>
|
||||
<template #default>
|
||||
@@ -32,76 +32,82 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import cnDataList from '@/components/table/CnDataList'
|
||||
import dataListMixin from '@/mixins/data-list'
|
||||
import pluginTable from '@/components/table/system/PluginTable'
|
||||
import { api } from '@/utils/api'
|
||||
import axios from 'axios'
|
||||
import cnDataList from '@/components/table/CnDataList'
|
||||
import dataListMixin from '@/mixins/data-list'
|
||||
import pluginTable from '@/components/table/system/PluginTable'
|
||||
import { api } from '@/utils/api'
|
||||
import { pluginBasicInfo } from '@/utils/constants'
|
||||
import axios from 'axios'
|
||||
|
||||
export default {
|
||||
name: 'Plugin',
|
||||
mixins: [dataListMixin],
|
||||
components: {
|
||||
cnDataList,
|
||||
pluginTable
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
url: api.pluginList,
|
||||
blankObject: { // 空白对象
|
||||
id: '',
|
||||
name: '',
|
||||
remark: '',
|
||||
type: '',
|
||||
schedule: '',
|
||||
status: 1
|
||||
},
|
||||
tableId: 'userTable'
|
||||
export default {
|
||||
name: 'Plugin',
|
||||
mixins: [dataListMixin],
|
||||
components: {
|
||||
cnDataList,
|
||||
pluginTable
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
url: api.pluginList,
|
||||
blankObject: { // 空白对象
|
||||
id: '',
|
||||
name: '',
|
||||
remark: '',
|
||||
type: '',
|
||||
schedule: '',
|
||||
status: 1
|
||||
},
|
||||
tableId: 'pluginTable'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData (params, isAll, isClearType) {
|
||||
if (isAll) {
|
||||
this.searchLabel = null
|
||||
} else if (isClearType) {
|
||||
this.searchLabel.type = ''// 换新接口需要修改的属性名称
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getTableData (params, isAll, isClearType) {
|
||||
if (isAll) {
|
||||
this.searchLabel = null
|
||||
} else if (isClearType) {
|
||||
this.searchLabel.type = ''// 换新接口需要修改的属性名称
|
||||
}
|
||||
if (params) {
|
||||
this.searchLabel = { ...this.searchLabel, ...params }
|
||||
}
|
||||
//this.searchLabel = { ...this.searchLabel, ...this.pageObj }
|
||||
this.searchLabel = {...this.searchLabel,jobGroup:3}
|
||||
this.isNoData = false
|
||||
this.toggleLoading(true)
|
||||
delete this.searchLabel.total
|
||||
let listUrl = this.url
|
||||
if (this.listUrl) {
|
||||
listUrl = this.listUrl
|
||||
}
|
||||
//this.searchLabel.category = 'ai_tagging'
|
||||
axios.get(listUrl, { params: this.searchLabel }).then(response => {
|
||||
if (response.status === 200) {
|
||||
for (let i = 0; i < response.data.data.list.length; i++) {
|
||||
response.data.data.list[i].triggerStatus = response.data.data.list[i].triggerStatus + ''
|
||||
}
|
||||
this.tableData = response.data.data.list
|
||||
} else {
|
||||
console.error(response.data)
|
||||
this.isNoData = true
|
||||
if (response.data.message) {
|
||||
this.$message.error(response.data.message)
|
||||
} else {
|
||||
this.$message.error(this.$t('tip.somethingWentWrong'))
|
||||
if (params) {
|
||||
this.searchLabel = { ...this.searchLabel, ...params }
|
||||
}
|
||||
// this.searchLabel = { ...this.searchLabel, ...this.pageObj }
|
||||
this.searchLabel = { ...this.searchLabel, jobGroup: 3 }
|
||||
this.isNoData = false
|
||||
this.toggleLoading(true)
|
||||
delete this.searchLabel.total
|
||||
let listUrl = this.url
|
||||
if (this.listUrl) {
|
||||
listUrl = this.listUrl
|
||||
}
|
||||
// this.searchLabel.category = 'ai_tagging'
|
||||
axios.get(listUrl, { params: this.searchLabel }).then(response => {
|
||||
if (response.status === 200) {
|
||||
const filterDataList = []
|
||||
for (let i = 0; i < response.data.data.list.length; i++) {
|
||||
response.data.data.list[i].triggerStatus = response.data.data.list[i].triggerStatus + ''
|
||||
const basicInfo = pluginBasicInfo.find(plugin => plugin.id === response.data.data.list[i].id)
|
||||
if (basicInfo) {
|
||||
filterDataList.push(response.data.data.list[i])
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.toggleLoading(false)
|
||||
this.isNoData = !this.tableData || this.tableData.length === 0
|
||||
})
|
||||
}
|
||||
},
|
||||
unmounted () {
|
||||
this.isNoData = false
|
||||
this.tableData = filterDataList
|
||||
} else {
|
||||
console.error(response.data)
|
||||
this.isNoData = true
|
||||
if (response.data.message) {
|
||||
this.$message.error(response.data.message)
|
||||
} else {
|
||||
this.$message.error(this.$t('tip.somethingWentWrong'))
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.toggleLoading(false)
|
||||
this.isNoData = !this.tableData || this.tableData.length === 0
|
||||
})
|
||||
}
|
||||
},
|
||||
unmounted () {
|
||||
this.isNoData = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user