<template>
  <div class="manage-container">
    <vab-query-form>
      <h1 class="sensor-title">添加传感器</h1>
    </vab-query-form>
    <el-form ref="form" :model="form" label-width="100px" label-position="left">
      <el-form-item :label="$t('sensor.cgqmc')">
        <el-input v-model="input" placeholder="请输入传感器名称"></el-input>
      </el-form-item>
      <el-form-item label="排序">
        <el-input v-model="input" placeholder="1"></el-input>
      </el-form-item>
      <el-form-item label="地址号">
        <el-input v-model="input" placeholder="输入地址号，从机地址"></el-input>
      </el-form-item>
      <el-form-item label="寄存器号">
        <el-input v-model="input" placeholder="偏移量"></el-input>
      </el-form-item>
      <el-form-item label="准确精度">
        <el-select v-model="value1" placeholder="请选择小数点位数">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="传感点类型">
        <el-select v-model="value2" placeholder="请选择传感点类型">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item :label="$t('sensor.dw')">
        <el-select v-model="value3" placeholder="请选择传感点单位">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="储存策略">
        <el-select v-model="value4" placeholder="变化储存">
          <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="公示处理">
        <el-input
          v-model="input"
          placeholder="公式计算，如x/100 可不填"
        ></el-input>
        <span class="notes">(设备->平台)</span>
      </el-form-item>
      <el-form-item label="公示处理">
        <el-input
          v-model="input"
          placeholder="公式计算，如x*100 可不填"
        ></el-input>
        <span class="notes">(平台->设备)</span>
      </el-form-item>
      <el-form-item label="参数配置">
        <el-input v-model="input" placeholder="请输入参数配置"></el-input>
      </el-form-item>
    </el-form>
    <vab-query-form>
      <el-button type="primary">保存</el-button>
      <el-button type="primary" plain>返回</el-button>
    </vab-query-form>
  </div>
</template>

<script>
export default {
  name: 'Sensor',
  data() {
    return {
      input: '',
      value1: '',
      value2: '',
      value3: '',
      value4: '',
      value5: '',
      value6: '',
      checked1: false,
      checked2: false,
      checked3: false,
      checked4: false,
      checked5: false,
      options: [
        { value: '选项1', label: '所有设备' },
        { value: '选项2', label: '已连接设备' },
        { value: '选项3', label: '未连接设备' },
        { value: '选项4', label: '已禁用设备' },
        { value: '选项5', label: '已删除设备' },
      ],
    };
  },
};
</script>

<style lang="scss" scoped>
.manage-container {
  width: 100%;

  .el-input {
    width: 205px;
  }
  .sensor-title {
    font-size: 18px;
    border-left: 6px solid #3281fd;
    padding-left: 10px;
    margin-bottom: 20px;
  }
  .notes {
    font-size: 14px;
    margin-left: 10px;
  }
}
</style>
