<template>
  <div class="assess-config">
    <div class="assess-header">
      <div class="query mg-b-8">
        <div class="query-items">
          <div class="query-item">
            <div class="lable">模型：</div>
            <div class="search-input">
              <el-input v-model="content"></el-input>
            </div>
          </div>
        </div>
        <div class="query-actions">
          <button class="btn green mg-l-30" @click="onClickAdd">新增</button>
        </div>
      </div>
    </div>

    <div class="assess-bottom">
      <ComTable :data="tableData" height="85vh"></ComTable>
    </div>
  </div>
</template>

<script>
import ComTable from "@/components/coms/table/table-unpage.vue";

export default {
  components: { ComTable },
  data() {
    const that = this;
    return {
      content: "",
      tableData: {
        column: [
          {
            name: "名称",
            field: "targetname",
            is_light: false,
          },
          {
            name: "时间",
            field: "safecontent",
            is_light: false,
          },
          {
            name: "场站",
            field: "describe",
            is_num: false,
            is_light: false,
          },
          {
            name: "是否启用",
            field: "principal",
            is_num: false,
            is_light: false,
          },
          {
            name: "操作",
            field: "addtime",
            is_num: false,
            is_light: false,
            width: 10,
            template: () => {
              return (
                "<el-button type='text' style='cursor: pointer;' value='xq'>编辑</el-button>&nbsp" +
                "<el-button type='text' style='cursor: pointer;' value='ls'>删除</el-button>&nbsp" +
                "<el-button type='text' style='cursor: pointer;' value='ls'>配置</el-button>&nbsp"
              );
            },
            click(e, row) {
              that.onClickOption(e, row);
            },
          },
        ],
        data: [],
      },
    };
  },
  created() {
    this.requestList();
  },
  methods: {
    // 新增按钮
    onClickAdd() {},
    // 获取按错内容
    requestList() {
      let that = this;
      this.API.requestData({
        method: "GET",
        baseURL: "http://10.155.32.4:8034/",
        subUrl: "/evaluation/modelMainList",
        data: {
          name: "sdf",
        },
        success(res) {},
      });
    },
  },
};
</script>

<style lang="less" scope>
.assess-config {
  display: flex;
  flex-direction: column;

  .el-select {
    width: 200px;
  }
  .el-input {
    width: 200px;
  }

  .mg-l-30 {
    margin-left: 30px;
  }

  .assess-header {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
  }
}
</style>
