From 0600ab29100da647a5cd34c935c16f59b3e772e5 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期一, 17 三月 2025 11:14:39 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev

---
 src/views/bulletinBoard/tasksShow/index.vue |  439 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 436 insertions(+), 3 deletions(-)

diff --git a/src/views/bulletinBoard/tasksShow/index.vue b/src/views/bulletinBoard/tasksShow/index.vue
index a7ec526..171122b 100644
--- a/src/views/bulletinBoard/tasksShow/index.vue
+++ b/src/views/bulletinBoard/tasksShow/index.vue
@@ -1,9 +1,442 @@
 <template>
-  <div>浠诲姟灞曠ず</div>
+  <div class="main_div" ref="fullScreenElement">
+    <p
+      style="
+        font-size: 16px;
+        padding-left: 20px;
+        text-align: left;
+        height: 60px;
+        line-height: 60px;
+      "
+    >
+      浠诲姟灞曠ず
+    </p>
+    <div class="search">
+      <div class="search_thing" style="margin-left: 20px">
+        <div class="search_input">
+          <el-select
+            :popper-append-to-body="false"
+            v-model="sonLaboratory"
+            placeholder="璇烽�夋嫨瀹為獙瀹�"
+            style="width: 200px; padding-right: 1%"
+            size="small"
+          >
+            <el-option
+              v-for="item in sonLaboratoryList"
+              :key="item.id"
+              :label="item.label"
+              :value="item.label"
+            ></el-option>
+          </el-select>
+        </div>
+      </div>
+      <div class="search_thing" style="margin-left: 20px">
+        <div class="search_input">
+          <el-tooltip content="鍒锋柊">
+            <el-button
+              size="mini"
+              icon="el-icon-refresh"
+              circle
+              @click="refresh"
+            ></el-button>
+          </el-tooltip>
+          <!-- <svg
+            t="1736422165720"
+            style="padding-right: 1%"
+            @click="refresh"
+            class="icon"
+            viewBox="0 0 1024 1024"
+            version="1.1"
+            xmlns="http://www.w3.org/2000/svg"
+            p-id="9562"
+            width="16"
+            height="16"
+          >
+            <path
+              d="M1011.264 431.573333c-19.008-117.973333-77.589333-222.208-163.989333-298.368-0.170667-0.149333-0.341333-0.298667-0.490667-0.448-6.933333-6.101333-14.122667-11.989333-21.44-17.728-1.173333-0.917333-2.261333-1.877333-3.434667-2.773333-6.464-4.970667-13.098667-9.728-19.818667-14.4-2.197333-1.514667-4.309333-3.114667-6.528-4.608-5.909333-3.989333-12.010667-7.744-18.154667-11.52-3.157333-1.962667-6.293333-3.989333-9.536-5.866667-2.666667-1.557333-5.354667-3.093333-8.064-4.586667l162.794667-26.218667c11.648-1.877333 19.541333-12.842667 17.664-24.469333-1.877333-11.626667-12.885333-19.541333-24.448-17.664L696.64 38.229333c-10.944 1.770667-20.522667 7.701333-27.008 16.661333-6.506667 9.002667-9.109333 19.989333-7.338667 30.912L697.6 304.981333c1.685333 10.474667 10.752 17.941333 21.034667 17.941333 1.130667 0 2.261333-0.085333 3.413333-0.277333 11.626667-1.877333 19.541333-12.821333 17.664-24.448L705.322667 91.52c4.949333 2.282667 9.962667 4.522667 14.784 6.976 3.413333 1.706667 6.698667 3.562667 10.048 5.333333 5.504 2.944 11.029333 5.866667 16.405333 9.002667 2.581333 1.514667 5.077333 3.157333 7.637333 4.714667 5.952 3.626667 11.904 7.296 17.642667 11.2 1.685333 1.130667 3.285333 2.346667 4.970667 3.52 6.485333 4.501333 12.906667 9.088 19.114667 13.888 0.725333 0.554667 1.386667 1.152 2.112 1.706667 90.602667 70.912 152.256 173.632 171.114667 290.581333 3.797333 23.616 5.738667 47.104 5.909333 70.314667 1.685333 224.597333-161.024 423.573333-389.418667 460.352-11.626667 1.877333-19.541333 12.821333-17.664 24.448 1.685333 10.474667 10.752 17.941333 21.034667 17.941333 1.130667 0 2.261333-0.085333 3.413333-0.277333 8.597333-1.386667 17.130667-2.986667 25.536-4.8 235.968-50.389333 401.536-261.141333 399.744-497.962667C1017.536 483.093333 1015.445333 457.408 1011.264 431.573333z"
+              p-id="9563"
+            ></path>
+            <path
+              d="M431.616 12.778667c-32.085333 5.162667-63.168 13.418667-93.056 24.277333-1.152 0.426667-2.389333 0.704-3.541333 1.130667-40.682667 15.104-78.72 35.797333-113.941333 60.650667-45.184 31.872-85.568 70.912-118.912 117.034667-64.277333 88.96-97.28 193.92-95.872 301.674667 0.32 24.874667 2.474667 49.898667 6.506667 74.922667 0.021333 0.149333 0.064 0.298667 0.085333 0.448 2.346667 14.549333 5.525333 28.821333 9.088 42.944 0.896 3.605333 1.792 7.168 2.773333 10.730667 3.776 13.781333 7.978667 27.349333 12.864 40.64 0.874667 2.368 1.898667 4.693333 2.816 7.04 4.437333 11.541333 9.301333 22.826667 14.528 33.941333 1.557333 3.306667 3.072 6.656 4.693333 9.92 6.250667 12.565333 12.992 24.832 20.245333 36.8 1.472 2.410667 3.072 4.8 4.586667 7.189333 7.104 11.285333 14.634667 22.272 22.613333 32.938667 1.024 1.344 1.962667 2.773333 3.008 4.117333 9.258667 12.096 19.136 23.722667 29.461333 34.965333 1.109333 1.216 2.218667 2.368 3.349333 3.562667 21.546667 22.954667 45.290667 43.946667 71.04 62.677333 0.661333 0.469333 1.237333 1.045333 1.898667 1.514667 0.192 0.149333 0.426667 0.192 0.64 0.32 15.317333 11.008 31.296 21.184 47.936 30.506667l-163.029333 26.261333c-11.626667 1.877333-19.541333 12.821333-17.664 24.448 1.685333 10.474667 10.752 17.941333 21.034667 17.941333 1.130667 0 2.261333-0.085333 3.434667-0.277333l219.157333-35.306667c10.922667-1.749333 20.522667-7.637333 27.029333-16.618667 6.506667-9.002667 9.109333-19.989333 7.36-30.933333l-35.306667-219.178667c-1.877333-11.626667-12.821333-19.456-24.469333-17.642667-11.626667 1.898667-19.541333 12.864-17.642667 24.469333l34.432 206.656c-28.416-13.034667-55.061333-28.714667-79.722667-46.677333-23.594667-17.237333-45.248-36.394667-64.853333-57.216-1.066667-1.152-2.176-2.282667-3.242667-3.434667-9.450667-10.24-18.410667-20.885333-26.858667-31.872-1.002667-1.322667-1.92-2.666667-2.922667-4.010667-7.253333-9.664-14.058667-19.669333-20.501333-29.845333-1.429333-2.261333-2.944-4.501333-4.330667-6.784-6.634667-10.922667-12.757333-22.122667-18.474667-33.557333-1.514667-3.050667-2.922667-6.165333-4.394667-9.258667-4.757333-10.090667-9.173333-20.330667-13.184-30.784-0.853333-2.218667-1.834667-4.416-2.666667-6.677333-4.437333-12.117333-8.298667-24.533333-11.733333-37.098667-0.896-3.285333-1.749333-6.613333-2.581333-9.92-3.242667-12.885333-6.144-25.941333-8.298667-39.232-0.021333-0.170667-0.064-0.341333-0.085333-0.490667-4.906667-30.528-6.784-61.034667-5.696-91.242667 3.264-90.666667 33.194667-178.325333 87.509333-253.504 54.314667-75.178667 128.170667-131.136 213.205333-162.709333 28.352-10.517333 57.941333-18.325333 88.469333-23.253333 11.626667-1.877333 19.541333-12.821333 17.664-24.448C454.208 18.816 443.264 10.794667 431.616 12.778667z"
+              p-id="9564"
+            ></path>
+          </svg> -->
+        </div>
+      </div>
+      <div class="search_thing" style="margin-left: 20px">
+        <div class="search_input">
+          <el-tooltip
+            content="鍏ㄥ睆"
+            v-if="!isFullScreen"
+            :popper-options="{ rootBoundary: 'viewport' }"
+          >
+            <svg
+              t="1736421647849"
+              style="margin-top: 5px; cursor: pointer"
+              @click="close"
+              class="icon"
+              viewBox="0 0 1024 1024"
+              version="1.1"
+              xmlns="http://www.w3.org/2000/svg"
+              p-id="4240"
+              width="16"
+              height="16"
+            >
+              <path
+                d="M145.066667 85.333333h153.6c25.6 0 42.666667-17.066667 42.666666-42.666666S324.266667 0 298.666667 0H34.133333C25.6 0 17.066667 8.533333 8.533333 17.066667 0 25.6 0 34.133333 0 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666666s42.666667-17.066667 42.666666-42.666666V145.066667l230.4 230.4c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733334L145.066667 85.333333z m170.666666 563.2L162.133333 802.133333l-76.8 76.8V725.333333C85.333333 699.733333 68.266667 682.666667 42.666667 682.666667s-42.666667 17.066667-42.666667 42.666666v256c0 25.6 17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666H145.066667l76.8-76.8 153.6-153.6c17.066667-17.066667 17.066667-42.666667 0-59.733334-17.066667-17.066667-42.666667-17.066667-59.733334 0z m665.6 34.133334c-25.6 0-42.666667 17.066667-42.666666 42.666666v153.6l-76.8-76.8-153.6-153.6c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733334l153.6 153.6 76.8 76.8H725.333333c-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666666z m0-682.666667h-256c-25.6 0-42.666667 17.066667-42.666666 42.666667s17.066667 42.666667 42.666666 42.666666h153.6l-76.8 76.8-153.6 153.6c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733334 0l153.6-153.6 76.8-76.8v153.6c0 25.6 17.066667 42.666667 42.666666 42.666666s42.666667-17.066667 42.666667-42.666666v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z"
+                fill="#2c2c2c"
+                p-id="4241"
+              ></path>
+            </svg>
+          </el-tooltip>
+          <el-tooltip content="鍙栨秷鍏ㄥ睆" v-else>
+            <svg
+              t="1736421840887"
+              @click="close"
+              style="margin-top: 5px; cursor: pointer"
+              class="icon"
+              viewBox="0 0 1028 1024"
+              version="1.1"
+              xmlns="http://www.w3.org/2000/svg"
+              p-id="8360"
+              width="16"
+              height="16"
+            >
+              <path
+                d="M631.874913 676.029564v307.086828a39.857982 39.857982 0 0 0 79.715964 0v-221.853699l250.818816 249.863922a38.054293 38.054293 0 0 0 53.933826-53.721628l-250.818816-249.863922h222.808593a39.681149 39.681149 0 1 0 0-79.397665h-308.25392a43.712924 43.712924 0 0 0-48.204463 47.886164z m-280.137597-46.719071H43.483396a39.716516 39.716516 0 1 0 0 79.397665h222.808593L15.437806 958.430614a38.054293 38.054293 0 1 0 53.933826 53.721627l250.818816-249.863922v221.853699a39.857982 39.857982 0 0 0 79.715964 0v-307.086827c-2.511017-32.537128-18.850314-47.709332-48.169096-47.709332z m325.831042-234.691718h308.25392a39.716516 39.716516 0 1 0 0-79.397666h-222.808593l250.818816-249.863922A38.054293 38.054293 0 0 0 959.898675 11.63556L709.256691 261.711681V39.857982a39.857982 39.857982 0 0 0-79.715963 0V346.944809a44.773917 44.773917 0 0 0 48.062997 47.709332zM397.395394 347.935069V40.848242a39.857982 39.857982 0 0 0-79.715963 0v221.853699L66.860615 12.838019A38.054293 38.054293 0 0 0 12.926789 66.559646l250.818816 249.863922h-222.808593a39.716516 39.716516 0 1 0 0 79.397666h308.25392c31.865165-1.167093 48.204462-16.339297 48.204462-47.886165z"
+                p-id="8361"
+              ></path>
+            </svg>
+          </el-tooltip>
+        </div>
+      </div>
+    </div>
+    <div class="tableShow">
+      <el-table
+        border
+        :data="tableData"
+        style="width: 100%"
+        :height="tableHeight"
+        :header-cell-style="{ textAlign: 'center' }"
+        :cell-style="{ textAlign: 'center' }"
+      >
+        <el-table-column
+          prop="entrustCode"
+          label="濮旀墭鍗曞彿"
+          width="170"
+          min-width="170"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="sample"
+          label="鏍峰搧鍚嶇О"
+          min-width="180"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="company"
+          label="濮旀墭鍗曚綅"
+          width="160"
+          min-width="160"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="createTime"
+          label="濮旀墭鏃堕棿"
+          width="110"
+          min-width="110"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column label="鏍峰搧鐘舵��">
+          <el-table-column
+            prop="state"
+            label="娴嬭瘯"
+            width="90"
+            min-width="90"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column
+            prop="insState"
+            label="澶嶆牳"
+            width="90"
+            min-width="90"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column
+            prop="code"
+            label="鎶ュ憡"
+            width="90"
+            min-width="90"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column
+            prop="isExamine"
+            label="瀹℃牳"
+            width="90"
+            min-width="90"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+          <el-table-column
+            prop="isRatify"
+            label="鎵瑰噯"
+            width="90"
+            min-width="90"
+            show-overflow-tooltip
+          >
+          </el-table-column>
+        </el-table-column>
+        <el-table-column
+          prop="name"
+          label="妫�娴嬩汉"
+          width="100"
+          min-width="100"
+          show-overflow-tooltip
+        >
+        </el-table-column>
+        <el-table-column
+          prop="type"
+          label="绱ф�ョ▼搴�"
+          width="100"
+          min-width="100"
+          show-overflow-tooltip
+        >
+          <template slot-scope="scope">
+            <el-tag v-if="scope.row.type === '绱ф��'" type="danger">绱ф��</el-tag>
+            <el-tag v-else-if="scope.row.type === '鏅��'" type="success"
+              >鏅��</el-tag
+            >
+            <el-tag v-else type="warning">{{ scope.row.type }}</el-tag>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div
+        style="
+          margin-top: 10px;
+          display: flex;
+          justify-content: flex-end;
+          align-items: flex-end;
+        "
+      >
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="page.currentPage"
+          :page-sizes="[20, 40, 60, 80, 100]"
+          :page-size="20"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+        >
+        </el-pagination>
+      </div>
+    </div>
+  </div>
 </template>
 
 <script>
-export default {};
+import { getDicts } from "@/api/system/dict/data";
+
+import {
+  tasksShow
+} from "../../../api/business/inspectionTask";
+
+export default {
+  data() {
+    return {
+      isFullScreen: false,
+      sFullScreen: false,
+      sonLaboratory: "",
+      sonLaboratoryList: [],
+      intervalId: null,
+      total: 0,
+      page: {
+        currentPage: 1,
+        pageSize: 20,
+      },
+      tableData: [],
+      tableHeight: 0,
+    };
+  },
+  watch: {
+    sonLaboratory: function (val) {
+      this.getTableData();
+    },
+  },
+  created() {
+    this.handlerResize();
+    // 鏌ヨ瀛楀吀
+      getDicts('sys_sub_lab').then((res) => {
+        let list = [];
+        res.data.forEach(item => {
+          let data = {
+            label: item.dictLabel,
+            value: item.dictValue,
+          }
+          list.push(data);
+        });
+        this.sonLaboratoryList = list;
+        // 榛樿閫変腑绗竴涓�
+        this.sonLaboratory = this.sonLaboratoryList[0].label;
+        this.getTableData();
+      });
+  },
+  mounted() {
+    // 姣忎笁鍒嗛挓鍒锋柊涓�娆�
+    this.intervalId = setInterval(() => {
+      this.getTableData();
+    }, 3 * 60 * 1000);
+    window.addEventListener("resize", this.handlerResize);
+    document.addEventListener("fullscreenchange", this.onFullScreenChange);
+    document.addEventListener(
+      "webkitfullscreenchange",
+      this.onFullScreenChange
+    );
+    document.addEventListener("mozfullscreenchange", this.onFullScreenChange);
+    document.addEventListener("msfullscreenchange", this.onFullScreenChange);
+  },
+  beforeDestroy() {
+    if (this.intervalId) {
+      clearInterval(this.intervalId);
+    }
+    window.removeEventListener("resize", this.handlerResize);
+    document.removeEventListener("fullscreenchange", this.onFullScreenChange);
+    document.removeEventListener(
+      "webkitfullscreenchange",
+      this.onFullScreenChange
+    );
+    document.removeEventListener(
+      "mozfullscreenchange",
+      this.onFullScreenChange
+    );
+    document.removeEventListener("msfullscreenchange", this.onFullScreenChange);
+  },
+  methods: {
+    //鍔ㄦ�佽幏鍙栬〃鏍奸珮搴�
+    handlerResize() {
+      let viewHeight = window.innerHeight;
+      let titleHeight = 60;
+      let headMenuHeight = 90;
+      let pageHeight = 42;
+      this.tableHeight =
+        viewHeight - titleHeight - headMenuHeight - pageHeight - 120;
+    },
+    // 鍏抽棴
+    close() {
+      console.log("鍏抽棴");
+      const element = this.$refs.fullScreenElement; // 鎸囧畾瑕佸叏灞忕殑鍏冪礌
+      if (this.isFullScreen) {
+        this.exitFullScreen();
+      } else {
+        this.enterFullScreen(element);
+      }
+    },
+    enterFullScreen(element) {
+      if (element.requestFullscreen) {
+        element.requestFullscreen();
+      } else if (element.webkitRequestFullScreen) {
+        element.webkitRequestFullScreen();
+      } else if (element.mozRequestFullScreen) {
+        element.mozRequestFullScreen();
+      } else if (element.msRequestFullscreen) {
+        element.msRequestFullscreen();
+      }
+      this.isFullScreen = true;
+    },
+    exitFullScreen() {
+      if (document.exitFullscreen) {
+        document.exitFullscreen();
+      } else if (document.webkitCancelFullScreen) {
+        document.webkitCancelFullScreen();
+      } else if (document.mozCancelFullScreen) {
+        document.mozCancelFullScreen();
+      } else if (document.msExitFullscreen) {
+        document.msExitFullscreen();
+      }
+      this.isFullScreen = false;
+    },
+    onFullScreenChange() {
+      this.isFullScreen = !!(
+        document.fullscreenElement ||
+        document.webkitFullscreenElement ||
+        document.mozFullScreenElement ||
+        document.msFullscreenElement
+      );
+    },
+    refresh() {
+      this.getTableData();
+    },
+    handleSizeChange(val) {
+      this.page.pageSize = val;
+      this.getTableData();
+      console.log(`姣忛〉 ${val} 鏉);
+    },
+    handleCurrentChange(val) {
+      this.page.currentPage = val;
+      this.getTableData();
+      console.log(`褰撳墠椤�: ${val}`);
+    },
+    getTableData() {
+      this.loading = true;
+      let data = {
+        currentPage: this.page.currentPage,
+        pageSize: this.page.pageSize,
+        sonLaboratory: this.sonLaboratory,
+      };
+        tasksShow(data).then((res) => {
+          this.total = res.data.total;
+          let data = res.data.records.filter(item => {
+            if(item.state == '宸叉楠�' && item.insState == '澶嶆牳閫氳繃' && item.code == '宸茬敓鎴�' && item.is_examine == '閫氳繃' && item.is_ratify == '宸叉壒鍑�'){
+              return false;
+            }else{
+              return true;
+            }
+          })
+          this.tableData = data;
+          this.loading = false;
+        });
+    },
+  },
+  computed: {},
+};
 </script>
 
-<style></style>
+<style scoped>
+.search {
+  background-color: #fff;
+  height: 80px;
+  margin-bottom: 10px;
+  padding-right: 20px;
+  border-radius: 3px;
+  display: flex;
+  justify-content: flex-end;
+  align-items: center;
+}
+
+.search_thing {
+  display: flex;
+  align-items: center;
+  height: 50px;
+}
+
+.search_input {
+  width: calc(100% - 100px);
+}
+.main_div {
+  background-color: #f5f7fb;
+  z-index: 2000;
+}
+.tableShow {
+  width: calc(100% - 40px);
+  height: calc(100% - 60px - 80px - 40px);
+  background-color: #fff;
+  border-radius: 3px;
+  padding: 20px;
+}
+</style>

--
Gitblit v1.9.3