<template>
  <div class="brand">
    <!-- <div style="display:flex;align-items:center;margin-bottom:16px">
      <el-input
          placeholder="请输入搜索内容"
          suffix-icon="el-icon-search"
          v-model="params.content.where.condition"
          style="width:200px"
          size="mini"
          class="input-with-select inline-16"
          @keyup.native.enter="department(params.content.pageNumber=1)"
          @clear="department(params.content.pageNumber = 1)"
          clearable>
      </el-input>
    </div> -->
    <el-table
      :data="data"
      stripe
      border
      row-key="sa_workorder_nodeid"
      size="small"
      :tree-props="{children: 'children', hasChildren: 'hasChildren'}">
      <el-table-column
        width="120">
      </el-table-column>
      <el-table-column
        prop="workname"
        label="工作名称"
        show-overflow-tooltip
        width="400">
        <template slot-scope="scope">
          <span :style="scope.row.status == 0 ? 'color:#3874f6' : scope.row.status == 2 ? 'color:orange' : 'color:red'">{{scope.row.workname}}</span>
        </template>
      </el-table-column>
      <el-table-column
        prop="remarks"
        show-overflow-tooltip
        label="操作说明"
        width="400">
        <template slot-scope="scope">
          {{scope.row.remarks ? scope.row.remarks : '--'}}
        </template>
      </el-table-column>
      <el-table-column
        prop="fileupload"
        label="上传附件">
        <template slot-scope="scope">
          {{scope.row.fileupload ? scope.row.fileupload == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
      <el-table-column
        prop="textedit"
        label="上传文本">
        <template slot-scope="scope">
          {{scope.row.textedit ? scope.row.textedit == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
      <el-table-column
        prop="confirm_options"
        label="确认项">
        <template slot-scope="scope">
          {{scope.row.confirm ? scope.row.confirm == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
       <el-table-column
        prop="contractupload"
        label="上传合同">
        <template slot-scope="scope">
          {{scope.row.contractupload ? scope.row.contractupload == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
      <el-table-column
        prop="additem"
        label="添加商品">
        <template slot-scope="scope">
          {{scope.row.additem ? scope.row.additem == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
      <el-table-column
        prop="itemtype"
        label="商品类型">
        <template slot-scope="scope">
          {{scope.row.itemtype ? scope.row.itemtype == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
      <el-table-column
        prop="addperson"
        label="添加人员">
        <template slot-scope="scope">
          {{scope.row.addperson ? scope.row.addperson == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
      <el-table-column
        prop="amountpay"
        label="是否有偿">
        <template slot-scope="scope">
          {{scope.row.amountpay ? scope.row.amountpay == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
      <el-table-column
        prop="required"
        label="是否验证工作"
        width="120px">
        <template slot-scope="scope">
          {{scope.row.required ? scope.row.required == 1 ? '非必填' : '必填' : '无'}}
        </template>
      </el-table-column>
      <el-table-column
        label="操作"
        width="250"
        fixed="right">
        <template slot-scope="scope">
          <slot name="detail" :data="scope.row"></slot>
          <slot name="edit" :data="scope.row"></slot>
        </template>
      </el-table-column>
    </el-table>
    <!-- <div style="margin-top:16px;text-align:right">
      <el-pagination
          background
          small
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
          :current-page="params.content.pageNumber"
          :page-size="params.content.pageSize"
          layout="total, prev, pager, next, jumper"
          :total="total">
      </el-pagination>
    </div> -->
  </div>
</template>

<script>
export default {
  props:['data'],
  components:{
  },
  data() {
    return {
      tableData:[],
    }
  },
  created() {
  },
  mounted () {
  },
  methods: {
    
    handleSizeChange(val) {
      // console.log(`每页 ${val} 条`);
      this.params.content.pageSize = val
      this.department()
    },
    handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.params.content.pageNumber = val
      this.department()
    },
  },
  mounted () {
  }
};
</script>

<style scoped>

</style>
