<template>
  <div class="manage-container">
    <vab-query-form>
      <el-button type="primary">追加</el-button>
      <el-button type="primary" plain>批量追加</el-button>
    </vab-query-form>
    <el-row>
      <el-col :span="24">
        <el-input v-model="input" placeholder="传感器名称"></el-input>
        <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-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-input v-model="input" placeholder="单位"></el-input>
        <el-input v-model="input" placeholder="排序"></el-input>
        <el-button type="primary" plain>{{ $t('defalult.sc') }}</el-button>
      </el-col>
    </el-row>
    <el-row class="add">
      <el-col :span="16"></el-col>
      <el-col :span="8">
        <el-button type="primary">添加上行映射</el-button>
        <el-button type="primary" plain>添加下行映射</el-button>
      </el-col>
      <el-col :span="16">
        <span>下行映射 (2,2)=>(1,1)</span>
      </el-col>
      <el-col :span="8">
        <el-button type="primary">编辑映射</el-button>
        <el-button type="primary" plain>删除映射</el-button>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <el-input v-model="input" placeholder="传感器名称"></el-input>
        <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-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-input v-model="input" placeholder="单位"></el-input>
        <el-input v-model="input" placeholder="排序"></el-input>
        <el-button type="primary" plain>{{ $t('defalult.sc') }}</el-button>
      </el-col>
      <el-col :span="24">
        <el-input v-model="input" placeholder="传感器名称"></el-input>
        <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-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-input v-model="input" placeholder="单位"></el-input>
        <el-input v-model="input" placeholder="排序"></el-input>
        <el-button type="primary" plain>{{ $t('defalult.sc') }}</el-button>
      </el-col>
      <el-col :span="24">
        <el-input v-model="input" placeholder="传感器名称"></el-input>
        <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-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-input v-model="input" placeholder="单位"></el-input>
        <el-input v-model="input" placeholder="排序"></el-input>
        <el-button type="primary" plain>{{ $t('defalult.sc') }}</el-button>
      </el-col>
    </el-row>
    <vab-query-form>
      <el-button type="primary">{{ $t('defalult.tjtn') }}</el-button>
      <el-button type="primary" plain>返回</el-button>
    </vab-query-form>
  </div>
</template>

<script>
export default {
  name: 'Sensor',
  data() {
    return {
      input: '',
      value1: '',
      value2: '',
      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-col-24 {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 10px 0;

    .el-input {
      width: 160px !important;
      margin-right: 10px;
    }
    .el-select {
      width: 200px !important;
      margin-right: 10px;
    }
  }
  .add {
    background-color: #f8f9fd;
  }
}
</style>
