| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {getList} from "@/api/docking/loge"; |
| | | import {getLogoList} from "@/api/docking/loge"; |
| | | import {getDataList} from "@/api/docking/data"; |
| | | import {getTaskList} from "@/api/docking/task"; |
| | | export default { |
| | | name: "VciDockingSearch", |
| | | props:['SearchObject','page','formInline','status'], |
| | |
| | | }, |
| | | SaveHandler(){ |
| | | let name = this.SearchObject.searchData[this.formInline.type].prop; |
| | | getList(this.page.currentPage, this.page.pageSize, { [`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); |
| | | } |
| | | }); |
| | | const requestApi = (api) => { |
| | | api(this.page.currentPage, this.page.pageSize, { [`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=='logo'){ |
| | | requestApi(getLogoList); |
| | | } |
| | | if(this.status.type=='data'){ |
| | | requestApi(getDataList); |
| | | } |
| | | if(this.status.type=='task'){ |
| | | requestApi(getTaskList); |
| | | } |
| | | }, |
| | | handleSearch() { |
| | | const { type, typeFlag, stateFlag, stateTaskDataFlag, dateFlag, lastDateFlag ,sendTypeFlga} = this.status; |
| | | const { type, typeFlag, stateFlag, stateTaskDataFlag, dateFlag, lastDateFlag ,sendTypeFlga } = this.status; |
| | | const { currentPage, pageSize } = this.page; |
| | | const { cut, state, stateTask, Date, lastDate, taskCut } = this.formInline; |
| | | const requestParams = {}; |
| | | const requestApi = (api) => { |
| | | api(currentPage, pageSize, requestParams).then(res => { |
| | | if(!res.data.data.records){ |
| | | this.$message.error('暂未查到数据!'); |
| | | } else { |
| | | let Data=res.data.data; |
| | | this.$emit('getList',Data); |
| | | } |
| | | }); |
| | | } |
| | | // 集成日志类型 |
| | | if (type === 'loge' && typeFlag) { |
| | | requestParams['conditionMap[type_like]'] = cut; |
| | |
| | | if ((type === 'task' || type === 'data') && sendTypeFlga) { |
| | | requestParams['conditionMap[sendType_like]'] = taskCut; |
| | | } |
| | | // 请求 |
| | | getList(currentPage, pageSize, requestParams).then(res => { |
| | | if(!res.data.data.records){ |
| | | this.$message.error('暂未查到数据!') |
| | | }else { |
| | | let Data=res.data.data; |
| | | this.$emit('getList',Data); |
| | | } |
| | | }); |
| | | |
| | | if (type == 'logo') { |
| | | requestApi(getLogoList); |
| | | } |
| | | if (type == 'data') { |
| | | requestApi(getDataList); |
| | | } |
| | | if (type == 'task') { |
| | | requestApi(getTaskList); |
| | | } |
| | | } |
| | | } |
| | | } |