update 温度弹窗

This commit is contained in:
lb 2023-04-27 17:01:52 +08:00
parent fb29bb7b3d
commit 8e76ced541
3 changed files with 46 additions and 2 deletions

View File

@ -42,6 +42,11 @@
:dialog-visible.sync="carPayloadDialogVisible"
:configs="carPayloadDialogConfigs"
@refreshDataList="getList" />
<TemperatureDialog
ref="temperature-dialog"
v-if="!!temperatureDialogVisible"
:dialog-visible.sync="temperatureDialogVisible"
@refreshDataList="getList" />
</div>
</template>
@ -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(() => {

View File

@ -0,0 +1,24 @@
<template>
<el-dialog :visible="visible" title="temperatureDialogVisible">temperatureDialogVisible</el-dialog>
</template>
<script>
export default {
name: "TemperatureDialog",
props: {},
data() {
return {
visible: false
};
},
created() {},
mounted() {},
methods: {
init(id) {
this.visible = true
}
},
};
</script>
<style scoped></style>

View File

@ -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' }
],