<template>
  <div id="paramSetting">
    <el-main>

      <div style="margin-bottom: 10px">
        <el-button size="medium" icon="el-icon-back" type="text"
                   style="background-color: rgb(245,247,249);color: black" @click="back">返回
        </el-button>
        <span style="margin-left: 20px; font-size: 18px">参数设定</span>
      </div>

      <div style="background-color: white;padding: 20px;height: 134px ;display: flex;flex-direction: row">
        <div style="display: flex;flex-direction: column;margin-left: 200px">
          <div @click="dialog1" style="width: 320px">
            排风温度设定：
            <el-input v-model="formData.WD_SD" placeholder="请输入内容" size="small"
                      style="width: 160px;"></el-input>&nbsp;℃
          </div>
          <div style="margin-top: 16px ;width: 320px" @click="dialog2">
            排风湿度设定：
            <el-input v-model="formData.SD_SD" placeholder="请输入内容" size="small" style="width: 160px;"></el-input>&nbsp;%
          </div>
          <div style="margin-top: 18px;width: 320px" @click="dialog3">
            停机延时设定：
            <el-input v-model="formData.JZ_YSTZ" placeholder="请输入内容" size="small" style="width: 160px;"></el-input>&nbsp;s
          </div>
        </div>

        <div class="BUT">
          <div>
            控制选择模式：
            <el-button
                type="primary"
                @click="JZXZ"
                size="small"
                class="Blue_button"
                :class="{'Green_button' :formData.JZ_XZ == 1}"
            >

              {{ formData.JZ_XZ == 0 ? "CK1" : "CK2" }}
            </el-button>
          </div>

          <div style="margin-top: 20px">
            控制模式复位：
            <el-button
                @click="MSXZ"
                class="Blue_button"
                :class="{'Green_button' :formData.MS_XZ == 1}"
                type="primary"
                size="small"
            >
              {{ formData.MS_XZ == 0 ? "主用" : "备用" }}
            </el-button>
          </div>

          <div style="margin-top: 20px;margin-left: 32px">
            故障复位：
            <el-button
                @click="GZFW"
                class="Blue_button"
                type="primary"
                size="small"
                :class="{'Red_button' :formData.GZ_FW == 1}">
              {{ formData.GZ_FW == 0 ? "关闭" : "打开" }}
            </el-button>
          </div>
        </div>


      </div>

      <div class="All">
        <div>
          <div class="head">
            <span>设备名称</span>
            <span>控制模式</span>
            <span>手动命令</span>
            <span>实时反馈</span>
          </div>

          <div class="item">
            <span>空调送风机</span>
            <el-button size="small" @click="shouZiDongSFJ" class="Blue_button"
                       :class="{'Green_button' :formData.SFJ_SZXZ == 1}"
            >
              {{ formData.SFJ_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="shouZiDongSFJSD" class="Blue_button"
                       :class="{'Red_button' :formData.SFJ_SDQD == 0}"
                       style="margin-right: 30px">
              {{ formData.SFJ_SDQD == 1 ? '启动' : '停止' }}
            </el-button>
            <span style="margin-right: 14px">{{ formData.SFJ_QT == 0 ? "停止" : "启动" }}</span>
          </div>

          <div class="item">
            <span>空调排风机</span>
            <el-button size="small" @click="shouZiDongPFJ" class="Blue_button"
                       :class="{'Green_button' :formData.PFJ_SZXZ == 1}">
              {{ formData.PFJ_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="shouZiDongPFJSD" class="Blue_button"
                       :class="{'Red_button' :formData.PFJ_SDQD == 0}"
                       style="margin-right: 30px">
              {{ formData.PFJ_SDQD == 1 ? '启动' : '停止' }}
            </el-button>
            <span style="margin-right: 14px">{{ formData.PFJ_QT == 0 ? "停止" : "启动" }}</span>
          </div>

          <div class="item">
            <span>风 冷 主 机</span>
            <el-button size="small" @click="shouZiDongFLZJ" :class="{'Green_button' :formData.FLZJ_SZXZ == 1}">
              {{ formData.FLZJ_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="shouZiDongFLZJSD" :class="{'Red_button' :formData.FLZJ_SDQD == 0}"
                       style="margin-right: 30px">
              {{ formData.FLZJ_SDQD == 1 ? '启动' : '停止' }}
            </el-button>
            <span style="margin-right: 14px">{{ formData.FLZJ_QT == 0 ? "停止" : "启动" }}</span>
          </div>

          <div class="item">
            <span>一级电加热</span>
            <el-button size="small" @click="shouZiDongYJDJRSS" :class="{'Green_button' :formData.YJDJR_SZXZ == 1}">
              {{ formData.YJDJR_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="shouZiDongYJDJRSDSS" :class="{'Red_button' :formData.YJDJR_SDQD == 0}"
                       style="margin-right: 30px">
              {{ formData.YJDJR_SDQD == 1 ? '启动' : '停止' }}
            </el-button>
            <span style="margin-right: 14px">{{ formData.YJDJR_QT == 0 ? "停止" : "启动" }}</span>
          </div>

          <div class="item">
            <span>二级电加热</span>
            <el-button size="small" @click="shouZiDongEJDJRSS" :class="{'Green_button' :formData.EJDJR_SZXZ == 1}">
              {{ formData.EJDJR_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="shouZiDongEJDJRSDSS" :class="{'Red_button' :formData.EJDJR_SDQD == 0}"
                       style="margin-right: 30px">
              {{ formData.EJDJR_SDQD == 1 ? '启动' : '停止' }}
            </el-button>
            <span style="margin-right: 14px">{{ formData.EJDJR_QT == 0 ? "停止" : "启动" }}</span>
          </div>

          <div class="item">
            <span>三级电加热</span>
            <el-button size="small" @click="shouZiDongSJDJRSS" :class="{'Green_button' :formData.SJDJR_SZXZ == 1}">
              {{ formData.SJDJR_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="shouZiDongSJDJRSDSS" :class="{'Red_button' :formData.SJDJR_SDQD == 0}"
                       style="margin-right: 30px">
              {{ formData.SJDJR_SDQD == 1 ? '启动' : '停止' }}
            </el-button>
            <span style="margin-right: 14px">{{ formData.SJDJR_QT == 0 ? "停止" : "启动" }}</span>
          </div>

          <div class="item">
            <span>空调送风阀</span>
            <el-button size="small" @click="shouZiDongSFF" :class="{'Green_button' :formData.SFF_SZXZ == 1}">
              {{ formData.SFF_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>

            <el-button size="small" @click="shouZiDongSFFSD" :class="{'Red_button' :formData.SFF_SDQD == 0}"
                       style="margin-right: 30px">
              {{ formData.SFF_SDQD == 1 ? '启动' : '停止' }}
            </el-button>

            <span style="margin-right: 14px">{{ formData.SFF_KGKZ == 0 ? "关闭" : "打开" }}</span>
          </div>

          <div class="item">
            <span>空调排风阀</span>
            <el-button size="small" @click="shouZiDongPFF" :class="{'Green_button' :formData.PFF_SZXZ == 1}">
              {{ formData.PFF_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="shouZiDongPFFSD" :class="{'Red_button' :formData.PFF_SDQD == 0}"
                       style="margin-right: 30px">
              {{ formData.PFF_SDQD == 1 ? '启动' : '停止' }}
            </el-button>
            <span style="margin-right: 14px">{{ formData.PFF_KGKZ == 0 ? "关闭" : "打开" }}</span>
          </div>

          <div class="item">
            <span>空调冷水阀</span>
            <el-button style="margin-left: 26px" size="small" @click="shouZiDongLSF"
                       :class="{'Green_button' :formData.LSF_SZXZ == 1}">
              {{ formData.LSF_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="dialogA"
                       style="margin-right: 30px">
              {{ formData.LSF_SDKD }} %
            </el-button>
            <span style="margin-right: 14px">{{ formData.LSF }}%</span>
          </div>

          <div class="item">
            <span>空调热水阀</span>
            <el-button style="margin-left: 26px" size="small" @click="shouZiDongRSF"
                       :class="{'Green_button' :formData.RSF_SZXZ == 1}">
              {{ formData.RSF_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="dialogB"
                       style="margin-right: 30px">
              {{ formData.RSF_SDKD }} %
            </el-button>
            <span style="margin-right: 14px">{{ formData.RSF }}%</span>
          </div>

          <div class="item" style="border-bottom: 0px">
            <span>空调加湿器</span>
            <el-button style="margin-left: 26px" size="small" @click="shouZiDongJSF"
                       :class="{'Green_button' :formData.JSF_SZXZ == 1}">
              {{ formData.JSF_SZXZ == 0 ? '自动' : '手动' }}
            </el-button>
            <el-button size="small" @click="dialogC"
                       style="margin-right: 30px">
              {{ formData.JSF_SDKD }} %
            </el-button>
            <span style="margin-right: 14px">{{ formData.JSF }}%</span>
          </div>


        </div>


      </div>

      <!-- 输入框1 -->
      <div>
        <el-dialog
            title="（输入范围：0至50.0）"
            :visible.sync="dialogVisible1"
            width="25%"
            style="margin-left: 160px;margin-top: 120px"
        >
          <div class="dialog">
            排风温度设定：
            <el-input v-model="objectWD_SD" placeholder="请输入内容" size="small"
                      style="width: 160px;"></el-input>&nbsp;℃
          </div>
          <div class="dialog">
                <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible1 = false">取 消</el-button>
    <el-button type="primary" @click="dialogConfirm1">确 定</el-button>
  </span>
          </div>


        </el-dialog>
      </div>

      <!-- 输入框2 -->
      <div>
        <el-dialog
            title="（输入范围：0至100.0）"
            :visible.sync="dialogVisible2"
            width="25%"
            style="margin-left: 160px;margin-top: 120px"
        >
          <div class="dialog">
            排风湿度设定：
            <el-input v-model="objectSD_SD" placeholder="请输入内容" size="small"
                      style="width: 160px;"></el-input>&nbsp;%
          </div>
          <div class="dialog">
                <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible2 = false">取 消</el-button>
    <el-button type="primary" @click="dialogConfirm2">确 定</el-button>
  </span>
          </div>


        </el-dialog>
      </div>

      <!-- 输入框3 -->
      <div>
        <el-dialog
            title="（输入范围：0至9999）"
            :visible.sync="dialogVisible3"
            width="25%"
            style="margin-left: 160px;margin-top: 120px"
        >
          <div class="dialog">
            延时停止设定：
            <el-input v-model="objectYSTZ" placeholder="请输入内容" size="small"
                      style="width: 160px;"></el-input>&nbsp;s
          </div>
          <div class="dialog">
                <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible3 = false">取 消</el-button>
    <el-button type="primary" @click="dialogConfirm3">确 定</el-button>
  </span>
          </div>


        </el-dialog>
      </div>

      <!-- 输入框A -->
      <div>
        <el-dialog
            title="（输入范围：0至100.0）"
            :visible.sync="dialogVisibleA"
            width="25%"
            style="margin-left: 160px;margin-top: 120px"
        >
          <div class="dialog">
            空调冷水阀：
            <el-input v-model="objectLSF" placeholder="请输入内容" size="small"
                      style="width: 160px;"></el-input>&nbsp;s
          </div>
          <div class="dialog">
                <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisibleA = false">取 消</el-button>
    <el-button type="primary" @click="dialogConfirmA">确 定</el-button>
  </span>
          </div>


        </el-dialog>
      </div>

      <!-- 输入框B -->
      <div>
        <el-dialog
            title="（输入范围：0至100.0）"
            :visible.sync="dialogVisibleB"
            width="25%"
            style="margin-left: 160px;margin-top: 120px"
        >
          <div class="dialog">
            空调热水阀：
            <el-input v-model="objectRSF" placeholder="请输入内容" size="small"
                      style="width: 160px;"></el-input>&nbsp;s
          </div>
          <div class="dialog">
                <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisibleB = false">取 消</el-button>
    <el-button type="primary" @click="dialogConfirmB">确 定</el-button>
  </span>
          </div>


        </el-dialog>
      </div>

      <!-- 输入框C -->
      <div>
        <el-dialog
            title="（输入范围：0至100.0）"
            :visible.sync="dialogVisibleC"
            width="25%"
            style="margin-left: 160px;margin-top: 120px"
        >
          <div class="dialog">
            空调加湿器：
            <el-input v-model="objectJSF" placeholder="请输入内容" size="small"
                      style="width: 160px;"></el-input>&nbsp;s
          </div>
          <div class="dialog">
                <span slot="footer" class="dialog-footer">
    <el-button @click="dialogVisibleC = false">取 消</el-button>
    <el-button type="primary" @click="dialogConfirmC">确 定</el-button>
  </span>
          </div>
        </el-dialog>
      </div>

    </el-main>
  </div>

</template>

<script>
export default {
  name: 'paramSetting',
  data() {
    return {
      objectLSF: '',
      objectRSF: '',
      objectJSF: '',

      objectWD_SD: '',
      objectSD_SD: '',
      objectYSTZ: '',


      dialogVisible1: false,
      dialogFormVisible1: false,
      dialogVisible2: false,
      dialogFormVisible2: false,
      dialogVisible3: false,
      dialogFormVisible3: false,

      dialogVisibleA: false,
      dialogFormVisibleA: false,
      dialogVisibleB: false,
      dialogFormVisibleB: false,
      dialogVisibleC: false,
      dialogFormVisibleC: false,

      formData: {
        GZ_FW: '',
        JZ_XZ: '',
        MS_XZ: '',

        RSF: '',
        LSF: '',
        JSF: '',
        WD_SD: '',
        SD_SD: '',
        JZ_YSTZ: '',
        RSF_SDKD: '', //热水温度手动_设定(0~100,单位为%)
        LSF_SDKD: '', //冷水温度手动_设定(0~100,单位为%)
        JSF_SDKD: '', //电加湿手动_设定(0~100,单位为%)

        LSF_SZXZ: '',
        RSF_SZXZ: '',
        JSF_SZXZ: '',

        //下部按钮参数
        SFF_SZXZ: '',
        SFF_SDQD: '',
        PFF_SZXZ: '',
        PFF_SDQD: '',
        SFJ_SZXZ: '',
        SFJ_SDQD: '',
        PFJ_SZXZ: '',
        PFJ_SDQD: '',
        FLZJ_SZXZ: '',
        FLZJ_SDQD: '',
        YJDJR_SZXZ: '',
        YJDJR_SDQD: '',
        EJDJR_SZXZ: '',
        EJDJR_SDQD: '',
        SJDJR_SZXZ: '',
        SJDJR_SDQD: '',

        //第四列实时反馈
        SFJ_QT: '', //送风机工频启动(:停止,1:启动)
        PFJ_QT: '', //排风机工频启动(:停止,1:启动)
        YJDJR_QT: '', //一级电加热启停(:停止,1:启动)
        EJDJR_QT: '', //二级电加热启停(:停止,1:启动)
        SJDJR_QT: '', //三级电加热启停(:停止,1:启动)
        SFF_KGKZ: '', //送风阀开关控制(:关闭,1:打开)
        PFF_KGKZ: '', //排风阀开关控制(:关闭,1:打开)
        FLZJ_QT: '', //风冷主机启停(0:停止,1:启动)

        //上部三个按钮
      },
    }
  },

  created: function () {
    this.getYSTZ()
    this.getSD_SD()
    this.getWD_SD()

    this.getJSF_SDKD()
    this.getLSF_SDKD()
    this.getRSF_SDKD()

    this.getJSF_SZXZ()
    this.getLSF_SZXZ()
    this.getRSF_SZXZ()

    //
    this.getRSF()
    this.getLSF()
    this.getJSF()
    //
    this.getYJQT()
    this.getEJQT()
    this.getSJQT()

    this.getFLZJQT()
    this.getSFFQT()
    this.getPFFQT()
    this.getSFJQT()
    this.getPFJQT()

    this.getShouZiDongSFJ()
    this.getShouZiDongSFJSD()
    this.getShouZiDongPFJ()
    this.getShouZiDongPFJSD()

    this.shouZiDongYJDJR()
    this.shouZiDongYJDJRSD()
    this.shouZiDongEJDJR()
    this.shouZiDongEJDJRSD()
    this.shouZiDongSJDJR()
    this.shouZiDongSJDJRSD()

    this.getShouZiDongSFF()
    this.getShouZiDongSFFSD()
    this.getShouZiDongPFF()
    this.getShouZiDongPFFSD()

    this.getShouZiDongFLZJ()
    this.getShouZiDongFLZJSD()
  },

  methods: {
    getSFJQT() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '262'
        }
      }).then((res) => {
        this.formData.SFJ_QT = res.data.data.deviceParam.value;
      })
    },
    getPFJQT() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '277'
        }
      }).then((res) => {
        this.formData.PFJ_QT = res.data.data.deviceParam.value;
      })
    },
    getSFFQT() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '300'
        }
      }).then((res) => {
        this.formData.SFF_KGKZ = res.data.data.deviceParam.value;
      })
    },
    getPFFQT() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '281'
        }
      }).then((res) => {
        this.formData.PFF_KGKZ = res.data.data.deviceParam.value;
      })
    },
    getFLZJQT() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '224'
        }
      }).then((res) => {
        this.formData.FLZJ_QT = res.data.data.deviceParam.value;
      })
    },
    getYJQT() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '215'
        }
      }).then((res) => {
        this.formData.YJDJR_QT = res.data.data.deviceParam.value;
      })
    },
    getEJQT() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '211'
        }
      }).then((res) => {
        this.formData.EJDJR_QT = res.data.data.deviceParam.value;
      })
    },
    getSJQT() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '213'
        }
      }).then((res) => {
        this.formData.SJDJR_QT = res.data.data.deviceParam.value;
      })
    },
    getLSF_SDKD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '238'
        }
      }).then((res) => {
        this.formData.LSF_SDKD = res.data.data.deviceParam.value;
      })
    },
    getRSF_SDKD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '289'
        }
      }).then((res) => {
        this.formData.RSF_SDKD = res.data.data.deviceParam.value;
      })
    },
    getJSF_SDKD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '288'
        }
      }).then((res) => {
        this.formData.JSF_SDKD = res.data.data.deviceParam.value;
      })
    },

    getLSF_SZXZ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '210'
        }
      }).then((res) => {
        this.formData.LSF_SZXZ = res.data.data.deviceParam.value;
      })
    },
    getRSF_SZXZ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '208'
        }
      }).then((res) => {
        this.formData.RSF_SZXZ = res.data.data.deviceParam.value;
      })
    },
    getJSF_SZXZ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '209'
        }
      }).then((res) => {
        this.formData.JSF_SZXZ = res.data.data.deviceParam.value;
      })
    },

    getJSF() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '212'
        }
      }).then((res) => {
        this.formData.JSF = res.data.data.deviceParam.value;
      })
    },
    getRSF() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '216'
        }
      }).then((res) => {
        this.formData.RSF = res.data.data.deviceParam.value;
      })
    },
    getLSF() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '268'
        }
      }).then((res) => {
        this.formData.LSF = res.data.data.deviceParam.value;
      })
    },
    getWD_SD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '296'
        }
      }).then((res) => {
        this.formData.WD_SD = res.data.data.deviceParam.value;
      })
    },
    getSD_SD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '231'
        }
      }).then((res) => {
        this.formData.SD_SD = res.data.data.deviceParam.value;
      })
    },
    getYSTZ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '219'
        }
      }).then((res) => {
        this.formData.JZ_YSTZ = res.data.data.deviceParam.value;
      })
    },

    getShouZiDongSFJ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '204'
        }
      }).then((res) => {
        this.formData.SFJ_SZXZ = res.data.data.deviceParam.value;
      })
    },
    getShouZiDongSFJSD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '261'
        }
      }).then((res) => {
        this.formData.SFJ_SDQD = res.data.data.deviceParam.value;
      })
    },
    getShouZiDongPFJ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '203'
        }
      }).then((res) => {
        this.formData.PFJ_SZXZ = res.data.data.deviceParam.value;
      })
    },
    getShouZiDongPFJSD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '263'
        }
      }).then((res) => {
        this.formData.PFJ_SDQD = res.data.data.deviceParam.value;
      })
    },

    getShouZiDongFLZJ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '305'
        }
      }).then((res) => {
        this.formData.FLZJ_SZXZ = res.data.data.deviceParam.value;
      })
    },
    getShouZiDongFLZJSD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '244'
        }
      }).then((res) => {
        this.formData.FLZJ_SDQD = res.data.data.deviceParam.value;
      })
    },

    shouZiDongYJDJR() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '249'
        }
      }).then((res) => {
        this.formData.YJDJR_SZXZ = res.data.data.deviceParam.value;
      })
    },
    shouZiDongEJDJR() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '214'
        }
      }).then((res) => {
        this.formData.EJDJR_SZXZ = res.data.data.deviceParam.value;
      })
    },


    shouZiDongSJDJR() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '265'
        }
      }).then((res) => {
        this.formData.SJDJR_SZXZ = res.data.data.deviceParam.value;
      })
    },
    shouZiDongYJDJRSD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '301'
        }
      }).then((res) => {
        this.formData.YJDJR_SDQD = res.data.data.deviceParam.value;
      })
    },
    shouZiDongEJDJRSD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '272'
        }
      }).then((res) => {
        this.formData.EJDJR_SDQD = res.data.data.deviceParam.value;
      })
    },
    shouZiDongSJDJRSD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '202'
        }
      }).then((res) => {
        this.formData.SJDJR_SDQD = res.data.data.deviceParam.value;
      })
    },

    getShouZiDongSFF() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '290'
        }
      }).then((res) => {
        this.formData.SFF_SZXZ = res.data.data.deviceParam.value;
      })
    },
    getShouZiDongSFFSD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '239'
        }
      }).then((res) => {
        this.formData.SFF_SDQD = res.data.data.deviceParam.value;
      })
    },
    getShouZiDongPFF() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '241'
        }
      }).then((res) => {
        this.formData.PFF_SZXZ = res.data.data.deviceParam.value;
      })
    },
    getShouZiDongPFFSD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.detail, {
        params: {
          id: '284'
        }
      }).then((res) => {
        this.formData.PFF_SDQD = res.data.data.deviceParam.value;
      })
    },


    dialog1() {
      this.dialogVisible1 = true;

      this.objectWD_SD = this.formData.WD_SD
    },
    dialogConfirm1() {
      this.dialogVisible1 = false;

      this.updateWD_SD();
    },
    dialog2() {
      this.dialogVisible2 = true;
      this.objectSD_SD = this.formData.SD_SD
    },
    dialogConfirm2() {
      this.dialogVisible2 = false;

      this.updateSD_SD();
    },
    dialog3() {
      this.dialogVisible3 = true;
      this.objectYSTZ = this.formData.JZ_YSTZ
    },
    dialogConfirm3() {
      this.dialogVisible3 = false;

      this.updateYSTZ();
    },

    dialogA() {
      this.dialogVisibleA = true;

      this.objectLSF = this.formData.LSF_SDKD
    },
    dialogConfirmA() {
      this.dialogVisibleA = false;

      this.updateLSF_SDKD();
    },
    dialogB() {
      this.dialogVisibleB = true;

      this.objectRSF = this.formData.RSF_SDKD
    },
    dialogConfirmB() {
      this.dialogVisibleB = false;

      this.updateRSF_SDKD();
    },
    dialogC() {
      this.dialogVisibleC = true;

      this.objectJSF = this.formData.JSF_SDKD
    },
    dialogConfirmC() {
      this.dialogVisibleC = false;

      this.updateJSF_SDKD();
    },

    updateWD_SD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '296',
          value: this.objectWD_SD,
          name: "WD_SD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
        this.getWD_SD()
      })
    },
    updateSD_SD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '231',
          value: this.objectSD_SD,
          name: "SD_SD",
          sn: "CK1"
        }
      }).then((res) => {
        this.getSD_SD()
        console.log(res);
      })
    },
    updateYSTZ() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '219',
          value: this.objectYSTZ,
          name: "JZ_YSTZ",
          sn: "CK1"
        }
      }).then((res) => {
        this.getYSTZ()
        console.log(res);
      })
    },

    updateLSF_SDKD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '238',
          value: this.objectLSF,
          name: "LSF_SDKD",
          sn: "CK1"
        }
      }).then((res) => {
        this.getLSF_SDKD()
        console.log(res);
      })
    },
    updateRSF_SDKD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '289',
          value: this.objectRSF,
          name: "RSF_SDKD",
          sn: "CK1"
        }
      }).then((res) => {
        this.getRSF_SDKD()
        console.log(res);
      })
    },
    updateJSF_SDKD() {
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '288',
          value: this.objectJSF,
          name: "JSF_SDKD",
          sn: "CK1"
        }
      }).then((res) => {
        this.getJSF_SDKD()
        console.log(res);
      })
    },

    JZXZ() {
      this.formData.JZ_XZ == 1 ? this.formData.JZ_XZ = 0 : this.formData.JZ_XZ = 1;

      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '247',
          value: this.formData.JZ_XZ,
          name: "JZ_XZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    MSXZ() {
      this.formData.MS_XZ == 1 ? this.formData.MS_XZ = 0 : this.formData.MS_XZ = 1;


      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '242',
          value: this.formData.MS_XZ,
          name: "MS_XZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    GZFW() {
      this.formData.GZ_FW == 1 ? this.formData.GZ_FW = 0 : this.formData.GZ_FW = 1;

      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '260',
          value: this.formData.GZ_FW,
          name: "GZ_FW",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongSFJ() {
      this.formData.SFJ_SZXZ == 1 ? this.formData.SFJ_SZXZ = 0 : this.formData.SFJ_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '204',
          value: this.formData.SFJ_SZXZ,
          name: "SFJ_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongSFJSD() {
      this.formData.SFJ_SDQD == 1 ? this.formData.SFJ_SDQD = 0 : this.formData.SFJ_SDQD = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '261',
          value: this.formData.SFJ_SDQD,
          name: "SFJ_SDQD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongPFJ() {
      this.formData.PFJ_SZXZ == 1 ? this.formData.PFJ_SZXZ = 0 : this.formData.PFJ_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '203',
          value: this.formData.PFJ_SZXZ,
          name: "PFJ_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongPFJSD() {
      this.formData.PFJ_SDQD == 1 ? this.formData.PFJ_SDQD = 0 : this.formData.PFJ_SDQD = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '263',
          value: this.formData.PFJ_SDQD,
          name: "PFJ_SDQD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongYJDJRSS() {
      this.formData.YJDJR_SZXZ == 1 ? this.formData.YJDJR_SZXZ = 0 : this.formData.YJDJR_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '249',
          value: this.formData.YJDJR_SZXZ,
          name: "YJDJR_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongYJDJRSDSS() {
      this.formData.YJDJR_SDQD == 1 ? this.formData.YJDJR_SDQD = 0 : this.formData.YJDJR_SDQD = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '301',
          value: this.formData.YJDJR_SDQD,
          name: "YJDJR_SDQD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongEJDJRSS() {
      this.formData.EJDJR_SZXZ == 1 ? this.formData.EJDJR_SZXZ = 0 : this.formData.EJDJR_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '214',
          value: this.formData.EJDJR_SZXZ,
          name: "EJDJR_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongEJDJRSDSS() {
      this.formData.EJDJR_SDQD == 1 ? this.formData.EJDJR_SDQD = 0 : this.formData.EJDJR_SDQD = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '272',
          value: this.formData.EJDJR_SDQD,
          name: "EJDJR_SDQD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongSJDJRSS() {
      this.formData.SJDJR_SZXZ == 1 ? this.formData.SJDJR_SZXZ = 0 : this.formData.SJDJR_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '265',
          value: this.formData.SJDJR_SZXZ,
          name: "SJDJR_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongSJDJRSDSS() {
      this.formData.SJDJR_SDQD == 1 ? this.formData.SJDJR_SDQD = 0 : this.formData.SJDJR_SDQD = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '202',
          value: this.formData.SJDJR_SDQD,
          name: "SJDJR_SDQD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongSFF() {
      this.formData.SFF_SZXZ == 1 ? this.formData.SFF_SZXZ = 0 : this.formData.SFF_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '290',
          value: this.formData.SFF_SZXZ,
          name: "SFF_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongSFFSD() {
      this.formData.SFF_SDQD == 1 ? this.formData.SFF_SDQD = 0 : this.formData.SFF_SDQD = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '239',
          value: this.formData.SFF_SDQD,
          name: "SFF_SDQD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongPFF() {
      this.formData.PFF_SZXZ == 1 ? this.formData.PFF_SZXZ = 0 : this.formData.PFF_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '241',
          value: this.formData.PFF_SZXZ,
          name: "PFF_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongPFFSD() {
      this.formData.PFF_SDQD == 1 ? this.formData.PFF_SDQD = 0 : this.formData.PFF_SDQD = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '284',
          value: this.formData.PFF_SDQD,
          name: "PFF_SDQD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongLSF() {
      this.formData.LSF_SZXZ == 1 ? this.formData.LSF_SZXZ = 0 : this.formData.LSF_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '210',
          value: this.formData.LSF_SZXZ,
          name: "LSF_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongRSF() {
      this.formData.RSF_SZXZ == 1 ? this.formData.RSF_SZXZ = 0 : this.formData.RSF_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '208',
          value: this.formData.RSF_SZXZ,
          name: "RSF_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },
    shouZiDongJSF() {
      this.formData.JSF_SZXZ == 1 ? this.formData.JSF_SZXZ = 0 : this.formData.JSF_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '209',
          value: this.formData.JSF_SZXZ,
          name: "JSF_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongFLZJ() {
      this.formData.FLZJ_SZXZ == 1 ? this.formData.FLZJ_SZXZ = 0 : this.formData.FLZJ_SZXZ = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '305',
          value: this.formData.FLZJ_SZXZ,
          name: "FLZJ_SZXZ",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },

    shouZiDongFLZJSD() {
      this.formData.FLZJ_SDQD == 1 ? this.formData.FLZJ_SDQD = 0 : this.formData.FLZJ_SDQD = 1;
      const vm = this;
      vm.$http.get(vm.$api.deviceParam.updateParam, {
        params: {
          id: '244',
          value: this.formData.FLZJ_SDQD,
          name: "FLZJ_SDQD",
          sn: "CK1"
        }
      }).then((res) => {
        console.log(res);
      })
    },


    back() {
      let vm = this;
      vm.$router.back()
    },
  }
}
</script>

<style scoped>
.All {
  padding: 0px;
  border: 1px solid #545c64;
  margin-top: 16px
}

.BUT {
  display: flex;
  flex-direction: column;
  margin-left: 600px
}


.Blue_button {
  background-color: #007AFF;
  color: white;
  border: 0px
}

.Green_button {
  background-color: green !important;
}

.Red_button {
  background-color: crimson !important;
}

.head {
  font-weight: 500;
  align-items: center;
  display: flex;
  justify-content: space-around;
  width: 100%;
  height: 46px;
  background: #545c64;
  color: white;
}

.item {
  border-bottom: 1px solid #545c64;
  font-weight: 500;
  align-items: center;
  display: flex;
  justify-content: space-around;
  width: 100%;
  height: 46px;
  background: white;
  color: black;
}

.button {
  color: white;
  background-color: #007AFF;
  border: 0px
}

.Active_button {
  background-color: #003AFF;
}

.dialog {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.el-button {
  margin-right: 10px;
  background-color: #007AFF;
  color: white;
  border-radius: 8px
}

</style>
