| | |
| | | SaveHandler() { |
| | | 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(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('未找到对应搜索类型请查看控制台输出!') |
| | | // } |