spring
2025-03-03 840de9662167b1d7758208b9c88adda806ed8fec
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/Personnel-management.vue
@@ -4,14 +4,8 @@
      <div>
        <el-form :model="searchForm" ref="searchForm" size="small" :inline="true">
          <el-form-item label="日期" prop="registerDate">
            <el-date-picker v-model="searchForm.registerDate"
                            clearable
                            format="yyyy-MM-dd"
                            placeholder="选择日期"
                            size="small"
                            style="width: 100%"
                            type="date"
                            value-format="yyyy-MM-dd">
            <el-date-picker v-model="searchForm.registerDate" clearable format="yyyy-MM-dd" placeholder="选择日期"
              size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd">
            </el-date-picker>
          </el-form-item>
          <el-form-item>
@@ -27,9 +21,10 @@
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination"
                  :page="page" :tableLoading="tableLoading"></lims-table>
        :page="page" :tableLoading="tableLoading"></lims-table>
    </div>
    <personnel-management-dia v-if="threeWastesDia" ref="threeWastesDia" @closeThreeWastesDia="closeThreeWastesDia"></personnel-management-dia>
    <personnel-management-dia v-if="threeWastesDia" ref="threeWastesDia"
      @closeThreeWastesDia="closeThreeWastesDia"></personnel-management-dia>
  </div>
</template>
@@ -46,7 +41,7 @@
export default {
  name: 'Personnel-management',
  // import 引入的组件需要注入到对象中才能使用
  components: { limsTable, PersonnelManagementDia},
  components: { limsTable, PersonnelManagementDia },
  data() {
    // 这里存放数据
    return {
@@ -135,14 +130,14 @@
  // 方法集合
  methods: {
    // 查询列表
    searchList () {
    searchList() {
      this.tableLoading = true
      pageForeignRegister({
        ...this.page,
        ...this.searchForm
      }).then(res => {
        this.tableLoading = false
        if (res.code === 200){
        if (res.code === 200) {
          this.tableData = res.data.records
          this.page.total = res.data.total
        }
@@ -153,16 +148,16 @@
      })
    },
    // 删除
    delPlan (row) {
    delPlan(row) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        delForeignRegister({registerId:row.registerId}).then(res =>{
        delForeignRegister({ registerId: row.registerId }).then(res => {
          this.tableLoading = false
          if (res.code === 200){
          if (res.code === 200) {
            this.$message.success('删除成功')
            this.searchList()
          }
@@ -178,26 +173,25 @@
      });
    },
    // 新增,编辑,批准弹框
    openFormDia (type, row) {
    openFormDia(type, row) {
      this.threeWastesDia = true
      this.$nextTick(() => {
        this.$refs.threeWastesDia.openDia(type, row)
      })
    },
    // 导出
    handleDown () {
    handleDown() {
      exportForeignRegister(this.searchForm).then(res => {
        const blob = new Blob([res],{ type: 'application/msword' });
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '外来人员登记.docx')
        this.$message.success('导出成功')
      })
    },
    closeThreeWastesDia () {
    closeThreeWastesDia() {
      this.threeWastesDia = false
      this.searchList()
    },
    // 重置查询条件
    resetSearchForm () {
    resetSearchForm() {
      this.searchForm.registerDate = '';
      this.searchList()
    },