Crunchy
2024-08-05 14d77c9bb703abedaf182a4c69138c9eebd2ffcd
Merge remote-tracking branch 'origin/master'
已修改3个文件
已添加1个文件
109 ■■■■ 文件已修改
src/components/view/b1-inspection-order.vue 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/index.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/timer.vue 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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/main.js
@@ -20,14 +20,14 @@
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
const javaApi = 'http://192.168.92.249:8001';
// const javaApi = 'http://192.168.92.2:8001';
//云
// Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
// const javaApi = 'http://114.132.189.42:1234';
// //检测中心正式库
// Vue.prototype.LOCATIONVUE = "http://10.1.200.86:8080";
// const javaApi = 'http://10.1.200.86:8001';
const javaApi = 'http://10.1.200.86:8001';
//装备电缆测试库
// Vue.prototype.LOCATIONVUE = "http://10.16.173.59";
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,71 @@
<template>
  <div>
    <el-dialog
    title="提示"
    :visible.sync="dialogVisible"
    width="30%"
    :before-close="handleClose">
      <span>这是一段信息</span>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="dialogVisible = false">ç¡® å®š</el-button>
      </span>
    </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 === 22 && minutes === 0) {
        this.performTask();
        // è®¾ç½®20分钟后提示关闭
        this.closeTimeout = setTimeout(() => {
          this.promptToClose();
        }, 20 * 60 * 1000); // 20分钟
      }
    },
    performTask() {
      // åœ¨è¿™é‡Œæ‰§è¡Œä½ æƒ³è¦çš„定时任务
      console.log("任务执行了!");
      // è¿™é‡Œå¯ä»¥è§¦å‘一个 Vuex åŠ¨ä½œã€å‘èµ·ä¸€ä¸ª HTTP è¯·æ±‚,或者其他操作
    },
    promptToClose() {
      // æç¤ºç”¨æˆ·å…³é—­
      alert("请记得在20分钟后关闭任务!");
    }
  },
  beforeDestroy() {
    // ç»„件销毁时清除定时器
    if (this.timer) {
      clearInterval(this.timer);
    }
    if (this.closeTimeout) {
      clearTimeout(this.closeTimeout);
    }
  }
}
</script>
<style scoped>
</style>