<template>
  <div class="assess">
    <el-form ref="ruleForm" :model="ruleForm" label-position="top" label-width="120px" class="rule-form-orange">
      <cy-info-title type="center">项目授信</cy-info-title>
      <el-form-item label="是否准入" prop="admitted">
        <el-input v-model="ruleForm.admitted" disabled placeholder="请输入是否准入" />
      </el-form-item>
      <el-form-item label="项目得分" prop="projectScore">
        <el-input v-model="ruleForm.projectScore" disabled placeholder="请输入项目得分" />
      </el-form-item>
      <el-form-item label="授信额度（万元）" prop="creditLimit">
        <el-input v-model="ruleForm.creditLimit" disabled placeholder="请输入授信额度（万元）" />
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  props: {
    assessInfo: {
      type: Object,
      default: () => {}
    },
    disabled: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      ruleForm: {
        admitted: '',
        projectScore: '',
        creditLimit: ''
      },
      rules: {

      }
    }
  },
  watch: {
    assessInfo: {
      handler(newV) {
        if (newV && Object.keys(newV)) {
          this.ruleForm = {
            ...newV
          }
        }
      },
      immediate: true,
      deep: true
    }
  },
  methods: {
    // 提交参数
    // passData() {
    //   return new Promise((resolve, reject) => {
    //     this.$refs.ruleFormRef.validate(valid => {
    //       if (valid) {
    //         return resolve(this.ruleForm)
    //       } else {
    //         reject()
    //         return false
    //       }
    //     })
    //   })
    // }
  }
}
</script>

<style lang="scss" scoped>
.assess {
padding: 10px 15px;
}
</style>
