|
|
@@ -46,10 +46,10 @@
|
|
|
<el-table-column :label="$t('ad.content')" prop="id" align="center" :class-name="getSortClass('id')">
|
|
|
<template slot-scope="{row}">
|
|
|
<div v-if="row.TYPE === '1'">
|
|
|
- <el-link type="primary" target="_blank" :href="getHref(row.CONTENT)">{{ row.CONTENT }}</el-link>
|
|
|
+ <el-link type="primary" target="_blank" :href="getHref(row.CONTENT.value)">{{ row.CONTENT.value }}</el-link>
|
|
|
</div><!-- 链接 -->
|
|
|
<div v-else-if="row.TYPE === '2'">
|
|
|
- <router-link :to="`/article/detail/${row.CONTENT}`" target="_blank" style="cursor: pointer;">{{ getContent(row.CONTENT) }}</router-link>
|
|
|
+ <router-link :to="`/article/detail/${row.CONTENT.value}`" target="_blank" style="cursor: pointer;">{{ getContent(row.CONTENT.value) }}</router-link>
|
|
|
</div><!-- 文章 -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -120,7 +120,7 @@
|
|
|
<!-- </el-dropdown-menu>-->
|
|
|
<!-- </el-dropdown>-->
|
|
|
<el-button v-if="permission.hasPermission(`ad/ad-delete`)" type="primary" size="small" icon="el-icon-plus" @click="handleAdd">{{ $t('ad.add') }}</el-button>
|
|
|
- <pagination v-show="total>0" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page.sync="listQuery.page" :limit.sync="listQuery.pageSize" @pagination="getList" />
|
|
|
+ <pagination v-show="total>0" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page.sync="listQuery.page" :limit.sync="listQuery.pageSize" @pagination="getData" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -135,6 +135,7 @@ import permission from '@/utils/permission'
|
|
|
import Pagination from '@/components/Pagination' // secondary package based on el-pagination
|
|
|
import ElementUI from 'element-ui'
|
|
|
import FilterUser from "@/components/FilterUser.vue";
|
|
|
+import filterHelper from "@/utils/filterHelper";
|
|
|
|
|
|
const calendarTypeOptions = [
|
|
|
{ key: 'CN', display_name: 'China' },
|
|
|
@@ -217,28 +218,35 @@ export default {
|
|
|
allLocation: {
|
|
|
LOCATION_NAME: null
|
|
|
},
|
|
|
- filterTypes: null
|
|
|
+ filterTypes: null,
|
|
|
+ filterModel: {},
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.getList()
|
|
|
+ this.getData()
|
|
|
},
|
|
|
methods: {
|
|
|
handleSelectionChange(val) {
|
|
|
this.multipleSelection = val
|
|
|
},
|
|
|
handleSizeChange (pageSize) {
|
|
|
- this.getList(this.currentPage, pageSize)
|
|
|
+ this.getData(this.currentPage, pageSize)
|
|
|
},
|
|
|
handleCurrentChange (page) {
|
|
|
- this.getList(page, this.pageSize)
|
|
|
+ this.getData(page, this.pageSize)
|
|
|
},
|
|
|
- getList(page, pageSize) {
|
|
|
+ getData(page, pageSize) {
|
|
|
this.listLoading = true
|
|
|
this.listQuery.adId = this.$route.params
|
|
|
this.listQuery.page = (page === null || page == undefined) ? 1 : page
|
|
|
this.listQuery.pageSize = (pageSize === null || pageSize == undefined) ? this.pageSize : pageSize
|
|
|
- fetchAdList(this.listQuery).then(response => {
|
|
|
+ const paramsData = Object.assign({
|
|
|
+ adId: this.$route.params,
|
|
|
+ page: (page === null || page == undefined) ? 1 : page,
|
|
|
+ pageSize: (pageSize === null || pageSize == undefined) ? this.pageSize : pageSize
|
|
|
+ }, this.filterModel)
|
|
|
+ // const paramsData = Object.assign(this.listQuery, this.filterModel)
|
|
|
+ fetchAdList(paramsData).then(response => {
|
|
|
this.list = response.data.list
|
|
|
this.total = response.data.totalCount
|
|
|
this.allArticle = response.data.allArticle
|
|
|
@@ -255,7 +263,7 @@ export default {
|
|
|
},
|
|
|
handleFilter() {
|
|
|
this.listQuery.page = 1
|
|
|
- this.getList()
|
|
|
+ this.getData()
|
|
|
},
|
|
|
resetTemp() {
|
|
|
this.temp = {
|
|
|
@@ -341,7 +349,7 @@ export default {
|
|
|
message: response.data,
|
|
|
type: 'success'
|
|
|
})
|
|
|
- obj.getList(obj.currentPage, obj.pageSize)
|
|
|
+ obj.getData(obj.currentPage, obj.pageSize)
|
|
|
}).catch((error) => {
|
|
|
ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
|
|
|
})
|
|
|
@@ -367,7 +375,7 @@ export default {
|
|
|
message: response.data,
|
|
|
type: 'success'
|
|
|
})
|
|
|
- obj.getList(obj.currentPage, obj.pageSize)
|
|
|
+ obj.getData(obj.currentPage, obj.pageSize)
|
|
|
}).catch((error) => {
|
|
|
ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
|
|
|
})
|
|
|
@@ -396,12 +404,16 @@ export default {
|
|
|
message: response.data,
|
|
|
type: 'success'
|
|
|
})
|
|
|
- obj.getList(obj.currentPage, obj.pageSize)
|
|
|
+ obj.getData(obj.currentPage, obj.pageSize)
|
|
|
}).catch((error) => {
|
|
|
ElementUI.Message({type: 'error', message: error.message, showClose: true, duration: 0})
|
|
|
})
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleFilterUser(filterData) {
|
|
|
+ console.log(filterData)
|
|
|
+ filterHelper.handleFilterUser(this, filterData)
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|