You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
143 lines
3.5 KiB
143 lines
3.5 KiB
|
|
|
|
<template>
|
|
<div>
|
|
<div class="d-flex flex-nowrap">
|
|
<!-- 输入框 -->
|
|
<a-select @change="changeType" class="mb-3" placeholder="类型" style="width: 80px">
|
|
<a-select-option
|
|
:key="index"
|
|
:value="type.code"
|
|
v-for="(type, index) in types"
|
|
>{{ type.value }}</a-select-option>
|
|
</a-select>
|
|
<a-input class="mb-3" placeholder="标题" style="width: 200px" v-model="options.input" />
|
|
|
|
<!-- 发布时间 -->
|
|
<a-range-picker
|
|
@change="onChangeTime"
|
|
class="ml-3 mb-3 flex-1"
|
|
format="YYYY-MM-DD"
|
|
show-time
|
|
/>
|
|
</div>
|
|
|
|
<!-- 是否勾选 -->
|
|
<div class="d-flex flex-nowrap ml-3">
|
|
<div class="d-flex flex-nowrap align-center">
|
|
<a-checkbox @change="onChangeBw" class="mb-3">国家</a-checkbox>
|
|
<a-checkbox @change="onChangeSx" class="mb-3">山西省</a-checkbox>
|
|
<a-checkbox @change="onChangeZg" class="mb-3">山西省综改区</a-checkbox>
|
|
<a-checkbox @change="onChangeTy" class="mb-3">太原市</a-checkbox>
|
|
</div>
|
|
<!-- 状态 -->
|
|
<a-select @change="changeState" class="ml-3 mb-3" placeholder="状态" style="width: 150px">
|
|
<a-select-option
|
|
:key="index"
|
|
:value="state.id"
|
|
v-for="(state, index) in policyStatus"
|
|
>{{ state.value }}</a-select-option>
|
|
</a-select>
|
|
<a-button @click="handleTableChange" class="ml-3" type="primary">搜索</a-button>
|
|
<div class="flex-1"></div>
|
|
<a-button @click="showModal" class="editable-add-btn" type="primary">增加</a-button>
|
|
</div>
|
|
|
|
<!-- 添加 -->
|
|
<policy-add :visible="visible" @closeModal="closeModal" @getSelectTeam="getSelectTeam" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import PolicyAdd from 'components/Policy/PolicyAdd.vue';
|
|
// import { selLikeTeam } from 'config/api';
|
|
|
|
export default {
|
|
name: 'PolicySearch',
|
|
components: {
|
|
PolicyAdd,
|
|
},
|
|
data() {
|
|
return {
|
|
visible: false,
|
|
types: [
|
|
{ code: 'title', value: '标题' },
|
|
{ code: 'area', value: '地区/发布部门' },
|
|
],
|
|
policyStatus: [
|
|
{ id: 0, value: '审核中' },
|
|
{ id: 1, value: '未通过' },
|
|
{ id: 2, value: '已通过' },
|
|
],
|
|
options: {
|
|
bw: 0,
|
|
sx: 0,
|
|
zg: 0,
|
|
ty: 0,
|
|
input: '',
|
|
status: '',
|
|
code: '',
|
|
startTime: '',
|
|
endTime: '',
|
|
},
|
|
};
|
|
},
|
|
methods: {
|
|
showModal() {
|
|
this.visible = true;
|
|
},
|
|
|
|
closeModal() {
|
|
this.visible = false;
|
|
},
|
|
|
|
async getSelectTeam() {
|
|
await this.$emit('getSelectTeam');
|
|
},
|
|
|
|
// 勾选
|
|
onChangeBw(e) {
|
|
if (e.target.checked) {
|
|
this.options.bw = 1;
|
|
}
|
|
},
|
|
onChangeSx(e) {
|
|
if (e.target.checked) {
|
|
this.options.sx = 1;
|
|
}
|
|
},
|
|
onChangeZg(e) {
|
|
if (e.target.checked) {
|
|
this.options.zg = 1;
|
|
}
|
|
},
|
|
onChangeTy(e) {
|
|
if (e.target.checked) {
|
|
this.options.ty = 1;
|
|
}
|
|
},
|
|
// 类型
|
|
changeType(value) {
|
|
this.options.code = value;
|
|
},
|
|
// 状态
|
|
changeState(value) {
|
|
this.options.status = value;
|
|
},
|
|
// 发布时间
|
|
onChangeTime(dates, dateStrings) {
|
|
this.options.startTime = dateStrings[0];
|
|
this.options.endTime = dateStrings[1];
|
|
},
|
|
|
|
// 搜索
|
|
async handleTableChange() {
|
|
const { options } = this;
|
|
await this.$emit('getSelectTeam', options);
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
<style scoped lang="stylus"></style>
|
|
|