gaoluyang
2025-02-28 b64a83dda524fd1aa969622e2cb8e9469a95a283
人员-人员能力、沟通记录搬迁
已修改5个文件
已添加3个文件
771 ■■■■■ 文件已修改
src/InspectionWorker.worker.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/personal/personPersonCommunicationAbilityPage.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/personal/personPersonnelCapacity.js 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/personnel/personnelInfo/index.vue 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/personnel/personnelInfo/tabs/communicate.vue 334 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue 193 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/InspectionWorker.worker.js
@@ -1815,7 +1815,7 @@
    // Create version of divisor with leading zero.
    bz.unshift(0);
    // Add zeros to make remainder as long as divisor.
    // CommunicateAdd zeros to make remainder as long as divisor.
    for (; rl++ < bl; ) r.push(0);
    do {
@@ -1853,7 +1853,7 @@
        }
      }
      // Add the digit n to the result array.
      // CommunicateAdd the digit n to the result array.
      qc[qi++] = cmp ? n : ++n;
      // Update the remainder.
src/api/cnas/personal/personPersonCommunicationAbilityPage.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,35 @@
import request from "@/utils/request";
// æŸ¥è¯¢äººå‘˜æ²Ÿé€šè®°å½•
export function personPersonCommunicationAbilityPage(query) {
  return request({
    url: "/personCommunicationAbility/personPersonCommunicationAbilityPage",
    method: "get",
    params: query
  });
}
// åˆ é™¤äººå‘˜æ²Ÿé€šè®°å½•
export function deletePersonCommunicationAbility(query) {
  return request({
    url: "/personCommunicationAbility/deletePersonCommunicationAbility",
    method: "delete",
    params: query
  });
}
// å¯¼å‡ºäººå‘˜æ²Ÿé€šè®°å½•
export function exportPersonCommunicationAbility(query) {
  return request({
    url: "/personCommunicationAbility/exportPersonCommunicationAbility",
    method: "get",
    params: query,
    responseType: "blob"
  });
}
// æ–°å¢ž-编辑人员沟通记录
export function addOrUpdatePersonCommunicationAbility(query) {
  return request({
    url: "/personCommunicationAbility/addOrUpdatePersonCommunicationAbility",
    method: "post",
    data: query
  });
}
src/api/cnas/personal/personPersonnelCapacity.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,51 @@
import request from "@/utils/request";
// æŸ¥è¯¢äººå‘˜èƒ½åŠ›
export function personPersonnelCapacityPage(query) {
  return request({
    url: "/personPersonnelCapacity/personPersonnelCapacityPage",
    method: "get",
    params: query
  });
}
// æ–°å¢žç¼–辑人员能力
export function addOrUpdatePersonPersonnelCapacity(query) {
  return request({
    url: "/personPersonnelCapacity/addOrUpdatePersonPersonnelCapacity",
    method: "post",
    data: query
  });
}
// æ–°å¢žç¼–辑人员能力
export function submitConfirmPersonnelCapability(query) {
  return request({
    url: "/personPersonnelCapacity/submitConfirmPersonnelCapability",
    method: "post",
    data: query
  });
}
// ç¡®è®¤äººå‘˜èƒ½åŠ›
export function confirmPersonnelCapability(query) {
  return request({
    url: "/personPersonnelCapacity/confirmPersonnelCapability",
    method: "get",
    params: query
  });
}
// åˆ é™¤äººå‘˜èƒ½åŠ›
export function deletePersonPersonnelCapacity(query) {
  return request({
    url: "/personPersonnelCapacity/deletePersonPersonnelCapacity",
    method: "delete",
    params: query
  });
}
// å¯¼å‡ºäººå‘˜èƒ½åŠ›
export function exportPersonnelCapacity(query) {
  return request({
    url: "/personPersonnelCapacity/exportPersonnelCapacity",
    method: "get",
    params: query,
    responseType: "blob"
  });
}
src/utils/index.js
@@ -307,7 +307,7 @@
}
/**
 * Add class to element
 * CommunicateAdd class to element
 * @param {HTMLElement} elm
 * @param {string} cls
 */
src/views/CNAS/personnel/personnelInfo/components/communicateAdd.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,136 @@
<template><div class="add">
  <el-dialog
    :title="isEdit ?'编辑附件资料':'新增附件资料'"
    :visible.sync="dialogVisible"
    width="40%"
  >
    <el-form
      :model="form"
      ref="form"
      :rules="rules"
      label-width="80px"
      size="small"
    >
      <el-form-item label="沟通人" prop="userId">
        <el-select
          v-model="form.userId"
          placeholder="请选择"
          style="width: 100%" multiple
        >
          <el-option
            v-for="(item, index) in userList"
            :key="index"
            :label="item.name"
            :value="item.id"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="沟通时间" prop="communicationTime">
        <el-date-picker
          v-model="form.communicationTime"
          type="datetime"
          value-format="yyyy-MM-dd HH:mm:ss"
          placeholder="请选择日期时间"
          style="width: 100%"
        >
        </el-date-picker>
      </el-form-item >
      <el-form-item label="沟通地点" prop="communicationPlace">
        <el-input v-model="form.communicationPlace" placeholder="请填写沟通地点"></el-input>
      </el-form-item >
      <el-form-item label="沟通内容" prop="communicationContent">
        <el-input v-model="form.communicationContent" placeholder="请填写沟通内容"></el-input>
      </el-form-item >
    </el-form>
    <div slot="footer" class="foot">
      <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
      <el-button type="primary" :loading="loading" @click="submitForm">ç¡® å®š</el-button>
    </div>
  </el-dialog>
</div>
</template>
<script>
import {selectUserCondition} from "@/api/business/inspectionTask";
import {addOrUpdatePersonCommunicationAbility} from "@/api/cnas/personal/personPersonCommunicationAbilityPage";
export default {
  data() {
    return {
      isEdit: false,
      dialogVisible: false,
      form: {
        id: '',
        userId: [],
        communicationTime: undefined,
        communicationPlace: undefined,
        communicationContent: undefined
      },
      rules: {
        userId: [{ required: true, message: '请选择沟通人', trigger: 'change' }],
        communicationTime: [{ required: true, message: '请选择沟通时间', trigger: 'change' }],
        communicationPlace: [{ required: true, message: '请填写沟通地点', trigger: 'blur' }],
        communicationContent: [{ required: true, message: '请填写沟通内容', trigger: 'blur' }],
      },
      loading: false,
      userList: []
    }
  },
  methods: {
    /**
     * @desc æ˜¾ç¤ºæ¨¡æ€æ¡†
     * @param {*} row
     * @param {*} type
     */
    openDialog(row, type) {
      this.getUserList()
      this.dialogVisible = true
      if(type) {
        this.isEdit = true
        this.form.id = row.id
        this.form.userId = row.userId.split(',').map(m=>Number(m))
        this.form.communicationTime = row.communicationTime
        this.form.communicationPlace = row.communicationPlace
        this.form.communicationContent = row.communicationContent
      } else {
        this.form.id = ''
        this.resetForm('form')
      }
    },
    /**
     * @desc èŽ·å–ç”¨æˆ·ä¿¡æ¯
     */
    async getUserList() {
      selectUserCondition().then((res) => {
        this.userList = res.data;
      })
    },
    /**
     * @desc æäº¤è¡¨å•
     */
    async submitForm() {
      this.$refs.form.validate((valid) => {
        if (valid) {
          this.loading = true
          const params = {
            id: this.form.id,
            userId: this.form.userId.join(','),
            communicationTime: this.form.communicationTime,
            communicationPlace: this.form.communicationPlace,
            communicationContent: this.form.communicationContent,
          }
          addOrUpdatePersonCommunicationAbility(params).then((res) => {
            this.loading = false
            this.resetForm('form')
            this.$emit('submit')
            this.dialogVisible = false
          }).catch((err) => {
            this.loading = false
          })
        }
      })
    }
  }
}
</script>
<style scoped>
</style>
src/views/CNAS/personnel/personnelInfo/index.vue
@@ -78,14 +78,14 @@
        <el-tab-pane label="任职授权记录" name="任职授权记录">
          <Mandate v-if="activeName === '任职授权记录'" ref="manDateRef" :departId="departId" :isDepartment="isDepartment"></Mandate>
        </el-tab-pane>
<!--        <el-tab-pane label="人员能力" name="人员能力">-->
<!--          <personnel-capacity v-if="activeName === '人员能力'" ref="personnelCapacity"-->
<!--                              :departId="departId"-->
<!--                              :isDepartment="isDepartment"></personnel-capacity>-->
<!--        </el-tab-pane>-->
<!--        <el-tab-pane label="沟通记录" name="沟通记录">-->
<!--          <Communicate v-if="activeName === '沟通记录'" ref="communicateRef" :departId="departId" :isDepartment="isDepartment"></Communicate>-->
<!--        </el-tab-pane>-->
        <el-tab-pane label="人员能力" name="人员能力">
          <personnel-capacity v-if="activeName === '人员能力'" ref="personnelCapacity"
                              :departId="departId"
                              :isDepartment="isDepartment"></personnel-capacity>
        </el-tab-pane>
        <el-tab-pane label="沟通记录" name="沟通记录">
          <Communicate v-if="activeName === '沟通记录'" ref="communicateRef" :departId="departId" :isDepartment="isDepartment"></Communicate>
        </el-tab-pane>
      </el-tabs>
    </div>
    <el-dialog :visible.sync="addDia" title="架构新增" width="400px">
src/views/CNAS/personnel/personnelInfo/tabs/communicate.vue
@@ -1,48 +1,28 @@
<template>
    <div class="flex_column">
<!--        <TableCard :showForm="isDepartment" title="沟通记录">-->
<!--            <template v-slot:form >-->
<!--                <div v-if="isDepartment" class="w100 items_center justify_between">-->
<!--                    <div></div>-->
<!--                    <div>-->
<!--                        &lt;!&ndash; <el-button type="primary" size="small">导出</el-button> &ndash;&gt;-->
<!--                        <el-button size="small" type="primary" @click="openDialog">新增</el-button>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </template>-->
<!--            <template v-slot:table>-->
<!--                <ZTTable-->
<!--                    :column="columnData"-->
<!--                    :height="'calc(100vh - 21em)'"-->
<!--                    :table-data="tableData"-->
<!--                    :table-loading="loading"-->
<!--                    style="margin-top: 18px; padding: 0 15px;"-->
<!--                ></ZTTable>-->
<!--                <el-divider></el-divider>-->
<!--                <div class="pagination">-->
<!--                    <div></div>-->
<!--                    <el-pagination-->
<!--                        :page-size="pagination.pageSize"-->
<!--                        :page-sizes="[10, 20, 30, 40]"-->
<!--                        :total="pagination.total"-->
<!--                        layout="total, sizes, prev, pager, next, jumper"-->
<!--                        @current-change=""-->
<!--                        @size-change=""-->
<!--                    >-->
<!--                    </el-pagination>-->
<!--                </div>-->
<!--            </template>-->
<!--        </TableCard>-->
        <Add ref="communicateModal" @submit="getTableData"></Add>
  <div class="flex_column">
    <div v-if="isDepartment" style="display: flex;justify-content: space-between;margin-bottom: 10px">
      <el-button size="small" type="primary" @click="getTableData">刷新</el-button>
      <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>
    </div>
    <lims-table :tableData="tableData" :column="columnData"
                @pagination="page" :height="'calc(100vh - 18em)'"
                :page="pagination" :tableLoading="loading"></lims-table>
    <Add ref="communicateModal" @submit="getTableData"></Add>
  </div>
</template>
<script>
// import Add from "./Add.vue"
import CommunicateAdd from "../components/communicateAdd.vue"
import limsTable from "@/components/Table/lims-table.vue";
import {
  deletePersonCommunicationAbility, exportPersonCommunicationAbility,
  personPersonCommunicationAbilityPage
} from "@/api/cnas/personal/personPersonCommunicationAbilityPage";
export default {
    components: {
        // Add
    },
  components: {
    limsTable,
    Add: CommunicateAdd
  },
  props: {
    departId: {
      type: Number,
@@ -55,158 +35,109 @@
      default: false
    }
  },
    data() {
        return {
            // departId: 0,
            columnData: [
                {
                    label: '序号',
                    prop: 'id'
                }, {
                    label: '沟通人',
                    prop: 'userName'
                }, {
                    label: '沟通时间',
                    prop: 'communicationTime'
                }, {
                    label: '沟通地点',
                    prop: 'communicationPlace'
                }, {
                    label: '沟通内容',
                    prop: 'communicationContent'
                }, {
                    label: '操作',
                    dataType: 'action',
                    operation: [
                        {
                            name: '编辑',
                            type: 'text',
                            clickFun: (row) => {
                                this.openDialog(row, true)
                            }
                        }, {
                            name: '导出',
                            type: 'text',
                            clickFun: (row) => {
                                this.handleDown(row)
                            }
                        }, {
                            name: '删除',
                            type: 'text',
                            color: '#f56c6c',
                            clickFun: (row) => {
                                this.delPerson(row.id)
                            }
                        }
                    ]
                },
            ],
            tableData: [],
            pagination: {
                current: 1,
                pageSize: 20,
                total: 0
            },
            loading: false
        }
    },
  mounted() {
    // this.getTableData()
  },
  methods: {
        openDialog(row, type=false) {
            this.$refs.communicateModal.openDialog(row, type)
        },
        async getTableData() {
            this.loading = true
          const params = this.isDepartment ? {
            departLimsId: this.departId,
            current: this.pagination.current,
            size: this.pagination.pageSize
          } : {
            userId: this.departId,
            current: this.pagination.current,
            size: this.pagination.pageSize
          }
            const { code, data } = await this.$axios({
                method: 'get',
                url: personPersonCommunicationAbilityPage,
                params: params
            })
            if(code == 200) {
                this.pagination.total = data.total
                this.tableData = data.records
                this.loading = false
            }
        },
        /**
         * @desc èŽ·å–è®¾å¤‡id
         */
        getDepart(id) {
            // this.departId = id
            this.getTableData()
        },
        /**
         * @desc åˆ é™¤æ²Ÿé€šè®°å½•
         */
        delPerson(id) {
            this.$confirm('此操作将永久删除该文件, æ˜¯å¦ç»§ç»­?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
            }).then(async () => {
                let formData = new FormData()
                formData.append('id', id)
                const { code } = await this.$axios({
                    method: 'delete',
                    url: deletePersonCommunicationAbility,
                    data: formData
                })
                if(code == 200) {
                    this.$message({
                        type: 'success',
                        message: '删除成功!'
                    });
                    this.getTableData()
                }
            })
        },
        async handleDown(row){
          this.$axios.post(this.$api.personCommunicationAbility.exportPersonCommunicationAbility,{id:row.id},{responseType: "blob"}).then(res => {
            if(res.code == 201){
              this.$message.error(res.message)
              return
            }
            const blob = new Blob([res],{ type: 'application/octet-stream' });
            //将Blob å¯¹è±¡è½¬æ¢æˆå­—符串
            let reader = new FileReader();
            reader.readAsText(blob, 'utf-8');
            reader.onload = () => {
              try {
                let result = JSON.parse(reader.result);
                if (result.message) {
                  this.$message.error(result.message);
                } else {
                  const url = URL.createObjectURL(blob);
                  const link = document.createElement('a');
                  link.href = url;
                  link.download = row.userName+'-沟通记录'+'.docx';
                  link.click();
                  this.$message.success('导出成功')
                }
              } catch (err) {
                console.log(err);
                const url = URL.createObjectURL(blob);
                const link = document.createElement('a');
                link.href = url;
                link.download = row.userName+'-沟通记录'+'.docx';
                link.click();
                this.$message.success('导出成功')
  data() {
    return {
      columnData: [
        {
          label: '沟通人',
          prop: 'userName'
        }, {
          label: '沟通时间',
          prop: 'communicationTime'
        }, {
          label: '沟通地点',
          prop: 'communicationPlace'
        }, {
          label: '沟通内容',
          prop: 'communicationContent'
        }, {
          label: '操作',
          dataType: 'action',
          operation: [
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openDialog(row, true)
              }
            }, {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              }
            }, {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delPerson(row.id)
              }
            }
          })
        }
          ]
        },
      ],
      tableData: [],
      pagination: {
        current: 1,
        size: 20,
        total: 0
      },
      loading: false
    }
  },
  mounted() {
    this.getTableData()
  },
  methods: {
    openDialog(row, type=false) {
      this.$refs.communicateModal.openDialog(row, type)
    },
    getTableData() {
      this.loading = true
      const params = this.isDepartment ? {
        departLimsId: this.departId,
        current: this.pagination.current,
        size: this.pagination.size
      } : {
        userId: this.departId,
        current: this.pagination.current,
        size: this.pagination.size
      }
      personPersonCommunicationAbilityPage(params).then(res => {
        this.loading = false
        this.tableData = res.data.records
        this.pagination.total = res.data.total
      }).catch(err => {
        this.loading = false
      })
    },
    page (page) {
      this.pagination.size = page.limit
      this.getTableData()
    },
    /**
     * @desc åˆ é™¤æ²Ÿé€šè®°å½•
     */
    delPerson(id) {
      this.$confirm('此操作将永久删除该文件, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(async () => {
        deletePersonCommunicationAbility({id: id}).then(res => {
          this.$message.success('删除成功!');
          this.getTableData()
        })
      })
    },
    async handleDown(row){
      exportPersonCommunicationAbility({id:row.id}).then(res => {
        const blob = new Blob([res],{ type: 'application/octet-stream' });
        this.$download.saveAs(blob, row.userName+'-沟通记录'+'.docx');
      })
    }
  },
  watch: {
    departId: {
      handler(newId, oldId) {
@@ -219,31 +150,4 @@
}
</script>
<style scoped>
.flex_column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.w100 {
    width: 100%;
}
.pagination {
    display: flex;
    justify-content: space-between
}
.items_center {
    display: flex;
    align-items: center;
}
.justify_between {
    justify-content: space-between
}
.date_box {
    margin: 0 5px;
}
.search {
    width: 150px;
    padding: 0 16px;
}
</style>
src/views/CNAS/personnel/personnelInfo/tabs/personnel-capacity.vue
@@ -1,39 +1,29 @@
<!-- äººå‘˜èƒ½åŠ› -->
<template>
  <div>
    <div style="text-align: left; margin-bottom: 15px;padding: 0 16px">
      <label>姓名</label>
      <el-input v-model="userName" placeholder="请输入姓名" size="small" style="width: 20vh;"></el-input>
      <el-button size="small" type="primary" @click="refreshTable">查询</el-button>
      <div v-if="!isDepartment" style="float: right;">
        <el-button size="small" type="primary" @click="addAppointPost('add')">新增</el-button>
    <div style="display: flex;justify-content: space-between;">
      <el-form ref="page" size="small" :inline="true">
        <el-form-item label="姓名">
          <el-input v-model="userName" placeholder="请输入姓名" size="small" clearable></el-input>
        </el-form-item>
        <el-form-item>
          <el-button size="small" type="primary" @click="refreshTable">查 è¯¢</el-button>
        </el-form-item>
      </el-form>
      <div>
        <el-button v-if="!isDepartment" size="small" type="primary" @click="addAppointPost('add')">新增</el-button>
      </div>
    </div>
    <div class="table">
      <TableCard :showForm="false" :showTitle="false">
        <template v-slot:table>
          <ZTTable
            :column="yearColumnData"
            :height="'calc(100vh - 20em)'"
            :table-data="tableData"
            :table-loading="yearLoading"
            style="padding: 0 15px;margin-bottom: 16px"
          >
            <div slot="jobResponsibilities" slot-scope="scope">
              <div v-html="changeLine(scope.row.responsibilities)"></div>
            </div>
            <div slot="placeWorkSlot" slot-scope="scope">
              <div v-html="changeLine(scope.row.placeWork)"></div>
            </div>
          </ZTTable>
        </template>
      </TableCard>
      <el-pagination :current-page="1" :page-size="search.size" :page-sizes="[10, 20, 30, 50, 100]"
                     :total="search.total" layout="->,total, sizes, prev, pager, next, jumper"
                     @size-change="handleSizeChange"
                     @current-change="handleCurrentChange">
      </el-pagination>
    </div>
    <lims-table :tableData="tableData" :column="yearColumnData"
                @pagination="pagination" :height="'calc(100vh - 20em)'"
                :page="search" :tableLoading="yearLoading">
      <div slot="jobResponsibilities" slot-scope="scope">
        <div v-html="changeLine(scope.row.responsibilities)"></div>
      </div>
      <div slot="placeWorkSlot" slot-scope="scope">
        <div v-html="changeLine(scope.row.placeWork)"></div>
      </div>
    </lims-table>
    <!--新增能力认定弹框-->
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :title="title"
               :visible.sync="dialogVisible"
@@ -48,11 +38,6 @@
            </el-select>
          </el-form-item>
        </el-col>
<!--        <el-col :span="12">-->
<!--          <el-form-item label="职称:" label-width="110px" prop="technicalPost">-->
<!--            <el-input v-model="form.technicalPost" :disabled="operationType === 'view'" clearable size="small" style="width: 100%;"/>-->
<!--          </el-form-item>-->
<!--        </el-col>-->
        <el-col :span="24">
          <div style="display: flex;justify-content: space-evenly;font-weight: 600">
            <span>查核结果</span>
@@ -67,7 +52,7 @@
        </el-col>
        <el-col :span="8">
          <el-form-item class="radio-group" prop="academicConformNot" style="text-align: center">
            <el-radio-group v-model="form.academicConformNot" :disabled="operationType === 'view' || operationType === 'confirm'">
            <el-radio-group v-model="form.academicConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden>
              <el-radio :label="1">符合</el-radio>
              <el-radio :label="2">不符合</el-radio>
              <el-radio :label="3">不适用</el-radio>
@@ -86,7 +71,7 @@
        </el-col>
        <el-col :span="8">
          <el-form-item class="radio-group" prop="relatedYearsConformNot" style="text-align: center">
            <el-radio-group v-model="form.relatedYearsConformNot" :disabled="operationType === 'view' || operationType === 'confirm'">
            <el-radio-group v-model="form.relatedYearsConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden>
              <el-radio :label="1">符合</el-radio>
              <el-radio :label="2">不符合</el-radio>
              <el-radio :label="3">不适用</el-radio>
@@ -105,7 +90,7 @@
        </el-col>
        <el-col :span="8">
          <el-form-item class="radio-group" prop="relatedTrainingConformNot" style="text-align: center">
            <el-radio-group v-model="form.relatedTrainingConformNot" :disabled="operationType === 'view' || operationType === 'confirm'">
            <el-radio-group v-model="form.relatedTrainingConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden>
              <el-radio :label="1">符合</el-radio>
              <el-radio :label="2">不符合</el-radio>
              <el-radio :label="3">不适用</el-radio>
@@ -125,7 +110,7 @@
        </el-col>
        <el-col :span="8">
          <el-form-item class="radio-group" prop="relevantExperienceConformNot" style="text-align: center">
            <el-radio-group v-model="form.relevantExperienceConformNot" :disabled="operationType === 'view' || operationType === 'confirm'">
            <el-radio-group v-model="form.relevantExperienceConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden>
              <el-radio :label="1">符合</el-radio>
              <el-radio :label="2">不符合</el-radio>
              <el-radio :label="3">不适用</el-radio>
@@ -147,7 +132,7 @@
        </el-col>
        <el-col :span="8">
          <el-form-item class="radio-group" prop="workLicenseConformNot" style="text-align: center">
            <el-radio-group v-model="form.workLicenseConformNot" :disabled="operationType === 'view' || operationType === 'confirm'">
            <el-radio-group v-model="form.workLicenseConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden>
              <el-radio :label="1">符合</el-radio>
              <el-radio :label="2">不符合</el-radio>
              <el-radio :label="3">不适用</el-radio>
@@ -163,7 +148,7 @@
          <el-form-item label="岗位职责:" label-width="110px" prop="jobResponsibilitiesTem" style="height: 450px">
            <el-checkbox-group v-model="form.jobResponsibilitiesTem" :disabled="operationType === 'view' || operationType === 'confirm'"
                               @change="selectResponsibilities">
              <el-checkbox v-for="city in responsibilities" :key="city.value" :label="city.label"
              <el-checkbox v-for="city in dict.type.responsibilities_list" :key="city.value" :label="city.label"
                           :value="city.value"></el-checkbox>
            </el-checkbox-group>
          </el-form-item>
@@ -171,7 +156,7 @@
        <el-col :span="8">
          <el-form-item class="radio-group" prop="jobResponsibilitiesConformNot"
                        style="text-align: center;height: 420px">
            <el-radio-group v-model="form.jobResponsibilitiesConformNot" :disabled="operationType === 'view' || operationType === 'confirm'">
            <el-radio-group v-model="form.jobResponsibilitiesConformNot" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden>
              <el-radio :label="1">符合</el-radio>
              <el-radio :label="2">不符合</el-radio>
              <el-radio :label="3">不适用</el-radio>
@@ -189,7 +174,7 @@
        </el-col>
        <el-col :span="16">
          <el-form-item label="综合评价:" label-width="110px" prop="comprehensiveAssessment">
            <el-radio-group v-model="form.comprehensiveAssessment" :disabled="operationType === 'view' || operationType === 'confirm'">
            <el-radio-group v-model="form.comprehensiveAssessment" :disabled="operationType === 'view' || operationType === 'confirm'" v-removeAriaHidden>
              <el-radio label="Qualified this position">可胜任该岗位</el-radio>
              <el-radio label="You can work while training">可边培训边上岗</el-radio>
              <el-radio label="Iconpetent for the position">不胜任该岗位</el-radio>
@@ -218,6 +203,18 @@
<script>
import limsTable from "@/components/Table/lims-table.vue";
import {
  addOrUpdatePersonPersonnelCapacity,
  confirmPersonnelCapability,
  deletePersonPersonnelCapacity,
  exportPersonnelCapacity,
  personPersonnelCapacityPage,
  submitConfirmPersonnelCapability
} from "@/api/cnas/personal/personPersonnelCapacity";
import {selectUserCondition} from "@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment";
import {mapGetters} from "vuex";
export default {
  props: {
    departId: {
@@ -232,8 +229,12 @@
    }
  },
  components: {
    limsTable
  },
  computed: {
    ...mapGetters(["userId"]),
  },
  dicts: ['responsibilities_list'],
  data() {
    return {
      userName: '',
@@ -344,7 +345,7 @@
                this.handleViewClick('confirm', row);
              },
              disabled: (row) => {
                if (row.confirmDate || JSON.parse(localStorage.getItem("user")).userId != row.confirmOperatingPersonnelId) {
                if (row.confirmDate || this.userId != row.confirmOperatingPersonnelId) {
                  return true
                } else {
                  return false
@@ -401,35 +402,10 @@
  methods: {
    // ä¸‹è½½
    downLoadPost(row) {
      this.$axios.get(this.$api.personnel.exportPersonnelCapacity + '?id=' + row.id,{responseType: "blob"}).then(res => {
      exportPersonnelCapacity({id: row.id}).then(res => {
        this.outLoading = false
        const blob = new Blob([res],{ type: 'application/msword' });
        //将Blob å¯¹è±¡è½¬æ¢æˆå­—符串
        let reader = new FileReader();
        reader.readAsText(blob, 'utf-8');
        reader.onload = () => {
          try {
            let result = JSON.parse(reader.result);
            if (result.message) {
              this.$message.error(result.message);
            } else {
              const url = URL.createObjectURL(blob);
              const link = document.createElement('a');
              link.href = url;
              link.download = "人员能力导出" + '.docx';
              link.click();
              this.$message.success('导出成功')
            }
          } catch (err) {
            console.log(err);
            const url = URL.createObjectURL(blob);
            const link = document.createElement('a');
            link.href = url;
            link.download = "人员能力导出" + '.docx';
            link.click();
            this.$message.success('导出成功')
          }
        }
        this.$download.saveAs(blob, '人员能力导出.docx')
      })
    },
    // æŸ¥è¯¢
@@ -439,11 +415,21 @@
    // èŽ·å–äººå‘˜èƒ½åŠ›åˆ—è¡¨ä¿¡æ¯
    getList(userId) {
      this.search.userId = userId;
      const name = this.isDepartment ? 'departmentId' : 'userId';
      const params = this.isDepartment ?
        {
          departmentId: this.search.userId,
          size: this.search.size,
          current: this.search.current,
          userName: this.userName,
        }: {
          userId: this.search.userId,
          size: this.search.size,
          current: this.search.current,
          userName: this.userName,
        }
      this.yearLoading = true
      this.$axios.get(this.$api.personnel.personPersonnelCapacityPage + '?userName=' + this.userName + `&${name}=` + this.search.userId + '&size=' + this.search.size + '&current=' + this.search.current).then(res => {
      personPersonnelCapacityPage(params).then(res => {
        this.yearLoading = false
        if (res.code === 201) return;
        this.tableData = res.data.records;
        this.search.total = res.data.total;
      }).catch(err => {
@@ -451,22 +437,19 @@
        this.yearLoading = false
      })
    },
    pagination (page) {
      this.search.size = page.limit
      this.refreshTable()
    },
    selectResponsibilities(arr) {
      let arrTem = [];
      arr.map(val => {
        const index = this.responsibilities.findIndex(item => item.label === val);
        const index = this.dict.type.responsibilities_list.findIndex(item => item.label === val);
        if (index > -1) {
          arrTem.push(this.responsibilities[index].value);
          arrTem.push(this.dict.type.responsibilities_list[index].value);
        }
      });
      this.form.jobResponsibilities = arrTem.join(',');
    },
    getResponsibilities() {
      this.$axios.post(this.$api.enums.selectEnumByCategory, {
        category: '岗位职责'
      }).then(res => {
        this.responsibilities = res.data;
      });
    },
    changeLine (val) {
      if(val) {
@@ -480,13 +463,11 @@
      this.operationType = type;
      this.title = '新增能力认定'
      this.dialogVisible = true;
      console.log('this.departId---', this.departId)
      this.form = {
        jobResponsibilitiesTem: []
      }
      this.form.userId = this.departId
      this.getUserList();
      this.getResponsibilities();
    },
    // ç¼–辑/查看
@@ -502,17 +483,12 @@
        this.$set(this.form, 'jobResponsibilitiesTem', [])
      }
      this.getUserList();
      this.getResponsibilities();
    },
    // ä¿å­˜
    submitForm() {
      this.$refs.infoForm.validate((valid) => {
        if (valid) {
          this.$axios.post(this.$api.personnel.addOrUpdatePersonPersonnelCapacity, this.form, {
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(res => {
          addOrUpdatePersonPersonnelCapacity(this.form).then(res => {
            if (res.code == 200) {
              this.$message.success('提交成功');
              this.getList(this.departId);
@@ -526,11 +502,7 @@
    submitForm1() {
      this.$refs.infoForm.validate((valid) => {
        if (valid) {
          this.$axios.post(this.$api.personnel.submitConfirmPersonnelCapability, this.form, {
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(res => {
          submitConfirmPersonnelCapability(this.form).then(res => {
            if (res.code == 200) {
              this.$message.success('提交成功');
              this.getList(this.departId);
@@ -541,7 +513,7 @@
      });
    },
    verifyGet () {
      this.$axios.get(this.$api.personnel.confirmPersonnelCapability + '?id=' + this.verifyGetId).then(res => {
      confirmPersonnelCapability({id: this.verifyGetId}).then(res => {
        if (res.code == 200) {
          this.$message.success('确认成功');
          this.resetForm()
@@ -556,7 +528,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.delete(this.$api.personnel.deletePersonPersonnelCapacity + '?id=' + id).then(res => {
        deletePersonPersonnelCapacity({id: id}).then(res => {
          if (res.code == 200) {
            this.$message.success('删除成功');
            this.getList(this.departId);
@@ -571,20 +543,12 @@
      this.dialogVisible = false;
    },
    getUserList(){
      this.$axios.get(this.$api.user.selectDepartmentLimsUserList).then(res => {
      selectUserCondition().then(res => {
        if (res.code == 200) {
          this.responsibleOptions = res.data
        }
      })
    },
    handleSizeChange(val) {
      this.search.size = val;
      this.getList(this.departId);
    },
    handleCurrentChange(val) {
      this.search.current = val;
      this.getList(this.departId);
    }
  },
  watch: {
    // ç›‘听点击el-tree的数据,进行数据刷新
@@ -593,21 +557,12 @@
        this.getList(newId);
      }
    },
    // ç›‘听点击el-tree的数据,进行数据刷新
    isDepartment: {
      handler(newId, oldId) {
        this.getList(this.departId);
      }
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 6vh auto 50px !important;
}
>>> .el-dialog__body {
  max-height: 70vh;
  max-height: 74vh;
  overflow-y: auto;
}