zouyu
2024-08-06 185f48c0ff3712937cf211dcaa72d6ddccc996fa
Merge branch 'master' of http://114.132.189.42:9002/r/center-lims-before
已修改5个文件
已添加1个文件
138 ■■■■ 文件已修改
index.html 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/fiberoptic-config.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspection-order.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/timer.vue 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
index.html
@@ -2,10 +2,10 @@
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <meta http-equiv="Expires" CONTENT="0">
  <meta http-equiv="Cache-Control" CONTENT="no-cache">
  <meta http-equiv="Pragma" CONTENT="no-cache">
  <meta http-equiv="pragram" content="no-cache">
  <meta http-equiv="cache-control" content="no-cache, no-store, must-revalidate">
  <meta http-equiv="expires" content="0">
  <title>LIMS实验室管理系统</title>
  <link rel="icon" type="image/x-icon" href="./static/img/logo.png">
src/components/do/b1-ins-order/add.vue
@@ -1572,10 +1572,19 @@
              isHaveBushing = false
            }
          })
          console.log('isHaveBushing===', this.totalArr)
          // inspectionItem
          let spcialItem = this.totalArr.find(a => a.state == 1 && a.inspectionItem.includes('松套管'))
          // console.log('isHaveBushing===', isHaveBushing)
          if (productListSelected && select[2] === '光缆' && isHaveBushing === false) {
            this.$message.error('光缆温度循环项目必须进行光纤配置')
            this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
            this.rowClick(this.currentMethod)
            this.sampleIds = [this.currentMethod.id]
            this.openConfig()
            return
          }else if(spcialItem&& isHaveBushing === false){
            this.$message.error('松套管项目必须进行光纤配置')
            this.$refs.sampleTable.setCurrentRow(this.currentMethod, true)
            this.rowClick(this.currentMethod)
            this.sampleIds = [this.currentMethod.id]
@@ -1821,7 +1830,6 @@
      },
      saveMethod(sampleList){
        this.saveLoad = true
        console.log(333333,sampleList)
        this.$axios.post(this.$api.insOrder.addInsOrder, {
          str: JSON.stringify({
            insOrder: this.addObj,
src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -885,12 +885,12 @@
          this.$message.error('缺少配置无法保存')
          return
        }
        for(let a in this.bushing){
          if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){
            this.$message.error(this.bushing[a].color+'管色标套管缺少配置无法保存')
            return
          }
        }
        // for(let a in this.bushing){
        //   if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){
        //     this.$message.error(this.bushing[a].color+'管色标套管缺少配置无法保存')
        //     return
        //   }
        // }
        this.sample.forEach(a=>{
          a.bushing = this.bushing
        })
src/components/view/b1-inspection-order.vue
@@ -374,7 +374,7 @@
                          <el-col  style="font-weight: bold;"><span>规格型号:&nbsp; </span>{{ item.model }}</el-col>
                        </el-row>
                        <el-row style="margin-top: 1px;font-size: 14px;">
                          <el-col  style="font-weight: bold;"><span>样品名称:&nbsp; </span>{{ item.sampleName }}</el-col>
                          <el-col  style="font-weight: bold;"><span>样品名称:&nbsp; </span>{{ item.sample }}</el-col>
                        </el-row>
                        <el-row style="margin-top: 1px;font-size: 14px;" class="ellipsis-multiline">
                          <el-col  style="font-weight: bold;"><span>检测项目:&nbsp; </span>{{ item.item }}</el-col>
@@ -401,31 +401,31 @@
      </span>
    </el-dialog>
    <div class="el-dialog__body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 999px;z-index: 99999;display: none;">
        <div id="printMOrder" class="printMOrder">
          <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 0.16cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
        <div id="printMOrder" class="printMOrder" ref="printMOrder">
          <el-card class="box-card" v-for="(item, i) in checkDataList" :key="i" style="font-size: 0.20cm !important;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;">
            <div style="display: flex;">
              <div>
                <el-col :span="10" :offset="2">
                  <vueQr :text="JSON.stringify(item.sampleCode)" :size="60" :margin="2"></vueQr>
                </el-col>
              </div>
              <div style="margin-left: 0.32cm;line-height: 0.21cm;">
              <div style="margin-left: 0.32cm;line-height: 0.22cm;">
                <el-row>
                  <el-col  style="font-size: 0.16cm;"><span>样品编号:&nbsp; </span>{{ item.sampleCode }}</el-col>
                  <el-col  style="font-size: 0.20cm;width: 4cm;" class="single-line-ellipsis"><span>样品编号:&nbsp; </span>{{ item.sampleCode }}</el-col>
                </el-row>
                <el-row style="font-size: 0.16cm;">
                <el-row style="font-size: 0.20cm;">
                  <el-col><span>委托单号:&nbsp; </span>{{ item.code }}</el-col>
                </el-row>
                <el-row style="font-size: 0.16cm;">
                <el-row style="font-size: 0.20cm;">
                  <el-col><span>规格型号:&nbsp; </span>{{ item.model }}</el-col>
                </el-row>
                <el-row style="font-size: 0.16cm;">
                  <el-col ><span>样品名称:&nbsp; </span>{{ item.sampleName }}</el-col>
                <el-row style="font-size: 0.20cm;">
                  <el-col ><span>样品名称:&nbsp; </span>{{ item.sample }}</el-col>
                </el-row>
                <el-row style="font-size: 0.16cm;width: 5.6cm;">
                <el-row style="font-size: 0.20cm;width: 4cm;">
                  <el-col class="ellipsis-multiline"><span>检测项目:&nbsp; </span>{{ item.item }}</el-col>
                </el-row>
                <el-row style="margin-top: 0.01cm;font-size: 0.16cm;">
                <el-row style="margin-top: 0.01cm;font-size: 0.20cm;">
                  <el-col  style="display: flex;align-items: center;"><span>样品状态:&nbsp;
                  </span>
                    <span style="white-space: nowrap;"><span v-if="item.insState==0">√</span><span class="scor" v-if="item.insState!=0"></span>待检
@@ -818,7 +818,7 @@
              targetStyles:['*'],
              style: `@page {
                margin:0;
                size: 360px 175px collapse;
                size: 400px 75px collapse;
                margin-top:3px;
                &:first-of-type{
                  margin-top:0 !important;
@@ -828,13 +828,13 @@
                zoom:100%;
              }
              @media print{
                width: 360px;
                height: 175px;
                width: 400px;
                height: 75px;
                margin:0;
              }`,
              onPrintDialogClose: this.erexcel=false,
              targetStyles: ["*"], // ä½¿ç”¨dom的所有样式,很重要
              font_size: '0.16cm',
              font_size: '0.20cm',
        });
      },
      print(){
src/view/index.vue
@@ -394,6 +394,7 @@
      </span>
    </el-dialog>
    <notice ref="notice" @goNoticeDetail="checkForUnreadData()" />
    <timer></timer>
    </div>
</template>
@@ -411,9 +412,10 @@
    import menus from '../../static/js/menu.js'
    import nullFace from '../view/404.vue'
  import notice from './notice.vue'
  import timer from './timer.vue';
    comObj['nullFace'] = nullFace
    export default {
        components: {...comObj,notice},
        components: {...comObj,notice,timer},
        data() {
            return {
                userName: "value",
src/view/timer.vue
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,72 @@
<template>
  <div>
    <el-dialog
    title="提示"
    :visible.sync="dialogVisible"
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    :show-close="false"
    width="30%">
      <div style="display: flex;align-items: center;"><i class="el-icon-warning" style="color: red;font-size: 40px;margin-right: 20px;"></i><span>代码正在部署,请30分钟后重新进入系统!</span></div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  data(){
    return{
      timer:null,
      closeTimeout:null,
      dialogVisible:false,
    }
  },
  mounted() {
    this.startScheduler();
  },
  methods: {
    startScheduler() {
      this.checkTime();
      // æ¯åˆ†é’Ÿæ£€æŸ¥ä¸€æ¬¡
      this.timer = setInterval(this.checkTime, 60 * 1000);
    },
    checkTime() {
      const now = new Date();
      const hours = now.getHours();
      const minutes = now.getMinutes();
      if (hours === 20 && minutes === 0) {
        this.performTask();
        // è®¾ç½®20分钟后提示关闭
        this.closeTimeout = setTimeout(() => {
          this.promptToClose();
        }, 20 * 60 * 1000); // 20分钟
      }
    },
    performTask() {
      // åœ¨è¿™é‡Œæ‰§è¡Œä½ æƒ³è¦çš„定时任务
      console.log("任务执行了!");
      this.dialogVisible = true;
      // è¿™é‡Œå¯ä»¥è§¦å‘一个 Vuex åŠ¨ä½œã€å‘èµ·ä¸€ä¸ª HTTP è¯·æ±‚,或者其他操作
    },
    promptToClose() {
      // æç¤ºç”¨æˆ·å…³é—­
      // alert("请记得在20分钟后关闭任务!");
      this.dialogVisible = true;
    }
  },
  beforeDestroy() {
    // ç»„件销毁时清除定时器
    if (this.timer) {
      clearInterval(this.timer);
    }
    if (this.closeTimeout) {
      clearTimeout(this.closeTimeout);
    }
  }
}
</script>
<style scoped>
</style>