gaoluyang
2025-02-26 6db887e5daf29fa4cc5357ee6864811520720cb5
Merge remote-tracking branch 'origin/dev' into dev
已修改10个文件
已添加5个文件
13075 ■■■■■ 文件已修改
public/index.html 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/luckysheet/css/luckysheet.css 7144 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/luckysheet/plugins/plugins.css 4344 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/process/nonconformingWork.js 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment.js 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/Excel/luckysheet.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/nonconformingWork/nonconformingDistribution/components/formDia.vue 232 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/nonconformingWork/nonconformingItem/components/qualityInfo.vue 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue 197 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/lightning-protection-detection.vue 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue 43 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue 100 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/standard/model/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
public/index.html
@@ -213,6 +213,12 @@
        color: #fff;
        opacity: 0.5;
      }
      /* .v-modal {
        z-index: 1 !important;
      } */
      .luckysheet-cols-menu {
        z-index: 9999 !important;
      }
    </style>
  </head>
  <body>
@@ -225,7 +231,10 @@
      </div>
    </div>
  </body>
  <script type='text/javascript' src='http://192.168.21.53:9001/web-apps/apps/api/documents/api.js'></script>
  <script
    type="text/javascript"
    src="http://192.168.21.53:9001/web-apps/apps/api/documents/api.js"
  ></script>
  <script src="<%= BASE_URL %>luckysheet/plugins/js/plugin.js"></script>
  <script src="<%= BASE_URL %>luckysheet/luckysheet.umd.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.min.js"></script>
public/luckysheet/css/luckysheet.css
ÎļþÌ«´ó
public/luckysheet/plugins/plugins.css
ÎļþÌ«´ó
src/api/cnas/process/nonconformingWork.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,85 @@
// ä¸ç¬¦åˆå·¥ä½œç›¸å…³æŽ¥å£
import request from "@/utils/request";
//查询监督记录不符合控制信息列表
export function pageSuperviseDetailAccording(query) {
  return request({
    url: "/qualitySupervise/pageSuperviseDetailAccording",
    method: "get",
    params: query,
  });
}
//导出不符合项
export function superviseDetailAccordingExport(query) {
  return request({
    url: "/qualitySupervise/superviseDetailAccordingExport",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
//查询监督记录不符合控制信息
export function getSuperviseDetailAccording(query) {
  return request({
    url: "/qualitySupervise/getSuperviseDetailAccording",
    method: "get",
    params: query,
  });
}
//不符合项的分布分页查询
export function pageInconsistentDistribution(query) {
  return request({
    url: "/inconsistentDistribution/pageInconsistentDistribution",
    method: "get",
    params: query,
  });
}
//不符合项的分布删除
export function delInconsistentDistribution(query) {
  return request({
    url: "/inconsistentDistribution/delInconsistentDistribution",
    method: "delete",
    params: query,
  });
}
//导出不符合项的分布
export function exportInconsistentDistribution(query) {
  return request({
    url: "/inconsistentDistribution/exportInconsistentDistribution",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
//不符合项的分布详情
export function getInconsistentDistributionOne(query) {
  return request({
    url: "/inconsistentDistribution/getInconsistentDistributionOne",
    method: "get",
    params: query,
  });
}
// ä¸ç¬¦åˆé¡¹çš„分布新增
export function addInconsistentDistribution(data) {
  return request({
    url: "/inconsistentDistribution/addInconsistentDistribution",
    method: "post",
    data: data,
  });
}
// ä¸ç¬¦åˆé¡¹çš„分布修改
export function updateInconsistentDistribution(data) {
  return request({
    url: "/inconsistentDistribution/updateInconsistentDistribution",
    method: "post",
    data: data,
  });
}
src/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment.js
@@ -54,4 +54,201 @@
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-电源稳定性删除
export function deleteLaboratoryFacilityPowerStable(query) {
  return request({
    url: '/fePowerStable/deleteLaboratoryFacilityPowerStable',
    method: 'delete',
    params: query
  })
}
// ç”µæºç¨³å®šæ€§-测定量 æ ¹æ®ç”µæºç¨³å®šæ€§æŸ¥è¯¢
export function getFeMeasuredQuantityService(query) {
  return request({
    url: "/fePowerStable/getFeMeasuredQuantityService",
    method: "get",
    params: query,
  });
}
// ç”µæºç¨³å®šæ€§-测定量 å¯¼å‡º
export function exportFePowerStable(query) {
  return request({
    url: "/fePowerStable/exportFePowerStable",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-防雷检测查询
export function getLightningProtectionDetection(query) {
  return request({
    url: '/feLightningProtection/getLightningProtectionDetection',
    method: 'get',
    params: query
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-防雷检测新增/修改
export function addLightningProtectionDetection(query) {
  return request({
    url: '/feLightningProtection/addLightningProtectionDetection',
    method: 'post',
    data: query,
    headers: {
      'Content-Type': 'multipart/form-data' // å¿…须设置为 multipart
    }
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-防雷检测删除
export function deleteLightningProtectionDetection(query) {
  return request({
    url: '/feLightningProtection/deleteLightningProtectionDetection',
    method: 'delete',
    params: query
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-防雷检测导出
export function exportOfLightningProtectionDetection(query) {
  return request({
    url: "/feLightningProtection/exportOfLightningProtectionDetection",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-照度记录表-检测区域 æŸ¥è¯¢
export function getFeLightningProtection(query) {
  return request({
    url: '/feIllumination/getFeLightningProtection',
    method: 'get',
    params: query
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-照度记录表-检测区域 æ–°å¢ž/修改
export function addFeLightningProtection(query) {
  return request({
    url: '/feIllumination/addFeLightningProtection',
    method: 'post',
    data: query,
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-照度记录表-检测区域 åˆ é™¤
export function deleteFeLightningProtection(query) {
  return request({
    url: '/feIllumination/deleteFeLightningProtection',
    method: 'delete',
    params: query
  })
}
// ç…§åº¦è®°å½•表-检测区域 æ ¹æ®ç…§åº¦è®°å½•查询
export function getFeIlluminationDetectionArea(query) {
  return request({
    url: '/feIllumination/getFeIlluminationDetectionArea',
    method: 'get',
    params: query
  })
}
// ç…§åº¦è®°å½•表-检测区域 åˆ é™¤
export function deleteFeIlluminationDetectionArea(query) {
  return request({
    url: '/feIllumination/deleteFeIlluminationDetectionArea',
    method: 'delete',
    params: query
  })
}
// ç…§åº¦è®°å½•表-检测区域 å¯¼å‡º
export function exportFeIllumination(query) {
  return request({
    url: "/feIllumination/exportFeIllumination",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
// è¯•验区域-查询"
export function getFeTempHumDate(query) {
  return request({
    url: '/feTempHumDate/getFeTempHumDate',
    method: 'get',
    params: query
  })
}
// è¯•验区域-新增/修改
export function addFeTempHumDate(query) {
  return request({
    url: '/feTempHumDate/addFeTempHumDate',
    method: 'post',
    data: query,
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-温湿度记录查询
export function getFeTempHumRecordPage(query) {
  return request({
    url: '/feTempHumDate/getFeTempHumRecordPage',
    method: 'get',
    params: query
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-温湿度记录新增/修改
export function addFeTempHumRecord(query) {
  return request({
    url: '/feTempHumDate/addFeTempHumRecord',
    method: 'post',
    data: query,
  })
}
// è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-温湿度记录删除
export function deleteFeTempHumRecord(query) {
  return request({
    url: '/feTempHumDate/deleteFeTempHumRecord',
    method: 'delete',
    params: query
  })
}
// è¯•验区域-删除
export function deleteFeTempHumDate(query) {
  return request({
    url: '/feTempHumDate/deleteFeTempHumDate',
    method: 'delete',
    params: query
  })
}
// // è®¾æ–½å’ŒçŽ¯å¢ƒæ¡ä»¶è¦æ±‚-温湿度记录 å¯¼å‡º
export function exportTemperatureAndHumidityRecords(query) {
  return request({
    url: "/feTempHumDate/exportTemperatureAndHumidityRecords",
    method: "get",
    responseType: "blob",
    params: query,
  });
}
// æ¸©æ¹¿åº¦ç¡®è®¤
export function affirmFeTempHumDate(query) {
  return request({
    url: '/feTempHumDate/affirmFeTempHumDate',
    method: 'post',
    data: query,
  })
}
src/components/Excel/luckysheet.vue
@@ -7,6 +7,7 @@
  height: 100%;
  left: 0px;
  top: 0px;
  z-index: 99999 !important;
}
</style>
<style>
@@ -19,6 +20,7 @@
  border-color: transparent;
  cursor: pointer;
}
#luckysheet .returnView {
  width: 50px;
  height: 26px;
@@ -43,6 +45,10 @@
#luckysheet .save:active {
  opacity: 0.7;
}
/* #luckysheet-postil-overshow {
  z-index: 9999 !important;
} */
</style>
<template>
  <div id="luckysheet"></div>
src/views/CNAS/process/nonconformingWork/nonconformingDistribution/components/formDia.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,232 @@
<template>
  <div>
    <el-dialog v-loading="diaLoading" :close-on-click-modal="false" :close-on-press-escape="false"
      :visible.sync="formDia" title="不符合项的分布" width="90%" @close="closeDia">
      <table border="1" cellspacing="10" class="table">
        <tr>
          <td>章节号</td>
          <th class="div-with-line">
            <span style="float: left;">要素</span>
            <span style="float: right;">部门</span>
          </th>
          <th>主任</th>
          <th>技术负责人</th>
          <th>质量负责人</th>
          <th>综合室</th>
          <th>试验室</th>
          <th>合计</th>
          <th>占%</th>
        </tr>
        <tr v-for="(item, index) in distributionDetailList" :key="item.value">
          <td>{{ item.chapterNumber }}</td>
          <th>{{ item.essentials }}</th>
          <th>
            <el-input-number v-model="item.director" :precision="0" clearable size="small"></el-input-number>
          </th>
          <th>
            <el-input-number v-model="item.technology" :precision="0" clearable size="small"></el-input-number>
          </th>
          <th>
            <el-input-number v-model="item.quality" :precision="0" clearable size="small"></el-input-number>
          </th>
          <th>
            <el-input-number v-model="item.comprehensive" :precision="0" clearable size="small"></el-input-number>
          </th>
          <th>
            <el-input-number v-model="item.testing" :precision="0" clearable size="small"></el-input-number>
          </th>
          <th>
            {{ item.total }}
          </th>
          <th>
            {{ (item.proportion ? item.proportion : 0) + '%' }}
          </th>
        </tr>
        <tr>
          <td> </td>
          <th>
            å æ¯”
          </th>
          <th>
            {{ (distributionProportion.director ? distributionProportion.director : 0) + '%' }}
          </th>
          <th>
            {{ (distributionProportion.technology ? distributionProportion.technology : 0) + '%' }}
          </th>
          <th>
            {{ (distributionProportion.quality ? distributionProportion.quality : 0) + '%' }}
          </th>
          <th>
            {{ (distributionProportion.comprehensive ? distributionProportion.comprehensive : 0) + '%' }}
          </th>
          <th>
            {{ (distributionProportion.testing ? distributionProportion.testing : 0) + '%' }}
          </th>
          <th>
            {{ distributionProportion.total ? distributionProportion.total : 0 }}
          </th>
          <th> </th>
        </tr>
      </table>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeDia">取 æ¶ˆ</el-button>
        <el-button :loading="loading" type="primary" @click="handleEdit">提 äº¤</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import {
  getInconsistentDistributionOne,
  addInconsistentDistribution,
  updateInconsistentDistribution
} from '@/api/cnas/process/nonconformingWork.js'
export default {
  name: 'formDia',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      diaLoading: false,
      loading: false,
      distributionDetailList: [],
      form: {
      },
      distributionProportion: {}
    };
  },
  mounted() {
  },
  // æ–¹æ³•集合
  methods: {
    // æ‰“开弹框
    openDia(type, row) {
      this.formDia = true
      this.operationType = type
      if (type !== 'add') {
        this.searchInfo(row)
      } else {
        this.selectEnumByCategory()
      }
    },
    // æŸ¥è¯¢è¯¦æƒ…
    searchInfo(row) {
      this.diaLoading = true
      getInconsistentDistributionOne({ distributionId: row.distributionId }).then(res => {
        this.diaLoading = false
        if (res.code === 201) return
        this.form = res.data
        this.distributionDetailList = this.form.distributionDetailList
        this.distributionProportion = this.form.distributionProportion
      }).catch(err => {
        console.log(err)
        this.diaLoading = false
      })
    },
    // æäº¤å¼¹æ¡†æ•°æ®
    handleEdit() {
      const date = new Date();
      const year = date.getFullYear();
      this.loading = true
      const internalPlan = this.HaveJson(this.form)
      internalPlan.distributionYear = year
      internalPlan.distributionDetailList = this.HaveJson(this.distributionDetailList)
      if (this.operationType === 'add') {
        addInconsistentDistribution(internalPlan).then(res => {
          this.loading = false
          if (res.code === 201) return
          this.$message.success('操作成功')
          this.closeDia()
        }).catch(err => {
          console.log('err---', err);
          this.loading = false
        })
      } else if (this.operationType === 'edit') {
        updateInconsistentDistribution(internalPlan).then(res => {
          this.loading = false
          if (res.code === 201) return
          this.$message.success('操作成功')
          this.closeDia()
        }).catch(err => {
          console.log('err---', err);
          this.loading = false
        })
      }
    },
    closeDia() {
      this.formDia = false
      this.$emit('closeDia')
    },
    selectEnumByCategory() {
      this.distributionDetailList = []
      // è¦ç´ 
      this.getDicts("essential").then((response) => {
        let arr = this.dictToValue(response.data)
        arr.map((item) => {
          const obj = Object.assign({
            essentials: item.label,
            chapterNumber: item.value,
          })
          this.distributionDetailList.push(obj)
        })
      });
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 6vh auto 50px !important;
}
>>>.el-dialog__body {
  max-height: 68vh;
  overflow-y: auto;
}
>>>.is-required {
  margin-bottom: 6px;
}
.table {
  width: 100%;
  margin-top: 20px;
}
.table td {
  width: 30px;
  text-align: center;
}
.table th {
  width: 70px;
  height: 70px;
  text-align: center;
}
.div-with-line {
  width: 70px;
  height: 70px;
  position: relative;
  /*overflow: hidden; /* éšè—æº¢å‡ºå†…容 */
}
.div-with-line::after {
  content: '';
  position: absolute;
  bottom: 0;
  height: 1px;
  background-color: #000000;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  transform-origin: center 50%;
  top: 50%;
  width: 100px;
}
</style>
src/views/CNAS/process/nonconformingWork/nonconformingDistribution/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,238 @@
<template>
  <div>
    <div>
      <!-- <div class="view-title">
        <span>不符合项的分布</span>
        <span>
          <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
        </span>
      </div> -->
      <div class="search-background">
        <span class="search-group">
          <span style="width: 120px">年份:</span>
          <el-input v-model="searchForm.distributionYear" clearable size="small"></el-input>
        </span>
        <span class="search-group">
          <el-button size="medium" @click="resetSearchForm">重 ç½®</el-button>
          <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
        </span>
        <div class="btn">
          <el-button size="medium" type="primary" @click="openFormDia('add')">新 å¢ž</el-button>
        </div>
      </div>
      <div class="table">
        <div>
          <TableCard :showForm="false" :showTitle="false">
            <template v-slot:table>
              <limsTable :column="tableColumn" :height="'calc(100vh - 19em)'" :table-data="tableData"
                :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" :page="page"
                @pagination="pagination">
              </limsTable>
            </template>
          </TableCard>
        </div>
      </div>
    </div>
    <form-dia v-if="formDia" ref="formDia" @closeDia="closeDia"></form-dia>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import TableCard from '@/components/TableCard/index.vue';
import FormDia from './components/formDia.vue';
import {
  pageInconsistentDistribution,
  delInconsistentDistribution,
  exportInconsistentDistribution,
} from '@/api/cnas/process/nonconformingWork.js'
export default {
  name: 'a7-distribution-of-nonconforming',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { FormDia, TableCard, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        distributionYear: '',
      },
      tableColumn: [
        {
          label: '年份',
          prop: 'distributionYear',
          minWidth: '100'
        },
        {
          label: '创建人',
          prop: 'createUserName',
          minWidth: '100'
        },
        {
          label: '创建时间',
          prop: 'createTime',
          minWidth: '100'
        },
        {
          label: '修改人',
          prop: 'updateUserName',
          minWidth: '100'
        },
        {
          label: '修改时间',
          prop: 'updateTime',
          minWidth: '100'
        },
        {
          dataType: 'action',
          minWidth: '220',
          label: '操作',
          operation: [
            {
              name: '编辑',
              type: 'text',
              clickFun: (row) => {
                this.openFormDia('edit', row);
              },
            },
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.handleDown(row)
              }
            },
            {
              name: '删除',
              type: 'text',
              color: '#f56c6c',
              clickFun: (row) => {
                this.delPlan(row)
              },
            }
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        size: 20,
        current: 1,
        total: 0,
      },
      formDia: false,
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = this.searchForm
      const page = this.page
      this.tableLoading = true
      pageInconsistentDistribution({ ...entity, ...page }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data.records
        this.page.total = res.data.total
      }).catch(err => {
        console.log('err---', err);
        this.tableLoading = false
      })
    },
    // åˆ é™¤
    delPlan(row) {
      this.$confirm('此操作将永久删除该数据, æ˜¯å¦ç»§ç»­?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.tableLoading = true
        delInconsistentDistribution({ distributionId: row.distributionId }).then(res => {
          this.tableLoading = false
          if (res.code === 201) return
          this.$message.success('删除成功')
          this.searchList()
        }).catch(err => {
          this.tableLoading = false
          console.log('err---', err);
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // æ–°å¢žï¼Œç¼–辑,批准弹框
    openFormDia(type, row) {
      this.formDia = true
      this.$nextTick(() => {
        this.$refs.formDia.openDia(type, row)
      })
    },
    // å¯¼å‡º
    handleDown(row) {
      exportInconsistentDistribution({ distributionId: row.distributionId }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '不符合项的分布' + '.docx');
      })
    },
    closeDia() {
      this.formDia = false
      this.searchList()
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.distributionYear = '';
      this.searchList()
    },
    // åˆ†é¡µ
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.view-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding-left: 20px;
}
.search-background {
  width: 100%;
  height: 80px;
  line-height: 80px;
  background-color: #ffffff;
  display: flex;
  position: relative;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
.table {
  background-color: #ffffff;
}
.btn {
  position: absolute;
  right: 20px;
  top: 16px;
}
</style>
src/views/CNAS/process/nonconformingWork/nonconformingItem/components/qualityInfo.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,322 @@
<template>
  <div>
    <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="formDia" title="不符合工作控制单"
      width="80%" @close="closeProcessingDia">
      <div style="height: 660px; overflow-y: auto">
        <table border="1" cellspacing="10" class="tables">
          <tr>
            <td class="first-title" rowspan="8">
              <p>不符合工作情况记录</p>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>发生部门:</p>
            </td>
            <td class="td-info">
              <span class="td-info1"> {{ form.occurrenceDepartment }}</span>
            </td>
            <td class="td-title">
              <p>部门负责人:</p>
            </td>
            <td class="td-info">
              <span class="td-info1"> {{ form.headDepartment }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>不符合工作发现途径:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-radio-group v-model="form.findWay" v-removeAriaHidden disabled>
                <el-radio :label="0">管理评审</el-radio>
                <el-radio :label="1">内部审核</el-radio>
                <el-radio :label="2">检测过程控制</el-radio>
                <el-radio :label="3">内部质量控制</el-radio>
                <el-radio :label="4">内部监督</el-radio>
                <el-radio :label="5">外部评审</el-radio>
                <el-radio :label="6">外部投诉</el-radio>
                <el-radio :label="7">其他</el-radio>
              </el-radio-group>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>不符合工作的详细记录:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.recordDetail }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>不符合工作的以及及条款号:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.recordAccording }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>被监督人:</p>
            </td>
            <td class="td-info">
              <span class="td-info1"> {{ form.supervisedUserName }}</span>
            </td>
            <td class="td-title">
              <p>被监督日期:</p>
            </td>
            <td class="td-info">
              <span class="td-info1"> {{ form.supervisedTime }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>发现部门:</p>
            </td>
            <td class="td-info">
              {{ form.foundDepartment }}
            </td>
            <td class="td-title">
              <p>时间:</p>
            </td>
            <td class="td-info">
              {{ form.recordTime }}
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>记录人:</p>
            </td>
            <td class="td-info">
              {{ form.recordUserName }}
            </td>
            <td class="td-title">
              <p>记录时间:</p>
            </td>
            <td class="td-info">
              {{ form.recordTime }}
            </td>
          </tr>
          <tr>
            <td class="first-title" rowspan="3">
              <p>处理措施</p>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>消除不符合工作所采取的措施:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.eliminateMeasure }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>负责人:</p>
            </td>
            <td class="td-info">
              {{ form.actionsUserName }}
            </td>
            <td class="td-title">
              <p>处理时间:</p>
            </td>
            <td class="td-info">
              {{ form.actionsTime }}
            </td>
          </tr>
          <tr>
            <td class="first-title" rowspan="4">
              <p>纠正措施</p>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>是否需要采取纠正措施:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-radio-group v-model="form.isCorrect" v-removeAriaHidden disabled>
                <el-radio :label="0">否</el-radio>
                <el-radio :label="1">是</el-radio>
              </el-radio-group>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>纠正措施处理单跟踪:</p>
            </td>
            <td class="td-info" colspan="3">
              <span class="td-info1"> {{ form.correctContent }}</span>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>负责人:</p>
            </td>
            <td class="td-info">
              {{ form.correctUserName }}
            </td>
            <td class="td-title">
              <p>处理时间:</p>
            </td>
            <td class="td-info">
              {{ form.correctTime }}
            </td>
          </tr>
          <tr>
            <td class="first-title" rowspan="4">
              <p>是否通知客户及可恢复工作</p>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>通知客户:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-radio-group v-model="form.notifyCustomer" v-removeAriaHidden disabled>
                <el-radio :label="0">否</el-radio>
                <el-radio :label="1">是</el-radio>
              </el-radio-group>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>恢复工作:</p>
            </td>
            <td class="td-info" colspan="3">
              <el-radio-group v-model="form.backToWork" v-removeAriaHidden disabled>
                <el-radio :label="0">否</el-radio>
                <el-radio :label="1">是</el-radio>
              </el-radio-group>
            </td>
          </tr>
          <tr>
            <td class="td-title">
              <p>负责人:</p>
            </td>
            <td class="td-info">
              {{ form.qualityManagerUserName }}
            </td>
            <td class="td-title">
              <p>处理时间:</p>
            </td>
            <td class="td-info">
              {{ form.qualityManagerTime }}
            </td>
          </tr>
        </table>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  getSuperviseDetailAccording
} from '@/api/cnas/process/nonconformingWork.js'
export default {
  name: 'qualityInfo',
  // import å¼•入的组件需要注入到对象中才能使用
  components: {},
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      formDia: false,
      form: {
        occurrenceDepartment: '',
        headDepartment: '',
        findWay: '',
        recordDetail: '',
        recordAccording: '',
        supervisedUserName: '',
        supervisedTime: '',
        actionsUserName: '',
        eliminateMeasure: '',
        correctUserName: '',
        isCorrect: '',
        correctContent: '',
        recordUserName: '',
        recordTime: '',
        foundDepartment: '',
        actionsTime: '',
        correctTime: '',
        notifyCustomer: '',
        backToWork: '',
        qualityManagerUserName: '',
        qualityManagerTime: '',
      },
    };
  },
  // æ–¹æ³•集合
  methods: {
    openDia(row) {
      this.formDia = true
      this.searchInfo(row)
    },
    // æŸ¥è¯¢ç›‘控计划详情实施信息
    searchInfo(row) {
      this.form.qualityMonitorDetailsId = row.qualityMonitorDetailsId
      getSuperviseDetailAccording({ superviseDetailsId: row.superviseDetailsId }).then(res => {
        if (res.code === 201) return
        this.form = res.data
      }).catch(err => {
        console.log('err---', err);
      })
    },
    // å…³é—­å¼¹æ¡†
    closeProcessingDia() {
      this.formDia = false
    },
  }
};
</script>
<style scoped>
>>>.el-dialog {
  margin: 5vh auto 50px !important;
}
.tables {
  table-layout: fixed;
  width: 100%;
  margin-top: 10px;
}
.first-title {
  display: table-cell;
  width: 100px;
  /* è®¾ç½®ä¸€ä¸ªå›ºå®šå®½åº¦ */
  height: 200px;
  /* è®¾ç½®ä¸€ä¸ªå›ºå®šé«˜åº¦ */
  text-align: center;
  /* æ°´å¹³å±…中 */
  vertical-align: middle;
  /* åž‚直居中 */
  writing-mode: vertical-rl;
  /* æ–‡å­—竖直排列 */
  padding: 10px 0;
}
.td-title {
  height: 40px;
  width: 170px;
  text-align: center;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
  padding: 6px;
}
.td-info {
  padding: 10px;
}
.td-info1 {
  display: inline-block;
  width: 100%;
  text-align: left;
  font-size: 14px;
  word-wrap: break-word;
  white-space: normal;
}
</style>
src/views/CNAS/process/nonconformingWork/nonconformingItem/index.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,197 @@
<template>
  <div>
    <div>
      <div class="search-background">
        <span class="search-group">
          <span style="width: 120px">发生部门:</span>
          <el-input v-model="searchForm.occurrenceDepartment" clearable size="small"></el-input>
        </span>
        <span class="search-group">
          <el-button size="medium" @click="resetSearchForm">重 ç½®</el-button>
          <el-button size="medium" type="primary" @click="searchList">查 è¯¢</el-button>
        </span>
      </div>
      <div class="table">
        <div>
          <TableCard :showForm="false" :showTitle="false">
            <template v-slot:table>
              <limsTable :column="tableColumn" :height="'calc(100vh - 19em)'" :table-data="tableData"
                :table-loading="tableLoading" style="padding: 0 15px;margin-bottom: 16px" :page="page"
                @pagination="pagination">
              </limsTable>
            </template>
          </TableCard>
        </div>
      </div>
    </div>
    <quality-info v-if="qualityInfo" ref="qualityInfo"></quality-info>
  </div>
</template>
<script>
import limsTable from "@/components/Table/lims-table.vue";
import TableCard from '@/components/TableCard/index.vue';
import QualityInfo from './components/qualityInfo.vue';
import {
  pageSuperviseDetailAccording,
  superviseDetailAccordingExport
} from '@/api/cnas/process/nonconformingWork.js'
export default {
  name: 'a7-nonconforming-item',
  // import å¼•入的组件需要注入到对象中才能使用
  components: { QualityInfo, TableCard, limsTable },
  data() {
    // è¿™é‡Œå­˜æ”¾æ•°æ®
    return {
      searchForm: {
        occurrenceDepartment: '',
      },
      tableColumn: [
        {
          label: '发生部门',
          prop: 'occurrenceDepartment',
          minWidth: '100'
        },
        {
          label: '部门负责人',
          prop: 'headDepartment',
          minWidth: '100'
        },
        {
          label: '发现途径',
          prop: 'findWay',
          minWidth: '100'
        },
        {
          label: '详细记录',
          prop: 'recordDetail',
          minWidth: '100'
        },
        {
          label: '依据和条款号',
          prop: 'recordAccording',
          minWidth: '100'
        },
        {
          label: '发现部门',
          prop: 'foundDepartment',
          minWidth: '100'
        },
        {
          label: '被监督人',
          prop: 'supervisedUserName',
          minWidth: '100'
        },
        {
          dataType: 'action',
          minWidth: '60',
          label: '操作',
          operation: [
            {
              name: '查看',
              type: 'text',
              clickFun: (row) => {
                this.viewInfo(row);
              },
            },
            {
              name: '导出',
              type: 'text',
              clickFun: (row) => {
                this.openDownloadDia(row);
              },
            },
          ]
        }
      ],
      tableData: [],
      tableLoading: false,
      page: {
        size: 20,
        current: 1,
        total: 0,
      },
      qualityInfo: false,
    };
  },
  mounted() {
    this.searchList()
  },
  // æ–¹æ³•集合
  methods: {
    // æŸ¥è¯¢åˆ—表
    searchList() {
      const entity = {
        occurrenceDepartment: this.searchForm.occurrenceDepartment,
      }
      const page = this.page
      this.tableLoading = true
      pageSuperviseDetailAccording({ ...entity, ...page }).then(res => {
        this.tableLoading = false
        if (res.code === 201) return
        this.tableData = res.data.records
        this.page.total = res.data.total
      }).catch(err => {
        console.log('err---', err);
        this.tableLoading = false
      })
    },
    // é‡ç½®æŸ¥è¯¢æ¡ä»¶
    resetSearchForm() {
      this.searchForm.occurrenceDepartment = '';
      this.searchList()
    },
    viewInfo(row) {
      this.qualityInfo = true
      this.$nextTick(() => {
        this.$refs.qualityInfo.openDia(row)
      })
    },
    // å¯¼å‡º
    openDownloadDia(row) {
      superviseDetailAccordingExport({ superviseDetailsId: row.superviseDetailsId }).then(res => {
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/msword' });
        this.$download.saveAs(blob, '不符合项导出' + '.docx');
      }).catch(err => {
        console.log('err---', err);
      })
    },
    // åˆ†é¡µ
    pagination({ page, limit }) {
      this.page.current = page;
      this.page.size = limit;
      this.searchList();
    },
  }
};
</script>
<style scoped>
.view-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  padding-left: 20px;
}
.search-background {
  width: 100%;
  height: 80px;
  line-height: 80px;
  background-color: #ffffff;
  display: flex;
}
.search-group {
  display: flex;
  align-items: center;
  margin: 0 20px;
}
.table {
  background-color: #ffffff;
}
</style>
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/illuminance-recording.vue
@@ -198,11 +198,23 @@
</template>
<script>
import {
  getFeLightningProtection,
  deviceScopeSearch,
  selectUserCondition,
  treeDevice,
  addFeLightningProtection,
  deleteFeLightningProtection,
  getFeIlluminationDetectionArea,
  deleteFeIlluminationDetectionArea,
  exportFeIllumination
} from '@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment'
export default {
  data() {
    return {
      search: {
        size: 20,
        size: 10,
        current: 1,
        total: 0
      },
@@ -251,17 +263,18 @@
      }
    },
    edit(row) {
      this.$axios.get(this.$api.facilitiesAndEnvironment.getFeIlluminationDetectionArea + "?intensityIlluminationId=" + row.intensityIlluminationId).then(res => {
      getFeIlluminationDetectionArea({intensityIlluminationId:row.intensityIlluminationId}).then(res => {
        this.form = {...row}
        this.form.illuminationDetectionAreaList = res.data;
        this.dialogVisible = true
      });
    },
    initData() {
      this.$axios.get(this.$api.facilitiesAndEnvironment.getFeLightningProtection + '?size=' + this.search.size + '&current=' + this.search.current).then(res => {
        if (res.code === 201) return;
        this.tableData = res.data.records;
        this.search.total = res.data.total;
      getFeLightningProtection({...this.search}).then(res => {
        if (res.code === 200){
          this.tableData = res.data.records;
          this.search.total = res.data.total;
        }
      });
    },
    handleSizeChange(val) {
@@ -278,7 +291,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeLightningProtection + '?intensityIlluminationId=' + row.intensityIlluminationId).then(res => {
        deleteFeLightningProtection({intensityIlluminationId: row.intensityIlluminationId}).then(res => {
          this.$message.success('删除成功!')
          this.initData()
        })
@@ -286,10 +299,11 @@
    },
    feMeasuredQuantityListDelete(row, index) {
      if (row.detectionAreaId) {
        this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeIlluminationDetectionArea + '?detectionAreaId=' + row.detectionAreaId).then(res => {
          if (res.code === 201) return
          this.form.illuminationDetectionAreaList.splice(index, 1)
          this.$message.success('删除成功!')
        deleteFeIlluminationDetectionArea({detectionAreaId:row.detectionAreaId}).then(res => {
          if (res.code === 200){
            this.form.illuminationDetectionAreaList.splice(index, 1)
            this.$message.success('删除成功!')
          }
        })
      } else {
        this.form.illuminationDetectionAreaList.splice(index, 1)
@@ -297,7 +311,7 @@
      }
    },
    openDialog() {
      this.$axios.get(this.$api.deviceScope.treeDevice).then(res => {
      treeDevice().then(res => {
        this.cascaderList = res.data;
      });
      this.$nextTick(() => {
@@ -312,7 +326,7 @@
    // èŽ·å–æ‰€æœ‰è®¾å¤‡
    getEquipOptions() {
      this.equipOptions = []
      this.$axios.get(this.$api.deviceScope.deviceScopeSearch+'?status=0').then(res => {
      deviceScopeSearch({status:'0'}).then(res => {
        if (res.code === 200 && res.data) {
          this.equipOptions = res.data
        }
@@ -335,11 +349,7 @@
      this.submitLoading = true
      this.$refs.form.validate((valid) => {
        if (valid) {
          this.$axios.post(this.$api.facilitiesAndEnvironment.addFeLightningProtection, this.form, {
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(res => {
          addFeLightningProtection(this.form).then(res => {
            this.submitLoading = false
            if (res.code === 200) {
              this.initData()
@@ -353,7 +363,7 @@
    },
    // èŽ·å–è´Ÿè´£äººä¿¡æ¯æŽ¥å£
    getUserList() {
      this.$axios.get(this.$api.deviceScope.selectUserList).then(res => {
      selectUserCondition().then(res => {
        if (res.code == 200) {
          this.responsibleOptions = res.data
        }
@@ -369,35 +379,11 @@
    },
    // å¯¼å‡º
    downLoadPost(row) {
      this.$axios.get(this.$api.facilitiesAndEnvironment.exportFeIllumination + '?intensityIlluminationId=' + row.intensityIlluminationId,{responseType: "blob"}).then(res => {
      exportFeIllumination({intensityIlluminationId: row.intensityIlluminationId}).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')
        this.$message.success('导出成功')
      })
    },
  }
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/lightning-protection-detection.vue
@@ -120,11 +120,20 @@
<script>
import {
  getLightningProtectionDetection,
  addLightningProtectionDetection,
  deleteLightningProtectionDetection,
  exportOfLightningProtectionDetection
} from '@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment'
import axios from 'axios';
export default {
  data() {
    return {
      search: {
        size: 20,
        size: 10,
        current: 1,
        total: 0
      },
@@ -152,42 +161,20 @@
  methods: {
    // å¯¼å‡º
    downLoadPost() {
      this.$axios.get(this.$api.facilitiesAndEnvironment.exportOfLightningProtectionDetection,{responseType: "blob"}).then(res => {
      exportOfLightningProtectionDetection().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 = '防雷检测导出' + '.xlsx';
              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 = '防雷检测导出' + '.xlsx';
            link.click();
            this.$message.success('导出成功')
          }
        }
        this.$download.saveAs(blob,'防雷检测导出.xlsx')
      })
    },
    initData() {
      this.$axios.get(this.$api.facilitiesAndEnvironment.getLightningProtectionDetection + '?size=' + this.search.size + '&current=' + this.search.current).then(res => {
        if (res.code === 201) return;
        this.tableData = res.data.records;
        this.search.total = res.data.total;
      getLightningProtectionDetection({...this.search}).then(res => {
        if (res.code === 200){
          this.tableData = res.data.records;
          this.search.total = res.data.total;
        }
      });
    },
    handleSizeChange(val) {
@@ -223,13 +210,11 @@
          if (this.form.fileData.length > 0) {
            params.append("file", this.form.fileData[0].file)
          }
          this.$axios.post(this.$api.facilitiesAndEnvironment.addLightningProtectionDetection, params, {
            headers: {'Content-Type': 'multipart/form-data;'},
            noQs: true
          }).then(res => {
            if (res.code === 201) return;
            this.dialogVisible = false
            this.initData()
          addLightningProtectionDetection(params).then(res => {
            if (res.code === 200){
              this.dialogVisible = false
              this.initData()
            }
          });
        }
      });
@@ -248,7 +233,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteLightningProtectionDetection + '?lightningProtectionId=' + row.lightningProtectionId).then(res => {
        deleteLightningProtectionDetection({lightningProtectionId:row.lightningProtectionId}).then(res => {
          this.$message.success('删除成功!')
          this.initData()
        })
@@ -266,13 +251,8 @@
    },
    download(row) {
      let url = '';
      // fileDownload.downloadIamge(url, row.fileName)
      url = this.javaApi + 'img/' + row.systemFileName
      const link = document.createElement('a');
      link.href = url;
      link.download = row.fileName;
      link.click();
      url = this.javaApi + '/img/' + row.systemFileName
      this.$download.saveAs(url, row.fileName)
    }
  }
}
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/power-supply-stability.vue
@@ -197,7 +197,10 @@
  treeDevice,
  selectUserCondition,
  addLaboratoryFacilityPowerStable,
  deleteFeMeasuredQuantity
  deleteFeMeasuredQuantity,
  getFeMeasuredQuantityService,
  deleteLaboratoryFacilityPowerStable,
  exportFePowerStable
} from '@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment'
export default {
@@ -268,7 +271,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteLaboratoryFacilityPowerStable + '?powerStableId=' + row.powerStableId).then(res => {
        deleteLaboratoryFacilityPowerStable({powerStableId:row.powerStableId}).then(res => {
          this.$message.success('删除成功!')
          this.initData()
        })
@@ -311,7 +314,7 @@
    // ç”µæºç¨³å®šæ€§-测定量弹框中表格的删除行
    feMeasuredQuantityListDelete(row, index) {
      if (row.measuredQuantityId) {
        this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeMeasuredQuantity + '?measuredQuantityId=' + row.measuredQuantityId).then(res => {
        deleteFeMeasuredQuantity({measuredQuantityId:row.measuredQuantityId}).then(res => {
          if (res.code === 201) return
          this.form.feMeasuredQuantityList.splice(index, 1)
          this.$message.success('删除成功!')
@@ -350,44 +353,20 @@
    },
    // å¯¼å‡º
    downLoadPost(row) {
      this.$axios.get(this.$api.facilitiesAndEnvironment.exportFePowerStable + '?powerStableId=' + row.powerStableId,{responseType: "blob"}).then(res => {
      exportFePowerStable({powerStableId: row.powerStableId}).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')
        this.$message.success('导出成功')
      })
    },
    // ç”µæºç¨³å®šæ€§ ç‚¹å‡»è¡Œç¼–辑触发
    edit(row) {
      this.$axios.get(this.$api.facilitiesAndEnvironment.getFeMeasuredQuantityService + "?powerStableId=" + row.powerStableId).then(res => {
      getFeMeasuredQuantityService({powerStableId: row.powerStableId}).then((res => {
        this.form = {...row}
        this.form.feMeasuredQuantityList = res.data;
        this.dialogVisible = true
      });
      }))
    },
    // èŽ·å–è´Ÿè´£äººä¿¡æ¯æŽ¥å£
    getUserList() {
src/views/CNAS/resourceDemand/facilitiesEnvironment/component/facilities-environmental-conditions/temperature-humidity-record.vue
@@ -236,6 +236,18 @@
</template>
<script>
import {
  getFeTempHumDate,
  addFeTempHumDate,
  getFeTempHumRecordPage,
  addFeTempHumRecord,
  selectUserCondition,
  deleteFeTempHumRecord,
  deleteFeTempHumDate,
  exportTemperatureAndHumidityRecords,
  affirmFeTempHumDate
} from '@/api/cnas/resourceDemand/facilitiesEnvironment/facilitiesAndEnvironment'
export default {
  data() {
    return {
@@ -293,12 +305,7 @@
        dateId: this.approvalRow.dateId,
        subjoin: this.subjoin,
      }
      this.$axios.post(this.$api.facilitiesAndEnvironment.affirmFeTempHumDate, params, {
        headers: {
          'Content-Type': 'application/json'
        },
        noQs: true
      }).then(res => {
      affirmFeTempHumDate(params).then(res => {
        this.approvalLoading = false
        if (res.code === 200) {
          this.$message.success('确认成功!')
@@ -310,7 +317,7 @@
      })
    },
    openDialog() {
      this.$axios.get(this.$api.deviceScope.selectUserList).then(res => {
      selectUserCondition().then(res => {
        if (res.code == 200) {
          this.responsibleOptions = res.data
        }
@@ -320,11 +327,7 @@
      this.$refs.form.validate((valid) => {
        if (valid) {
          this.submitLoading = true
          this.$axios.post(this.$api.facilitiesAndEnvironment.addFeTempHumDate, this.form, {
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(res => {
          addFeTempHumDate(this.form).then(res => {
            if (res.code === 200) {
              this.$message.success('新增成功!')
              this.submitLoading = false
@@ -346,11 +349,7 @@
        this.submitLoading = true
        if (valid) {
          this.form1.dateId = this.saveRow.dateId
          this.$axios.post(this.$api.facilitiesAndEnvironment.addFeTempHumRecord, this.form1, {
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(res => {
          addFeTempHumRecord(this.form1).then(res => {
            if (res.code === 200) {
              this.$message.success('新增成功!')
              this.submitLoading = false
@@ -377,7 +376,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeTempHumDate + '?dateId=' + row.dateId).then(res => {
        deleteFeTempHumDate({dateId:row.dateId}).then(res => {
          this.$message.success('删除成功!')
          this.initData()
        })
@@ -389,35 +388,11 @@
    },
    // å¯¼å‡º
    downLoadPost(row) {
      this.$axios.get(this.$api.facilitiesAndEnvironment.exportTemperatureAndHumidityRecords + '?dateId=' + row.dateId,{responseType: "blob"}).then(res => {
      exportTemperatureAndHumidityRecords({dateId:row.dateId}).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')
        this.$message.success('导出成功')
      })
    },
    deleteRowFun1(row) {
@@ -426,28 +401,37 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.delete(this.$api.facilitiesAndEnvironment.deleteFeTempHumRecord + '?tempHumId=' + row.tempHumId).then(res => {
        deleteFeTempHumRecord({tempHumId:row.tempHumId}).then(res => {
          this.$message.success('删除成功!')
          this.initData1(this.saveRow.dateId)
        })
      })
    },
    initData() {
      this.$axios.get(this.$api.facilitiesAndEnvironment.getFeTempHumDate + '?size=' + this.search.size + '&current=' + this.search.current + '&testAreaName=' + this.search.testAreaName).then(res => {
        if (res.code === 201) return;
        this.tableData = res.data.records;
        this.search.total = res.data.total;
        if (res.data.records.length === 0) {
          this.tableData1 = []
          this.saveRow.monthDate = ''
      getFeTempHumDate({
        ...this.search,
        ...this.search}).then(res => {
        if (res.code === 200){
          this.tableData = res.data.records;
          this.search.total = res.data.total;
          if (res.data.records.length === 0) {
            this.tableData1 = []
            this.saveRow.monthDate = ''
          }
        }
      });
      })
    },
    initData1(dateId) {
      this.$axios.get(this.$api.facilitiesAndEnvironment.getFeTempHumRecordPage + '?size=' + this.search1.size + '&current=' + this.search1.current + '&dateId=' + dateId).then(res => {
        if (res.code === 201) return;
        this.tableData1 = res.data.records;
        this.search1.total = res.data.total;
      let form = {dateId: dateId}
      getFeTempHumRecordPage({
        ...this.search1,
        ...form
      }).then(res => {
        if (res.code === 200){
          this.tableData1 = res.data.records;
          this.search1.total = res.data.total;
        }
      });
    },
    handleSizeChange(val) {
src/views/standard/model/index.vue
@@ -31,7 +31,7 @@
      </div>
    </el-dialog>
    <el-dialog :before-close="closeCopyTem" :close-on-click-modal="false" :close-on-press-escape="false"
      :visible.sync="isShowCopyTem" :title="title" width="35%">
      :visible.sync="isShowCopyTem" :title="title" width="35%" :modal-append-to-body="false">
      <el-form ref="copyForm" :model="copyForm" :rules="copyFormRules" label-position="right" label-width="80px">
        <el-form-item label="模版编号" prop="number">
          <el-input v-model="copyForm.number" clearable size="small"></el-input>
@@ -384,6 +384,10 @@
</script>
<style scoped>
/* >>>.el-dialog__wrapper {
  z-index: 100 !important;
} */
.search {
  background-color: #fff;
  height: 80px;