licp
2024-08-20 6f30bbf4f118d3357d1e6e503aa986227e2cc6ea
src/components/do/a6-device/check-and-accept.vue
@@ -1,13 +1,168 @@
<template>
  <div>设备验收</div>
  <div>
    <div class="search">
      <div class="search_thing">
        <div class="search_label">关键字:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable
            v-model="value" @keyup.enter.native="refreshTable()"></el-input></div>
      </div>
      <div class="search_thing" style="padding-left: 30px;">
        <el-button size="small" type="primary" @click="refreshTable()">查 询</el-button>
      </div>
      <div class="btns">
        <el-button size="small" type="primary">新建</el-button>
        <el-button size="small" type="primary">导出</el-button>
      </div>
    </div>
    <div class="tables" style="margin-top: 16px;">
      <ValueTable ref="ValueTable"
            :url="$api.auxiliaryWorkingHoursDay.selectAuxiliaryWorkingHoursDay"
            :delUrl="$api.auxiliaryWorkingHoursDay.deleteAuxiliaryWorkingHoursDay" :componentData="componentData" :key="upIndex"/>
    </div>
  </div>
</template>
<script>
import ValueTable from '../../tool/value-table.vue'
export default {
  components: {
    ValueTable
  },
  data(){
    return {
      value:'',
      componentData: {
        entity: {
          week: null,
          weekDay: null,
          dateTime: null,
          name:null,
          orderBy: {
            field: 'id',
            order: 'desc'
          }
        },
        isIndex: true,
        showSelect: false,
        select: false,
        do: [{
          id: 'getFile',
          font: '附件',
          type: 'text',
          method: 'getFile'
        }, {
          id: 'handleLook',
          font: '查看',
          type: 'text',
          method: 'handleLook'
        },{
          id: 'delete',
          font: '删除',
          type: 'text',
          method: 'doDiy',
          disabFun: (row, index) => {
            return row.state === '已审核' || row.state === '已批准'
          }
        }],
        tagField: {
          shift:{
            select:[]
          },
          state:{
            select:[
              {
                label:'已提交',
                value:'已提交',
                type:'primary'
              },
              {
                label:'已审核',
                value:'已审核',
                type:'warning'
              },
              {
                label:'已批准',
                value:'已批准',
                type:'success'
              },
            ]
          },
          weekDay:{
            select:[]
          }
        },
        linkEvent: {},
        selectField: {
          shift:{
            select:[]
          },
          state:{
            select:[
              {
                label:'已提交',
                value:'已提交',
                type:'primary'
              },
              {
                label:'已审核',
                value:'已审核',
                type:'warning'
              },
              {
                label:'已批准',
                value:'已批准',
                type:'success'
              },
            ]
          },
          weekDay:{
            select:[]
          }
        },
        requiredAdd: [],
        requiredUp: []
         },
      upIndex:0,
    }
  },
  methods:{
    refreshTable(){}
  }
}
</script>
<style scoped>
.tables{
  width: calc(100vw - 390px);
  height: calc(100vh - 230px);
}
.search {
  background-color: #fff;
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
}
.search_thing {
  display: flex;
  align-items: center;
  height: 40px;
}
.search_label {
  width: 70px;
  font-size: 14px;
  text-align: right;
}
.search_input {
  width: calc(100% - 120px);
}
.btns{
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translate(0,-50%);
}
</style>