方法验证模块恢复为本地版本:移除合并进来的同事 Word 表单组件(新增/编辑切换)与上岗证实时查询,恢复本地列表列、搜索与上岗证弹窗实现;人员授权下拉优化与 vite 配置等其余合并内容保留
已修改3个文件
已删除1个文件
382 ■■■■■ 文件已修改
src/api/cnas/process/method/methodVerification.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/method/methodVerification/component/viewWorkPermitDia.vue 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/method/methodVerification/component/wordFormDIa.vue 297 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/method/methodVerification/index.vue 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/process/method/methodVerification.js
@@ -38,15 +38,6 @@
  });
}
// æŒ‰å½“前所选检测人员实时读取任职授权证书
export function getCurrentWorkFiles(query) {
  return request({
    url: '/processMethodVerify/getCurrentWorkFiles',
    method: 'get',
    params: query,
  })
}
// ä¿®æ”¹æ ‡å‡†æ–¹æ³•验证
export function updateMethodVerify(data) {
  return request({
src/views/CNAS/process/method/methodVerification/component/viewWorkPermitDia.vue
@@ -2,8 +2,6 @@
  <div>
    <el-dialog v-model="filesDialogVisible" title="查看上岗证" width="80%" @closed="closeFilesLook">
      <div>
        <el-alert v-if="!tableLoading && tableData.length === 0" type="info" :closable="false"
                  title="所选检测人员暂无任职授权记录,请核对被任职人员与检测人员是否为同一人。"/>
        <limsTable
            ref="yearTable"
            :column="columnData"
@@ -20,7 +18,7 @@
        fullscreen
        title="查看附件" top="5vh" width="800px">
      <filePreview v-if="lookDialogVisible" :currentFile="{}"
                   :fileUrl="fileUrl(currentInfo)" style="max-height: 90vh;overflow-y: auto;"/>
                   :fileUrl="javaApi+'/img/'+currentInfo.fileUrl" style="max-height: 90vh;overflow-y: auto;"/>
    </el-dialog>
  </div>
</template>
@@ -29,7 +27,6 @@
import file from '@/utils/file';
import filePreview from '@/components/Preview/filePreview.vue';
import limsTable from '@/components/Table/lims-table.vue'
import {getCurrentWorkFiles} from '@/api/cnas/process/method/methodVerification'
export default {
  name: 'viewWorkPermitDia',
@@ -86,56 +83,23 @@
  },
  // æ–¹æ³•集合
  methods: {
    fileUrl(row) {
      const image = /\.(png|jpe?g|gif|bmp|webp)$/i.test(row.fileUrl || '')
      return this.javaApi + (image ? '/img/' : '/word/') + row.fileUrl
    },
    // ä¸¤ç§ç”¨æ³•:数组=检测人员id(实时查询);行对象=优先展示已保存的上岗证,其次按已选检测人员实时查询
    openDia(payload = {}) {
    openDia(row) {
      this.filesDialogVisible = true
      this.tableData = []
      if (Array.isArray(payload)) {
        this.loadCurrentFiles(payload)
        return
      }
      this.info = payload || {}
      if (Array.isArray(payload.workFileList) && payload.workFileList.length) {
        this.tableData = payload.workFileList
        return
      }
      this.loadCurrentFiles(Array.isArray(payload.confirmUser) ? payload.confirmUser : [])
    },
    loadCurrentFiles(userIds) {
      if (!userIds.length) return
      this.tableLoading = true
      getCurrentWorkFiles({userIds: userIds.join(',')}).then(res => {
        if (res.code === 200) this.tableData = res.data || []
      }).catch(() => {
        this.$message.error('上岗证读取失败,请稍后重试')
      }).finally(() => {
        this.tableLoading = false
      })
      this.info = row
      this.tableData = this.info.workFileList
    },
    closeFilesLook() {
      this.filesDialogVisible = false
    },
    // æŸ¥çœ‹æ–‡ä»¶
    handleLook(row) {
      if (!row.fileUrl) {
        this.$message.warning('该人员已有任职授权记录,但尚未上传上岗证书文件')
        return
      }
      this.currentInfo = row
      this.lookDialogVisible = true
    },
    // ä¸‹è½½
    upload(row) {
      if (!row.fileUrl) {
        this.$message.warning('该人员已有任职授权记录,但尚未上传上岗证书文件')
        return
      }
      let url = '';
      if (/\.(png|jpe?g|gif|bmp|webp)$/i.test(row.fileUrl || '')) {
      if(row.type==1){
        url = this.javaApi + '/img/' + row.fileUrl
        file.downloadIamge(url, row.fileName)
      } else {
src/views/CNAS/process/method/methodVerification/component/wordFormDIa.vue
ÎļþÒÑɾ³ý
src/views/CNAS/process/method/methodVerification/index.vue
@@ -3,8 +3,8 @@
    <div style="display: flex;justify-content: space-between">
      <div style="display: flex;">
        <div style="margin-bottom: 18px;margin-right: 10px;display: flex;align-items: center;line-height: 32px;">
          <span style="width: 88px;font-size: 14px;font-weight: 700;color: var(--lims-text-2);">标准名称</span>
          <el-input size="small" placeholder="请输入" clearable v-model="searchForm.standardName"
          <span style="width: 88px;font-size: 14px;font-weight: 700;color: var(--lims-text-2);">标准方法</span>
          <el-input size="small" placeholder="请输入" clearable v-model="searchForm.methodName"
                    @keyup.enter="searchList"></el-input>
        </div>
        <div style="line-height: 30px;">
@@ -22,26 +22,24 @@
                 @pagination="pagination">
      </limsTable>
    </div>
    <component :is="isWordForm ? 'wordFormDIa' : 'formDIa'" v-if="formDIa" ref="formDIa"
               :operationType="operationType" @closeDia="closeDia" />
    <formDIa v-if="formDIa" ref="formDIa" :operationType="operationType" @closeDia="closeDia"></formDIa>
  </div>
</template>
<script>
import limsTable from '@/components/Table/lims-table.vue'
import formDIa from './component/formDIa.vue';
import wordFormDIa from './component/wordFormDIa.vue';
import { delMethodVerify, exportMethodVerify, pagesMethodVerify } from '@/api/cnas/process/method/methodVerification'
export default {
  name: 'MethodVerification',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { limsTable, formDIa, wordFormDIa },
  components: { limsTable, formDIa },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        standardName: '',
        methodName: '',
        operationType: 1,
      },
      options: [
@@ -50,18 +48,18 @@
      ],
      tableColumn: [
        {
          label: '标准名称',
          prop: 'standardName',
          label: '标准方法',
          prop: 'methodName',
          minWidth: '100'
        },
        {
          label: '标准编号',
          prop: 'standardCode',
          label: '验证原因',
          prop: 'verifyReason',
          minWidth: '100'
        },
        {
          label: '验证项目',
          prop: 'verifyItem',
          label: '主要技术变化',
          prop: 'technologyChange',
          minWidth: '100'
        },
        {
@@ -112,7 +110,6 @@
      total: 0,
      formDIa: false,
      operationType: '',
      isWordForm: true,
    };
  },
  mounted() {
@@ -123,7 +120,7 @@
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = {
        standardName: this.searchForm.standardName,
        methodName: this.searchForm.methodName,
        operationType: this.searchForm.operationType,
      }
      const page = this.page
@@ -161,13 +158,12 @@
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.standardName = '';
      this.searchForm.methodName = '';
      this.searchList()
    },
    openFormDia(type, row) {
      this.formDIa = true
      this.operationType = type
      this.isWordForm = type === 'add' || !!row?.standardCode
      this.$nextTick(() => {
        this.$refs.formDIa.openDia(row)
      })