From 2e87631ecb8060784c6e7a139048522cf47d5a12 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 26 二月 2025 15:48:04 +0800
Subject: [PATCH] 搬迁测量不确定度的评定

---
 src/views/CNAS/process/uncertainty/index.vue  |  328 +++++++++++++++++++++++++++++++++++++++++
 src/views/business/inspectionReview/index.vue |   54 +++---
 src/api/cnas/process/uncertainty.js           |   39 ++++
 3 files changed, 394 insertions(+), 27 deletions(-)

diff --git a/src/api/cnas/process/uncertainty.js b/src/api/cnas/process/uncertainty.js
new file mode 100644
index 0000000..7223cc1
--- /dev/null
+++ b/src/api/cnas/process/uncertainty.js
@@ -0,0 +1,39 @@
+// 涓嶇‘瀹氬害璇勫畾鐩稿叧鎺ュ彛
+import request from "@/utils/request";
+
+//瀵煎嚭
+export function exportProcessEvaluate(query) {
+  return request({
+    url: "/processEvaluate/exportProcessEvaluate",
+    method: "get",
+    responseType: "blob",
+    params: query,
+  });
+}
+
+// 濉啓 (涓昏涓婁紶id鍜屽娉╪ote灏卞ソ浜�)
+export function doProcessEvaluate(data) {
+  return request({
+    url: "/processEvaluate/doProcessEvaluate",
+    method: "post",
+    data: data,
+  });
+}
+
+//鍒犻櫎
+export function delProcessEvaluate(query) {
+  return request({
+    url: "/processEvaluate/delProcessEvaluate",
+    method: "delete",
+    params: query,
+  });
+}
+
+//鍒嗛〉
+export function pageProcessEvaluate(query) {
+  return request({
+    url: "/processEvaluate/pageProcessEvaluate",
+    method: "get",
+    params: query,
+  });
+}
diff --git a/src/views/CNAS/process/uncertainty/index.vue b/src/views/CNAS/process/uncertainty/index.vue
new file mode 100644
index 0000000..053008b
--- /dev/null
+++ b/src/views/CNAS/process/uncertainty/index.vue
@@ -0,0 +1,328 @@
+<template>
+  <div class="uncertainty-evaluation">
+    <div class="search">
+      <div class="search_thing">
+        <div class="search_label">鎶ュ憡鍚嶇О锛�</div>
+        <div class="search_input"><el-input v-model="queryParams.reportName" clearable placeholder="璇疯緭鍏�" size="small"
+            @keyup.enter.native="refreshTable()"></el-input></div>
+      </div>
+      <div class="search_thing" style="padding-left: 30px;">
+        <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+        <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+      </div>
+      <div class="btn">
+        <el-button :loading="outLoading" size="small" style="margin-right: 16px;margin-top: 3px;" type="primary"
+          @click="handleDown0">瀵煎嚭</el-button>
+        <el-upload ref='upload' :action="action" :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError"
+          :on-success="handleSuccessUp" :show-file-list="false"
+          accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar'>
+          <el-button :loading="upLoading" size="small" type="primary">瀵煎叆</el-button></el-upload>
+      </div>
+    </div>
+    <div class="table">
+      <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 270px)'"
+        :page="page" @pagination="pagination"></lims-table>
+    </div>
+    <el-dialog :visible.sync="addDialogVisible" title="璇勪环" width="400px">
+      <el-row>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">璇勪环锛�</div>
+            <div class="search_input"><el-input v-model="addInfo.note" clearable placeholder="璇疯緭鍏�"
+                size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鏃ユ湡锛�</div>
+            <div class="search_input">
+              <el-date-picker v-model="addInfo.evaluateTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small"
+                style="width: 100%;" type="date" value-format="yyyy-MM-dd">
+              </el-date-picker>
+            </div>
+          </div>
+        </el-col>
+      </el-row>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
+        <el-button :loading="addLoading" type="primary" @click="handleAdd">纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog :visible.sync="lookDialogVisible" fullscreen title="鏌ョ湅闄勪欢" top="5vh" width="800px">
+      <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.reportUrl"
+        style="max-height: 90vh;overflow-y: auto;" />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import filePreview from "@/components/Preview/filePreview.vue";
+import {
+  exportProcessEvaluate,
+  doProcessEvaluate,
+  delProcessEvaluate,
+  pageProcessEvaluate,
+} from '@/api/cnas/process/uncertainty.js'
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    limsTable,
+    filePreview
+  },
+  data() {
+    return {
+      addPower: false,
+      outPower: false,
+      outLoading: false,
+      upLoading: false,
+      addDialogVisible: false,
+      addInfo: {},
+      addLoading: false,
+      currentInfo: {},
+      lookDialogVisible: false,
+      queryParams: {},
+      tableData: [],
+      column: [
+        { label: "鎶ュ憡鍚嶇О", prop: "reportName" },
+        { label: "璇勪环浜�", prop: "evaluateUserName" },
+        { label: "璇勪环鏃ユ湡", prop: "evaluateTime" },
+        { label: "澶囨敞", prop: "note" },
+        {
+          dataType: "action",
+          fixed: "right",
+          label: "鎿嶄綔",
+          operation: [
+            {
+              name: "璇勪环",
+              type: "text",
+              clickFun: (row) => {
+                this.handleTell(row);
+              },
+            },
+            {
+              name: "鍒犻櫎",
+              type: "text",
+              clickFun: (row) => {
+                this.handleDelete(row);
+              },
+            },
+            {
+              name: "涓嬭浇",
+              type: "text",
+              clickFun: (row) => {
+                this.handleDown(row);
+              },
+            },
+            {
+              name: "鏌ョ湅闄勪欢",
+              type: "text",
+              clickFun: (row) => {
+                this.handleLook(row);
+              },
+            },
+          ],
+        },
+      ],
+      page: {
+        total: 0,
+        size: 10,
+        current: 0,
+      },
+      tableLoading: false,
+    }
+  },
+  // 鐢ㄤ簬涓婁紶鏂囦欢鐨勪俊鎭�
+  computed: {
+    ...mapGetters(["userId"]),
+    action() {
+      return this.javaApi + '/processEvaluate/addProcessEvaluate'
+    }
+  },
+  mounted() {
+    // this.entityCopy = this.HaveJson(this.componentData.entity);
+    this.getList()
+  },
+  methods: {
+    getPower() {
+      let power = JSON.parse(sessionStorage.getItem('power'))
+      let up = false
+      let del = false
+      let add = false
+      let out = false
+      for (var i = 0; i < power.length; i++) {
+        if (power[i].menuMethod == 'doProcessEvaluate') {
+          up = true
+        }
+        if (power[i].menuMethod == 'addProcessEvaluate') {
+          add = true
+        }
+        if (power[i].menuMethod == 'delProcessEvaluate') {
+          del = true
+        }
+        if (power[i].menuMethod == 'exportProcessEvaluate') {
+          out = true
+        }
+      }
+      if (!del) {
+        this.componentData.do.splice(1, 1)
+      }
+      if (!up) {
+        this.componentData.do.splice(0, 1)
+      }
+      this.outPower = out
+      this.addPower = add
+    },
+    handleDown0() {
+      this.outLoading = true
+      exportProcessEvaluate(this.queryParams).then(res => {
+        this.outLoading = false
+        if (res.code === 201) return
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        this.$download.saveAs(blob, '娴嬮噺涓嶇‘瀹氬害鐨勮瘎瀹�.xlsx');
+      })
+    },
+    handleDown(row) {
+      let url = this.javaApi + '/word/' + row.reportUrl
+      this.$download.saveAs(url, row.reportName);
+    },
+    beforeUpload(file) {
+      if (file.size > 1024 * 1024 * 10) {
+        this.$message.error('涓婁紶鏂囦欢涓嶈秴杩�10M');
+        this.$refs.upload.clearFiles()
+        return false;
+      } else {
+        // this.upLoading = true;
+        return true;
+      }
+    },
+    onError(err, file, fileList) {
+      this.$message.error('涓婁紶澶辫触')
+      this.$refs.upload.clearFiles()
+    },
+    handleSuccessUp(response) {
+      this.upLoading = false;
+      if (response.code == 200) {
+        this.$message.success('涓婁紶鎴愬姛');
+        this.refreshTable()
+      }
+    },
+    handleTell(row) {
+      this.addInfo = row;
+      this.addDialogVisible = true;
+    },
+    handleAdd() {
+      this.addLoading = true;
+      doProcessEvaluate({
+        id: this.addInfo.id,
+        note: this.addInfo.note,
+        evaluateTime: this.addInfo.evaluateTime,
+        evaluateUser: this.userId
+      }).then((res) => {
+        this.addLoading = false;
+        if (res.code == 201) {
+          this.$message.error('璇勪环澶辫触');
+          return;
+        }
+        this.$message.success('璇勪环鎴愬姛');
+        this.addDialogVisible = false;
+        this.refreshTable()
+      })
+    },
+    getList() {
+      this.tableLoading = true;
+      let param = { ...this.queryParams, ...this.page };
+      delete param.total;
+      pageProcessEvaluate({ ...param })
+        .then((res) => {
+          this.tableLoading = false;
+          if (res.code === 200) {
+            this.tableData = res.data.records;
+            this.page.total = res.data.total;
+          }
+        })
+        .catch((err) => {
+          this.tableLoading = false;
+        });
+    },
+    pagination({ page, limit }) {
+      this.page.current = page;
+      this.page.size = limit;
+      this.getList();
+    },
+    refresh() {
+      this.queryParams = {};
+      this.page.current = 1;
+      this.getList();
+    },
+    refreshTable() {
+      this.page.current = 1;
+      this.getList();
+    },
+    handleLook(row) {
+      this.currentInfo = row;
+      this.lookDialogVisible = true;
+    },
+    handleDelete(row) {
+      this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          delProcessEvaluate({ id: row.id }).then((res) => {
+            if (res.code == 201) return;
+            this.$message.success("鍒犻櫎鎴愬姛");
+            this.refresh();
+          });
+        })
+        .catch(() => { });
+    },
+  }
+}
+</script>
+
+<style scoped>
+.title {
+  height: 60px;
+  line-height: 60px;
+}
+
+.search {
+  background-color: #fff;
+  height: 80px;
+  display: flex;
+  align-items: center;
+  position: relative;
+}
+
+.search_thing {
+  width: 350px;
+  display: flex;
+  align-items: center;
+}
+
+.search_label {
+  width: 80px;
+  font-size: 14px;
+  text-align: right;
+}
+
+.search_input {
+  width: calc(100% - 80px);
+}
+
+.table {
+  background-color: #fff;
+  height: calc(100% - 60px - 80px - 10px - 40px);
+  padding: 20px;
+}
+
+.btn {
+  position: absolute;
+  top: 16px;
+  right: 20px;
+  display: flex;
+  align-items: center;
+}
+</style>
diff --git a/src/views/business/inspectionReview/index.vue b/src/views/business/inspectionReview/index.vue
index d065a44..c724ca4 100644
--- a/src/views/business/inspectionReview/index.vue
+++ b/src/views/business/inspectionReview/index.vue
@@ -3,9 +3,8 @@
     <div>
       <el-form :model="entity" ref="entity" size="small" :inline="true">
         <el-form-item label="濮旀墭缂栧彿" prop="entrustCode">
-          <el-input size="small" placeholder="璇疯緭鍏�" clearable
-                    v-model="entity.entrustCode"
-                    @keyup.enter.native="refreshTable()"></el-input>
+          <el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="entity.entrustCode"
+            @keyup.enter.native="refreshTable()"></el-input>
         </el-form-item>
         <el-form-item label="涓嬪崟绫诲埆" prop="entrustCode">
           <el-select size="small" v-model="entity.typeSource" clearable style="width: 100%;" @change="refreshTable()">
@@ -19,20 +18,21 @@
       </el-form>
       <div class="page_total">
         <span>鎬昏浠诲姟鏁伴噺:</span>
-        <span>{{page.total}}</span>
+        <span>{{ page.total }}</span>
       </div>
     </div>
     <div>
       <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
-                  :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination"
-                  key="tableData0"></lims-table>
+        :rowClassName="rowClassName" :height="'calc(100vh - 270px)'" @pagination="pagination"
+        key="tableData0"></lims-table>
     </div>
     <!--鎶ュ憡鏌ョ湅-->
     <el-dialog title="鎶ュ憡鏌ョ湅" :visible.sync="issuedVisible" width="80vw" :modal-append-to-body="false"
-               :fullscreen="fullscreen">
+      :fullscreen="fullscreen">
       <div class="full-screen">
-        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i>
-        <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" >
+        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen = true;"
+          v-if="!fullscreen"></i>
+        <img src="@/assets/images/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen = false;">
       </div>
       <div style="height: 80vh;" v-if="issuedVisible">
         <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" />
@@ -40,7 +40,7 @@
     </el-dialog>
     <el-dialog title="鏌ョ湅闄勪欢" :visible.sync="lookDialogVisible" width="800px" top="5vh" fullscreen>
       <filePreview v-if="lookDialogVisible" :fileUrl="javaApi + '/word/' + currentInfo.tempUrlPdf" :currentFile="{}"
-                   style="max-height: 90vh;overflow-y: auto;" />
+        style="max-height: 90vh;overflow-y: auto;" />
     </el-dialog>
   </div>
 </template>
@@ -50,9 +50,9 @@
 // import ShowInfo from "../do/b1-material-ins-order/showInfo.vue";
 import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue";
 import limsTable from "@/components/Table/lims-table.vue";
-import {selectInsOrderPlanList, selectUserCondition} from "@/api/business/inspectionTask";
-import {mapGetters} from "vuex";
-import {upReportUrl} from "@/api/business/insReport";
+import { selectInsOrderPlanList, selectUserCondition } from "@/api/business/inspectionTask";
+import { mapGetters } from "vuex";
+import { upReportUrl } from "@/api/business/insReport";
 import filePreview from "@/components/Preview/filePreview.vue";
 
 export default {
@@ -209,18 +209,18 @@
       upIndex: 0,
       planTotal: 0,
       insStateList: [],
-      state:0,//0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0
+      state: 0,//0:鍙拌处椤碉紝1锛氭楠岄〉闈�,2妫�楠岄〉闈�(澶嶆牳)锛岄粯璁や负0
       activeFace: 0, //1锛氫笅鍗曪紝2锛氭煡鐪嬶紝3锛氬鏍革紝榛樿涓�0
       examine: null,
       isReport: 0,
       currentId: null,
       orderId: 0,
-      personList:[],
+      personList: [],
       currentTime: null,
-      sonLaboratoryList:[],
+      sonLaboratoryList: [],
       typeSourceList: [
-        {label: '鎴愬搧涓嬪崟', value: 0},
-        {label: '鍘熸潗鏂欎笅鍗�', value: 1},
+        { label: '鎴愬搧涓嬪崟', value: 0 },
+        { label: '鍘熸潗鏂欎笅鍗�', value: 1 },
       ],
       isCopper: null,
       customsInspection: {},
@@ -228,12 +228,12 @@
       showInfoDialog: false, // 浜т笟閾句俊鎭煡鐪�
       issuedVisible: false,
       fullscreen: false,
-      option:null,
+      option: null,
       orderTypeList: [
-        {label: '濮旀墭璇曢獙', value: 'Customer-ordered test'},
-        {label: '鎶芥', value: '鎶芥'},
-        {label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�'},
-        {label: '瀛e害妫�楠�', value: 'Quarterly inspection'},
+        { label: '濮旀墭璇曢獙', value: 'Customer-ordered test' },
+        { label: '鎶芥', value: '鎶芥' },
+        { label: '杩涘巶妫�楠�', value: '杩涘巶妫�楠�' },
+        { label: '瀛e害妫�楠�', value: 'Quarterly inspection' },
       ],
       urgencyLevel: [],
       inspectionTaskState: [],
@@ -332,7 +332,7 @@
       }
     },
     // 澶嶆牳鍥炶皟
-    handleReview(row){
+    handleReview(row) {
       this.$router.push({
         path: "/inspectionTask/inspection",
         query: {
@@ -344,12 +344,12 @@
       })
     },
     // 涓婁紶鎶ュ憡
-    handleUpload (row) {
+    handleUpload(row) {
 
     },
     // 涓嬭浇鎶ュ憡
     download(row) {
-      let url = this.javaApi+'/word/' + (row.urlS===null||row.urlS==='')?row.url:row.urlS
+      let url = this.javaApi + '/word/' + (row.urlS === null || row.urlS === '') ? row.url : row.urlS
       this.$download.saveAs(url, row.fileName);
     },
     // 杩樺師鎿嶄綔
@@ -359,7 +359,7 @@
         cancelButtonText: "鍙栨秷",
         type: "warning"
       }).then(() => {
-        upReportUrl({id: row.insReportId}).then(res => {
+        upReportUrl({ id: row.insReportId }).then(res => {
           if (res.code === 200) {
             this.$message.success('杩樺師鎴愬姛')
             this.refreshTable()

--
Gitblit v1.9.3