update 温度弹窗
This commit is contained in:
		@@ -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(() => {
 | 
			
		||||
 
 | 
			
		||||
@@ -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>
 | 
			
		||||
@@ -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' }
 | 
			
		||||
      ],
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user