<template>
  <div class="siteManage-main powerScore">
    <el-form
      :model="ruleForm"
      :rules="rules"
      ref="ruleForm"
      label-width="100px"
      class="demo-ruleForm"
    >
          <div class="grid-content bg-purple">
            <div class="el-form-item blockTitle">
               电能质量各要素权重
             </div>
            <div></div>
            <el-form-item label="功率因数(100%)" prop="name" label-width="130px">
              <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>

            <el-form-item label="电压合格率(%)" prop="name" label-width="130px">
              <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>
            <el-form-item label="负载率(%)" prop="name" label-width="130px">
              <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>

            

            <el-form-item label="电流平衡度(%)：" prop="name" label-width="130px">
              <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>
           
            <el-form-item label="电压平衡度(%)：" prop="name" label-width="130px">
              <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>
            <el-form-item label="谐波畸变率(%)" prop="name" label-width="130px">
              <el-input v-model="ruleForm.name"></el-input>
            </el-form-item>
     
             <div class="el-form-item blockTitle">
               功率因素
             </div>
            <el-form-item label="所属台区" prop="name" label-width="130px">
              <el-input v-model="ruleForm.name"></el-input>
               <div class="remarksTxt">0.000404吨标准煤/千瓦时</div>
            </el-form-item>
            

            <el-form-item>
              <el-button type="primary" @click="submitForm('ruleForm')"
                >保存</el-button>
            
            </el-form-item>

          </div>
       
    </el-form>
  </div>
</template>

<script>
export default {
  name: "PowerScore",
  data() {
    return {
      dialogImageUrl: "",
      dialogVisible: false,
      disabled: false,
      ruleForm: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        planStartTime: "",
        planEndTime: "",
      },
      rules: {
        planStartDate: [
          { required: true, message: "请选择开始日期", trigger: "change" },
        ],
        planEndDate: [
          { required: true, message: "请输入结束日期", trigger: "change" },
        ],
        name: [
          { required: true, message: "请输入站点名称", trigger: "blur" },
          { min: 3, max: 5, message: "长度在 3 到 5 个字符", trigger: "blur" },
        ],
        region: [
          { required: true, message: "请选择活动区域", trigger: "change" },
        ],
        date1: [
          {
            type: "date",
            required: true,
            message: "请选择日期",
            trigger: "change",
          },
        ],
        date2: [
          {
            type: "date",
            required: true,
            message: "请选择时间",
            trigger: "change",
          },
        ],
        type: [
          {
            type: "array",
            required: true,
            message: "请至少选择一个活动性质",
            trigger: "change",
          },
        ],
        resource: [
          { required: true, message: "请选择活动资源", trigger: "change" },
        ],
        desc: [{ required: true, message: "请填写活动形式", trigger: "blur" }],
      },
    };
  },
  methods: {
    handleRemove(file) {
      console.log(file);
    },
    handlePictureCardPreview(file) {
      this.dialogImageUrl = file.url;
      this.dialogVisible = true;
    },
    submitForm(formName) {
      this.$refs[formName].validate((valid) => {
        if (valid) {
          alert("submit!");
        } else {
          console.log("error submit!!");
          return false;
        }
      });
    },
  },
};
</script>
<style scoped lang="scss">
</style>
