<template>
  <zj-page-container>
    <zj-page-fill class="neibuview">
      <zj-form-container>
        <zj-form-module title="评价信息">
          <zj-table :is-drop="true" :columns="evaluationColumns" :table-data="evaluationData" :table-attributes="{
            border: true
          }" />
        </zj-form-module>
      </zj-form-container>
    </zj-page-fill>
  </zj-page-container>
</template>

<script>
import { listPageV2 } from "@/api/workOrder/appraise";
import { tableDataParsing } from "@/utils/common.js"
export default {
  props: {
    id: {
      type: [String, Number],
      default: null,
    }
  },
  data() {
    return {
      evaluationData: [],
      evaluationColumns: []
    }
  },
  created() {
    listPageV2({ "pageNum": 1, "pageSize": -1, "params": [{ "param": "a.id", "compare": "=", "value": this.id }] }).then(res => {
      this.evaluationColumns = tableDataParsing(res.fieldBeans)
      this.$nextTick(() => {
        this.evaluationData = res.data.records
      })
    })
  },
}
</script>

<style lang="scss" scoped>
.neibuview {
  box-sizing: border-box;
  padding-left: 16px;

  ::v-deep .zj-page-fill-scroll {
    box-sizing: border-box;
    padding-right: 16px;

    &>div:nth-child(1) {
      margin-top: 20px;
    }
  }
}
</style>
