lohir
2024-10-22 e499960a4f186f1a526899ee985ce0b48ba69fac
完成运维考核-工单白名单-列表展示
2个文件已修改
75 ■■■■■ 已修改文件
src/api/platform/work-order.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/work-order/threshold/index.vue 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/platform/work-order.js
@@ -136,3 +136,12 @@
    method: 'get'
  })
}
// 获取工单白名单列表
export function getWhiteList(query) {
  return request({
    url: '/work-order/white/page',
    method: 'post',
    data: query
  })
}
src/views/system/work-order/threshold/index.vue
@@ -283,6 +283,54 @@
        </el-card></el-col
      >
    </el-row>
    <el-row class="content-warp">
      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
        <el-form-item label="设备编码" prop="serialNumber">
          <el-input
            v-model="queryParams.serialNumber"
            placeholder="设备编码"
            clearable
            @keyup.enter.native="getWhiteList"
            @clear="getWhiteList"
          />
        </el-form-item>
        <el-form-item label="点位名称" prop="pointName">
          <el-input
            v-model="queryParams.pointName"
            placeholder="点位名称"
            clearable
            @keyup.enter.native="getWhiteList"
            @clear="getWhiteList"
          />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" icon="el-icon-search" size="small" @click="getWhiteList">搜索</el-button>
        </el-form-item>
      </el-form>
    </el-row>
    <el-row class="content-warp">
      <el-button size="small" type="success">新增</el-button>
      <el-button size="small" type="danger">删除</el-button>
    </el-row>
    <el-row class="content-warp">
      <el-col :span="24">
        <el-table v-loading="loading" :data="workOrderWhiteList">
          <el-table-column type="selection" width="55" align="center" prop="id"/>
          <el-table-column label="设备编码" align="center" prop="serialNumber"/>
          <el-table-column label="点位名称" align="center" prop="pointName"/>
          <el-table-column label="创建人" align="center" prop="createBy"/>
          <el-table-column label="备注" align="center" prop="remark"/>
        </el-table>
        <pagination
          v-show="total>0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getWhiteList"
        />
      </el-col>
    </el-row>
  </div>
</template>
@@ -299,6 +347,8 @@
  getFace,
  getVideo,
} from "../../../../api/platform/threshold";
import { getWhiteList } from "@/api/platform/work-order";
export default {
  dicts: ["image_qualify", "video_qualify"],
@@ -337,6 +387,8 @@
        pageNum: 1,
        pageSize: 10,
        monitorType: null,
        serialNumber: null,
        pointName: null,
      },
      // 表单参数
      videoForm: {},
@@ -407,10 +459,13 @@
          { required: true, message: "请填写标注准确率阈值", trigger: "blur" },
        ],
      },
      // 白名单列表
      workOrderWhiteList: []
    };
  },
  created() {
    this.getList();
    this.getWhiteList();
  },
  methods: {
    showEdit(value) {
@@ -503,6 +558,14 @@
        this.videoList = JSON.parse(JSON.stringify(this.thresholdList.video));
        this.faceList = JSON.parse(JSON.stringify(this.thresholdList.face));
        this.carList = JSON.parse(JSON.stringify(this.thresholdList.car));
        this.total = response.total;
        this.loading = false;
      });
    },
    getWhiteList() {
      this.loading = true;
      getWhiteList(this.queryParams).then((response) => {
        this.workOrderWhiteList = response.data;
        this.total = response.total;
        this.loading = false;
      });
@@ -786,4 +849,7 @@
  margin-left: 5px;
  display: inline-block;
}
.content-warp {
  margin-top: 10px;
}
</style>