jiangping
2024-06-07 8a266df75e912cc4ff49bc504db5b6b26f152892
company/src/views/business/dispatchUnitReview.vue
@@ -68,6 +68,8 @@
                >
                    <template slot-scope="{row}">
                        <el-button type="text" @click="$refs.dispatchUnitDetailsPlat.open('派遣单位详情', row)" icon="el-icon-edit" v-permissions="['business:dispatchunit:update']">查看详情</el-button>
                      <el-button   v-if="row.unitStatus === 2 &&userInfo.type === 0"  type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:dispatchunit:delete']">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
@@ -84,53 +86,57 @@
</template>
<script>
    import BaseTable from '@/components/base/BaseTable'
    import TableLayout from '@/layouts/TableLayout'
    import Pagination from '@/components/common/Pagination'
    import dispatchUnitDetailsPlat from '@/components/business/dispatchUnitDetailsPlat'
    import {pageAll as companyAll} from '@/api/business/company'
    export default {
        name: 'dispatchUnitReview',
        extends: BaseTable,
        components: { TableLayout, Pagination, dispatchUnitDetailsPlat },
        data () {
            return {
                // 搜索
                searchForm: {
                    name: '',
                    companyId: '',
                    unitStatus:null,
                    worktypeStatus:null,
                },
              companyList:[]
            }
        },
        created () {
            this.config({
                module: '派遣单位信息表',
                api: '/business/dispatchUnit',
                'field.id': 'id',
                'field.main': 'id'
            })
            this.search()
          this.loadSelectList()
        },
      methods:{
        // handlePageChange() {
        //   this.search()
        // },
        // 搜索
        search1 () {
          this.searchForm.worktypeStatus=null
          this.search()
        },
        loadSelectList() {
          companyAll({}).then(res => {
            this.companyList = res
          }).catch(err => {
          })
        }
      }
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import dispatchUnitDetailsPlat from '@/components/business/dispatchUnitDetailsPlat'
import { pageAll as companyAll } from '@/api/business/company'
import { mapState } from 'vuex'
export default {
  name: 'dispatchUnitReview',
  extends: BaseTable,
  components: { TableLayout, Pagination, dispatchUnitDetailsPlat },
  data () {
    return {
      // 搜索
      searchForm: {
        name: '',
        companyId: '',
        unitStatus: null,
        worktypeStatus: null
      },
      companyList: []
    }
  },
  computed: {
    ...mapState(['userInfo'])
  },
  created () {
    this.config({
      module: '派遣单位信息表',
      api: '/business/dispatchUnit',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
    this.loadSelectList()
  },
  methods: {
    // handlePageChange() {
    //   this.search()
    // },
    // 搜索
    search1 () {
      this.searchForm.worktypeStatus = null
      this.search()
    },
    loadSelectList () {
      companyAll({}).then(res => {
        this.companyList = res
      }).catch(err => {
      })
    }
  }
}
</script>