From f0a9ef6693a1738c78680f6f6ac565d549e30bef Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 19 二月 2025 14:33:19 +0800
Subject: [PATCH] 检验任务搬迁10%

---
 src/components/Table/lims-table.vue                                 |   22 +
 src/api/business/inspectionTask.js                                  |   90 ++++
 src/store/modules/user.js                                           |  146 +++---
 src/main.js                                                         |    2 
 src/layout/components/Navbar.vue                                    |  140 +++---
 src/store/getters.js                                                |   38 
 src/utils/index.js                                                  |  301 +++++++------
 src/views/performance/manHour/workTimeConfig.vue                    |    2 
 src/views/business/inspectionTask/components/EditInspectionItem.vue |   20 
 src/views/business/inspectionTask/index.vue                         |  484 +++++++++++++---------
 10 files changed, 733 insertions(+), 512 deletions(-)

diff --git a/src/api/business/inspectionTask.js b/src/api/business/inspectionTask.js
index a36f376..7efcdea 100644
--- a/src/api/business/inspectionTask.js
+++ b/src/api/business/inspectionTask.js
@@ -17,3 +17,93 @@
     data: data,
   });
 }
+
+// 鏌ョ湅涓嶅悎鏍煎娴嬫暟鎹�
+export function getRetestResult(query) {
+  return request({
+    url: "/insOrder/getRetestResult",
+    method: "get",
+    params: query,
+  });
+}
+
+// 璁ら妫�楠屼换鍔�
+export function claimInsOrderPlan(data) {
+  return request({
+    url: "/insOrderPlan/claimInsOrderPlan",
+    method: "post",
+    data: data,
+  });
+}
+
+// 浠诲姟浜ゆ帴2
+export function upPlanUser2(data) {
+  return request({
+    url: "/insOrderPlan/upPlanUser2",
+    method: "post",
+    data: data,
+  });
+}
+
+// 浠诲姟浜ゆ帴
+export function upPlanUser(data) {
+  return request({
+    url: "/insOrderPlan/upPlanUser",
+    method: "post",
+    data: data,
+  });
+}
+
+// 鑾峰彇鐢ㄦ埛鍒楄〃
+export function selectUserCondition(query) {
+  return request({
+    url: "/system/newUser/selectUserCondition",
+    method: "get",
+    params: query,
+  });
+}
+
+// 妫�楠屼换鍔�-鐗规畩妫�楠岄」缁戝畾鏌ヨ
+export function getBindingProductByProductId(query) {
+  return request({
+    url: "/insOrderPlan/getBindingProductByProductId",
+    method: "get",
+    params: query,
+  });
+}
+
+// 妫�楠屼换鍔�-鏍规嵁妫�楠岄」id鏌ヨ妫�楠岄」鏍戜俊鎭�
+export function getProductTreeByProductId(query) {
+  return request({
+    url: "/insOrderPlan/getProductTreeByProductId",
+    method: "get",
+    params: query,
+  });
+}
+
+// 妫�楠屼换鍔�-鐗规畩妫�楠岄」缁戝畾
+export function bindingProductTreeByProductId(data) {
+  return request({
+    url: "/insOrderPlan/bindingProductTreeByProductId",
+    method: "post",
+    data: data,
+  });
+}
+
+// 妫�楠屼换鍔�-鍒犻櫎鐗规畩妫�楠岄」缁戝畾淇℃伅
+export function delProductTreeByProductId(query) {
+  return request({
+    url: "/insOrderPlan/delProductTreeByProductId",
+    method: "delete",
+    params: query,
+  });
+}
+
+// 鏌ヨ妫�楠屼换鍔�
+export function selectInsOrderPlanList(query) {
+  return request({
+    url: "/insOrderPlan/selectInsOrderPlanList",
+    method: "get",
+    params: query,
+  });
+}
diff --git a/src/components/Table/lims-table.vue b/src/components/Table/lims-table.vue
index d6a75c2..b7ec78f 100644
--- a/src/components/Table/lims-table.vue
+++ b/src/components/Table/lims-table.vue
@@ -170,6 +170,15 @@
               </el-upload>
             </template>
           </div>
+          <!-- 鍙偣鍑荤殑鏂囧瓧 -->
+          <div
+            v-else-if="item.dataType == 'link'"
+            class="cell link"
+            style="width: 100%"
+            @click="goLink(scope.row, item.linkMethod)"
+          >
+            <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span>
+          </div>
           <!-- 榛樿绾睍绀烘暟鎹� -->
           <div v-else class="cell" style="width: 100%">
             <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span>
@@ -294,7 +303,7 @@
     },
     border: {
       type: Boolean,
-      default: false,
+      default: true,
     },
     highlightCurrentRow: {
       type: Boolean,
@@ -381,6 +390,13 @@
       // return index * 2;
       return (this.page.current - 1) * this.page.size + index + 1;
     },
+    // 鐐瑰嚮鍗曞厓鏍糽ink浜嬩欢
+    goLink(row, linkMethod) {
+      if (!linkMethod) {
+        return this.$message.warning("璇烽厤缃甽ingk浜嬩欢");
+      }
+      this.$parent[linkMethod](row);
+    },
   },
 };
 </script>
@@ -399,4 +415,8 @@
 >>> .cell {
   padding: 0 !important;
 }
+.link {
+  color: rgb(64, 158, 255);
+  cursor: pointer;
+}
 </style>
diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue
index bb34f1b..da89cf9 100644
--- a/src/layout/components/Navbar.vue
+++ b/src/layout/components/Navbar.vue
@@ -1,7 +1,7 @@
 <template>
   <div class="navbar">
-<!--    <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>-->
-<!--    <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>-->
+    <!--    <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>-->
+    <!--    <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>-->
     <div class="logo">
       <img src="@/assets/logo/ZTTlogo.png" />
     </div>
@@ -10,56 +10,61 @@
     </div>
     <div class="right-menu">
       <div class="avatar-wrapper">
-        <img :src="avatar" class="user-avatar">
-        <span class="userName">Admin</span>
-        <img class="logoout" src="@/assets/images/logoout.png" @click="logout" title="閫�鍑鸿处鍙�" />
+        <img :src="avatar" class="user-avatar" />
+        <span class="userName">{{ nickName }}</span>
+        <img
+          class="logoout"
+          src="@/assets/images/logoout.png"
+          @click="logout"
+          title="閫�鍑鸿处鍙�"
+        />
       </div>
-<!--      <template v-if="device!=='mobile'">-->
-<!--        <search id="header-search" class="right-menu-item" />-->
+      <!--      <template v-if="device!=='mobile'">-->
+      <!--        <search id="header-search" class="right-menu-item" />-->
 
-<!--        <el-tooltip content="婧愮爜鍦板潃" effect="dark" placement="bottom">-->
-<!--          <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
-<!--        </el-tooltip>-->
+      <!--        <el-tooltip content="婧愮爜鍦板潃" effect="dark" placement="bottom">-->
+      <!--          <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
+      <!--        </el-tooltip>-->
 
-<!--        <el-tooltip content="鏂囨。鍦板潃" effect="dark" placement="bottom">-->
-<!--          <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
-<!--        </el-tooltip>-->
+      <!--        <el-tooltip content="鏂囨。鍦板潃" effect="dark" placement="bottom">-->
+      <!--          <ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect" />-->
+      <!--        </el-tooltip>-->
 
-<!--        <screenfull id="screenfull" class="right-menu-item hover-effect" />-->
+      <!--        <screenfull id="screenfull" class="right-menu-item hover-effect" />-->
 
-<!--        <el-tooltip content="甯冨眬澶у皬" effect="dark" placement="bottom">-->
-<!--          <size-select id="size-select" class="right-menu-item hover-effect" />-->
-<!--        </el-tooltip>-->
+      <!--        <el-tooltip content="甯冨眬澶у皬" effect="dark" placement="bottom">-->
+      <!--          <size-select id="size-select" class="right-menu-item hover-effect" />-->
+      <!--        </el-tooltip>-->
 
-<!--      </template>-->
+      <!--      </template>-->
 
-<!--      <div class="avatar-container">-->
-<!--        <el-dropdown-menu slot="dropdown">-->
-<!--          <router-link to="/user/profile">-->
-<!--            <el-dropdown-item>涓汉涓績</el-dropdown-item>-->
-<!--          </router-link>-->
-<!--          <el-dropdown-item @click.native="setting = true">-->
-<!--            <span>甯冨眬璁剧疆</span>-->
-<!--          </el-dropdown-item>-->
-<!--          <el-dropdown-item divided @click.native="logout">-->
-<!--            <span>閫�鍑虹櫥褰�</span>-->
-<!--          </el-dropdown-item>-->
-<!--        </el-dropdown-menu>-->
-<!--      </div>-->
+      <!--      <div class="avatar-container">-->
+      <!--        <el-dropdown-menu slot="dropdown">-->
+      <!--          <router-link to="/user/profile">-->
+      <!--            <el-dropdown-item>涓汉涓績</el-dropdown-item>-->
+      <!--          </router-link>-->
+      <!--          <el-dropdown-item @click.native="setting = true">-->
+      <!--            <span>甯冨眬璁剧疆</span>-->
+      <!--          </el-dropdown-item>-->
+      <!--          <el-dropdown-item divided @click.native="logout">-->
+      <!--            <span>閫�鍑虹櫥褰�</span>-->
+      <!--          </el-dropdown-item>-->
+      <!--        </el-dropdown-menu>-->
+      <!--      </div>-->
     </div>
   </div>
 </template>
 
 <script>
-import { mapGetters } from 'vuex'
-import Breadcrumb from '@/components/Breadcrumb'
-import TopNav from '@/components/TopNav'
-import Hamburger from '@/components/Hamburger'
-import Screenfull from '@/components/Screenfull'
-import SizeSelect from '@/components/SizeSelect'
-import Search from '@/components/HeaderSearch'
-import RuoYiGit from '@/components/RuoYi/Git'
-import RuoYiDoc from '@/components/RuoYi/Doc'
+import { mapGetters } from "vuex";
+import Breadcrumb from "@/components/Breadcrumb";
+import TopNav from "@/components/TopNav";
+import Hamburger from "@/components/Hamburger";
+import Screenfull from "@/components/Screenfull";
+import SizeSelect from "@/components/SizeSelect";
+import Search from "@/components/HeaderSearch";
+import RuoYiGit from "@/components/RuoYi/Git";
+import RuoYiDoc from "@/components/RuoYi/Doc";
 
 export default {
   components: {
@@ -70,44 +75,43 @@
     SizeSelect,
     Search,
     RuoYiGit,
-    RuoYiDoc
+    RuoYiDoc,
   },
   computed: {
-    ...mapGetters([
-      'avatar',
-      'device'
-    ]),
+    ...mapGetters(["avatar", "device", "nickName"]),
     setting: {
       get() {
-        return this.$store.state.settings.showSettings
+        return this.$store.state.settings.showSettings;
       },
       set(val) {
-        this.$store.dispatch('settings/changeSetting', {
-          key: 'showSettings',
-          value: val
-        })
-      }
+        this.$store.dispatch("settings/changeSetting", {
+          key: "showSettings",
+          value: val,
+        });
+      },
     },
     topNav: {
       get() {
-        return this.$store.state.settings.topNav
-      }
-    }
+        return this.$store.state.settings.topNav;
+      },
+    },
   },
   methods: {
     async logout() {
-      this.$confirm('纭畾娉ㄩ攢骞堕��鍑虹郴缁熷悧锛�', '鎻愮ず', {
-        confirmButtonText: '纭畾',
-        cancelButtonText: '鍙栨秷',
-        type: 'warning'
-      }).then(() => {
-        this.$store.dispatch('LogOut').then(() => {
-          location.href = '/index';
+      this.$confirm("纭畾娉ㄩ攢骞堕��鍑虹郴缁熷悧锛�", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          this.$store.dispatch("LogOut").then(() => {
+            location.href = "/index";
+          });
         })
-      }).catch(() => {});
-    }
-  }
-}
+        .catch(() => {});
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
@@ -116,7 +120,7 @@
   overflow: hidden;
   //position: relative;
   background: #fff;
-  box-shadow: 0 1px 4px rgba(0,21,41,.08);
+  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
   position: fixed; /* 灏嗗ご閮ㄥ浐瀹� */
   top: 0; /* 鍦ㄩ《閮ㄥ浐瀹� */
   width: 100%; /* 瀹藉害100%锛岃鐩栨暣涓鍙� */
@@ -199,10 +203,10 @@
 
       &.hover-effect {
         cursor: pointer;
-        transition: background .3s;
+        transition: background 0.3s;
 
         &:hover {
-          background: rgba(0, 0, 0, .025)
+          background: rgba(0, 0, 0, 0.025);
         }
       }
     }
diff --git a/src/main.js b/src/main.js
index e82c37b..96becea 100644
--- a/src/main.js
+++ b/src/main.js
@@ -26,6 +26,7 @@
   selectDictLabels,
   handleTree,
 } from "@/utils/ruoyi";
+import { dictToValue } from "@/utils/index";
 // 鍒嗛〉缁勪欢
 import Pagination from "@/components/Pagination";
 // 鑷畾涔夎〃鏍煎伐鍏风粍浠�
@@ -56,6 +57,7 @@
 Vue.prototype.selectDictLabels = selectDictLabels;
 Vue.prototype.download = download;
 Vue.prototype.handleTree = handleTree;
+Vue.prototype.dictToValue = dictToValue;
 Vue.prototype.HaveJson = (val) => {
   return JSON.parse(JSON.stringify(val));
 };
diff --git a/src/store/getters.js b/src/store/getters.js
index 8adb1b6..0d93723 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -1,19 +1,21 @@
 const getters = {
-  sidebar: state => state.app.sidebar,
-  size: state => state.app.size,
-  device: state => state.app.device,
-  dict: state => state.dict.dict,
-  visitedViews: state => state.tagsView.visitedViews,
-  cachedViews: state => state.tagsView.cachedViews,
-  token: state => state.user.token,
-  avatar: state => state.user.avatar,
-  name: state => state.user.name,
-  introduction: state => state.user.introduction,
-  roles: state => state.user.roles,
-  permissions: state => state.user.permissions,
-  permission_routes: state => state.permission.routes,
-  topbarRouters:state => state.permission.topbarRouters,
-  defaultRoutes:state => state.permission.defaultRoutes,
-  sidebarRouters:state => state.permission.sidebarRouters,
-}
-export default getters
+  sidebar: (state) => state.app.sidebar,
+  size: (state) => state.app.size,
+  device: (state) => state.app.device,
+  dict: (state) => state.dict.dict,
+  visitedViews: (state) => state.tagsView.visitedViews,
+  cachedViews: (state) => state.tagsView.cachedViews,
+  token: (state) => state.user.token,
+  avatar: (state) => state.user.avatar,
+  name: (state) => state.user.name,
+  nickName: (state) => state.user.nickName,
+  userId: (state) => state.user.id,
+  introduction: (state) => state.user.introduction,
+  roles: (state) => state.user.roles,
+  permissions: (state) => state.user.permissions,
+  permission_routes: (state) => state.permission.routes,
+  topbarRouters: (state) => state.permission.topbarRouters,
+  defaultRoutes: (state) => state.permission.defaultRoutes,
+  sidebarRouters: (state) => state.permission.sidebarRouters,
+};
+export default getters;
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 63e6ba2..54d35ca 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -1,106 +1,120 @@
-import { login, logout, getInfo } from '@/api/login'
-import { getToken, setToken, removeToken } from '@/utils/auth'
-import { isHttp, isEmpty } from "@/utils/validate"
-import defAva from '@/assets/images/profile.jpg'
+import { login, logout, getInfo } from "@/api/login";
+import { getToken, setToken, removeToken } from "@/utils/auth";
+import { isHttp, isEmpty } from "@/utils/validate";
+import defAva from "@/assets/images/profile.jpg";
 
 const user = {
   state: {
     token: getToken(),
-    id: '',
-    name: '',
-    avatar: '',
+    id: "",
+    name: "",
+    avatar: "",
+    nickName: "",
     roles: [],
-    permissions: []
+    permissions: [],
   },
 
   mutations: {
     SET_TOKEN: (state, token) => {
-      state.token = token
+      state.token = token;
     },
     SET_ID: (state, id) => {
-      state.id = id
+      state.id = id;
     },
     SET_NAME: (state, name) => {
-      state.name = name
+      state.name = name;
     },
     SET_AVATAR: (state, avatar) => {
-      state.avatar = avatar
+      state.avatar = avatar;
+    },
+    SET_NICKNAME: (state, nickName) => {
+      state.nickName = nickName;
     },
     SET_ROLES: (state, roles) => {
-      state.roles = roles
+      state.roles = roles;
     },
     SET_PERMISSIONS: (state, permissions) => {
-      state.permissions = permissions
-    }
+      state.permissions = permissions;
+    },
   },
 
   actions: {
     // 鐧诲綍
     Login({ commit }, userInfo) {
-      const username = userInfo.username.trim()
-      const password = userInfo.password
-      const code = userInfo.code
-      const uuid = userInfo.uuid
+      const username = userInfo.username.trim();
+      const password = userInfo.password;
+      const code = userInfo.code;
+      const uuid = userInfo.uuid;
       return new Promise((resolve, reject) => {
-        login(username, password, code, uuid).then(res => {
-          setToken(res.token)
-          commit('SET_TOKEN', res.token)
-          resolve()
-        }).catch(error => {
-          reject(error)
-        })
-      })
+        login(username, password, code, uuid)
+          .then((res) => {
+            setToken(res.token);
+            commit("SET_TOKEN", res.token);
+            resolve();
+          })
+          .catch((error) => {
+            reject(error);
+          });
+      });
     },
 
     // 鑾峰彇鐢ㄦ埛淇℃伅
     GetInfo({ commit, state }) {
       return new Promise((resolve, reject) => {
-        getInfo().then(res => {
-          const user = res.user
-          let avatar = user.avatar || ""
-          if (!isHttp(avatar)) {
-            avatar = (isEmpty(avatar)) ? defAva : process.env.VUE_APP_BASE_API + avatar
-          }
-          if (res.roles && res.roles.length > 0) { // 楠岃瘉杩斿洖鐨剅oles鏄惁鏄竴涓潪绌烘暟缁�
-            commit('SET_ROLES', res.roles)
-            commit('SET_PERMISSIONS', res.permissions)
-          } else {
-            commit('SET_ROLES', ['ROLE_DEFAULT'])
-          }
-          commit('SET_ID', user.userId)
-          commit('SET_NAME', user.userName)
-          commit('SET_AVATAR', avatar)
-          resolve(res)
-        }).catch(error => {
-          reject(error)
-        })
-      })
+        getInfo()
+          .then((res) => {
+            const user = res.user;
+            let avatar = user.avatar || "";
+            if (!isHttp(avatar)) {
+              avatar = isEmpty(avatar)
+                ? defAva
+                : process.env.VUE_APP_BASE_API + avatar;
+            }
+            if (res.roles && res.roles.length > 0) {
+              // 楠岃瘉杩斿洖鐨剅oles鏄惁鏄竴涓潪绌烘暟缁�
+              commit("SET_ROLES", res.roles);
+              commit("SET_PERMISSIONS", res.permissions);
+            } else {
+              commit("SET_ROLES", ["ROLE_DEFAULT"]);
+            }
+            commit("SET_ID", user.userId);
+            commit("SET_NAME", user.userName);
+            commit("SET_AVATAR", avatar);
+            commit("SET_NICKNAME", user.nickName);
+            resolve(res);
+          })
+          .catch((error) => {
+            reject(error);
+          });
+      });
     },
 
     // 閫�鍑虹郴缁�
     LogOut({ commit, state }) {
       return new Promise((resolve, reject) => {
-        logout(state.token).then(() => {
-          commit('SET_TOKEN', '')
-          commit('SET_ROLES', [])
-          commit('SET_PERMISSIONS', [])
-          removeToken()
-          resolve()
-        }).catch(error => {
-          reject(error)
-        })
-      })
+        logout(state.token)
+          .then(() => {
+            commit("SET_TOKEN", "");
+            commit("SET_ROLES", []);
+            commit("SET_PERMISSIONS", []);
+            removeToken();
+            resolve();
+          })
+          .catch((error) => {
+            reject(error);
+          });
+      });
     },
 
     // 鍓嶇 鐧诲嚭
     FedLogOut({ commit }) {
-      return new Promise(resolve => {
-        commit('SET_TOKEN', '')
-        removeToken()
-        resolve()
-      })
-    }
-  }
-}
+      return new Promise((resolve) => {
+        commit("SET_TOKEN", "");
+        removeToken();
+        resolve();
+      });
+    },
+  },
+};
 
-export default user
+export default user;
diff --git a/src/utils/index.js b/src/utils/index.js
index df5db12..6a246f9 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -1,18 +1,25 @@
-import { parseTime } from './ruoyi'
+import { parseTime } from "./ruoyi";
 
 /**
  * 琛ㄦ牸鏃堕棿鏍煎紡鍖�
  */
 export function formatDate(cellValue) {
   if (cellValue == null || cellValue == "") return "";
-  var date = new Date(cellValue)
-  var year = date.getFullYear()
-  var month = date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1
-  var day = date.getDate() < 10 ? '0' + date.getDate() : date.getDate()
-  var hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours()
-  var minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
-  var seconds = date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds()
-  return year + '-' + month + '-' + day + ' ' + hours + ':' + minutes + ':' + seconds
+  var date = new Date(cellValue);
+  var year = date.getFullYear();
+  var month =
+    date.getMonth() + 1 < 10
+      ? "0" + (date.getMonth() + 1)
+      : date.getMonth() + 1;
+  var day = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+  var hours = date.getHours() < 10 ? "0" + date.getHours() : date.getHours();
+  var minutes =
+    date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes();
+  var seconds =
+    date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds();
+  return (
+    year + "-" + month + "-" + day + " " + hours + ":" + minutes + ":" + seconds
+  );
 }
 
 /**
@@ -21,40 +28,40 @@
  * @returns {string}
  */
 export function formatTime(time, option) {
-  if (('' + time).length === 10) {
-    time = parseInt(time) * 1000
+  if (("" + time).length === 10) {
+    time = parseInt(time) * 1000;
   } else {
-    time = +time
+    time = +time;
   }
-  const d = new Date(time)
-  const now = Date.now()
+  const d = new Date(time);
+  const now = Date.now();
 
-  const diff = (now - d) / 1000
+  const diff = (now - d) / 1000;
 
   if (diff < 30) {
-    return '鍒氬垰'
+    return "鍒氬垰";
   } else if (diff < 3600) {
     // less 1 hour
-    return Math.ceil(diff / 60) + '鍒嗛挓鍓�'
+    return Math.ceil(diff / 60) + "鍒嗛挓鍓�";
   } else if (diff < 3600 * 24) {
-    return Math.ceil(diff / 3600) + '灏忔椂鍓�'
+    return Math.ceil(diff / 3600) + "灏忔椂鍓�";
   } else if (diff < 3600 * 24 * 2) {
-    return '1澶╁墠'
+    return "1澶╁墠";
   }
   if (option) {
-    return parseTime(time, option)
+    return parseTime(time, option);
   } else {
     return (
       d.getMonth() +
       1 +
-      '鏈�' +
+      "鏈�" +
       d.getDate() +
-      '鏃�' +
+      "鏃�" +
       d.getHours() +
-      '鏃�' +
+      "鏃�" +
       d.getMinutes() +
-      '鍒�'
-    )
+      "鍒�"
+    );
   }
 }
 
@@ -63,18 +70,18 @@
  * @returns {Object}
  */
 export function getQueryObject(url) {
-  url = url == null ? window.location.href : url
-  const search = url.substring(url.lastIndexOf('?') + 1)
-  const obj = {}
-  const reg = /([^?&=]+)=([^?&=]*)/g
+  url = url == null ? window.location.href : url;
+  const search = url.substring(url.lastIndexOf("?") + 1);
+  const obj = {};
+  const reg = /([^?&=]+)=([^?&=]*)/g;
   search.replace(reg, (rs, $1, $2) => {
-    const name = decodeURIComponent($1)
-    let val = decodeURIComponent($2)
-    val = String(val)
-    obj[name] = val
-    return rs
-  })
-  return obj
+    const name = decodeURIComponent($1);
+    let val = decodeURIComponent($2);
+    val = String(val);
+    obj[name] = val;
+    return rs;
+  });
+  return obj;
 }
 
 /**
@@ -83,14 +90,14 @@
  */
 export function byteLength(str) {
   // returns the byte length of an utf8 string
-  let s = str.length
+  let s = str.length;
   for (var i = str.length - 1; i >= 0; i--) {
-    const code = str.charCodeAt(i)
-    if (code > 0x7f && code <= 0x7ff) s++
-    else if (code > 0x7ff && code <= 0xffff) s += 2
-    if (code >= 0xDC00 && code <= 0xDFFF) i--
+    const code = str.charCodeAt(i);
+    if (code > 0x7f && code <= 0x7ff) s++;
+    else if (code > 0x7ff && code <= 0xffff) s += 2;
+    if (code >= 0xdc00 && code <= 0xdfff) i--;
   }
-  return s
+  return s;
 }
 
 /**
@@ -98,13 +105,13 @@
  * @returns {Array}
  */
 export function cleanArray(actual) {
-  const newArray = []
+  const newArray = [];
   for (let i = 0; i < actual.length; i++) {
     if (actual[i]) {
-      newArray.push(actual[i])
+      newArray.push(actual[i]);
     }
   }
-  return newArray
+  return newArray;
 }
 
 /**
@@ -112,13 +119,13 @@
  * @returns {Array}
  */
 export function param(json) {
-  if (!json) return ''
+  if (!json) return "";
   return cleanArray(
-    Object.keys(json).map(key => {
-      if (json[key] === undefined) return ''
-      return encodeURIComponent(key) + '=' + encodeURIComponent(json[key])
+    Object.keys(json).map((key) => {
+      if (json[key] === undefined) return "";
+      return encodeURIComponent(key) + "=" + encodeURIComponent(json[key]);
     })
-  ).join('&')
+  ).join("&");
 }
 
 /**
@@ -126,21 +133,21 @@
  * @returns {Object}
  */
 export function param2Obj(url) {
-  const search = decodeURIComponent(url.split('?')[1]).replace(/\+/g, ' ')
+  const search = decodeURIComponent(url.split("?")[1]).replace(/\+/g, " ");
   if (!search) {
-    return {}
+    return {};
   }
-  const obj = {}
-  const searchArr = search.split('&')
-  searchArr.forEach(v => {
-    const index = v.indexOf('=')
+  const obj = {};
+  const searchArr = search.split("&");
+  searchArr.forEach((v) => {
+    const index = v.indexOf("=");
     if (index !== -1) {
-      const name = v.substring(0, index)
-      const val = v.substring(index + 1, v.length)
-      obj[name] = val
+      const name = v.substring(0, index);
+      const val = v.substring(index + 1, v.length);
+      obj[name] = val;
     }
-  })
-  return obj
+  });
+  return obj;
 }
 
 /**
@@ -148,9 +155,9 @@
  * @returns {string}
  */
 export function html2Text(val) {
-  const div = document.createElement('div')
-  div.innerHTML = val
-  return div.textContent || div.innerText
+  const div = document.createElement("div");
+  div.innerHTML = val;
+  return div.textContent || div.innerText;
 }
 
 /**
@@ -160,21 +167,21 @@
  * @returns {Object}
  */
 export function objectMerge(target, source) {
-  if (typeof target !== 'object') {
-    target = {}
+  if (typeof target !== "object") {
+    target = {};
   }
   if (Array.isArray(source)) {
-    return source.slice()
+    return source.slice();
   }
-  Object.keys(source).forEach(property => {
-    const sourceProperty = source[property]
-    if (typeof sourceProperty === 'object') {
-      target[property] = objectMerge(target[property], sourceProperty)
+  Object.keys(source).forEach((property) => {
+    const sourceProperty = source[property];
+    if (typeof sourceProperty === "object") {
+      target[property] = objectMerge(target[property], sourceProperty);
     } else {
-      target[property] = sourceProperty
+      target[property] = sourceProperty;
     }
-  })
-  return target
+  });
+  return target;
 }
 
 /**
@@ -183,18 +190,18 @@
  */
 export function toggleClass(element, className) {
   if (!element || !className) {
-    return
+    return;
   }
-  let classString = element.className
-  const nameIndex = classString.indexOf(className)
+  let classString = element.className;
+  const nameIndex = classString.indexOf(className);
   if (nameIndex === -1) {
-    classString += '' + className
+    classString += "" + className;
   } else {
     classString =
       classString.substr(0, nameIndex) +
-      classString.substr(nameIndex + className.length)
+      classString.substr(nameIndex + className.length);
   }
-  element.className = classString
+  element.className = classString;
 }
 
 /**
@@ -202,10 +209,10 @@
  * @returns {Date}
  */
 export function getTime(type) {
-  if (type === 'start') {
-    return new Date().getTime() - 3600 * 1000 * 24 * 90
+  if (type === "start") {
+    return new Date().getTime() - 3600 * 1000 * 24 * 90;
   } else {
-    return new Date(new Date().toDateString())
+    return new Date(new Date().toDateString());
   }
 }
 
@@ -216,38 +223,38 @@
  * @return {*}
  */
 export function debounce(func, wait, immediate) {
-  let timeout, args, context, timestamp, result
+  let timeout, args, context, timestamp, result;
 
-  const later = function() {
+  const later = function () {
     // 鎹笂涓�娆¤Е鍙戞椂闂撮棿闅�
-    const last = +new Date() - timestamp
+    const last = +new Date() - timestamp;
 
     // 涓婃琚寘瑁呭嚱鏁拌璋冪敤鏃堕棿闂撮殧 last 灏忎簬璁惧畾鏃堕棿闂撮殧 wait
     if (last < wait && last > 0) {
-      timeout = setTimeout(later, wait - last)
+      timeout = setTimeout(later, wait - last);
     } else {
-      timeout = null
+      timeout = null;
       // 濡傛灉璁惧畾涓篿mmediate===true锛屽洜涓哄紑濮嬭竟鐣屽凡缁忚皟鐢ㄨ繃浜嗘澶勬棤闇�璋冪敤
       if (!immediate) {
-        result = func.apply(context, args)
-        if (!timeout) context = args = null
+        result = func.apply(context, args);
+        if (!timeout) context = args = null;
       }
     }
-  }
+  };
 
-  return function(...args) {
-    context = this
-    timestamp = +new Date()
-    const callNow = immediate && !timeout
+  return function (...args) {
+    context = this;
+    timestamp = +new Date();
+    const callNow = immediate && !timeout;
     // 濡傛灉寤舵椂涓嶅瓨鍦紝閲嶆柊璁惧畾寤舵椂
-    if (!timeout) timeout = setTimeout(later, wait)
+    if (!timeout) timeout = setTimeout(later, wait);
     if (callNow) {
-      result = func.apply(context, args)
-      context = args = null
+      result = func.apply(context, args);
+      context = args = null;
     }
 
-    return result
-  }
+    return result;
+  };
 }
 
 /**
@@ -258,18 +265,18 @@
  * @returns {Object}
  */
 export function deepClone(source) {
-  if (!source && typeof source !== 'object') {
-    throw new Error('error arguments', 'deepClone')
+  if (!source && typeof source !== "object") {
+    throw new Error("error arguments", "deepClone");
   }
-  const targetObj = source.constructor === Array ? [] : {}
-  Object.keys(source).forEach(keys => {
-    if (source[keys] && typeof source[keys] === 'object') {
-      targetObj[keys] = deepClone(source[keys])
+  const targetObj = source.constructor === Array ? [] : {};
+  Object.keys(source).forEach((keys) => {
+    if (source[keys] && typeof source[keys] === "object") {
+      targetObj[keys] = deepClone(source[keys]);
     } else {
-      targetObj[keys] = source[keys]
+      targetObj[keys] = source[keys];
     }
-  })
-  return targetObj
+  });
+  return targetObj;
 }
 
 /**
@@ -277,16 +284,16 @@
  * @returns {Array}
  */
 export function uniqueArr(arr) {
-  return Array.from(new Set(arr))
+  return Array.from(new Set(arr));
 }
 
 /**
  * @returns {string}
  */
 export function createUniqueString() {
-  const timestamp = +new Date() + ''
-  const randomNum = parseInt((1 + Math.random()) * 65536) + ''
-  return (+(randomNum + timestamp)).toString(32)
+  const timestamp = +new Date() + "";
+  const randomNum = parseInt((1 + Math.random()) * 65536) + "";
+  return (+(randomNum + timestamp)).toString(32);
 }
 
 /**
@@ -296,7 +303,7 @@
  * @returns {boolean}
  */
 export function hasClass(ele, cls) {
-  return !!ele.className.match(new RegExp('(\\s|^)' + cls + '(\\s|$)'))
+  return !!ele.className.match(new RegExp("(\\s|^)" + cls + "(\\s|$)"));
 }
 
 /**
@@ -305,7 +312,7 @@
  * @param {string} cls
  */
 export function addClass(ele, cls) {
-  if (!hasClass(ele, cls)) ele.className += ' ' + cls
+  if (!hasClass(ele, cls)) ele.className += " " + cls;
 }
 
 /**
@@ -315,76 +322,84 @@
  */
 export function removeClass(ele, cls) {
   if (hasClass(ele, cls)) {
-    const reg = new RegExp('(\\s|^)' + cls + '(\\s|$)')
-    ele.className = ele.className.replace(reg, ' ')
+    const reg = new RegExp("(\\s|^)" + cls + "(\\s|$)");
+    ele.className = ele.className.replace(reg, " ");
   }
 }
 
 export function makeMap(str, expectsLowerCase) {
-  const map = Object.create(null)
-  const list = str.split(',')
+  const map = Object.create(null);
+  const list = str.split(",");
   for (let i = 0; i < list.length; i++) {
-    map[list[i]] = true
+    map[list[i]] = true;
   }
-  return expectsLowerCase
-    ? val => map[val.toLowerCase()]
-    : val => map[val]
+  return expectsLowerCase ? (val) => map[val.toLowerCase()] : (val) => map[val];
 }
 
-export const exportDefault = 'export default '
+export const exportDefault = "export default ";
 
 export const beautifierConf = {
   html: {
-    indent_size: '2',
-    indent_char: ' ',
-    max_preserve_newlines: '-1',
+    indent_size: "2",
+    indent_char: " ",
+    max_preserve_newlines: "-1",
     preserve_newlines: false,
     keep_array_indentation: false,
     break_chained_methods: false,
-    indent_scripts: 'separate',
-    brace_style: 'end-expand',
+    indent_scripts: "separate",
+    brace_style: "end-expand",
     space_before_conditional: true,
     unescape_strings: false,
     jslint_happy: false,
     end_with_newline: true,
-    wrap_line_length: '110',
+    wrap_line_length: "110",
     indent_inner_html: true,
     comma_first: false,
     e4x: true,
-    indent_empty_lines: true
+    indent_empty_lines: true,
   },
   js: {
-    indent_size: '2',
-    indent_char: ' ',
-    max_preserve_newlines: '-1',
+    indent_size: "2",
+    indent_char: " ",
+    max_preserve_newlines: "-1",
     preserve_newlines: false,
     keep_array_indentation: false,
     break_chained_methods: false,
-    indent_scripts: 'normal',
-    brace_style: 'end-expand',
+    indent_scripts: "normal",
+    brace_style: "end-expand",
     space_before_conditional: true,
     unescape_strings: false,
     jslint_happy: true,
     end_with_newline: true,
-    wrap_line_length: '110',
+    wrap_line_length: "110",
     indent_inner_html: true,
     comma_first: false,
     e4x: true,
-    indent_empty_lines: true
-  }
-}
+    indent_empty_lines: true,
+  },
+};
 
 // 棣栧瓧姣嶅ぇ灏�
 export function titleCase(str) {
-  return str.replace(/( |^)[a-z]/g, L => L.toUpperCase())
+  return str.replace(/( |^)[a-z]/g, (L) => L.toUpperCase());
 }
 
 // 涓嬪垝杞┘宄�
 export function camelCase(str) {
-  return str.replace(/_[a-z]/g, str1 => str1.substr(-1).toUpperCase())
+  return str.replace(/_[a-z]/g, (str1) => str1.substr(-1).toUpperCase());
 }
 
 export function isNumberStr(str) {
-  return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str)
+  return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(str);
 }
 
+// 淇瀛楀吀缁撴瀯
+export function dictToValue(arr) {
+  return arr.map((m) => {
+    return {
+      value: m.dictValue,
+      label: m.dictLabel,
+      type: m.listClass,
+    };
+  });
+}
diff --git a/src/views/business/inspectionTask/components/EditInspectionItem.vue b/src/views/business/inspectionTask/components/EditInspectionItem.vue
index 9058ff0..78d3735 100644
--- a/src/views/business/inspectionTask/components/EditInspectionItem.vue
+++ b/src/views/business/inspectionTask/components/EditInspectionItem.vue
@@ -38,10 +38,10 @@
             style="width: 100%"
           >
             <el-option
-              v-for="item in inspectionValueTypeList"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
+              v-for="dict in dict.type.inspection_value_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -73,11 +73,11 @@
   data() {
     // 杩欓噷瀛樻斁鏁版嵁
     return {
+      dicts: ["inspection_value_type"],
       editInspectionDia: false,
       entity: {
         id: 0,
       },
-      inspectionValueTypeList: [], // 妫�楠屽�肩被鍨嬩笅鎷夋
       editColumn: [
         {
           label: "鏍峰搧缂栧彿",
@@ -193,7 +193,6 @@
     // 淇敼寮规
     editIns(row) {
       this.editAskDia = true;
-      this.selectEnumByCategoryForInspectionValueType();
       this.editForm = { ...row };
     },
     // 鎻愪氦淇敼
@@ -222,15 +221,6 @@
       this.page.current = page;
       this.page.size = limit;
       this.getTableData();
-    },
-    selectEnumByCategoryForInspectionValueType() {
-      this.$axios
-        .post(this.$api.enums.selectEnumByCategory, {
-          category: "妫�楠屽�肩被鍨�",
-        })
-        .then((res) => {
-          this.inspectionValueTypeList = res.data;
-        });
     },
   },
 };
diff --git a/src/views/business/inspectionTask/index.vue b/src/views/business/inspectionTask/index.vue
index 80b4a18..127d5bb 100644
--- a/src/views/business/inspectionTask/index.vue
+++ b/src/views/business/inspectionTask/index.vue
@@ -1,14 +1,10 @@
 <style scoped>
-.ins-order-plan-main .title {
-  font-size: 20px;
-  color: #3a7bfa;
-}
-
 .search {
   background-color: #fff;
-  height: 80px;
+  height: 40px;
   display: flex;
   align-items: center;
+  margin-top: 20px;
 }
 
 .search_thing {
@@ -18,7 +14,7 @@
 }
 
 .search_label {
-  width: 120px;
+  width: 100px;
   font-size: 14px;
   text-align: right;
 }
@@ -29,39 +25,27 @@
 
 .ins-order-plan-main .search {
   width: 100%;
-  margin-bottom: 10px;
-  height: 80px;
+  height: 40px;
   background-color: #fff;
   border-radius: 3px;
-}
-
-.search .form-inline {
-  height: 50px;
-  padding-top: 20px;
-  padding-left: 50px;
 }
 
 .ins-order-plan-main .center {
-  width: calc(100% - 40px);
-  height: calc(100% - 60px - 80px - 40px);
   background-color: #fff;
   border-radius: 3px;
   padding: 20px;
-}
-
-.ins-order-plan-main .center .value-table {
-  width: 100%;
-  height: calc(100% - 68px);
+  padding-top: 0px;
 }
 
 .tab {
   list-style-type: none;
   display: flex;
+  padding-left: 6px;
 }
 
 .tab li {
   line-height: 24px;
-  padding: 6px 14px;
+  padding: 4px 10px;
   font-size: 14px;
   color: #333333;
   border: 1px solid #eeeeee;
@@ -102,32 +86,16 @@
 .ins-order-plan-main .el-form-item__label {
   color: #000;
 }
-
-.ins-order-plan-main .el-table th.el-table__cell > .cell {
-  height: 46px;
-  line-height: 30px;
-}
 </style>
 <template>
   <div class="ins-order-plan-main">
     <div v-show="activeFace == 0 && state == 0" style="height: 100%">
-      <p
-        style="
-          font-size: 16px;
-          padding-left: 20px;
-          text-align: left;
-          height: 60px;
-          line-height: 60px;
-        "
-      >
-        妫�楠屼换鍔�
-      </p>
       <div class="search">
         <div class="search_thing">
           <div class="search_label">濮旀墭缂栧彿锛�</div>
           <div class="search_input">
             <el-input
-              v-model="componentData.entity.entrustCode"
+              v-model="queryParams.entrustCode"
               clearable
               placeholder="璇疯緭鍏�"
               size="small"
@@ -139,13 +107,13 @@
           <div class="search_label">妫�楠岀姸鎬侊細</div>
           <div class="search_input">
             <el-select
-              v-model="componentData.entity.insState"
+              v-model="queryParams.insState"
               size="small"
               style="width: 100%"
               @change="refreshTable()"
             >
               <el-option
-                v-for="(a, i) in insStateList"
+                v-for="(a, i) in dict.type.inspection_task_state"
                 :key="i"
                 :label="a.label"
                 :value="a.value"
@@ -153,14 +121,6 @@
             </el-select>
           </div>
         </div>
-        <!--        <div class="search_thing">-->
-        <!--          <div class="search_label">涓嬪崟绫诲埆锛�</div>-->
-        <!--          <div class="search_input">-->
-        <!--            <el-select v-model="componentData.entity.typeSource" clearable size="small" style="width: 100%;" @change="refreshTable()">-->
-        <!--              <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option>-->
-        <!--            </el-select>-->
-        <!--          </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()"
@@ -172,10 +132,8 @@
         <div class="center-options">
           <el-row>
             <el-col :span="21">
-              <div
-                style="display: flex; align-items: center; margin-bottom: 10px"
-              >
-                <span style="margin-right: 8px">璇曢獙瀹ょ绫�:</span>
+              <div style="display: flex; align-items: center">
+                <span style="font-size: 14px">璇曢獙瀹ょ绫�:</span>
                 <ul class="tab">
                   <li
                     v-for="(m, i) in tabList"
@@ -199,14 +157,12 @@
             <el-col :span="3">
               <div class="center-title">
                 <span>鎬昏浠诲姟鏁伴噺:</span>
-                <span v-if="$refs.insOrderPlan != undefined">{{
-                  $refs.insOrderPlan.total
-                }}</span>
+                <span>{{ page.total }}</span>
               </div>
             </el-col>
           </el-row>
         </div>
-        <ValueTable
+        <!-- <ValueTable
           :key="upIndex"
           ref="insOrderPlan"
           :componentData="componentData"
@@ -216,7 +172,15 @@
           :url="$api.insOrderPlan.selectInsOrderPlanList"
           class="value-table"
           @handleInspection="handleInspection"
-        />
+        /> -->
+        <lims-table
+          :tableData="tableData"
+          :column="column"
+          :page="page"
+          :tableLoading="tableLoading"
+          :height="'calc(100vh - 290px)'"
+          @pagination="pagination"
+        ></lims-table>
       </div>
     </div>
     <el-dialog :visible.sync="claimVisible" title="鎻愮ず" width="400px">
@@ -398,12 +362,12 @@
         >
       </span>
     </el-dialog>
-    <un-pass-retest-result
+    <!-- <un-pass-retest-result
       v-if="retestVisible"
       :retestInfo="retestInfo"
       :retestVisible="retestVisible"
       @closeRetestLook="closeRetestLook"
-    ></un-pass-retest-result>
+    ></un-pass-retest-result> -->
     <!--浜т笟閾句俊鎭煡鐪�-->
     <!-- <ShowInfo
       v-if="showInfoDialog"
@@ -422,16 +386,37 @@
 // import Add from "../do/b1-ins-order/add.vue";
 // import ShowInfo from "../do/b1-material-ins-order/showInfo.vue";
 // import CopperOrder from "../do/b1-material-ins-order/copper-order.vue";
+// import UnPassRetestResult from "../do/b1-material-ins-order/unPassRetestResult.vue";
 import EditInspectionItem from "./components/EditInspectionItem.vue";
+import limsTable from "@/components/Table/lims-table.vue";
+import {
+  getRetestResult,
+  claimInsOrderPlan,
+  upPlanUser2,
+  upPlanUser,
+  selectUserCondition,
+  getBindingProductByProductId,
+  getProductTreeByProductId,
+  bindingProductTreeByProductId,
+  delProductTreeByProductId,
+  selectInsOrderPlanList,
+} from "@/api/business/inspectionTask.js";
+import { mapGetters } from "vuex";
 export default {
   components: {
     EditInspectionItem,
     // CopperOrder,
     // ShowInfo,
     ValueTable,
+    limsTable,
     // Inspection,
     // Add,
     // CustomsInspection,
+    // UnPassRetestResult
+  },
+  dicts: ["urgency_level", "inspection_task_state"],
+  computed: {
+    ...mapGetters(["name", "userId"]),
   },
   data() {
     return {
@@ -742,30 +727,212 @@
       isCopper: null,
       bindCurrentInfo: {},
       lookInfo: {},
+      orderTypeList: [
+        {
+          value: "Customer-ordered test",
+          label: "濮旀墭璇曢獙",
+          type: "success",
+          effect: "plain",
+        },
+        {
+          value: "鎶芥",
+          label: "鎶芥",
+          type: "",
+          effect: "plain",
+        },
+        {
+          value: "杩涘巶妫�楠�",
+          label: "杩涘巶妫�楠�",
+          type: "info",
+          effect: "plain",
+        },
+        {
+          value: "Quarterly inspection",
+          label: "瀛e害妫�楠�",
+          type: "warning",
+          effect: "plain",
+        },
+      ],
+      urgencyLevel: [],
+      inspectionTaskState: [],
+      tableData: [],
+      column: [
+        {
+          label: "濮旀墭缂栧彿",
+          prop: "entrustCode",
+          width: "140px",
+          dataType: "link",
+          linkMethod: "selectAllByOne",
+        },
+        { label: "鏍峰搧鍚嶇О", prop: "sample", width: "140px" },
+        {
+          label: "涓嬪崟绫诲埆",
+          prop: "typeSource",
+          dataType: "tag",
+          formatData: (params) => {
+            if (params == 0) {
+              return "鎴愬搧涓嬪崟";
+            } else {
+              return "鍘熸潗鏂欎笅鍗�";
+            }
+          },
+        },
+        { label: "鏍峰搧鍨嬪彿", prop: "sampleModel", width: "120px" },
+        {
+          label: "绱ф�ョ▼搴�",
+          prop: "type",
+          dataType: "tag",
+          formatData: (params) => {
+            return this.urgencyLevel.find((m) => m.value == params).label;
+          },
+        },
+        {
+          label: "妫�楠岀被鍨�",
+          prop: "orderType",
+          dataType: "tag",
+          formatData: (params) => {
+            return this.orderTypeList.find((m) => m.value == params).label;
+          },
+          formatType: (params) => {
+            return this.orderTypeList.find((m) => m.value == params).type;
+          },
+        },
+        {
+          label: "鐘舵��",
+          prop: "insState",
+          dataType: "tag",
+          formatData: (params) => {
+            return this.inspectionTaskState.find((m) => m.value == params)
+              .label;
+          },
+          formatType: (params) => {
+            return this.inspectionTaskState.find((m) => m.value == params).type;
+          },
+        },
+        { label: "妫�楠屼汉", prop: "userName" },
+        { label: "澶嶆牳浜�", prop: "checkName" },
+        { label: "绾﹀畾鏃堕棿", prop: "appointed" },
+        { label: "涓嬪彂鏃堕棿", prop: "sendTime", width: "140px" },
+        { label: "妫�楠屽紑濮嬫椂闂�", prop: "insTime", width: "140px" },
+        { label: "鐞嗙敱", prop: "verifyTell", width: "140px" },
+        {
+          dataType: "action",
+          fixed: "right",
+          label: "鎿嶄綔",
+          width: "260px",
+          operation: [
+            {
+              name: "鏁版嵁鏌ョ湅",
+              type: "text",
+              clickFun: (row) => {
+                this.handleDataLook(row);
+              },
+            },
+            {
+              name: "淇敼妫�楠屽��",
+              type: "text",
+              clickFun: (row) => {
+                this.editInspection(row);
+              },
+              disabled: (row) => {
+                return (
+                  row.userName == null || row.insState == 3 || row.insState == 5
+                );
+              },
+            },
+            {
+              name: "妫�楠�",
+              type: "text",
+              clickFun: (row) => {
+                this.handleInspection(row);
+              },
+              disabled: (row) => {
+                return (
+                  row.userName == null ||
+                  row.insState == 3 ||
+                  row.insState == 5 ||
+                  (row.userName && !row.userName.includes(this.name))
+                );
+              },
+            },
+            {
+              name: "浜ゆ帴",
+              type: "text",
+              clickFun: (row) => {
+                this.handleConnect(row);
+              },
+              disabled: (row) => {
+                return (
+                  row.userName == null ||
+                  row.insState == 5 ||
+                  row.insState == 3 ||
+                  (row.userName && !row.userName.includes(this.name))
+                );
+              },
+            },
+            {
+              name: "鍘熷璁板綍",
+              type: "text",
+              clickFun: (row) => {
+                this.viewInspectInfo(row);
+              },
+            },
+          ],
+        },
+      ],
+      page: {
+        total: 0,
+        size: 10,
+        current: 0,
+      },
+      tableLoading: false,
+      queryParams: {},
     };
   },
   created() {
-    // this.getLaboratoryDicts()
-    this.getTypeDicts();
-    this.getInsStateDicts();
     this.getAuthorizedPerson();
     this.currentTime = getYearAndMonthAndDays();
+    this.getDicts("urgency_level").then((response) => {
+      this.urgencyLevel = this.dictToValue(response.data);
+    });
+    this.getDicts("inspection_task_state").then((response) => {
+      this.inspectionTaskState = this.dictToValue(response.data);
+    });
   },
   mounted() {
-    this.entityCopy = this.HaveJson(this.componentData.entity);
-    let user = JSON.parse(localStorage.getItem("user"));
-    this.componentData.entity.userId = user.userId;
-    this.getPower();
+    this.queryParams.userId = this.userId;
+    // this.getPower();
     this.refreshTable();
   },
   methods: {
+    getList() {
+      this.tableLoading = true;
+      let param = { ...this.queryParams, ...this.page };
+      delete param.total;
+      selectInsOrderPlanList({ ...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();
+    },
     // 淇敼妫�楠屽��
     editInspection(row) {
       this.$refs.editInspectionItem.showDialog(row.id);
     },
     // 鍒锋柊椤甸潰
     refreshView() {
-      this.InspectionKey++;
+      this.getList();
     },
     // 鏁版嵁鏌ョ湅
     handleDataLook(row) {
@@ -775,17 +942,11 @@
     },
     // 鏌ョ湅涓嶅悎鏍煎娴嬬粨鏋�
     getRetestResult(row) {
-      this.$axios
-        .get(
-          this.$api.insOrder.getRetestResult +
-            "?insProductId=" +
-            row.insProductId
-        )
-        .then((res) => {
-          if (res.code == 201) return;
-          this.retestVisible = true;
-          this.retestInfo = res.data;
-        });
+      getRetestResult({ insProductId: row.insProductId }).then((res) => {
+        if (res.code == 201) return;
+        this.retestVisible = true;
+        this.retestInfo = res.data;
+      });
     },
     //
     closeRetestLook() {
@@ -826,15 +987,19 @@
       }
     },
     changeCheckBox(val) {
-      this.componentData.entity.userId = val ? 0 : null;
+      this.queryParams.userId = val ? 0 : null;
       this.refreshTable();
     },
     refresh() {
-      this.componentData.entity = this.HaveJson(this.entityCopy);
-      let user = JSON.parse(localStorage.getItem("user"));
-      this.componentData.entity.userId = user.userId;
+      this.queryParams = {};
+      this.queryParams.userId = this.userId;
       this.alone = true;
       this.refreshTable();
+    },
+    refreshTable(e) {
+      this.page.current = 1;
+      this.queryParams.typeSource = this.tabIndex;
+      this.getList();
     },
     // claimFun(row) {
     // 	if (row) {
@@ -855,12 +1020,7 @@
     },
     confirmClaim() {
       this.loading = true;
-      this.$axios
-        .post(this.$api.insOrderPlan.claimInsOrderPlan, this.sampleUserForm, {
-          headers: {
-            "Content-Type": "application/json",
-          },
-        })
+      claimInsOrderPlan(this.sampleUserForm)
         .then((res) => {
           if (res.code === 200 && res.data) {
             this.loading = false;
@@ -873,10 +1033,6 @@
           console.error(error);
           this.loading = false;
         });
-    },
-    refreshTable(e) {
-      this.componentData.entity.typeSource = this.tabIndex;
-      this.$refs.insOrderPlan.selectList(e);
     },
     changeRowClass({ row, rowIndex }) {
       if (this.currentTime == row.appointed) {
@@ -891,61 +1047,21 @@
         sampleName: null,
         state: null,
       };
-      this.componentData.entity.insState = null;
-      this.componentData.entity.sampleName = null;
+      this.queryParams.insState = null;
+      this.queryParams.sampleName = null;
       this.refreshTable();
     },
     onSubmit() {
-      this.componentData.entity.insState = this.searchForm.state;
-      this.componentData.entity.sampleName = this.searchForm.sampleName;
+      this.queryParams.insState = this.searchForm.state;
+      this.queryParams.sampleName = this.searchForm.sampleName;
       this.$nextTick(() => {
         this.refreshTable();
       });
     },
     handleTab(m, i) {
       this.tabIndex = i;
-      this.componentData.entity.sonLaboratory = "";
+      this.queryParams.sonLaboratory = "";
       this.refreshTable();
-    },
-    getTypeDicts() {
-      this.$axios
-        .post(this.$api.enums.selectEnumByCategory, {
-          category: "绱ф�ョ▼搴�",
-        })
-        .then((res) => {
-          let data = res.data;
-          data.forEach((ele) => {
-            if (ele.value === "0") {
-              ele.type = "success";
-            } else if (ele.value === "1") {
-              ele.type = "warning";
-            } else if (ele.value === "2") {
-              ele.type = "danger";
-            }
-          });
-          this.componentData.tagField.type.select = data;
-        });
-    },
-    getInsStateDicts() {
-      this.$axios
-        .post(this.$api.enums.selectEnumByCategory, {
-          category: "妫�楠屼换鍔$姸鎬�",
-        })
-        .then((res) => {
-          let data = res.data;
-          this.insStateList = data;
-          data.forEach((ele) => {
-            //0:寰呮楠� 1:妫�楠屼腑 2:宸叉楠� 3:寰呭鏍� 4:澶嶆牳鏈�氳繃 5:澶嶆牳閫氳繃
-            if (["2", "5"].includes(ele.value)) {
-              ele.type = "success";
-            } else if (["1", "3"].includes(ele.value)) {
-              ele.type = "warning";
-            } else if (["0", "4"].includes(ele.value)) {
-              ele.type = "danger";
-            }
-          });
-          this.componentData.tagField.insState.select = data;
-        });
     },
     // getLaboratoryDicts() {
     // 	this.$axios.post(this.$api.enums.selectEnumByCategory, {
@@ -985,9 +1101,8 @@
       if (row.userName) {
         inspectorList = row.userName.split(",");
       }
-      let user = JSON.parse(localStorage.getItem("user"));
-      if (user) {
-        inspectorList.push(user.name);
+      if (this.name) {
+        inspectorList.push(this.name);
       }
       this.inspectorList = inspectorList;
       this.sonLaboratory = row.sonLaboratory;
@@ -1002,9 +1117,8 @@
       if (row.userName) {
         inspectorList = row.userName.split(",");
       }
-      let user = JSON.parse(localStorage.getItem("user"));
-      if (user) {
-        inspectorList.push(user.name);
+      if (this.name) {
+        inspectorList.push(this.name);
       }
       this.inspectorList = inspectorList;
       this.sonLaboratory = row.sonLaboratory;
@@ -1016,22 +1130,18 @@
       this.orderId = row.id;
       this.connect = {};
       this.connectVisible = true;
-      this.$axios
-        .post(this.$api.insOrderPlan.upPlanUser2, {
-          orderId: this.orderId,
-        })
-        .then((res) => {
-          if (res.code === 200 && res.data.length > 0) {
-            this.sonLaboratoryList = [];
-            res.data.forEach((m) => {
-              this.sonLaboratoryList.push({
-                value: m,
-                label: m,
-              });
+      upPlanUser2({ orderId: this.orderId }).then((res) => {
+        if (res.code === 200 && res.data.length > 0) {
+          this.sonLaboratoryList = [];
+          res.data.forEach((m) => {
+            this.sonLaboratoryList.push({
+              value: m,
+              label: m,
             });
-            this.connect.sonLaboratory = this.sonLaboratoryList[0].value;
-          }
-        });
+          });
+          this.connect.sonLaboratory = this.sonLaboratoryList[0].value;
+        }
+      });
     },
     confirmConnect() {
       if (
@@ -1051,12 +1161,11 @@
         return;
       }
       this.loading = true;
-      this.$axios
-        .post(this.$api.insOrderPlan.upPlanUser, {
-          orderId: this.orderId,
-          userId: this.connect.connectPerson,
-          sonLaboratory: this.connect.sonLaboratory,
-        })
+      upPlanUser({
+        orderId: this.orderId,
+        userId: this.connect.connectPerson,
+        sonLaboratory: this.connect.sonLaboratory,
+      })
         .then((res) => {
           if (res.code === 200) {
             this.loading = false;
@@ -1075,7 +1184,7 @@
       this.orderId = row.id;
     },
     getAuthorizedPerson() {
-      this.$axios.get(this.$api.user.getUserMenu).then((res) => {
+      selectUserCondition().then((res) => {
         let data = [];
         res.data.forEach((a) => {
           data.push({
@@ -1089,12 +1198,7 @@
     // 缁戝畾妫�楠岄」缁戝畾
     getBinding(row) {
       this.bindCurrentInfo = row;
-      this.$axios
-        .get(
-          this.$api.insOrderPlan.getBindingProductByProductId +
-            "?productId=" +
-            row.insProductId
-        )
+      getBindingProductByProductId({ productId: row.insProductId })
         .then((res) => {
           if (res.coe == 201) {
             // this.$message.error('鏈粦瀹氭楠岄」')
@@ -1109,12 +1213,9 @@
         });
     },
     openBindAdd() {
-      this.$axios
-        .get(
-          this.$api.insOrderPlan.getProductTreeByProductId +
-            "?productId=" +
-            this.bindCurrentInfo.insProductId
-        )
+      getProductTreeByProductId({
+        productId: this.bindCurrentInfo.insProductId,
+      })
         .then((res) => {
           if (res.coe == 201) {
             // this.$message.error('鏈粦瀹氭楠岄」')
@@ -1140,20 +1241,10 @@
         delete item.template;
       });
       this.loading = true;
-      this.$axios
-        .post(
-          this.$api.insOrderPlan.bindingProductTreeByProductId,
-          {
-            insProductId: this.bindCurrentInfo.insProductId,
-            insProductBindingList: this.chooseBindAddList,
-          },
-          {
-            headers: {
-              "Content-Type": "application/json",
-            },
-            noQs: true,
-          }
-        )
+      bindingProductTreeByProductId({
+        insProductId: this.bindCurrentInfo.insProductId,
+        insProductBindingList: this.chooseBindAddList,
+      })
         .then((res) => {
           this.loading = false;
           if (res.code == 201) {
@@ -1174,12 +1265,7 @@
         cancelButtonText: "鍙栨秷",
         type: "warning",
       }).then(async () => {
-        this.$axios
-          .get(
-            this.$api.insOrderPlan.delProductTreeByProductId +
-              "?productId=" +
-              row.id
-          )
+        delProductTreeByProductId({ productId: row.id })
           .then((res) => {
             if (res.coe == 201) {
               // this.$message.error('鏈粦瀹氭楠岄」')
diff --git a/src/views/performance/manHour/workTimeConfig.vue b/src/views/performance/manHour/workTimeConfig.vue
index 83dcc11..ff79cc8 100644
--- a/src/views/performance/manHour/workTimeConfig.vue
+++ b/src/views/performance/manHour/workTimeConfig.vue
@@ -172,7 +172,6 @@
 </template>
 
 <script>
-import ValueTable from "@/components/Table/value-table.vue";
 import limsTable from "@/components/Table/lims-table.vue";
 import {
   selectAuxiliaryWorkingHours,
@@ -183,7 +182,6 @@
 } from "@/api/performance/manHour";
 export default {
   components: {
-    ValueTable,
     limsTable,
   },
   dicts: ["sys_unit"],

--
Gitblit v1.9.3