cuijian
2023-11-16 e0cd695c11734348e1e01304bdff0696768c1fda
src/views/eam/modules/malfunctionRepair/EquipmentList.vue
@@ -11,6 +11,53 @@
  >
    <a-spin :spinning="confirmLoading">
      <a-form :form="form">
        <div class="table-page-search-wrapper">
          <a-form
            layout="inline"
            @keyup.enter.native="searchQuery"
          >
            <a-row :gutter="24">
              <a-col
                :md="6"
                :sm="8"
              >
                <a-form-item label="单据号">
                  <a-input
                    placeholder="请输入单据号检索"
                    v-model="queryParam.num"
                  ></a-input>
                </a-form-item>
              </a-col>
              <a-col
                :md="6"
                :sm="8"
              >
                <a-form-item label="设备名称">
                  <a-input
                    placeholder="请输入设备名称检索"
                    v-model="queryParam.name"
                  ></a-input>
                </a-form-item>
              </a-col>
              <a-col
                :md="6"
                :sm="8"
              >
                <a-button
                  type="primary"
                  @click="searchQuery"
                  icon="search"
                >查询</a-button>
                <a-button
                  @click="searchReset"
                  icon="reload"
                  style="margin-left:8px;"
                >重置</a-button>
              </a-col>
            </a-row>
          </a-form>
        </div>
        <a-table
          ref="table"
          size="middle"
@@ -90,7 +137,7 @@
          }
        },
        {
          title: '设备编码',
          title: '统一编码',
          align: 'center',
          dataIndex: 'num',
        },
@@ -123,13 +170,6 @@
  methods: {
    searchQuery() {
      this.loadData(1);
    },
    searchReset() {
      this.loadData(1)
    },
    list() {
      this.selectedRowKeys = [];
      this.selectedRowRecord = [];
@@ -173,6 +213,30 @@
    handleCancel() {
      this.close();
    },
    loadData(arg) {
      if (!this.url.list) {
        this.$message.error('请设置url.list属性!')
        return
      }
      //加载数据 若传入参数1则加载第一页的内容
      if (arg === 1) {
        this.ipagination.current = 1
      }
      this.onClearSelected()
      this.queryParam.equipmentStatus = '1';
      var params = this.getQueryParams()//查询条件
      this.loading = true
      getAction(this.url.list, params).then((res) => {
        if (res.success) {
          this.dataSource = res.result.records
          this.ipagination.total = res.result.total
        }
        if (res.code === 510) {
          this.$message.warning(res.message)
        }
        this.loading = false
      })
    },
  },
@@ -227,8 +291,7 @@
  height: 90% !important;
  overflow-y: hidden;
}
/deep/ .notshow {
 .notshow {
  display: none;
}
@@ -247,8 +310,7 @@
.dataUnKnow {
  color: #1890ff;
}
/deep/ .frozenRowClass {
 .frozenRowClass {
  color: #c9c9c9;
}
</style>