chenrui
2025-02-27 1f1cc2740ef598c8925edc0f66bf40113d2044a7
Merge remote-tracking branch 'origin/dev' into dev
已修改16个文件
已删除1个文件
已添加5个文件
1731 ■■■■ 文件已修改
package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/personnel/personnelOverview.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/process/sampleDisposal.js 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/systemManagement/documentControl.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/renyuan-title.svg 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/UpPdfStamp/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/file.js 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/personnel/personnelOverview/index.vue 201 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/sampleDisposal/index.vue 609 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue 258 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue 198 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/correctiveAction/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/documentControl/components/FileList.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/business/inspectionTask/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/performance/class/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/menu/index.vue 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/system/role/index.vue 175 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json
@@ -55,6 +55,7 @@
    "jspdf": "^3.0.0",
    "mammoth": "^1.9.0",
    "nprogress": "0.2.0",
    "pako": "^2.1.0",
    "print-js": "^1.6.0",
    "quill": "2.0.2",
    "screenfull": "5.0.2",
src/api/cnas/personnel/personnelOverview.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,9 @@
import request from '@/utils/request'
export function selectPersonnelOverview(query) {
  return request({
    url: '/user/selectPersonnelOverview',
    method: 'get',
    params: query
  })
}
src/api/cnas/process/sampleDisposal.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,74 @@
// æ£€æµ‹æˆ–校准物品的处置
import request from "@/utils/request";
// ä¿®æ”¹
export function doProcessDeal(data) {
  return request({
    url: "/processDeal/doProcessDeal",
    method: "post",
    data: data,
  });
}
// æ–°å¢ž
export function addProcessDeal(data) {
  return request({
    url: "/processDeal/addProcessDeal",
    method: "post",
    data: data,
  });
}
// æäº¤åŽ†å²  ä¼ å‚id
export function submitProcessTotaldeal(data) {
  return request({
    url: "/processTotaldeal/submitProcessTotaldeal",
    method: "post",
    data: data,
  });
}
//查询详情  åˆ†é¡µæŸ¥è¯¢é‡Œé¢totaldealId  ä¼ å‚历史的id
export function pageProcessDeal(query) {
  return request({
    url: "/processDeal/pageProcessDeal",
    method: "get",
    params: query,
  });
}
// å®¡æ ¸  ä¼ å‚id和通过不通过state(中文)
export function checkProcessTotaldeal(data) {
  return request({
    url: "/processTotaldeal/checkProcessTotaldeal",
    method: "post",
    data: data,
  });
}
// æ‰¹å‡†  ä¼ å‚id和通过不通过state(中文)
export function ratifyProcessTotaldeal(data) {
  return request({
    url: "/processTotaldeal/ratifyProcessTotaldeal",
    method: "post",
    data: data,
  });
}
//删除
export function delProcessDeal(query) {
  return request({
    url: "/processDeal/delProcessDeal",
    method: "delete",
    params: query,
  });
}
//查看历史
export function pageProcessTotaldeal(query) {
  return request({
    url: "/processTotaldeal/pageProcessTotaldeal",
    method: "get",
    params: query,
  });
}
src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js
@@ -15,10 +15,18 @@
    data: query
  })
}
// æ–°å¢žéªŒæ”¶
export function addAcceptance(query) {
  return request({
    url: '/feStandardSubstanceAcceptance/addAcceptance',
    method: 'post',
    data: query
  })
}
// ä¿®æ”¹éªŒæ”¶
export function updateAcceptance(query) {
  return request({
    url: '/feStandardSubstanceAcceptance/updateAcceptance',
    method: 'post',
    data: query
  })
@@ -34,6 +42,23 @@
    params: query
  })
}
// æ ‡å‡†ç‰©è´¨éªŒæ”¶æŸ¥çœ‹è¯¦æƒ…
export function getAcceptanceDetails(query) {
  return request({
    url: '/feStandardSubstanceAcceptance/getAcceptanceDetails',
    method: 'get',
    params: query
  })
}
// æ ‡å‡†ç‰©è´¨éªŒæ”¶å¯¼å‡º
export function exportFeStandardSubstanceAcceptance(query) {
  return request({
    url: '/feStandardSubstanceAcceptance/exportFeStandardSubstanceAcceptance',
    method: 'get',
    params: query,
    responseType: "blob"
  })
}
src/api/cnas/systemManagement/documentControl.js
@@ -120,7 +120,7 @@
  return request({
    url: "/manageDocumentIssueRecycle/addManageDocumentIssueRecycle",
    method: "post",
    responseType: "blob",
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    data: data,
  });
}
src/assets/images/renyuan-title.svg
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,11 @@
<svg width="148" height="21" viewBox="0 0 148 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.00437 5.75531V0.0625L0.772461 5.75531H7.00437Z" fill="#B26F00"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M141.709 5.75531V0.0625L147.941 5.75531H141.709Z" fill="#B26F00"/>
<path d="M6.97192 2.0625C6.97192 0.957931 7.86735 0.0625 8.97192 0.0625H139.676C140.781 0.0625 141.676 0.957931 141.676 2.0625V12.0625C141.676 16.4808 138.095 20.0625 133.676 20.0625H14.9719C10.5537 20.0625 6.97192 16.4808 6.97192 12.0625V2.0625Z" fill="url(#paint0_linear_2026_4)"/>
<defs>
<linearGradient id="paint0_linear_2026_4" x1="6.97192" y1="0.0625" x2="6.97192" y2="20.0625" gradientUnits="userSpaceOnUse">
<stop stop-color="#F9C76F"/>
<stop offset="1" stop-color="#FEB42F"/>
</linearGradient>
</defs>
</svg>
src/components/UpPdfStamp/index.vue
@@ -12,6 +12,7 @@
<script>
import jsPDF from "jspdf";
import file from '@/utils/file.js'
export default {
  props: ['isUpFile'],
  data() {
@@ -142,8 +143,7 @@
      }
      const pdf = new jsPDF("p", "mm", "a4");
      for (let i = 0; i < this.contextList.length; i++) {
        console.log(2222, this.contextList.length, this.$refs.pdfCanvas[i])
        const imgData = this.$refs.pdfCanvas[i].toDataURL('image/jpeg', 1.0);
        const imgData = this.$refs.pdfCanvas[i].toDataURL('image/jpeg', 0.7);
        const pdfWidth = pdf.internal.pageSize.getWidth();
        const pdfHeight = (this.$refs.pdfCanvas[i].height * pdfWidth) / this.$refs.pdfCanvas[i].width;
        pdf.addImage(imgData, "JPEG", 0, 0, pdfWidth, pdfHeight); // å°†å›¾ç‰‡æ·»åŠ åˆ° PDF
src/utils/file.js
@@ -1,44 +1,51 @@
import { convertToHtml } from 'mammoth';
import Vue from 'vue'
import { convertToHtml } from "mammoth";
import pako from "pako";
import Vue from "vue";
export default {
  async convertFileToHtml(url) {
    var xhr = new XMLHttpRequest();
    xhr.open('GET', Vue.prototype.javaApi+url, true);//获取文件流的接口
    xhr.open("GET", Vue.prototype.javaApi + url, true); //获取文件流的接口
    xhr.send();
    xhr.responseType = "blob";//不能漏
    let xhrPromise = new Promise((resolve, reject) => {
      xhr.onload = async function () {
        if (this.status === 200) {
          // è¿”回的文件流,转换成blob对象
          var blob = new Blob([this.response],{ type:'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
          var blob = new Blob([this.response], {
            type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
          });
          // ä½¿ç”¨mammoth将Word转换为HTML
          let reader = new FileReader();
          reader.readAsArrayBuffer(blob);
          let htmlContentPromise = new Promise((resolve, reject) => {
            reader.onload = async function () {
              var arrayBuffer = xhr.response; //arrayBuffer
              const result = await convertToHtml({ arrayBuffer: arrayBuffer })
              let html = result.value.replace(//g, '')
              .replace('<h1>', '<h1 style="text-align: center;">')
              .replace(/<table>/g, '<table style="border-collapse: collapse;border: 1px solid #000;">')
              const result = await convertToHtml({ arrayBuffer: arrayBuffer });
              let html = result.value
                .replace(//g, "")
                .replace("<h1>", '<h1 style="text-align: center;">')
                .replace(
                  /<table>/g,
                  '<table style="border-collapse: collapse;border: 1px solid #000;">'
                )
              .replace(/<tr>/g, '<tr style="height: 30px;">')
              .replace(/<td>/g, '<td style="border: 1px solid #000;">')
              .replace(/<p>/g, '<p style="text-indent: 2em;">')
              .replace(/<a [^>]*>/g, "")
              .replace(/<\/a>/g, "")
                .replace(/<\/a>/g, "");
              // .replace(/em/g, "cm");
              resolve(html)
              resolve(html);
            };
          })
          resolve(await htmlContentPromise)
          });
          resolve(await htmlContentPromise);
        }
      }
    })
    return await xhrPromise
      };
    });
    return await xhrPromise;
  },
  downloadIamge(imgsrc, name) {//下载图片地址和图片名
  downloadIamge(imgsrc, name) {
    //下载图片地址和图片名
    var image = new Image();
    // è§£å†³è·¨åŸŸ Canvas æ±¡æŸ“问题
    image.setAttribute("crossOrigin", "anonymous");
@@ -57,5 +64,19 @@
      a.dispatchEvent(event); // è§¦å‘a的单击事件
    };
    image.src = imgsrc;
  }
  },
  // åŽ‹ç¼©blob
  compressBlob(blob) {
    const reader = new FileReader();
    reader.readAsArrayBuffer(blob);
    return new Promise((resolve) => {
      reader.onload = () => {
        const arrayBuffer = reader.result;
        const uint8Array = new Uint8Array(arrayBuffer);
        const compressedData = pako.deflate(uint8Array);
        const compressedBlob = new Blob([compressedData], { type: blob.type });
        resolve(compressedBlob);
      };
    });
  },
};
src/views/CNAS/personnel/personnelOverview/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,201 @@
<template>
  <div class="capacity-scope">
    <div>
      <el-form :model="entity" ref="entity" size="small" :inline="true">
        <el-form-item label="人员名称">
          <el-input v-model="entity.name" clearable></el-input>
        </el-form-item>
        <el-form-item>
          <el-button @click="refresh">重 ç½®</el-button>
          <el-button type="primary" @click="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()">查 è¯¢</el-button>
        </el-form-item>
      </el-form>
    </div>
    <div class="table" v-loading="loading">
      <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list" v-if="list.length>0||loading">
        <ul class="card">
          <li v-for="(m,i) in list" :key="i">
            <el-image style="width: 80px;height: 112px;" :src="javaApi+'/img/'+m.pictureUrl">
              <div slot="error" class="image-error" style="width: 79px;
            height: 110px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #EEEEEE;">
                <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i>
              </div>
            </el-image>
            <el-image style="width: 195px;
            height: 112px;" :src="javaApi+'/img/'+m.signatureUrl">
              <div slot="error" class="image-error" style="width: 194px;
            height: 110px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #EEEEEE;">
                <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i>
              </div>
            </el-image>
            <div class="title">{{ m.name }}</div>
          </li>
        </ul>
      </scroll-pagination>
      <div v-if="list.length<1&&!loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >暂无数据</div>
    </div>
  </div>
</template>
<script>
import ScrollPagination from '@/components/index/scroll-paging.vue'
import {selectUserCondition} from "@/api/business/inspectionTask";
export default {
  components: {
    ScrollPagination
  },
  data() {
    return {
      entity:{
        name: null,
        status: 0,
      },
      list:[],
      currentPage: 1, // å½“前页
      pageSize: 16, // ä¸€é¡µ16条
      total: '',
      loading: true, // ç»„ä»¶loading的展示,默认为true
      finishLoding: false, // åŠ è½½å®Œæˆï¼Œæ˜¾ç¤ºå·²ç»æ²¡æœ‰æ›´å¤šäº†
      keyMap: {}
    }
  },
  created() {
    this.keyMap = {};
    this.currentPage = 1;
    this.list = [];
    this.refreshTable();
  },
  methods: {
    refreshTable() {
      const key = `_${this.currentPage}`
      const value = this.keyMap[key]
      // å¦‚æžœvalue存在,表示缓存有值,那么阻止请求
      if(value) {
        return
      }
      // value不存在,表示第一次请求,设置占位
      this.keyMap[key] = 'temp'
      if(this.currentPage==1){
        this.loading = true
      }
      selectUserCondition({...this.entity}).then(res => {
        this.total = res.data.length
        let list = res.data
        if(list.length==0){
          this.finishLoding = true;
        }else{
          if(list.length<this.pageSize){
            this.finishLoding = true;
          }
          this.list = this.list.concat(list)
          if(this.total==this.list.length){
            this.finishLoding = true;
          }
          this.currentPage++;
        }
        this.loading = false
      }).catch(err => {
        this.loading = false
      })
    },
    refresh() {
      this.keyMap = {};
      this.currentPage= 1;
      this.list=[];
      this.finishLoding = false;
      this.entity={
        name: null,
        state:1,
        orderBy: {field: "id", order: "asc"}
      };
      this.refreshTable()
    },
    // æ»šåŠ¨è§¦åº•åŠ è½½
    scrollFn() {
      let clientHeight = document.documentElement.clientHeight - 18; //可视区域
      let scrollHeight = document.body.scrollHeight; // æ»šåŠ¨æ–‡æ¡£é«˜åº¦
      let scrollTop = parseInt(document.documentElement.scrollTop); // å·²æ»šåŠ¨çš„é«˜åº¦
      let height = 300;
      if (
        scrollTop + clientHeight >= scrollHeight - height &&
        scrollHeight != 0
      ) {
        if (!this.finishLoding&&this.currentPage*this.pageSize<this.total) {
          this.currentPage = this.currentPage + 1;
          this.refreshTable();
        }
      } else {
        return false;
      }
    },
    throttle(fn, wait) {
      // å°è£…函数进行节流
      var timer = null;
      return function () {
        var context = this;
        var args = arguments;
        if (!timer) {
          timer = setTimeout(function () {
            fn.apply(context, args);
            timer = null;
          }, wait);
        }
      };
    },
  },
  destroyed() {
    window.removeEventListener("scroll", this.throttle(), false);
  },
}
</script>
<style scoped>
.table {
  width: 100%;
  height: calc(100% - 60px - 80px - 10px - 40px);
  overflow-y: auto;
}
.card {
  list-style-type: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, 314px);
  /* justify-content: center; */
  grid-gap: 16px;
  min-height: 200px;
  padding-left: 0 !important;
}
.card li{
  width: 320px;
  border-radius: 8px 8px 8px 8px;
  box-shadow: 4px 4px 8px 0px rgba(51,51,51,0.04);
  border: 1px solid #EEEEEE;
  margin: 0 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  padding: 26px 16px 16px;
  font-size: 14px;
  position: relative;
}
li .title{
  width: 147px;
  height: 20px;
  background: url(~@/assets/images/renyuan-title.svg) no-repeat;
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  line-height: 20px;
  color: #fff;
}
</style>
src/views/CNAS/process/sampleDisposal/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,609 @@
<template>
  <div class="sample-disposal">
    <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="queryParams.totaldealId = ''">
      <el-tab-pane label="填写" name="填写" style="height: 100%;" :key="1">
        <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;">新增</el-button>
        <div class="table" style="height: calc(100% - 200px)" v-if="activeName == '填写'">
          <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading"
            :height="'calc(100vh - 290px)'" :page="page" @pagination="pagination"></lims-table>
        </div>
      </el-tab-pane>
      <el-tab-pane label="历史记录" name="历史记录" style="height: 100%;" :key="2">
        <div class="search">
          <div class="search_thing">
            <div class="search_label">年月:</div>
            <div class="search_input">
              <el-date-picker v-model="queryParams0.month" type="month" placeholder="选择月" format="yyyy-MM"
                value-format="yyyy-MM" size="small" @change="refreshTable()">
              </el-date-picker>
            </div>
          </div>
          <div class="search_thing" style="padding-left: 30px;">
            <el-button size="small" @click="refresh()">重 ç½®</el-button>
            <el-button size="small" type="primary" @click="refreshTable()">查 è¯¢</el-button>
          </div>
        </div>
        <div class="table">
          <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading"
            :height="'calc(100vh - 300px)'" :page="page0" @pagination="pagination0"></lims-table>
        </div>
      </el-tab-pane>
    </el-tabs>
    <!-- æ–°å¢žæ ·å“ -->
    <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px">
      <el-row>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">样品名称:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                v-model="addInfo.sampleName"></el-input></div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">样品编号:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                v-model="addInfo.sampleCode"></el-input></div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">供样单位:</div>
            <div class="search_input">
              <el-select v-model="addInfo.sampleSupplier" size="small">
                <el-option :label="item.company" :value="item.company" v-for="(item, index) in customPageList"
                  :key="item.id"></el-option>
              </el-select>
            </div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">数量:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                v-model="addInfo.num"></el-input>
            </div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">处理方式:</div>
            <div class="search_input"><el-input size="small" placeholder="请输入" clearable
                v-model="addInfo.dealMethod"></el-input></div>
          </div>
        </el-col>
        <el-col :span="24" style="margin-bottom: 16px;">
          <div class="search_thing">
            <div class="search_label">时间:</div>
            <div class="search_input">
              <el-date-picker v-model="addInfo.dealTime" type="date" size="small" placeholder="选择日期" format="yyyy-MM-dd"
                value-format="yyyy-MM-dd" style="width: 100%;">
              </el-date-picker>
            </div>
          </div>
        </el-col>
      </el-row>
      <span slot="footer" class="dialog-footer">
        <el-button @click="addDialogVisible = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="submitAdd" :loading="addLoading">ç¡® å®š</el-button>
      </span>
    </el-dialog>
    <!-- è¯¦æƒ…/下载/审核/批准 -->
    <el-dialog :title="title0" :visible.sync="lookDialogVisible" width="800px" :class="{ downPdf: title0 == '下载' }"
      :modal="title0 != '下载'" top="5vh">
      <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.url" :currentFile="{}"
        style="max-height: 70vh;overflow-y: auto;" />
      <span slot="footer" class="dialog-footer" v-if="title0 == '审核' || title0 == '批准'">
        <el-button @click="submitCheck('不通过')" :loading="noCheckLoading">不通过</el-button>
        <el-button type="primary" @click="submitCheck('通过')" :loading="checkLoading">通 è¿‡</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import filePreview from "@/components/Preview/filePreview.vue";
import { selectCustomPageList } from "@/api/system/customer";
import {
  doProcessDeal,
  addProcessDeal,
  submitProcessTotaldeal,
  pageProcessDeal,
  checkProcessTotaldeal,
  ratifyProcessTotaldeal,
  delProcessDeal,
  pageProcessTotaldeal,
} from "@/api/cnas/process/sampleDisposal";
export default {
  components: {
    limsTable,
    filePreview,
  },
  name: "SampleDisposal",
  data() {
    return {
      activeName: '填写',
      title: '新增',
      addDialogVisible: false,
      addLoading: false,
      outLoading: false,
      editDialogVisible: false,
      lookDialogVisible: false,
      title0: '查看',
      noCheckLoading: false,
      checkLoading: false,
      // åŽ†å²åˆ—è¡¨
      addInfo: {},//新增样品
      customPageList: [],
      currentInfo: {
        arr: []
      },//查看的详情
      outPower: false,
      addPower: false,
      queryParams: {},
      tableData: [],
      column: [
        { label: "样品名称", prop: "sampleName" },
        { label: "样品编号", prop: "sampleCode" },
        { label: "供样单位", prop: "sampleSupplier" },
        { label: "数量", prop: "num" },
        { label: "处理方式", prop: "dealMethod" },
        { label: "时间", prop: "dealTime" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "编辑",
              type: "text",
              clickFun: (row) => {
                this.handleAdd0(row);
              },
            },
            {
              name: "删除",
              type: "text",
              clickFun: (row) => {
                this.handleDelete(row);
              },
            },
          ],
        },
      ],
      page: {
        total: 0,
        size: 10,
        current: 0,
      },
      tableLoading: false,
      queryParams0: {},
      tableData0: [],
      column0: [
        { label: "月份", prop: "month" },
        { label: "总数量", prop: "totalNum" },
        { label: "提交人", prop: "submitUserName" },
        { label: "审核人", prop: "examineUserName" },
        { label: "批准人", prop: "ratifyUserName" },
        {
          dataType: "action",
          fixed: "right",
          label: "操作",
          operation: [
            {
              name: "查看",
              type: "text",
              clickFun: (row) => {
                this.handleLook(row);
              },
            },
            {
              name: "下载",
              type: "text",
              clickFun: (row) => {
                this.handleDown0(row);
              },
              disabled: (row) => {
                return !row.url
              }
            },
            {
              name: "提交",
              type: "text",
              clickFun: (row) => {
                this.handleSubmit(row);
              },
              disabled: (row) => {
                return !!row.submitState && row.submitState != '待提交'
              }
            },
            {
              name: "审核",
              type: "text",
              clickFun: (row) => {
                this.handleCheck(row);
              },
              disabled: (row) => {
                return row.examineState == '通过' || row.submitState == '待提交'
              }
            },
            {
              name: "批准",
              type: "text",
              clickFun: (row) => {
                this.handleApproval(row);
              },
              disabled: (row) => {
                return row.ratifyState == '通过' || row.submitState == '待提交'
              }
            },
          ],
        },
      ],
      page0: {
        total: 0,
        size: 10,
        current: 0,
      },
    };
  },
  mounted() {
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    this.getCustomPageList()
    this.getList()
    this.getList0()
  },
  methods: {
    getPower() {
      let power = JSON.parse(sessionStorage.getItem('power'))
      let add = false
      let out = false
      let submitProcessTotaldeal = false
      let checkProcessTotaldeal = false
      let ratifyProcessTotaldeal = false
      for (var i = 0; i < power.length; i++) {
        if (power[i].menuMethod == 'addProcessDeal') {
          add = true
        }
        // if (power[i].menuMethod == 'exportProcessEvaluate') {
        //   out = true
        // }
        if (power[i].menuMethod == 'submitProcessTotaldeal') {
          submitProcessTotaldeal = true
        }
        if (power[i].menuMethod == 'checkProcessTotaldeal') {
          checkProcessTotaldeal = true
        }
        if (power[i].menuMethod == 'ratifyProcessTotaldeal') {
          ratifyProcessTotaldeal = true
        }
      }
      if (!ratifyProcessTotaldeal) {
        this.componentData.do.splice(4, 1)
      }
      if (!checkProcessTotaldeal) {
        this.componentData.do.splice(3, 1)
      }
      if (!submitProcessTotaldeal) {
        this.componentData.do.splice(2, 1)
      }
      if (!add) {
        this.componentData0.do.splice(1, 1)
        this.componentData0.do.splice(0, 1)
      }
      this.addPower = add
    },
    // èŽ·å–é€æ ·å•ä½åˆ—è¡¨
    getCustomPageList() {
      selectCustomPageList({
        current: -1,
        size: -1
      }).then(res => {
        this.customPageList = res.data.body.records
      }).catch(err => { });
    },
    handleDown() { },
    getList() {
      this.tableLoading = true;
      let param = { ...this.queryParams, ...this.page };
      delete param.total;
      pageProcessDeal({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData = res.data.records;
            this.page.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.getList();
    },
    refresh() {
      this.queryParams0 = {};
      this.page0.current = 1;
      this.getList0();
    },
    refreshTable() {
      this.page0.current = 1;
      this.getList0();
    },
    getList0() {
      this.tableLoading = true;
      let param = { ...this.queryParams0, ...this.page };
      delete param.total;
      pageProcessTotaldeal({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
            this.tableData0 = res.data.records;
            this.page0.total = res.data.total;
          }
        })
        .catch((err) => {
          this.tableLoading = false;
        });
    },
    pagination0({ page, limit }) {
      this.page0.current = page;
      this.page0.size = limit;
      this.getList0();
    },
    // å¡«å†™
    // handleAdd(row){
    //   this.componentData0.entity.totaldealId = row.id
    //   this.editDialogVisible = true
    // },
    // æ‰“开新增界面
    handleAdd0(row) {
      if (row) {
        this.addInfo = this.HaveJson(row)
        this.title = '编辑'
      } else {
        this.title = '新增'
        this.addInfo = {}
      }
      this.addDialogVisible = true
    },
    // æäº¤æ–°å¢ž
    submitAdd() {
      if (this.addInfo.id) {
        // ç¼–辑
        this.addLoading = true
        doProcessDeal({
          totaldealId: this.queryParams.totaldealId,
          ...this.addInfo
        }).then(res => {
          this.addLoading = false
          if (res.code === 201) return
          this.addDialogVisible = false
          this.$message({
            type: 'success',
            message: '编辑成功!'
          });
          this.page.current = 0;
          this.getList();
        }).catch(err => { });
      } else {
        // æ–°å¢ž
        this.addLoading = true
        addProcessDeal({
          totaldealId: this.queryParams.totaldealId,
          ...this.addInfo
        }).then(res => {
          this.addLoading = false
          if (res.code === 201) return
          this.addDialogVisible = false
          this.$message({
            type: 'success',
            message: '新增成功!'
          });
          this.page.current = 0;
          this.getList();
        }).catch(err => { });
      }
    },
    // æäº¤
    handleSubmit(row) {
      this.$confirm('是否提交 ' + row.month + ' æœˆä»½çš„æ•°æ®', '提交', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        submitProcessTotaldeal({
          id: row.id
        }).then(res => {
          if (res.code === 201) return
          this.$message({
            type: 'success',
            message: '提交成功!'
          });
          this.refreshTable()
        }).catch(err => { });
      })
    },
    // æŸ¥çœ‹
    handleLook(row) {
      // console.log(row)
      // this.title0 = '查看'
      // this.commonFun(row)
      this.activeName = '填写'
      this.queryParams.totaldealId = row.id
      this.$nextTick(() => {
        this.page.current = 0;
        this.getList();
      })
    },
    commonFun(row, callbanck) {
      this.currentInfo = row
      this.queryParams.totaldealId = row.id
      pageProcessDeal({
        current: -1,
        size: -1, ...this.queryParams
      }).then(res => {
        this.lookDialogVisible = true
        this.currentInfo.arr = res.data.records
        if (callbanck) {
          callbanck()
        }
      }).catch(err => { });
    },
    // å®¡æ ¸
    handleCheck(row) {
      this.title0 = '审核'
      this.commonFun(row)
    },
    // æ‰¹å‡†
    handleApproval(row) {
      this.title0 = '批准'
      this.commonFun(row)
    },
    // æäº¤å®¡æ ¸/批准
    submitCheck(state) {
      if (state == '通过') {
        this.checkLoading = true
      } else {
        this.noCheckLoading = true
      }
      if (this.title0 == '审核') {
        checkProcessTotaldeal({
          id: this.currentInfo.id,
          state: state
        }).then(res => {
          this.checkLoading = false
          this.noCheckLoading = false
          if (res.code === 201) return
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
          this.refreshTable()
          this.lookDialogVisible = false
        }).catch(err => { });
      } else if (this.title0 == '批准') {
        ratifyProcessTotaldeal({
          id: this.currentInfo.id,
          state: state
        }).then(res => {
          this.checkLoading = false
          this.noCheckLoading = false
          if (res.code === 201) return
          this.$message({
            type: 'success',
            message: '操作成功!'
          });
          this.refreshTable()
          this.lookDialogVisible = false
        }).catch(err => { });
      }
    },
    // å¯¼å‡ºè¯¦æƒ…
    handleDown0(row) {
      // åŽç«¯ä¸‹è½½
      let url = this.javaApi + '/word/' + row.url
      this.$download.saveAs(url, row.month + ' æ ·å“å¤„理申请表');
    },
    handleDelete(row) {
      this.$confirm("是否删除该条数据?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          delProcessDeal({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.refresh();
          });
        })
        .catch(() => { });
    },
  },
}
</script>
<style scoped>
.title {
  height: 60px;
  line-height: 60px;
}
.search {
  background-color: #fff;
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
}
.search_thing {
  width: 350px;
  display: flex;
  align-items: center;
}
.search_label {
  width: 110px;
  font-size: 14px;
  text-align: right;
}
.search_input {
  width: calc(100% - 110px);
}
.table {
  background-color: #fff;
  height: calc(100% - 60px - 140px);
  padding: 20px;
}
.downPdf {
  opacity: 0 !important;
}
.tables {
  table-layout: fixed;
  width: 100%;
}
.tables td {
  height: 40px;
  width: 100px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
}
.en {
  font-size: 12px;
  word-break: break-word;
  /* è‡ªåŠ¨æ–­è¡Œ */
  overflow-wrap: break-word;
  /* é˜²æ­¢æº¢å‡º */
  white-space: normal;
  /* é»˜è®¤æ¢è¡Œ */
}
.user-info {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  margin-top: 20px;
}
.user-info .el-button {
  margin: 0;
}
>>>.el-tabs__content {
  height: 100%;
}
</style>
src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue
@@ -1,31 +1,131 @@
<template>
    <el-dialog :visible.sync="dialogVisible" title="标准物质验收记录" width="70%">
       <el-steps :active="currentStep" finish-status="success">
            <el-step class="cursor-pointer" v-for="(item, index) in steps" :key="index" :title="item">
            </el-step>
        </el-steps>
        <el-form :model="model" label-width="140px" size="small">
            <Step1 :model.sync="model"></Step1>
  <el-dialog :visible.sync="dialogVisible" title="标准物质验收记录" width="72%" v-loading="loading">
    <el-form :model="acceptance" ref="acceptance" label-width="140px" size="small">
      <el-col :span="12">
        <el-form-item label="厂家代表" prop="producer">
          <el-input v-model="acceptance.producer"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="相关附件" prop="file">
          <div class="table-between">
            <el-input v-model="acceptance.file" style="width: 80%;" disabled></el-input>
            <el-upload
              ref="upload"
              style="float: right;"
              :headers="uploadHeader"
              :action="action"
              :show-file-list="false"
              :on-success="onSuccess"
            >
              <el-button type="primary">
                é™„件上传
              </el-button>
            </el-upload>
          </div>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="接收人" prop="recipient">
          <el-input v-model="acceptance.recipient"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="接受签字" prop="signature">
          <el-input v-model="acceptance.signature"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="验收情况" prop="situation">
          <el-input v-model="acceptance.situation"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="安装调试情况" prop="installation">
          <el-input v-model="acceptance.installation"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="清单" prop="substanceId"
                      :rule="[{ required: true, message: '请选择清单', trigger: 'change' }]">
          <el-select v-model="acceptance.substanceId" placeholder="请选择" style="width: 100%">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.name"
              :value="item.id">
            </el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="到货日期" prop="arriveDate">
          <el-date-picker
            v-model="acceptance.arriveDate"
            align="right"
            type="date"
            placeholder="选择日期"
            style="width: 100%"
            value-format="yyyy-MM-dd"
          >
          </el-date-picker>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="维修单位" prop="maintenanceUnit">
          <el-input v-model="acceptance.maintenanceUnit"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="备件确认">
          <el-button type="primary" style="float: right;" @click="addSpareTable">增加行</el-button>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <lims-table :tableData="list" :column="spareColumns" height="300">
          <template slot="name" slot-scope="{ row, index }">
            <el-input v-if="row.isEdit" size="small" v-model="row.name"></el-input>
            <span v-else>{{ row.name }}</span>
          </template>
          <template slot="number" slot-scope="{ row, index }">
            <el-input v-if="row.isEdit" size="small" v-model="row.number"></el-input>
            <span v-else>{{ row.number }}</span>
          </template>
          <template slot="action" slot-scope="{ row, index }">
            <div v-if="row.isEdit">
              <el-button type="text" @click="save(index)">保存</el-button>
              <el-button type="text">取消</el-button>
            </div>
            <div v-else>
              <el-button type="text" @click="edit(index)">修改</el-button>
            </div>
          </template>
        </lims-table>
      </el-col>
        </el-form>
        <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 æ¶ˆ</el-button>
            <el-button type="primary" @click="submit">保 å­˜</el-button>
      <el-button @click="closeDialog">取 æ¶ˆ</el-button>
      <el-button type="primary" :loading="submitLoading" @click="submit">保 å­˜</el-button>
        </span>
    </el-dialog>
</template>
<script>
import Step1 from './Step1.vue'
import limsTable from "@/components/Table/lims-table.vue";
import {
  addAcceptance, getAcceptanceDetails,
  getStandardSubstanceAll,
  updateAcceptance
} from "@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept";
export default {
    components: {
        Step1
    limsTable,
    },
    data() {
        return {
            dialogVisible: false,
            currentStep: 0, // æ­¥éª¤æ¡æ˜¾ç¤ºç¬¬å‡ æ­¥
            steps: ['提交', '开箱验收复核', '安装验收检查', '安装验收复核', '验收核查', '验收核查审核'],
            model: {
      loading: false,
      submitLoading: false,
                acceptance: {
                    id: undefined,
                    producer: undefined, // åŽ‚å®¶ä»£è¡¨
@@ -37,67 +137,125 @@
                    substanceId: undefined, // æ¸…单
                    arriveDate: undefined,   // åˆ°è´§æ—¥æœŸ
                    maintenanceUnit: undefined,   // ç»´ä¿®å•位
        list: [],
                },
                list: []
      list: [],
      spareColumns: [
        {
          label: "名称",
          prop: "name",
          align: "center",
          dataType: "slot",
          slot: "name",
        }, {
          label: "数量",
          prop: "number",
          align: "center",
          dataType: "slot",
          slot: "number",
        }, {
          label: "操作",
          align: "center",
          dataType: "slot",
          slot: "action",
          width: 150
            }
      ],
      options: []
        }
    },
    watch: {
        model(newVal) {
            this.model = newVal
        }
  mounted() {
    this.getStand()
    },
    methods: {
        clearForm() {
            this.model.acceptance.id = undefined
            this.model.acceptance.producer = undefined
            this.model.acceptance.file = undefined
            this.model.acceptance.recipient = undefined
            this.model.acceptance.signature = undefined
            this.model.acceptance.situation = undefined
            this.model.acceptance.installation = undefined
            this.model.acceptance.substanceId = undefined
            this.model.acceptance.arriveDate = undefined
            this.model.acceptance.maintenanceUnit = undefined
            this.model.list = []
        },
        openDialog(form) {
            console.log(form)
            if(form) {
                this.model.acceptance.id = form.acceptance.id
                this.model.acceptance.producer = form.acceptance.producer
                this.model.acceptance.file = form.acceptance.file
                this.model.acceptance.recipient = form.acceptance.recipient
                this.model.acceptance.signature = form.acceptance.signature
                this.model.acceptance.situation = form.acceptance.situation
                this.model.acceptance.installation = form.acceptance.installation
                this.model.acceptance.substanceId = form.acceptance.substanceId
                this.model.acceptance.arriveDate = form.acceptance.arriveDate
                this.model.acceptance.maintenanceUnit = form.acceptance.maintenanceUnit
                this.model.list = form.list
    openDialog(id) {
      if(id) {
        this.getDetail(id)
            } else {
                this.clearForm()
            }
            this.dialogVisible = true
        },
    getDetail(id) {
      this.loading = true
      getAcceptanceDetails({id: id}).then(res => {
        this.acceptance = res.data.acceptance
        this.list = res.data.list
        this.loading = false
      }).catch(err => {
        this.loading = false
      })
    },
    getStand() {
      getStandardSubstanceAll().then(res => {
        this.options = res.data
      })
    },
    addSpareTable() {
      this.list.push({
        acceptanceId: this.acceptance.id,
        name: '',
        number: '',
        isEdit: true
      })
    },
    onSuccess(response) {
      this.acceptance.file = response.data
    },
    save(index) {
      this.$set(this.list[index], 'isEdit', false)
    },
    edit(index) {
      this.$set(this.list[index], 'isEdit', true)
    },
    clearForm() {
      this.list = []
      this.resetForm('acceptance')
    },
        closeDialog() {
      this.clearForm()
      this.resetForm('acceptance')
            this.dialogVisible = false
        },
        submit() {
          if (!this.model.acceptance.substanceId) {
      if (!this.acceptance.substanceId) {
            this.$message.warning('请选择清单')
            return
          }
            this.$emit('submit', this.model)
      this.acceptance.list = this.HaveJson(this.list)
      this.submitLoading = true
      if(this.acceptance.id) {
        updateAcceptance({acceptance: this.acceptance, list: this.list}).then(res => {
          this.$message.success('编辑成功')
          this.submitLoading = false
            this.closeDialog()
          this.$emit('submit')
        }).catch((e) => {
          this.submitLoading = false
        })
      } else {
        addAcceptance({acceptance: this.acceptance, list: this.list}).then(res => {
          this.$message.success('新增成功')
          this.closeDialog()
          this.$emit('submit')
        }).catch((e) => {
          this.submitLoading = false
        })
        }
    },
  },
  computed: {
    action() {
      return this.javaApi + '/personBasicInfo/saveCNASFile'
    }
  },
}
</script>
<style scoped>
.cursor-pointer {
    cursor: pointer;
>>>.el-dialog__body {
  height: 580px;
  overflow-y: auto;
}
</style>
src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue
ÎļþÒÑɾ³ý
src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
@@ -19,24 +19,21 @@
    </div>
    <div class="table">
      <lims-table :tableData="tableData" :column="columns" :height="'calc(100vh - 250px)'" @pagination="pagination"
        :page="page" :tableLoading="tableLoading"></lims-table>
        :page="page" :tableLoading="tableLoading">
        <template slot="action" slot-scope="{ row }">
          <el-button type="text" @click="edit(row)">编辑</el-button>
        </template>
      </lims-table>
    </div>
    <AddRecord ref="addRecordRef" @submit="submit"></AddRecord>
    <AddRecord ref="addRecordRef" v-if="addRecordRef" @submit="submit"></AddRecord>
  </div>
</template>
<script>
// import axios from "axios";
// import { getPageAcceptance, addAcceptance, updateAcceptance, getAcceptanceDetails, exportAcceptance } from "@/assets/api/api";
// import ZTTable from '@/components/caorui/ZTTable/index.vue';
// import AddRecord from './components/AddRecord.vue';
import limsTable from '@/components/Table/lims-table.vue'
import AddRecord from './component/AddRecord.vue';
import {
  getPageAcceptance,
  updateAcceptanc,
  addAcceptance
  getPageAcceptance, getAcceptanceDetails, exportFeStandardSubstanceAcceptance, updateAcceptance, addAcceptance
} from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept'
export default {
  components: {
@@ -48,6 +45,7 @@
      form: {
        search: undefined
      },
      addRecordRef: false,
      columns: [
        {
          label: "出场编号",
@@ -114,56 +112,39 @@
    this.getTableData()
  },
  methods: {
    async getTableData() {
      const res = await getPageAcceptance(this.form);
      if (res.code === 200) {
    getTableData() {
      getPageAcceptance(this.form).then(res => {
        this.tableData = res.data.records;
        this.page.total = res.data.total;
      }
      })
    },
    openDialog() {
      this.addRecordRef = true;
      this.$nextTick(() => {
      this.$refs.addRecordRef.openDialog()
      })
    },
    async submit(form) {
      const { code } = await form.acceptance.id ? updateAcceptanc(this.form) : addAcceptance((this.form));
      if (code == 200) {
        this.$message.success(`${form.acceptance.id ? '编辑' : '添加'}成功`)
    submit() {
      this.addRecordRef = false;
        this.getTableData()
      }
    },
    async edit(row) {
      const res = await this.getDetail(row.id)
      this.$refs.addRecordRef.openDialog({
        acceptance: res.acceptance,
        list: res.list
    edit(row) {
      this.addRecordRef = true;
      this.$nextTick(() => {
        this.$refs.addRecordRef.openDialog(row.id)
      })
    },
    async getDetail(id) {
      const { code, data } = await axios({
        method: 'get',
        url: getAcceptanceDetails,
        params: { id }
      })
      if (code == 200) {
        return data;
      }
    },
    reset() {
      this.form.search = undefined
      this.getTableData()
    },
    async exportExcel() {
      const res = await axios({
        method: "get",
        url: `${exportAcceptance}`,
        responseType: "blob"
      })
      exportFeStandardSubstanceAcceptance().then(res => {
      const blob = new Blob([res], { type: 'application/octet-stream' });
      this.$download.saveAs(blob, '标准物质验收.xlsx');
        this.$message.success('导出成功')
      })
    },
    // åˆ†é¡µåˆ‡æ¢
    pagination(page) {
      this.page.size = page.limit
src/views/CNAS/systemManagement/correctiveAction/index.vue
@@ -109,8 +109,8 @@
      page: {
        size: 20,
        current: 1,
      },
      total: 0,
      },
      correctiveInfo: false,
      viewTestRecordDialog: false,
    };
@@ -131,7 +131,7 @@
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data.records
        this.total = res.data.total
        this.page.total = res.data.total
      }).catch(err => {
        console.log('err---', err);
        this.tableLoading = false
src/views/CNAS/systemManagement/documentControl/components/ControlledFileApplication.vue
@@ -470,6 +470,7 @@
      formData.append('state', this.type); // æ–‡ä»¶åå­—段
      formData.append('writer', this.currentInfo.writer); // æ–‡ä»¶åå­—段
      try {
      let res = await checkManageDocumentControlled(formData)
      this.checkLoading = false
      this.noCheckLoading = false
@@ -482,6 +483,12 @@
        this.$message({ message: '操作失败', type: 'error' });
        return false
      }
      } catch (e) {
        this.checkLoading = false
        this.noCheckLoading = false
      }
    },
    handleCheckSub(type) {
      this.type = type
src/views/CNAS/systemManagement/documentControl/components/FileList.vue
@@ -334,6 +334,7 @@
      formData.append('file', pdfBlob, fileName); // æ–‡ä»¶å­—段
      formData.append('id', this.currentInfo.id); // æ–‡ä»¶åå­—段
      try {
      let res = await uploadFileManageDocumentList(formData)
      this.addLoading = false
      if (res.code == 200) {
@@ -345,6 +346,10 @@
        this.$message({ message: '上传失败', type: 'error' });
        return false
      }
      } catch (e) {
        this.addLoading = false
      }
    },
    handleDelete(row) {
      this.$confirm("是否删除该条数据?", "提示", {
src/views/CNAS/systemManagement/measuresDealRisks/components/hazardIdentificationRiskAssessment.vue
@@ -13,7 +13,7 @@
        <el-button size="small" @click="openDownloadDia">导出</el-button>
      </div>
    </div>
    <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)">
    <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table1">
      <el-table-column type="index" label="序号" width="120">
        <template v-slot="scope">
          <span>{{ (page.current - 1) * page.size + scope.$index + 1 }}</span>
@@ -142,7 +142,7 @@
      page: {
        total: 0,
        size: 10,
        current: 0,
        current: 1,
      },
      tableData: [],
      loading: false
src/views/CNAS/systemManagement/measuresDealRisks/components/listRiskAnalysisControlPlans.vue
@@ -13,7 +13,7 @@
        <el-button size="small" @click="openDownloadDia">导出</el-button>
      </div>
    </div>
    <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)">
    <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table0">
      <el-table-column type="index" label="序号" width="120">
        <template v-slot="scope">
          <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span>
src/views/business/inspectionTask/index.vue
@@ -518,10 +518,18 @@
          prop: "insResult",
          dataType: "tag",
          formatData: (params) => {
            let obj = this.insResultList.find((m) => m.value == params)
            if (obj) {
            return this.insResultList.find((m) => m.value == params).label;
            } else {
              return ''
            }
          },
          formatType: (params) => {
            let obj = this.insResultList.find((m) => m.value == params)
            if (obj) {
            return this.insResultList.find((m) => m.value == params).type;
            }
          },
        },
        {
src/views/performance/class/index.vue
@@ -808,7 +808,7 @@
      }
    },
    getUsers() {
      selectUserCondition().then((res) => {
      selectUserCondition({ type: 1 }).then((res) => {
        if (res.code === 201) {
          return;
        }
src/views/system/menu/index.vue
@@ -223,8 +223,8 @@
                </el-tooltip>
                åªçœ‹æˆ‘按钮
              </span>
              <el-switch v-model="form.isRersonalButton" inactive-text="不显示" active-text="显示" inactive-value="0"
                active-value="1">
              <el-switch v-model="form.isRersonalButton" inactive-text="不显示" active-text="显示" :inactive-value="0"
                :active-value="1">
              </el-switch>
            </el-form-item>
          </el-col>
@@ -340,7 +340,8 @@
        isFrame: "1",
        isCache: "0",
        visible: "0",
        status: "0"
        status: "0",
        isRersonalButton: 0
      };
      this.resetForm("form");
    },
@@ -379,6 +380,7 @@
      this.getTreeselect();
      getMenu(row.menuId).then(response => {
        this.form = response.data;
        this.form.isRersonalButton = Number(this.form.isRersonalButton)
        this.open = true;
        this.title = "修改菜单";
      });
src/views/system/role/index.vue
@@ -4,48 +4,22 @@
      <div>
        <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
          <el-form-item label="角色名称" prop="roleName">
            <el-input
              v-model="queryParams.roleName"
              placeholder="请输入角色名称"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
            <el-input v-model="queryParams.roleName" placeholder="请输入角色名称" clearable style="width: 200px"
              @keyup.enter.native="handleQuery" />
          </el-form-item>
          <el-form-item label="权限字符" prop="roleKey">
            <el-input
              v-model="queryParams.roleKey"
              placeholder="请输入权限字符"
              clearable
              style="width: 200px"
              @keyup.enter.native="handleQuery"
            />
            <el-input v-model="queryParams.roleKey" placeholder="请输入权限字符" clearable style="width: 200px"
              @keyup.enter.native="handleQuery" />
          </el-form-item>
          <el-form-item label="状态" prop="status">
            <el-select
              v-model="queryParams.status"
              placeholder="角色状态"
              clearable
              style="width: 200px"
            >
              <el-option
                v-for="dict in dict.type.sys_normal_disable"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            <el-select v-model="queryParams.status" placeholder="角色状态" clearable style="width: 200px">
              <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.label"
                :value="dict.value" />
            </el-select>
          </el-form-item>
          <el-form-item label="创建时间">
            <el-date-picker
              v-model="dateRange"
              style="width: 200px"
              value-format="yyyy-MM-dd"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            ></el-date-picker>
            <el-date-picker v-model="dateRange" style="width: 200px" value-format="yyyy-MM-dd" type="daterange"
              range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查 è¯¢</el-button>
@@ -54,7 +28,8 @@
        </el-form>
      </div>
      <div class="addButton mb8">
        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:role:add']">新增</el-button>
        <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd"
          v-hasPermi="['system:role:add']">新增</el-button>
      </div>
    </div>
@@ -66,12 +41,8 @@
      <el-table-column label="显示顺序" prop="roleSort" width="100" />
      <el-table-column label="状态" align="center" width="100">
        <template slot-scope="scope">
          <el-switch
            v-model="scope.row.status"
            active-value="0"
            inactive-value="1"
            @change="handleStatusChange(scope.row)"
          ></el-switch>
          <el-switch v-model="scope.row.status" active-value="0" inactive-value="1"
            @change="handleStatusChange(scope.row)"></el-switch>
        </template>
      </el-table-column>
      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
@@ -81,26 +52,11 @@
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope" v-if="scope.row.roleId !== 1">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['system:role:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['system:role:remove']"
          >删除</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-view"
            @click="handleView(scope.row)"
          >详细</el-button>
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
            v-hasPermi="['system:role:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
            v-hasPermi="['system:role:remove']">删除</el-button>
          <el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)">详细</el-button>
<!--          <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
<!--            <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
<!--            <el-dropdown-menu slot="dropdown">-->
@@ -114,13 +70,8 @@
      </el-table-column>
    </el-table>
    <pagination
      v-show="total>0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
    <!-- æ·»åŠ æˆ–ä¿®æ”¹è§’è‰²é…ç½®å¯¹è¯æ¡† -->
    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@@ -142,28 +93,28 @@
        </el-form-item>
        <el-form-item label="状态">
          <el-radio-group v-model="form.status" :disabled="title === '查看角色'">
            <el-radio
              v-for="dict in dict.type.sys_normal_disable"
              :key="dict.value"
              :label="dict.value"
            >{{dict.label}}</el-radio>
            <el-radio v-for="dict in dict.type.sys_normal_disable" :key="dict.value" :label="dict.value">{{ dict.label
              }}</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-form-item label="菜单权限">
          <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')" v-if="title !== '查看角色'">展开/折叠</el-checkbox>
          <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')" v-if="title !== '查看角色'">全选/全不选</el-checkbox>
          <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')" v-if="title !== '查看角色'">父子联动</el-checkbox>
          <el-tree
            :disabled="title === '查看角色'"
            class="tree-border"
            :data="menuOptions"
            show-checkbox
            ref="menu"
            node-key="id"
            :check-strictly="!form.menuCheckStrictly"
            empty-text="加载中,请稍候"
            :props="defaultProps"
          ></el-tree>
          <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')"
            v-if="title !== '查看角色'">展开/折叠</el-checkbox>
          <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')"
            v-if="title !== '查看角色'">全选/全不选</el-checkbox>
          <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')"
            v-if="title !== '查看角色'">父子联动</el-checkbox>
          <el-tree :disabled="title === '查看角色'" class="tree-border" :data="menuOptions" show-checkbox ref="menu"
            node-key="id" :check-strictly="!form.menuCheckStrictly" empty-text="加载中,请稍候" :props="defaultProps">
            <span class="custom-tree-node" slot-scope="{ node, data }">
              <span>{{ node.label }}</span>
              <span>
                <el-checkbox v-model="data.isRersonal" :true-label="1" :false-label="0"
                  v-if="data.isRersonalButton == 1" @change="m => chooseMe(m, data)"
                  :disabled="title === '查看角色'">只看我</el-checkbox>
              </span>
            </span>
          </el-tree>
        </el-form-item>
        <el-form-item label="备注">
          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :disabled="title === '查看角色'"></el-input>
@@ -186,29 +137,17 @@
        </el-form-item>
        <el-form-item label="权限范围">
          <el-select v-model="form.dataScope" @change="dataScopeSelectChange">
            <el-option
              v-for="item in dataScopeOptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
            <el-option v-for="item in dataScopeOptions" :key="item.value" :label="item.label"
              :value="item.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="数据权限" v-show="form.dataScope == 2">
          <el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox>
          <el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox>
          <el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">父子联动</el-checkbox>
          <el-tree
            class="tree-border"
            :data="deptOptions"
            show-checkbox
            default-expand-all
            ref="dept"
            node-key="id"
            :check-strictly="!form.deptCheckStrictly"
            empty-text="加载中,请稍候"
            :props="defaultProps"
          ></el-tree>
          <el-checkbox v-model="form.deptCheckStrictly"
            @change="handleCheckedTreeConnect($event, 'dept')">父子联动</el-checkbox>
          <el-tree class="tree-border" :data="deptOptions" show-checkbox default-expand-all ref="dept" node-key="id"
            :check-strictly="!form.deptCheckStrictly" empty-text="加载中,请稍候" :props="defaultProps"></el-tree>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
@@ -232,6 +171,8 @@
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // åªçœ‹æˆ‘数组
      isRersonalMenuIds: [],
      // éžå•个禁用
      single: true,
      // éžå¤šä¸ªç¦ç”¨
@@ -399,6 +340,7 @@
        status: "0",
        menuIds: [],
        deptIds: [],
          isRersonalMenuIds: [],
        menuCheckStrictly: true,
        deptCheckStrictly: true,
        remark: undefined
@@ -546,6 +488,7 @@
        if (valid) {
          if (this.form.roleId != undefined) {
            this.form.menuIds = this.getMenuAllCheckedKeys();
            this.form.isRersonalMenuIds = this.isRersonalMenuIds;
            updateRole(this.form).then(response => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
@@ -553,6 +496,7 @@
            });
          } else {
            this.form.menuIds = this.getMenuAllCheckedKeys();
            this.form.isRersonalMenuIds = this.isRersonalMenuIds;
            addRole(this.form).then(response => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
@@ -588,6 +532,15 @@
      this.download('system/role/export', {
        ...this.queryParams
      }, `role_${new Date().getTime()}.xlsx`)
    },
    // åªçœ‹æˆ‘
    chooseMe(val, data) {
      let index = this.isRersonalMenuIds.findIndex(m => m == data.id)
      if (index < 0 && val == 1) {
        this.isRersonalMenuIds.push(data.id)
      } else if (val == 0 && index > -1) {
        this.isRersonalMenuIds.splice(index, 1)
      }
    }
  }
};
@@ -598,7 +551,17 @@
  display: flex;
  justify-content: space-between;
}
.addButton {
  margin-top: 3px;
}
.custom-tree-node {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  padding-right: 8px;
}
</style>