| src/api/business/insBushing.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/api/standard/standardLibrary.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/api/system/user.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/assets/styles/element-ui.scss | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/components/Table/lims-table.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/layout/components/Navbar.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/layout/components/TagsView/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/router/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/store/getters.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/store/modules/user.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/CNAS/resourceDemand/device/component/management.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/business/inspectionOrder/add.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| src/views/business/inspectionOrder/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/business/insBushing.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ import request from '@/utils/request' // æ¥çæå±å使£éªå export function selectBushingBySampleId(query) { return request({ url: '/insBushing/selectBushingBySampleId', method: 'get', params: query }) } src/api/standard/standardLibrary.js
@@ -99,6 +99,15 @@ }); } // éè¿æ åæ æ¥è¯¢å¯¹åºçæ£éªé¡¹ç® export function selectStandardProductList(query) { return request({ url: "/standardTree/selectStandardProductList", method: "get", params: query, }); } // æ¥è¯¢åå§è®°å½æ¨¡æ¿æä¸¾ export function getStandardTemplate(query) { return request({ @@ -134,3 +143,19 @@ params: query, }); } // è·åæ åæ ä¸æ åæ¹æ³æä¸¾ export function selectStandardMethodEnum() { return request({ url: "/standardTree/selectStandardMethodEnum", method: "get", }); } // è·åæ åæ (æ£éªä¸å) export function selectStandardTreeList2() { return request({ url: "/standardTree/selectStandardTreeList2", method: "get", }); } src/api/system/user.js
@@ -185,9 +185,17 @@ } // è·åå½åç»å½äººåé¨é¨ export function selectUserDepartmentLimsName(query) { export function selectUserDepartmentLimsName() { return request({ url: "/system/newUser/selectUserDepartmentLimsName", method: "get", }); } // è·åå®éªå®¤ä¸çæ£éªåå表 export function getLaboratoryPersonList() { return request({ url: "/system/newUser/getLaboratoryPersonList", method: "get", }); } src/assets/styles/element-ui.scss
@@ -90,3 +90,47 @@ .el-submenu__icon-arrow { display: none; } /* å ¨å±è¡¨æ ¼æ ·å¼ */ .el-table th.el-table__cell, .has-gutter .el-table__cell { background-color: #f0f1f5 !important; color: #333; } /* è¡¨æ ¼è¡éä¸èæ¯è² */ .el-table__body tr.current-row>td.el-table__cell, .el-table__body tr.selection-row>td.el-table__cell { background-color: #c1ddf1; } .el-table__header .has-gutter .el-table__cell .cell { font-size: 14px !important; font-weight: 500; } .cell { color: #333; padding: 0 15px !important; font-size: 12px; } .cell span { font-size: 12px; font-weight: 400; } .el-table .el-table__cell { padding: 0 0; } .el-table .el-table__row { height: 41px; } .el-table th.el-table__cell>.cell { font-size: 14px; font-weight: 400; color: #333; padding: 6px 15px !important; } src/components/Table/lims-table.vue
@@ -13,7 +13,7 @@ :row-style="rowStyle" :row-key="rowKey" :span-method="spanMethod" stripe :stripe="stripe" style="width: 100%" tooltip-effect="dark" @row-click="rowClick" @@ -217,11 +217,13 @@ <!-- å¯ç¹å»çæå --> <div v-else-if="item.dataType == 'link'" class="cell link" class="cell" style="width: 100%" @click="goLink(scope.row, item.linkMethod)" @click="goLink(scope.row, item.linkEvent)" > <span v-if="!item.formatData">{{ scope.row[item.prop] }}</span> <span class="link" v-if="!item.formatData"> {{ scope.row[item.prop] }} </span> </div> <!-- é»è®¤çº¯å±ç¤ºæ°æ® --> <div v-else class="cell" style="width: 100%"> @@ -354,6 +356,10 @@ type: Boolean, default: false, }, stripe: { type: Boolean, default: false, }, headerCellStyle: { type: Object, default: () => { @@ -470,11 +476,11 @@ return (this.page.current - 1) * this.page.size + index + 1; }, // ç¹å»åå æ ¼linkäºä»¶ goLink(row, linkMethod) { if (!linkMethod) { goLink(row, linkEvent) { if (!linkEvent) { return this.$message.warning("请é ç½®lingkäºä»¶"); } this.$parent[linkMethod](row); linkEvent.vueComponent[linkEvent.method](row); }, // åå¹¶åå æ ¼ calculateSpanInfo() { src/layout/components/Navbar.vue
@@ -10,7 +10,8 @@ </div> <div class="right-menu"> <div class="avatar-wrapper"> <img :src="avatar" class="user-avatar" /> <!-- <img :src="avatar" class="user-avatar" /> --> <el-avatar :size="28">{{ nickName.substring(0, 1) }}</el-avatar> <span class="userName">{{ nickName }}</span> <img class="logoout" src/layout/components/TagsView/index.vue
@@ -1,7 +1,16 @@ <template> <div id="tags-view-container" class="tags-view-container"> <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll"> <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll" > <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" /> <router-link v-for="tag in visitedViews" ref="tag" @@ -15,23 +24,43 @@ @contextmenu.prevent.native="openMenu(tag,$event)" > {{ tag.title }} <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" /> <span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" /> </router-link> </scroll-pane> <ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu"> <li @click="refreshSelectedTag(selectedTag)"><i class="el-icon-refresh-right"></i> å·æ°é¡µé¢</li> <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"><i class="el-icon-close"></i> å ³éå½å</li> <li @click="closeOthersTags"><i class="el-icon-circle-close"></i> å ³éå ¶ä»</li> <li v-if="!isFirstView()" @click="closeLeftTags"><i class="el-icon-back"></i> å ³é左侧</li> <li v-if="!isLastView()" @click="closeRightTags"><i class="el-icon-right"></i> å ³éå³ä¾§</li> <li @click="closeAllTags(selectedTag)"><i class="el-icon-circle-close"></i> å ¨é¨å ³é</li> <ul v-show="visible" :style="{ left: left + 'px', top: top + 'px' }" class="contextmenu" > <li @click="refreshSelectedTag(selectedTag)"> <i class="el-icon-refresh-right"></i> å·æ°é¡µé¢ </li> <li v-if="!isAffix(selectedTag)" @click="closeSelectedTag(selectedTag)"> <i class="el-icon-close"></i> å ³éå½å </li> <li @click="closeOthersTags"> <i class="el-icon-circle-close"></i> å ³éå ¶ä» </li> <li v-if="!isFirstView()" @click="closeLeftTags"> <i class="el-icon-back"></i> å ³é左侧 </li> <li v-if="!isLastView()" @click="closeRightTags"> <i class="el-icon-right"></i> å ³éå³ä¾§ </li> <li @click="closeAllTags(selectedTag)"> <i class="el-icon-circle-close"></i> å ¨é¨å ³é </li> </ul> </div> </template> <script> import ScrollPane from './ScrollPane' import path from 'path' import ScrollPane from "./ScrollPane"; import path from "path"; import Hamburger from "@/components/Hamburger/index.vue"; import {mapGetters} from "vuex"; @@ -43,203 +72,207 @@ top: 0, left: 0, selectedTag: {}, affixTags: [] } affixTags: [], }; }, computed: { ...mapGetters([ 'sidebar', ]), ...mapGetters(["sidebar"]), visitedViews() { return this.$store.state.tagsView.visitedViews return this.$store.state.tagsView.visitedViews; }, routes() { return this.$store.state.permission.routes return this.$store.state.permission.routes; }, theme() { return this.$store.state.settings.theme; } }, }, watch: { $route() { this.addTags() this.moveToCurrentTag() this.addTags(); this.moveToCurrentTag(); }, visible(value) { if (value) { document.body.addEventListener('click', this.closeMenu) document.body.addEventListener("click", this.closeMenu); } else { document.body.removeEventListener('click', this.closeMenu) } document.body.removeEventListener("click", this.closeMenu); } }, }, mounted() { this.initTags() this.addTags() this.initTags(); this.addTags(); }, methods: { toggleSideBar() { this.$store.dispatch('app/toggleSideBar') this.$store.dispatch("app/toggleSideBar"); }, isActive(route) { return route.path === this.$route.path return route.path === this.$route.path; }, activeStyle(tag) { if (!this.isActive(tag)) return {}; return { "background-color": this.theme, "border-color": this.theme "border-color": this.theme, }; }, isAffix(tag) { return tag.meta && tag.meta.affix return tag.meta && tag.meta.affix; }, isFirstView() { try { return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath return ( this.selectedTag.fullPath === "/index" || this.selectedTag.fullPath === this.visitedViews[1].fullPath ); } catch (err) { return false return false; } }, isLastView() { try { return this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath return ( this.selectedTag.fullPath === this.visitedViews[this.visitedViews.length - 1].fullPath ); } catch (err) { return false return false; } }, filterAffixTags(routes, basePath = '/') { let tags = [] routes.forEach(route => { filterAffixTags(routes, basePath = "/") { let tags = []; routes.forEach((route) => { if (route.meta && route.meta.affix) { const tagPath = path.resolve(basePath, route.path) const tagPath = path.resolve(basePath, route.path); tags.push({ fullPath: tagPath, path: tagPath, name: route.name, meta: { ...route.meta } }) meta: { ...route.meta }, }); } if (route.children) { const tempTags = this.filterAffixTags(route.children, route.path) const tempTags = this.filterAffixTags(route.children, route.path); if (tempTags.length >= 1) { tags = [...tags, ...tempTags] tags = [...tags, ...tempTags]; } } }) return tags }); return tags; }, initTags() { const affixTags = this.affixTags = this.filterAffixTags(this.routes) const affixTags = (this.affixTags = this.filterAffixTags(this.routes)); for (const tag of affixTags) { // Must have tag name if (tag.name) { this.$store.dispatch('tagsView/addVisitedView', tag) this.$store.dispatch("tagsView/addVisitedView", tag); } } }, addTags() { const { name } = this.$route const { name } = this.$route; if (name) { this.$store.dispatch('tagsView/addView', this.$route) this.$store.dispatch("tagsView/addView", this.$route); } }, moveToCurrentTag() { const tags = this.$refs.tag const tags = this.$refs.tag; this.$nextTick(() => { for (const tag of tags) { if (tag.to.path === this.$route.path) { this.$refs.scrollPane.moveToTarget(tag) this.$refs.scrollPane.moveToTarget(tag); // when query is different then update if (tag.to.fullPath !== this.$route.fullPath) { this.$store.dispatch('tagsView/updateVisitedView', this.$route) this.$store.dispatch("tagsView/updateVisitedView", this.$route); } break break; } } }) }); }, refreshSelectedTag(view) { this.$tab.refreshPage(view); if (this.$route.meta.link) { this.$store.dispatch('tagsView/delIframeView', this.$route) this.$store.dispatch("tagsView/delIframeView", this.$route); } }, closeSelectedTag(view) { this.$tab.closePage(view).then(({ visitedViews }) => { if (this.isActive(view)) { this.toLastView(visitedViews, view) this.toLastView(visitedViews, view); } }) }); }, closeRightTags() { this.$tab.closeRightPage(this.selectedTag).then(visitedViews => { if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) { this.toLastView(visitedViews) this.$tab.closeRightPage(this.selectedTag).then((visitedViews) => { if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) { this.toLastView(visitedViews); } }) }); }, closeLeftTags() { this.$tab.closeLeftPage(this.selectedTag).then(visitedViews => { if (!visitedViews.find(i => i.fullPath === this.$route.fullPath)) { this.toLastView(visitedViews) this.$tab.closeLeftPage(this.selectedTag).then((visitedViews) => { if (!visitedViews.find((i) => i.fullPath === this.$route.fullPath)) { this.toLastView(visitedViews); } }) }); }, closeOthersTags() { this.$router.push(this.selectedTag.fullPath).catch(()=>{}); this.$tab.closeOtherPage(this.selectedTag).then(() => { this.moveToCurrentTag() }) this.moveToCurrentTag(); }); }, closeAllTags(view) { this.$tab.closeAllPage().then(({ visitedViews }) => { if (this.affixTags.some(tag => tag.path === this.$route.path)) { return if (this.affixTags.some((tag) => tag.path === this.$route.path)) { return; } this.toLastView(visitedViews, view) }) this.toLastView(visitedViews, view); }); }, toLastView(visitedViews, view) { const latestView = visitedViews.slice(-1)[0] const latestView = visitedViews.slice(-1)[0]; if (latestView) { this.$router.push(latestView.fullPath) this.$router.push(latestView.fullPath); } else { // now the default is to redirect to the home page if there is no tags-view, // you can adjust it according to your needs. if (view.name === 'Dashboard') { if (view.name === "Dashboard") { // to reload home page this.$router.replace({ path: '/redirect' + view.fullPath }) this.$router.replace({ path: "/redirect" + view.fullPath }); } else { this.$router.push('/') this.$router.push("/"); } } }, openMenu(tag, e) { const menuMinWidth = 105 const offsetLeft = this.$el.getBoundingClientRect().left // container margin left const offsetWidth = this.$el.offsetWidth // container width const maxLeft = offsetWidth - menuMinWidth // left boundary const left = e.clientX - offsetLeft + 15 // 15: margin right const menuMinWidth = 105; const offsetLeft = this.$el.getBoundingClientRect().left; // container margin left const offsetWidth = this.$el.offsetWidth; // container width const maxLeft = offsetWidth - menuMinWidth; // left boundary const left = e.clientX - offsetLeft + 15; // 15: margin right if (left > maxLeft) { this.left = maxLeft this.left = maxLeft; } else { this.left = left this.left = left; } this.top = e.clientY this.visible = true this.selectedTag = tag this.top = e.clientY; this.visible = true; this.selectedTag = tag; }, closeMenu() { this.visible = false this.visible = false; }, handleScroll() { this.closeMenu() } } } this.closeMenu(); }, }, }; </script> <style lang="scss" scoped> @@ -251,19 +284,19 @@ z-index: 1000; /* ç¡®ä¿å¤´é¨å¨å ¶ä»å 容ä¹ä¸ */ background: #fff; border-bottom: 1px solid #d8dce5; box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04); .tags-view-wrapper { .hamburger-container { display: inline-block; line-height: 46px; height: 100%; cursor: pointer; transition: background .3s; transition: background 0.3s; -webkit-tap-highlight-color:transparent; padding: 0 10px !important; &:hover { background: rgba(0, 0, 0, .025) background: rgba(0, 0, 0, 0.025); } } .tags-view-item { @@ -290,7 +323,7 @@ color: #fff; border-color: #42b983; &::before { content: ''; content: ""; background: #fff; display: inline-block; width: 8px; @@ -303,7 +336,7 @@ } } .contextmenu { margin: 0; margin: -20px; background: #fff; z-index: 3000; position: absolute; @@ -313,7 +346,7 @@ font-size: 12px; font-weight: 400; color: #333; box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3); box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3); li { margin: 0; padding: 7px 16px; @@ -336,10 +369,10 @@ vertical-align: 2px; border-radius: 50%; text-align: center; transition: all .3s cubic-bezier(.645, .045, .355, 1); transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); transform-origin: 100% 50%; &:before { transform: scale(.6); transform: scale(0.6); display: inline-block; vertical-align: -3px; } src/router/index.js
@@ -100,11 +100,18 @@ permissions: ['business:order'], children: [ { // éææä¸å // æ°å¢å§æåé¡µé¢ path: 'addOrder', component: () => import('@/views/business/inspectionOrder/add'), name: 'addOrder', meta: { title: 'æ°å¢å§æå', activeMenu: '/business/inspectionOrder' } }, { // æ¥çå§æå详æ é¡µé¢ path: 'showDetails', component: () => import('@/views/business/inspectionOrder/add'), name: 'showDetails', meta: { title: 'å§æå详æ ', activeMenu: '/business/inspectionOrder' } } ] }, src/store/getters.js
@@ -9,6 +9,8 @@ avatar: (state) => state.user.avatar, name: (state) => state.user.name, nickName: (state) => state.user.nickName, companyName: (state) => state.user.companyName, loginUserInfo: (state) => state.user.loginUserInfo, userId: (state) => state.user.id, introduction: (state) => state.user.introduction, roles: (state) => state.user.roles, src/store/modules/user.js
@@ -11,6 +11,8 @@ name: "", avatar: "", nickName: "", companyName: "", loginUserInfo: {}, roles: [], permissions: [], }, @@ -30,6 +32,12 @@ }, SET_NICKNAME: (state, nickName) => { state.nickName = nickName; }, SET_COMPANYNAME: (state, companyName) => { state.companyName = companyName; }, SET_LOGINUSERINFO: (state, loginUserInfo) => { state.loginUserInfo = loginUserInfo; }, SET_ROLES: (state, roles) => { state.roles = roles; @@ -67,7 +75,6 @@ return new Promise((resolve, reject) => { getInfo() .then((res) => { console.log("store-->",res); const user = res.user; let avatar = user.avatar || ""; if (!isHttp(avatar)) { @@ -82,10 +89,12 @@ } else { commit("SET_ROLES", ["ROLE_DEFAULT"]); } commit("SET_LOGINUSERINFO", user); commit("SET_ID", user.userId); commit("SET_NAME", user.userName); commit("SET_AVATAR", avatar); commit("SET_NICKNAME", user.nickName); commit("SET_COMPANYNAME", user.companyName); resolve(res); }) .catch((error) => { src/views/CNAS/resourceDemand/device/component/management.vue
@@ -4,175 +4,375 @@ <div class="search" v-show="!showData"> <div class="search_thing"> <div class="search_label">ç¶æï¼</div> <el-select v-model="queryParams.deviceStatus" placeholder="å ¨é¨" size="small"> <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value"> <el-select v-model="queryParams.deviceStatus" placeholder="å ¨é¨" size="small" > <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </div> <div class="search_thing"> <div class="search_label">设å¤åç§°ï¼</div> <div class="search_input"> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="queryParams.deviceName" @keyup.enter.native="refreshTable()"> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="queryParams.deviceName" @keyup.enter.native="refreshTable()" > </el-input> </div> </div> <div class="search_thing"> <div class="search_label">è§æ ¼åå·ï¼</div> <div class="search_input"><el-input size="small" placeholder="请è¾å ¥" clearable v-model="queryParams.specificationModel" @keyup.enter.native="refreshTable()"></el-input> <div class="search_input"> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="queryParams.specificationModel" @keyup.enter.native="refreshTable()" ></el-input> </div> </div> <div style="padding-left: 30px;"> <div style="padding-left: 30px"> <el-button size="small" @click="refresh()">é ç½®</el-button> <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> <el-button size="small" type="primary" @click="dialogVisible2 = true">æ° å¢</el-button> <el-button size="small" type="primary" @click="handleDownOne">导 åº</el-button> <el-button size="small" type="primary" @click="refreshTable()" >æ¥ è¯¢</el-button > <el-button size="small" type="primary" @click="dialogVisible2 = true" >æ° å¢</el-button > <el-button size="small" type="primary" @click="handleDownOne" >导 åº</el-button > </div> </div> <div class="table" v-show="!showData"> <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 320px)'" :page="page" @pagination="pagination"></lims-table> <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 320px)'" :page="page" @pagination="pagination" ></lims-table> </div> <el-dialog :title="isUp ? '设å¤è¯¦æ ' : 'æ¡£æ¡ä¿®è®¢'" :visible.sync="dialogVisible" width="70%" <el-dialog :title="isUp ? '设å¤è¯¦æ ' : 'æ¡£æ¡ä¿®è®¢'" :visible.sync="dialogVisible" width="70%" top="5vh" :before-close="handleClose"> <el-row style="display:flex;justify-content: space-around;"> :before-close="handleClose" > <el-row style="display: flex; justify-content: space-around"> <!-- 左边å¸å± --> <el-col :span="7"> <el-col> <!-- å¾ç --> <el-image class="img" style="width:100%;height: 320px;marginBottom:16px" :src="javaApi + '/img/' + formData.imageUpload"> <div slot="error" class="image-error" style="width: calc(100% -2px); <el-image class="img" style="width: 100%; height: 320px; marginbottom: 16px" :src="javaApi + '/img/' + formData.imageUpload" > <div slot="error" class="image-error" style=" width: calc(100% -2px); height: 318px; border-radius: 16px; display: flex; align-items: center; justify-content: center; border: 1px solid #EEEEEE;"> <i class="el-icon-picture-outline" style="font-size:60px;color:#666666;"></i> border: 1px solid #eeeeee; " > <i class="el-icon-picture-outline" style="font-size: 60px; color: #666666" ></i> </div> </el-image> <!-- 表å --> <el-form :label-position="labelPosition" :model="formData" label-width="120px"> <el-form :label-position="labelPosition" :model="formData" label-width="120px" > <el-form-item label="仪å¨åç§°:" required> <el-input :disabled="isUp" v-model="formData.deviceName" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.deviceName" size="small" ></el-input> </el-form-item> <el-form-item label="仪å¨åç§°EN:" required> <el-input :disabled="isUp" v-model="formData.enDeviceName" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.enDeviceName" size="small" ></el-input> </el-form-item> <el-form-item label="è§æ ¼åå·:" required> <el-input :disabled="isUp" v-model="formData.specificationModel" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.specificationModel" size="small" ></el-input> </el-form-item> <el-form-item label="ç产åå®¶:"> <el-input :disabled="isUp" v-model="formData.manufacturer" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.manufacturer" size="small" ></el-input> </el-form-item> </el-form> </el-col> </el-col> <!-- ä¸é´å¸å± --> <el-col :span="7"> <el-form :label-position="labelPosition" :model="formData" label-width="116px"> <el-form :label-position="labelPosition" :model="formData" label-width="116px" > <el-form-item label="æ ¡åæå¡æºæ:"> <el-input disabled v-model="formData.calibrationServices" size="small"></el-input> <el-input disabled v-model="formData.calibrationServices" size="small" ></el-input> </el-form-item> <el-form-item label="åºåç¼å·:"> <el-input :disabled="isUp" v-model="formData.factoryNo" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.factoryNo" size="small" ></el-input> </el-form-item> <el-form-item label="管çç¼å·:" required> <el-input :disabled="isUp" v-model="formData.managementNumber" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.managementNumber" size="small" ></el-input> </el-form-item> <el-form-item label="è´ç½®æ¥æ:"> <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.acquisitionDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ"> <el-date-picker :disabled="isUp" style="width: 100%" v-model="formData.acquisitionDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ" > </el-date-picker> </el-form-item> <el-form-item label="å¯ç¨æ¥æ:" required> <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.activationDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ"> <el-date-picker :disabled="isUp" style="width: 100%" v-model="formData.activationDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ" > </el-date-picker> </el-form-item> <el-form-item label="管ç人:"> <el-select v-model="formData.equipmentManager" placeholder="è¯·éæ©" size="small" style="width:100%"> <el-option :disabled="isUp" v-for="item in responsiblePersonList" :key="item.value" :label="item.label" :value="item.value"> <el-select v-model="formData.equipmentManager" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option :disabled="isUp" v-for="item in responsiblePersonList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> <el-form-item label="åæ¾ç¹:"> <el-input :disabled="isUp" v-model="formData.storagePoint" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.storagePoint" size="small" ></el-input> </el-form-item> <el-form-item label="ææ¯ææ :"> <el-input :disabled="isUp" v-model="formData.technicalIndicators" :rows="7" type="textarea" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.technicalIndicators" :rows="7" type="textarea" size="small" ></el-input> </el-form-item> </el-form> </el-col> <!-- å³è¾¹å¸å± --> <el-col :span="7"> <el-form :label-position="labelPosition" :model="formData" label-width="140px" ref="ruleForm"> <el-form :label-position="labelPosition" :model="formData" label-width="140px" ref="ruleForm" > <!-- å®éªå®¤å表 --> <el-form-item label="æå±é¨é¨:"> <el-select :disabled="isUp" v-model="formData.subordinateDepartmentsId" placeholder="è¯·éæ©" size="small" style="width:100%"> <el-option v-for="item in subordinateDepartmentsList" :key="item.value" :label="item.label" :value="item.value"> <el-select :disabled="isUp" v-model="formData.subordinateDepartmentsId" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="item in subordinateDepartmentsList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> <el-form-item label="æ£æµé¡¹ç®:"> <el-cascader :disabled="isUp" v-model="formData.insProductIds" :options="options" :show-all-levels="false" :props="props" placeholder="è¯·éæ©" size="small" style="width:100%;" :collapse-tags="!isUp" separator="," filterable clearable></el-cascader> <el-cascader :disabled="isUp" v-model="formData.insProductIds" :options="options" :show-all-levels="false" :props="props" placeholder="è¯·éæ©" size="small" style="width: 100%" :collapse-tags="!isUp" separator="," filterable clearable ></el-cascader> </el-form-item> <el-form-item label="æè¿æ ¡åæ¥æ:" v-if="isUp"> <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.latestTraceability" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" size="small" placeholder="éæ©æ¥æ"> <el-date-picker :disabled="isUp" style="width: 100%" v-model="formData.latestTraceability" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" size="small" placeholder="éæ©æ¥æ" > </el-date-picker> </el-form-item> <el-form-item label="䏿¬¡æ ¡åæ¥æ:" v-if="isUp"> <el-date-picker :disabled="isUp" style="width:100%" v-model="formData.latestTraceability" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" size="small" placeholder="éæ©æ¥æ"> <el-date-picker :disabled="isUp" style="width: 100%" v-model="formData.latestTraceability" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="date" size="small" placeholder="éæ©æ¥æ" > </el-date-picker> </el-form-item> <el-form-item label="设å¤ç±»å:"> <el-select :disabled="isUp" v-model="formData.largeCategory" placeholder="è¯·éæ©" size="small" style="width:100%"> <el-option v-for="item in equipmentList" :key="item.value" :label="item.label" :value="item.value"> <el-select :disabled="isUp" v-model="formData.largeCategory" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="item in equipmentList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> <el-form-item label="åä»·(ä¸å ):"> <el-input :disabled="isUp" v-model="formData.unitPrice" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.unitPrice" size="small" ></el-input> </el-form-item> <el-form-item label="å½åç¶æ:" required> <el-select :disabled="isUp" v-model="formData.deviceStatus" placeholder="è¯·éæ©" size="small" style="width:100%"> <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value"> <el-select :disabled="isUp" v-model="formData.deviceStatus" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="item in deviceStatusList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> <el-form-item label="æ ¡åå¨æï¼æï¼:" required> <el-input :disabled="isUp" v-model="formData.calibrationDate" size="small"></el-input> <el-input :disabled="isUp" v-model="formData.calibrationDate" size="small" ></el-input> </el-form-item> <el-form-item label="å¾ç:"> <div style="border: 1px solid #DCDFE6;border-radius:4px;height:32px;lineHeight:32px;display:flex;justify-content: space-around;font-size: 13px;"> <div v-show="formData.imageName" class="picName">{{ formData.imageName }}</div> <el-upload :disabled="isUp" :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false" accept='image/jpg,image/jpeg,image/png' :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'> <el-button type="text" style="height:30px;padding-top:8px">ä¸ä¼ </el-button> style=" border: 1px solid #dcdfe6; border-radius: 4px; height: 32px; lineheight: 32px; display: flex; justify-content: space-around; font-size: 13px; " > <div v-show="formData.imageName" class="picName"> {{ formData.imageName }} </div> <el-upload :disabled="isUp" :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false" accept="image/jpg,image/jpeg,image/png" :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref="upload" > <el-button type="text" style="height: 30px; padding-top: 8px" >ä¸ä¼ </el-button > </el-upload> </div> </el-form-item> @@ -182,110 +382,216 @@ <span slot="footer" class="dialog-footer"> <el-row v-if="!isUp"> <el-button @click="handleClose">å æ¶</el-button> <el-button type="primary" @click="submitForm" :loading="upLoad">ç¡® å®</el-button> <el-button type="primary" @click="submitForm" :loading="upLoad" >ç¡® å®</el-button > </el-row> </span> </el-dialog> <!-- æ°å¢--> <el-dialog title="æ°å¢è®¾å¤" top="5vh" :visible.sync="dialogVisible2" width="70%" :before-close="handleClose2"> <el-row style="display:flex;justify-content: space-around;"> <el-dialog title="æ°å¢è®¾å¤" top="5vh" :visible.sync="dialogVisible2" width="70%" :before-close="handleClose2" > <el-row style="display: flex; justify-content: space-around"> <!-- 左边å¸å± --> <el-col :span="7"> <el-col> <!-- å¾ç --> <el-image class="img" style="width:100%;height: 320px;margin-bottom:16px" :src="javaApi + '/img/' + formData2.imageUpload"> <div slot="error" class="image-error" style="width: calc(100% -2px); <el-image class="img" style="width: 100%; height: 320px; margin-bottom: 16px" :src="javaApi + '/img/' + formData2.imageUpload" > <div slot="error" class="image-error" style=" width: calc(100% -2px); height: 318px; border-radius: 16px; display: flex; align-items: center; justify-content: center; border: 1px solid #EEEEEE;"> <i class="el-icon-picture-outline" style="font-size:60px;color:#666666;"></i> border: 1px solid #eeeeee; " > <i class="el-icon-picture-outline" style="font-size: 60px; color: #666666" ></i> </div> </el-image> <!-- 表å --> <el-form :label-position="labelPosition" :model="formData2" label-width="120px"> <el-form :label-position="labelPosition" :model="formData2" label-width="120px" > <el-form-item label="仪å¨åç§°:" required> <el-input v-model="formData2.deviceName" size="small"></el-input> <el-input v-model="formData2.deviceName" size="small" ></el-input> </el-form-item> <el-form-item label="仪å¨åç§°EN:" required> <el-input v-model="formData2.enDeviceName" size="small"></el-input> <el-input v-model="formData2.enDeviceName" size="small" ></el-input> </el-form-item> <el-form-item label="è§æ ¼åå·:" required> <el-input v-model="formData2.specificationModel" size="small"></el-input> <el-input v-model="formData2.specificationModel" size="small" ></el-input> </el-form-item> <el-form-item label="ç产åå®¶:"> <el-input v-model="formData2.manufacturer" size="small"></el-input> <el-input v-model="formData2.manufacturer" size="small" ></el-input> </el-form-item> </el-form> </el-col> </el-col> <!-- ä¸é´å¸å± --> <el-col :span="7"> <el-form :label-position="labelPosition" :model="formData2" label-width="110px"> <el-form :label-position="labelPosition" :model="formData2" label-width="110px" > <!-- <el-form-item label="ç产åå®¶EN:"> <el-input v-model="formData2.factoryNo" size="small"></el-input> </el-form-item> --> <el-form-item label="æ ¡åæå¡æºæ:"> <el-input v-model="formData2.calibrationServices" size="small"></el-input> <el-input v-model="formData2.calibrationServices" size="small" ></el-input> </el-form-item> <el-form-item label="åºåç¼å·:"> <el-input v-model="formData2.factoryNo" size="small"></el-input> </el-form-item> <el-form-item label="管çç¼å·:" required> <el-input v-model="formData2.managementNumber" size="small"></el-input> <el-input v-model="formData2.managementNumber" size="small" ></el-input> </el-form-item> <el-form-item label="è´ç½®æ¥æ:"> <el-date-picker style="width:100%" v-model="formData2.acquisitionDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ"> <el-date-picker style="width: 100%" v-model="formData2.acquisitionDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ" > </el-date-picker> </el-form-item> <el-form-item label="å¯ç¨æ¥æ:" required> <el-date-picker style="width:100%" v-model="formData2.activationDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ"> <el-date-picker style="width: 100%" v-model="formData2.activationDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss" size="small" placeholder="éæ©æ¥æ" > </el-date-picker> </el-form-item> <el-form-item label="管ç人:"> <el-select v-model="formData2.equipmentManager" placeholder="è¯·éæ©" size="small" style="width:100%"> <el-option v-for="item in responsiblePersonList" :key="item.value" :label="item.label" :value="item.value"> <el-select v-model="formData2.equipmentManager" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="item in responsiblePersonList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> <el-form-item label="åæ¾ç¹:"> <el-input v-model="formData2.storagePoint" size="small"></el-input> <el-input v-model="formData2.storagePoint" size="small" ></el-input> </el-form-item> <el-form-item label="ææ¯ææ :"> <el-input v-model="formData2.technicalIndicators" :rows="7" type="textarea" size="small"></el-input> <el-input v-model="formData2.technicalIndicators" :rows="7" type="textarea" size="small" ></el-input> </el-form-item> </el-form> </el-col> <!-- å³è¾¹å¸å± --> <el-col :span="7"> <el-form :label-position="labelPosition" :model="formData2" label-width="120px" ref="ruleForm"> <el-form :label-position="labelPosition" :model="formData2" label-width="120px" ref="ruleForm" > <!-- å®éªå®¤å表 --> <el-form-item label="æå±é¨é¨:"> <el-select v-model="formData2.subordinateDepartmentsId" placeholder="è¯·éæ©" size="small" style="width:100%"> <el-option v-for="item in subordinateDepartmentsList" :key="item.value" :label="item.label" :value="item.value"> <el-select v-model="formData2.subordinateDepartmentsId" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="item in subordinateDepartmentsList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> <el-form-item label="æ£æµé¡¹ç®:"> <el-cascader v-model="formData2.insProductIds" :options="options" :show-all-levels="false" :props="props" placeholder="è¯·éæ©" size="small" style="width:100%" collapse-tags separator="," filterable clearable></el-cascader> <el-cascader v-model="formData2.insProductIds" :options="options" :show-all-levels="false" :props="props" placeholder="è¯·éæ©" size="small" style="width: 100%" collapse-tags separator="," filterable clearable ></el-cascader> </el-form-item> <el-form-item label="设å¤ç±»å:"> <el-select v-model="formData2.largeCategory" placeholder="è¯·éæ©" size="small" style="width:100%"> <el-option v-for="item in equipmentList" :key="item.value" :label="item.label" :value="item.value"> <el-select v-model="formData2.largeCategory" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="item in equipmentList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> @@ -293,24 +599,55 @@ <el-input v-model="formData2.unitPrice" size="small"></el-input> </el-form-item> <el-form-item label="å½åç¶æ:" required> <el-select v-model="formData2.deviceStatus" placeholder="è¯·éæ©" size="small" style="width:100%"> <el-option v-for="item in deviceStatusList" :key="item.id" :label="item.label" :value="item.value"> <el-select v-model="formData2.deviceStatus" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="item in deviceStatusList" :key="item.id" :label="item.label" :value="item.value" > </el-option> </el-select> </el-form-item> <el-form-item label="æ ¡åå¨æï¼æï¼:" required> <el-input v-model="formData2.calibrationDate" size="small"></el-input> <el-input v-model="formData2.calibrationDate" size="small" ></el-input> </el-form-item> <el-form-item label="å¾ç:"> <div style="border: 1px solid #DCDFE6;border-radius:4px;height:32px;line-height:32px;display:flex;justify-content: space-around;font-size: 13px;"> <div v-show="formData2.imageName" class="picName">{{ formData2.imageName }}</div> <el-upload :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false" accept='image/jpg,image/jpeg,image/png' :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'> <el-button type="text" style="height:30px;padding-top:8px">ä¸ä¼ </el-button> style=" border: 1px solid #dcdfe6; border-radius: 4px; height: 32px; line-height: 32px; display: flex; justify-content: space-around; font-size: 13px; " > <div v-show="formData2.imageName" class="picName"> {{ formData2.imageName }} </div> <el-upload :action="action" :on-success="handleSuccessUpImg2" :show-file-list="false" accept="image/jpg,image/jpeg,image/png" :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref="upload" > <el-button type="text" style="height: 30px; padding-top: 8px" >ä¸ä¼ </el-button > </el-upload> </div> </el-form-item> @@ -320,43 +657,94 @@ <span slot="footer" class="dialog-footer"> <el-row> <el-button @click="handleClose2">å æ¶</el-button> <el-button type="primary" @click="submitForm2" :loading="upLoad2">ç¡® å®</el-button> <el-button type="primary" @click="submitForm2" :loading="upLoad2" >ç¡® å®</el-button > </el-row> </span> </el-dialog> <el-dialog title="æ°éé ç½®" :visible.sync="dialogVisible3" width="400px"> <div class="search_thing" style="margin-bottom: 14px;"> <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>IPï¼</div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.ip"></el-input> <div class="search_thing" style="margin-bottom: 14px"> <div class="search_label"> <span style="color: red; margin-right: 4px">*</span>IPï¼ </div> <div class="search_thing" style="margin-bottom: 14px;"> <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>ééå°åï¼</div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.collectUrl"></el-input> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.ip" ></el-input> </div> <div class="search_thing" style="margin-bottom: 14px;"> <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>å¨åå°åï¼</div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.storageUrl"></el-input> <div class="search_thing" style="margin-bottom: 14px"> <div class="search_label"> <span style="color: red; margin-right: 4px">*</span>ééå°åï¼ </div> <div class="search_thing" style="margin-bottom: 14px;"> <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>åç §ï¼</div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.refer"></el-input> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.collectUrl" ></el-input> </div> <div class="search_thing" style="margin-bottom: 14px;"> <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>Xï¼</div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.x"></el-input> <div class="search_thing" style="margin-bottom: 14px"> <div class="search_label"> <span style="color: red; margin-right: 4px">*</span>å¨åå°åï¼ </div> <div class="search_thing" style="margin-bottom: 14px;"> <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>Yï¼</div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.y"></el-input> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.storageUrl" ></el-input> </div> <div class="search_thing" style="margin-bottom: 14px"> <div class="search_label"> <span style="color: red; margin-right: 4px">*</span>åç §ï¼ </div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.refer" ></el-input> </div> <div class="search_thing" style="margin-bottom: 14px"> <div class="search_label"> <span style="color: red; margin-right: 4px">*</span>Xï¼ </div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.x" ></el-input> </div> <div class="search_thing" style="margin-bottom: 14px"> <div class="search_label"> <span style="color: red; margin-right: 4px">*</span>Yï¼ </div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.y" ></el-input> </div> <div class="search_thing"> <div class="search_label">å ¬å¼ï¼</div> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.formula"></el-input> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="configForm.formula" ></el-input> </div> <span slot="footer" class="dialog-footer"> <el-row> <el-button @click="dialogVisible3 = false">å æ¶</el-button> <el-button type="primary" @click="submitForm3" :loading="upLoad3">ç¡® å®</el-button> <el-button type="primary" @click="submitForm3" :loading="upLoad3" >ç¡® å®</el-button > </el-row> </span> </el-dialog> @@ -366,7 +754,7 @@ <script> import limsTable from "@/components/Table/lims-table.vue"; import dataAcquisitionConfig from './acquisitionConfig.vue' import dataAcquisitionConfig from "./acquisitionConfig.vue"; import { obtainItemParameterList, exportEquipmentDetails, @@ -376,7 +764,7 @@ numberCollect, getDeviceParameter, delDeviceParameter, } from '@/api/cnas/resourceDemand/device.js' } from "@/api/cnas/resourceDemand/device.js"; import { selectUserCondition } from "@/api/system/user"; export default { props: { @@ -384,8 +772,8 @@ type: Object, default: () => { return {}; } } }, }, }, components: { limsTable, @@ -393,32 +781,32 @@ }, data() { return { dateFormat: 'yyyy-MM-dd', deviceId: '', dateFormat: "yyyy-MM-dd", deviceId: "", fileTypeOptions: [ { label: 'csv', value: '.csv' }, { label: 'db', value: '.db' }, { label: 'mdb', value: '.mdb' }, { label: 'word', value: '.docx' }, { label: 'excel', value: '.xlsx' }, { label: 'txt', value: '.txt' }, { label: 'png', value: '.png' }, { label: "csv", value: ".csv" }, { label: "db", value: ".db" }, { label: "mdb", value: ".mdb" }, { label: "word", value: ".docx" }, { label: "excel", value: ".xlsx" }, { label: "txt", value: ".txt" }, { label: "png", value: ".png" }, ], //æ¯å¦æ¯æ¡£æ¡ä¿®è®¢ true䏿¯ falseæ¯ isUp: true, formData: { authorizedPerson: [] authorizedPerson: [], }, formData2: { imageUpload: '', imageName: '', deviceStatus: '', authorizedPerson: [] imageUpload: "", imageName: "", deviceStatus: "", authorizedPerson: [], }, value: '', props: { multiple: true, emitPath: false, value: 'id', label: 'name' }, value: "", props: { multiple: true, emitPath: false, value: "id", label: "name" }, options: [], labelPosition: 'right', labelPosition: "right", dialogVisible: false, dialogVisible2: false, addPower: false, @@ -445,7 +833,12 @@ queryParams: {}, tableData: [], column: [ { label: "设å¤åç§°", prop: "deviceName", dataType: 'link', linkMethod: 'selectAllByOne' }, { label: "设å¤åç§°", prop: "deviceName", dataType: "link", linkEvent: { method: "selectAllByOne", vueComponent: this }, }, { label: "设å¤åç§°EN", prop: "enDeviceName" }, { label: "è§æ ¼åå·", @@ -467,23 +860,27 @@ { label: "䏿¬¡æ ¡åæ¥æ", prop: "nextCalibrationDateTwo" }, { label: "䏿¬¡æ ¸æ¥æ¥æ", prop: "nextCalibrationDate" }, { label: "设å¤åç±»", prop: "largeCategory", dataType: "tag", label: "设å¤åç±»", prop: "largeCategory", dataType: "tag", formatData: (params) => { return this.equipmentList.find(m => m.value == params).label return this.equipmentList.find((m) => m.value == params).label; }, formatType: (params) => { return this.equipmentList.find(m => m.value == params).type } return this.equipmentList.find((m) => m.value == params).type; }, }, { label: "åä»·", prop: "unitPrice" }, { label: "设å¤ç¶æ", prop: "deviceStatus", dataType: "tag", label: "设å¤ç¶æ", prop: "deviceStatus", dataType: "tag", formatData: (params) => { return this.deviceStatusList.find(m => m.value == params).label return this.deviceStatusList.find((m) => m.value == params).label; }, formatType: (params) => { return this.deviceStatusList.find(m => m.value == params).type } return this.deviceStatusList.find((m) => m.value == params).type; }, }, { label: "æ ¡å卿(æ)", prop: "calibrationDate" }, { @@ -505,8 +902,8 @@ this.handleConfig(row); }, disabled: (row) => { return row.insProductItem == null || row.insProductItem === '' } return row.insProductItem == null || row.insProductItem === ""; }, }, { name: "å é¤", @@ -524,41 +921,45 @@ current: 0, }, tableLoading: false, } }; }, computed: { action() { return this.javaApi + '/deviceScope/uploadFile' } return this.javaApi + "/deviceScope/uploadFile"; }, }, mounted() { this.selectEnumByCategory() this.selectDevicePrincipal() this.obtainItemParameterList() this.getInsProductIds() this.selectEnumByCategory(); this.selectDevicePrincipal(); this.obtainItemParameterList(); this.getInsProductIds(); // åå§å this.clickSidebar(this.clickNodeVal) this.clickSidebar(this.clickNodeVal); }, methods: { //åç±» handleNotification(cate) { this.queryParams.largeCategory = cate this.queryParams.largeCategory = cate; }, obtainItemParameterList() { obtainItemParameterList().then(res => { let data = [] res.data.forEach(a => { obtainItemParameterList().then((res) => { let data = []; res.data.forEach((a) => { data.push({ label: a.laboratoryName, value: a.id }) }) this.subordinateDepartmentsList = data }) value: a.id, }); }); this.subordinateDepartmentsList = data; }); }, getList() { this.tableLoading = true; let param = { laboratoryNameIsNull: this.laboratoryNameIsNull, ...this.queryParams, ...this.page }; let param = { laboratoryNameIsNull: this.laboratoryNameIsNull, ...this.queryParams, ...this.page, }; delete param.total; getDeviceParameter({ ...param }) .then((res) => { @@ -588,12 +989,12 @@ }, // å¯¼åº handleDownOne() { this.outLoading = true exportEquipmentDetails().then(res => { this.outLoading = false const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '设å¤ä»ªå¨ä¸è§è¡¨.doc') }) this.outLoading = true; exportEquipmentDetails().then((res) => { this.outLoading = false; const blob = new Blob([res], { type: "application/octet-stream" }); this.$download.saveAs(blob, "设å¤ä»ªå¨ä¸è§è¡¨.doc"); }); }, // è·ååå ¸ selectEnumByCategory() { @@ -608,7 +1009,7 @@ }, // è·åè´è´£äººå表 selectDevicePrincipal() { selectUserCondition().then(res => { selectUserCondition().then((res) => { let data = []; res.data.forEach((a) => { data.push({ @@ -616,110 +1017,114 @@ value: a.id, }); }); this.responsiblePersonList = data this.authorizerList = data }) this.responsiblePersonList = data; this.authorizerList = data; }); }, getInsProductIds() { getInsProduction().then(res => { getInsProduction().then((res) => { this.options = res.data.map((m, i) => { m.id = m.name; let children = m.children.map(n => { let children = m.children.map((n) => { n.label = n.name; n.value = n.id; return n }) return m }) this.options.forEach(item => { return n; }); return m; }); this.options.forEach((item) => { if (item.children.length == 0) { item.children = null; } else { item.children.forEach(m => { item.children.forEach((m) => { if (m.children.length == 0) { m.children = null; } else { m.children.forEach(n => { m.children.forEach((n) => { if (n.children && n.children.length == 0) { n.children = null; } }) }); } }) }); } }) }) }); }); }, handleClose() { this.formData = { authorizedPerson: [] } authorizedPerson: [], }; this.formData2 = { imageUpload: '', imageName: '', authorizedPerson: [] } imageUpload: "", imageName: "", authorizedPerson: [], }; this.dialogVisible = false; this.upLoad = false; }, handleClose2() { this.formData = { authorizedPerson: [] } authorizedPerson: [], }; this.formData2 = { imageUpload: '', imageName: '', authorizedPerson: [] } imageUpload: "", imageName: "", authorizedPerson: [], }; this.dialogVisible2 = false; this.upLoad = false; }, selectAllByOne(row) { this.isUp = true this.isUp = true; //æå¼å¼¹æ¡ this.dialogVisible = true; //row = ç¹å»å¯¹åºè¡å¼ //å¤å¶ç»formData this.formData = this.HaveJson(row); console.log(row.insProductIds + 'valll'); this.formData.insProductIds = row.insProductIds ? row.insProductIds.split(',') : []; console.log(row.insProductIds + "valll"); this.formData.insProductIds = row.insProductIds ? row.insProductIds.split(",") : []; }, isUpdate(row) { //ä¿®æ¹ isUp 为档æ¡ä¿®æ¹ this.isUp = false this.isUp = false; //æå¼å¼¹æ¡ this.dialogVisible = true; //row = ç¹å»å¯¹åºè¡å¼ä¸è¡å¼ //å¤å¶ç»formData this.formData = this.HaveJson(row); if (typeof (row.insProductIds) === 'number') { row.insProductIds = row.insProductIds + '' if (typeof row.insProductIds === "number") { row.insProductIds = row.insProductIds + ""; } this.formData.deviceStatus = this.formData.deviceStatus + '' this.formData.insProductIds = row.insProductIds ? row.insProductIds.split(',') : []; this.formData.deviceStatus = this.formData.deviceStatus + ""; this.formData.insProductIds = row.insProductIds ? row.insProductIds.split(",") : []; // å°æ¶é´æ ¼å¼ä¸ºyyyy-MM-dd è¿è¡è½¬æ¢ const dateRegex = /^\d{4}-\d{2}-\d{2}$/ Object.keys(this.formData).forEach(key => { const dateRegex = /^\d{4}-\d{2}-\d{2}$/; Object.keys(this.formData).forEach((key) => { if (dateRegex.test(this.formData[key])) { this.formData[key] = `${this.formData[key]} 00:00:00` this.formData[key] = `${this.formData[key]} 00:00:00`; } }) }); }, beforeUpload(file) { if (file.size > 1024 * 1024 * 10) { this.$message.error('ä¸ä¼ æä»¶ä¸è¶ è¿10M'); this.$refs.upload.clearFiles() this.$message.error("ä¸ä¼ æä»¶ä¸è¶ è¿10M"); this.$refs.upload.clearFiles(); return false; } else { return true; } }, onError(err, file, fileList) { this.$message.error('ä¸ä¼ 失败') this.$refs.upload.clearFiles() this.$message.error("ä¸ä¼ 失败"); this.$refs.upload.clearFiles(); }, // ä¸ä¼ å¾çæå handleSuccessUpImg(response,) { handleSuccessUpImg(response) { if (response.code == 200) { this.formData.imageUpload = response.data.url; this.formData.imageName = response.data.name; @@ -732,207 +1137,220 @@ this.formData.imageName = response.data.name; this.formData2.imageUpload = response.data.url; this.formData2.imageName = response.data.name; }) }); } }, submitForm() { if (!this.formData.deviceName) { this.$message.error('æªè¾å ¥ä»ªå¨åç§°') return this.$message.error("æªè¾å ¥ä»ªå¨åç§°"); return; } if (!this.formData.enDeviceName) { this.$message.error('æªè¾å ¥ä»ªå¨åç§°EN') return this.$message.error("æªè¾å ¥ä»ªå¨åç§°EN"); return; } if (!this.formData.specificationModel) { this.$message.error('æªè¾å ¥è§æ ¼åå·') return this.$message.error("æªè¾å ¥è§æ ¼åå·"); return; } if (!this.formData.managementNumber) { this.$message.error('æªè¾å ¥ç®¡çç¼å·') return this.$message.error("æªè¾å ¥ç®¡çç¼å·"); return; } if (!this.formData.activationDate) { this.$message.error('æªè¾å ¥æ ¡åæææ') return this.$message.error("æªè¾å ¥æ ¡åæææ"); return; } if (!this.formData.subordinateDepartmentsId) { this.$message.error('æªéæ©æå±é¨é¨') return this.$message.error("æªéæ©æå±é¨é¨"); return; } if (this.formData.deviceStatus === '' || this.formData.deviceStatus === null) { this.$message.error('æªéæ©å½åç¶æ') return if ( this.formData.deviceStatus === "" || this.formData.deviceStatus === null ) { this.$message.error("æªéæ©å½åç¶æ"); return; } if (!this.formData.calibrationDate) { this.$message.error('æªè¾å ¥æ ¡åå¨æï¼æï¼') return this.$message.error("æªè¾å ¥æ ¡åå¨æï¼æï¼"); return; } delete this.formData.createTime delete this.formData.updateTime delete this.formData.createUser delete this.formData.updateUser const formData = this.HaveJson(this.formData) formData.insProductIds = formData.insProductIds ? formData.insProductIds.join() : '' delete this.formData.createTime; delete this.formData.updateTime; delete this.formData.createUser; delete this.formData.updateUser; const formData = this.HaveJson(this.formData); formData.insProductIds = formData.insProductIds ? formData.insProductIds.join() : ""; if (formData.authorizedPerson.length === 0) { formData.authorizedPerson = '' formData.authorizedPerson = ""; } else { formData.authorizedPerson = JSON.stringify(formData.authorizedPerson) formData.authorizedPerson = JSON.stringify(formData.authorizedPerson); } this.upLoad = true; upDeviceParameter(formData).then(res => { this.$message.success('ä¿®æ¹æå') this.upLoad = false this.refreshTable('page') this.dialogVisible = false }).catch(e => { this.$message.error('ä¿®æ¹å¤±è´¥') this.dialogVisible = false this.upLoad = false upDeviceParameter(formData) .then((res) => { this.$message.success("ä¿®æ¹æå"); this.upLoad = false; this.refreshTable("page"); this.dialogVisible = false; }) .catch((e) => { this.$message.error("ä¿®æ¹å¤±è´¥"); this.dialogVisible = false; this.upLoad = false; }); }, // æäº¤æ¡£æ¡ä¿®è®¢--æ°å¢ submitForm2() { if (!this.formData2.deviceName) { this.$message.error('æªè¾å ¥ä»ªå¨åç§°') return this.$message.error("æªè¾å ¥ä»ªå¨åç§°"); return; } if (!this.formData2.enDeviceName) { this.$message.error('æªè¾å ¥ä»ªå¨åç§°EN') return this.$message.error("æªè¾å ¥ä»ªå¨åç§°EN"); return; } if (!this.formData2.specificationModel) { this.$message.error('æªè¾å ¥è§æ ¼åå·') return this.$message.error("æªè¾å ¥è§æ ¼åå·"); return; } if (!this.formData2.managementNumber) { this.$message.error('æªè¾å ¥ç®¡çç¼å·') return this.$message.error("æªè¾å ¥ç®¡çç¼å·"); return; } if (!this.formData2.activationDate) { this.$message.error('æªè¾å ¥æ ¡åæææ') return this.$message.error("æªè¾å ¥æ ¡åæææ"); return; } if (!this.formData2.deviceStatus) { this.$message.error('æªéæ©å½åç¶æ') return this.$message.error("æªéæ©å½åç¶æ"); return; } if (!this.formData2.calibrationDate) { this.$message.error('è¾å ¥æ ¡åå¨æï¼æï¼') return this.$message.error("è¾å ¥æ ¡åå¨æï¼æï¼"); return; } const formData = this.HaveJson(this.formData2) formData.insProductIds = formData.insProductIds ? formData.insProductIds.join() : '' const formData = this.HaveJson(this.formData2); formData.insProductIds = formData.insProductIds ? formData.insProductIds.join() : ""; if (formData.authorizedPerson.length === 0) { formData.authorizedPerson = '' formData.authorizedPerson = ""; } else { formData.authorizedPerson = JSON.stringify(formData.authorizedPerson) formData.authorizedPerson = JSON.stringify(formData.authorizedPerson); } this.upLoad2 = true; addDeviceParameter(formData).then(res => { this.$message.success('æäº¤æå') this.upLoad2 = false this.refreshTable('page') this.dialogVisible2 = false addDeviceParameter(formData) .then((res) => { this.$message.success("æäº¤æå"); this.upLoad2 = false; this.refreshTable("page"); this.dialogVisible2 = false; this.formData2 = { imageUpload: '', imageName: '', authorizedPerson: [] } }).catch(e => { this.$message.error('æäº¤å¤±è´¥') this.dialogVisible2 = false this.upLoad2 = false imageUpload: "", imageName: "", authorizedPerson: [], }; }) .catch((e) => { this.$message.error("æäº¤å¤±è´¥"); this.dialogVisible2 = false; this.upLoad2 = false; }); }, handleConfig(row) { let list = [] let list = []; if (row.insProductItem) { list = row.insProductItem.split(';') list = row.insProductItem.split(";"); } let list2 = [] let list2 = []; list.map((item) => { const obj = Object.assign({ deviceId: row.id, insProductItem: item, }) list2.push(obj) }) this.tableList = list2 this.deviceId = row.id }); list2.push(obj); }); this.tableList = list2; this.deviceId = row.id; this.$nextTick(() => { this.showData = true }) this.showData = true; }); }, closeDataVue() { this.clickSidebar(this.clickNodeVal) this.showData = false this.clickSidebar(this.clickNodeVal); this.showData = false; }, submitForm3() { if (!this.configForm.ip) { this.$message.error('请填åIP'); return this.$message.error("请填åIP"); return; } if (!this.configForm.collectUrl) { this.$message.error('请填åééå°å'); return this.$message.error("请填åééå°å"); return; } if (!this.configForm.storageUrl) { this.$message.error('请填åå¨åå°å'); return this.$message.error("请填åå¨åå°å"); return; } if (!this.configForm.refer) { this.$message.error('请填ååç §'); return this.$message.error("请填ååç §"); return; } if (!this.configForm.x) { this.$message.error('请填åX'); return this.$message.error("请填åX"); return; } if (!this.configForm.y) { this.$message.error('请填åY'); return this.$message.error("请填åY"); return; } this.upLoad3 = true numberCollect(this.configForm).then(res => { this.upLoad3 = false this.$message.success('æä½æå') this.refreshTable('page') this.dialogVisible3 = false }).catch(e => { this.$message.error('æä½å¤±è´¥') this.dialogVisible3 = false this.upLoad3 = false this.upLoad3 = true; numberCollect(this.configForm) .then((res) => { this.upLoad3 = false; this.$message.success("æä½æå"); this.refreshTable("page"); this.dialogVisible3 = false; }) .catch((e) => { this.$message.error("æä½å¤±è´¥"); this.dialogVisible3 = false; this.upLoad3 = false; }); }, // ç¹å»ä¾§è¾¹æ å·æ° clickSidebar(clickNodeVal) { this.laboratoryNameIsNull = false this.laboratoryNameIsNull = false; // æ¯å¦åå¨valueï¼åå¨value代表为ä¸çº§ if (!clickNodeVal.value) { this.list = []; this.queryParams.laboratoryName = null this.queryParams.storagePoint = null this.queryParams.laboratoryName = null; this.queryParams.storagePoint = null; // çäº1代表为æ çä¸çº§ï¼label为é¨é¨ if (clickNodeVal.label == 'å ¶ä»') { this.laboratoryNameIsNull = true this.refreshTable('page') return if (clickNodeVal.label == "å ¶ä»") { this.laboratoryNameIsNull = true; this.refreshTable("page"); return; } if (clickNodeVal.level == 1) { this.queryParams.laboratoryName = clickNodeVal.label this.queryParams.laboratoryName = clickNodeVal.label; // çäºäºçº§ãlabel为åå¨å°ç¹ } else if (clickNodeVal.level == 2) { // å ¶ä»è¡¨ç¤ºæ²¡æé ç½®å®éªå®¤ï¼åªé ç½®äºå°ç¹ if (clickNodeVal.parent.label == 'å ¶ä»') { this.laboratoryNameIsNull = true if (clickNodeVal.parent.label == "å ¶ä»") { this.laboratoryNameIsNull = true; } else { this.queryParams.laboratoryName = clickNodeVal.parent.label this.queryParams.laboratoryName = clickNodeVal.parent.label; } this.queryParams.storagePoint = clickNodeVal.label this.queryParams.storagePoint = clickNodeVal.label; } this.refreshTable('page') this.refreshTable("page"); } }, handleDelete(row) { @@ -953,10 +1371,10 @@ watch: { // çå¬ç¹å»el-treeçæ°æ®ï¼è¿è¡æ°æ®å·æ° clickNodeVal(newVal) { this.clickSidebar(newVal) } } } this.clickSidebar(newVal); }, }, }; </script> <style scoped> src/views/business/inspectionOrder/add.vue
@@ -80,7 +80,7 @@ v-show="active == 3 && addObj.companyId" >éè¿</el-button > <el-button size="medium" @click="$parent.playOrder(0)"> <el-button size="medium" @click="$router.go(-1)"> <span style="color: #3a7bfa">è¿å</span> </el-button> </el-col> @@ -172,7 +172,7 @@ placeholder="请è¾å ¥" class="search_input" clearable :readonly="active > 1" :disabled="active > 1" v-model="addObj.phone" ></el-input> </el-form-item> @@ -248,7 +248,7 @@ </el-col> <el-col :span="6"> <el-form-item label="æ¥ååéæ¹å¼ï¼" prop="send"> <el-radio-group v-model="addObj.send"> <el-radio-group v-model="addObj.send" :disabled="active > 1"> <el-radio :label="1">èªå</el-radio> <el-radio :label="0">å ¶ä»</el-radio> </el-radio-group> @@ -260,7 +260,11 @@ prop="processing" class="processing_input" > <el-radio-group v-model="addObj.processing" size="mini"> <el-radio-group v-model="addObj.processing" :disabled="active > 1" size="mini" > <el-radio :label="0">å§æåä½åå</el-radio> <el-radio :label="1">å®éªå®¤å¤ç</el-radio> </el-radio-group> @@ -274,7 +278,7 @@ :placeholder="active > 1 ? '' : '请è¾å ¥'" clearable v-model="addObj.engineering" :readonly="active > 1" :disabled="active > 1" ></el-input> </el-form-item> </el-col> @@ -291,7 +295,7 @@ :placeholder="active > 1 ? '' : '请è¾å ¥'" clearable v-model="addObj.engineeringEn" :readonly="active > 1" :disabled="active > 1" ></el-input> </el-form-item> </el-col> @@ -303,7 +307,7 @@ placeholder="请è¾å ¥" clearable v-model="addObj.production" :readonly="active > 1" :disabled="active > 1" ></el-input> </el-form-item> </el-col> @@ -319,13 +323,13 @@ placeholder="请è¾å ¥" clearable v-model="addObj.productionEn" :readonly="active > 1" :disabled="active > 1" ></el-input> </el-form-item> </el-col> <el-col :span="6"> <el-form-item label="æ¯å¦çæ ·ï¼" prop="isLeave"> <el-radio-group v-model="addObj.isLeave"> <el-radio-group v-model="addObj.isLeave" :disabled="active > 1"> <el-radio :label="0">ä¸çæ ·</el-radio> <el-radio :label="1">çæ ·</el-radio> </el-radio-group> @@ -336,6 +340,7 @@ <el-col :span="6"> <el-form-item label="æ¯å¦æ¶åé 奿 ·åï¼" prop="mating"> <el-radio-group :disabled="active > 1" v-model="addObj.mating" @change="$refs.sampleTable.doLayout()" > @@ -355,7 +360,7 @@ :placeholder="active > 1 ? '' : '请è¾å ¥'" clearable v-model="addObj.otcCode" :readonly="active > 1" :disabled="active > 1" ></el-input> </el-form-item> </el-col> @@ -367,7 +372,7 @@ :placeholder="active > 1 ? '' : '请è¾å ¥'" clearable v-model="addObj.prepareUser" :readonly="active > 1" :disabled="active > 1" ></el-input> </el-form-item> </el-col> @@ -380,7 +385,7 @@ clearable :placeholder="active > 1 ? '' : '请è¾å ¥'" v-model="addObj.remark" :readonly="active > 1" :disabled="active > 1" ></el-input> </el-form-item> </el-col> @@ -388,14 +393,12 @@ </el-form> </div> </basic-container> <basic-container> <div style="height: auto"> <div class="search" v-if="active == 1" style="display: flex; background: transparent" > <div> <div style="display: flex; align-items: center"> <div class="search_label">æ ·ååå·ï¼</div> <div class="search_input"> <el-select @@ -417,7 +420,7 @@ </el-select> </div> </div> <div> <div style="display: flex; align-items: center"> <div class="search_label">æ£éªæ åï¼</div> <div class="search_input"> <el-select @@ -440,6 +443,8 @@ </div> </div> </div> <basic-container> <div style="height: auto"> <el-table class="el-table sampleTable" ref="sampleTable" @@ -802,10 +807,767 @@ </el-table> </div> </basic-container> <el-dialog title="éæ©æ ·å" :visible.sync="selectStandardTree" width="500px" > <div class="body" style="height: 60vh; overflow-y: auto; user-select: none" v-if="selectStandardTree" > <el-row> <el-col :span="24"> <el-input placeholder="è¾å ¥å ³é®åè¿è¡æç´¢" suffix-icon="el-icon-search" v-model="search" size="small" style="margin-bottom: 5px" clearable @blur="searchFilter" @clear="searchFilter" @keyup.enter.native="searchFilter" ></el-input> </el-col> </el-row> <el-tree :data="list" ref="tree" :props="{ children: 'children', label: 'label' }" node-key="label" :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" @dblclick.native="activeStandardTree" > <div class="custom-tree-node" slot-scope="{ node, data }"> <el-row> <el-col :span="24"> <span ><i :class="`node_i ${ data.children != undefined ? data.code === '[1]' ? 'el-icon-folder-opened' : 'el-icon-folder' : 'el-icon-tickets' }`" ></i> {{ data.code }} {{ data.label }}</span > </el-col> </el-row> </div> </el-tree> </div> <span slot="footer" class="dialog-footer"> <el-button @click="selectStandardTree = false">å æ¶</el-button> <el-button type="primary" @click="activeStandardTree">ç¡® å®</el-button> </span> </el-dialog> <el-dialog title="éæ©åä½" :visible.sync="selectUserDia" width="70%"> <div class="body" style="height: 60vh" v-if="selectUserDia"> <ValueTable ref="ValueTable2" :url="$api.user.selectCustomPageList" :componentData="componentData2" /> </div> <span slot="footer" class="dialog-footer"> <el-button @click="selectUserDia = false">å æ¶</el-button> <el-button type="primary" @click="selectUser">ç¡® å®</el-button> </span> </el-dialog> <el-dialog title="ä¿å模æ¿" :visible.sync="templateDia" width="400px"> <div class="body" style="display: flex; align-items: center" v-if="templateDia" > <div class="search_label" style="width: 90px"> <span class="required-span">* </span>模æ¿åç§°ï¼ </div> <div class="search_input"> <el-input size="small" clearable v-model="templateName"></el-input> </div> </div> <span slot="footer" class="dialog-footer"> <el-button @click="templateDia = false">å æ¶</el-button> <el-button type="primary" @click="addTemplateDia" :loading="templateLoading" >ç¡® å®</el-button > </span> </el-dialog> <el-dialog title="æ£éªä¸å" :visible.sync="issuedDialogVisible" width="400px" :close-on-click-modal="false" :close-on-press-escape="false" :show-close="false" > <div class="body" style="max-height: 60vh"> <el-row> <el-col class="search_thing" :span="22"> <div class="search_label"> <span class="required-span">* </span>çº¦å®æ¶é´ï¼ </div> <div class="search_input"> <el-date-picker size="small" v-model="distributeData.appointed" :picker-options="pickerOptions" type="date" placeholder="éæ©æ¥æ" value-format="yyyy-MM-dd" style="width: 100%" format="yyyy-MM-dd" > </el-date-picker> </div> </el-col> <el-col class="search_thing" :span="22"> <div class="search_label"> <span class="required-span" v-if="addObj.type == 2">* </span >ææ´¾äººåï¼ </div> <div class="search_input"> <el-select multiple v-model="distributeData.userId" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" @change="changeUser" > <el-option-group v-for="(item, index) in Object.keys(personList)" :key="index" :label="item" > <el-option v-for="op in personList[item]" :key="op.id" :label="op.name" :value="op.id" > </el-option> </el-option-group> </el-select> </div> </el-col> <el-col class="search_thing" :span="22" v-if="distributeData.userId.length > 0" > <div class="search_label"> <span class="required-span">* </span>è¯éªå®¤ï¼ </div> <div class="search_input"> <el-select v-model="distributeData.sonLaboratory" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" > <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> </div> </el-col> <el-col class="search_thing" :span="22"> <div class="search_label"> <span class="required-span">* </span>åå»ºå§æåï¼ </div> <div class="search_input"> <el-select v-model="distributeData.isCreate" placeholder="è¯·éæ©" size="small" filterable style="width: 100%" > <el-option label="æ¯" :value="true"></el-option> <el-option label="å¦" :value="false"></el-option> </el-select> </div> </el-col> </el-row> </div> <span slot="footer" class="dialog-footer"> <el-row> <el-button @click="issuedDialogVisible = false">å æ¶</el-button> <el-button type="primary" @click="submitForm2" :loading="upLoad" >ç¡® å®</el-button > </el-row> </span> </el-dialog> <el-dialog title="ä¸éè¿åå " :visible.sync="noDialogVisible" width="400px"> <div class="body" style="max-height: 60vh"> <el-row> <el-col class="search_thing" :span="22"> <div class="search_label"> <span class="required-span">* </span>ä¸éè¿åå ï¼ </div> <div class="search_input"> <el-input v-model="tell" size="small" placeholder="请è¾å ¥ä¸éè¿åå " ></el-input> </div> </el-col> </el-row> </div> <span slot="footer" class="dialog-footer"> <el-row> <el-button @click="(noDialogVisible = false), (tell = '')" >å æ¶</el-button > <el-button type="primary" @click="submitTell" :loading="noLoading" >ç¡® å®</el-button > </el-row> </span> </el-dialog> <fiberOpticConfig :fiberPairing="fiberPairing" :currentId="currentId" @saveFiberopticConfig="saveFiberConfigEvent($event)" v-if="configShow && examine == 0" :active="active" :inspectionItemST="inspectionItemST" /> <fiberOpticConfigTwo :currentId="currentId" v-if="configShow && examine == 1" :active="active" /> <equipConfig :currentId="currentId" v-if="equipConfigShow" :active="active" /> <cableConfig v-if="cableConfigShow" :active="active" /> <!-- åéç¹æ®å¼å¤çæ¡--> <el-dialog title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" :visible.sync="bsm1Dia" :close-on-press-escape="false" :close-on-click-modal="false" min-width="400px" :show-close="false" :before-close="beforeClose" > <div class="body" style="max-height: 60vh"> <el-row v-if="bsm1"> <el-col class="search_thing" :span="24" style="height: initial; margin: 5px 0" > <div class="search_label" style="width: 80px"> <span class="required-span">* </span>éé¡¹ï¼ </div> <div class="search_input"> <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" style="margin-bottom: 2px; margin-top: 2px" ></el-radio> </el-radio-group> </div> </el-col> <el-col class="search_thing" :span="24" style="height: initial; margin: 5px 0" > <div class="search_label" style="width: 80px">è¦æ±å¼ï¼</div> <div class="search_input" v-show="bsm1Val !== null && bsm1Val !== ''" > <el-radio-group v-model="bsm1Val" @input="upBsm1"> <el-radio v-for="(a, ai) in JSON.parse(bsmRow.section)" :key="ai" :label="a" >{{ JSON.parse(bsmRow.ask)[ai] }}</el-radio > </el-radio-group> </div> </el-col> </el-row> <el-row v-if="bsm2"> <el-col class="search_thing" :span="22"> <div class="search_label" style="width: 220px"> <span class="required-span">* </span>æ ·åçæ¥é 对æ°éï¼ </div> <div class="search_input"> <el-input-number size="medium" v-model="bsm2Val" :min="1" :max="bsm2Val3.length" :precision="0" style="width: 70%" :controls="false" @change="bsm2Up" ></el-input-number> <span>MAXï¼{{ bsm2Val3.length }}</span> </div> </el-col> <el-col style="margin-top: 6px"> <el-col v-for="(a, ai) in bsm2Val2" :key="ai"> <el-col :span="10"> <el-select v-model="a[0]" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="(item, index) in sampleList" :key="index" :label="index + 1" :value="index + 1" > </el-option> </el-select> </el-col> <el-col :span="4" class="pairing" style="border: 0; color: rgba(0, 0, 0, 0.2)" >ââ</el-col > <el-col :span="10"> <el-select v-model="a[1]" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="(item, index) in sampleList" :key="index" :label="index + 1" :value="index + 1" > </el-option> </el-select> </el-col> </el-col> </el-col> </el-row> </div> <span slot="footer" class="dialog-footer"> <el-row> <el-button type="primary" @click="save2" :loading="saveLoad" >ç¡® å®</el-button > </el-row> </span> </el-dialog> <!-- å ¨éç¹æ®å¼å¤çæ¡--> <el-dialog title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" :visible.sync="bsm1DiaAll" min-width="400px" :show-close="false" :close-on-press-escape="false" :close-on-click-modal="false" :before-close="beforeClose" > <div class="body" style="max-height: 60vh" v-for="(item, index) in bsm1DiaList" :key="index" > <el-row v-if="item.bsm1"> <el-col class="search_thing" :span="24" style="height: initial; margin: 5px 0" > <div class="search_label" style="width: 80px"> <span class="required-span">* </span>éé¡¹ï¼ </div> <div class="search_input"> <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)"> <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.section)" :key="ai" :label="a" style="margin-bottom: 2px; margin-top: 2px" ></el-radio> </el-radio-group> </div> </el-col> <el-col class="search_thing" :span="24" style="height: initial; margin: 5px 0" > <div class="search_label" style="width: 80px">è¦æ±å¼ï¼</div> <div class="search_input" v-show="item.bsm1Val !== null && item.bsm1Val !== ''" > <el-radio-group v-model="item.bsm1Val" @input="upBsmAll(item)"> <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.section)" :key="ai" :label="a" >{{ JSON.parse(item.bsmRow.ask)[ai] }}</el-radio > </el-radio-group> </div> </el-col> </el-row> <el-row v-if="item.bsm2"> <el-col class="search_thing" :span="22"> <div class="search_label" style="width: 220px"> <span class="required-span">* </span>æ ·åçæ¥é 对æ°éï¼ </div> <div class="search_input"> <el-input-number size="medium" v-model="item.bsm2Val" :min="1" :max="item.bsm2Val3.length" :precision="0" style="width: 70%" :controls="false" @change="bsm2Up" ></el-input-number> <span>MAXï¼{{ item.bsm2Val3.length }}</span> </div> </el-col> <el-col style="margin-top: 6px"> <el-col v-for="(a, ai) in item.bsm2Val2" :key="ai"> <el-col :span="10"> <el-select v-model="a[0]" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="(item, index) in item.sampleList" :key="index" :label="index + 1" :value="index + 1" > </el-option> </el-select> </el-col> <el-col :span="4" class="pairing" style="border: 0; color: rgba(0, 0, 0, 0.2)" >ââ</el-col > <el-col :span="10"> <el-select v-model="a[1]" placeholder="è¯·éæ©" size="small" style="width: 100%" > <el-option v-for="(item, index) in item.sampleList" :key="index" :label="index + 1" :value="index + 1" > </el-option> </el-select> </el-col> </el-col> </el-col> </el-row> </div> <span slot="footer" class="dialog-footer"> <el-row> <el-button type="primary" @click="save1" :loading="saveLoad" >ç¡® å®</el-button > </el-row> </span> </el-dialog> <el-dialog title="ç¹æ®å¼å¡«å" :visible.sync="bsm3Dia" top="5vh" :close-on-click-modal="false" :close-on-press-escape="false" width="800px" :show-close="false" > <el-table :data="editTable" style="width: 100%" height="500px"> <!-- inspectionItemList --> <el-table-column prop="inspectionItemList" label="æ£éªé¡¹" width="180"> </el-table-column> <el-table-column prop="sampleCode" label="æ ·åç¼å·" width="180"> </el-table-column> <el-table-column prop="model" label="æ ·ååå·" width="180"> </el-table-column> <el-table-column prop="symbolItem" label="è¯å«ç¬¦å·"> </el-table-column> <el-table-column prop="value" label="è¯å«ç¬¦å¼"> <template slot-scope="scope"> <el-input v-model="scope.row.value" placeholder="请è¾å ¥" @input="inputValueHandler(scope.row, scope.$index)" size="small" type="number" ></el-input> </template> </el-table-column> </el-table> <span slot="footer" class="dialog-footer"> <el-row> <el-button @click="bsm3Dia = false">å æ¶</el-button> <el-button type="primary" @click="save0" :loading="saveLoad" >ç¡® å®</el-button > </el-row> </span> </el-dialog> <el-dialog title="温度循ç¯è¦æ±å¡«å" :visible.sync="circulateShow" width="900px" :close-on-click-modal="false" :close-on-press-escape="false" :before-close="beforeCirculateShowClose" :show-close="false" > <div class="search" style="display: flex; background: transparent"> <div class="search_thing"> <div class="search_label">ä¿æ¸©æ¶é´ï¼</div> <div class="search_input"> <el-input v-model="circulateForm.entrustTime" size="small" placeholder="" type="number" ></el-input> </div> </div> <div class="search_thing"> <div class="search_label">å¾ªç¯æ¬¡æ°ï¼</div> <div class="search_input"> <el-input v-model="circulateForm.entrustNum" size="small" placeholder="" type="number" ></el-input> </div> </div> <div class="search_thing"> <div class="search_label">温度ç¹ï¼</div> <div class="search_input"> <el-input @focus="() => (isFocus = true)" @blur="changeTemperatureData" v-model="circulateForm.entrustPoint" size="small" placeholder="" type="number" ></el-input> </div> </div> </div> <div class="circulateTable"> <div class="opticalProject"> <div style="line-height: 30px">å 纤项ç®</div> <el-divider></el-divider> <div> <el-table ref="multipleTable" border :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }" :data="opticalProject" tooltip-effect="dark" style="width: 100%" @row-click="rowClickOptical" @select="selectOpticalProject" @select-all="selectAllOptical" @selection-change="handleSelectionChange" > <el-table-column type="selection" width="55"> </el-table-column> <el-table-column prop="value" label="å 纤项ç®" show-overflow-tooltip ></el-table-column> </el-table> </div> </div> <div class="temperatureList"> <div class="temperatureListTitle"> <span>温度ç¹éå</span> <span> <el-button type="primary" size="mini" :disabled="isFocus" @click="addTemperatureData" >æ°å¢</el-button > <el-button size="mini" @click="deleteTemperatureData" >å é¤</el-button > </span> </div> <el-divider></el-divider> <el-table :data="temperatureData" border :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }" style="width: 100%" > <el-table-column prop="date" label="温度ç¹(â)" width="120px"> <template slot-scope="scope"> <el-input size="small" v-model="scope.row.temperaturePoint" clearable placeholder="请è¾å ¥" @change="changeTemperature" ></el-input> </template> </el-table-column> <el-table-column prop="name" label="è¦æ±(dB/Km)"> <template slot-scope="scope"> <span>x</span> <el-select v-model="scope.row.askSymbol" placeholder="è¯·éæ©" size="small" style="width: 120px" @change="changeTemperature" > <el-option v-for="item in temperatureDataList" :key="item.value" :label="item.label" :value="item.value" > </el-option> </el-select> <el-input size="small" v-model="scope.row.askNum" clearable placeholder="请è¾å ¥" style="width: 120px" @change="changeTemperature" ></el-input> </template> </el-table-column> </el-table> </div> </div> <span slot="footer" class="dialog-footer"> <el-button @click="cleanSpliceData">åæ¶</el-button> <el-button type="primary" @click="spliceData">ä¿å</el-button> </span> </el-dialog> <!-- çµåè¯éªå®¤---温åè¯éª/çå¾ªç¯ --> <el-dialog :title="temperatureTitle" :visible.sync="temperatureShow" :close-on-click-modal="false" :close-on-press-escape="false" width="260px" :before-close="temperatureShowClose" :show-close="false" > <div> <div v-if="isShowInput" style="margin-bottom: 6px"> <span>å¾ªç¯æ¬¡æ°:</span> <!-- <el-input size="small" type="number" v-model="temperatureTestNum" style="width: 120px"></el-input> --> <el-input-number v-model="temperatureTestNum" :min="2" :max="1000000" size="small" label="" ></el-input-number> </div> <el-checkbox-group v-model="temperatureTest" @change="handleTemperatureTestChange" style="display: flex; flex-direction: column" > <el-checkbox v-for="item in temperatureList" :label="item" :key="item" style="margin-bottom: 6px" >{{ item }}</el-checkbox > </el-checkbox-group> </div> <span slot="footer" class="dialog-footer"> <el-button @click="cleanTemperatureTest">åæ¶</el-button> <el-button type="primary" @click="spliceTemperatureTest" >ä¿å</el-button > </span> </el-dialog> </div> </template> <script> import { selectInsOrderTemplate, hasSendUrgentOrder, addInsOrder, selectOrderManDay, selectInsOrderTemplateById, upInsOrderOfState, upInsOrder, getInsOrder, addInsOrderTemplate, delInsOrderTemplate, labelPrinting, } from "@/api/business/inspectionOrder"; import { selectStandardTreeList2, selectStandardMethodEnum, selectsStandardMethodByFLSSM, selectStandardProductList, } from "@/api/standard/standardLibrary"; import { selectBushingBySampleId } from "@/api/business/insBushing"; import { getLaboratoryPersonList } from "@/api/system/user"; import { mapGetters } from "vuex"; import fiberOpticConfig from "./fiberoptic-config.vue"; import fiberOpticConfigReadOnly from "./fiberoptic-config-readonly.vue"; @@ -822,24 +1584,15 @@ cableConfig, }, computed: { ...mapGetters(["nickName", "company"]), ...mapGetters(["nickName", "loginUserInfo"]), }, props: { examine: { type: Number, default: () => 0, }, active: { type: Number, default: () => 0, }, currentId: { type: Number, default: () => 0, }, }, props: {}, data() { return { isReview: false, //æ¯å¦æ¯æ¥ç详æ examine: 0, active: 0, currentId: 0, pickerOptions: { disabledDate(time) { // å½åæ¶é´å ä¸ä¸å¤©çæ¶é´æ³ @@ -1133,18 +1886,20 @@ this.standardMethodListId = null; }, }, created() { this.active = this.$route.query.active; this.currentId = this.$route.query.currentId; this.examine = this.$route.query.examine; this.isReview = this.$route.query.isReview; }, mounted() { if (this.addObj.custom == "" || this.addObj.custom == null) { this.addObj.custom = this.nickName; //设置å¶å人为å½åç»å½äºº } this.addObj.company = this.company; //æ¥è¯¢åå ¸ this.selectDictForType(); this.selectDictForOrderType(); this.selectDictForUnit(); this.selectDictForSampleForm(); if (this.active != 3) { this.getUserNow(); this.init(); } this.selectStandardTreeList(); this.getAuthorizedPerson(); @@ -1152,11 +1907,11 @@ if (this.active != 1) { // æ¥ç/å®¡æ ¸æµç¨ // è¯·æ±æ¥å£ï¼åæ¾æ°æ® this.$axios .post(this.$api.insOrder.getInsOrder, { getInsOrder({ orderId: this.currentId, }) .then((res) => { if (res.code === 200) { this.addObj = { ...res.data.insOrder, }; @@ -1171,6 +1926,10 @@ this.rowClick(this.sampleList[0]); } }); } }) .catch((error) => { console.error(error); }); } }, @@ -1194,16 +1953,13 @@ let flag = true; //妿æ¯ç±»åæ¯ç´§æ¥ï¼å¤æå½å客æ·å½å¤©çç´§æ¥é¢åº¦æ¯å¦ç¨å® if (type == 2) { await this.$axios .post(this.$api.insOrder.hasSendUrgentOrder, {}) await hasSendUrgentOrder() .then((res) => { flag = res.data; return flag; // if (!res.data) { // this.addObj.type = "1"; // this.$message.error("å½å¤©ç´§æ¥é¢åº¦å·²ç¨å®"); // throw "å½å¤©ç´§æ¥é¢åº¦å·²ç¨å®"; // } }) .catch((error) => { console.error(error); }); } return flag; @@ -1613,8 +2369,14 @@ } }, getAuthorizedPerson() { this.$axios.get(this.$api.user.getLaboratoryPersonList).then((res) => { getLaboratoryPersonList() .then((res) => { if (res.code === 200) { this.personList = res.data; } }) .catch((error) => { console.error(error); }); }, selectDictForType() { @@ -2559,6 +3321,7 @@ let sampleList = this.HaveJson(sampleList0); sampleList.forEach((a) => { a.insProduct.forEach((b) => { b.id = null; delete b.bsmRow; }); }); @@ -2577,126 +3340,64 @@ console.log(this.sampleList); console.log(this.fiberPairing); this.saveLoad = true; this.$axios .post(this.$api.insOrder.addInsOrder, { str: JSON.stringify({ addInsOrder({ insOrder: this.addObj, list: JSON.stringify( sampleList.map((a) => { if (this.PROJECT === "è£ å¤çµç¼") { if (a.modelNum) { const index = a.modelNum.indexOf("Ã"); if (index === 0) { a.model = a.model + a.modelNum; } else if (index === -1) { a.model = a.model + "-" + a.modelNum; } else { a.model = a.modelNum + a.model; } } else { list: sampleList.map((a) => { a.model = a.model + (a.modelNum == null || a.modelNum == "" || a.modelNum == "null" (a.modelNum == null || a.modelNum == "" || a.modelNum == "null" ? "" : "-" + a.modelNum); } } else { a.model = a.model + (a.modelNum == null || a.modelNum == "" || a.modelNum == "null" ? "" : "-" + a.modelNum); } a.insProduct = a.insProduct.filter((b) => b.state === 1); return a; }) ), pairing: JSON.stringify(this.bsm2Val2), fiberPairing: JSON.stringify(this.fiberPairing), }), pairing: this.bsm2Val2, fiberPairing: this.fiberPairing, }) .then((res) => { this.saveLoad = false; if (res.code == 201) return; if (res.code === 200) { this.$message.success("å·²æäº¤"); this.bsm3Dia = false; this.$parent.playOrder(0); }) .catch((e) => { this.$router.go(-1); } this.saveLoad = false; }) .catch((error) => { this.saveLoad = false; console.error(error); }); }, upInsOrderOfState(state) { if (state == 1) { //this.saveLoad = true this.issuedDialogVisible = true; this.$axios .post(this.$api.insOrder.selectOrderManDay, { selectOrderManDay({ id: this.currentId, }) .then((ress) => { .then((res) => { if (res.code === 200) { this.distributeData.orderId = this.currentId; this.distributeData.appointed = ress.data; this.distributeData.appointed = res.data; console.log("çº¦å®æ¶é´", this.distributeData.appointed); } }) .catch((error) => { console.error(error); }); setTimeout(() => { this.issuedDialogVisible = true; }, 1000); // this.$axios.post(this.$api.insOrder.upInsOrderOfState, { // state, // id: this.currentId, // companyId:this.addObj.companyId, // laboratory:this.addObj.laboratory, // company: this.addObj.company // }, { // headers: { // 'Content-Type': 'application/json' // } // }).then(res => { // this.saveLoad = false // if (res.code == 201) return // this.$message.success('æäº¤æå') // this.$parent.multipleSelection = [{id: this.currentId}] // this.$parent.print() // å¦æç´§æ¥ç¨åº¦ä¸ºç´§æ¥ï¼éè¦ç´æ¥ä¸å人å // if (this.addObj.type == 2) { // this.issuedDialogVisible = true; // this.$axios.post(this.$api.insOrder.selectOrderManDay, { // id: this.currentId // }).then(ress => { // this.distributeData.orderId = this.currentId // this.distributeData.appointed = ress.data // }) // } else { // this.$parent.playOrder(0) // } // this.$axios.post(this.$api.insOrder.selectOrderManDay, { // id: this.currentId // }).then(ress => { // this.distributeData.orderId = this.currentId // this.distributeData.appointed = ress.data // }) // setTimeout(() => { // this.issuedDialogVisible = true; // }, 1000) // }) } else { // ä¸éè¿ this.noDialogVisible = true; } }, getLabelPrinting(currentId) { this.$axios .post(this.$api.insOrder.labelPrinting, { labelPrinting({ ids: currentId, }) .then((res) => { if (res.code === 200) { //å®¡æ ¸éè¿ï¼é»è®¤åªæå°ç¬¬ä¸ä¸ªæ ·åæ ç¾ let firstSample = res.data[0]; let arr1 = []; @@ -2704,14 +3405,11 @@ arr1.push(b.inspectionItem); }); firstSample.item = [...new Set(arr1)].join(","); // arr.forEach((a) => { // let arr1 = []; // a.insProduct.forEach((b) => { // arr1.push(b.inspectionItem); // }); // a.item = [...new Set(arr1)].join(","); // }); this.beginPrint(firstSample); } }) .catch((error) => { console.error(error); }); }, //å¼å§æ ç¾æå° @@ -2807,55 +3505,32 @@ return; } // let flag = true; this.$axios .post( this.$api.insOrder.upInsOrderOfState, { upInsOrderOfState({ state: 1, id: this.currentId, companyId: this.addObj.companyId, laboratory: this.addObj.laboratory, company: this.addObj.company, isCreate: this.distributeData.isCreate, }, { headers: { "Content-Type": "application/json", }, } ) }) .then((res) => { // flag = false; // if (flag) { // this.$message.error("å§æç¼å·çæå¤±è´¥"); // return; // } if (res.code === 200) { this.upLoad = true; this.$axios .post( this.$api.insOrder.upInsOrder, { upInsOrder({ orderId: this.distributeData.orderId, appointed: this.distributeData.appointed, userIdList: this.distributeData.userId, sonLaboratory: this.distributeData.sonLaboratory, }, { headers: { "Content-Type": "application/json", }, } ) }) .then((res) => { if (res.code === 201) { this.upLoad = false; return; } this.$message.success("æäº¤æå"); this.upLoad = false; this.issuedDialogVisible = false; this.$parent.playOrder(0); this.upLoad = false; this.$router.go(-1); //å®¡æ ¸éè¿åï¼èªå¨æå°äºç»´ç //TODO: çµåè¯éªå®¤ææ¶ä¸ç¨æ ç¾æå° if ( @@ -2867,32 +3542,37 @@ }); } }) .catch((e) => { .catch((error) => { this.$message.error("æäº¤å¤±è´¥"); this.upLoad = false; console.error(error); }); } }) .catch((error) => { console.error(error); }); }, getUserNow() { this.$axios.get(this.$api.user.getUserNow).then((res) => { let selects = res.data; if (selects == null) return; this.addObj.userId = selects.id; this.addObj.company = selects.company; this.addObj.custom = selects.name; this.addObj.code = selects.code; this.addObj.phone = selects.phone; this.addObj.companyId = selects.departId; init() { if (this.addObj.custom == "" || this.addObj.custom == null) { this.addObj.custom = this.loginUserInfo.nickName; //设置å¶å人为å½åç»å½äºº } else { this.addObj.custom = this.loginUserInfo.nickName; } this.addObj.company = this.loginUserInfo.companyName; this.addObj.companyId = this.loginUserInfo.company; this.addObj.userId = this.loginUserInfo.userId; // this.addObj.code = this.loginUserInfo.code; this.addObj.phone = this.loginUserInfo.phoneNumber; this.addObj.production = "/"; this.addObj.productionEn = "/"; if (this.active == 1) { this.selectInsOrderTemplate(); } }); }, getProNum() { this.sampleSelectionList.forEach((m, i) => { Vue.set( this.$set( this.sampleSelectionList[i], "proNum", m.insProduct.filter((a) => a.state == 1).length @@ -2950,13 +3630,17 @@ } }, selectStandardTreeList() { this.$axios .get(this.$api.standardTree.selectStandardTreeList2) selectStandardTreeList2() .then((res) => { if (res.code === 200) { this.list = res.data; this.list.forEach((a) => { this.expandedKeys.push(a.label); }); } }) .catch((error) => { console.error(error); }); }, filterNode(value, data) { @@ -3001,11 +3685,11 @@ }, selectsStandardMethodByFLSSM() { this.methodLoad = true; this.$axios .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { selectsStandardMethodByFLSSM({ tree: this.selectTree, }) .then((res) => { if (res.code === 200) { this.methodLoad = false; try { if ( @@ -3017,17 +3701,34 @@ let selectTree = arr0 .join("-") .substring(0, arr0.join("-").length - 1); this.$axios .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { template() .then((res) => { if (res.status === 200) { console.log(res); } }) .catch((error) => { console.error(error); }); selectsStandardMethodByFLSSM({ tree: selectTree, }) .then((ress) => { .then((res) => { if (res.code === 200) { this.methods = ress.data.standardMethodList; } }) .catch((error) => { console.error(error); }); } else { this.methods = res.data.standardMethodList; } } catch (e) {} } }) .catch((error) => { console.error(error); }); }, addStandardTree(currentValue, oldValue) { @@ -3339,12 +4040,14 @@ console.log("upProductSelect", this.sampleList); }, searchProject() { this.$axios .post(this.$api.enums.selectEnumByCategory, { category: "å 纤项ç®", }) getDicts("fiber_type") .then((res) => { if (res.code === 200) { this.opticalProject = res.data; } }) .catch((error) => { console.error(error); }); }, permute(nums) { @@ -3381,15 +4084,14 @@ return "warning-row"; }, selectInsOrderTemplate() { this.$axios .get( this.$api.insOrder.selectInsOrderTemplate + "?company=" + this.addObj.company ) selectInsOrderTemplate({ company: this.addObj.company }) .then((res) => { if (res.code == 201) return; if (res.code === 200) { this.templates = res.data; } }) .catch((error) => { console.error(error); }); }, // å 餿¨¡æ¿--è°ç¨æ¥å£ @@ -3400,19 +4102,18 @@ type: "warning", }) .then(() => { this.$axios .post(this.$api.insOrder.delInsOrderTemplate, { delInsOrderTemplate({ id: row.id, }) .then((res) => { if (res.code === 201) { return; } if (res.code === 200) { this.$message.success("å 餿å"); this.selectInsOrderTemplate(); } }) .catch((e) => { .catch((error) => { this.$message.error("å é¤å¤±è´¥"); console.error(error); }); }) .catch(() => {}); @@ -3421,30 +4122,25 @@ addTemplateDia() { if (this.templateName) { this.templateLoading = true; this.$axios .post( this.$api.insOrder.addInsOrderTemplate, { addInsOrderTemplate({ name: this.templateName, thing: JSON.stringify({ addObj: this.addObj, sampleList: this.sampleList, selectTree: this.selectTree, }), }, { headers: { "Content-Type": "application/json", }, } ) }) .then((res) => { if (res.code == 201) return; if (res.code === 200) { this.templateLoading = false; this.templateDia = false; this.$message.success("ä¿åæå"); this.selectInsOrderTemplate(); this.templateName = ""; } }) .catch((error) => { console.error(error); }); } else { this.$message.error("è¯·å¡«åæ¨¡æ¿åç§°"); @@ -3452,17 +4148,14 @@ }, // æ¥è¯¢æ¨¡æ¿ selectInsOrderTemplateById(e) { this.$axios .post(this.$api.insOrder.selectInsOrderTemplateById + "?id=" + e) selectInsOrderTemplateById({ id: e }) .then((res) => { if (res.code == 201) return; // let obj = JSON.parse(res.data) if (res.code === 200) { let obj = res.data; console.log(obj); //å¶å人设置为å½åç»å½ç¨æ· let user = JSON.parse(localStorage.getItem("user")); obj.addObj.custom = user.name; obj.addObj.userId = user.userId; obj.addObj.custom = this.loginUserInfo.nickName; obj.addObj.userId = this.loginUserInfo.userId; this.addObj = obj.addObj; this.sampleList = obj.sampleList; this.selectTree = obj.selectTree; @@ -3472,6 +4165,10 @@ this.rowClick(this.sampleList[0]); } }); } }) .catch((error) => { console.error(error); }); }, delSampleAndProduct() { @@ -3533,24 +4230,16 @@ let selectTreeList = this.selectTree.split(" - "); this.addObj.model && (selectTreeList[selectTreeList.length - 1] = this.addObj.model); this.$axios .post( this.$api.standardTree.selectStandardProductList, { selectStandardProductList({ model: (this.addObj.model ? this.addObj.model : row.model) + "-" + row.modelNum, standardMethodListId: val, factory: selectTreeList.join(" - "), }, { headers: { "Content-Type": "application/json", }, } ) }) .then((res) => { if (res.code === 200) { res.data.forEach((a) => { a.state = 0; }); @@ -3570,6 +4259,10 @@ this.standardLoading = false; } }); } }) .catch((error) => { console.error(error); }); this.searchProject(); this.searchTemList(); @@ -3590,24 +4283,16 @@ let selectTreeList = this.selectTree.split(" - "); this.addObj.model && (selectTreeList[selectTreeList.length - 1] = this.addObj.model); this.$axios .post( this.$api.standardTree.selectStandardProductList, { selectStandardProductList({ model: (this.addObj.model ? this.addObj.model : row.model) + "-" + row.modelNum, standardMethodListId: val, factory: selectTreeList.join(" - "), }, { headers: { "Content-Type": "application/json", }, } ) }) .then((res) => { if (res.code === 200) { res.data.forEach((a) => { a.state = 0; }); @@ -3627,23 +4312,27 @@ this.standardLoading = false; } }); } }) .catch((error) => { console.error(error); }); this.searchProject(); this.searchTemList(); }, searchTemList() { this.temperatureList = []; this.$axios .post(this.$api.enums.selectEnumByCategory, { category: "çµåæ¸©åº¦å¾ªç¯æ£éª", }) getDicts("temperature_cycling_type") .then((res) => { if (res.data.length > 0) { if (res.code === 200) { this.temperatureEngList = res.data; res.data.forEach((item) => { this.temperatureList.push(item.label); this.temperatureList.push(item.dictLabel); }); } }) .catch((error) => { console.error(error); }); }, changeModel() { @@ -3733,10 +4422,14 @@ // }) }, selectStandardMethods() { this.$axios .get(this.$api.standardTree.selectStandardMethodEnum) selectStandardMethodEnum() .then((res) => { if (res.code === 200) { this.methods = res.data; } }) .catch((error) => { console.error(error); }); }, selectable() { @@ -3918,42 +4611,39 @@ return; } this.noLoading = true; this.$axios .post( this.$api.insOrder.upInsOrderOfState, { upInsOrderOfState({ state: 2, id: this.currentId, tell: this.tell, }, { headers: { "Content-Type": "application/json", }, } ) }) .then((res) => { if (res.code === 200) { this.noLoading = false; this.tell = ""; if (res.code == 201) return; this.$message.success("æäº¤æå"); this.issuedDialogVisible = false; this.$parent.playOrder(0); this.$router.go(-1); } }) .catch((error) => { console.error(error); }); }, selectEnumByCategoryForSonLaboratory() { this.$axios .post(this.$api.enums.selectEnumByCategory, { category: "åå®éªå®¤", }) getDicts("sys_sub_lab") .then((res) => { if (res.code === 200) { this.factory = []; res.data.forEach((a) => { this.filters.push({ text: a.label, value: a.value, text: a.dictLabel, value: a.dictValue, }); }); } }) .catch((error) => { console.error(error); }); }, filterHandler(value, row, column) { @@ -3973,11 +4663,11 @@ return; } this.sampleIds = [this.sampleId]; this.$axios .post(this.$api.insBushing.selectBushingBySampleId, { selectBushingBySampleId({ sampleId: this.sampleId, }) .then((res) => { if (res.code === 200) { if (res.data.length === 0) { this.$message.error("è¯¥æ ·åæ²¡æé ç½®å 纤"); return; @@ -3991,6 +4681,10 @@ this.$nextTick(() => { this.configShow = true; }); } }) .catch((error) => { console.error(error); }); } }, @@ -4006,21 +4700,6 @@ this.$message.error("æªé䏿 ·å"); return; } // this.$axios.post(this.$api.insBushing.selectBushingBySampleId, { // sampleId: this.sampleId // }).then(res => { // if (res.data.length === 0) { // this.$message.error('è¯¥æ ·åæ²¡æé ç½®å 纤') // return // } // for (var i in this.sampleList) { // if (this.sampleList[i].id = this.sampleId) { // this.sampleList[i].bushing = res.data // break // } // } // this.configShow = true // }) } }, openCableConfig() { @@ -4035,21 +4714,6 @@ this.$message.error("æªé䏿 ·å"); return; } // this.$axios.post(this.$api.insBushing.selectBushingBySampleId, { // sampleId: this.sampleId // }).then(res => { // if (res.data.length === 0) { // this.$message.error('è¯¥æ ·åæ²¡æé ç½®å 纤') // return // } // for (var i in this.sampleList) { // if (this.sampleList[i].id = this.sampleId) { // this.sampleList[i].bushing = res.data // break // } // } // this.configShow = true // }) } }, upBsm1(val) { src/views/business/inspectionOrder/index.vue
@@ -177,6 +177,7 @@ </li> </ul> <lims-table highlightCurrentRow isSelection :tableData="tableData" :height="tableHeight + ''" @@ -374,6 +375,7 @@ fullscreen > <lims-table highlightCurrentRow :heigt="'80vh'" :tableData="dataLooktableData" :column="dataLookcolumn" @@ -835,7 +837,7 @@ import getLodop from "@/utils/lodop"; import Add from "./add.vue"; import { mapGetters } from "vuex"; import LimsTable from "../../../components/Table/lims-table.vue"; import LimsTable from "@/components/Table/lims-table.vue"; export default { components: { limsTable, @@ -890,6 +892,11 @@ prop: "sampleName", minWidth: "160px", width: "160px", dataType: "link", linkEvent: { method: "showDetails", vueComponent: this, }, }, { label: "æ ·åç¼å·", @@ -1803,31 +1810,6 @@ this.beginPrint(this.qrData); }); this.printDialogVisible = false; // PrintJS({ // printable: "printMOrder", //é¡µé¢ // type: "html", //ææ¡£ç±»å // maxWidth: 360, // style: `@page { // margin:0; // size: 400px 75px collapse; // margin-top:3px; // &:first-of-type{ // margin-top:0 !important; // } // } // html{ // zoom:100%; // } // @media print{ // width: 400px; // height: 75px; // margin:0; // }`, // onPrintDialogClose: (this.erexcel = false), // targetStyles: ["*"], // 使ç¨domçæææ ·å¼ï¼å¾éè¦ // font_size: "0.15cm", // }); }, print() { if (this.multipleSelection.length == 0) { @@ -1866,44 +1848,18 @@ } }, refresh() { this.componentData.entity = this.HaveJson(this.entityCopy); this.upIndex++; this.queryParams = { entrustCode: "", outEntrustCode: "", sampleName: "", sampleModel: "", sampleCode: "", startAndEndTime: [], name: "", engineering: "", production: "", }; this.refreshTable(); }, // æéåé getPower(radio) { let power = JSON.parse(sessionStorage.getItem("power")); let up = false; let del = false; let revoke = false; let check = false; let checkUpdate = false; for (var i = 0; i < power.length; i++) { if (power[i].menuMethod == "upInsOrder") { up = true; } if (power[i].menuMethod == "updateStatus") { revoke = true; } if (power[i].menuMethod == "upInsOrderOfState") { check = true; } if (power[i].menuMethod == "checkUpdate") { checkUpdate = true; } } if (!up) { this.componentData.do.splice(5, 1); } if (!checkUpdate) { this.componentData.do.splice(4, 1); } if (!revoke) { this.componentData.do.splice(3, 1); } if (!check) { this.componentData.do.splice(2, 1); } }, handleClose() { this.verifyDialogVisible = false; @@ -1926,17 +1882,17 @@ this.exportCheckedDate = []; this.dialogVisible1 = false; }, // 详æ selectAllByOne(row) { this.active = 2; // console.log(row); // //æå¼å¼¹æ¡ // this.dialogVisible = true; // //row = ç¹å»å¯¹åºè¡å¼ // //å¤å¶ç»formData // this.formData = this.HaveJson(row); this.currentId = row.id; this.examine = 1; // æ¥ç详æ showDetails(row) { this.$router.push({ name: "showDetails", query: { active: 2, currentId: row.id, examine: 1, isReview: true, }, }); }, // æ°æ®æ¥ç handleDataLook(row) { @@ -2646,13 +2602,15 @@ }, // ä¸å playOrder(num) { // this.active = num; // this.examine = 0; this.$router.push({ name: "addOrder", params: {}, query: { active: num, examine: 0, }, }); this.active = num; this.examine = 0; // this.refreshTable(); }, handleTab(m, i) { this.tabIndex = i;