"use strict";
const common_vendor = require("../../../common/vendor.js");
if (!Array) {
  const _easycom_u_navbar2 = common_vendor.resolveComponent("u-navbar");
  const _component_xbutton = common_vendor.resolveComponent("xbutton");
  const _easycom_u_icon2 = common_vendor.resolveComponent("u-icon");
  const _easycom_u_tabs2 = common_vendor.resolveComponent("u-tabs");
  const _easycom_u_subsection2 = common_vendor.resolveComponent("u-subsection");
  const _component_qiun_data_charts = common_vendor.resolveComponent("qiun-data-charts");
  const _easycom_u__image2 = common_vendor.resolveComponent("u--image");
  const _component_xpopup = common_vendor.resolveComponent("xpopup");
  const _easycom_u__input2 = common_vendor.resolveComponent("u--input");
  const _easycom_u_form_item2 = common_vendor.resolveComponent("u-form-item");
  const _easycom_u__form2 = common_vendor.resolveComponent("u--form");
  const _easycom_u_slider2 = common_vendor.resolveComponent("u-slider");
  const _easycom_u_radio2 = common_vendor.resolveComponent("u-radio");
  const _easycom_u_radio_group2 = common_vendor.resolveComponent("u-radio-group");
  const _easycom_u_number_box2 = common_vendor.resolveComponent("u-number-box");
  const _component_tki_tree = common_vendor.resolveComponent("tki-tree");
  const _easycom_u_picker2 = common_vendor.resolveComponent("u-picker");
  const _easycom_u_back_top2 = common_vendor.resolveComponent("u-back-top");
  (_easycom_u_navbar2 + _component_xbutton + _easycom_u_icon2 + _easycom_u_tabs2 + _easycom_u_subsection2 + _component_qiun_data_charts + _easycom_u__image2 + _component_xpopup + _easycom_u__input2 + _easycom_u_form_item2 + _easycom_u__form2 + _easycom_u_slider2 + _easycom_u_radio2 + _easycom_u_radio_group2 + _easycom_u_number_box2 + _component_tki_tree + _easycom_u_picker2 + _easycom_u_back_top2)();
}
const _easycom_u_navbar = () => "../../../node-modules/uview-plus/components/u-navbar/u-navbar.js";
const _easycom_u_icon = () => "../../../node-modules/uview-plus/components/u-icon/u-icon.js";
const _easycom_u_tabs = () => "../../../node-modules/uview-plus/components/u-tabs/u-tabs.js";
const _easycom_u_subsection = () => "../../../node-modules/uview-plus/components/u-subsection/u-subsection.js";
const _easycom_u__image = () => "../../../node-modules/uview-plus/components/u--image/u--image.js";
const _easycom_u__input = () => "../../../node-modules/uview-plus/components/u--input/u--input.js";
const _easycom_u_form_item = () => "../../../node-modules/uview-plus/components/u-form-item/u-form-item.js";
const _easycom_u__form = () => "../../../node-modules/uview-plus/components/u--form/u--form.js";
const _easycom_u_slider = () => "../../../node-modules/uview-plus/components/u-slider/u-slider.js";
const _easycom_u_radio = () => "../../../node-modules/uview-plus/components/u-radio/u-radio.js";
const _easycom_u_radio_group = () => "../../../node-modules/uview-plus/components/u-radio-group/u-radio-group.js";
const _easycom_u_number_box = () => "../../../node-modules/uview-plus/components/u-number-box/u-number-box.js";
const _easycom_u_picker = () => "../../../node-modules/uview-plus/components/u-picker/u-picker.js";
const _easycom_u_back_top = () => "../../../node-modules/uview-plus/components/u-back-top/u-back-top.js";
if (!Math) {
  (_easycom_u_navbar + _easycom_u_icon + _easycom_u_tabs + _easycom_u_subsection + _easycom_u__image + _easycom_u__input + _easycom_u_form_item + _easycom_u__form + _easycom_u_slider + _easycom_u_radio + _easycom_u_radio_group + _easycom_u_number_box + _easycom_u_picker + _easycom_u_back_top)();
}
const _sfc_main = {
  __name: "deviceDetail",
  setup(__props) {
    const { proxy } = common_vendor.getCurrentInstance();
    proxy.$useDict("device_type", "device_online_status", "device_busy_status", "device_active_status");
    common_vendor.reactive({
      device_type: [],
      online_status: [],
      busy_status: [],
      active_status: []
    });
    common_vendor.reactive({
      activityState: "",
      opts: {
        padding: [15, 10, 0, 15],
        dataLabel: false,
        color: ["#2D54EC", "#F49B37"],
        // 开启图表可拖拽滚动
        // enableScroll: true,
        dataPointShape: false,
        //是否显示折线上的点
        xAxis: {
          // 开启图表可拖拽滚动后 必配置（显示多少个）
          // itemCount: 8,
          rotateLabel: true,
          labelCount: 10,
          marginTop: 10
        },
        yAxis: {
          splitNumber: 5,
          gridType: "dash",
          dashLength: 8,
          gridColor: "rgba(0, 0, 0, 0.15)",
          data: [{
            axisLine: false
            //坐标轴轴线是否显示
          }]
        },
        extra: {
          column: {
            width: 15,
            seriesGap: 2,
            barBorderRadius: [10, 10, 10, 10]
          },
          line: {
            type: "curve",
            width: 2,
            activeType: "hollow",
            linearType: "custom",
            onShadow: true,
            animation: "horizontal"
          }
        }
      },
      current: "经营数据",
      chartTab: [
        {
          name: "经营数据"
        },
        {
          name: "经营图表"
        },
        {
          name: "温度图表"
        },
        {
          name: "信号图表"
        }
      ],
      chartData: {
        series: [],
        categories: []
      },
      errorMessage: "无数据",
      tempStatus: [
        { value: 2, label: "温控仪检测失败" },
        { value: 3, label: "温控仪故障" },
        { value: 120, label: "温控仪检测失败" },
        { value: 170, label: "未读取到温度" },
        { value: 161, label: "温控仪通讯故障" },
        { value: 162, label: "温控仪故障" },
        { value: 255, label: "无温控仪" }
      ],
      tempDetail: {
        targetTemp: 4,
        selTempWorkModel: 2,
        start1: 0,
        end1: 0,
        start2: 0,
        end2: 0,
        start3: 0,
        end3: 0,
        curTimes: 0
      },
      tempWorkModels: [{
        name: "制热",
        id: 1
      }, {
        name: "制冷",
        id: 2
      }, {
        name: "恒温",
        id: 3
      }, {
        name: "关闭",
        id: 4
      }],
      showTimeSelPicker: false,
      timeSelPickerType: void 0,
      times: [
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24],
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
      ],
      lightDetail: {
        open: true,
        start1: 0,
        end1: 0,
        start2: 0,
        end2: 0,
        start3: 0,
        end3: 0,
        curTimes: 0
      },
      totalTab: ["今日", "本月"],
      time: 0,
      show: false,
      popupTitle: "编辑商品",
      editForm: {
        name: null,
        areaName: null,
        areaId: null,
        lineId: null,
        placeId: null,
        lineName: null,
        placeName: null,
        lon: null,
        lat: null,
        pos: null
      },
      editRules: {
        "code": {
          type: "string",
          required: true,
          message: "必填项",
          trigger: ["blur", "change"]
        }
      },
      title: "",
      //弹框标题
      voice: 4,
      //声音设置
      light: 50,
      //灯光设置
      id: null,
      //设备id
      detail: {},
      //设备详情
      allCountData: {},
      //经营统计数据显示
      scrollTop: 0,
      //滚动距离顶部
      operaRecordsFlag: false,
      //操作记录
      netRecordsFlag: false,
      //在线情况
      errRecordCameraFlag: false,
      //摄像头故障情况
      errRecordLockFlag: false,
      //锁故障数据情况
      tempRecordsFlag: false,
      //温度数据情况
      operaRecords: [],
      //设备操作记录
      netRecords: [],
      //在线情况记录
      errRecordLock: [],
      //锁故障数据
      errRecordCamera: [],
      //摄像头故障数据
      deviceTempRecords: [],
      //温度记录
      isMore: true,
      // 编辑弹框
      areaShow: false,
      pickerShow: false,
      areaList: [],
      //区域数据
      columns: [],
      //picker数据
      pickerType: 1,
      //1线路2点位
      goodsManageData: {
        categoryNum: 0,
        stock: 0,
        afterFillStock: 0
      },
      countData: {
        salesMoney: 0,
        salesCount: 0,
        refundMoney: 0
      },
      pointColumns: [],
      lineColumns: [],
      qrcodeShow: false,
      qrCodeImg: null,
      btnState: null,
      devicePos: null
    });
    return (_ctx, _cache) => {
      return common_vendor.e({
        a: common_vendor.o(_ctx.rightClick),
        b: common_vendor.p({
          title: "设备详情",
          titleStyle: "color:#fff;fontSize:36rpx;",
          bgColor: "#2C6FF3",
          autoBack: true,
          leftIconColor: "#fff",
          placeholder: true
        }),
        c: _ctx.detail.deviceName
      }, _ctx.detail.deviceName ? {
        d: common_vendor.t(_ctx.detail.deviceName),
        e: common_vendor.t(_ctx.detail.deviceId)
      } : {
        f: common_vendor.t(_ctx.detail.deviceId)
      }, {
        g: common_vendor.t(_ctx.detail.netStateName || "离线"),
        h: common_vendor.n(_ctx.detail.netStateName == "在线" ? "t-right" : "t-right off"),
        i: common_vendor.t(_ctx.detail.busyState == 1 ? "运营中" : "已停运"),
        j: common_vendor.n(_ctx.detail.busyState == 1 ? "t-right" : "t-right off"),
        k: common_vendor.t(_ctx.activityState),
        l: _ctx.activityState.length > 0,
        m: common_vendor.p({
          round: "25rpx",
          padding: "4rpx 10rpx",
          size: "mini",
          bgColor: _ctx.activityState == "异常" ? "#ff0000" : "#66CC00",
          color: "#fff"
        }),
        n: common_vendor.t(_ctx.detail.deviceStatus.doorStateL == 2 ? "已关门" : "已开门"),
        o: common_vendor.p({
          round: "25rpx",
          padding: "4rpx 10rpx",
          size: "mini",
          bgColor: _ctx.detail.deviceStatus.doorStateL == 2 ? "#66CC00" : "#FFCC33",
          color: "#fff"
        }),
        p: common_vendor.o(_ctx.downloadQr),
        q: common_vendor.p({
          size: "mini",
          bgColor: "#fff",
          borderColor: "#2C6FF3",
          color: "#2C6FF3"
        }),
        r: common_vendor.o(($event) => _ctx.btnClick("编辑")),
        s: common_vendor.p({
          size: "mini"
        }),
        t: common_vendor.t(_ctx.detail.deviceId || "/"),
        v: _ctx.detail.mercDeviceCode
      }, _ctx.detail.mercDeviceCode ? {
        w: common_vendor.o(($event) => _ctx.copy(_ctx.detail.deviceId))
      } : {}, {
        x: common_vendor.t(_ctx.detail.mercName || "/"),
        y: common_vendor.t(_ctx.detail.deviceStatus.tempValue),
        z: common_vendor.t(_ctx.detail.deviceStatus.netDbm || "/"),
        A: _ctx.detail.deviceStatus.netDbm < -90
      }, _ctx.detail.deviceStatus.netDbm < -90 ? {} : _ctx.detail.deviceStatus.netDbm > -90 && _ctx.detail.deviceStatus.netDbm < -40 ? {} : _ctx.detail.deviceStatus.netDbm > -40 && _ctx.detail.deviceStatus.netDbm < 0 ? {} : _ctx.detail.deviceStatus.netDbm == 0 ? {} : {}, {
        B: _ctx.detail.deviceStatus.netDbm > -90 && _ctx.detail.deviceStatus.netDbm < -40,
        C: _ctx.detail.deviceStatus.netDbm > -40 && _ctx.detail.deviceStatus.netDbm < 0,
        D: _ctx.detail.deviceStatus.netDbm == 0,
        E: common_vendor.t(_ctx.detail.deviceSysinfo.simIccid || "/"),
        F: common_vendor.o((...args) => _ctx.detail.deviceSysinfo.simIccid && _ctx.detail.deviceSysinfo.simIccid(...args)),
        G: common_vendor.t(_ctx.detail.deviceSysinfo.appUpmVersion || "/"),
        H: common_vendor.t(_ctx.detail.updateTime || "/"),
        I: _ctx.detail.activeState == 1
      }, _ctx.detail.activeState == 1 ? {} : {}, {
        J: common_vendor.t(_ctx.detail.activeTime || "/"),
        K: common_vendor.t(_ctx.detail.districtName || "/"),
        L: common_vendor.t(_ctx.detail.placeName || "/"),
        M: common_vendor.t(_ctx.detail.placeLineName || "/"),
        N: common_vendor.p({
          size: "20",
          name: "map"
        }),
        O: common_vendor.o((...args) => _ctx.showPos && _ctx.showPos(...args)),
        P: common_vendor.p({
          name: _ctx.isMore ? "arrow-down" : "arrow-up",
          color: "#999",
          size: "20"
        }),
        Q: common_vendor.o(($event) => _ctx.isMore = !_ctx.isMore),
        R: common_vendor.n(_ctx.isMore ? "center center-more" : "center"),
        S: common_vendor.o(($event) => _ctx.btnClick("设备重启")),
        T: common_vendor.o(($event) => _ctx.btnClick("声音设置")),
        U: common_vendor.o(($event) => _ctx.btnClick("温度设置")),
        V: common_vendor.o(($event) => _ctx.btnClick("灯光设置")),
        W: common_vendor.o(($event) => _ctx.btnClick("清除故障")),
        X: common_vendor.t(_ctx.btnState),
        Y: common_vendor.o(($event) => _ctx.btnClick(_ctx.btnState)),
        Z: common_vendor.o(_ctx.tabClick),
        aa: common_vendor.p({
          list: _ctx.chartTab,
          scrollable: false,
          lineColor: "#2C6FF3"
        }),
        ab: _ctx.current == "经营数据"
      }, _ctx.current == "经营数据" ? {
        ac: common_vendor.o(_ctx.totalChange),
        ad: common_vendor.p({
          activeColor: "#2C6FF3",
          list: _ctx.totalTab,
          current: _ctx.time
        }),
        ae: common_vendor.t(_ctx.$xy.delMoney(_ctx.countData.salesMoney)),
        af: common_vendor.t(_ctx.countData.salesCount || 0),
        ag: common_vendor.t(_ctx.$xy.delMoney(_ctx.countData.refundMoney)),
        ah: common_vendor.o(_ctx.orderDetails),
        ai: common_vendor.p({
          width: "140"
        }),
        aj: common_vendor.o(_ctx.more),
        ak: common_vendor.p({
          width: "140"
        })
      } : {
        al: common_vendor.p({
          canvasId: "canvasString",
          canvas2d: true,
          ontouch: true,
          type: "line",
          opts: _ctx.opts,
          chartData: _ctx.chartData,
          errorMessage: _ctx.errorMessage
        })
      }, {
        am: common_vendor.t(_ctx.goodsManageData.categoryNum || 0),
        an: common_vendor.t(_ctx.goodsManageData.stock || 0),
        ao: common_vendor.t(_ctx.goodsManageData.afterFillStock || 0),
        ap: common_vendor.o(($event) => _ctx.$tab.navigateTo(`/pages/equipment/comManage?id=${_ctx.id}&deviceName=${_ctx.detail.deviceName}`)),
        aq: common_vendor.o(($event) => _ctx.$tab.navigateTo(`/pages/replenish/replenishmentRecord?id=${_ctx.id}`)),
        ar: common_vendor.o(($event) => _ctx.$tab.navigateTo(`/pages/replenish/replenishmentHomePage?id=${_ctx.id}&&deviceName=${_ctx.detail.deviceName}`)),
        as: common_vendor.p({
          width: "400rpx",
          height: "400rpx",
          src: _ctx.qrCodeImg,
          mode: "aspectFit",
          ["lazy-load"]: true
        }),
        at: common_vendor.o(_ctx.handleImgSave),
        av: common_vendor.o(_ctx.qrcodeClose),
        aw: common_vendor.p({
          show: _ctx.qrcodeShow,
          mode: "center",
          showBtn: false
        }),
        ax: _ctx.title == "编辑"
      }, _ctx.title == "编辑" ? {
        ay: common_vendor.o(($event) => _ctx.editForm.name = $event),
        az: common_vendor.p({
          placeholder: "设置机器名称",
          border: "none",
          modelValue: _ctx.editForm.name
        }),
        aA: common_vendor.sr("item1", "d4784c2a-17,d4784c2a-16"),
        aB: common_vendor.p({
          labelWidth: "90",
          label: "名称",
          prop: "name",
          borderBottom: true
        }),
        aC: common_vendor.o(($event) => _ctx.editForm.areaName = $event),
        aD: common_vendor.p({
          placeholder: "设置机器区域",
          readonly: true,
          border: "none",
          modelValue: _ctx.editForm.areaName
        }),
        aE: common_vendor.sr("item1", "d4784c2a-19,d4784c2a-16"),
        aF: common_vendor.o(_ctx.areaChoose),
        aG: common_vendor.p({
          labelWidth: "90",
          label: "区域",
          prop: "areaName",
          borderBottom: true
        }),
        aH: common_vendor.o(($event) => _ctx.editForm.lineName = $event),
        aI: common_vendor.p({
          placeholder: "设置机器线路",
          readonly: true,
          border: "none",
          modelValue: _ctx.editForm.lineName
        }),
        aJ: common_vendor.sr("item1", "d4784c2a-21,d4784c2a-16"),
        aK: common_vendor.o(_ctx.lineChoose),
        aL: common_vendor.p({
          labelWidth: "90",
          label: "线路",
          prop: "lineName",
          borderBottom: true
        }),
        aM: common_vendor.o(($event) => _ctx.editForm.placeName = $event),
        aN: common_vendor.p({
          placeholder: "设置机器点位",
          readonly: true,
          border: "none",
          modelValue: _ctx.editForm.placeName
        }),
        aO: common_vendor.sr("item1", "d4784c2a-23,d4784c2a-16"),
        aP: common_vendor.o(_ctx.placeChoose),
        aQ: common_vendor.p({
          labelWidth: "90",
          label: "点位",
          prop: "placeName",
          borderBottom: true
        }),
        aR: common_vendor.o(($event) => _ctx.devicePos = $event),
        aS: common_vendor.p({
          placeholder: "设置机器位置",
          readonly: true,
          border: "none",
          modelValue: _ctx.devicePos
        }),
        aT: common_vendor.p({
          size: "26",
          name: "map"
        }),
        aU: common_vendor.o(_ctx.getLocation),
        aV: common_vendor.p({
          labelWidth: "90",
          label: "位置",
          prop: "lon",
          borderBottom: true
        }),
        aW: common_vendor.p({
          labelPosition: "left",
          model: _ctx.editForm
        })
      } : {}, {
        aX: _ctx.title == "设备重启"
      }, _ctx.title == "设备重启" ? {} : {}, {
        aY: _ctx.title == "暂停营业" || _ctx.title == "开始营业"
      }, _ctx.title == "暂停营业" || _ctx.title == "开始营业" ? {
        aZ: common_vendor.t(_ctx.btnState)
      } : {}, {
        ba: _ctx.title == "声音设置"
      }, _ctx.title == "声音设置" ? {
        bb: common_vendor.o(($event) => _ctx.voice = $event),
        bc: common_vendor.p({
          showValue: true,
          min: "0",
          max: "25",
          modelValue: _ctx.voice
        })
      } : {}, {
        bd: _ctx.title == "温度设置"
      }, _ctx.title == "温度设置" ? {
        be: common_vendor.f(_ctx.tempWorkModels, (item, index, i0) => {
          return {
            a: index,
            b: "d4784c2a-30-" + i0 + ",d4784c2a-29",
            c: common_vendor.p({
              customStyle: {
                marginBottom: "16rpx",
                marginLeft: "16rpx"
              },
              label: item.name,
              name: item.id
            })
          };
        }),
        bf: common_vendor.o(($event) => _ctx.tempDetail.selTempWorkModel = $event),
        bg: common_vendor.p({
          placement: "row",
          modelValue: _ctx.tempDetail.selTempWorkModel
        }),
        bh: common_vendor.o(($event) => _ctx.tempDetail.targetTemp = $event),
        bi: common_vendor.p({
          ["button-size"]: "30",
          modelValue: _ctx.tempDetail.targetTemp
        }),
        bj: common_vendor.t(_ctx.tempDetail.start1),
        bk: common_vendor.t(_ctx.tempDetail.end1),
        bl: common_vendor.o(($event) => _ctx.pickerTimes("temp", 0)),
        bm: common_vendor.t(_ctx.tempDetail.start2),
        bn: common_vendor.t(_ctx.tempDetail.end2),
        bo: common_vendor.o(($event) => _ctx.pickerTimes("temp", 1)),
        bp: common_vendor.t(_ctx.tempDetail.start3),
        bq: common_vendor.t(_ctx.tempDetail.end3),
        br: common_vendor.o(($event) => _ctx.pickerTimes("temp", 2))
      } : {}, {
        bs: _ctx.title == "灯光设置"
      }, _ctx.title == "灯光设置" ? {
        bt: common_vendor.t(_ctx.lightDetail.start1),
        bv: common_vendor.t(_ctx.lightDetail.end1),
        bw: common_vendor.o(($event) => _ctx.pickerTimes("light", 0)),
        bx: common_vendor.t(_ctx.lightDetail.start2),
        by: common_vendor.t(_ctx.lightDetail.end2),
        bz: common_vendor.o(($event) => _ctx.pickerTimes("light", 1)),
        bA: common_vendor.t(_ctx.lightDetail.start3),
        bB: common_vendor.t(_ctx.lightDetail.end3),
        bC: common_vendor.o(($event) => _ctx.pickerTimes("light", 2))
      } : {}, {
        bD: _ctx.title == "清除故障"
      }, _ctx.title == "清除故障" ? {} : {}, {
        bE: common_vendor.o(_ctx.close),
        bF: common_vendor.o(_ctx.submit),
        bG: common_vendor.p({
          show: _ctx.show,
          showBtn: true,
          title: _ctx.title
        }),
        bH: common_vendor.o(_ctx.areaSubmit),
        bI: common_vendor.p({
          range: _ctx.areaList,
          foldAll: false,
          rangeKey: "name",
          idKey: "name",
          buttonName: "选中"
        }),
        bJ: common_vendor.o(_ctx.areaClose),
        bK: common_vendor.p({
          show: _ctx.areaShow,
          showBtn: false,
          title: "选择区域"
        }),
        bL: common_vendor.o(_ctx.pickerConfirm),
        bM: common_vendor.o(_ctx.pickerClose),
        bN: common_vendor.o(_ctx.pickerClose),
        bO: common_vendor.p({
          show: _ctx.pickerShow,
          closeOnClickOverlay: true,
          columns: _ctx.columns,
          keyName: "label"
        }),
        bP: common_vendor.sr("uPicker", "d4784c2a-35"),
        bQ: common_vendor.o(_ctx.pickerTimeConfirm),
        bR: common_vendor.o(_ctx.pickerTimeChangeHandler),
        bS: common_vendor.p({
          show: _ctx.showTimeSelPicker,
          columns: _ctx.times
        }),
        bT: common_vendor.p({
          ["scroll-top"]: _ctx.scrollTop,
          top: "400"
        })
      });
    };
  }
};
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-d4784c2a"], ["__file", "F:/兴元/开门柜项目/平台端管理系统小程序/src/pages/xy_system/devices/deviceDetail.vue"]]);
wx.createPage(MiniProgramPage);
