| | |
| | | <!-- 公用模块--> |
| | | <!-- 输入内容--> |
| | | <el-form-item v-if="shouldShowInput" size="small"> |
| | | <el-input v-model="formInline.text" placeholder="按下回车键进行查询!" @keyup.enter.native="SaveHandler"></el-input> |
| | | <el-input v-model.trim="formInline.text" placeholder="按下回车键进行查询!" @keyup.enter.native="SaveHandler"></el-input> |
| | | </el-form-item> |
| | | <!-- 查询按钮--> |
| | | <el-form-item v-if="shouldShowButton" size="small"> |
| | |
| | | this.$message.error('未找到对应搜索类型请查看控制台输出!') |
| | | } |
| | | const requestApi = (api) => { |
| | | api(1, 20, 'createTime', 'desc', {[`conditionMap[${name}_like]`]: this.formInline.text}) |
| | | .then(res => { |
| | | if (!res.data.data.records) { |
| | | this.$message.error('暂未查到数据!'); |
| | | } else { |
| | | let Data = res.data.data; |
| | | this.$emit('getList', Data); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //日志 |
| | | if (this.status.type == 'loge') { |
| | | requestApi(getLogoList); |
| | | } |
| | | //数据 |
| | | if (this.status.type == 'data') { |
| | | requestApi(getDataList); |
| | | } |
| | | //任务 |
| | | if (this.status.type == 'task') { |
| | | requestApi(getTaskList); |
| | | } |
| | | }, |
| | | SaveSearchHandler() { |
| | | let searchDataItem = Object.values(this.SearchObject.searchData).find(item => item.value === this.formInline.type); |
| | | let name = searchDataItem ? searchDataItem.prop : null; |
| | | // if (!searchDataItem) { |
| | | // this.$message.error('未找到对应搜索类型请查看控制台输出!') |
| | | // } |
| | | const requestApi = (api) => { |
| | | api(this.page.currentPage, this.page.pageSize, 'createTime', 'desc', {[`conditionMap[${name}_like]`]: this.formInline.text}) |
| | | .then(res => { |
| | | if (!res.data.data.records) { |