田源
2025-01-09 d7e3c8a813f8f85c89c06782f1e36e8089ffc31b
集成模块回车查询报错问题
已修改1个文件
37 ■■■■■ 文件已修改
Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/dockingSearch/VciDockingSearch.vue
@@ -4,7 +4,8 @@
<!--      集成日志 任务 数据全部公用-->
      <el-form-item label="集成查询:" size="small">
        <el-select v-model="formInline.type" placeholder="请选择分类" @change="SelectChange">
          <el-option :label="item.label" :value="item.value" :key="item.value" v-for="(item,index) in SearchObject.searchData"></el-option>
          <el-option v-for="(item,index) in SearchObject.searchData" :key="item.value" :label="item.label"
                     :value="item.value"></el-option>
        </el-select>
      </el-form-item>
<!--      集成日志 是否成功-->
@@ -46,29 +47,29 @@
        </el-select>
      </el-form-item>
<!--      集成任务 创建日期  集成日志 记录时间-->
      <el-form-item size="small" v-if="((status.type == 'loge' ||status.type == 'task') && status.dateFlag)">
      <el-form-item v-if="((status.type == 'loge' ||status.type == 'task') && status.dateFlag)" size="small">
        <el-date-picker
          v-model="formInline.Date"
          type="date"
          placeholder="选择日期时间">
          placeholder="选择日期时间"
          type="date">
        </el-date-picker>
      </el-form-item>
<!--      集成任务 最后推送时间-->
      <el-form-item size="small" v-if="status.type == 'task' && status.lastDateFlag">
      <el-form-item v-if="status.type == 'task' && status.lastDateFlag" size="small">
        <el-date-picker
          v-model="formInline.lastDate"
          type="date"
          placeholder="选择日期时间">
          placeholder="选择日期时间"
          type="date">
        </el-date-picker>
      </el-form-item>
<!--      公用模块-->
<!--      输入内容-->
      <el-form-item size="small" v-if="shouldShowInput">
      <el-form-item v-if="shouldShowInput" size="small">
        <el-input v-model="formInline.text" placeholder="按下回车键进行查询!" @keyup.enter.native="SaveHandler"></el-input>
      </el-form-item>
<!--      查询按钮-->
      <el-form-item size="small" v-if="shouldShowButton">
        <el-button type="success" size="small" @click="handleSearch">查询</el-button>
      <el-form-item v-if="shouldShowButton" size="small">
        <el-button size="small" type="success" @click="handleSearch">查询</el-button>
      </el-form-item>
    </el-form>
  </div>
@@ -78,12 +79,12 @@
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'],
  data() {
    return {
    }
    return {}
  },
  computed: {
    //输入框判断
@@ -122,17 +123,23 @@
      this.status.sendTypeFlga = (taskType && val === 5) || (dataType && val === 3);
    },
    SaveHandler(){
      let name = this.SearchObject.searchData[this.formInline.type].prop;
      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 => {
        api(this.page.currentPage, this.page.pageSize, 'createTime', 'desc', {[`conditionMap[${name}_like]`]: this.formInline.text})
          .then(res => {
          if(!res.data.data.records){
            this.$message.error('暂未查到数据!')
              this.$message.error('暂未查到数据!');
          }else {
            let Data=res.data.data;
            this.$emit('getList',Data);
          }
        });
      }
      //日志
      if(this.status.type=='loge'){
        requestApi(getLogoList);