<template>
  <el-dialog title="任务统计" center :visible.sync="dialogVisible" width="60%">
    <div>
      <el-form :model="taskStatisticsInfo" label-width="150px">
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="积分包值：">
              <el-input v-model="taskStatisticsInfo.package_score" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="兼职分值：">
              <el-input
                v-model="taskStatisticsInfo.personal_task_score"
                disabled
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="兼职任务条数：">
              <el-input
                v-model="taskStatisticsInfo.personal_task_number"
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="B端服务分值：">
              <el-input v-model="taskStatisticsInfo.ent_task_score" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="B端服务条数：">
              <el-input v-model="taskStatisticsInfo.ent_task_number" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="招商经理分值：">
              <el-input
                v-model="taskStatisticsInfo.investment_manager_task_score"
                disabled
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="招商经理任务条数：">
              <el-input
                v-model="taskStatisticsInfo.investment_manager_task_number"
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="全职分值：">
              <el-input
                v-model="taskStatisticsInfo.full_time_task_score"
                disabled
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="全职任务条数：">
              <el-input
                v-model="taskStatisticsInfo.full_time_task_number"
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="审核管理费分值：">
              <el-input
                v-model="taskStatisticsInfo.audit_management_fee"
                disabled
              />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审核任务条数：">
              <el-input
                v-model="taskStatisticsInfo.audit_tasks_number"
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="实际完成分值：">
              <el-input
                v-model="taskStatisticsInfo.actual_completion_score"
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
    </div>
    <span slot="footer" class="dialog-footer">
      <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
    </span>
  </el-dialog>
</template>

<script>
import { taskStatisticsApi } from "@/api/taskManagement/points.js";
export default {
  props: ["taskStatisticsShow", "currentId"],
  data() {
    return {
      taskStatisticsInfo: {}
    };
  },
  watch: {
    currentId(val) {
      if (val) this.getTaskStatisticsInfo(val);
    }
  },
  computed: {
    dialogVisible: {
      get() {
        return this.taskStatisticsShow;
      },
      set() {
        this.taskStatisticsInfo = {};
        this.$emit("update:taskStatisticsShow", false);
        this.$emit("update:currentId", "");
      }
    }
  },
  methods: {
    async getTaskStatisticsInfo(id) {
      const res = await taskStatisticsApi(id);
      if (res.data.code === 0) {
        this.taskStatisticsInfo = res.data.data;
      }
    }
  }
};
</script>

<style lang="scss" scoped></style>
