|
@@ -0,0 +1,137 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <!-- 搜索模块 -->
|
|
|
+ <div class="filter-container">
|
|
|
+ <span>
|
|
|
+ <span>{{$t("lineSide.frockSearchForm.zoneName")}}:</span>
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.zoneId"
|
|
|
+ clearable
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 15%"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="(item, index) in zoneList"
|
|
|
+ :key="index"
|
|
|
+ :label="item.name"
|
|
|
+ :value="item.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </span>
|
|
|
+ <span>
|
|
|
+ <span>{{$t("lineSide.frockSearchForm.frockName")}}:</span>
|
|
|
+ <el-input v-model="queryParams.frockName" :placeholder='$t("common.pleaseEnter")' style="width: 150px;" size="medium"/>
|
|
|
+ </span>
|
|
|
+ <span style="margin-left: 15px;">
|
|
|
+ <el-button plain type="primary" icon="el-icon-search" size="medium" @click="fetch">
|
|
|
+ {{ $t("table.search") }}
|
|
|
+ </el-button>
|
|
|
+ <el-button plain type="warning" icon="el-icon-refresh" size="medium" @click="reset">
|
|
|
+ {{ $t("table.reset") }}
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <!-- 列表数据 -->
|
|
|
+ <el-table
|
|
|
+ ref="table"
|
|
|
+ v-loading="loading"
|
|
|
+ :data="tableData"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ row-key="id"
|
|
|
+ style="width: 100%;"
|
|
|
+ >
|
|
|
+ <!-- 序号 -->
|
|
|
+ <el-table-column :label='$t("common.serialNo")' width="55px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.$index+(page - 1) * limit + 1}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 产线名称 -->
|
|
|
+ <el-table-column prop="zoneName" :label='$t("lineSide.frockTable.zoneName")' align="center"></el-table-column>
|
|
|
+ <!-- 点位名称 -->
|
|
|
+ <el-table-column prop="storgeName" :label='$t("lineSide.frockTable.storgeName")' align="center" ></el-table-column>
|
|
|
+ <!-- 夹具名称 -->
|
|
|
+ <el-table-column prop="frockName" :label='$t("lineSide.frockTable.frockName")' align="center"></el-table-column>
|
|
|
+ <!-- 是否在设备 -->
|
|
|
+ <el-table-column prop="modeSpecification" :label='$t("lineSide.frockTable.modeSpecification")' align="center"></el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <!-- 分页组件 -->
|
|
|
+ <el-pagination
|
|
|
+ :current-page="page"
|
|
|
+ :total="total"
|
|
|
+ :page-size="limit"
|
|
|
+ :page-sizes="[5, 10, 20, 30, 40, 50, 100]"
|
|
|
+ style="padding: 30px 0; text-align: center"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ @size-change="changePageSize"
|
|
|
+ @current-change="changeCurrentPage"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import areaMgrApi from "@/api/resourceProductMgr/areaMgr";
|
|
|
+import productlineAvailabilityApi from "@/api/statisticalAnalysis/productlineAvailability";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "FrockSearch",
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ queryParams: {},
|
|
|
+ zoneList: [],
|
|
|
+ total: 0, // 总记录数
|
|
|
+ page: 1, // 当前页码
|
|
|
+ limit: 10, // 每页记录数
|
|
|
+ tableData: {},
|
|
|
+ loading: false,
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ // 加载列表数据
|
|
|
+ this.fetch();
|
|
|
+ this.getZoneList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ fetch() {
|
|
|
+ this.tableKey = !this.tableKey;
|
|
|
+ productlineAvailabilityApi
|
|
|
+ .frockSearch(this.page, this.limit, this.queryParams)
|
|
|
+ .then((response) => {
|
|
|
+ const res = response.data;
|
|
|
+ this.tableData = (res.data || []).records;
|
|
|
+ this.total = (res.data || []).total;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ reset () {
|
|
|
+ this.queryParams = initQueryParams({})
|
|
|
+ this.fetch()
|
|
|
+ },
|
|
|
+ getZoneList() {
|
|
|
+ areaMgrApi.getList({ status: 1 }).then((res) => {
|
|
|
+ res = res.data;
|
|
|
+
|
|
|
+ if (res.isSuccess) {
|
|
|
+ this.zoneList = res.data
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 每页记录数改变,size:回调参数,表示当前选中的“每页条数”
|
|
|
+ changePageSize(size) {
|
|
|
+ this.limit = size;
|
|
|
+ this.fetch();
|
|
|
+ },
|
|
|
+ // 改变页码,page:回调参数,表示当前选中的“页码”
|
|
|
+ changeCurrentPage(page) {
|
|
|
+ this.page = page;
|
|
|
+ this.fetch();
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+
|
|
|
+</style>
|