import { queryDeviceTypeApi } from "@/api/base/device";

export const queryDeviceTypes = () => {
  queryDeviceTypeApi({ dictType: "dev_type" })
    .then((res) => {
      formLabel[1].f_selList = res.data.map((item) => {
        return {
          label: item.dictLabel,
          value: item.dictCode,
        };
      });
    })
    .catch((err) => {});
};
export const formLabel = [
  { f_label: "设备名称", f_model: "devName", f_type: "ipt" },
  { f_label: "设备类型", f_model: "devType", f_type: "sel", f_selList: [] },
  {
    f_label: "预警日期",
    f_model: "time",
    f_type: "dateRange",
    dateType: ["startTime", "endTime"],
  },
];

export const columnsList = [
  { t_props: "devTypeName", t_label: "预警设备类型" },
  { t_props: "devName", t_label: "预警设备名称" },
  { t_props: "devCode", t_label: "预警设备编号" },
  { t_props: "warnName", t_label: "预警内容", t_slot: "warnName" },
  { t_props: "jcTime", t_label: "预警时间" },
  { t_props: "status", t_label: "状态" },
  { t_props: "remarks", t_label: "预警处置", t_slot: "remarks" },
];

export const dialogConfig = {
  outerWidth: "40%",
  outerTitle: "",
  outerVisible: false,
};
