通知公告级别接口,搜索条件待处理,是否全部放到一起一个接口

This commit is contained in:
熊丽君
2021-08-05 09:36:21 +08:00
parent c85634d97b
commit c50fc0f40e
2 changed files with 43 additions and 1 deletions

9
src/api/home/notice.js Normal file
View File

@ -0,0 +1,9 @@
import request from '@/utils/request';
// 根据status查询字典集合 1->技术领域 2->需求类型 3->成熟度 4->合作标签 5->地级市 6->合肥区县 7->城市级别
export function getDictListByStatus(params) {
return request({
url: '/dict/getDictListByStatus',
params
});
}

View File

@ -34,6 +34,20 @@
</el-radio-button> </el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
<div
class="screen_l_t_item"
v-if="queryParams.radio1 == 2 || queryParams.radio1 == 3"
>
<el-radio-group v-model="queryParams.radio1_1" size="medium">
<el-radio-button
:label="item.id"
v-for="item in levelList2"
:key="item.id"
>
{{ item.name }}
</el-radio-button>
</el-radio-group>
</div>
<div class="screen_l_t_item"> <div class="screen_l_t_item">
<span class="text_col">归口:</span> <span class="text_col">归口:</span>
<el-radio-group v-model="queryParams.radio2" size="medium"> <el-radio-group v-model="queryParams.radio2" size="medium">
@ -104,6 +118,7 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import { getDictListByStatus } from '@/api/home/notice';
export default { export default {
data() { data() {
return { return {
@ -113,6 +128,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
radio1: '', radio1: '',
radio1_1: '1417717740679987200',
radio2: '' radio2: ''
}, },
levelList: [ levelList: [
@ -128,12 +144,29 @@ export default {
label: '3', label: '3',
name: '合肥区县' name: '合肥区县'
} }
] ],
levelList2: []
}; };
}, },
computed: { computed: {
...mapGetters(['token']) ...mapGetters(['token'])
}, },
watch: {
'queryParams.radio1'(a, b) {
console.log(a, b);
if (a == 2) {
getDictListByStatus({ type: 5 }).then(({ data }) => {
this.levelList2 = data;
this.queryParams.radio1_1 = '1417717740679987200';
});
} else if (a == 3) {
getDictListByStatus({ type: 6 }).then(({ data }) => {
this.levelList2 = data;
this.queryParams.radio1_1 = '1417719159088742400';
});
}
}
},
methods: { methods: {
getList() {}, getList() {},
handleClick() {} handleClick() {}