|
@@ -42,7 +42,7 @@
|
|
|
:key="tableKey"
|
|
|
ref="table"
|
|
|
v-loading="loading"
|
|
|
- :data="tableData.data"
|
|
|
+ :data="tableData.records"
|
|
|
border
|
|
|
fit
|
|
|
row-key="id"
|
|
@@ -51,7 +51,63 @@
|
|
|
style="width: 100%;"
|
|
|
@current-change="handleCurrentChange"
|
|
|
>
|
|
|
- <el-table-column v-for="item in tableData.titleList" :key="item.id" :prop="item.field" :label='item.text' :show-overflow-tooltip="true" width="180px"></el-table-column>
|
|
|
+ <!--<el-table-column v-for="item in tableData.titleList" :key="item.id" :prop="item.field" :label='item.text' :show-overflow-tooltip="true" width="180px"></el-table-column>-->
|
|
|
+ <!-- 序号 -->
|
|
|
+ <el-table-column :label='$t("common.serialNo")' width="55px" align="center">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div>
|
|
|
+ {{scope.$index+(queryParams.current - 1) * queryParams.size + 1}}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 零部件编号 -->
|
|
|
+ <el-table-column
|
|
|
+ prop="partsNo"
|
|
|
+ :label="$t("runCenter.table.orderSldPro.partsNo")"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ width="150px"
|
|
|
+ >
|
|
|
+ <template slot-scope="{ row }">
|
|
|
+ <span>{{ row.partsNo }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- 产品代号 -->
|
|
|
+ <el-table-column
|
|
|
+ prop="bomAlias"
|
|
|
+ :label="$t("runCenter.table.orderSldPro.bomAlias")"
|
|
|
+ align="center"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ width="120px"
|
|
|
+ />
|
|
|
+ <!-- 零件名称 -->
|
|
|
+ <el-table-column
|
|
|
+ prop="name"
|
|
|
+ :label="$t("runCenter.table.orderSldPro.name")"
|
|
|
+ align="center"
|
|
|
+ />
|
|
|
+ <!-- 零件代号 -->
|
|
|
+ <el-table-column
|
|
|
+ prop="partsAlias"
|
|
|
+ :label="$t("runCenter.table.orderSldPro.partsAlias")"
|
|
|
+ align="center"
|
|
|
+ width="150px"
|
|
|
+ />
|
|
|
+ <!-- 版本号 -->
|
|
|
+ <el-table-column
|
|
|
+ prop="version"
|
|
|
+ :label="$t("runCenter.table.orderSldPro.version")"
|
|
|
+ align="center"
|
|
|
+ width="150px"
|
|
|
+ />
|
|
|
+ <!-- 备注 -->
|
|
|
+ <el-table-column
|
|
|
+ prop="remark"
|
|
|
+ :label="$t("runCenter.table.orderSldPro.remark")"
|
|
|
+ align="center"
|
|
|
+ width="150px"
|
|
|
+ />
|
|
|
+ <!-- 操作 -->
|
|
|
<el-table-column
|
|
|
:label="$t('table.operation')"
|
|
|
fixed="right"
|
|
@@ -71,10 +127,10 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<pagination
|
|
|
- v-show="tableData.count > 0"
|
|
|
+ v-show="tableData.total > 0"
|
|
|
:limit.sync="queryParams.size"
|
|
|
:page.sync="queryParams.current"
|
|
|
- :total="Number(tableData.count)"
|
|
|
+ :total="Number(tableData.total)"
|
|
|
@pagination="fetch"
|
|
|
/>
|
|
|
</div>
|
|
@@ -144,7 +200,7 @@ export default {
|
|
|
currentRow: null, // 当前选择的行数据对象
|
|
|
loading: false,
|
|
|
tableData: {
|
|
|
- count: 0
|
|
|
+ total: 0
|
|
|
},
|
|
|
enums: {
|
|
|
TenantTypeEnum: {},
|
|
@@ -381,19 +437,19 @@ export default {
|
|
|
this.queryParams.size = params.size ? params.size : this.queryParams.size
|
|
|
|
|
|
//必须传的参数--审核通过的,才能看到
|
|
|
- this.queryParams.audit_status = '2'
|
|
|
+ this.queryParams.model.auditStatus = '2'
|
|
|
|
|
|
// 测试数据,真实数据,请使用page
|
|
|
- bomMgrApi.pageList(this.queryParams).then(response => {
|
|
|
+ bomMgrApi.page(this.queryParams).then(response => {
|
|
|
const res = response.data
|
|
|
// console.log("列表的数据:", res)
|
|
|
if (res.isSuccess) {
|
|
|
// 总数
|
|
|
this.tableData = res.data
|
|
|
// 如果有数据,默认选中第一条数据
|
|
|
- if(this.tableData.data.length > 0){
|
|
|
+ if(this.tableData.records.length > 0){
|
|
|
// 选择第一行数据
|
|
|
- this.$refs.table.setCurrentRow(this.tableData.data[0])
|
|
|
+ this.$refs.table.setCurrentRow(this.tableData.records[0])
|
|
|
}
|
|
|
}
|
|
|
// eslint-disable-next-line no-return-assign
|