田源
2023-09-19 537a785bd34db8876e2ee4201db5be3399efdfb2
集成系统信息管理-查询更改
已修改4个文件
76 ■■■■■ 文件已修改
Source/UBCS-WEB/src/api/docking/data.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/docking/task.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/integration/sysInfo.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/views/integration/systemInfo.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/api/docking/data.js
@@ -1,13 +1,13 @@
import request from '@/router/axios';
export const getDataList = (page, size, params) => {
export const getDataList = (page, limit, params) => {
  return request({
    url: '/api/ubcs-code/dockingManagement/gridDockingData',
    method: 'get',
    params: {
      ...params,
      page,
      size
      limit
    }
  })
}
Source/UBCS-WEB/src/api/docking/task.js
@@ -1,13 +1,13 @@
import request from '@/router/axios';
export const getTaskList = (page, size, params) => {
export const getTaskList = (page, limit, params) => {
  return request({
    url: '/api/ubcs-code/dockingManagement/gridDockingTask',
    method: 'get',
    params: {
      ...params,
      page,
      size
      limit
    }
  })
}
Source/UBCS-WEB/src/api/integration/sysInfo.js
@@ -1,11 +1,15 @@
import request from '@/router/axios';
// 集成系统信息管理列表
export const getSysInfoList = (params) => {
export const getSysInfoList = (size,current,params) => {
    return request({
      url: '/api/ubcs-code/dockingManagement/gridDockingSystem',
      method: 'get',
      params: params
      params: {
        size,
        current,
        ...params
      }
    })
  }
  // 集成系统信息管理新增
Source/UBCS-WEB/src/views/integration/systemInfo.vue
@@ -1,6 +1,6 @@
<template>
    <basic-container>
        <avue-crud ref="crud" :table-loading="loading" :data="data" :option="option" :page.sync="page" :search.sync="search"
    <avue-crud ref="crud" :data="data" :option="option" :page.sync="page" :search.sync="search" :table-loading="loading"
            @on-load="getDataList" @row-save="handleSave" @row-del="handleDelete" @row-update="handleEdit"
            @refresh-change="handleRefresh" @size-change="handleSizePage" @current-change="handleCurrentPage"
            @selection-change="selectionChange" @row-click="handleRowClick">
@@ -15,15 +15,16 @@
                    <el-option v-for="item in selectOption" :key="item.value" :label="item.label" :value="item.value">
                    </el-option>
                </el-select>
                <el-input :placeholder="`请输入${selectValue === 'id' ? '系统编号' : '系统名称'}并按回车查询`" :size="size"
                    style="width:300px;margin-left: 10px;" v-model="search[selectValue]" clearable
                    @keyup.enter.native="handleEnter" @clear="handleClear"></el-input>
        <el-input v-model="search[selectValue]" :placeholder="`请输入${selectValue === 'id' ? '系统编号' : '系统名称'}并按回车查询`"
                  :size="size" clearable style="width:300px;margin-left: 10px;"
                  @clear="handleClear" @keyup.enter.native="handleEnter"></el-input>
            </template>
        </avue-crud>
    </basic-container>
</template>
<script>
import { getSysInfoList, sysInfoAdd, sysInfoEdit, sysInfoDel } from '@/api/integration/sysInfo.js'
export default {
    data() {
        return {
@@ -93,22 +94,45 @@
    },
    methods: {
        // 获取列表
    // async getDataList() {
    //     this.loading = true
    //     console.log(this.search)
    //     const { pageSize, currentPage } = this.page
    //     let param = { size: pageSize, current: currentPage }
    //     this.search = Object.keys(this.search)
    //         .filter((key) => this.search[key] !== null && this.search[key] !== undefined && this.search[key] !== "")
    //         .reduce((acc, key) => ({ ...acc, [key]: this.search[key] }), {});
    //     const response = await getSysInfoList(pageSize,currentPage,{...param})
    //     if (response.status === 200) {
    //         console.log(response)
    //         this.loading = false
    //         const data = response.data.data
    //         this.data = data.records
    //         this.page.total = data.total
    //     } else this.loading = false
    // },
        async getDataList() {
            this.loading = true
            console.log(this.search)
            const { pageSize, currentPage } = this.page
            let param = { size: pageSize, current: currentPage }
            this.search = Object.keys(this.search)
                .filter((key) => this.search[key] !== null && this.search[key] !== undefined && this.search[key] !== "")
                .reduce((acc, key) => ({ ...acc, [key]: this.search[key] }), {});
            const response = await getSysInfoList({ ...param, ...this.search })
      this.loading = true;
      console.log(this.search);
      const { pageSize, currentPage } = this.page;
      const conditions = {};
      if (Object.keys(this.search).length > 0) {
        for (const key in this.search) {
          if (this.search[key]) {
            conditions[`conditionMap[${key}_like]`] = this.search[key];
          }
        }
      }
      const response = await getSysInfoList(pageSize, currentPage, conditions);
            if (response.status === 200) {
                console.log(response)
                this.loading = false
                const data = response.data.data
                this.data = data.records
                this.page.total = data.total
            } else this.loading = false
        console.log(response);
        this.loading = false;
        const data = response.data.data;
        this.data = data.records;
        this.page.total = data.total;
      } else {
        this.loading = false;
      }
        },
        // 新增
        async handleSave(row, done, loading) {