|
@@ -19,6 +19,13 @@
|
|
|
value="2"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item prop="subType">
|
|
|
+ <el-select v-model="searchForm.subType"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择资讯类别">
|
|
|
+ <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button native-type="submit" type="danger">搜索</el-button>
|
|
|
</el-form-item>
|
|
@@ -47,6 +54,13 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column align='center'
|
|
|
+ prop="subType"
|
|
|
+ label="资讯类别">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ formatSubType(scope.row.subType) }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align='center'
|
|
|
prop="remark"
|
|
|
label="是否使用">
|
|
|
<template slot-scope="scope">
|
|
@@ -92,7 +106,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import { newsList, newsUpdate, newsDel } from '@/api/contentManager'
|
|
|
+import { newsList, newsUpdate, newsDel, newsTypeList } from '@/api/contentManager'
|
|
|
import pagination from '@/components/Pagination/index'
|
|
|
export default {
|
|
|
name: 'information',
|
|
@@ -102,7 +116,8 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
searchForm: {
|
|
|
- tenantId: '1'
|
|
|
+ tenantId: '1',
|
|
|
+ subType: null,
|
|
|
},
|
|
|
tableList: [],
|
|
|
organId: null,
|
|
@@ -113,10 +128,16 @@ export default {
|
|
|
page: 1, // 当前页
|
|
|
total: 1, // 总条数
|
|
|
page_size: [10, 20, 40, 50] // 选择限制显示条数
|
|
|
- }
|
|
|
+ },
|
|
|
+ typeList: [], // 子分类
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
+ async mounted () {
|
|
|
+ await newsTypeList({ parentId: 2 }).then(res => {
|
|
|
+ if(res.code == 200) {
|
|
|
+ this.typeList = res.data
|
|
|
+ }
|
|
|
+ })
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
@@ -128,6 +149,7 @@ export default {
|
|
|
let params = {
|
|
|
clientName: 'manage',
|
|
|
tenantId: this.searchForm.tenantId,
|
|
|
+ subType: this.searchForm.subType,
|
|
|
rows: this.pageInfo.limit,
|
|
|
page: this.pageInfo.page,
|
|
|
type: 2
|
|
@@ -182,7 +204,16 @@ export default {
|
|
|
this.$message.error(res.msg)
|
|
|
}
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ formatSubType(val) {
|
|
|
+ let tempName = null
|
|
|
+ this.typeList.forEach(item => {
|
|
|
+ if(item.id == val) {
|
|
|
+ tempName = item.name
|
|
|
+ }
|
|
|
+ })
|
|
|
+ return tempName
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|