<template>
  <div>
    <basicLayout
        ref="basicLayout"
        formPath="projectTask"
        tableName="projectTaskTable"
        idName="sa_projtaskmagid"
        :apiId="{query:20221128143904,del:20221128144004}"
        :options="options"
        :detailPath="{
        path:'/projectTaskDetail'
      }"
    >
      <div slot="custom">
      </div>
      <template v-slot:tbList="scope">
        <div v-if="scope.data.column.columnname === 'important'">
          {{scope.data.column.columnname === 1?'是':'否'}}
        </div>
        <div v-else-if="scope.data.column.columnname === 'partiestype'">
          <span v-for="item in scope.data.column.data.partiestype" :key="item.index">
            {{item}},
          </span>
        </div>
        <div v-else-if="scope.data.column.columnname === 'stage'">
          <span v-for="item in scope.data.column.data.stage" :key="item.index">
            {{item}},
          </span>
        </div>
        <div v-else-if="scope.data.column.columnname === 'projtaskmag_options'" >
          <div v-for="(item,index) in scope.data.column.data.projtaskmag_options" :key="index" >
            <div v-if="index === 0 && scope.data.column.data.projtaskmag_options.length -1  === index" style="height: 40px;line-height: 40px;vertical-align: center;margin-top:-5px;margin-bottom: -5px">
              {{item.optionname}}
            </div>
            <div v-else-if="index === 0" style="height: 40px;line-height: 40px;vertical-align: center;margin-top: -5px">
              {{item.optionname}}
              <p style="border-bottom: 1px solid #ebeef5;transform: scale(1.09,1)"></p>
            </div>
            <div v-else-if="scope.data.column.data.projtaskmag_options.length -1  !== index" style="height: 40px;line-height: 40px;vertical-align: center;">
              {{item.optionname}}
              <p style="border-bottom: 1px solid #ebeef5;transform: scale(1.09,1)"></p>
            </div>
            <div v-else style="height: 40px;line-height: 40px;vertical-align: center;margin-bottom: -5px">{{item.optionname}}</div>
          </div>
        </div>
        <div v-else-if="scope.data.column.columnname === 'remarks'" >
          <div v-for="(item,index) in scope.data.column.data.projtaskmag_options" :key="index" >
            <div v-if="index === 0 && scope.data.column.data.projtaskmag_options.length -1  === index" style="height: 40px;line-height: 40px;vertical-align: center;margin-top:-5px;margin-bottom: -5px">
              {{item.remarks}}
            </div>
            <div v-else-if="index === 0" style="height: 40px;line-height: 40px;vertical-align: center;margin-top: -5px">
              {{item.remarks}}
              <p style="border-bottom: 1px solid #ebeef5;transform: scale(1.09,1)"></p>
            </div>
            <div v-else-if="scope.data.column.data.projtaskmag_options.length -1  !== index" style="height: 40px;line-height: 40px;vertical-align: center;">
              {{item.remarks}}
              <p style="border-bottom: 1px solid #ebeef5;transform: scale(1.09,1)"></p>
            </div>
            <div v-else style="height: 40px;line-height: 40px;vertical-align: center;margin-bottom: -5px">{{item.remarks}}</div>
          </div>
        </div>
        <div v-else-if="scope.data.column.columnname === 'score'" >
          <div v-for="(item,index) in scope.data.column.data.projtaskmag_options" :key="index" >
            <div v-if="index === 0 && scope.data.column.data.projtaskmag_options.length -1  === index" style="height: 40px;line-height: 40px;vertical-align: center;margin-top:-5px;margin-bottom: -5px">
              {{item.score}}
            </div>
            <div v-else-if="index === 0" style="height: 40px;line-height: 40px;vertical-align: center;margin-top: -5px">
              {{item.score}}
              <p style="border-bottom: 1px solid #ebeef5;transform: scale(1.09,1)"></p>
            </div>
            <div v-else-if="scope.data.column.data.projtaskmag_options.length -1  !== index" style="height: 40px;line-height: 40px;vertical-align: center;">
              {{item.score}}
              <p style="border-bottom: 1px solid #ebeef5;transform: scale(1.09,1)"></p>
            </div>
            <div v-else style="height: 40px;line-height: 40px;vertical-align: center;margin-bottom: -5px">{{item.score}}</div>
          </div>
        </div>
        <div v-else>
          {{scope.data.column.data[[scope.data.column.columnname]]}}
        </div>
      </template>
      <template v-slot:tbOpreation="scope">

      </template>
    </basicLayout>
  </div>
</template>

<script>
export default {
  name: "index",
  data(){
    return {
      options:[]
    }
  },
  methods:{

  }
}
</script>

<style scoped>

</style>