| | |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_thing" style="width: 340px"> |
| | | <div class="search_label">委托单位:</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请输入" clearable |
| | | v-model="componentData.entity.company" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | <div class="search_input"> |
| | | <!-- <el-input size="small" placeholder="请输入" clearable--> |
| | | <!-- @keyup.enter.native="refreshTable()"></el-input>--> |
| | | <el-select @focus="getCompanyOptions" @change="refreshTable()" clearable |
| | | size="small" v-model="componentData.entity.company" style="width: 100%"> |
| | | <el-option v-for="item in companyOptions" :key="item.value" |
| | | :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">重 置</el-button> |
| | |
| | | claimVisible: false, |
| | | dates: [], |
| | | index2: 0, |
| | | total: 0 |
| | | total: 0, |
| | | companyOptions: [], // 委托单位枚举值 |
| | | entity: { |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'asc' |
| | | } |
| | | }, |
| | | page: { |
| | | current: -1, |
| | | size: -1, |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.index2++ |
| | | this.componentData.entity.dates = `["${startDate}","${endDate}"]` |
| | | }, |
| | | getCompanyOptions () { |
| | | this.$axios.post(this.$api.user.selectCustomPageList, { |
| | | page: this.page, |
| | | entity: this.entity |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | } |
| | | ).then(res => { |
| | | if (res.code === 200) { |
| | | const list = res.data.body.records |
| | | this.companyOptions = [] |
| | | list.map((item) => { |
| | | const obj = Object.assign({ |
| | | value: item.id, |
| | | label: item.company, |
| | | }) |
| | | this.companyOptions.push(obj) |
| | | }) |
| | | } |
| | | }).catch(e => { |
| | | this.$message.error('查询失败') |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | this.getTotal() |