Newer
Older
DH_Apicture / src / views / pictureOnMap / page / components / DialogTabs / component / wuzicangku.vue
@zhangqy zhangqy 29 days ago 2 KB first commit
<template>
  <div class="wuzicangku">
        <div class="popUpTable">
      <el-table height="calc(100% - 50px)" v-loading="loading" :data="tablelist">
      <el-table-column fixed  label="物资名称" align="center" prop="name" show-overflow-tooltip />
      <el-table-column label="现有库存" align="center" prop="repertory" show-overflow-tooltip />
<el-table-column label="单位" align="center" prop="monad" show-overflow-tooltip />

      <el-table-column label="物资类别" align="center" prop="goodType">
        <template #default="{ row }">
            <dict-tag :options="good_type" :value="row.goodType" />
        </template>
      </el-table-column>
      <el-table-column label="规格型号" align="center" prop="specification" show-overflow-tooltip />
      
        <el-table-column label="存放地点" prop="storehouseName" show-overflow-tooltip width="200"> </el-table-column>

      <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip />
      </el-table>
       <div class="paginationBox">
      <pagination
        v-show="total > 0"
        :total="total"
        v-model:page="queryParams.pageNum"
        v-model:limit="queryParams.pageSize"
        @pagination="getList"
      />
    </div>
    </div>
  </div>
</template>
<script setup name="wuzicangku">
import {ref,reactive,onMounted} from "vue"
import { managementWarehouseGoodPage } from '@/api/MonitorAssetsOnMap';
const { proxy } = getCurrentInstance();
const { good_type  } = proxy.useDict('good_type');

const props = defineProps({
  // 数据id
  dataID: {
    type: String,
  },
  dataCode: {
    type: String,
  },
  // 默认打开tabs的key
  RefreshName: {
    type: String,
  },
  tabsType: {
    type: String,
  },
  typeName: {
    type: String,
  },
});
const total = ref(0);
const tablelist = ref([]);

const queryParams = ref({
  pageNum: 1,
  pageSize: 10,

});
const loading = ref(false);

function getList() {
  loading.value = false;
  let params={
    storehouseId:props.dataID,
    ...queryParams.value
  }
  managementWarehouseGoodPage(params).then(response => {
    console.log('response',response);
    tablelist.value = response.data;
    total.value = response.total;
    loading.value = false;
  });
}
onMounted(() => {

    getList();
});

</script>
<style lang="scss" scoped>
@import '@/assets/styles/mapcss.scss';
.wuzicangku {
    width: 100%;
  height: 100%;
  padding: 0 10px;
  // color: #ccefff;
}
</style>