| | |
| | | <!-- 集成日志 任务 数据全部公用--> |
| | | <el-form-item label="集成查询:" size="small"> |
| | | <el-select v-model="formInline.type" placeholder="请选择分类" @change="SelectChange"> |
| | | <el-option :label="item.label" :value="item.value" v-for="item in SearchObject.searchData" ></el-option> |
| | | <el-option :label="item.label" :value="item.value" :key="item.value" v-for="(item,index) in SearchObject.searchData"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- 集成日志 是否成功--> |
| | |
| | | <!-- 公用模块--> |
| | | <!-- 输入内容--> |
| | | <el-form-item size="small" v-if="shouldShowInput"> |
| | | <el-input v-model="formInline.text" placeholder="请输入内容" @keyup.enter.native="SaveHandler"></el-input> |
| | | <el-input v-model="formInline.text" placeholder="按下回车键进行查询!" @keyup.enter.native="SaveHandler"></el-input> |
| | | </el-form-item> |
| | | <!-- 查询按钮--> |
| | | <el-form-item size="small" v-if="shouldShowButton"> |
| | |
| | | }, |
| | | 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 => { |
| | | console.log(res); |
| | | 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); |
| | | } |
| | | }); |
| | | }, |
| | | handleSearch(){ |
| | | let formattedDate = this.$moment(this.formInline.Date).format('YYYY-M-D'); |
| | | console.log('formattedDate',formattedDate); |
| | | handleSearch() { |
| | | 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 = {}; |
| | | // 集成日志类型 |
| | | if (type === 'loge' && typeFlag) { |
| | | requestParams['conditionMap[type_like]'] = cut; |
| | | } |
| | | // 集成日志是否成功 |
| | | if (type === 'loge' && stateFlag) { |
| | | requestParams['conditionMap[interfaceStatus_like]'] = state; |
| | | } |
| | | // 集成任务 是否推送成功 集成数据 是否分解任务 |
| | | if ((type === 'task' || type === 'data') && stateTaskDataFlag) { |
| | | requestParams['conditionMap[sendFlag_like]'] = stateTask; |
| | | } |
| | | // 集成任务 创建日期 和 集成日志 记录时间 |
| | | if ((type === 'loge' || type === 'task') && dateFlag) { |
| | | const formattedDate = this.$moment(Date).format('YYYY-M-D'); |
| | | requestParams['conditionMap[createTime_like]'] = formattedDate; |
| | | } |
| | | // 集成任务 最后推送时间 |
| | | if (type === 'task' && lastDateFlag) { |
| | | const formattedDate = this.$moment(lastDate).format('YYYY-M-D'); |
| | | requestParams['conditionMap[lastModifyTime_like]'] = formattedDate; |
| | | } |
| | | // 集成任务 集成数据 推送类型 |
| | | 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); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |