From 8e76ced54112d26dad5466d8509335708df83116 Mon Sep 17 00:00:00 2001 From: lb Date: Thu, 27 Apr 2023 17:01:52 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=B8=A9=E5=BA=A6=E5=BC=B9=E7=AA=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/ListViewWithHead.vue | 21 +++++++++++++++- .../components/temperatureDialog.vue | 24 +++++++++++++++++++ src/views/modules/pms/carHistory/config.js | 3 ++- 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 src/views/modules/pms/carHistory/components/temperatureDialog.vue diff --git a/src/views/modules/pms/carHistory/components/ListViewWithHead.vue b/src/views/modules/pms/carHistory/components/ListViewWithHead.vue index 52a05bb..30012f2 100644 --- a/src/views/modules/pms/carHistory/components/ListViewWithHead.vue +++ b/src/views/modules/pms/carHistory/components/ListViewWithHead.vue @@ -42,6 +42,11 @@ :dialog-visible.sync="carPayloadDialogVisible" :configs="carPayloadDialogConfigs" @refreshDataList="getList" /> + @@ -51,6 +56,7 @@ import BaseSearchForm from "@/components/BaseSearchForm.vue"; import DialogWithMenu from "@/components/DialogWithMenu.vue"; import DialogJustForm from "@/components/DialogJustForm.vue"; import DialogCarPayload from "@/components/DialogCarPayload.vue"; +import TemperatureDialog from "./temperatureDialog.vue"; import moment from "moment"; const DIALOG_WITH_MENU = "DialogWithMenu"; @@ -59,7 +65,7 @@ const DIALOG_CARPAYLOAD = "DialogCarPayload"; export default { name: "ListViewWithHead", - components: { BaseSearchForm, BaseListTable, DialogWithMenu, DialogJustForm, DialogCarPayload }, + components: { BaseSearchForm, BaseListTable, DialogWithMenu, DialogJustForm, DialogCarPayload, TemperatureDialog }, props: { tableConfig: { type: Object, @@ -131,6 +137,7 @@ export default { tableLoading: false, refreshLayoutKey: null, cachedSearchCondition: {}, + temperatureDialogVisible: false, }; }, inject: ["urls"], @@ -430,10 +437,22 @@ export default { case "to-car-payload": { // open dialog instead of redirect to a new page this.openCarPayloadDialog(data); + break; + } + case "temperature": { + this.openTemperatureDialog(data); + break; } } }, + openTemperatureDialog(id) { + this.temperatureDialogVisible = true; + this.$nextTick(() => { + this.$refs["temperature-dialog"].init(id); + }); + }, + openCarPayloadDialog(id) { this.carPayloadDialogVisible = true; this.$nextTick(() => { diff --git a/src/views/modules/pms/carHistory/components/temperatureDialog.vue b/src/views/modules/pms/carHistory/components/temperatureDialog.vue new file mode 100644 index 0000000..9b005b5 --- /dev/null +++ b/src/views/modules/pms/carHistory/components/temperatureDialog.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/src/views/modules/pms/carHistory/config.js b/src/views/modules/pms/carHistory/config.js index 1d80633..bba79e3 100644 --- a/src/views/modules/pms/carHistory/config.js +++ b/src/views/modules/pms/carHistory/config.js @@ -18,9 +18,10 @@ export default function () { prop: "operations", name: "操作", fixed: "right", - width: 90, + width: 150, subcomponent: TableOperaionComponent, options: [ + { name: "temperature", label: "烧制温度", }, { name: "to-car-payload", label: "装载详情", icon: 'document' }, { name: "delete", label: "删除", icon: 'delete', emitFull: true, promptField: 'code' } ],