update 窑车详情的layout
This commit is contained in:
parent
e33feed314
commit
351720ffc1
@ -6,14 +6,19 @@
|
|||||||
:destroy-on-close="false"
|
:destroy-on-close="false"
|
||||||
:close-on-click-modal="configs.clickModalToClose ?? true"
|
:close-on-click-modal="configs.clickModalToClose ?? true"
|
||||||
:width="configs.dialogWidth ?? '50%'"
|
:width="configs.dialogWidth ?? '50%'"
|
||||||
:append-to-body="true"
|
:append-to-body="true">
|
||||||
>
|
|
||||||
<!-- title -->
|
<!-- title -->
|
||||||
<div slot="title" class="dialog-title" style="display: flex; align-items: center">
|
<div slot="title" class="dialog-title" style="display: flex; align-items: center">
|
||||||
<span style="font-size: 18px">装载详情</span>
|
<span style="font-size: 18px">装载详情</span>
|
||||||
<el-button v-if="configs.showAdd ?? false" size="small" type="primary" plain style="margin-left: 16px" @click="$emit('add-record', id)"
|
<el-button
|
||||||
>添加记录</el-button
|
v-if="configs.showAdd ?? false"
|
||||||
>
|
size="small"
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
style="margin-left: 16px"
|
||||||
|
@click="$emit('add-record', id)">
|
||||||
|
添加记录
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- main content -->
|
<!-- main content -->
|
||||||
@ -24,8 +29,7 @@
|
|||||||
:table-data="dataList"
|
:table-data="dataList"
|
||||||
:current-page="page"
|
:current-page="page"
|
||||||
:current-size="size"
|
:current-size="size"
|
||||||
:refresh-layout-key="refreshLayoutKey"
|
:refresh-layout-key="refreshLayoutKey" />
|
||||||
/>
|
|
||||||
<!-- @operate-event="handleOperate" -->
|
<!-- @operate-event="handleOperate" -->
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@ -37,8 +41,7 @@
|
|||||||
:page-sizes="[1, 5, 10, 20, 50, 100]"
|
:page-sizes="[1, 5, 10, 20, 50, 100]"
|
||||||
:page-size="size"
|
:page-size="size"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
></el-pagination>
|
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -78,7 +81,7 @@ export default {
|
|||||||
totalPage: 0,
|
totalPage: 0,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
tableLoading: false,
|
tableLoading: false,
|
||||||
refreshLayoutKey: null,
|
refreshLayoutKey: "",
|
||||||
id: null,
|
id: null,
|
||||||
showPaination: false,
|
showPaination: false,
|
||||||
};
|
};
|
||||||
@ -151,6 +154,10 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.tableLoading = false;
|
this.tableLoading = false;
|
||||||
|
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.refreshLayoutKey = Math.random();
|
||||||
|
});
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
this.$message({
|
this.$message({
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<SubOrderDetail v-if="order !== null" :order="order" />
|
<SubOrderDetail v-if="order !== null" :order="order" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="car" label="窑车详情">
|
<el-tab-pane name="car" label="窑车详情">
|
||||||
<CarDetail v-if="order !== null" :order-id="order.id" />
|
<CarDetail v-if="order !== null" :order-id="order.id" :table-layout="carLayoutKey" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane name="tray" label="托盘详情">
|
<el-tab-pane name="tray" label="托盘详情">
|
||||||
<TrayDetail />
|
<TrayDetail />
|
||||||
|
@ -7,8 +7,7 @@
|
|||||||
:column-config="tableConfig"
|
:column-config="tableConfig"
|
||||||
:table-data="dataList"
|
:table-data="dataList"
|
||||||
@operate-event="handleOperate"
|
@operate-event="handleOperate"
|
||||||
:refresh-layout-key="refreshLayoutKey"
|
:refresh-layout-key="refreshLayoutKey" />
|
||||||
/>
|
|
||||||
|
|
||||||
<el-pagination
|
<el-pagination
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
@ -17,15 +16,13 @@
|
|||||||
:page-sizes="[1, 5, 10, 20]"
|
:page-sizes="[1, 5, 10, 20]"
|
||||||
:page-size="listQuery.limit"
|
:page-size="listQuery.limit"
|
||||||
:total="totalPage"
|
:total="totalPage"
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
layout="total, sizes, prev, pager, next, jumper"></el-pagination>
|
||||||
></el-pagination>
|
|
||||||
|
|
||||||
<DialogCarPayload
|
<DialogCarPayload
|
||||||
ref="car-payload-dialog"
|
ref="car-payload-dialog"
|
||||||
v-if="!!carPayloadDialogConfigs"
|
v-if="!!carPayloadDialogConfigs"
|
||||||
:dialog-visible.sync="carPayloadDialogVisible"
|
:dialog-visible.sync="carPayloadDialogVisible"
|
||||||
:configs="carPayloadDialogConfigs"
|
:configs="carPayloadDialogConfigs" />
|
||||||
/>
|
|
||||||
<!-- @refreshDataList="getList" -->
|
<!-- @refreshDataList="getList" -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -37,7 +34,6 @@ import TableOperaionComponent from "@/components/noTemplateComponents/operationC
|
|||||||
import { timeFilter } from "@/utils/filters";
|
import { timeFilter } from "@/utils/filters";
|
||||||
import DialogCarPayload from "@/components/DialogCarPayload.vue";
|
import DialogCarPayload from "@/components/DialogCarPayload.vue";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CarDetailTag",
|
name: "CarDetailTag",
|
||||||
components: { BaseListTable, DialogCarPayload },
|
components: { BaseListTable, DialogCarPayload },
|
||||||
@ -46,6 +42,10 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
|
tableLayout: {
|
||||||
|
type: Number,
|
||||||
|
default: 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -67,7 +67,7 @@ export default {
|
|||||||
width: 90,
|
width: 90,
|
||||||
subcomponent: TableOperaionComponent,
|
subcomponent: TableOperaionComponent,
|
||||||
options: [
|
options: [
|
||||||
{ name: "to-car-payload", label: "装载详情", icon: "document" },
|
{ name: "to-car-payload", label: "装载详情", icon: "shopping-cart-full" }, // or el-icon-box
|
||||||
// { name: "delete", label: "删除", icon: "delete", emitFull: true, promptField: "code" },
|
// { name: "delete", label: "删除", icon: "delete", emitFull: true, promptField: "code" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -111,8 +111,19 @@ export default {
|
|||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true,
|
||||||
},
|
},
|
||||||
|
tableLayout() {
|
||||||
|
this.doLayout()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
// activated() {
|
||||||
|
// console.log("hhh");
|
||||||
|
// this.refreshLayoutKey = Math.random();
|
||||||
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
doLayout() {
|
||||||
|
this.refreshLayoutKey = Math.random();
|
||||||
|
},
|
||||||
|
|
||||||
handleOperate({ type, data }) {
|
handleOperate({ type, data }) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "delete": {
|
case "delete": {
|
||||||
|
Loading…
Reference in New Issue
Block a user