Merge branch 'dev' of http://114.132.189.42:9002/r/center-lims-before-ruoyi into dev
| | |
| | | "vue-cropper": "0.5.5", |
| | | "vue-demi": "^0.14.10", |
| | | "vue-meta": "2.4.0", |
| | | "vue-qr": "^4.0.9", |
| | | "vue-router": "3.4.9", |
| | | "vuedraggable": "2.24.3", |
| | | "vuex": "3.6.0", |
| | |
| | | // è·å人äºç³»ç»ç»ç» |
| | | export function selectCompaniesList() { |
| | | return request({ |
| | | url: "/companies/selectCompaniesList", |
| | | url: "/system/newUser/selectCompaniesList", |
| | | method: "get", |
| | | }); |
| | | } |
| | | // è·å人äºç³»ç»ç»ç»ä¸ç人å |
| | | export function selectSimpleList(data) { |
| | | return request({ |
| | | url: "/companies/selectSimpleList", |
| | | method: "post", |
| | | url: "/system/newUser/selectSimpleList", |
| | | method: "get", |
| | | params: data, |
| | | }); |
| | | } |
| | | // è·å人äºç³»ç»ç»ç»ä¸ç人å |
| | | export function addPersonUser(data) { |
| | | return request({ |
| | | url: "/companies/addPersonUser", |
| | | url: "/system/newUser/addPersonUser", |
| | | method: "post", |
| | | params: data, |
| | | data: data, |
| | | }); |
| | | } |
| | | // è·åè§è² |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div :class="{ 'basic-container--block': block }" class="basic-container"> |
| | | <!-- <el-card> |
| | | <slot /> |
| | | </el-card> --> |
| | | <slot /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "BasicContainer", |
| | | props: { |
| | | block: { |
| | | type: Boolean, |
| | | default: false, |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | .basic-container { |
| | | padding: 15px; |
| | | margin: 10px 15px; |
| | | // border-radius: 10px; |
| | | box-sizing: border-box; |
| | | background-color: #fff; |
| | | .el-card { |
| | | width: 100%; |
| | | box-sizing: border-box; |
| | | } |
| | | &:first-child { |
| | | // padding-top: 0; |
| | | } |
| | | &--block { |
| | | height: 100%; |
| | | .el-card { |
| | | height: 100%; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | width: 100%; |
| | | position: relative; |
| | | overflow: hidden; |
| | | background: rgb(245, 247, 251); |
| | | } |
| | | |
| | | .fixed-header + .app-main { |
| | |
| | | import { getToken } from "@/utils/auth"; |
| | | // æ¶é´è½¬æ¢ |
| | | import Moment from "moment"; |
| | | import basicContainer from './components/basic-container/main' |
| | | |
| | | // å
¨å±æ¹æ³æè½½ |
| | | Vue.prototype.getDicts = getDicts; |
| | |
| | | Vue.component("FileUpload", FileUpload); |
| | | Vue.component("ImageUpload", ImageUpload); |
| | | Vue.component("ImagePreview", ImagePreview); |
| | | // 注åå
¨å±å®¹å¨ |
| | | Vue.component('basicContainer', basicContainer) |
| | | |
| | | Vue.use(directive); |
| | | Vue.use(plugins); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // lodop.js |
| | | //= =æ¬JSæ¯å è½½Lodopæä»¶åCLodopæå¡ç综å示ä¾ï¼å¯ç´æ¥ä½¿ç¨ï¼å»ºè®®çæåèè¿èªå·±é¡µé¢ç¨åº== |
| | | var CreatedOKLodopObject, CLodopIsLocal, CLodopJsState |
| | | |
| | | //= =夿æ¯å¦éè¦CLodop(é£äºä¸æ¯ææä»¶çæµè§å¨):== |
| | | function needCLodop() { |
| | | try { |
| | | var ua = navigator.userAgent |
| | | if (ua.match(/Windows\sPhone/i)) return true |
| | | if (ua.match(/iPhone|iPod|iPad/i)) return true |
| | | if (ua.match(/Android/i)) return true |
| | | if (ua.match(/Edge\D?\d+/i)) return true |
| | | |
| | | var verTrident = ua.match(/Trident\D?\d+/i) |
| | | var verIE = ua.match(/MSIE\D?\d+/i) |
| | | var verOPR = ua.match(/OPR\D?\d+/i) |
| | | var verFF = ua.match(/Firefox\D?\d+/i) |
| | | var x64 = ua.match(/x64/i) |
| | | if (!verTrident && !verIE && x64) return true |
| | | else if (verFF) { |
| | | verFF = verFF[0].match(/\d+/) |
| | | if (verFF[0] >= 41 || x64) return true |
| | | } else if (verOPR) { |
| | | verOPR = verOPR[0].match(/\d+/) |
| | | if (verOPR[0] >= 32) return true |
| | | } else if (!verTrident && !verIE) { |
| | | var verChrome = ua.match(/Chrome\D?\d+/i) |
| | | if (verChrome) { |
| | | verChrome = verChrome[0].match(/\d+/) |
| | | if (verChrome[0] >= 41) return true |
| | | } |
| | | } |
| | | return false |
| | | } catch (err) { |
| | | return true |
| | | } |
| | | } |
| | | |
| | | //= =å è½½å¼ç¨CLodopç主JS,ç¨å端å£8000å18000(以é²å
¶ä¸ä¸ä¸ªè¢«å ):== |
| | | function loadCLodop() { |
| | | if (CLodopJsState == 'loading' || CLodopJsState == 'complete') return |
| | | CLodopJsState = 'loading' |
| | | var head = |
| | | document.head || |
| | | document.getElementsByTagName('head')[0] || |
| | | document.documentElement |
| | | var JS1 = document.createElement('script') |
| | | var JS2 = document.createElement('script') |
| | | JS1.src = 'http://localhost:8000/CLodopfuncs.js?priority=1' |
| | | JS2.src = 'http://localhost:18000/CLodopfuncs.js' |
| | | JS1.onload = JS2.onload = function() { |
| | | CLodopJsState = 'complete' |
| | | } |
| | | JS1.onerror = JS2.onerror = function(evt) { |
| | | CLodopJsState = 'complete' |
| | | } |
| | | head.insertBefore(JS1, head.firstChild) |
| | | head.insertBefore(JS2, head.firstChild) |
| | | CLodopIsLocal = !!(JS1.src + JS2.src).match(/\/\/localho|\/\/127.0.0./i) |
| | | } |
| | | |
| | | if (needCLodop()) { |
| | | loadCLodop() |
| | | } // å è½½ |
| | | |
| | | //= =è·åLODOP对象主è¿ç¨,夿æ¯å¦å®è£
ãéå¦å级:== |
| | | export default function getLodop(oOBJECT, oEMBED) { |
| | | var strHtmInstall = |
| | | '<br><font color=\'#FF00FF\'>æå°æ§ä»¶æªå®è£
!ç¹å»è¿é<a href=\'install_lodop32.exe\' target=\'_self\'>æ§è¡å®è£
</a>,å®è£
åè¯·å·æ°é¡µé¢æéæ°è¿å
¥ã</font>' |
| | | var strHtmUpdate = |
| | | '<br><font color=\'#FF00FF\'>æå°æ§ä»¶éè¦å级!ç¹å»è¿é<a href=\'install_lodop32.exe\' target=\'_self\'>æ§è¡å级</a>,å级åè¯·éæ°è¿å
¥ã</font>' |
| | | var strHtm64_Install = |
| | | '<br><font color=\'#FF00FF\'>æå°æ§ä»¶æªå®è£
!ç¹å»è¿é<a href=\'install_lodop64.exe\' target=\'_self\'>æ§è¡å®è£
</a>,å®è£
åè¯·å·æ°é¡µé¢æéæ°è¿å
¥ã</font>' |
| | | var strHtm64_Update = |
| | | '<br><font color=\'#FF00FF\'>æå°æ§ä»¶éè¦å级!ç¹å»è¿é<a href=\'install_lodop64.exe\' target=\'_self\'>æ§è¡å级</a>,å级åè¯·éæ°è¿å
¥ã</font>' |
| | | var strHtmFireFox = |
| | | '<br><br><font color=\'#FF00FF\'>ï¼æ³¨æï¼å¦æ¾å®è£
è¿Lodopæ§çéä»¶npActiveXPLugin,请å¨ãå·¥å
·ã->ãéå ç»ä»¶ã->ãæ©å±ãä¸å
å¸å®ï¼</font>' |
| | | var strHtmChrome = |
| | | '<br><br><font color=\'#FF00FF\'>(妿æ¤åæ£å¸¸ï¼ä»
å æµè§å¨å级æéå®è£
èåºé®é¢ï¼ééæ°æ§è¡ä»¥ä¸å®è£
ï¼</font>' |
| | | var strCLodopInstall_1 = |
| | | '<br><font color=\'#FF00FF\'>Webæå°æå¡CLodopæªå®è£
å¯å¨ï¼ç¹å»è¿é<a href=\'CLodop_Setup_for_Win32NT.exe\' target=\'_self\'>ä¸è½½æ§è¡å®è£
</a>' |
| | | var strCLodopInstall_2 = |
| | | '<br>ï¼è¥æ¤åå·²å®è£
è¿ï¼å¯<a href=\'CLodop.protocol:setup\' target=\'_self\'>ç¹è¿éç´æ¥å次å¯å¨</a>ï¼' |
| | | var strCLodopInstall_3 = 'ï¼æååè¯·å·æ°æ¬é¡µé¢ã</font>' |
| | | var strCLodopUpdate = |
| | | '<br><font color=\'#FF00FF\'>Webæå°æå¡CLodopéå级!ç¹å»è¿é<a href=\'CLodop_Setup_for_Win32NT.exe\' target=\'_self\'>æ§è¡å级</a>,å级åè¯·å·æ°é¡µé¢ã</font>' |
| | | var LODOP |
| | | try { |
| | | var ua = navigator.userAgent |
| | | var isIE = !!ua.match(/MSIE/i) || !!ua.match(/Trident/i) |
| | | if (needCLodop()) { |
| | | try { |
| | | LODOP = getCLodop() |
| | | } catch (err) {} |
| | | if (!LODOP && CLodopJsState !== 'complete') { |
| | | if (CLodopJsState == 'loading') |
| | | alert('ç½é¡µè¿æ²¡ä¸è½½å®æ¯ï¼è¯·ç¨çä¸ä¸åæä½.') |
| | | else alert('没æå è½½CLodopç主jsï¼è¯·å
è°ç¨loadCLodopè¿ç¨.') |
| | | return |
| | | } |
| | | if (!LODOP) { |
| | | document.body.innerHTML = |
| | | strCLodopInstall_1 + |
| | | (CLodopIsLocal ? strCLodopInstall_2 : '') + |
| | | strCLodopInstall_3 + |
| | | document.body.innerHTML |
| | | return |
| | | } else { |
| | | if (CLODOP.CVERSION < '4.1.2.3') { |
| | | document.body.innerHTML = strCLodopUpdate + document.body.innerHTML |
| | | } |
| | | if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED) // æ¸
çæ§çæ æå
ç´ |
| | | if (oOBJECT && oOBJECT.parentNode) |
| | | oOBJECT.parentNode.removeChild(oOBJECT) |
| | | } |
| | | } else { |
| | | var is64IE = isIE && !!ua.match(/x64/i) |
| | | //= =妿页颿Lodopå°±ç´æ¥ä½¿ç¨,å¦åæ°å»º:== |
| | | if (oOBJECT || oEMBED) { |
| | | if (isIE) LODOP = oOBJECT |
| | | else LODOP = oEMBED |
| | | } else if (!CreatedOKLodopObject) { |
| | | LODOP = document.createElement('object') |
| | | LODOP.setAttribute('width', 0) |
| | | LODOP.setAttribute('height', 0) |
| | | LODOP.setAttribute( |
| | | 'style', |
| | | 'position:absolute;left:0px;top:-100px;width:0px;height:0px;' |
| | | ) |
| | | if (isIE) |
| | | LODOP.setAttribute( |
| | | 'classid', |
| | | 'clsid:2105C259-1E0C-4534-8141-A753534CB4CA' |
| | | ) |
| | | else LODOP.setAttribute('type', 'application/x-print-lodop') |
| | | document.documentElement.appendChild(LODOP) |
| | | CreatedOKLodopObject = LODOP |
| | | } else LODOP = CreatedOKLodopObject |
| | | //= =Lodopæä»¶æªå®è£
æ¶æç¤ºä¸è½½å°å:== |
| | | if (!LODOP || !LODOP.VERSION) { |
| | | if (ua.indexOf('Chrome') >= 0) |
| | | document.body.innerHTML = strHtmChrome + document.body.innerHTML |
| | | if (ua.indexOf('Firefox') >= 0) |
| | | document.body.innerHTML = strHtmFireFox + document.body.innerHTML |
| | | document.body.innerHTML = |
| | | (is64IE ? strHtm64_Install : strHtmInstall) + document.body.innerHTML |
| | | return LODOP |
| | | } |
| | | } |
| | | if (LODOP.VERSION < '6.2.2.6') { |
| | | if (!needCLodop()) |
| | | document.body.innerHTML = |
| | | (is64IE ? strHtm64_Update : strHtmUpdate) + document.body.innerHTML |
| | | } |
| | | //= ==å¦ä¸ç©ºç½ä½ç½®éåè°ç¨ç»ä¸åè½(妿³¨åè¯å¥ãè¯è¨éæ©ç):== |
| | | |
| | | LODOP.SET_LICENSES( |
| | | '', |
| | | 'EE0887D00FCC7D29375A695F728489A6', |
| | | 'C94CEE276DB2187AE6B65D56B3FC2848', |
| | | '' |
| | | ) |
| | | |
| | | //= ====================================================== |
| | | return LODOP |
| | | } catch (err) { |
| | | alert('getLodopåºé:' + err) |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <style scoped> |
| | | .ins_order_add { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | | .ins_order_add::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | width: calc(100% - 40px); |
| | | background-color: #fff; |
| | | padding: 5px 40px 5px 0; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 50px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 120px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .el-select-dropdown__item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pairing { |
| | | text-align: center; |
| | | line-height: 36px; |
| | | margin: 3px 0; |
| | | border: 1px solid rgba(0, 0, 0, 0.1); |
| | | border-radius: 4px; |
| | | } |
| | | |
| | | .askRts { |
| | | width: 100px; |
| | | font-size: 12px; |
| | | border-top: 0; |
| | | border-left: 0; |
| | | border-right: 0; |
| | | border-bottom: 2px solid rgba(0, 0, 0, 0.3); |
| | | text-align: center; |
| | | background-color: rgba(0, 0, 0, 0.1); |
| | | outline: none; |
| | | border-radius: 2px; |
| | | line-height: 24px; |
| | | margin-top: 5px; |
| | | } |
| | | .circulateTable { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | } |
| | | .opticalProject { |
| | | width: 38%; |
| | | } |
| | | .temperatureList { |
| | | width: 60%; |
| | | } |
| | | .temperatureListTitle { |
| | | display: flex; |
| | | flex-direction: row; |
| | | justify-content: space-between; |
| | | line-height: 30px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .ins_order_add .el-input-group__append, |
| | | .el-input-group__prepend { |
| | | padding: 0 10px; |
| | | } |
| | | |
| | | .ins_order_add .el-tree-node__content { |
| | | height: 32px; |
| | | font-size: 14px; |
| | | border-radius: 2px; |
| | | } |
| | | |
| | | .ins_order_add |
| | | .el-tree--highlight-current |
| | | .el-tree-node.is-current |
| | | > .el-tree-node__content { |
| | | color: #3a7bfa; |
| | | } |
| | | |
| | | .ins_order_add .has-gutter .el-table__cell .cell { |
| | | line-height: 30px; |
| | | background-color: #fafafa; |
| | | } |
| | | |
| | | .ins_order_add .has-gutter .el-table__cell { |
| | | background-color: #fafafa !important; |
| | | } |
| | | |
| | | .ins_order_add .el-table__row .cell { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .ins_order_add .el-table .warning-row .cell { |
| | | color: #3a7bfa; |
| | | } |
| | | |
| | | .ins_order_add .el-select .is-disabled { |
| | | background: transparent !important; |
| | | } |
| | | |
| | | .ins_order_add .el-select .is-disabled .el-input__inner { |
| | | background: transparent !important; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div>add</div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default {}; |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="ins_order_config"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;text-align: left;">çµç¼é
ç½®</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-button size="medium" @click="outConfig"> |
| | | <span style="color: #3A7BFA;">è¿ å</span> |
| | | </el-button> |
| | | <el-button size="medium" type="primary" @click="save">ä¿ å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search"> |
| | | <el-radio-group v-model="currentTab" size="small" style="margin-left: 20px;" @input="changeTab"> |
| | | <el-radio-button label="ç»ç¼">ç» ç¼</el-radio-button> |
| | | <el-radio-button label="æ¤å¥">æ¤ å¥</el-radio-button> |
| | | </el-radio-group> |
| | | <div class="search_thing" v-if="currentTab=='ç»ç¼'"> |
| | | <div class="search_label">è¯æ°ï¼</div> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="insulating.num"></el-input> |
| | | </div> |
| | | <div class="search_thing" v-if="currentTab=='ç»ç¼'"> |
| | | <div class="search_label">æ£éªæ åï¼</div> |
| | | <el-select v-model="insulating.standardMethodListId" placeholder="è¯·éæ©æ£éªæ å" size="small" |
| | | @change="(value)=>methodChange(value)"> |
| | | <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search_thing" v-if="currentTab=='æ¤å¥'"> |
| | | <div class="search_label">æ£éªæ åï¼</div> |
| | | <el-select v-model="sheath.standardMethodListId" placeholder="è¯·éæ©æ£éªæ å" size="small" |
| | | @change="(value)=>methodChange(value)"> |
| | | <el-option v-for="item in standards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table class="el-table" ref="productTable" :data="productList" height="100%" tooltip-effect="dark" border |
| | | @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" |
| | | :row-class-name="tableRowClassName" @select-all="handleAll"> |
| | | <el-table-column type="selection" width="65" :selectable="selectable"></el-table-column> |
| | | <el-table-column prop="inspectionItem" label="æ£éªé¡¹" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItemSubclass" label="æ£éªé¡¹å项" min-width="140" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="sonLaboratory" label="åå®éªå®¤" min-width="130" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="methodS" label="è¯éªæ¹æ³" min-width="120" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="计éåä½" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="price" label="åä»·" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="section" label="åºé´" min-width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="ask" label="è¦æ±å¼" min-width="220px"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="è¦æ±å¼" v-model="scope.row.ask" clearable type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" |
| | | v-if="active==1&&isAskOnlyRead"></el-input> |
| | | <span v-else>{{ scope.row.ask }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { Tree } from 'element-ui' |
| | | export default { |
| | | props: { |
| | | active: { |
| | | type: Number, |
| | | default: () => 0 |
| | | }, |
| | | }, |
| | | data(vm) { |
| | | return { |
| | | standardList:[], |
| | | vaule0:'', |
| | | currentTab:'ç»ç¼', |
| | | upIndex:0, |
| | | productList: [], |
| | | productIds: [], |
| | | sample: [], |
| | | tree: '', |
| | | standards: [], |
| | | insulating: { |
| | | standardMethodListId: null, |
| | | insProduct: [], |
| | | num: 1 |
| | | }, |
| | | sheath: { |
| | | standardMethodListId: null, |
| | | insProduct: [] |
| | | }, |
| | | isAskOnlyRead: false |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$parent.sampleIds.forEach(a => { |
| | | for (var i = 0; i < this.$parent.sampleList.length; i++) { |
| | | if (this.$parent.sampleList[i].id == a) { |
| | | this.sample.push(this.$parent.sampleList[i]) |
| | | if(this.$parent.sampleList[i].insulating !== undefined && this.$parent.sampleList[i].insulating !== null){ |
| | | this.insulating = this.$parent.sampleList[i].insulating |
| | | } |
| | | if(this.$parent.sampleList[i].sheath !== undefined && this.$parent.sampleList[i].sheath !== null){ |
| | | this.sheath = this.$parent.sampleList[i].sheath |
| | | } |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | let obj = this.$parent.addObj |
| | | this.tree = obj.factory + ' - ' + obj.laboratory + ' - ' + obj.sampleType + ' - ' + obj.sample |
| | | this.selectsStandardMethodByFLSSM2() |
| | | this.productList = this.insulating.insProduct |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 200) |
| | | }, |
| | | methods: { |
| | | outConfig() { |
| | | this.$parent.cableConfigShow = false |
| | | }, |
| | | selectProduct(val) { |
| | | this.productIds = [] |
| | | val.forEach(a => { |
| | | this.productIds.push(a.id) |
| | | }) |
| | | }, |
| | | upProductSelect(selection, row) { |
| | | row.state = row.state == 1 ? 0 : 1 |
| | | }, |
| | | handleAll(e) { |
| | | if (e.length > 0) { |
| | | this.productList.map(m => { |
| | | m.state = 1 |
| | | return m |
| | | }) |
| | | } else { |
| | | this.productList.map(m => { |
| | | m.state = 0 |
| | | return m |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.productTable.doLayout() |
| | | }) |
| | | }, |
| | | tableRowClassName({ |
| | | row, |
| | | rowIndex |
| | | }) { |
| | | if (row.state === 0) { |
| | | return 'warning-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | selectable() { |
| | | if (this.active > 1) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | }, |
| | | selectsStandardMethodByFLSSM2() { |
| | | this.standards = [] |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: this.tree |
| | | }).then(res => { |
| | | this.standards = res.data.standardMethodList |
| | | }) |
| | | }, |
| | | methodChange(val) { |
| | | if (val === null || val === '') return |
| | | let standard = this.standards.find(a => a.id === val) |
| | | if(standard!=null && standard.code==='å§æè¦æ±'){ |
| | | this.isAskOnlyRead = true |
| | | }else{ |
| | | this.isAskOnlyRead = false |
| | | } |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: this.$parent.addObj.model, |
| | | standardMethodListId: val, |
| | | factory: this.tree + ' - ' |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | res.data.forEach(a => { |
| | | a.state = 0 |
| | | }) |
| | | if(this.currentTab==='ç»ç¼'){ |
| | | this.insulating.insProduct = res.data |
| | | }else if(this.currentTab==='æ¤å¥'){ |
| | | this.sheath.insProduct = res.data |
| | | } |
| | | this.productList = res.data |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 200) |
| | | }) |
| | | }, |
| | | toggleSelection(row) { |
| | | this.$refs.productTable.toggleRowSelection(row, true); |
| | | }, |
| | | save(){ |
| | | if(this.insulating.insProduct.length === 0 && this.sheath.insProduct.length === 0){ |
| | | this.$message.error('缺å°é
ç½®æ æ³ä¿å') |
| | | return |
| | | } |
| | | if(this.insulating.insProduct.length !== 0){ |
| | | if(this.insulating.num === null || this.insulating.num === '' || this.insulating.num <= 0){ |
| | | this.$message.error('缺å°è¯æ°æ æ³ä¿å') |
| | | return |
| | | } |
| | | } |
| | | this.sample.forEach(a=>{ |
| | | a.insulating = this.insulating |
| | | a.sheath = this.sheath |
| | | }) |
| | | this.$message.success('å·²ä¿å') |
| | | }, |
| | | changeTab(val){ |
| | | if(val==='ç»ç¼'){ |
| | | this.productList = this.insulating.insProduct |
| | | }else if(val==='æ¤å¥'){ |
| | | this.productList = this.sheath.insProduct |
| | | } |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 200) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ins_order_config { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | | .ins_order_config::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 300px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 100px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 70px); |
| | | } |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 26px - 24px); |
| | | padding: 20px; |
| | | } |
| | | </style> |
| | | <style> |
| | | .ins_order_config .has-gutter .el-table__cell .cell { |
| | | line-height: 30px; |
| | | background-color: #fafafa; |
| | | } |
| | | |
| | | .ins_order_config .has-gutter .el-table__cell { |
| | | background-color: #fafafa !important; |
| | | } |
| | | |
| | | .ins_order_config .el-table__row .cell { |
| | | font-size: 12px; |
| | | } |
| | | |
| | | .ins_order_config .el-table .warning-row .cell { |
| | | color: #bababa; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="ins_order_config"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;text-align: left;">åæ ·åé
ç½®</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="addChild" v-if="active==1">æ·»å åæ ·å</el-button> |
| | | <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">ä¿ å</el-button> |
| | | <el-button size="medium" @click="outConfig"> |
| | | <span style="color: #3A7BFA;">è¿ å</span> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="center"> |
| | | <el-table class="el-table sampleTable" ref="sampleTable" :data="sampleList" height="50%" tooltip-effect="dark" |
| | | border highlight-current-row @row-click="rowClick" @current-change="selectSample"> |
| | | <!-- <el-table-column type="selection" width="60" :selectable="selectable" v-if="active==1"></el-table-column> --> |
| | | <el-table-column type="index" label="åºå·" width="65" align="center"></el-table-column> |
| | | <el-table-column prop="sample" label="æ ·ååç§°" align="center" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="sampleCode" label="æ ·åç¼å·" min-width="140" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.sampleCode" clearable placeholder="ä¸å¡«ååç³»ç»èªå¨çæ" |
| | | :readonly="active>1"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="æ ·ååå·" align="center" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="æ ·ååå·" |
| | | size="small" @change="handleChangeModel" :disabled="active>1" style="width: 100%;"> |
| | | <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="modelNum" label="åå·åæ°" width="130" align="center" v-if="!(active>1)"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="éå¿
å¡«" |
| | | @keyup.enter.native="methodChange(scope.row.standardMethodListId, scope.row)" |
| | | @clear="methodChange(scope.row.standardMethodListId, scope.row)"></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="standardMethodListId" label="æ£éªæ å" align="center" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1" |
| | | placeholder="æ£éªæ å" size="small" :loading="methodLoad" @change="(value)=>methodChange(value, scope.row)" |
| | | @focus="methodFocus" :readonly="active>1" style="width: 100%;"> |
| | | <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="æ ·åæ°é" align="center" width="90"> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-button @click.native.prevent="deleteRow(scope.$index, sampleList)" type="text" |
| | | size="small">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-table class="el-table" ref="productTable" :data="productList" height="50%" tooltip-effect="dark" border |
| | | @selection-change="selectProduct" style="margin-bottom: 10px;" @select="upProductSelect" |
| | | :row-class-name="tableRowClassName" v-loading="getProductLoad" @select-all="handleAll"> |
| | | <el-table-column type="selection" width="65" :selectable="selectable" v-if="active==1"></el-table-column> |
| | | <el-table-column prop="inspectionItem" label="æ£éªé¡¹" min-width="140" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItemSubclass" label="æ£éªé¡¹å项" min-width="140" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="sonLaboratory" label="åå®éªå®¤" min-width="130" show-overflow-tooltip :filters="filters" |
| | | :filter-method="filterHandler"></el-table-column> |
| | | <el-table-column prop="methodS" label="è¯éªæ¹æ³" min-width="120" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="计éåä½" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="price" label="åä»·" width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="section" label="åºé´" min-width="120" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="ask" label="è¦æ±å¼" min-width="220px"> |
| | | <template slot-scope="scope"> |
| | | <el-input size="small" placeholder="è¦æ±å¼" v-model="scope.row.ask" clearable type="textarea" |
| | | :autosize="{ minRows: 1, maxRows: 3}" @change="e=>requestChange(e,scope.row)" |
| | | v-if="active==1&&isAskOnlyRead"></el-input> |
| | | <span v-else>{{ scope.row.ask }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-dialog title="éæ©åæ ·å" :visible.sync="selectStandardTree" width="400px" @closed="addObj.sampleNum = 1"> |
| | | <div class="body" style="height: 60vh;overflow-y: auto;user-select: none;" v-if="selectStandardTree"> |
| | | <el-row style="margin-bottom: 10px;"> |
| | | <el-col :span="24"> |
| | | <label>æ ·åæ°éï¼</label> |
| | | <el-input-number v-model="addObj.sampleNum" :min="1" label="请è¾å
¥æ°é" size="small"></el-input-number> |
| | | </el-col> |
| | | </el-row> |
| | | <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="bsm1Dia" width="500px" :show-close="false" |
| | | :before-close="beforeClose"> |
| | | <div class="body" style="max-height: 60vh;"> |
| | | <el-row v-if="bsm1"> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"><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"></el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">è¦æ±å¼ï¼</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> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | active: { |
| | | type: Number, |
| | | default: () => 0 |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | saveLoad: false, |
| | | sampleList: [], |
| | | productList: [], |
| | | getProductLoad: false, |
| | | filters: [], |
| | | sampleIds: [], |
| | | isAskOnlyRead: false, |
| | | selectStandardTree: false, |
| | | search: '', |
| | | expandedKeys: [], |
| | | addObj: { |
| | | sampleNum: 1, |
| | | }, |
| | | selectTree: null, |
| | | models: [], |
| | | sample: { |
| | | sampleCode: null, |
| | | laboratory: null, |
| | | factory: null, |
| | | sampleType: null, |
| | | sample: null, |
| | | model: null, |
| | | modelNum: null, |
| | | sampleNum: 1, |
| | | isLeave: 0, |
| | | unit: null |
| | | }, |
| | | currentMethod: null, |
| | | methods: [], |
| | | methodLoad: false, |
| | | sampleId: null, |
| | | bsmRow: null, |
| | | bsm1: false, |
| | | bsm1Val: null, |
| | | bsm1Dia: false, |
| | | list: [], |
| | | parentSample: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectStandardTreeList() |
| | | this.selectStandardMethods() |
| | | this.$parent.sampleIds.forEach(a => { |
| | | for (var i = 0; i < this.$parent.sampleList.length; i++) { |
| | | if (this.$parent.sampleList[i].id == a) { |
| | | this.sampleList = this.$parent.sampleList[i].childSampleList |
| | | this.parentSample.push(this.$parent.sampleList[i]) |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | methods: { |
| | | selectStandardTreeList() { |
| | | this.$axios.get(this.$api.standardTree.selectStandardTreeList).then(res => { |
| | | this.list = res.data |
| | | this.list.forEach(a => { |
| | | this.expandedKeys.push(a.label) |
| | | }) |
| | | }) |
| | | }, |
| | | save() { |
| | | if (this.sampleList.length === 0) { |
| | | this.$message.error('缺å°é
ç½®æ æ³ä¿å') |
| | | return |
| | | } |
| | | this.parentSample.forEach(a => { |
| | | a.childSampleList = this.sampleList |
| | | }) |
| | | this.$message.success('å·²ä¿å') |
| | | }, |
| | | deleteRow(index, rows) { |
| | | this.productList = [] |
| | | rows.splice(index, 1); |
| | | }, |
| | | outConfig() { |
| | | this.$parent.equipConfigShow = false |
| | | }, |
| | | addChild() { |
| | | this.selectStandardTree = true |
| | | }, |
| | | selectSample(val) { |
| | | if (val === null) return |
| | | this.sampleIds = [val.id] |
| | | }, |
| | | rowClick(row, column, event) { |
| | | this.currentMethod = row |
| | | let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) |
| | | if (obj && obj.code == 'å§æè¦æ±') { |
| | | this.isAskOnlyRead = true |
| | | } else { |
| | | this.isAskOnlyRead = false |
| | | } |
| | | this.sampleId = row.id |
| | | if (this.active !== 1) { |
| | | this.sampleIds = [] |
| | | this.sampleIds.push(row.id) |
| | | } |
| | | this.productList = row.insProduct |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 200) |
| | | }, |
| | | toggleSelection(row) { |
| | | this.$refs.productTable.toggleRowSelection(row, true); |
| | | }, |
| | | selectable() { |
| | | if (this.active > 1) { |
| | | return false |
| | | } else { |
| | | return true |
| | | } |
| | | }, |
| | | handleChangeModel(e) { |
| | | let num = this.selectTree.split('-').length; |
| | | if (num != 5) { |
| | | this.selectTree = this.selectTree + ' - ' + e |
| | | } else { |
| | | let arr = this.selectTree.split('-') |
| | | let arr0 = arr.slice(0, arr.length - 1) |
| | | this.selectTree = arr0.join('-') + '- ' + e |
| | | } |
| | | }, |
| | | methodChange(val, row) { |
| | | if (val === null || val === '') return |
| | | this.currentMethod = row |
| | | let obj = this.methods.find(a => a.id == this.currentMethod.standardMethodListId) |
| | | if (obj && obj.code == 'å§æè¦æ±') { |
| | | this.isAskOnlyRead = true |
| | | } else { |
| | | this.isAskOnlyRead = false |
| | | } |
| | | this.getProductLoad = true |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: row.model + '-' + row.modelNum, |
| | | standardMethodListId: val, |
| | | factory: this.selectTree, |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | res.data.forEach(a => { |
| | | a.state = 0 |
| | | }) |
| | | row.insProduct = this.HaveJson(res.data) |
| | | this.getProductLoad = false |
| | | this.productList = row.insProduct |
| | | this.$refs.sampleTable.setCurrentRow(row) |
| | | setTimeout(() => { |
| | | this.productList.forEach(a => { |
| | | if (a.state == 1) this.toggleSelection(a) |
| | | }) |
| | | }, 200) |
| | | }) |
| | | }, |
| | | methodFocus() { |
| | | this.selectsStandardMethodByFLSSM() |
| | | }, |
| | | selectStandardMethods() { |
| | | this.$axios.get(this.$api.standardTree.selectStandardMethodEnum).then(res => { |
| | | this.methods = res.data |
| | | }) |
| | | }, |
| | | selectsStandardMethodByFLSSM() { |
| | | this.methodLoad = true |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: this.selectTree |
| | | }).then(res => { |
| | | this.methodLoad = false |
| | | try { |
| | | if (res.data.standardMethodList.length == 0 && this.selectTree.split('-').length == 5) { |
| | | let arr = this.selectTree.split('-') |
| | | let arr0 = arr.slice(0, arr.length - 1) |
| | | let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1) |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: selectTree |
| | | }).then(ress => { |
| | | this.methods = ress.data.standardMethodList |
| | | }) |
| | | } else { |
| | | this.methods = res.data.standardMethodList |
| | | } |
| | | } catch (e) {} |
| | | }) |
| | | }, |
| | | selectProduct(val) { |
| | | this.productIds = [] |
| | | val.forEach(a => { |
| | | this.productIds.push(a.id) |
| | | }) |
| | | }, |
| | | upProductSelect(selection, row) { |
| | | row.state = row.state == 1 ? 0 : 1 |
| | | if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) { |
| | | if (row.section.indexOf('[') > -1) { |
| | | this.bsmRow = this.HaveJson(row) |
| | | } |
| | | this.bsm1 = true |
| | | this.bsm1Dia = true |
| | | } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) { |
| | | this.bsm1 = false |
| | | } |
| | | this.sampleList.map(item => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map(m => { |
| | | if (m.id == row.id) { |
| | | m.state = row.state; |
| | | } |
| | | return m; |
| | | }) |
| | | } |
| | | return item |
| | | }) |
| | | }, |
| | | tableRowClassName({ |
| | | row, |
| | | rowIndex |
| | | }) { |
| | | if (row.state === 0) { |
| | | return 'warning-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | handleAll(e) { |
| | | if (e.length > 0) { |
| | | this.productList.map(m => { |
| | | m.state = 1 |
| | | return m |
| | | }) |
| | | } else { |
| | | this.productList.map(m => { |
| | | m.state = 0 |
| | | return m |
| | | }) |
| | | } |
| | | this.productList.forEach(p => { |
| | | if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 1) { |
| | | if (p.section.indexOf('[') > -1) { |
| | | this.bsmRow = this.HaveJson(p) |
| | | } |
| | | this.bsm1 = true |
| | | this.bsm1Dia = true |
| | | } else if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 0) { |
| | | this.bsm1 = false |
| | | } |
| | | }) |
| | | if (e.length > 0) { |
| | | this.sampleList.map(item => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map(m => { |
| | | m.state = 1 |
| | | return m; |
| | | }) |
| | | } |
| | | return item |
| | | }) |
| | | } else { |
| | | this.sampleList.map(item => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map(m => { |
| | | m.state = 0 |
| | | return m; |
| | | }) |
| | | } |
| | | return item |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.productTable.doLayout() |
| | | }) |
| | | }, |
| | | filterHandler(value, row, column) { |
| | | const property = column['property']; |
| | | return row[property] === value; |
| | | }, |
| | | requestChange(e, row) { |
| | | this.sampleList.map(item => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map(m => { |
| | | if (m.id == row.id) { |
| | | m.ask = e; |
| | | } |
| | | return m; |
| | | }) |
| | | } |
| | | return item |
| | | }) |
| | | }, |
| | | activeStandardTree() { |
| | | let trees = this.selectTree.split(" - ") |
| | | if (trees.length < 4) { |
| | | this.$message.error('æªéæ©å产å') |
| | | return |
| | | } |
| | | this.addObj.factory = trees[0] |
| | | this.addObj.laboratory = trees[1] |
| | | this.addObj.sampleType = trees[2] |
| | | if(trees[3]===''){ |
| | | this.addObj.sample = (trees[4] == undefined ? null : trees[4]) |
| | | }else if(trees[3]===undefined){ |
| | | this.addObj.sample = trees[2] |
| | | }else{ |
| | | this.addObj.sample = trees[3] |
| | | } |
| | | this.addObj.model = (trees[4] == undefined ? null : trees[4]) |
| | | this.selectStandardTree = false |
| | | this.sample.joinName = null |
| | | this.sample.joinModel = null |
| | | this.sample.joinNum = 1 |
| | | this.sample.sample = this.addObj.sample |
| | | this.sample.model = this.addObj.model |
| | | this.sample.unit = this.addObj.unit |
| | | this.sample.standardMethodListId = null |
| | | this.sample.insProduct = [] |
| | | this.sample.id = this.count |
| | | this.sample.num = this.addObj.sampleNum |
| | | this.sampleList.push(this.HaveJson(this.sample)) |
| | | this.count++ |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | | searchFilter() { |
| | | this.$refs.tree.filter(this.search) |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | | }, |
| | | handleNodeClick(val, node, el) { |
| | | this.selectTree = '' |
| | | this.models = val.children |
| | | this.getNodeParent(node) |
| | | this.selectTree = this.selectTree.replace(' - ', '') |
| | | let data = this.selectTree.split(' - ') |
| | | let data2 = '' |
| | | for (let index = data.length - 1; index >= 0; index--) { |
| | | data2 += " - " + data[index] |
| | | } |
| | | this.selectTree = data2.replace(' - ', '') |
| | | }, |
| | | getNodeParent(val) { |
| | | if (val.parent != null) { |
| | | if (val.data.children === null) { |
| | | this.selectTree += ' - ' + val.label + ' - ' + '' |
| | | } else { |
| | | this.selectTree += ' - ' + val.label |
| | | } |
| | | this.getNodeParent(val.parent) |
| | | } |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened') |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder') |
| | | }, |
| | | beforeClose(done) { |
| | | if (this.bsm1) { |
| | | if (this.bsm1Val === null || this.bsm1Val === '') { |
| | | this.$message.error('ç¹æ®é¡¹ç®å¿
é¡»å¤ç') |
| | | return |
| | | } |
| | | } |
| | | done() |
| | | }, |
| | | upBsm1(val) { |
| | | let sections = JSON.parse(this.bsmRow.section); |
| | | let asks = JSON.parse(this.bsmRow.ask); |
| | | let tells = JSON.parse(this.bsmRow.tell); |
| | | let manHours = JSON.parse(this.bsmRow.manHour); |
| | | let prices = JSON.parse(this.bsmRow.price); |
| | | for (var a in sections) { |
| | | if (val === sections[a]) { |
| | | this.productList.forEach(p => { |
| | | if (p.id === this.bsmRow.id) { |
| | | p.section = sections[a] |
| | | p.ask = asks[a] |
| | | p.tell = tells[a] |
| | | p.manHour = manHours[a] |
| | | p.price = prices[a] |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .ins_order_config { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | | .ins_order_config::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .center { |
| | | width: 100%; |
| | | height: calc(100% - 60px); |
| | | } |
| | | |
| | | |
| | | >>>.all-disabled .el-checkbox__input .el-checkbox__inner { |
| | | background-color: #edf2fc; |
| | | border-color: #dcdfe6; |
| | | cursor: not-allowed; |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .el-select-dropdown__item { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="ins_order_config"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px;text-align: left;">å
纤é
ç½®</el-col> |
| | | <el-col :span="18" style="text-align: right;"> |
| | | <!-- <el-button size="medium" type="primary" @click="save" :loading="saveLoad" v-if="active==1">ä¿ å</el-button> --> |
| | | <el-button size="medium" @click="outConfig"> |
| | | <span style="color: #3A7BFA;">è¿ å</span> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="center"> |
| | | <el-row :gutter="10" style="margin-bottom: 10px;"> |
| | | <el-col :span="9"> |
| | | <div class="grid-content"> |
| | | <h5>å¥ç®¡</h5> |
| | | <div |
| | | style="display: flex;align-items: center;justify-content: space-between;padding: 0 12px;box-sizing: border-box;"> |
| | | <div class="search-item"> |
| | | <label style="width: 70px;">æ ·ååå·</label> |
| | | <span class="models" :title="models">{{models}}</span> |
| | | </div> |
| | | <el-radio-group v-model="packageInfo.radio" size="small" @change="isInspection()" :disabled="active!=1"> |
| | | <el-radio :label="0">å
¨æ£</el-radio> |
| | | <el-radio :label="1">æ½æ£</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div |
| | | style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 8px;padding: 0 12px;box-sizing: border-box;"> |
| | | <div class="search-item" style="margin-right: 10px;"> |
| | | <label>å¥ç®¡æ°ç®</label> |
| | | <el-input v-model="packageInfo.num1" placeholder="请è¾å
¥" size="small" @blur="addBushing" :disabled="active!=1"></el-input> |
| | | </div> |
| | | <div class="search-item" style="margin-right: 10px;"> |
| | | <label style="width: 100px">æ¯æ ¹ç®¡æ½æ£æ åé</label> |
| | | <el-input v-model="packageInfo.standNum" placeholder="请è¾å
¥" size="small" @blur="addStandNum" :disabled="active!=1" style="width:70px"></el-input> |
| | | </div> |
| | | <div class="search-item"> |
| | | <label style="width: 100px">æ¯æ ¹ç®¡æ½æ£æ£æµé</label> |
| | | <el-input v-model="packageInfo.testNum" placeholder="请è¾å
¥" size="small" @blur="addTestNum" |
| | | style="width:70px" |
| | | :disabled="packageInfo.radio===0||active!=1"></el-input> |
| | | </div> |
| | | </div> |
| | | <el-table ref="table0" :data="bushing" tooltip-effect="dark" style="width: 100%" height="203px" size="small" |
| | | @selection-change="handleSelectionChange1" |
| | | :header-cell-class-name="setClassName0"> |
| | | <!-- <el-table-column |
| | | type="selection" |
| | | width="45" |
| | | :selectable="()=>(active==1)"> |
| | | </el-table-column> --> |
| | | <el-table-column label="ç®¡è²æ " show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.color" size="mini" :disabled="active!=1" allow-create filterable > |
| | | <el-option v-for="(color,i) in colors" :key="i" :label="color.lable" |
| | | :value="color.value"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="standNum" label="æ é" show-overflow-tooltip align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="testNum" label="æµè¯é" show-overflow-tooltip align="center"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="15"> |
| | | <div class="grid-content"> |
| | | <h5>æ£æµé¡¹ä¿¡æ¯</h5> |
| | | <el-table ref="productTable" :data="detectionItems" tooltip-effect="dark" style="width: 100%" |
| | | :row-class-name="tableRowClassName" |
| | | :header-cell-class-name="setClassName" |
| | | height="283px" |
| | | size="small" @selection-change="handleSelectionChange2" |
| | | @select-all="handleAll" |
| | | @select="upProductSelect" |
| | | > |
| | | <!-- <el-table-column type="selection" width="55" |
| | | :selectable="()=>((currentDetectionItems||this.selectFiberList.length > 0 || this.multiFiberList.length > 0)&&active==1)"> |
| | | </el-table-column> --> |
| | | <el-table-column label="å®éªå®¤" show-overflow-tooltip prop="sonLaboratory" ></el-table-column> |
| | | <el-table-column prop="inspectionItem" label="æ£éªé¡¹" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionItemSubclass" label="æ£éªé¡¹å项" show-overflow-tooltip width="100px"> |
| | | </el-table-column> |
| | | <el-table-column prop="methodS" label="è¯éªæ¹æ³" min-width="90" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="price" label="åä»·" width="70" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="unit" label="åä½" width="70" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="manDay" label="é¢è®¡æ¶é´" width="90" show-overflow-tooltip> |
| | | </el-table-column> --> |
| | | <el-table-column prop="ask" label="æ£æµè¦æ±" show-overflow-tooltip width="200px"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.ask" placeholder="请è¾å
¥" size="small" :disabled="active!=1" v-if="!isAskOnlyRead"></el-input> |
| | | <span v-else>{{ scope.row.ask }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="tell" label="è¦æ±æè¿°" show-overflow-tooltip width="150"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="12" v-if="packageInfo.ismiers"> |
| | | <div class="grid-content"> |
| | | <h5>å
纤带 |
| | | <el-button size="mini" type="primary" class="btns" @click="addFibers" |
| | | v-if="active==1">çæå
纤带</el-button> |
| | | <!-- <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0" v-if="active==1">æ¸
é¤</el-button> --> |
| | | </h5> |
| | | <div |
| | | style="display: flex;align-items: center;justify-content: space-between;margin:4px 0 6px 0;padding: 0 12px;box-sizing: border-box;"> |
| | | <!-- <div class="search-item" style="width: 50%;margin-right: 16px;"> |
| | | <label style="width: 80px;">纤带类å</label> |
| | | <el-select v-model="miresModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="selectBushing.length===0||active!=1" |
| | | > |
| | | <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> --> |
| | | <!-- <div class="search-item" style="width: 50%;"> |
| | | <label style="width: 80px;">åèæ å</label> |
| | | <el-select v-model="miresStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="miresModel===null||active!=1" @focus="selectsStandardMethodByFLSSM2()" |
| | | @change="(value)=>methodChange2(value)"> |
| | | <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> --> |
| | | <div class="search-item" style="width: 50%;margin-right: 16px;"> |
| | | <label style="width: 80px;">纤带类å</label> |
| | | <el-select v-model="miresModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="selectBushing.length===0||active!=1" |
| | | > |
| | | <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item" style="width: 50%;"> |
| | | <label style="width: 80px;">åèæ å</label> |
| | | <el-select v-model="miresStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="miresModel===null||active!=1" |
| | | @focus="selectsStandardMethodByFLSSM2()" |
| | | @change="(value)=>methodChange2(value)"> |
| | | <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | |
| | | </div> |
| | | <el-table ref="table2" :data="fibersList" tooltip-effect="dark" style="width: 100%" height="270px" |
| | | size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click="(row, column, event)=>rowClickFiber(row, column, event,1)" |
| | | :header-cell-class-name="setClassName0"> |
| | | <!-- <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | :selectable="()=>(active==1)"> |
| | | </el-table-column> --> |
| | | <el-table-column prop="color" label="管å¥è²æ " width="90" align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="code" label="å
纤带ç¼å·" show-overflow-tooltip align="center"> |
| | | <!-- <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.code" placeholder="请è¾å
¥" size="mini" ></el-input> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="å
çº¤å¸¦è§æ ¼" show-overflow-tooltip align="center"> |
| | | <!-- <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.model" placeholder="请è¾å
¥" size="mini" ></el-input> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column prop="standard" label="åèæ å" show-overflow-tooltip align="center"> |
| | | <!-- <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.standard" placeholder="请è¾å
¥" size="mini" ></el-input> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column prop="num" label="å
çº¤æ£æµé" show-overflow-tooltip align="center"> |
| | | <!-- <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.num" placeholder="请è¾å
¥" size="mini" ></el-input> |
| | | </template> --> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="!packageInfo.ismiers?24:12"> |
| | | <div class="grid-content"> |
| | | <h5>å
纤 |
| | | <el-button size="mini" type="primary" class="btns" @click="addFiber" |
| | | v-if="active==1">å
纤é
è²</el-button> |
| | | </h5> |
| | | <div |
| | | style="display: flex;align-items: center;justify-content: space-between;margin: 4px 0 6px 0;padding: 0 12px;box-sizing: border-box;"> |
| | | <!-- <div class="search-item" style="width: 50%;margin-right: 16px;"> |
| | | <label style="width: 80px;">å
纤类å</label> |
| | | <el-select v-model="mireModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="selectBushing.length===0||active!=1"> |
| | | <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item" style="width: 50%;"> |
| | | <label style="width: 80px;">åèæ å</label> |
| | | <el-select v-model="mireStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="mireModel===null||active!=1" @focus="selectsStandardMethodByFLSSM()" |
| | | @change="(value)=>methodChange(value)" :loading="mireStandardLoading"> |
| | | <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> --> |
| | | <div class="search-item" style="width: 50%;margin-right: 16px;"> |
| | | <label style="width: 80px;">å
纤类å</label> |
| | | <el-select v-model="mireModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | > |
| | | <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item" style="width: 50%;"> |
| | | <label style="width: 80px;">åèæ å</label> |
| | | <el-select v-model="mireStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="mireModel===null||active!=1" |
| | | @focus="selectsStandardMethodByFLSSM()" |
| | | @change="(value)=>methodChange(value)" :loading="mireStandardLoading"> |
| | | <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <el-table ref="table3" :data="fiberList" tooltip-effect="dark" style="width: 100%" height="270px" |
| | | size="small" highlight-current-row @selection-change="handleSelectionChange4" |
| | | @row-click="(row, column, event)=>rowClickFiber(row, column, event,0)" |
| | | :header-cell-class-name="setClassName0"> |
| | | <!-- <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | :selectable="()=>(active==1)"> |
| | | </el-table-column> --> |
| | | <el-table-column prop="bushColor" label="管å¥è²æ " width="90" align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="color" label="å
çº¤è²æ " width="120"> |
| | | <!-- <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.color" size="mini" :disabled="active!=1" allow-create filterable > |
| | | <el-option v-for="(color,i) in colors" :key="i" :label="color.lable" |
| | | :value="color.value"></el-option> |
| | | </el-select> |
| | | </template> --> |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="å
çº¤è§æ ¼" show-overflow-tooltip align="center"> |
| | | </el-table-column> |
| | | <el-table-column prop="standard" label="åèæ å" show-overflow-tooltip align="center"> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-dialog title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose"> |
| | | <div class="body" style="max-height: 60vh;"> |
| | | <el-row v-if="bsm1"> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"><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"></el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">è¦æ±å¼ï¼</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-col class="search_thing" :span="22"> |
| | | <div class="search_label">åä»·ï¼</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.price)[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="10" class="pairing">{{a[0]}}</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 :span="10" class="pairing">{{a[1]}}</el-col> --> |
| | | </el-col> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row v-if="bsm3"> |
| | | <el-col class="search_thing" :span="22" style="display: flex;align-items: center;"> |
| | | <div class="search_label"><span class="required-span">* </span>RTSï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="bsm3Val"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> --> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog title="RTSå¡«å" :visible.sync="bsm3Dia" width="500px" :show-close="false" :before-close="beforeClose0"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22" style="display: flex;align-items: center;"> |
| | | <div class="search_label"><span class="required-span">* </span>RTSï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="bsm3Val"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { set } from 'vue' |
| | | export default { |
| | | props: { |
| | | active: { |
| | | type: Number, |
| | | default: () => 0 |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | detectionType: null, |
| | | detectionSelect: [], |
| | | selectFiberList: [], |
| | | type:1, |
| | | saveLoad: false, |
| | | packageInfo: { |
| | | radio: 1, |
| | | num1: null, |
| | | standNum: null, |
| | | testNum: null, |
| | | ismiers: false |
| | | }, |
| | | tableData: [], |
| | | tape: { |
| | | value: '' |
| | | }, |
| | | options: [], |
| | | sample: [], |
| | | models: '', |
| | | colors: [], |
| | | wires: [], |
| | | bushing: [], |
| | | mireModels: [], |
| | | mireModel: null, |
| | | mireStandard: [], |
| | | mireStandards: null, |
| | | miresModels: [], |
| | | miresModel: null, |
| | | miresStandard: [], |
| | | miresStandards: null, |
| | | selectBushing: [], |
| | | productList: [], |
| | | productList2: [], |
| | | fiberList: [], |
| | | fibersList: [], |
| | | selectFibers: [], |
| | | detectionItems: [], |
| | | currentDetectionItems:null, |
| | | mireStandardLoading:false, |
| | | multiFiberList:[], |
| | | isAskOnlyRead:true, |
| | | bsm1Dia: false, |
| | | bsmRow: null, |
| | | bsm1: false, |
| | | bsm1Val: null, |
| | | bsm2: false, |
| | | bsm2Val: null, |
| | | bsm2Dia: false, |
| | | bsm2Val2: [], |
| | | bsm2Val3: [], |
| | | sampleIds:[], |
| | | bsm3Val: null, |
| | | bsmRow3: null, |
| | | bsm3Dia: false, |
| | | sorted: false |
| | | } |
| | | }, |
| | | computed: { |
| | | isAllDisabled() { |
| | | return this.multiFiberList.length > 0||this.currentDetectionItems||this.active!=1 |
| | | }, |
| | | }, |
| | | watch: { |
| | | // mireModel(val1,val0) { |
| | | // if(val1!=val0){ |
| | | // this.mireStandards = [] |
| | | // this.fiberList = [] |
| | | // this.multiFiberList = [] |
| | | // this.detectionItems = [] |
| | | // this.currentDetectionItems = null; |
| | | // } |
| | | // }, |
| | | // mireStandard(val1,val0) { |
| | | // if(val1!=val0){ |
| | | // this.fiberList = [] |
| | | // this.multiFiberList = [] |
| | | // this.detectionItems = [] |
| | | // this.currentDetectionItems = null; |
| | | // } |
| | | // } |
| | | }, |
| | | mounted() { |
| | | this.$parent.sampleIds.forEach(a => { |
| | | for (var i = 0; i < this.$parent.sampleList.length; i++) { |
| | | if (this.$parent.sampleList[i].id == a) { |
| | | this.sample.push(this.$parent.sampleList[i]) |
| | | this.models += (',' + this.$parent.sampleList[i].model) |
| | | break |
| | | } |
| | | } |
| | | }) |
| | | console.log(111, this.sample); |
| | | this.models = this.models.replace(',', '') |
| | | this.packageInfo.ismiers = this.models.split(',').every(e=>(e.indexOf('d')>-1||e.indexOf('D')>-1)&&!e.includes('ADSS')) |
| | | if(this.sample[0].bushing === undefined || this.sample[0].bushing === null){ |
| | | this.bushing = [] |
| | | }else{ |
| | | this.bushing = this.HaveJson(this.sample[0].bushing) |
| | | this.packageInfo.num1 = this.sample[0].bushing.length |
| | | this.packageInfo.standNum = this.sample[0].bushing[0].standNum |
| | | this.packageInfo.testNum = this.sample[0].bushing[0].testNum |
| | | this.bushing.forEach(a=>{ |
| | | if(a.fibers==null || a.fibers.length ==0)a.fibers=[] |
| | | if(a.fiber==null || a.fiber.length == 0)a.fiber=[] |
| | | // 夿æ¯å¦å«æå
纤带 |
| | | if(this.packageInfo.ismiers){ |
| | | // this.fibersList = [] // æ°å¢ |
| | | // this.fiberList = [] // æ°å¢ |
| | | if(a.fibers.length>0){ |
| | | a.fibers.sort((a,b)=>a.id-b.id) |
| | | a.fibers.forEach(b=>{ |
| | | this.$set(b,'color',a.color) |
| | | // å
纤带 |
| | | this.fibersList.push(b) |
| | | // å
纤 |
| | | b.fiber.forEach(c=>{ |
| | | this.fiberList.push(c) |
| | | }) |
| | | }) |
| | | } else { |
| | | a.fiber.forEach(b=>{ |
| | | this.fiberList.push(b) |
| | | }) |
| | | } |
| | | |
| | | }else{ |
| | | // this.fiberList = [] |
| | | a.fiber.forEach(b=>{ |
| | | this.fiberList.push(b) |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | this.getTypeDicts1() |
| | | this.getStandTreeBySampleType() |
| | | this.getStandTreeBySampleType2() |
| | | this.selectsStandardMethodByFLSSM2() |
| | | }, |
| | | methods: { |
| | | handleSelectionChange(val) { |
| | | // this.selectFibers = val |
| | | this.multiFiberList = val |
| | | }, |
| | | handleSelectionChange1(val) { |
| | | this.selectBushing = val |
| | | }, |
| | | handleSelectionChange2(val){ |
| | | this.detectionSelect = val |
| | | // èµå¼æ£æµé¡¹ä¿¡æ¯ å
纤带 |
| | | if(this.detectionItems.type == 1) { |
| | | this.multiFiberList.forEach(item => { |
| | | this.fibersList.forEach(a => { |
| | | if(a.ident == item.ident){ |
| | | a.productList = [] |
| | | this.fibersList.find(a => a.ident == item.ident).productList = this.detectionSelect |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | if(this.detectionItems.type == 0) { |
| | | // èµå¼æ£æµé¡¹ä¿¡æ¯ å
纤 |
| | | console.log('000',this.selectFiberList); |
| | | this.selectFiberList.forEach(item => { |
| | | this.fiberList.forEach(a => { |
| | | if(a.ident == item.ident){ |
| | | a.productList = [] |
| | | this.fiberList.find(a => a.ident == item.ident).productList = this.detectionSelect |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | handleSelectionChange4(val){ |
| | | this.selectFiberList = val |
| | | }, |
| | | outConfig() { |
| | | this.$parent.configShow = false |
| | | }, |
| | | getTypeDicts1() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | | category: "è²æ " |
| | | }).then(res => { |
| | | this.colors = res.data |
| | | }) |
| | | }, |
| | | // å¥ç®¡æ°ç®çæè¡¨æ ¼æ°æ® |
| | | addBushing() { |
| | | this.bushing = [] |
| | | for(let i = 0; i < this.packageInfo.num1; i++){ |
| | | let bushing = { |
| | | ident: this.bushing.length + 1, |
| | | color: this.colors[i].label, |
| | | standNum: null, |
| | | testNum: null, |
| | | fibers: [], |
| | | fiber: [] |
| | | } |
| | | this.bushing.push(bushing) |
| | | } |
| | | }, |
| | | // å¥ç®¡æ åéèµå¼ |
| | | addStandNum() { |
| | | if(this.selectBushing.length > 0) { |
| | | this.bushing.forEach(item => { |
| | | this.selectBushing.forEach(a => { |
| | | if(item.ident == a.ident) { |
| | | item.standNum = this.packageInfo.standNum |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | // å¥ç®¡æ£æµéèµå¼ |
| | | addTestNum() { |
| | | if(this.selectBushing.length > 0) { |
| | | this.bushing.forEach(item => { |
| | | this.selectBushing.forEach(a => { |
| | | if(item.ident == a.ident) { |
| | | item.testNum = this.packageInfo.testNum |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | }, |
| | | isInspection() { |
| | | this.fiberList = [] |
| | | this.fibersList = [] |
| | | this.detectionItems = [] |
| | | |
| | | // 页颿¯å¦å«æå
纤带 |
| | | if(this.packageInfo.ismiers) { |
| | | // å
¨æ£ |
| | | if (this.packageInfo.radio == 0) { |
| | | // æ ¹æ®æ åéèµå¼æ£æµé |
| | | if(parseInt(this.packageInfo.standNum) > 0 ) { |
| | | // ç»å
纤带èµå¼ |
| | | this.packageInfo.testNum = this.packageInfo.standNum |
| | | this.selectBushing = this.bushing |
| | | this.addFibers() |
| | | this.multiFiberList = this.fibersList |
| | | // é»è®¤å¾é |
| | | setTimeout(() => { |
| | | this.selectBushing.forEach(item =>{ |
| | | let rowToSelect = this.bushing.find(a => a.ident == item.ident) |
| | | this.$refs.table0.toggleRowSelection(rowToSelect, true) |
| | | }) |
| | | |
| | | this.multiFiberList.forEach(item =>{ |
| | | let rowToSelect = this.fibersList.find(a => a.ident == item.ident) |
| | | this.$refs.table2.toggleRowSelection(rowToSelect, true) |
| | | }) |
| | | }, 200) |
| | | } |
| | | } |
| | | }else { |
| | | if(this.packageInfo.radio == 0) { |
| | | if(parseInt(this.packageInfo.standNum) > 0 ) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum |
| | | this.selectBushing = this.bushing |
| | | this.addFiber() |
| | | // é»è®¤å¾é |
| | | setTimeout(() => { |
| | | this.selectBushing.forEach(item =>{ |
| | | let rowToSelect = this.bushing.find(a => a.ident == item.ident) |
| | | this.$refs.table0.toggleRowSelection(rowToSelect, true) |
| | | }) |
| | | }, 200) |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | }, |
| | | upNum() { |
| | | this.fiberList = [] |
| | | this.fibersList = [] |
| | | this.detectionItems = [] |
| | | if (this.packageInfo.radio === 0) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum |
| | | } |
| | | if (parseInt(this.packageInfo.standNum) < parseInt(this.packageInfo.testNum)) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum |
| | | } |
| | | if (this.packageInfo.num1 !== null && this.packageInfo.num1 !== '' && |
| | | this.packageInfo.standNum !== null && this.packageInfo.standNum !== '' && |
| | | this.packageInfo.testNum != null && this.packageInfo.testNum !== '') { |
| | | let colors2 = [] |
| | | if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | let num = this.packageInfo.num1 / this.colors.length |
| | | if (this.packageInfo.num1 % this.colors.length > 0) num += 1 |
| | | for (var i = 0; i < num; i++) { |
| | | colors2 = colors2.concat(this.colors) |
| | | } |
| | | } else { |
| | | colors2 = colors2.concat(this.colors) |
| | | } |
| | | this.bushing = [] |
| | | for (var i = 0; i < this.packageInfo.num1; i++) { |
| | | let bushing = { |
| | | color: colors2[i].label, |
| | | standNum: this.packageInfo.standNum, |
| | | testNum: this.packageInfo.testNum, |
| | | fibers: [], |
| | | fiber: [] |
| | | } |
| | | this.bushing.push(bushing) |
| | | } |
| | | // ç»å
纤带èµå¼ |
| | | if(this.selectBushing.length===0){ |
| | | this.selectBushing = this.bushing |
| | | } |
| | | // this.miresModels 纤带类å |
| | | // this.miresStandards åèæ å |
| | | this.fibersList = [] |
| | | this.packageInfo.ismiers = true |
| | | this.fiberList = [] |
| | | this.selectBushing.forEach(a => { |
| | | a.fiber = [] |
| | | a.fibers = [] |
| | | for(let j = 0; j < parseInt(a.testNum); j++){ |
| | | let fibers = { |
| | | id: this.fibersList.length + 1, |
| | | code: null, |
| | | color: a.color, |
| | | model: null, |
| | | standard: null, |
| | | num: a.testNum, |
| | | productList: this.HaveJson(this.productList2), |
| | | fiber: [] |
| | | } |
| | | a.fibers.push(fibers) |
| | | this.fibersList.push(fibers) |
| | | } |
| | | }) |
| | | } else { |
| | | this.bushing = [] |
| | | } |
| | | }, |
| | | getStandTreeBySampleType() { |
| | | this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, { |
| | | laboratory: 'é信产åå®éªå®¤', |
| | | sampleType: 'å
纤' |
| | | }).then(res => { |
| | | this.mireModels = [] |
| | | res.data.forEach(a => { |
| | | this.mireModels.push({ |
| | | label: a.model, |
| | | value: a.sample + ' - ' + a.model |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | getStandTreeBySampleType2() { |
| | | this.$axios.post(this.$api.standardTree.getStandTreeBySampleType, { |
| | | laboratory: 'é信产åå®éªå®¤', |
| | | sampleType: 'å
纤带' |
| | | }).then(res => { |
| | | this.miresModels = [] |
| | | res.data.forEach(a => { |
| | | this.miresModels.push({ |
| | | label: a.model, |
| | | value: a.model |
| | | }) |
| | | }) |
| | | }) |
| | | }, |
| | | selectsStandardMethodByFLSSM() { |
| | | this.mireStandards = [] |
| | | this.mireStandardLoading = true |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤 - ' + this.mireModel |
| | | }).then(res => { |
| | | this.mireStandardLoading = false |
| | | this.mireStandards = res.data.standardMethodList |
| | | }) |
| | | }, |
| | | selectsStandardMethodByFLSSM2() { |
| | | this.miresStandards = [] |
| | | this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤带 - ' + this.miresModel |
| | | }).then(res => { |
| | | this.miresStandards = res.data.standardMethodList |
| | | }) |
| | | }, |
| | | methodChange(val) { |
| | | // if (val === null || val === '') return |
| | | // this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | // model: this.mireModel.split(' - ')[1], |
| | | // standardMethodListId: val, |
| | | // factory: '' |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | // }).then(res => { |
| | | // res.data.forEach(a => { |
| | | // a.state = 0 |
| | | // }) |
| | | // this.productList = res.data |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // this.addFiber() |
| | | // }, 200) |
| | | // }) |
| | | |
| | | // å°ä¸ææ¡å¼èµå¼ç»å
纤 çå¬å»é¤ |
| | | if(this.selectFiberList.length == 0) { |
| | | this.$message.error('è¯·éæ©æ°æ®') |
| | | return |
| | | } |
| | | this.selectFiberList.forEach(item => { |
| | | this.fiberList.forEach(a => { |
| | | if(a.ident == item.ident){ |
| | | a.model = this.mireModel.split(' - ')[1] // å
çº¤è§æ ¼ |
| | | a.noSplitModel = this.mireModel // å
çº¤è§æ ¼ |
| | | if(this.mireStandards != null) { |
| | | a.standard = this.mireStandards.find(a => a.id == this.mireStandard).code // åèæ å |
| | | } |
| | | } |
| | | }) |
| | | }) |
| | | if (val === null || val === '') return |
| | | if(this.mireStandards == null ) return |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: this.mireModel.split(' - ')[1], |
| | | standardMethodListId: val, |
| | | factory: '' |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.detectionItems = [] |
| | | if(res.data != null && res.data.length != 0){ |
| | | res.data.forEach(a => { |
| | | a.state = 0 |
| | | }) |
| | | this.detectionItems = res.data |
| | | this.detectionType = 0 |
| | | this.$set(this.detectionItems,'type',0) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | methodChange2(val) { |
| | | // if (val === null || val === '') return |
| | | // this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | // model: '', |
| | | // standardMethodListId: val, |
| | | // factory: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤带 - ' + this.miresModel + ' - ', |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | // }).then(res => { |
| | | // res.data.forEach(a => { |
| | | // a.state = 0 |
| | | // }) |
| | | // this.productList2 = res.data |
| | | // setTimeout(() => { |
| | | // this.productList2.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // this.addFibers() |
| | | // }, 200) |
| | | // }) |
| | | |
| | | if(this.multiFiberList.length == 0) { |
| | | this.$message.error('è¯·éæ©éè¦æ´æ¹çæ°æ®') |
| | | return |
| | | } |
| | | if (val === null || val === '') return |
| | | this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | model: '', |
| | | standardMethodListId: val, |
| | | factory: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤带 - ' + this.miresModel + ' - ', |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ |
| | | this.detectionItems = [] |
| | | if(res.data != null && res.data.length != 0){ |
| | | res.data.forEach(a => { |
| | | a.state = 0 |
| | | }) |
| | | this.detectionItems = res.data |
| | | this.detectionType = 1 |
| | | this.$set(this.detectionItems,'type',1) |
| | | } |
| | | |
| | | // ç»éä¸çå
纤带èµå¼ |
| | | for(let i= 0; i < this.fibersList.length; i++){ |
| | | this.multiFiberList.forEach(item => { |
| | | if(this.fibersList[i].ident == item.ident){ |
| | | this.fibersList[i].model = this.miresModel // çº¤å¸¦è§æ ¼ |
| | | this.fibersList[i].num = this.miresModel.replace('è¯','') // å
çº¤æ£æµé |
| | | this.fibersList[i].productList = this.detectionItems // æ£æµé¡¹ |
| | | this.miresStandards.forEach(a => { |
| | | if(a.id == this.miresStandard) { |
| | | this.fibersList[i].standard = a.code // åèæ å |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | addFiber() { |
| | | // ææ° |
| | | let colors2 = [] |
| | | if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | let num = this.packageInfo.num1 / this.colors.length |
| | | if (this.packageInfo.num1 % this.colors.length > 0) num += 1 |
| | | for (var i = 0; i < num; i++) { |
| | | colors2 = colors2.concat(this.colors) |
| | | } |
| | | } else { |
| | | colors2 = colors2.concat(this.colors) |
| | | } |
| | | this.fiberList = [] |
| | | // éæ©äºå
纤带 |
| | | if (this.packageInfo.ismiers) { |
| | | if(this.multiFiberList.length != 0){ |
| | | this.multiFiberList.forEach((a,index) => { |
| | | a.fiber = [] |
| | | for (var i = 0; i < parseInt(a.num); i++) { |
| | | let fiber = { |
| | | ident: this.fiberList.length + 1, |
| | | bushColor: a.color, |
| | | color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, |
| | | model: null, |
| | | noSplitModel: null, |
| | | standard: null, |
| | | fibersIdent: a.ident, |
| | | productList: [] |
| | | } |
| | | this.fiberList.push(fiber) |
| | | } |
| | | }) |
| | | } else { |
| | | this.selectBushing.forEach((a,index) => { |
| | | a.fiber = [] |
| | | for (var i = 0; i < parseInt(a.testNum); i++) { |
| | | let fiber = { |
| | | ident: this.fiberList.length + 1, |
| | | bushColor: a.color, |
| | | color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label, |
| | | model: null, |
| | | noSplitModel: null, |
| | | standard: null, |
| | | productList: [] |
| | | } |
| | | this.fiberList.push(fiber) |
| | | } |
| | | }) |
| | | } |
| | | }else { |
| | | this.fiberList = [] |
| | | let flag = true |
| | | // æç
§é¡ºåºçæå
çº¤è²æ |
| | | let colors2 = [] |
| | | if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | let num = this.packageInfo.num1 / this.colors.length |
| | | if (this.packageInfo.num1 % this.colors.length > 0) num += 1 |
| | | for (var i = 0; i < num; i++) { |
| | | colors2 = colors2.concat(this.colors) |
| | | } |
| | | } else { |
| | | colors2 = colors2.concat(this.colors) |
| | | } |
| | | // æ ¹æ®å¥ç®¡çæµè¯éçæå¯¹åºçæ°éçå
çº¤æ°æ® |
| | | this.selectBushing.forEach((item,index) =>{ |
| | | if(item.testNum != null && item.testNum != ''){ |
| | | for(let i =0; i < parseInt(item.testNum); i++){ |
| | | let fiber = { |
| | | ident: this.fiberList.length + 1, |
| | | bushColor: item.color, |
| | | color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label, |
| | | model: null, |
| | | standard: null, |
| | | productList: [] |
| | | } |
| | | this.fiberList.push(fiber) |
| | | } |
| | | }else { |
| | | flag = false |
| | | } |
| | | }) |
| | | if(!flag){ |
| | | this.$message.error('请填åå
çº¤æ£æµé') |
| | | return |
| | | } |
| | | } |
| | | // äºä»£ |
| | | // // æ¯å¦éæ©å¥ç®¡ |
| | | // if(this.selectBushing.length == 0) { |
| | | // this.$message.error('æªéæ©å¥ç®¡') |
| | | // return |
| | | // } |
| | | // this.fiberList = [] |
| | | // let flag = true |
| | | // // æç
§é¡ºåºçæå
çº¤è²æ |
| | | // let colors2 = [] |
| | | // if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | // let num = this.packageInfo.num1 / this.colors.length |
| | | // if (this.packageInfo.num1 % this.colors.length > 0) num += 1 |
| | | // for (var i = 0; i < num; i++) { |
| | | // colors2 = colors2.concat(this.colors) |
| | | // } |
| | | // } else { |
| | | // colors2 = colors2.concat(this.colors) |
| | | // } |
| | | // // æ ¹æ®å¥ç®¡çæµè¯éçæå¯¹åºçæ°éçå
çº¤æ°æ® |
| | | // this.selectBushing.forEach((item,index) =>{ |
| | | // if(item.testNum != null && item.testNum != ''){ |
| | | // for(let i =0; i < parseInt(item.testNum); i++){ |
| | | // let fiber = { |
| | | // ident: this.fiberList.length + 1, |
| | | // bushColor: item.color, |
| | | // color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label, |
| | | // model: null, |
| | | // standard: null, |
| | | // productList: [] |
| | | // } |
| | | // this.fiberList.push(fiber) |
| | | // } |
| | | // }else { |
| | | // flag = false |
| | | // } |
| | | // }) |
| | | // if(!flag){ |
| | | // this.$message.error('请填åå
çº¤æ£æµé') |
| | | // return |
| | | // } |
| | | |
| | | |
| | | // æå |
| | | // let colors2 = [] |
| | | // if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | // let num = this.packageInfo.num1 / this.colors.length |
| | | // if (this.packageInfo.num1 % this.colors.length > 0) num += 1 |
| | | // for (var i = 0; i < num; i++) { |
| | | // colors2 = colors2.concat(this.colors) |
| | | // } |
| | | // } else { |
| | | // colors2 = colors2.concat(this.colors) |
| | | // } |
| | | // this.fiberList = [] |
| | | // let model = this.mireModel.split(' - ')[1] |
| | | // let standard = this.mireStandards.find(a => a.id == this.mireStandard).code |
| | | // if (this.packageInfo.ismiers) { |
| | | // if(this.selectFibers.length === 0){ |
| | | // this.$message.error('æªéæ©å
纤带') |
| | | // return |
| | | // } |
| | | // this.selectFibers.forEach((a,index) => { |
| | | // a.fiber = [] |
| | | // for (var i = 0; i < parseInt(a.num); i++) { |
| | | // let fiber = { |
| | | // bushColor: a.color, |
| | | // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, |
| | | // model: model, |
| | | // standard: standard, |
| | | // productList: this.HaveJson(this.productList) |
| | | // } |
| | | // a.fiber.push(fiber) |
| | | // this.fiberList.push(fiber) |
| | | // } |
| | | // }) |
| | | // } else { |
| | | // this.selectBushing.forEach((a,index) => { |
| | | // a.fiber = [] |
| | | // for (var i = 0; i < parseInt(a.testNum); i++) { |
| | | // let fiber = { |
| | | // bushColor: a.color, |
| | | // color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label, |
| | | // model: model, |
| | | // standard: standard, |
| | | // productList: this.HaveJson(this.productList) |
| | | // } |
| | | // a.fiber.push(fiber) |
| | | // this.fiberList.push(fiber) |
| | | // } |
| | | // }) |
| | | // } |
| | | }, |
| | | addFibers() { |
| | | // if(this.selectBushing.length===0){ |
| | | // this.$message.error('æªéæ©å¥ç®¡') |
| | | // return |
| | | // } |
| | | // this.fibersList = [] |
| | | // let standard = this.miresStandards.find(a => a.id == this.miresStandard).code |
| | | // this.packageInfo.ismiers = true |
| | | // this.fiberList = [] |
| | | // this.selectBushing.forEach(a => { |
| | | // a.fiber = [] |
| | | // a.fibers = [] |
| | | // for (var i = 0; i < parseInt(a.testNum); i++) { |
| | | // let fibers = { |
| | | // code: null, |
| | | // color: a.color, |
| | | // model: this.miresModel, |
| | | // standard: standard, |
| | | // num: a.testNum, |
| | | // productList: this.HaveJson(this.productList2), |
| | | // fiber: [] |
| | | // } |
| | | // a.fibers.push(fibers) |
| | | // this.fibersList.push(fibers) |
| | | // } |
| | | // }) |
| | | |
| | | if(this.selectBushing.length == 0) { |
| | | this.$message.error('æªéæ©å¥ç®¡') |
| | | return |
| | | } |
| | | // å¥ç®¡çæµè¯é * éæ©çå
纤带æ°é |
| | | this.fibersList = [] |
| | | this.selectBushing.forEach(item => { |
| | | for(let i = 0; i < parseInt(this.packageInfo.testNum); i++){ |
| | | let fibers = { |
| | | ident: this.fibersList.length + 1, |
| | | color: item.color, |
| | | code: null, |
| | | model: null, |
| | | standard: null, |
| | | num: null, |
| | | fiber: [], |
| | | productList: [] |
| | | } |
| | | this.fibersList.push(fibers) |
| | | } |
| | | }) |
| | | }, |
| | | rowClickFiber(row, column, event,type){ |
| | | console.log('row',row); |
| | | if(type == 1) { |
| | | this.fiberList = row.fiber |
| | | if(row.productList != null && row.productList.length > 0) { |
| | | this.detectionItems = [] |
| | | this.detectionItems = row.productList |
| | | } |
| | | if(row.fiber != null && row.fiber.length > 0) { |
| | | this.fiberList = [] |
| | | this.fiberList = row.fiber |
| | | } |
| | | }else if (type == 0){ |
| | | this.detectionItems = [] |
| | | this.detectionItems = row.productList |
| | | } |
| | | // if(type == 1) { |
| | | // if((row.model == null || row.model == '') && (row.standard == null || row.standard == '')){ |
| | | // this.detectionItems = [] |
| | | // return |
| | | // } |
| | | // if(row.model != null && row.model != ''){ |
| | | // this.miresModel = row.model |
| | | // this.selectsStandardMethodByFLSSM2() |
| | | // } |
| | | // setTimeout(() => { |
| | | // if(row.standard !=null && row.standard != ''){ |
| | | // this.miresStandard = this.miresStandards.find(a => a.code == row.standard).id |
| | | // } |
| | | // this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | // model: '', |
| | | // standardMethodListId: this.miresStandard, |
| | | // factory: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤带 - ' + this.miresModel + ' - ', |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | // }).then(res => { |
| | | // // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ |
| | | // this.detectionItems = [] |
| | | // if(res.data != null && res.data.length != 0){ |
| | | // this.detectionItems = res.data |
| | | // this.detectionType = 1 |
| | | // this.$set(this.detectionItems,'type',1) |
| | | // if (row.productList != null && row.productList.length > 0) { |
| | | // let product = JSON.parse(JSON.stringify(row.productList)) |
| | | // setTimeout(() => { |
| | | // product.forEach(p => { |
| | | // let rowToSelect = this.detectionItems.find(item => item.id === p.id); |
| | | // if (rowToSelect) { |
| | | // this.toggleSelection(rowToSelect); |
| | | // } |
| | | // }); |
| | | // },200) |
| | | // } |
| | | // } |
| | | // }) |
| | | // },1000) |
| | | // }else if(type == 0) { |
| | | // if((row.noSplitModel == null || row.noSplitModel == '') && (row.standard == null || row.standard == '')){ |
| | | // this.detectionItems = [] |
| | | // return |
| | | // } |
| | | // if(row.model != null && row.model != ''){ |
| | | // this.mireModel = row.noSplitModel |
| | | // this.selectsStandardMethodByFLSSM() |
| | | // } |
| | | // setTimeout(() => { |
| | | // if(row.standard !=null && row.standard != ''){ |
| | | // this.mireStandard = this.mireStandards.find(a => a.code == row.standard).id |
| | | // } |
| | | // this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | // model: this.mireModel.split(' - ')[1], |
| | | // standardMethodListId: this.mireStandard, |
| | | // factory: '' |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | // }).then(res => { |
| | | // this.detectionItems = [] |
| | | // if(res.data != null && res.data.length != 0){ |
| | | // res.data.forEach(a => { |
| | | // a.state = 0 |
| | | // }) |
| | | // this.detectionItems = res.data |
| | | // this.detectionType = 0 |
| | | // this.$set(this.detectionItems,'type',0) |
| | | |
| | | // if (row.productList != null && row.productList.length > 0) { |
| | | // let product = JSON.parse(JSON.stringify(row.productList)) |
| | | // setTimeout(() => { |
| | | // product.forEach(p => { |
| | | // let rowToSelect = this.detectionItems.find(item => item.id === p.id); |
| | | // if (rowToSelect) { |
| | | // this.toggleSelection(rowToSelect); |
| | | // } |
| | | // }); |
| | | // },200) |
| | | // } |
| | | // } |
| | | // }) |
| | | // },1000); |
| | | // } |
| | | }, |
| | | toggleSelection(row) { |
| | | this.$refs.productTable.toggleRowSelection(row, true); |
| | | }, |
| | | tableRowClassName({ |
| | | row, |
| | | rowIndex |
| | | }) { |
| | | if (row.state === 0) { |
| | | return 'warning-row'; |
| | | } |
| | | return ''; |
| | | }, |
| | | handleAll(e) { |
| | | if (e.length > 0) { |
| | | console.log(this.detectionItems); |
| | | this.detectionItems.map(m => { |
| | | m.state = 1 |
| | | return m |
| | | }) |
| | | } else { |
| | | this.detectionItems.map(m => { |
| | | m.state = 0 |
| | | return m |
| | | }) |
| | | } |
| | | if (e.length > 0) { |
| | | if(this.multiFiberList.length > 0){ |
| | | this.multiFiberList.map(item => { |
| | | item.productList.map(m=>{ |
| | | m.state = 1; |
| | | return m; |
| | | }) |
| | | return item |
| | | }) |
| | | }else{ |
| | | this.currentDetectionItems.productList.map(m=>{ |
| | | m.state = 1; |
| | | return m; |
| | | }) |
| | | } |
| | | } else { |
| | | if(this.multiFiberList.length > 0){ |
| | | this.multiFiberList.map(item => { |
| | | item.productList.map(m=>{ |
| | | m.state = 0; |
| | | return m; |
| | | }) |
| | | return item |
| | | }) |
| | | }else{ |
| | | this.currentDetectionItems.productList.map(m=>{ |
| | | m.state = 0; |
| | | return m; |
| | | }); |
| | | } |
| | | } |
| | | this.bsmRow3 = [] |
| | | this.detectionItems.forEach(p => { |
| | | if(this.type==1){ |
| | | if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 1) { |
| | | if (p.section.indexOf('[') > -1) { |
| | | this.bsmRow = this.HaveJson(p) |
| | | } |
| | | this.bsm1 = true |
| | | this.bsm1Dia = true |
| | | } else if (p.bsm === '1' && p.section !== '' && p.section !== null && p.state === 0) { |
| | | this.bsm1 = false |
| | | } |
| | | if (p.bsm === '1' && p.inspectionItem === 'å
纤æ¥å¤´æè' && this.sampleList.length > 1 && p.state === 1) { |
| | | this.bsm2 = true |
| | | this.bsm1Dia = true |
| | | if(this.bsm2Val2.length === 0){ |
| | | this.bsm2Val = (this.sampleList.length - 1) * this.sampleList.length / 2 |
| | | this.computationalPairing(this.sampleList.length) |
| | | this.bsm2Val2 = this.HaveJson(this.bsm2Val3) |
| | | } |
| | | } else if (p.bsm === '1' && p.inspectionItem === 'å
纤æ¥å¤´æè' && p.state === 1) { |
| | | this.bsm2 = false |
| | | } |
| | | } |
| | | // if (p.ask.includes('RTS')&&p.state === 1) { |
| | | // p.rts = '' |
| | | // this.bsm3Val = '' |
| | | // this.bsm3Dia = true |
| | | // this.bsmRow3.push(p) |
| | | // } |
| | | }) |
| | | |
| | | if (e.length > 0) { |
| | | this.sampleList.map(item => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map(m => { |
| | | m.state = 1 |
| | | return m; |
| | | }) |
| | | } |
| | | return item |
| | | }) |
| | | } else { |
| | | this.sampleList.map(item => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map(m => { |
| | | m.state = 0 |
| | | return m; |
| | | }) |
| | | } |
| | | return item |
| | | }) |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.productTable.doLayout() |
| | | }) |
| | | }, |
| | | upProductSelect(selection, row) { |
| | | row.state = row.state == 1 ? 0 : 1 |
| | | if(this.selectFiberList.length > 0){ |
| | | this.selectFiberList.map(item => { |
| | | item.productList.map(m=>{ |
| | | if(m.id == row.id){ |
| | | m.state = row.state; |
| | | } |
| | | return m |
| | | }) |
| | | return item |
| | | }) |
| | | }else{ |
| | | this.currentDetectionItems.productList.map(m=>{ |
| | | if(m.id == row.id){ |
| | | m.state = row.state; |
| | | } |
| | | return m; |
| | | }); |
| | | } |
| | | if(this.type==1){ |
| | | if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 1) { |
| | | if (row.section.indexOf('[') > -1) { |
| | | this.bsmRow = this.HaveJson(row) |
| | | } |
| | | this.bsm1 = true |
| | | this.bsm1Dia = true |
| | | } else if (row.bsm === '1' && row.section !== '' && row.section !== null && row.state === 0) { |
| | | this.bsm1 = false |
| | | } |
| | | if (row.bsm === '1' && row.inspectionItem === 'å
纤æ¥å¤´æè' && this.sampleList.length > 1 && row.state === 1) { |
| | | this.bsm2 = true |
| | | this.bsm1Dia = true |
| | | if(this.bsm2Val2.length === 0){ |
| | | this.bsm2Val = (this.sampleList.length - 1) * this.sampleList.length / 2 |
| | | this.computationalPairing(this.sampleList.length) |
| | | this.bsm2Val2 = this.HaveJson(this.bsm2Val3) |
| | | } |
| | | } else if (row.bsm === '1' && row.inspectionItem === 'å
纤æ¥å¤´æè' && row.state === 1) { |
| | | this.bsm2 = false |
| | | } |
| | | }else{ |
| | | this.bsm1Dia = false |
| | | } |
| | | // if (row.ask.includes('RTS')&&row.state === 1) { |
| | | // this.bsmRow3 = null; |
| | | // row.rts = '' |
| | | // this.bsm3Val = '' |
| | | // this.bsm3Dia = true |
| | | // this.bsmRow3 = row |
| | | // }else{ |
| | | // this.bsm3Dia = false |
| | | // } |
| | | }, |
| | | computationalPairing(n){ |
| | | const nums = []; |
| | | for (let i = 1; i <= n; i++) { |
| | | nums.push(i); |
| | | } |
| | | this.bsm2Val3 = this.HaveJson(this.permute(nums)) |
| | | }, |
| | | setClassName({ column }) { |
| | | if (column.type == 'selection' && !this.isAllDisabled) { |
| | | return 'all-disabled' |
| | | } |
| | | }, |
| | | setClassName0({ column }){ |
| | | if (column.type == 'selection' && this.active!=1) { |
| | | return 'all-disabled' |
| | | } |
| | | }, |
| | | clearFibers(){ |
| | | this.packageInfo.ismiers = false |
| | | this.fibersList = [] |
| | | this.bushing.forEach(a=>{ |
| | | a.fibers = [] |
| | | }) |
| | | }, |
| | | save(){ |
| | | // if(this.bushing.length === 0){ |
| | | // this.$message.error('缺å°é
ç½®æ æ³ä¿å') |
| | | // return |
| | | // } |
| | | // for(let a in this.bushing){ |
| | | // if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){ |
| | | // this.$message.error(this.bushing[a].color+'ç®¡è²æ å¥ç®¡ç¼ºå°é
ç½®æ æ³ä¿å') |
| | | // return |
| | | // } |
| | | // } |
| | | // this.sample.forEach(a=>{ |
| | | // a.bushing = this.bushing |
| | | // }) |
| | | // this.$message.success('å·²ä¿å') |
| | | // this.$emit('saveFiberopticConfig') |
| | | |
| | | if(this.bushing.length === 0){ |
| | | this.$message.error('缺å°å¥ç®¡æ æ³ä¿å') |
| | | return |
| | | } |
| | | this.bushing.forEach(item=>{ |
| | | // 妿å
纤带æå¼ |
| | | if(this.fibersList.length != 0) { |
| | | this.fibersList.forEach(a=>{ |
| | | a.fiber = this.fiberList.filter(b=>b.fibersIdent == a.ident) |
| | | }) |
| | | item.fibers = this.fibersList // å
纤带 |
| | | item.fiber = [] // å
纤 |
| | | }else { |
| | | // 妿å
纤带没æå¼ |
| | | item.fibers = [] // å
纤带 |
| | | item.fiber = this.fiberList // å
纤 |
| | | } |
| | | }) |
| | | this.sample.forEach(a=>{ |
| | | a.bushing = this.bushing |
| | | }) |
| | | this.$message.success('å·²ä¿å') |
| | | this.$emit("saveFiberopticConfig"); |
| | | }, |
| | | beforeClose(done){ |
| | | if (this.bsm1) { |
| | | if (this.bsm1Val === null || this.bsm1Val === '') { |
| | | this.$message.error('ç¹æ®é¡¹ç®å¿
é¡»å¤ç') |
| | | return |
| | | } |
| | | } |
| | | if (this.bsm2) { |
| | | if (this.bsm2Val2.length === 0) { |
| | | this.$message.error('ç¹æ®é¡¹ç®å¿
é¡»å¤ç') |
| | | return |
| | | } |
| | | let set = new Set() |
| | | for (let i=0;i<this.bsm2Val2.length;i++){ |
| | | let num0 = set.size |
| | | set.add(JSON.stringify(this.bsm2Val2[i])) |
| | | let num1 = set.size |
| | | if(num1==num0){ |
| | | this.$message.error('å
³è项ç®ä¸è½éå¤') |
| | | return |
| | | } |
| | | set.add(JSON.stringify(this.bsm2Val2[i].reverse())) |
| | | let num2 = set.size |
| | | if(num1==num2){ |
| | | this.$message.error('å
³è项ç®ä¸è½éå¤') |
| | | return |
| | | } |
| | | } |
| | | } |
| | | done() |
| | | }, |
| | | beforeClose0(done){ |
| | | if(!this.bsm3Val){ |
| | | this.$message.error('RSTå¿
须填å') |
| | | return |
| | | }else{ |
| | | if(Array.isArray(this.bsmRow3)){ |
| | | this.bsmRow3.forEach(item=>{ |
| | | item.rts = this.bsm3Val |
| | | }) |
| | | }else{ |
| | | this.bsmRow3.rts = this.bsm3Val |
| | | } |
| | | } |
| | | done() |
| | | }, |
| | | upBsm1(val) { |
| | | let sections = JSON.parse(this.bsmRow.section); |
| | | let asks = JSON.parse(this.bsmRow.ask); |
| | | let tells = JSON.parse(this.bsmRow.tell); |
| | | let manHours = JSON.parse(this.bsmRow.manHour); |
| | | let prices = JSON.parse(this.bsmRow.price); |
| | | for (var a in sections) { |
| | | if (val === sections[a]) { |
| | | this.productList.forEach(p => { |
| | | if (p.id === this.bsmRow.id) { |
| | | p.section = sections[a] |
| | | p.ask = asks[a] |
| | | p.tell = tells[a] |
| | | p.manHour = manHours[a] |
| | | p.price = prices[a] |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | } |
| | | }, |
| | | bsm2Up(val){ |
| | | let list = [] |
| | | for(let a=1;a < this.bsm2Val3.length + 1;a++){ |
| | | list.push(a) |
| | | } |
| | | let set = new Set() |
| | | let size1 = set.length |
| | | while(set.size < val){ |
| | | set.add(Math.ceil(Math.random() * this.bsm2Val3.length)) |
| | | } |
| | | this.bsm2Val2 = [] |
| | | for(let a of set){ |
| | | this.bsm2Val2.push(this.HaveJson(this.bsm2Val3[a-1])) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ins_order_config { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | | .ins_order_config::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .center { |
| | | width: 100%; |
| | | height: calc(100% - 60px); |
| | | } |
| | | |
| | | .grid-content { |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .grid-content h5 { |
| | | color: #3A7BFA; |
| | | font-weight: 400; |
| | | line-height: 32px; |
| | | padding-left: 16px; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | |
| | | .search-item { |
| | | display: flex; |
| | | align-items: center; |
| | | line-height: 36px; |
| | | } |
| | | |
| | | .search-item label { |
| | | width: 90px; |
| | | font-size: 12px; |
| | | color: #606266; |
| | | /* text-align: right; */ |
| | | } |
| | | |
| | | .btns { |
| | | margin: 8px 0 8px 10px; |
| | | } |
| | | |
| | | >>>.el-table th.el-table__cell>.cell { |
| | | padding-top: 2px !important; |
| | | padding-bottom: 2px !important; |
| | | } |
| | | >>>.all-disabled .el-checkbox__input .el-checkbox__inner { |
| | | background-color: #edf2fc; |
| | | border-color: #dcdfe6; |
| | | cursor: not-allowed; |
| | | } |
| | | .models{ |
| | | font-size:14px; |
| | | width:320px; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="ins_order_config"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="6" style="padding-left: 20px; text-align: left" |
| | | >å
纤é
ç½®</el-col |
| | | > |
| | | <el-col :span="18" style="text-align: right"> |
| | | <el-button |
| | | size="medium" |
| | | type="primary" |
| | | @click="save" |
| | | :loading="saveLoad" |
| | | v-if="active == 1" |
| | | >ä¿ å</el-button |
| | | > |
| | | <el-button size="medium" @click="outConfig"> |
| | | <span style="color: #3a7bfa">è¿ å</span> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="center"> |
| | | <el-row :gutter="10" style="margin-bottom: 10px"> |
| | | <el-col :span="9"> |
| | | <div class="grid-content"> |
| | | <h5>å¥ç®¡</h5> |
| | | <div |
| | | style=" |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | padding: 0 12px; |
| | | box-sizing: border-box; |
| | | " |
| | | > |
| | | <div class="search-item"> |
| | | <label style="width: 70px">æ ·ååå·</label> |
| | | <span class="models" :title="models">{{ models }}</span> |
| | | </div> |
| | | <el-radio-group |
| | | v-model="packageInfo.radio" |
| | | size="small" |
| | | @change="isInspection()" |
| | | :disabled="active != 1" |
| | | > |
| | | <el-radio :label="0">å
¨æ£</el-radio> |
| | | <el-radio :label="1">æ½æ£</el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | <div |
| | | style=" |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin-bottom: 8px; |
| | | padding: 0 12px; |
| | | box-sizing: border-box; |
| | | " |
| | | > |
| | | <div class="search-item" style="margin-right: 10px"> |
| | | <label>å¥ç®¡æ°ç®</label> |
| | | <el-input |
| | | v-model="packageInfo.num1" |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @blur="addBushing" |
| | | :disabled="active != 1" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search-item" style="margin-right: 10px"> |
| | | <label style="width: 100px">æ¯æ ¹ç®¡æ½æ£æ åé</label> |
| | | <el-input |
| | | v-model="packageInfo.standNum" |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @blur="addStandNum" |
| | | :disabled="packageInfo.radio === 0 || active != 1" |
| | | style="width: 100px" |
| | | ></el-input> |
| | | </div> |
| | | <div class="search-item"> |
| | | <label style="width: 100px">æ¯æ ¹ç®¡æ½æ£æ£æµé</label> |
| | | <el-input |
| | | v-model="packageInfo.testNum" |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | @blur="addTestNum" |
| | | :disabled="packageInfo.radio === 0 || active != 1" |
| | | style="width: 70px" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | ref="table0" |
| | | :data="bushing" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | height="203px" |
| | | size="small" |
| | | @selection-change="handleSelectionChange1" |
| | | :header-cell-class-name="setClassName0" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="45" |
| | | :selectable="() => active == 1" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column label="ç®¡è²æ " show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.color" |
| | | size="mini" |
| | | :disabled="active != 1" |
| | | allow-create |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="(color, i) in colors" |
| | | :key="i" |
| | | :label="color.lable" |
| | | :value="color.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="standNum" |
| | | label="æ é" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="testNum" |
| | | label="æµè¯é" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="15"> |
| | | <div class="grid-content"> |
| | | <h5>æ£æµé¡¹ä¿¡æ¯</h5> |
| | | <el-table |
| | | ref="productTable" |
| | | :data="detectionItems" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | :row-class-name="tableRowClassName" |
| | | :header-cell-class-name="setClassName" |
| | | height="283px" |
| | | size="small" |
| | | @selection-change="handleSelectionChange2" |
| | | @select-all="handleAll" |
| | | @select="upProductSelect" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | :selectable=" |
| | | () => |
| | | (currentDetectionItems || |
| | | this.selectFiberList.length > 0 || |
| | | this.multiFiberList.length > 0) && |
| | | active == 1 |
| | | " |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="å®éªå®¤" |
| | | show-overflow-tooltip |
| | | min-width="100" |
| | | prop="sonLaboratory" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItem" |
| | | label="æ£éªé¡¹" |
| | | min-width="100" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItemSubclass" |
| | | min-width="100" |
| | | label="æ£éªé¡¹å项" |
| | | show-overflow-tooltip |
| | | width="100px" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="methodS" |
| | | label="è¯éªæ¹æ³" |
| | | min-width="90" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="price" |
| | | label="åä»·" |
| | | width="70" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="unit" |
| | | label="åä½" |
| | | width="70" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <!-- <el-table-column prop="manDay" label="é¢è®¡æ¶é´" width="90" show-overflow-tooltip> |
| | | </el-table-column> --> |
| | | <el-table-column |
| | | prop="ask" |
| | | label="æ£æµè¦æ±" |
| | | show-overflow-tooltip |
| | | width="200px" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.ask" |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | :disabled="active != 1" |
| | | v-if="!isAskOnlyRead" |
| | | @change="changeASk(scope.row, 'ask')" |
| | | ></el-input> |
| | | <span v-else>{{ scope.row.ask }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="tell" |
| | | label="è¦æ±æè¿°" |
| | | show-overflow-tooltip |
| | | width="150" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.tell" |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | :disabled="active != 1" |
| | | v-if="!isAskOnlyRead" |
| | | @change="changeASk(scope.row)" |
| | | ></el-input> |
| | | <span v-else>{{ scope.row.tell }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="10"> |
| | | <el-col :span="12" v-if="packageInfo.ismiers"> |
| | | <div class="grid-content"> |
| | | <h5> |
| | | å
纤带 |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | class="btns" |
| | | @click="addFibers" |
| | | v-if="active == 1" |
| | | >çæå
纤带</el-button |
| | | > |
| | | <!-- <el-button size="mini" class="btns" @click="clearFibers" :disabled="selectBushing.length === 0" v-if="active==1">æ¸
é¤</el-button> --> |
| | | </h5> |
| | | <div |
| | | style=" |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin: 4px 0 6px 0; |
| | | padding: 0 12px; |
| | | box-sizing: border-box; |
| | | " |
| | | > |
| | | <!-- <div class="search-item" style="width: 50%;margin-right: 16px;"> |
| | | <label style="width: 80px;">纤带类å</label> |
| | | <el-select v-model="miresModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="selectBushing.length===0||active!=1" |
| | | > |
| | | <el-option v-for="(item,a) in miresModels" :key="a" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> --> |
| | | <!-- <div class="search-item" style="width: 50%;"> |
| | | <label style="width: 80px;">åèæ å</label> |
| | | <el-select v-model="miresStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="miresModel===null||active!=1" @focus="selectsStandardMethodByFLSSM2()" |
| | | @change="(value)=>methodChange2(value)"> |
| | | <el-option v-for="item in miresStandards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> --> |
| | | <div class="search-item" style="width: 30%; margin-right: 16px"> |
| | | <label style="width: 80px">纤带类å</label> |
| | | <el-select |
| | | v-model="miresModel" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, a) in miresModels" |
| | | :key="a" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item" style="width: 30%"> |
| | | <label style="width: 80px">åèæ å</label> |
| | | <el-select |
| | | v-model="miresStandard" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | :disabled="miresModel === null || active != 1" |
| | | @focus="selectsStandardMethodByFLSSM2()" |
| | | @change="(value) => methodChange2(value)" |
| | | > |
| | | <el-option |
| | | v-for="item in miresStandards" |
| | | :key="item.id" |
| | | :label="item.code" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item" style="width: 30%; margin-right: 16px"> |
| | | <label>å
çº¤æ£æµé</label> |
| | | <el-input |
| | | :disabled="miresModel === null || active != 1" |
| | | v-model="miresNum" |
| | | placeholder="请è¾å
¥" |
| | | size="small" |
| | | style="width: 100%" |
| | | @change="miresNumChange" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <!-- <el-table ref="table2" :data="fibersList" tooltip-effect="dark" style="width: 100%" height="270px" |
| | | size="small" @selection-change="handleSelectionChange" highlight-current-row @row-click="(row, column, event)=>rowClickFiber(row, column, event,1)" |
| | | :header-cell-class-name="setClassName0"> --> |
| | | <el-table |
| | | ref="table2" |
| | | :data="fibersList" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | height="270px" |
| | | size="small" |
| | | @selection-change="handleSelectionChange" |
| | | highlight-current-row |
| | | :header-cell-class-name="setClassName0" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | :selectable="() => active == 1" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="color" |
| | | label="管å¥è²æ " |
| | | width="90" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="code" |
| | | label="å
纤带ç¼å·" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.code" |
| | | placeholder="请è¾å
¥" |
| | | size="mini" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="model" |
| | | label="å
çº¤å¸¦è§æ ¼" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.model" |
| | | placeholder="请è¾å
¥" |
| | | size="mini" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="standard" |
| | | label="åèæ å" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.standard" |
| | | placeholder="请è¾å
¥" |
| | | size="mini" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="num" |
| | | label="å
çº¤æ£æµé" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.num" |
| | | placeholder="请è¾å
¥" |
| | | size="mini" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="!packageInfo.ismiers ? 24 : 12"> |
| | | <div class="grid-content"> |
| | | <h5> |
| | | å
纤 |
| | | <el-button |
| | | size="mini" |
| | | type="primary" |
| | | class="btns" |
| | | @click="addFiber" |
| | | v-if="active == 1" |
| | | >å
纤é
è²</el-button |
| | | > |
| | | </h5> |
| | | <div |
| | | style=" |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | margin: 4px 0 6px 0; |
| | | padding: 0 12px; |
| | | box-sizing: border-box; |
| | | " |
| | | > |
| | | <!-- <div class="search-item" style="width: 50%;margin-right: 16px;"> |
| | | <label style="width: 80px;">å
纤类å</label> |
| | | <el-select v-model="mireModel" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="selectBushing.length===0||active!=1"> |
| | | <el-option v-for="(item,a) in mireModels" :key="a" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item" style="width: 50%;"> |
| | | <label style="width: 80px;">åèæ å</label> |
| | | <el-select v-model="mireStandard" placeholder="è¯·éæ©" size="small" style="width: 100%;" |
| | | :disabled="mireModel===null||active!=1" @focus="selectsStandardMethodByFLSSM()" |
| | | @change="(value)=>methodChange(value)" :loading="mireStandardLoading"> |
| | | <el-option v-for="item in mireStandards" :key="item.id" :label="item.code" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> --> |
| | | <div class="search-item" style="width: 50%; margin-right: 16px"> |
| | | <label style="width: 80px">å
纤类å</label> |
| | | <el-select |
| | | v-model="mireModel" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, a) in mireModels" |
| | | :key="a" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | <div class="search-item" style="width: 50%"> |
| | | <label style="width: 80px">åèæ å</label> |
| | | <el-select |
| | | v-model="mireStandard" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | :disabled="mireModel === null || active != 1" |
| | | @focus="selectsStandardMethodByFLSSM()" |
| | | @change="(value) => methodChange(value)" |
| | | :loading="mireStandardLoading" |
| | | > |
| | | <el-option |
| | | v-for="item in mireStandards" |
| | | :key="item.id" |
| | | :label="item.code" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <!-- <el-table ref="table3" :data="fiberList" tooltip-effect="dark" style="width: 100%" height="270px" |
| | | size="small" highlight-current-row @selection-change="handleSelectionChange4" |
| | | @row-click="(row, column, event)=>rowClickFiber(row, column, event,0)" |
| | | :header-cell-class-name="setClassName0"> --> |
| | | <el-table |
| | | ref="table3" |
| | | :data="fiberList" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | height="270px" |
| | | size="small" |
| | | highlight-current-row |
| | | @selection-change="handleSelectionChange4" |
| | | :header-cell-class-name="setClassName0" |
| | | > |
| | | <el-table-column |
| | | type="selection" |
| | | width="55" |
| | | :selectable="() => active == 1" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="bushColor" |
| | | label="管å¥è²æ " |
| | | width="90" |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="color" label="å
çº¤è²æ " width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-select |
| | | v-model="scope.row.color" |
| | | size="mini" |
| | | :disabled="active != 1" |
| | | allow-create |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="(color, i) in colors" |
| | | :key="i" |
| | | :label="color.lable" |
| | | :value="color.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="model" |
| | | label="å
çº¤è§æ ¼" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="standard" |
| | | label="åèæ å" |
| | | show-overflow-tooltip |
| | | align="center" |
| | | > |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <el-dialog |
| | | title="æ£æµå°ç¹æ®é¡¹ï¼è¯·ä½åºä»¥ä¸éæ©" |
| | | :visible.sync="bsm1Dia" |
| | | width="60%" |
| | | :show-close="false" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | :before-close="beforeClose" |
| | | v-loading.fullscreen.lock="bsm1DiaLoading" |
| | | > |
| | | <div v-if="bsm1" class="body" style="max-height: 60vh; overflow: scroll"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label"> |
| | | <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" |
| | | ></el-radio> |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | <el-col class="search_thing" :span="22"> |
| | | <div class="search_label">è¦æ±å¼ï¼</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-col class="search_thing" :span="22"> |
| | | <div class="search_label">åä»·ï¼</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.price)[ai] }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row v-if="bsm3"> |
| | | <el-col class="search_thing" :span="22" style="display: flex;align-items: center;"> |
| | | <div class="search_label"><span class="required-span">* </span>RTSï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="bsm3Val"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> --> |
| | | </div> |
| | | <div v-if="bsm2"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label" style="width: 180px"> |
| | | <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> --> |
| | | <el-input-number |
| | | size="medium" |
| | | v-model="bsm2Val" |
| | | :min="1" |
| | | :max="bsm2Val3Length" |
| | | :precision="0" |
| | | style="width: 55%" |
| | | :controls="false" |
| | | @change="bsm2Up" |
| | | ></el-input-number> |
| | | <span>MAXï¼{{ bsm2Val3Length }}</span> |
| | | <el-switch |
| | | v-model="selfConnectBoolean" |
| | | @change="selfConnect" |
| | | active-color="#13ce66" |
| | | style="margin-left: 20px" |
| | | active-text="æ¯å¦èªæ¥" |
| | | ></el-switch> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div |
| | | class="body" |
| | | style="overflow-y: scroll; min-height: 400px; height: 400px" |
| | | > |
| | | <el-row> |
| | | <el-col :span="11"> |
| | | <span>æ ·åA:</span> |
| | | </el-col> |
| | | <el-col :span="11" :offset="2"> |
| | | <span>æ ·åB:</span> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-for="(a, ai) in bsm2Val2" :key="ai" style="margin: 10px 0"> |
| | | <el-col :span="11"> |
| | | <el-select |
| | | v-model="a[0]" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in fiberList" |
| | | :key="index" |
| | | :label=" |
| | | sampleList[0].sampleCode + |
| | | '-' + |
| | | item.bushColor + |
| | | '-' + |
| | | item.color |
| | | " |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col |
| | | :span="2" |
| | | class="pairing" |
| | | style="text-align: center; border: 0; color: rgba(0, 0, 0, 0.2)" |
| | | >ââ</el-col |
| | | > |
| | | <el-col :span="11"> |
| | | <el-select |
| | | v-model="a[1]" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="(item, index) in fiberList" |
| | | :key="index" |
| | | :label=" |
| | | sampleList[1].sampleCode + |
| | | '-' + |
| | | item.bushColor + |
| | | '-' + |
| | | item.color |
| | | " |
| | | :value="index + 1" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- <el-row> |
| | | <el-col style="margin-top: 6px"> |
| | | <el-col v-for="(a, ai) in bsm2Val2" :key="ai"> |
| | | <el-col :span="10" class="pairing">{{a[0]}}</el-col> |
| | | <el-col :span="10" class="pairing">{{a[1]}}</el-col> |
| | | </el-col> |
| | | </el-col> |
| | | </el-row> --> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer" v-if="bsm2"> |
| | | <el-row> |
| | | <el-button type="primary" @click="save1" :loading="saveLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="RTSå¡«å" |
| | | :visible.sync="bsm3Dia" |
| | | width="500px" |
| | | :show-close="false" |
| | | :before-close="beforeClose0" |
| | | > |
| | | <el-row> |
| | | <el-col |
| | | class="search_thing" |
| | | :span="22" |
| | | style="display: flex; align-items: center" |
| | | > |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>RTSï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="bsm3Val" |
| | | ></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | active: { |
| | | type: Number, |
| | | default: () => 0, |
| | | }, |
| | | inspectionItemST: { |
| | | type: Number, |
| | | default: () => 0, |
| | | }, |
| | | //ä¿åçå
çº¤çæ¥é
对æ°ç» |
| | | fiberPairing: { |
| | | type: Array, |
| | | default: () => { |
| | | return []; |
| | | }, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | bsm2Val2Copy: [], |
| | | selfConnectBoolean: false, |
| | | loadingText: "å è½½ä¸", |
| | | bsm1DiaLoading: false, |
| | | bsm2Val3Length: null, |
| | | fiberLoss: [], |
| | | isBsm2Val2: false, |
| | | sampleList: [], |
| | | miresNum: null, |
| | | errOrFiberList: [], |
| | | errOrFiberRibbonList: [], |
| | | detectionType: null, |
| | | detectionSelect: [], |
| | | selectFiberList: [], |
| | | type: 1, |
| | | saveLoad: false, |
| | | packageInfo: { |
| | | radio: 1, |
| | | num1: null, |
| | | standNum: null, |
| | | testNum: null, |
| | | ismiers: false, |
| | | }, |
| | | tableData: [], |
| | | tape: { |
| | | value: "", |
| | | }, |
| | | options: [], |
| | | sample: [], |
| | | models: "", |
| | | colors: [], |
| | | wires: [], |
| | | bushing: [], |
| | | mireModels: [], |
| | | mireModel: null, |
| | | mireStandard: [], |
| | | mireStandards: null, |
| | | miresModels: [], |
| | | miresModel: null, |
| | | miresStandard: [], |
| | | miresStandards: null, |
| | | selectBushing: [], |
| | | productList: [], |
| | | productList2: [], |
| | | fiberList: [], |
| | | fibersList: [], |
| | | selectFibers: [], |
| | | detectionItems: [], |
| | | currentDetectionItems: null, |
| | | mireStandardLoading: false, |
| | | multiFiberList: [], |
| | | isAskOnlyRead: true, |
| | | bsm1Dia: false, |
| | | bsmRow: null, |
| | | bsm1: false, |
| | | bsm1Val: null, |
| | | bsm2: false, |
| | | bsm2Val: null, |
| | | bsm2Dia: false, |
| | | bsm2Val2: [], |
| | | bsm2Val3: [], |
| | | sampleIds: [], |
| | | bsm3Val: null, |
| | | bsmRow3: null, |
| | | bsm3Dia: false, |
| | | isLoading: false, |
| | | }; |
| | | }, |
| | | computed: { |
| | | isAllDisabled() { |
| | | return ( |
| | | this.multiFiberList.length > 0 || |
| | | this.currentDetectionItems || |
| | | this.active != 1 |
| | | ); |
| | | }, |
| | | }, |
| | | watch: { |
| | | bsm1Dia(newVal) { |
| | | if (!newVal) { |
| | | this.isLoading = false; |
| | | } |
| | | }, |
| | | // mireModel(val1,val0) { |
| | | // if(val1!=val0){ |
| | | // this.mireStandards = [] |
| | | // this.fiberList = [] |
| | | // this.multiFiberList = [] |
| | | // this.detectionItems = [] |
| | | // this.currentDetectionItems = null; |
| | | // } |
| | | // }, |
| | | // mireStandard(val1,val0) { |
| | | // if(val1!=val0){ |
| | | // this.fiberList = [] |
| | | // this.multiFiberList = [] |
| | | // this.detectionItems = [] |
| | | // this.currentDetectionItems = null; |
| | | // } |
| | | // } |
| | | }, |
| | | mounted() { |
| | | this.$parent.sampleIds.forEach((a) => { |
| | | for (var i = 0; i < this.$parent.sampleList.length; i++) { |
| | | if (this.$parent.sampleList[i].id == a) { |
| | | this.sample.push(this.$parent.sampleList[i]); |
| | | this.models += "," + this.$parent.sampleList[i].model; |
| | | break; |
| | | } |
| | | } |
| | | }); |
| | | this.sampleList = this.$parent.sampleList; |
| | | console.log("this.sample", this.sample); |
| | | this.models = this.models.replace(",", ""); |
| | | this.packageInfo.ismiers = this.models |
| | | .split(",") |
| | | .every( |
| | | (e) => |
| | | (e.indexOf("d") > -1 || e.indexOf("D") > -1) && !e.includes("ADSS") |
| | | ); |
| | | if ( |
| | | this.sample[0].bushing === undefined || |
| | | this.sample[0].bushing === null |
| | | ) { |
| | | this.bushing = []; |
| | | } else { |
| | | this.bsm2Val2 = this.fiberPairing; |
| | | this.bushing = this.HaveJson(this.sample[0].bushing); |
| | | this.packageInfo.num1 = this.sample[0].bushing.length; |
| | | this.packageInfo.standNum = this.sample[0].bushing[0].standNum; |
| | | this.packageInfo.testNum = this.sample[0].bushing[0].testNum; |
| | | this.bushing.forEach((a) => { |
| | | if (a.fibers == null || a.fibers.length == 0) a.fibers = []; |
| | | if (a.fiber == null || a.fiber.length == 0) a.fiber = []; |
| | | // 夿æ¯å¦å«æå
纤带 |
| | | if (this.packageInfo.ismiers) { |
| | | // this.fibersList = [] // æ°å¢ |
| | | // this.fiberList = [] // æ°å¢ |
| | | if (a.fibers.length > 0) { |
| | | a.fibers.forEach((b) => { |
| | | // å
纤带 |
| | | this.fibersList.push(b); |
| | | // å
纤 |
| | | // this.fiberList = [] |
| | | // this.fiberList = b.fiber |
| | | }); |
| | | } else { |
| | | a.fiber.forEach((b) => { |
| | | this.fiberList.push(b); |
| | | }); |
| | | } |
| | | } else { |
| | | //this.fiberList = [] |
| | | a.fiber.forEach((b) => { |
| | | this.fiberList.push(b); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | this.getTypeDicts1(); |
| | | this.getStandTreeBySampleType(); |
| | | this.getStandTreeBySampleType2(); |
| | | this.selectsStandardMethodByFLSSM2(); |
| | | }, |
| | | methods: { |
| | | // èªæ¥ |
| | | selfConnect() { |
| | | if (this.selfConnectBoolean) { |
| | | // this.bsm2Val2 éè¦çæç»ç»æ this.fiberList 䏿æ¡å
容 |
| | | // è¿æ»¤åºå¥ç®¡åè²æ ä¸è´çæ°æ® 以åç¸åºç䏿 |
| | | let newFiberList = []; |
| | | let resultList = []; |
| | | for (let i = 0; i < this.fiberList.length; i++) { |
| | | let data = this.fiberList[i]; |
| | | if (data.bushColor == data.color) { |
| | | newFiberList.push([data.bushColor, i + 1]); |
| | | } |
| | | } |
| | | // æ ¹æ®åå
¸è¿è¡ä¸ä¸ªæåº |
| | | for (let i = 0; i < this.colors.length; i++) { |
| | | let color = this.colors[i]; |
| | | for (let j = 0; j < newFiberList.length; j++) { |
| | | let newColor = newFiberList[j]; |
| | | if (color.value == newColor[0]) { |
| | | newFiberList[j].push(color.orderNum); |
| | | } |
| | | } |
| | | } |
| | | newFiberList.sort((o1, o2) => o1[2] - o2[2]); |
| | | // æ ¹æ®è§åè¿è¡èµå¼ 1-2 3-4 5-6 7-8 9-10 |
| | | for (let i = 0; i < newFiberList.length; i++) { |
| | | // é¿å
夿¬¡å¾ªç¯ |
| | | if (newFiberList.length < 2 * i + 1) { |
| | | break; |
| | | } |
| | | if ( |
| | | newFiberList.length == 2 * i + 1 && |
| | | newFiberList.length % 2 != 0 |
| | | ) { |
| | | resultList.push([]); |
| | | } else { |
| | | resultList.push([ |
| | | newFiberList[2 * i][1], |
| | | newFiberList[2 * i + 1][1], |
| | | ]); |
| | | } |
| | | } |
| | | this.bsm2Val2 = resultList; |
| | | console.log("bsm2", this.bsm2Val2); |
| | | // MAX èµå¼ |
| | | this.bsm2Val3Length = resultList.length; |
| | | this.bsm2Val = resultList.length; |
| | | } else { |
| | | this.computationalPairing(this.selectFiberList.length); |
| | | } |
| | | }, |
| | | // ç»ä¸ä¿®æ¹å
çº¤æ£æµé |
| | | miresNumChange() { |
| | | const regex = /\d+/; |
| | | const match = this.miresModel.match(regex); |
| | | let num = 0; |
| | | if (match) { |
| | | num = Number(match[0]); |
| | | } |
| | | if (num < this.miresNum) { |
| | | this.$message.error("å
çº¤æ£æµéä¸è½å¤§äºå
çº¤è§æ ¼"); |
| | | return; |
| | | } |
| | | if (this.miresNum < 0) { |
| | | this.$message.error("å
çº¤æ£æµéä¸è½å°äº0"); |
| | | return; |
| | | } |
| | | this.fibersList.forEach((item) => { |
| | | this.multiFiberList.forEach((a) => { |
| | | if (a.ident == item.ident) { |
| | | item.num = this.miresNum; |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | handleSelectionChange(val) { |
| | | // this.selectFibers = val |
| | | this.multiFiberList = val; |
| | | if (val.length > 0) { |
| | | this.rowClickFiber(val[val.length - 1], null, null, 1); |
| | | } |
| | | }, |
| | | handleSelectionChange1(val) { |
| | | this.selectBushing = val; |
| | | }, |
| | | handleSelectionChange2(val) { |
| | | this.detectionSelect = val; |
| | | // èµå¼æ£æµé¡¹ä¿¡æ¯ å
纤带 |
| | | if (this.detectionItems.type == 1) { |
| | | this.multiFiberList.forEach((item) => { |
| | | this.fibersList.forEach((a) => { |
| | | if (a.ident == item.ident) { |
| | | a.productList = []; |
| | | this.fibersList.find((a) => a.ident == item.ident).productList = |
| | | this.detectionSelect; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | if (this.detectionItems.type == 0) { |
| | | // èµå¼æ£æµé¡¹ä¿¡æ¯ å
纤 |
| | | this.selectFiberList.forEach((item) => { |
| | | this.fiberList.forEach((a) => { |
| | | if (a.ident == item.ident) { |
| | | a.productList = []; |
| | | this.fiberList.find((a) => a.ident == item.ident).productList = |
| | | this.detectionSelect; |
| | | } |
| | | }); |
| | | }); |
| | | // éæ©çæ¶åå°±å°fiberListçå¼èµå¼ç»å¯¹åºçfiberList |
| | | setTimeout(() => { |
| | | if (this.multiFiberList.length > 0) { |
| | | this.multiFiberList.forEach((item) => { |
| | | this.fibersList.forEach((a) => { |
| | | if (a.ident == item.ident) { |
| | | a.fiber = this.fiberList; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }, 100); |
| | | } |
| | | }, |
| | | handleSelectionChange4(val) { |
| | | this.selectFiberList = val; |
| | | console.log(val); |
| | | if (val != 0) { |
| | | this.rowClickFiber(val[val.length - 1], null, null, 0); |
| | | } |
| | | }, |
| | | changeASk(row, type) { |
| | | if (type == "ask") { |
| | | // å¦ææ£æµè¦æ±å«ææ£è´å· |
| | | if (row.tell.indexOf("±") != -1) { |
| | | let left = row.tell.substring(0, row.tell.indexOf("±")); |
| | | let right = row.tell.substring(row.tell.indexOf("±") + 1); |
| | | // 妿å¯ä»¥è½¬å为æ°å¼ |
| | | if (!isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | if (row.ask.indexOf("-") != -1) { |
| | | let left1 = row.ask.substring(0, row.ask.indexOf("-")); |
| | | let right1 = row.ask.substring(row.ask.indexOf("-") + 1); |
| | | if ( |
| | | Number(left1) != Number(left) - Number(right) || |
| | | Number(right1) != Number(left) + Number(right) |
| | | ) { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | // row.ask = |
| | | // Number(left) - |
| | | // Number(right) + |
| | | // "-" + |
| | | // (Number(left) + Number(right)); |
| | | } |
| | | } else { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè§è"); |
| | | // row.ask = left + "-" + right; |
| | | return; |
| | | } |
| | | } |
| | | // å¦æè¦æ±æè¿°å·¦è¾¹ä¸è½è½¬å为æ°å¼ |
| | | else if (isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | const regex = /[~-]/; |
| | | const match = left.match(regex); |
| | | // å·¦è¾¹å«æ - ~ ç¬¦å· |
| | | if (match) { |
| | | let newLeft = ""; |
| | | if (left.includes("ï¼")) { |
| | | newLeft = left.replace("ï¼", "("); |
| | | } |
| | | if (left.includes("ï¼")) { |
| | | newLeft = newLeft.replace("ï¼", ")"); |
| | | } |
| | | const regexTwo = /\((\d+(\.\d+)?)([~-])(\d+(\.\d+)?)\)/; |
| | | const matchTwo = newLeft.match(regexTwo); |
| | | let leftTwo = Number(matchTwo[1]) - Number(right); |
| | | let rightTwo = Number(matchTwo[4]) + Number(right); |
| | | console.log(matchTwo); |
| | | console.log(leftTwo, rightTwo); |
| | | |
| | | console.log(row.ask.indexOf("-")); |
| | | if (row.ask.indexOf("-") != -1) { |
| | | let left1 = row.ask.substring(0, row.ask.indexOf("-")); |
| | | let right1 = row.ask.substring(row.ask.indexOf("-") + 1); |
| | | if (Number(left1) != leftTwo || Number(right1) != rightTwo) { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | // row.ask = leftTwo + "-" + rightTwo; |
| | | } |
| | | } else { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè§è"); |
| | | // row.ask = leftTwo + "-" + rightTwo; |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // å¦æè¦æ±æè¿°å«æâ¤ < ⥠> ç¬¦å· |
| | | const regex = /[â¤<â¥>]/; |
| | | const match = row.tell.match(regex); |
| | | if (match) { |
| | | // 符å·ä¸ä¸è´ |
| | | if (row.ask.indexOf(match[0]) != 0) { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | return; |
| | | } else { |
| | | // 符å·ä¸è´ |
| | | // å¦ææ£æµè¦æ±å«ææ£è´å· å¹¶ä¸å«æ&å· â¥0.69&â¤0.76 è¦æ±æè¿° |
| | | if (row.tell.indexOf("&") != -1) { |
| | | if (row.ask.indexOf("&") == -1) { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | // row.ask = row.tell; |
| | | return; |
| | | } else { |
| | | let left = row.tell.substring(0, row.tell.indexOf("&")); |
| | | let right = row.tell.substring(row.tell.indexOf("&") + 1); |
| | | |
| | | let leftAsk = row.ask.substring(0, row.ask.indexOf("&")); |
| | | let rightAsk = row.ask.substring(row.ask.indexOf("&") + 1); |
| | | if (leftAsk != left || rightAsk != right) { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | } |
| | | } |
| | | } else { |
| | | // 没æ&å· |
| | | const regex = new RegExp(`${match[0]}(\\d+(\\.\\d+)?)`, "g"); |
| | | const matchTow = row.tell.match(regex); |
| | | let right = Number(matchTow[0].split(match[0])[1]); |
| | | let left = row.ask.substring(row.ask.indexOf(match[0]) + 1); |
| | | if (Number(left) != Number(right)) { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | // row.ask = match[0] + right; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // å¦æè¦æ±æè¿°å«æèå´ |
| | | const regexTwo = /[~-]/; |
| | | const matchTwo = row.tell.match(regexTwo); |
| | | const matchAsk = row.ask.match(regexTwo); |
| | | if (matchTwo) { |
| | | let left = row.tell.substring(0, row.tell.indexOf(matchTwo[0])); |
| | | let right = row.tell.substring(row.tell.indexOf(matchTwo[0]) + 1); |
| | | |
| | | if (!isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | let leftAsk = row.ask.substring(0, row.ask.indexOf(matchAsk[0])); |
| | | let rightAsk = row.ask.substring(row.ask.indexOf(matchAsk[0]) + 1); |
| | | if ( |
| | | Number(leftAsk) != Number(left) || |
| | | Number(rightAsk) != Number(right) |
| | | ) { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | // row.ask = left + "-" + right; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // å
å¾éçæ
åµä¸ |
| | | this.detectionSelect.forEach((item) => { |
| | | if (item.id == row.id) { |
| | | item.ask = row.ask; |
| | | item.tell = row.tell; |
| | | // å
纤 0 å
纤带 1 |
| | | if (item.isFibers == 0) { |
| | | this.selectFiberList.forEach((a) => { |
| | | this.fiberList.forEach((b) => { |
| | | if (b.ident == a.ident) { |
| | | b.productList.forEach((item) => { |
| | | if (item.id == row.id) { |
| | | item.ask = row.ask; |
| | | item.tell = row.tell; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | if (item.isFibers == 1) { |
| | | this.multiFiberList.forEach((a) => { |
| | | this.fibersList.forEach((b) => { |
| | | if (b.ident == a.ident) { |
| | | b.productList.forEach((item) => { |
| | | if (item.id == row.id) { |
| | | item.ask = row.ask; |
| | | item.tell = row.tell; |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | outConfig() { |
| | | this.$parent.configShow = false; |
| | | }, |
| | | getTypeDicts1() { |
| | | this.$axios |
| | | .post(this.$api.enums.selectEnumByCategory, { |
| | | category: "è²æ ", |
| | | }) |
| | | .then((res) => { |
| | | this.colors = res.data; |
| | | }); |
| | | }, |
| | | // å¥ç®¡æ°ç®çæè¡¨æ ¼æ°æ® |
| | | addBushing() { |
| | | this.bushing = []; |
| | | for (let i = 0; i < this.packageInfo.num1; i++) { |
| | | let bushing = { |
| | | ident: this.bushing.length + 1, |
| | | color: this.colors[i].label, |
| | | standNum: null, |
| | | testNum: null, |
| | | fibers: [], |
| | | fiber: [], |
| | | }; |
| | | this.bushing.push(bushing); |
| | | } |
| | | }, |
| | | // å¥ç®¡æ åéèµå¼ |
| | | addStandNum() { |
| | | if (this.packageInfo.testNum > this.packageInfo.standNum) { |
| | | this.$message.error("æ£æµéä¸è½å¤§äºæ åé"); |
| | | this.packageInfo.testNum = this.packageInfo.standNum; |
| | | } |
| | | |
| | | if (this.selectBushing.length > 0) { |
| | | this.bushing.forEach((item) => { |
| | | this.selectBushing.forEach((a) => { |
| | | if (item.ident == a.ident) { |
| | | item.standNum = this.packageInfo.standNum; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | // å¥ç®¡æ£æµéèµå¼ |
| | | addTestNum() { |
| | | if ( |
| | | parseInt(this.packageInfo.testNum) > parseInt(this.packageInfo.standNum) |
| | | ) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum; |
| | | this.$message.error("æ£æµéä¸è½å¤§äºæ åé"); |
| | | } |
| | | if (this.selectBushing.length > 0) { |
| | | this.bushing.forEach((item) => { |
| | | this.selectBushing.forEach((a) => { |
| | | if (item.ident == a.ident) { |
| | | item.testNum = this.packageInfo.testNum; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }, |
| | | isInspection() { |
| | | this.fiberList = []; |
| | | this.fibersList = []; |
| | | this.detectionItems = []; |
| | | // 页颿¯å¦å«æå
纤带 |
| | | if (this.packageInfo.ismiers) { |
| | | // å
¨æ£ |
| | | if (this.packageInfo.radio == 0) { |
| | | if ( |
| | | this.packageInfo.standNum == null || |
| | | this.packageInfo.standNum == "" |
| | | ) { |
| | | this.$message.error("请å
è¾å
¥æ åé"); |
| | | return; |
| | | } |
| | | // æ ¹æ®æ åéèµå¼æ£æµé |
| | | if (parseInt(this.packageInfo.standNum) > 0) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum; |
| | | // ç»å
纤带èµå¼ |
| | | this.bushing.forEach((item) => { |
| | | item.testNum = this.packageInfo.testNum; |
| | | item.standNum = this.packageInfo.standNum; |
| | | this.$refs.table0.toggleRowSelection(item, true); |
| | | }); |
| | | |
| | | this.addFibers(); |
| | | this.multiFiberList = this.fibersList; |
| | | // é»è®¤å¾é |
| | | setTimeout(() => { |
| | | // this.selectBushing.forEach(item =>{ |
| | | // let rowToSelect = this.bushing.find(a => a.ident == item.ident) |
| | | // this.$refs.table0.toggleRowSelection(rowToSelect, true) |
| | | // }) |
| | | |
| | | this.multiFiberList.forEach((item) => { |
| | | let rowToSelect = this.fibersList.find( |
| | | (a) => a.ident == item.ident |
| | | ); |
| | | this.$refs.table2.toggleRowSelection(rowToSelect, true); |
| | | }); |
| | | }, 200); |
| | | } |
| | | } |
| | | } else { |
| | | if (this.packageInfo.radio == 0) { |
| | | if ( |
| | | this.packageInfo.standNum == null || |
| | | this.packageInfo.standNum == "" |
| | | ) { |
| | | this.$message.error("请å
è¾å
¥æ åé"); |
| | | return; |
| | | } |
| | | if (parseInt(this.packageInfo.standNum) > 0) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum; |
| | | this.bushing.forEach((item) => { |
| | | item.testNum = this.packageInfo.testNum; |
| | | item.standNum = this.packageInfo.standNum; |
| | | this.$refs.table0.toggleRowSelection(item, true); |
| | | }); |
| | | console.log(this.bushing); |
| | | this.selectBushing = this.bushing; |
| | | this.addFiber(1); |
| | | // é»è®¤å¾é |
| | | setTimeout(() => { |
| | | // this.selectBushing.forEach(item =>{ |
| | | // let rowToSelect = this.bushing.find(a => a.ident == item.ident) |
| | | // this.$refs.table0.toggleRowSelection(rowToSelect, true) |
| | | // }) |
| | | this.fiberList.forEach((item) => { |
| | | this.$refs.table3.toggleRowSelection(item, true); |
| | | }); |
| | | }, 200); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | upNum() { |
| | | this.fiberList = []; |
| | | this.fibersList = []; |
| | | this.detectionItems = []; |
| | | if (this.packageInfo.radio === 0) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum; |
| | | } |
| | | if ( |
| | | parseInt(this.packageInfo.standNum) < parseInt(this.packageInfo.testNum) |
| | | ) { |
| | | this.packageInfo.testNum = this.packageInfo.standNum; |
| | | } |
| | | if ( |
| | | this.packageInfo.num1 !== null && |
| | | this.packageInfo.num1 !== "" && |
| | | this.packageInfo.standNum !== null && |
| | | this.packageInfo.standNum !== "" && |
| | | this.packageInfo.testNum != null && |
| | | this.packageInfo.testNum !== "" |
| | | ) { |
| | | let colors2 = []; |
| | | if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | let num = this.packageInfo.num1 / this.colors.length; |
| | | if (this.packageInfo.num1 % this.colors.length > 0) num += 1; |
| | | for (var i = 0; i < num; i++) { |
| | | colors2 = colors2.concat(this.colors); |
| | | } |
| | | } else { |
| | | colors2 = colors2.concat(this.colors); |
| | | } |
| | | this.bushing = []; |
| | | for (var i = 0; i < this.packageInfo.num1; i++) { |
| | | let bushing = { |
| | | color: colors2[i].label, |
| | | standNum: this.packageInfo.standNum, |
| | | testNum: this.packageInfo.testNum, |
| | | fibers: [], |
| | | fiber: [], |
| | | }; |
| | | this.bushing.push(bushing); |
| | | } |
| | | // ç»å
纤带èµå¼ |
| | | if (this.selectBushing.length === 0) { |
| | | this.selectBushing = this.bushing; |
| | | } |
| | | // this.miresModels 纤带类å |
| | | // this.miresStandards åèæ å |
| | | this.fibersList = []; |
| | | this.packageInfo.ismiers = true; |
| | | this.fiberList = []; |
| | | this.selectBushing.forEach((a) => { |
| | | a.fiber = []; |
| | | a.fibers = []; |
| | | for (let j = 0; j < parseInt(a.testNum); j++) { |
| | | let fibers = { |
| | | id: this.fibersList.length + 1, |
| | | code: null, |
| | | color: a.color, |
| | | model: null, |
| | | standard: null, |
| | | num: a.testNum, |
| | | productList: this.HaveJson(this.productList2), |
| | | fiber: [], |
| | | }; |
| | | a.fibers.push(fibers); |
| | | this.fibersList.push(fibers); |
| | | } |
| | | }); |
| | | } else { |
| | | this.bushing = []; |
| | | } |
| | | }, |
| | | getStandTreeBySampleType() { |
| | | this.$axios |
| | | .post(this.$api.standardTree.getStandTreeBySampleType, { |
| | | laboratory: "é信产åå®éªå®¤", |
| | | sampleType: "å
纤", |
| | | }) |
| | | .then((res) => { |
| | | this.mireModels = []; |
| | | res.data.forEach((a) => { |
| | | this.mireModels.push({ |
| | | label: a.model, |
| | | value: a.sample + " - " + a.model, |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | getStandTreeBySampleType2() { |
| | | this.$axios |
| | | .post(this.$api.standardTree.getStandTreeBySampleType, { |
| | | laboratory: "é信产åå®éªå®¤", |
| | | sampleType: "å
纤带", |
| | | }) |
| | | .then((res) => { |
| | | this.miresModels = []; |
| | | res.data.forEach((a) => { |
| | | this.miresModels.push({ |
| | | label: a.model, |
| | | value: a.model, |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | selectsStandardMethodByFLSSM() { |
| | | this.mireStandards = []; |
| | | this.mireStandardLoading = true; |
| | | this.$axios |
| | | .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤 - " + this.mireModel, |
| | | }) |
| | | .then((res) => { |
| | | this.mireStandardLoading = false; |
| | | this.mireStandards = res.data.standardMethodList; |
| | | }); |
| | | }, |
| | | selectsStandardMethodByFLSSM2() { |
| | | this.miresStandards = []; |
| | | this.$axios |
| | | .post(this.$api.standardTree.selectsStandardMethodByFLSSM, { |
| | | tree: |
| | | "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤带 - " + this.miresModel, |
| | | }) |
| | | .then((res) => { |
| | | this.miresStandards = res.data.standardMethodList; |
| | | }); |
| | | }, |
| | | methodChange(val) { |
| | | // if (val === null || val === '') return |
| | | // this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | // model: this.mireModel.split(' - ')[1], |
| | | // standardMethodListId: val, |
| | | // factory: '' |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | // }).then(res => { |
| | | // res.data.forEach(a => { |
| | | // a.state = 0 |
| | | // }) |
| | | // this.productList = res.data |
| | | // setTimeout(() => { |
| | | // this.productList.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // this.addFiber() |
| | | // }, 200) |
| | | // }) |
| | | |
| | | // å°ä¸ææ¡å¼èµå¼ç»å
纤 çå¬å»é¤ |
| | | if (this.selectFiberList.length == 0) { |
| | | this.$message.error("è¯·éæ©æ°æ®"); |
| | | return; |
| | | } |
| | | |
| | | if (val === null || val === "") return; |
| | | if (this.mireStandards == null) return; |
| | | this.$axios |
| | | .post( |
| | | this.$api.standardTree.selectStandardProductList, |
| | | { |
| | | model: this.mireModel.split(" - ")[1], |
| | | standardMethodListId: val, |
| | | factory: "", |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | this.detectionItems = []; |
| | | if (res.data != null && res.data.length != 0) { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | this.detectionItems = res.data; |
| | | this.detectionType = 0; |
| | | this.$set(this.detectionItems, "type", 0); |
| | | } |
| | | this.mireStandards.find((a) => a.id == val).code == "å§æè¦æ±" |
| | | ? (this.isAskOnlyRead = false) |
| | | : (this.isAskOnlyRead = true); |
| | | this.selectFiberList.forEach((item) => { |
| | | this.fiberList.forEach((a) => { |
| | | if (a.ident == item.ident) { |
| | | a.model = this.mireModel.split(" - ")[1]; // å
çº¤è§æ ¼ |
| | | a.noSplitModel = this.mireModel; // å
çº¤è§æ ¼ |
| | | if (this.mireStandards != null) { |
| | | a.standard = this.mireStandards.find( |
| | | (a) => a.id == this.mireStandard |
| | | ).code; // åèæ å |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | methodChange2(val) { |
| | | // if (val === null || val === '') return |
| | | // this.$axios.post(this.$api.standardTree.selectStandardProductList, { |
| | | // model: '', |
| | | // standardMethodListId: val, |
| | | // factory: 'ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤带 - ' + this.miresModel + ' - ', |
| | | // }, { |
| | | // headers: { |
| | | // 'Content-Type': 'application/json' |
| | | // } |
| | | // }).then(res => { |
| | | // res.data.forEach(a => { |
| | | // a.state = 0 |
| | | // }) |
| | | // this.productList2 = res.data |
| | | // setTimeout(() => { |
| | | // this.productList2.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // this.addFibers() |
| | | // }, 200) |
| | | // }) |
| | | if (this.multiFiberList.length == 0) { |
| | | this.$message.error("è¯·éæ©éè¦æ´æ¹çæ°æ®"); |
| | | return; |
| | | } |
| | | if (val === null || val === "") return; |
| | | this.$axios |
| | | .post( |
| | | this.$api.standardTree.selectStandardProductList, |
| | | { |
| | | model: "", |
| | | standardMethodListId: val, |
| | | factory: |
| | | "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤带 - " + |
| | | this.miresModel + |
| | | " - ", |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ |
| | | this.detectionItems = []; |
| | | if (res.data != null && res.data.length != 0) { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | }); |
| | | this.detectionItems = res.data; |
| | | this.detectionType = 1; |
| | | this.$set(this.detectionItems, "type", 1); |
| | | // 夿æ¯å¦ä¸ºå§æè¦æ± |
| | | this.miresStandards.find((a) => a.id == val).code == "å§æè¦æ±" |
| | | ? (this.isAskOnlyRead = false) |
| | | : (this.isAskOnlyRead = true); |
| | | } |
| | | // ç»éä¸çå
纤带èµå¼ |
| | | // for(let i= 0; i < this.fibersList.length; i++){ |
| | | // this.multiFiberList.forEach(item => { |
| | | // if(this.fibersList[i].ident == item.ident){ |
| | | // this.fibersList[i].model = this.miresModel // çº¤å¸¦è§æ ¼ |
| | | // this.fibersList[i].num = this.miresModel.replace('è¯','') // å
çº¤æ£æµé |
| | | // this.fibersList[i].productList = this.detectionItems // æ£æµé¡¹ |
| | | // this.miresStandards.forEach(a => { |
| | | // if(a.id == this.miresStandard) { |
| | | // this.fibersList[i].standard = a.code // åèæ å |
| | | // } |
| | | // }) |
| | | // } |
| | | // }) |
| | | // } |
| | | for (let i = 0; i < this.multiFiberList.length; i++) { |
| | | for (let j = 0; j < this.fibersList.length; j++) { |
| | | if (this.multiFiberList[i].ident == this.fibersList[j].ident) { |
| | | this.fibersList[j].model = this.miresModel; // çº¤å¸¦è§æ ¼ |
| | | this.fibersList[j].num = this.miresModel.replace("è¯", ""); // å
çº¤æ£æµé |
| | | this.miresStandards.forEach((a) => { |
| | | if (a.id == this.miresStandard) { |
| | | this.fibersList[j].standard = a.code; // åèæ å |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | addFiber(isInspection) { |
| | | //éæ°å
纤é
è²ï¼æ¸
ç©ºçæ¥é
对 |
| | | this.isBsm2Val2 = false; |
| | | this.bsm2Val2 = []; |
| | | // ææ° |
| | | let colors2 = []; |
| | | if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | let num = this.packageInfo.num1 / this.colors.length; |
| | | if (this.packageInfo.num1 % this.colors.length > 0) num += 1; |
| | | for (var i = 0; i < num; i++) { |
| | | colors2 = colors2.concat(this.colors); |
| | | } |
| | | } else { |
| | | colors2 = colors2.concat(this.colors); |
| | | } |
| | | // æ ¹æ®æ¯æ ¹ç®¡æ½æ£æ åé ç¡®å® é¢è²å¾ªç¯ |
| | | this.fiberList = []; |
| | | // éæ©äºå
纤带 |
| | | if (this.packageInfo.ismiers) { |
| | | if (this.multiFiberList.length != 0) { |
| | | let count = 0; |
| | | console.log("this.multiFiberList", this.multiFiberList); |
| | | // æ ¹æ®æ¯æ ¹ç®¡æ½æ£æ åé ç¡®å® é¢è²å¾ªç¯ |
| | | let groupedByColor = this.multiFiberList.reduce((groups, value) => { |
| | | if (!groups[value.color]) { |
| | | groups[value.color] = Number(value.num); |
| | | } else { |
| | | groups[value.color] += Number(value.num); |
| | | } |
| | | return groups; |
| | | }); |
| | | if (groupedByColor[groupedByColor.color]) { |
| | | groupedByColor[groupedByColor.color] = |
| | | groupedByColor[groupedByColor.color] + Number(groupedByColor.num); |
| | | } else { |
| | | this.$set( |
| | | groupedByColor, |
| | | groupedByColor.color, |
| | | Number(groupedByColor.num) |
| | | ); |
| | | } |
| | | const regex = /\d+/; |
| | | const match = this.miresModel.match(regex); |
| | | console.log("groupedByColor", groupedByColor); |
| | | this.multiFiberList.forEach((item) => { |
| | | if (groupedByColor[item.color]) { |
| | | // æ¿å°å½åçå
çº¤å¸¦è§æ ¼ ç¡®å®é¢è²å¾ªç¯ |
| | | let modelNumber = this.packageInfo.standNum; |
| | | if (match) { |
| | | modelNumber = Number(match[0]); |
| | | } |
| | | let colors3 = colors2.slice(0, modelNumber); |
| | | if (item.num == null || item.num == "") { |
| | | item.num = 0; |
| | | } |
| | | // ç¡®å®é¢è²å¾ªç¯ |
| | | for (var i = 0; i < parseInt(item.num); i++) { |
| | | let fiber = { |
| | | ident: this.fiberList.length + 1, |
| | | bushColor: item.color, |
| | | color: colors3[count].label, |
| | | model: null, |
| | | noSplitModel: null, |
| | | standard: null, |
| | | fibersIdent: item.ident, |
| | | productList: [], |
| | | }; |
| | | this.fiberList.push(fiber); |
| | | count++; |
| | | count = count % modelNumber; |
| | | } |
| | | } |
| | | }); |
| | | // this.multiFiberList.forEach((a, index) => { |
| | | // a.fiber = []; |
| | | // if (index > 0 && index < this.multiFiberList.length) { |
| | | // if ( |
| | | // this.multiFiberList[index].color == |
| | | // this.multiFiberList[index - 1].color |
| | | // ) { |
| | | // // æ ¹æ®æ¯æ ¹ç®¡æ½æ£æ åé ç¡®å® é¢è²å¾ªç¯ |
| | | // //let colors3 = colors2.slice(0,this.packageInfo.standNum) |
| | | // for (var i = 0; i < parseInt(a.num); i++) { |
| | | // let fiber = { |
| | | // ident: this.fiberList.length + 1, |
| | | // bushColor: a.color, |
| | | // // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, |
| | | // color: colors2[count].label, |
| | | // model: null, |
| | | // noSplitModel: null, |
| | | // standard: null, |
| | | // fibersIdent: a.ident, |
| | | // productList: [], |
| | | // }; |
| | | // this.fiberList.push(fiber); |
| | | // count++; |
| | | // } |
| | | // } else { |
| | | // // æ ¹æ®æ¯æ ¹ç®¡æ½æ£æ åé ç¡®å® é¢è²å¾ªç¯ |
| | | // let colors3 = colors2.slice(0, this.packageInfo.standNum); |
| | | // for (var i = 0; i < parseInt(a.num); i++) { |
| | | // let fiber = { |
| | | // ident: this.fiberList.length + 1, |
| | | // bushColor: a.color, |
| | | // // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, |
| | | // color: colors3[i].label, |
| | | // model: null, |
| | | // noSplitModel: null, |
| | | // standard: null, |
| | | // fibersIdent: a.ident, |
| | | // productList: [], |
| | | // }; |
| | | // this.fiberList.push(fiber); |
| | | // } |
| | | // } |
| | | // } else { |
| | | // for (var i = 0; i < parseInt(a.num); i++) { |
| | | // let fiber = { |
| | | // ident: this.fiberList.length + 1, |
| | | // bushColor: a.color, |
| | | // // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, |
| | | // color: colors2[i].label, |
| | | // model: null, |
| | | // noSplitModel: null, |
| | | // standard: null, |
| | | // fibersIdent: a.ident, |
| | | // productList: [], |
| | | // }; |
| | | // this.fiberList.push(fiber); |
| | | // } |
| | | // } |
| | | // }); |
| | | } else { |
| | | let count = 0; |
| | | let colors3 = colors2.slice(0, this.packageInfo.standNum); |
| | | this.selectBushing.forEach((item, index) => { |
| | | if (item.testNum != null && item.testNum != "") { |
| | | item.standNum = Number(item.standNum); |
| | | for (let i = 0; i < parseInt(item.testNum); i++) { |
| | | let fiber = { |
| | | ident: this.fiberList.length + 1, |
| | | bushColor: item.color, |
| | | color: colors3[count].label, |
| | | model: null, |
| | | standard: null, |
| | | productList: [], |
| | | }; |
| | | this.fiberList.push(fiber); |
| | | count++; |
| | | count = count % this.packageInfo.standNum; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | this.fiberList = []; |
| | | let flag = true; |
| | | // æç
§é¡ºåºçæå
çº¤è²æ |
| | | let colors2 = []; |
| | | if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | let num = this.packageInfo.num1 / this.colors.length; |
| | | if (this.packageInfo.num1 % this.colors.length > 0) num += 1; |
| | | for (var i = 0; i < num; i++) { |
| | | colors2 = colors2.concat(this.colors); |
| | | } |
| | | } else { |
| | | colors2 = colors2.concat(this.colors); |
| | | } |
| | | let colors3 = colors2.slice(0, this.packageInfo.standNum); |
| | | let count = 0; |
| | | // æ ¹æ®å¥ç®¡çæµè¯éçæå¯¹åºçæ°éçå
çº¤æ°æ® |
| | | this.selectBushing.forEach((item, index) => { |
| | | if (item.testNum != null && item.testNum != "") { |
| | | item.standNum = Number(item.standNum); |
| | | for (let i = 0; i < parseInt(item.testNum); i++) { |
| | | let fiber = { |
| | | ident: this.fiberList.length + 1, |
| | | bushColor: item.color, |
| | | color: colors3[count].label, |
| | | model: null, |
| | | standard: null, |
| | | productList: [], |
| | | }; |
| | | this.fiberList.push(fiber); |
| | | count++; |
| | | count = count % item.standNum; |
| | | } |
| | | // else { |
| | | // for (let i = 0; i < parseInt(item.testNum); i++) { |
| | | // let fiber = { |
| | | // ident: this.fiberList.length + 1, |
| | | // bushColor: item.color, |
| | | // color: |
| | | // colors2[ |
| | | // i + parseInt(item.testNum) * index > colors2.length |
| | | // ? 0 |
| | | // : i + parseInt(item.testNum) * index * index |
| | | // ].label, |
| | | // model: null, |
| | | // standard: null, |
| | | // productList: [], |
| | | // }; |
| | | // this.fiberList.push(fiber); |
| | | // } |
| | | // } |
| | | } else { |
| | | flag = false; |
| | | } |
| | | }); |
| | | |
| | | if (!flag) { |
| | | this.$message.error("请填åå
çº¤æ£æµé"); |
| | | return; |
| | | } |
| | | } |
| | | // äºä»£ |
| | | // // æ¯å¦éæ©å¥ç®¡ |
| | | // if(this.selectBushing.length == 0) { |
| | | // this.$message.error('æªéæ©å¥ç®¡') |
| | | // return |
| | | // } |
| | | // this.fiberList = [] |
| | | // let flag = true |
| | | // // æç
§é¡ºåºçæå
çº¤è²æ |
| | | // let colors2 = [] |
| | | // if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | // let num = this.packageInfo.num1 / this.colors.length |
| | | // if (this.packageInfo.num1 % this.colors.length > 0) num += 1 |
| | | // for (var i = 0; i < num; i++) { |
| | | // colors2 = colors2.concat(this.colors) |
| | | // } |
| | | // } else { |
| | | // colors2 = colors2.concat(this.colors) |
| | | // } |
| | | // // æ ¹æ®å¥ç®¡çæµè¯éçæå¯¹åºçæ°éçå
çº¤æ°æ® |
| | | // this.selectBushing.forEach((item,index) =>{ |
| | | // if(item.testNum != null && item.testNum != ''){ |
| | | // for(let i =0; i < parseInt(item.testNum); i++){ |
| | | // let fiber = { |
| | | // ident: this.fiberList.length + 1, |
| | | // bushColor: item.color, |
| | | // color: colors2[(i+(parseInt(item.testNum)*index))>colors2.length?0:i+(parseInt(item.testNum)*index)*index].label, |
| | | // model: null, |
| | | // standard: null, |
| | | // productList: [] |
| | | // } |
| | | // this.fiberList.push(fiber) |
| | | // } |
| | | // }else { |
| | | // flag = false |
| | | // } |
| | | // }) |
| | | // if(!flag){ |
| | | // this.$message.error('请填åå
çº¤æ£æµé') |
| | | // return |
| | | // } |
| | | |
| | | // æå |
| | | // let colors2 = [] |
| | | // if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | // let num = this.packageInfo.num1 / this.colors.length |
| | | // if (this.packageInfo.num1 % this.colors.length > 0) num += 1 |
| | | // for (var i = 0; i < num; i++) { |
| | | // colors2 = colors2.concat(this.colors) |
| | | // } |
| | | // } else { |
| | | // colors2 = colors2.concat(this.colors) |
| | | // } |
| | | // this.fiberList = [] |
| | | // let model = this.mireModel.split(' - ')[1] |
| | | // let standard = this.mireStandards.find(a => a.id == this.mireStandard).code |
| | | // if (this.packageInfo.ismiers) { |
| | | // if(this.selectFibers.length === 0){ |
| | | // this.$message.error('æªéæ©å
纤带') |
| | | // return |
| | | // } |
| | | // this.selectFibers.forEach((a,index) => { |
| | | // a.fiber = [] |
| | | // for (var i = 0; i < parseInt(a.num); i++) { |
| | | // let fiber = { |
| | | // bushColor: a.color, |
| | | // color: colors2[(i+(parseInt(a.num)*index))>colors2.length?0:i+(parseInt(a.num)*index)*index].label, |
| | | // model: model, |
| | | // standard: standard, |
| | | // productList: this.HaveJson(this.productList) |
| | | // } |
| | | // a.fiber.push(fiber) |
| | | // this.fiberList.push(fiber) |
| | | // } |
| | | // }) |
| | | // } else { |
| | | // this.selectBushing.forEach((a,index) => { |
| | | // a.fiber = [] |
| | | // for (var i = 0; i < parseInt(a.testNum); i++) { |
| | | // let fiber = { |
| | | // bushColor: a.color, |
| | | // color: colors2[(i+(parseInt(a.testNum))*index)>colors2.length?0:i+(parseInt(a.testNum))*index].label, |
| | | // model: model, |
| | | // standard: standard, |
| | | // productList: this.HaveJson(this.productList) |
| | | // } |
| | | // a.fiber.push(fiber) |
| | | // this.fiberList.push(fiber) |
| | | // } |
| | | // }) |
| | | // } |
| | | }, |
| | | addFibers() { |
| | | // if(this.selectBushing.length===0){ |
| | | // this.$message.error('æªéæ©å¥ç®¡') |
| | | // return |
| | | // } |
| | | // this.fibersList = [] |
| | | // let standard = this.miresStandards.find(a => a.id == this.miresStandard).code |
| | | // this.packageInfo.ismiers = true |
| | | // this.fiberList = [] |
| | | // this.selectBushing.forEach(a => { |
| | | // a.fiber = [] |
| | | // a.fibers = [] |
| | | // for (var i = 0; i < parseInt(a.testNum); i++) { |
| | | // let fibers = { |
| | | // code: null, |
| | | // color: a.color, |
| | | // model: this.miresModel, |
| | | // standard: standard, |
| | | // num: a.testNum, |
| | | // productList: this.HaveJson(this.productList2), |
| | | // fiber: [] |
| | | // } |
| | | // a.fibers.push(fibers) |
| | | // this.fibersList.push(fibers) |
| | | // } |
| | | // }) |
| | | |
| | | if (this.selectBushing.length == 0) { |
| | | this.$message.error("æªéæ©å¥ç®¡"); |
| | | return; |
| | | } |
| | | let colors2 = []; |
| | | if (this.packageInfo.num1 / this.colors.length > 1) { |
| | | let num = this.packageInfo.num1 / this.colors.length; |
| | | if (this.packageInfo.num1 % this.colors.length > 0) num += 1; |
| | | for (var i = 0; i < num; i++) { |
| | | colors2 = colors2.concat(this.colors); |
| | | } |
| | | } else { |
| | | colors2 = colors2.concat(this.colors); |
| | | } |
| | | colors2 = colors2.splice(0, this.packageInfo.standNum); |
| | | // å¥ç®¡çæµè¯é * éæ©çå
纤带æ°é |
| | | this.fibersList = []; |
| | | this.selectBushing.forEach((item) => { |
| | | for (let i = 0; i < parseInt(this.packageInfo.testNum); i++) { |
| | | let fibers = { |
| | | ident: this.fibersList.length + 1, |
| | | color: item.color, |
| | | colorShow: item.color + "-" + colors2[i].label, |
| | | code: null, |
| | | model: null, |
| | | standard: null, |
| | | num: null, |
| | | fiber: [], |
| | | productList: [], |
| | | }; |
| | | this.fibersList.push(fibers); |
| | | } |
| | | }); |
| | | }, |
| | | rowClickFiber(row, column, event, type) { |
| | | // console.log("row", row); |
| | | // this.type = type |
| | | // if(this.active===1){ |
| | | // if(type==0){ |
| | | // let standard = null; |
| | | // try{ |
| | | // standard = this.miresStandards.find(a => a.id == this.miresStandards) |
| | | // }catch(e){} |
| | | // if(standard&&standard.code=='å§æè¦æ±'){ |
| | | // this.isAskOnlyRead = false; |
| | | // }else{ |
| | | // this.isAskOnlyRead = true; |
| | | // } |
| | | // }else{ |
| | | // let standard = null; |
| | | // try{ |
| | | // standard = this.mireStandards.find(a => a.id == this.mireStandard) |
| | | // }catch(e){} |
| | | // if(standard&&standard.code=='å§æè¦æ±'){ |
| | | // this.isAskOnlyRead = false; |
| | | // }else{ |
| | | // this.isAskOnlyRead = true; |
| | | // } |
| | | // } |
| | | // } |
| | | // if(this.type==1){ |
| | | // if (this.active !== 1) { |
| | | // this.sampleIds = [] |
| | | // this.sampleIds.push(row.id) |
| | | // } |
| | | // } |
| | | // this.currentDetectionItems = row |
| | | // this.detectionItems = row.productList |
| | | // if(this.detectionItems === null) return |
| | | // setTimeout(() => { |
| | | // this.detectionItems.forEach(a => { |
| | | // if (a.state == 1) this.toggleSelection(a) |
| | | // }) |
| | | // }, 200) |
| | | if (type == 1) { |
| | | this.fiberList = row.fiber; |
| | | if ( |
| | | (row.model == null || row.model == "") && |
| | | (row.standard == null || row.standard == "") |
| | | ) { |
| | | this.detectionItems = []; |
| | | return; |
| | | } |
| | | if (row.model != null && row.model != "") { |
| | | this.miresModel = row.model; |
| | | this.selectsStandardMethodByFLSSM2(); |
| | | } |
| | | setTimeout(() => { |
| | | if (row.standard != null && row.standard != "") { |
| | | this.miresStandard = this.miresStandards.find( |
| | | (a) => a.code == row.standard |
| | | ).id; |
| | | } |
| | | this.$axios |
| | | .post( |
| | | this.$api.standardTree.selectStandardProductList, |
| | | { |
| | | model: "", |
| | | standardMethodListId: this.miresStandard, |
| | | factory: |
| | | "ä¸å¤©ç§ææ£æµä¸å¿ - é信产åå®éªå®¤ - å
纤带 - " + |
| | | this.miresModel + |
| | | " - ", |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | // å°è·åçæ£æµé¡¹ä¿¡æ¯èµå¼ |
| | | this.detectionItems = []; |
| | | if (res.data != null && res.data.length != 0) { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | this.$set(a, "isFibers", 1); |
| | | }); |
| | | // 夿æ¯å¦ä¸ºå§æè¦æ± |
| | | this.miresStandards.find((a) => a.id == this.miresStandard) |
| | | .code == "å§æè¦æ±" |
| | | ? (this.isAskOnlyRead = false) |
| | | : (this.isAskOnlyRead = true); |
| | | if (!this.isAskOnlyRead) { |
| | | row.productList.forEach((a) => { |
| | | res.data.forEach((b) => { |
| | | if (a.id == b.id) { |
| | | b.ask = a.ask; |
| | | b.tell = a.tell; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | this.detectionItems = res.data; |
| | | this.detectionType = 1; |
| | | this.$set(this.detectionItems, "type", 1); |
| | | |
| | | if (row.productList != null && row.productList.length > 0) { |
| | | let product = JSON.parse(JSON.stringify(row.productList)); |
| | | setTimeout(() => { |
| | | product.forEach((p) => { |
| | | let rowToSelect = this.detectionItems.find( |
| | | (item) => item.id === p.id |
| | | ); |
| | | if (rowToSelect) { |
| | | this.toggleSelection(rowToSelect); |
| | | } |
| | | }); |
| | | }, 200); |
| | | } |
| | | } |
| | | }); |
| | | }, 500); |
| | | } else if (type == 0) { |
| | | if ( |
| | | (row.noSplitModel == null || row.noSplitModel == "") && |
| | | (row.standard == null || row.standard == "") |
| | | ) { |
| | | this.detectionItems = []; |
| | | return; |
| | | } |
| | | if (row.model != null && row.model != "") { |
| | | this.mireModel = row.noSplitModel; |
| | | this.selectsStandardMethodByFLSSM(); |
| | | } |
| | | setTimeout(() => { |
| | | if (row.standard != null && row.standard != "") { |
| | | this.mireStandard = this.mireStandards.find( |
| | | (a) => a.code == row.standard |
| | | ).id; |
| | | } |
| | | this.$axios |
| | | .post( |
| | | this.$api.standardTree.selectStandardProductList, |
| | | { |
| | | model: this.mireModel.split(" - ")[1], |
| | | standardMethodListId: this.mireStandard, |
| | | factory: "", |
| | | }, |
| | | { |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | }, |
| | | } |
| | | ) |
| | | .then((res) => { |
| | | this.detectionItems = []; |
| | | if (res.data != null && res.data.length != 0) { |
| | | res.data.forEach((a) => { |
| | | a.state = 0; |
| | | this.$set(a, "isFibers", 0); |
| | | }); |
| | | // 夿æ¯å¦ä¸ºå§æè¦æ± |
| | | this.mireStandards.find((a) => a.id == this.mireStandard) |
| | | .code == "å§æè¦æ±" |
| | | ? (this.isAskOnlyRead = false) |
| | | : (this.isAskOnlyRead = true); |
| | | if (!this.isAskOnlyRead) { |
| | | row.productList.forEach((a) => { |
| | | res.data.forEach((b) => { |
| | | if (a.id == b.id) { |
| | | b.ask = a.ask; |
| | | b.tell = a.tell; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | this.detectionItems = res.data; |
| | | this.detectionType = 0; |
| | | this.$set(this.detectionItems, "type", 0); |
| | | |
| | | if (row.productList != null && row.productList.length > 0) { |
| | | let product = JSON.parse(JSON.stringify(row.productList)); |
| | | setTimeout(() => { |
| | | product.forEach((p) => { |
| | | let rowToSelect = this.detectionItems.find( |
| | | (item) => item.id === p.id |
| | | ); |
| | | if (rowToSelect) { |
| | | this.toggleSelection(rowToSelect); |
| | | } |
| | | }); |
| | | }, 200); |
| | | } |
| | | } |
| | | }); |
| | | }, 500); |
| | | } |
| | | }, |
| | | toggleSelection(row) { |
| | | this.$refs.productTable.toggleRowSelection(row, true); |
| | | this.upProductSelect(null, row); |
| | | }, |
| | | tableRowClassName({ row, rowIndex }) { |
| | | if (row.state === 0) { |
| | | return "warning-row"; |
| | | } |
| | | return ""; |
| | | }, |
| | | handleAll(e) { |
| | | if (e.length > 0) { |
| | | console.log(this.detectionItems); |
| | | this.detectionItems.map((m) => { |
| | | m.state = 1; |
| | | return m; |
| | | }); |
| | | } else { |
| | | this.detectionItems.map((m) => { |
| | | m.state = 0; |
| | | return m; |
| | | }); |
| | | } |
| | | if (e.length > 0) { |
| | | if (this.multiFiberList.length > 0) { |
| | | this.multiFiberList.map((item) => { |
| | | item.productList.map((m) => { |
| | | m.state = 1; |
| | | return m; |
| | | }); |
| | | return item; |
| | | }); |
| | | } |
| | | // else { |
| | | // this.currentDetectionItems.productList.map((m) => { |
| | | // m.state = 1; |
| | | // return m; |
| | | // }); |
| | | // } |
| | | } else { |
| | | if (this.multiFiberList.length > 0) { |
| | | this.multiFiberList.map((item) => { |
| | | item.productList.map((m) => { |
| | | m.state = 0; |
| | | return m; |
| | | }); |
| | | return item; |
| | | }); |
| | | } |
| | | // else { |
| | | // this.currentDetectionItems.productList.map((m) => { |
| | | // m.state = 0; |
| | | // return m; |
| | | // }); |
| | | // } |
| | | } |
| | | this.bsmRow3 = []; |
| | | this.detectionItems.forEach((p) => { |
| | | if (this.type == 1) { |
| | | if ( |
| | | p.bsm === "1" && |
| | | p.section !== "" && |
| | | p.section !== null && |
| | | p.state === 1 |
| | | ) { |
| | | if (p.section.indexOf("[") > -1) { |
| | | this.bsmRow = this.HaveJson(p); |
| | | } |
| | | this.bsm1 = true; |
| | | this.bsm1Dia = true; |
| | | } else if ( |
| | | p.bsm === "1" && |
| | | p.section !== "" && |
| | | p.section !== null && |
| | | p.state === 0 |
| | | ) { |
| | | this.bsm1 = false; |
| | | } |
| | | if ( |
| | | p.bsm === "1" && |
| | | p.inspectionItem === "å
纤æ¥å¤´æè" && |
| | | this.sampleList.length > 1 && |
| | | p.state === 1 && |
| | | !this.isBsm2Val2 |
| | | ) { |
| | | if (this.checkSampleCodeHasNull()) { |
| | | this.$message.error("çæ¥é
å¯¹çæ ·åç¼å·ä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | this.bsm2 = true; |
| | | this.bsm1Dia = true; |
| | | if (this.bsm2Val2.length === 0) { |
| | | this.bsm2Val = |
| | | ((this.selectFiberList.length + 1) * |
| | | this.selectFiberList.length) / |
| | | 2; |
| | | this.computationalPairing(this.selectFiberList.length); |
| | | this.bsm2Val2 = this.HaveJson(this.bsm2Val3); |
| | | } |
| | | } else if ( |
| | | p.bsm === "1" && |
| | | p.inspectionItem === "å
纤æ¥å¤´æè" && |
| | | p.state === 1 |
| | | ) { |
| | | this.bsm2 = false; |
| | | } |
| | | } |
| | | // if (p.ask.includes('RTS')&&p.state === 1) { |
| | | // p.rts = '' |
| | | // this.bsm3Val = '' |
| | | // this.bsm3Dia = true |
| | | // this.bsmRow3.push(p) |
| | | // } |
| | | }); |
| | | |
| | | if (e.length > 0) { |
| | | this.sampleList.map((item) => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map((m) => { |
| | | m.state = 1; |
| | | return m; |
| | | }); |
| | | } |
| | | return item; |
| | | }); |
| | | } else { |
| | | this.sampleList.map((item) => { |
| | | if (this.sampleIds.indexOf(item.id) > -1) { |
| | | item.insProduct.map((m) => { |
| | | m.state = 0; |
| | | return m; |
| | | }); |
| | | } |
| | | return item; |
| | | }); |
| | | } |
| | | this.$nextTick(() => { |
| | | this.$refs.productTable.doLayout(); |
| | | }); |
| | | }, |
| | | save1() { |
| | | if (this.bsm2) { |
| | | if (this.bsm2Val2.length === 0) { |
| | | this.$message.error("ç¹æ®é¡¹ç®å¿
é¡»å¤ç"); |
| | | return; |
| | | } |
| | | const tempList = this.HaveJson(this.bsm2Val2); |
| | | let set = new Set(); |
| | | for (let i = 0; i < tempList.length; i++) { |
| | | let num0 = set.size; |
| | | set.add(JSON.stringify(tempList[i])); |
| | | let num1 = set.size; |
| | | if (num1 == num0) { |
| | | console.log(set); |
| | | console.log(tempList); |
| | | this.$message.error("å
³è项ç®ä¸è½éå¤"); |
| | | return; |
| | | } |
| | | // set.add(JSON.stringify(tempList[i].reverse())) |
| | | // let num2 = set.size |
| | | // if (num1 == num2) { |
| | | // console.log(111,set); |
| | | // console.log(111,tempList); |
| | | // this.$message.error('å
³è项ç®ä¸è½éå¤') |
| | | // return |
| | | // } |
| | | } |
| | | //转æ¢çæ¥é
对çç¼å· |
| | | // let transformList = [] |
| | | // for(let i=0;i<this.bsm2Val2.length;i++){ |
| | | // let colorIndex1 = Number(this.bsm2Val2[i][0]-1) |
| | | // let colorIndex2 = Number(this.bsm2Val2[i][1]-1) |
| | | // let code1 = this.sampleList[0].sampleCode + '-' + this.fiberList[colorIndex1].bushColor + '-' + this.fiberList[colorIndex1].color |
| | | // let code2 = this.sampleList[1].sampleCode + '-' + this.fiberList[colorIndex2].bushColor + '-' + this.fiberList[colorIndex2].color |
| | | // transformList.push([code1,code2]) |
| | | // } |
| | | this.isBsm2Val2 = true; |
| | | // console.log(this.bsm2Val2); |
| | | // console.log(transformList); |
| | | // this.$parent.fiberPairing = JSON.stringify(this.bsm2Val2) |
| | | } |
| | | this.bsm1Dia = false; |
| | | this.isBsm2Val2 = false; |
| | | this.fiberLoss = []; |
| | | }, |
| | | upProductSelect(selection, row) { |
| | | let list = this.detectionSelect.filter( |
| | | (item) => item.inspectionItem == "å
纤æ¥å¤´æè" |
| | | ); |
| | | if (list.length > 0) { |
| | | this.fiberLoss = list.map( |
| | | (item) => item.inspectionItem + "" + item.inspectionItemSubclass |
| | | ); |
| | | } |
| | | if (row.inspectionItem == "å
纤æ¥å¤´æè") { |
| | | this.fiberLoss.push( |
| | | row.inspectionItem + "" + row.inspectionItemSubclass |
| | | ); |
| | | } |
| | | let arr = [...new Set(this.fiberLoss)]; |
| | | console.log("list", list); |
| | | console.log("this.fiberLoss", this.fiberLoss); |
| | | console.log("arr", arr); |
| | | row.state = row.state == 1 ? 0 : 1; |
| | | if (this.selectFiberList.length > 0) { |
| | | this.selectFiberList.map((item) => { |
| | | item.productList.map((m) => { |
| | | if (m.id == row.id) { |
| | | m.state = row.state; |
| | | } |
| | | return m; |
| | | }); |
| | | return item; |
| | | }); |
| | | } else { |
| | | this.currentDetectionItems.productList.map((m) => { |
| | | if (m.id == row.id) { |
| | | m.state = row.state; |
| | | } |
| | | return m; |
| | | }); |
| | | } |
| | | if (this.type == 1) { |
| | | if ( |
| | | row.bsm === "1" && |
| | | row.section !== "" && |
| | | row.section !== null && |
| | | row.state === 1 |
| | | ) { |
| | | if (row.section.indexOf("[") > -1) { |
| | | this.bsmRow = this.HaveJson(row); |
| | | } |
| | | this.bsm1 = true; |
| | | this.bsm1Dia = true; |
| | | } else if ( |
| | | row.bsm === "1" && |
| | | row.section !== "" && |
| | | row.section !== null && |
| | | row.state === 0 |
| | | ) { |
| | | this.bsm1 = false; |
| | | } |
| | | if ( |
| | | row.bsm === "1" && |
| | | row.inspectionItem === "å
纤æ¥å¤´æè" && |
| | | row.state === 1 && |
| | | !this.isBsm2Val2 |
| | | ) { |
| | | if (this.sampleList.length < 2) { |
| | | this.$message.error("æ ·åæ°éä¸è¶³å¤è¿è¡é
对æä½"); |
| | | return; |
| | | } else { |
| | | if (this.checkSampleCodeHasNull()) { |
| | | this.$message.error("çæ¥é
å¯¹çæ ·åç¼å·ä¸è½ä¸ºç©º"); |
| | | return; |
| | | } |
| | | // this.bsm2 = true; |
| | | // this.bsm1Dia = true; |
| | | arr.length == 3 ? (this.bsm2 = true) : (this.bsm2 = false); |
| | | console.log("arr", arr); |
| | | if (this.bsm2) { |
| | | this.computationalPairing(this.selectFiberList.length); |
| | | // é»è®¤å±ç¤ºä¸å¯¹ä¸ |
| | | // this.bsm2Up(this.selectFiberList.length); |
| | | // if (this.bsm2Val2.length === 0) { |
| | | // this.bsm2Val = this.selectFiberList.length; |
| | | // this.bsm2Val2 = this.HaveJson(this.bsm2Val3); |
| | | // console.log(222, this.bsm2Val2); |
| | | // } else { |
| | | // this.bsm2Val = this.selectFiberList.length; |
| | | // } |
| | | // if (this.bsm2Val2.length === 0) { |
| | | // this.bsm2Val = |
| | | // ((this.fiberList.length + 1) * this.fiberList.length) / 2; |
| | | // this.bsm2Val2 = this.HaveJson(this.bsm2Val3); |
| | | // console.log(222, this.bsm2Val2); |
| | | // } else { |
| | | // this.bsm2Val = this.fiberPairing.length; |
| | | // } |
| | | } |
| | | } |
| | | } else if ( |
| | | row.bsm === "1" && |
| | | row.inspectionItem === "å
纤æ¥å¤´æè" && |
| | | row.state === 1 |
| | | ) { |
| | | this.bsm2 = false; |
| | | } |
| | | } else { |
| | | this.bsm1Dia = false; |
| | | } |
| | | // if (row.ask.includes('RTS')&&row.state === 1) { |
| | | // this.bsmRow3 = null; |
| | | // row.rts = '' |
| | | // this.bsm3Val = '' |
| | | // this.bsm3Dia = true |
| | | // this.bsmRow3 = row |
| | | // }else{ |
| | | // this.bsm3Dia = false |
| | | // } |
| | | }, |
| | | checkSampleCodeHasNull() { |
| | | const emptyCodeArr = this.sampleList.filter( |
| | | (ele) => ele.sampleCode == null |
| | | ); |
| | | return emptyCodeArr.length > 0; |
| | | }, |
| | | computationalPairing(n, isValue = false) { |
| | | this.bsm1Dia = true; |
| | | this.isLoading = true; |
| | | this.$axios |
| | | .get(this.$api.insOrder.permute + "?num=" + n + "&isValue=" + isValue) |
| | | .then((res) => { |
| | | this.bsm2Val3Length = this.HaveJson(res.data.resultData); |
| | | if (this.bsm2Val2.length === 0) { |
| | | this.bsm2Val = this.selectFiberList.length; |
| | | this.bsm2Val2 = this.HaveJson(this.bsm2Val3); |
| | | console.log(222, this.bsm2Val2); |
| | | } else { |
| | | this.bsm2Val = this.selectFiberList.length; |
| | | } |
| | | this.bsm2Up(this.selectFiberList.length); |
| | | this.isLoading = false; |
| | | }); |
| | | // const nums = []; |
| | | // for (let i = 1; i <= n; i++) { |
| | | // nums.push(i); |
| | | // } |
| | | // this.bsm2Val3 = this.HaveJson(this.permute(nums)); |
| | | }, |
| | | permute(nums) { |
| | | const result = []; |
| | | function backtrack(temp, nums) { |
| | | if (temp.length === 2) { |
| | | result.push([...temp]); |
| | | return; |
| | | } |
| | | for (let i = 0; i < nums.length; i++) { |
| | | // if (temp.includes(nums[i])) continue; |
| | | // é¿å
é夿°å |
| | | if (temp.length > 0 && nums[i] < temp[temp.length - 1]) continue; // è§å®é¡ºåºï¼é¿å
éå¤ç»å |
| | | temp.push(nums[i]); |
| | | backtrack(temp, nums); |
| | | temp.pop(); |
| | | } |
| | | } |
| | | backtrack([], nums); |
| | | return result; |
| | | }, |
| | | setClassName({ column }) { |
| | | if (column.type == "selection" && !this.isAllDisabled) { |
| | | return "all-disabled"; |
| | | } |
| | | }, |
| | | setClassName0({ column }) { |
| | | if (column.type == "selection" && this.active != 1) { |
| | | return "all-disabled"; |
| | | } |
| | | }, |
| | | clearFibers() { |
| | | this.packageInfo.ismiers = false; |
| | | this.fibersList = []; |
| | | this.bushing.forEach((a) => { |
| | | a.fibers = []; |
| | | }); |
| | | }, |
| | | save() { |
| | | // if(this.bushing.length === 0){ |
| | | // this.$message.error('缺å°é
ç½®æ æ³ä¿å') |
| | | // return |
| | | // } |
| | | // for(let a in this.bushing){ |
| | | // if(this.bushing[a].fibers.length===0&&this.bushing[a].fiber.length===0){ |
| | | // this.$message.error(this.bushing[a].color+'ç®¡è²æ å¥ç®¡ç¼ºå°é
ç½®æ æ³ä¿å') |
| | | // return |
| | | // } |
| | | // } |
| | | // this.sample.forEach(a=>{ |
| | | // a.bushing = this.bushing |
| | | // }) |
| | | // this.$message.success('å·²ä¿å') |
| | | // this.$emit('saveFiberopticConfig') |
| | | // if(this.inspectionItemST == 1) { |
| | | // this.$message.success('å·²ä¿å') |
| | | // this.sample.forEach(a=>{ |
| | | // a.bushing = this.bushing |
| | | // }) |
| | | // this.$emit('saveFiberopticConfig') |
| | | // return |
| | | // } |
| | | |
| | | let flag = true; |
| | | let flags = true; |
| | | |
| | | // å
çº¤æ£æµé¡¹ä¿¡æ¯æ ¡éª |
| | | this.fiberList.forEach((item) => { |
| | | if (item.productList.length > 0) { |
| | | item.productList.forEach((row) => { |
| | | // å¦ææ£æµè¦æ±æè
è¦æ±æè¿°ä¸ºç©º |
| | | if (row.ask == null || row.ask == "") { |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | } |
| | | if (row.tell == null || row.tell == "") { |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | } |
| | | // å¦ææ£æµè¦æ±å«ææ£è´å· |
| | | if (row.tell.indexOf("±") != -1) { |
| | | let left = row.tell.substring(0, row.tell.indexOf("±")); |
| | | let right = row.tell.substring(row.tell.indexOf("±") + 1); |
| | | // 妿å¯ä»¥è½¬å为æ°å¼ |
| | | if (!isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | if (row.ask.indexOf("-") != -1) { |
| | | let left1 = row.ask.substring(0, row.ask.indexOf("-")); |
| | | let right1 = row.ask.substring(row.ask.indexOf("-") + 1); |
| | | if ( |
| | | Number(left1) != Number(left) - Number(right) || |
| | | Number(right1) != Number(left) + Number(right) |
| | | ) { |
| | | //this.$message.error("11111"); |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flag = false; |
| | | } |
| | | } else { |
| | | //this.$message.error("2222"); |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flag = false; |
| | | } |
| | | } |
| | | // å¦æè¦æ±æè¿°å·¦è¾¹ä¸è½è½¬å为æ°å¼ |
| | | else if (isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | const regex = /[~-]/; |
| | | const match = left.match(regex); |
| | | // å·¦è¾¹å«æ - ~ ç¬¦å· |
| | | if (match) { |
| | | let newLeft = ""; |
| | | if (left.includes("ï¼")) { |
| | | newLeft = left.replace("ï¼", "("); |
| | | } |
| | | if (left.includes("ï¼")) { |
| | | newLeft = newLeft.replace("ï¼", ")"); |
| | | } |
| | | const regexTwo = /\((\d+(\.\d+)?)([~-])(\d+(\.\d+)?)\)/; |
| | | const matchTwo = newLeft.match(regexTwo); |
| | | let leftTwo = Number(matchTwo[1]) - Number(right); |
| | | let rightTwo = Number( |
| | | Number(matchTwo[4]) + Number(right) |
| | | ).toFixed(6); |
| | | if (row.ask.indexOf("-") != -1) { |
| | | let left1 = row.ask.substring(0, row.ask.indexOf("-")); |
| | | let right1 = row.ask.substring(row.ask.indexOf("-") + 1); |
| | | if ( |
| | | Number(left1) != leftTwo || |
| | | Number(right1) != rightTwo |
| | | ) { |
| | | //this.$message.error("33333"); |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flag = false; |
| | | } |
| | | } else { |
| | | //this.$message.error("44444"); |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flag = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // å¦ææ£æµè¦æ±å«æâ¤ < ⥠> ç¬¦å· |
| | | const regex = /[â¤<â¥>]/; |
| | | const match = row.tell.match(regex); |
| | | if (match) { |
| | | // 符å·ä¸ä¸è´ |
| | | if (row.ask.indexOf(match[0]) != 0) { |
| | | //this.$message.error("555555"); |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flag = false; |
| | | } else { |
| | | // 符å·ä¸è´ |
| | | |
| | | // å¦ææ£æµè¦æ±å«ææ£è´å· å¹¶ä¸å«æ&å· â¥0.69&â¤0.76 è¦æ±æè¿° |
| | | if (row.tell.indexOf("&") != -1) { |
| | | if (row.ask.indexOf("&") == -1) { |
| | | //this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | // row.ask = row.tell; |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | } else { |
| | | let left = row.tell.substring(0, row.tell.indexOf("&")); |
| | | let right = row.tell.substring(row.tell.indexOf("&") + 1); |
| | | |
| | | let leftAsk = row.ask.substring(0, row.ask.indexOf("&")); |
| | | let rightAsk = row.ask.substring(row.ask.indexOf("&") + 1); |
| | | console.log("&", left, right, leftAsk, rightAsk); |
| | | if (leftAsk != left || rightAsk != right) { |
| | | //this.$message.error("88888"); |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flag = false; |
| | | } |
| | | } |
| | | } else { |
| | | const regex = new RegExp(`${match[0]}(\\d+(\\.\\d+)?)`, "g"); |
| | | const matchTow = row.tell.match(regex); |
| | | let right = Number(matchTow[0].split(match[0])[1]); |
| | | let left = row.ask.substring(row.ask.indexOf(match[0]) + 1); |
| | | if (Number(left) != Number(right)) { |
| | | //this.$message.error("666666"); |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flag = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // å¦æè¦æ±æè¿°å«æèå´ |
| | | const regexTwo = /[~-]/; |
| | | const matchTwo = row.tell.match(regexTwo); |
| | | const matchAsk = row.ask.match(regexTwo); |
| | | if (matchTwo) { |
| | | let left = row.tell.substring(0, row.tell.indexOf(matchTwo[0])); |
| | | let right = row.tell.substring(row.tell.indexOf(matchTwo[0]) + 1); |
| | | if (!isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | let leftAsk = row.ask.substring( |
| | | 0, |
| | | row.ask.indexOf(matchAsk[0]) |
| | | ); |
| | | let rightAsk = row.ask.substring( |
| | | row.ask.indexOf(matchAsk[0]) + 1 |
| | | ); |
| | | if ( |
| | | Number(leftAsk) != Number(left) || |
| | | Number(rightAsk) != Number(right) |
| | | ) { |
| | | //this.$message.error("777777"); |
| | | this.errOrFiberList.push( |
| | | "å
纤管å¥è²æ " + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flag = false; |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | // å
çº¤å¸¦æ£æµé¡¹ä¿¡æ¯æ ¡éª |
| | | this.fibersList.forEach((item) => { |
| | | if (item.productList.length > 0) { |
| | | item.productList.forEach((row) => { |
| | | if (row.ask == null || row.ask == "") { |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | } |
| | | if (row.tell == null || row.tell == "") { |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.color + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | } |
| | | // å¦ææ£æµè¦æ±å«ææ£è´å· |
| | | if (row.tell.indexOf("±") != -1) { |
| | | let left = row.tell.substring(0, row.tell.indexOf("±")); |
| | | let right = row.tell.substring(row.tell.indexOf("±") + 1); |
| | | // 妿å¯ä»¥è½¬å为æ°å¼ |
| | | if (!isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | if (row.ask.indexOf("-") != -1) { |
| | | let left1 = row.ask.substring(0, row.ask.indexOf("-")); |
| | | let right1 = row.ask.substring(row.ask.indexOf("-") + 1); |
| | | if ( |
| | | Number(left1) != Number(left) - Number(right) || |
| | | Number(right1) != Number(left) + Number(right) |
| | | ) { |
| | | // this.$message.error('11111') |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.colorShow + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flags = false; |
| | | } |
| | | } else { |
| | | // this.$message.error('2222') |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.colorShow + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flags = false; |
| | | } |
| | | } |
| | | // å¦æè¦æ±æè¿°å·¦è¾¹ä¸è½è½¬å为æ°å¼ |
| | | else if (isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | const regex = /[~-]/; |
| | | const match = left.match(regex); |
| | | // å·¦è¾¹å«æ - ~ ç¬¦å· |
| | | if (match) { |
| | | let newLeft = ""; |
| | | if (left.includes("ï¼")) { |
| | | newLeft = left.replace("ï¼", "("); |
| | | } |
| | | if (left.includes("ï¼")) { |
| | | newLeft = newLeft.replace("ï¼", ")"); |
| | | } |
| | | const regexTwo = /\((\d+(\.\d+)?)([~-])(\d+(\.\d+)?)\)/; |
| | | const matchTwo = newLeft.match(regexTwo); |
| | | let leftTwo = Number(matchTwo[1]) - Number(right); |
| | | let rightTwo = Number(matchTwo[4]) + Number(right); |
| | | if (row.ask.indexOf("-") != -1) { |
| | | let left1 = row.ask.substring(0, row.ask.indexOf("-")); |
| | | let right1 = row.ask.substring(row.ask.indexOf("-") + 1); |
| | | if ( |
| | | Number(left1) != leftTwo || |
| | | Number(right1) != rightTwo |
| | | ) { |
| | | // this.$message.error('33333') |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.colorShow + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flags = false; |
| | | } |
| | | } else { |
| | | // this.$message.error('44444') |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.colorShow + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flags = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // å¦ææ£æµè¦æ±å«æâ¤ < ⥠> ç¬¦å· |
| | | const regex = /[â¤<â¥>]/; |
| | | const match = row.tell.match(regex); |
| | | if (match) { |
| | | // 符å·ä¸ä¸è´ |
| | | if (row.ask.indexOf(match[0]) != 0) { |
| | | // this.$message.error('555555') |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.colorShow + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flags = false; |
| | | } else { |
| | | // 符å·ä¸è´ |
| | | if (row.tell.indexOf("&") != -1) { |
| | | if (row.ask.indexOf("&") == -1) { |
| | | // this.$message.error("æ£æµè¦æ±ä¸ç¬¦åè¦æ±æè¿°"); |
| | | // row.ask = row.tell; |
| | | } else { |
| | | let left = row.tell.substring(0, row.tell.indexOf("&")); |
| | | let right = row.tell.substring(row.tell.indexOf("&") + 1); |
| | | |
| | | let leftAsk = row.ask.substring(0, row.ask.indexOf("&")); |
| | | let rightAsk = row.ask.substring(row.ask.indexOf("&") + 1); |
| | | console.log("&", left, right, leftAsk, rightAsk); |
| | | if (leftAsk != left || rightAsk != right) { |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.colorShow + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flags = false; |
| | | } |
| | | } |
| | | } else { |
| | | const regex = new RegExp(`${match[0]}(\\d+(\\.\\d+)?)`, "g"); |
| | | const matchTow = row.tell.match(regex); |
| | | let right = Number(matchTow[0].split(match[0])[1]); |
| | | let left = row.ask.substring(row.ask.indexOf(match[0]) + 1); |
| | | if (Number(left) != Number(right)) { |
| | | // this.$message.error('666666') |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.colorShow + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flags = false; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // å¦æè¦æ±æè¿°å«æèå´ |
| | | const regexTwo = /[~-]/; |
| | | const matchTwo = row.tell.match(regexTwo); |
| | | const matchAsk = row.ask.match(regexTwo); |
| | | if (matchTwo) { |
| | | let left = row.tell.substring(0, row.tell.indexOf(matchTwo[0])); |
| | | let right = row.tell.substring(row.tell.indexOf(matchTwo[0]) + 1); |
| | | if (!isNaN(Number(left)) && !isNaN(Number(right))) { |
| | | let leftAsk = row.ask.substring( |
| | | 0, |
| | | row.ask.indexOf(matchAsk[0]) |
| | | ); |
| | | let rightAsk = row.ask.substring( |
| | | row.ask.indexOf(matchAsk[0]) + 1 |
| | | ); |
| | | if ( |
| | | Number(leftAsk) != Number(left) || |
| | | Number(rightAsk) != Number(right) |
| | | ) { |
| | | // this.$message.error('777777') |
| | | this.errOrFiberRibbonList.push( |
| | | "å
纤带" + |
| | | item.colorShow + |
| | | " " + |
| | | row.inspectionItem + |
| | | " " + |
| | | row.inspectionItemSubclass |
| | | ); |
| | | flags = false; |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | if (this.bushing.length === 0) { |
| | | this.$message.error("缺å°å¥ç®¡æ æ³ä¿å"); |
| | | return; |
| | | } |
| | | this.bushing.forEach((item) => { |
| | | // 妿å
纤带æå¼ |
| | | if (this.fibersList.length != 0) { |
| | | // this.fibersList.forEach(a=>{ |
| | | // a.fiber = this.fiberList |
| | | // }) |
| | | |
| | | // item.fibers = this.fibersList // å
纤带 |
| | | let fibersFilter = this.fibersList.filter( |
| | | (a) => item.color == a.color |
| | | ); |
| | | fibersFilter.forEach((aa) => { |
| | | aa.fiber = aa.fiber.filter((b) => b.bushColor == aa.color); |
| | | }); |
| | | item.fibers = fibersFilter; |
| | | item.fiber = []; // å
纤 |
| | | } else { |
| | | // 妿å
纤带没æå¼ |
| | | item.fibers = []; // å
纤带 |
| | | item.fiber = this.fiberList.filter((a) => item.color == a.bushColor); // å
纤 |
| | | //item.fiber = this.fiberList // å
纤 |
| | | } |
| | | }); |
| | | if (!flag || !flags) { |
| | | // æ¶æ¯æç¤º |
| | | this.errOrFiberRibbonList = [...new Set(this.errOrFiberRibbonList)]; |
| | | this.errOrFiberList = [...new Set(this.errOrFiberList)]; |
| | | let list = [...this.errOrFiberRibbonList, ...this.errOrFiberList]; |
| | | |
| | | let newData = []; |
| | | const h = this.$createElement; |
| | | for (let i in list) { |
| | | const lastChar = list[i].slice(-1); |
| | | if (lastChar == "-") { |
| | | list[i] = list[i].slice(0, -1); |
| | | } |
| | | newData.push( |
| | | h( |
| | | "p", |
| | | { style: "font-size: 14px;color: red;" }, |
| | | Number(i) + 1 + "ã" + list[i] |
| | | ) |
| | | ); |
| | | } |
| | | newData.push( |
| | | h( |
| | | "p", |
| | | { |
| | | style: |
| | | "font-size: 16px;color:#000;margin-top:12px;overflow-y: auto;max-height:80vh", |
| | | }, |
| | | "以ä¸é¡¹ç®æ£æµè¦æ±ä¸è¦æ±æè¿°ä¸å¹é
ï¼ç¡®å®ä¿åï¼" |
| | | ) |
| | | ); |
| | | this.$confirm("æç¤º", { |
| | | title: "æç¤º", |
| | | message: h("div", null, newData), |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "", |
| | | }) |
| | | .then(() => { |
| | | this.$message.success("å·²ä¿å"); |
| | | this.sample.forEach((a) => { |
| | | a.bushing = this.bushing; |
| | | }); |
| | | this.$emit("saveFiberopticConfig", eventData); |
| | | console.log("this.sample", this.sample); |
| | | // æ¸
空éè¯¯æ¶æ¯ |
| | | this.errOrFiberList = []; |
| | | this.errOrFiberRibbonList = []; |
| | | }) |
| | | .catch(() => { |
| | | // æ¸
空éè¯¯æ¶æ¯ |
| | | this.errOrFiberList = []; |
| | | this.errOrFiberRibbonList = []; |
| | | }); |
| | | } else { |
| | | this.$message.success("å·²ä¿å"); |
| | | this.sample.forEach((a) => { |
| | | a.bushing = this.bushing; |
| | | }); |
| | | let eventData = { |
| | | bushing: this.bushing, |
| | | fiberPairing: this.bsm2Val2, |
| | | }; |
| | | this.$emit("saveFiberopticConfig", eventData); |
| | | console.log("this.sample", this.sample); |
| | | } |
| | | }, |
| | | beforeClose(done) { |
| | | if (this.bsm1) { |
| | | if (this.bsm1Val === null || this.bsm1Val === "") { |
| | | this.$message.error("ç¹æ®é¡¹ç®å¿
é¡»å¤ç"); |
| | | return; |
| | | } |
| | | } |
| | | if (this.bsm2) { |
| | | if (this.bsm2Val2.length === 0) { |
| | | this.$message.error("ç¹æ®é¡¹ç®å¿
é¡»å¤ç"); |
| | | return; |
| | | } |
| | | let set = new Set(); |
| | | for (let i = 0; i < this.bsm2Val2.length; i++) { |
| | | let num0 = set.size; |
| | | set.add(JSON.stringify(this.bsm2Val2[i])); |
| | | let num1 = set.size; |
| | | if (num1 == num0) { |
| | | this.$message.error("å
³è项ç®ä¸è½éå¤"); |
| | | return; |
| | | } |
| | | set.add(JSON.stringify(this.bsm2Val2[i].reverse())); |
| | | let num2 = set.size; |
| | | if (num1 == num2) { |
| | | this.$message.error("å
³è项ç®ä¸è½éå¤"); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | this.isBsm2Val2 = true; |
| | | done(); |
| | | }, |
| | | beforeClose0(done) { |
| | | if (!this.bsm3Val) { |
| | | this.$message.error("RSTå¿
须填å"); |
| | | return; |
| | | } else { |
| | | if (Array.isArray(this.bsmRow3)) { |
| | | this.bsmRow3.forEach((item) => { |
| | | item.rts = this.bsm3Val; |
| | | }); |
| | | } else { |
| | | this.bsmRow3.rts = this.bsm3Val; |
| | | } |
| | | } |
| | | done(); |
| | | }, |
| | | upBsm1(val) { |
| | | let sections = JSON.parse(this.bsmRow.section); |
| | | let asks = JSON.parse(this.bsmRow.ask); |
| | | let tells = JSON.parse(this.bsmRow.tell); |
| | | let manHours = JSON.parse(this.bsmRow.manHour); |
| | | let prices = JSON.parse(this.bsmRow.price); |
| | | for (var a in sections) { |
| | | if (val === sections[a]) { |
| | | this.productList.forEach((p) => { |
| | | if (p.id === this.bsmRow.id) { |
| | | p.section = sections[a]; |
| | | p.ask = asks[a]; |
| | | p.tell = tells[a]; |
| | | p.manHour = manHours[a]; |
| | | p.price = prices[a]; |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | } |
| | | }, |
| | | bsm2Up(val) { |
| | | if (this.selfConnectBoolean) { |
| | | this.bsm2Val2 = []; |
| | | // this.bsm2Val2 éè¦çæç»ç»æ this.fiberList 䏿æ¡å
容 |
| | | // è¿æ»¤åºå¥ç®¡åè²æ ä¸è´çæ°æ® 以åç¸åºç䏿 |
| | | let newFiberList = []; |
| | | let resultList = []; |
| | | for (let i = 0; i < this.fiberList.length; i++) { |
| | | let data = this.fiberList[i]; |
| | | if (data.bushColor == data.color) { |
| | | newFiberList.push([data.bushColor, i + 1]); |
| | | } |
| | | } |
| | | // æ ¹æ®åå
¸è¿è¡ä¸ä¸ªæåº |
| | | for (let i = 0; i < this.colors.length; i++) { |
| | | let color = this.colors[i]; |
| | | for (let j = 0; j < newFiberList.length; j++) { |
| | | let newColor = newFiberList[j]; |
| | | if (color.value == newColor[0]) { |
| | | newFiberList[j].push(color.orderNum); |
| | | } |
| | | } |
| | | } |
| | | newFiberList.sort((o1, o2) => o1[2] - o2[2]); |
| | | // æ ¹æ®è§åè¿è¡èµå¼ 1-2 3-4 5-6 7-8 9-10 |
| | | for (let i = 0; i < newFiberList.length; i++) { |
| | | // é¿å
夿¬¡å¾ªç¯ |
| | | if (newFiberList.length < 2 * i + 1) { |
| | | break; |
| | | } |
| | | if ( |
| | | newFiberList.length == 2 * i + 1 && |
| | | newFiberList.length % 2 != 0 |
| | | ) { |
| | | resultList.push([]); |
| | | } else { |
| | | resultList.push([ |
| | | newFiberList[2 * i][1], |
| | | newFiberList[2 * i + 1][1], |
| | | ]); |
| | | } |
| | | } |
| | | resultList.length = val; |
| | | console.log("resultList", resultList); |
| | | this.bsm2Val2 = resultList; |
| | | console.log("this.bsm2Val2", this.bsm2Val2); |
| | | } else { |
| | | // if (val == this.bsm2Val3.length) { |
| | | // this.bsm2Val2 = []; |
| | | // this.computationalPairing(this.selectFiberList.length,true); |
| | | // if (this.bsm2Val2.length === 0) { |
| | | // this.bsm2Val = |
| | | // ((this.selectFiberList.length + 1) * this.selectFiberList.length) / 2; |
| | | // this.bsm2Val2 = this.HaveJson(this.bsm2Val3); |
| | | // } else { |
| | | // this.bsm2Val = this.selectFiberList.length; |
| | | // } |
| | | // this.bsm1DiaLoading = false; |
| | | // console.log('loading',this,this.bsm1DiaLoading); |
| | | // } else { |
| | | // ä¸å¯¹ä¸ |
| | | this.bsm1DiaLoading = true; |
| | | let list = []; |
| | | let length = this.selectFiberList.length; |
| | | if (val) { |
| | | let num = 0; |
| | | if (val > length) { |
| | | num = length; |
| | | } else { |
| | | num = val; |
| | | } |
| | | for (let i = 1; i <= num; i++) { |
| | | list.push([i, i]); |
| | | } |
| | | } |
| | | // å©ä½çæç
§è§åæ¥æ§è¡ |
| | | if (val > length) { |
| | | for (let i = 1; i <= length; i++) { |
| | | for (let j = 1; j <= length; j++) { |
| | | if (list.length < val) { |
| | | if (i < j) { |
| | | list.push([i, j]); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | this.bsm2Val2 = list; |
| | | this.bsm1DiaLoading = false; |
| | | } |
| | | //} |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .ins_order_config { |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | overflow-x: hidden; |
| | | } |
| | | .models { |
| | | font-size: 14px; |
| | | width: 80%; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | .ins_order_config::-webkit-scrollbar { |
| | | width: 0; |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .center { |
| | | width: 100%; |
| | | height: calc(100% - 60px); |
| | | } |
| | | |
| | | .grid-content { |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.05); |
| | | } |
| | | |
| | | .grid-content h5 { |
| | | color: #3a7bfa; |
| | | font-weight: 400; |
| | | line-height: 32px; |
| | | padding-left: 16px; |
| | | box-sizing: border-box; |
| | | border-bottom: 1px solid #eee; |
| | | } |
| | | .search { |
| | | width: calc(100% - 40px); |
| | | background-color: #fff; |
| | | padding: 5px 40px 5px 0; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 50px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 120px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | .search-item { |
| | | display: flex; |
| | | align-items: center; |
| | | line-height: 36px; |
| | | } |
| | | |
| | | .search-item label { |
| | | width: 90px; |
| | | font-size: 12px; |
| | | color: #606266; |
| | | /* text-align: right; */ |
| | | } |
| | | |
| | | .btns { |
| | | margin: 8px 0 8px 10px; |
| | | } |
| | | |
| | | >>> .el-table th.el-table__cell > .cell { |
| | | padding-top: 2px !important; |
| | | padding-bottom: 2px !important; |
| | | } |
| | | >>> .all-disabled .el-checkbox__input .el-checkbox__inner { |
| | | background-color: #edf2fc; |
| | | border-color: #dcdfe6; |
| | | cursor: not-allowed; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div>æ£éªä¸å</div> |
| | | <div> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px; text-align: left" |
| | | >æ£éªä¸å</el-col |
| | | > |
| | | <el-col :span="12" style="text-align: right"> |
| | | <el-button |
| | | size="medium" |
| | | type="primary" |
| | | @click="dialogVisible1 = true" |
| | | :loading="exportCheckedLoading" |
| | | >å¯¼åºæ£éªç»æ</el-button |
| | | > |
| | | <el-button size="medium" type="primary" @click="print" |
| | | >æ ç¾æå°</el-button |
| | | > |
| | | <el-button size="medium" type="primary" @click="playOrder(1)" |
| | | >ä¸å</el-button |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <basic-container> |
| | | <div class="search" :style="`height: ${more ? 130 : 80}px;`"> |
| | | <el-row :gutter="10" style="width: 100%"> |
| | | <el-col :span="20" style="display: flex; flex-wrap: wrap"> |
| | | <div class="search_thing" style="width: 20%"> |
| | | <div class="search_label">å§æç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="componentData.entity.entrustCode" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="width: 20%"> |
| | | <div class="search_label" style="width: 120px"> |
| | | å¤é¨å§æç¼å·ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="componentData.entity.outEntrustCode" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="width: 20%"> |
| | | <div class="search_label">æ ·ååç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="componentData.entity.sampleName" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="width: 20%"> |
| | | <div class="search_label">æ ·ååå·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="componentData.entity.sampleModel" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="width: 20%"> |
| | | <div class="search_label">æ ·åç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="componentData.entity.sampleCode" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="width: 40%" v-if="more"> |
| | | <div class="search_label">ä¸åæ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="componentData.entity.startAndEndTime" |
| | | type="daterange" |
| | | size="small" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | value-format="yyyy-MM-dd" |
| | | clearable |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="width: 20%" v-if="more"> |
| | | <div class="search_label">ä¸å人ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="componentData.entity.name" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="width: 20%" v-if="more"> |
| | | <div class="search_label">å·¥ç¨åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="componentData.entity.engineering" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" style="width: 20%" v-if="more"> |
| | | <div class="search_label">ç产åä½ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="componentData.entity.production" |
| | | @keyup.enter.native="refreshTable()" |
| | | ></el-input> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <div class="search_thing"> |
| | | <el-button |
| | | type="text" |
| | | :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" |
| | | style="color: #3a7bfa" |
| | | @click="more = !more" |
| | | >{{ !more ? "æ´å¤" : "æ¶èµ·" }}</el-button |
| | | > |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </basic-container> |
| | | <basic-container> |
| | | <div style="width: 100%; height: 100%" v-show="active == 0"> |
| | | <div class="table"> |
| | | <ul class="tab"> |
| | | <li |
| | | v-for="(m, i) in tabList" |
| | | :key="i + 'afgh'" |
| | | :class="{ active: i == tabIndex }" |
| | | @click="handleTab(m, i)" |
| | | > |
| | | {{ m.label }} |
| | | </li> |
| | | </ul> |
| | | <!-- <ValueTable |
| | | :style="getStyle()" |
| | | ref="ValueTable" |
| | | :url="$api.insOrder.selectInsOrderParameter" |
| | | :componentData="componentData" |
| | | :upIndex="upIndex" |
| | | @getTableData="getTableData" |
| | | /> --> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | @pagination="pagination" |
| | | :column="column" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | ></lims-table> |
| | | </div> |
| | | <!-- å®¡æ ¸ --> |
| | | <el-dialog |
| | | title="ä¸åå®¡æ ¸" |
| | | :visible.sync="verifyDialogVisible" |
| | | width="30%" |
| | | :before-close="handleClose" |
| | | > |
| | | <p style="font-size: 16px; color: #333333" v-if="!isPass"> |
| | | å§æç¼å·<span style="color: #34bd66">ZTMS2023071001</span |
| | | >çä¿¡æ¯æ¯å¦éè¿ |
| | | </p> |
| | | <el-form |
| | | :label-position="labelPosition" |
| | | :model="formData" |
| | | label-width="150px" |
| | | ref="ruleForm" |
| | | v-else |
| | | > |
| | | <el-form-item label="请è¾å
¥æ ·ååºä½å·ï¼"> |
| | | <el-input |
| | | v-model="formData.specificationModel" |
| | | size="small" |
| | | style="width: 60%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row v-if="!isPass"> |
| | | <el-button @click="handleClose">é å</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad" |
| | | >é è¿</el-button |
| | | > |
| | | </el-row> |
| | | <el-row v-else> |
| | | <el-button @click="handleClose">è¿ å</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ¤é --> |
| | | <el-dialog |
| | | title="ä¸åæ¤é" |
| | | :visible.sync="quashDialogVisible" |
| | | width="30%" |
| | | :before-close="handleClose" |
| | | > |
| | | <p style="font-size: 16px; color: #333333" v-if="!isQuash"> |
| | | å§æç¼å·<span style="color: #34bd66">{{ |
| | | this.insOrderRow.entrustCode |
| | | }}</span |
| | | >çä¿¡æ¯æ¯å¦æ¤é |
| | | </p> |
| | | <el-form |
| | | :label-position="labelPosition" |
| | | :model="formData" |
| | | label-width="150px" |
| | | ref="ruleForm" |
| | | v-else |
| | | > |
| | | <el-form-item label="请è¾å
¥æ¤éåå ï¼"> |
| | | <el-input |
| | | v-model="formData.specificationModel" |
| | | size="small" |
| | | style="width: 60%" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row v-if="!isQuash"> |
| | | <el-button @click="handleClose">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | <el-row v-else> |
| | | <el-button @click="handleClose">è¿ å</el-button> |
| | | <el-button type="primary" @click="submitForm" :loading="upLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- ä¸å --> |
| | | <el-dialog |
| | | title="æ£éªåé
" |
| | | :visible.sync="issuedDialogVisible" |
| | | width="400px" |
| | | :before-close="handleClose" |
| | | > |
| | | <div class="body" style="max-height: 60vh"> |
| | | <el-row> |
| | | <el-col class="search_thing" style="width: 95%"> |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>çº¦å®æ¶é´ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-date-picker |
| | | size="small" |
| | | v-model="distributeData.appointed" |
| | | 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" style="width: 95%"> |
| | | <div class="search_label"> |
| | | <span class="required-span" v-show="distributeData.type == 2" |
| | | >* </span |
| | | >ææ´¾äººåï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="distributeData.userId" |
| | | placeholder="è¯·éæ©" |
| | | size="small" |
| | | style="width: 100%" |
| | | clearable |
| | | filterable |
| | | @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" |
| | | style="width: 95%" |
| | | v-if="distributeData.userId" |
| | | > |
| | | <div class="search_label"> |
| | | <span class="required-span">* </span>è¯éªå®¤ï¼ |
| | | </div> |
| | | <div class="search_input"> |
| | | <el-select |
| | | v-model="distributeData.sonLaboratory" |
| | | placeholder="è¯·éæ©11" |
| | | size="small" |
| | | style="width: 100%" |
| | | clearable |
| | | filterable |
| | | > |
| | | <el-option |
| | | v-for="(item, i) in sonLaboratoryList" |
| | | :key="i + 'oooo'" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="handleClose2">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm2" :loading="upLoad" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="æ°æ®æ¥ç" |
| | | :visible.sync="dataDialogVisible" |
| | | width="100%" |
| | | fullscreen |
| | | > |
| | | <div style="height: 80vh; overflow-y: auto" v-if="dataDialogVisible"> |
| | | <ValueTable |
| | | ref="ValueTableDataLook" |
| | | :rowKey="'insProductId'" |
| | | :url="$api.insOrder.selectSampleAndProductByOrderId" |
| | | :componentData="componentDataDataLook" |
| | | /> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog |
| | | top="5vh" |
| | | :title="deleteTilte" |
| | | :visible.sync="deleteDialogVisible" |
| | | :before-close="handleCloseDelete" |
| | | width="80%" |
| | | > |
| | | <div class="table-container" v-if="deleteDialogVisible"> |
| | | <!-- <ValueTable |
| | | ref="ValueTableDataDelete" |
| | | :url=" |
| | | $api.insOrder.selectNoProducts + |
| | | '?orderId=' + |
| | | orderId + |
| | | '&ids=' + |
| | | this.revocationInsProductIds |
| | | " |
| | | :componentData="componentDataDelete" |
| | | :isColumnWidth="true" |
| | | /> --> |
| | | <el-table |
| | | height="500px" |
| | | ref="revokeTable" |
| | | @select="handleSelectionChange" |
| | | @select-all="handleSelectionAll" |
| | | :data="treeTableData" |
| | | style="width: 100%" |
| | | row-key="id" |
| | | border |
| | | lazy |
| | | :load="load" |
| | | :tree-props="{ children: 'children', hasChildren: 'hasChildren' }" |
| | | > |
| | | <el-table-column |
| | | v-if="deleteTilte == 'æ¤é'" |
| | | type="selection" |
| | | width="55" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="sampleCode" |
| | | label="æ ·åç¼å·" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItem" |
| | | label="æ£éªé¡¹" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItemSubclass" |
| | | label="æ£éªå项" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="sampleType" |
| | | label="æ ·ååç±»" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="sample" label="æ ·å" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column prop="model" label="åå·" show-overflow-tooltip> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="sonLaboratory" |
| | | label="è¯éªå®¤" |
| | | show-overflow-tooltip |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="tell" label="è¦æ±å¼" show-overflow-tooltip> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="handleNo">{{ |
| | | deleteTilte == "æ¤é" ? "å æ¶" : "ä¸éè¿" |
| | | }}</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitDelete" |
| | | :loading="printLoading" |
| | | >{{ deleteTilte == "æ¤é" ? "ç¡® å®" : "é è¿" }}</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ°æ®æ¥ç详æ
--> |
| | | <el-dialog |
| | | title="æ¥ç详æ
" |
| | | :visible.sync="dialogVisible" |
| | | width="70%" |
| | | :before-close="handleClose3" |
| | | > |
| | | <el-table |
| | | v-if="type == 'åæ ¹åç´çç§' || type == 'æ¾å¥ç®¡'" |
| | | :data="viewDetailsList" |
| | | height="400px" |
| | | border |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | label="åºå·" |
| | | width="80px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="entrustCode" |
| | | label="å§æåå·" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="sampleCode" |
| | | label="æ ·åç¼å·" |
| | | ></el-table-column> |
| | | <el-table-column prop="color" label="å¥ç®¡"></el-table-column> |
| | | <!-- <el-table-column prop="inspectionItem" label="æ£éªé¡¹"></el-table-column> --> |
| | | <el-table-column prop="insValue" label="æ£éªç»æ"></el-table-column> |
| | | </el-table> |
| | | |
| | | <el-table |
| | | v-if="type == 'ææå¼ºåº¦'" |
| | | :data="viewDetailsList" |
| | | height="400px" |
| | | border |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | label="åºå·" |
| | | width="80px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItem" |
| | | label="æ£éªé¡¹" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItemSubclass" |
| | | label="æ£éªå项" |
| | | ></el-table-column> |
| | | <el-table-column prop="width" label="宽度"></el-table-column> |
| | | <el-table-column prop="thickness" label="å度"></el-table-column> |
| | | <el-table-column prop="testValue" label="æ£éªå¼"></el-table-column> |
| | | </el-table> |
| | | |
| | | <el-table |
| | | v-if="type == 'æè£ä¼¸é¿ç'" |
| | | :data="viewDetailsList" |
| | | height="400px" |
| | | border |
| | | style="width: 100%" |
| | | > |
| | | <el-table-column |
| | | type="index" |
| | | label="åºå·" |
| | | width="80px" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItem" |
| | | label="æ£éªé¡¹" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="inspectionItemSubclass" |
| | | label="æ£éªå项" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | v-for="(v, i) in tableHeader" |
| | | :key="i" |
| | | :prop="`testValue${i}`" |
| | | :label="`æ£éªå¼${i + 1}`" |
| | | ></el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | |
| | | <!-- 导åºå·²æ£æ°æ® --> |
| | | <el-dialog |
| | | title="éæ©æ¥æ" |
| | | :visible.sync="dialogVisible1" |
| | | width="30%" |
| | | :before-close="handleClose4" |
| | | > |
| | | <span>ä¸åæ¥æ: </span> |
| | | <el-date-picker |
| | | v-model="exportCheckedDate" |
| | | type="daterange" |
| | | size="small" |
| | | value-format="yyyy-MM-dd" |
| | | range-separator="è³" |
| | | start-placeholder="å¼å§æ¥æ" |
| | | end-placeholder="ç»ææ¥æ" |
| | | > |
| | | </el-date-picker> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose4">å æ¶</el-button> |
| | | <el-button type="primary" @click="exportChecked()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | <div style="width: 100%; height: 100%" v-if="active > 0"> |
| | | <Add |
| | | :active="active" |
| | | :currentId="currentId" |
| | | v-if="active < 4" |
| | | :examine="examine" |
| | | /> |
| | | </div> |
| | | <el-dialog |
| | | title="æ ç¾æå°" |
| | | :visible.sync="printDialogVisible" |
| | | width="40%" |
| | | top="5vh" |
| | | > |
| | | <div |
| | | style="width: 100%; height: 400px; overflow-y: auto" |
| | | v-loading="loadPint" |
| | | > |
| | | <div class="dia_body"> |
| | | <el-checkbox |
| | | style="margin: 10px 5px" |
| | | :indeterminate="isIndeterminate" |
| | | v-model="checkAll" |
| | | @change="handleCheckAllChange" |
| | | >å
¨é</el-checkbox |
| | | > |
| | | <el-checkbox-group |
| | | @change="changePrintCode()" |
| | | v-model="checkIndexList" |
| | | > |
| | | <el-card |
| | | class="box-card" |
| | | v-for="(item, i) in qrData" |
| | | :key="i + 'wwwww'" |
| | | style="margin-bottom: 15px; font-size: 16px !important" |
| | | > |
| | | <el-checkbox |
| | | :label="i" |
| | | :key="i" |
| | | style="position: relative; top: -20px; left: 5px" |
| | | ><br |
| | | /></el-checkbox> |
| | | <div> |
| | | <el-row style="font-size: 14px; padding-left: 20px"> |
| | | <el-col style="font-weight: bold">{{ item.pName }}</el-col> |
| | | </el-row> |
| | | <div style="display: flex"> |
| | | <div> |
| | | <el-col :span="8" :offset="4"> |
| | | <vueQr |
| | | :text=" |
| | | 'https://zttx-lims.ztt.cn:8021/lims/qr/qrScan?code=' + |
| | | item.id + |
| | | '&type=sample' |
| | | " |
| | | :size="140" |
| | | :margin="2" |
| | | ></vueQr> |
| | | </el-col> |
| | | </div> |
| | | <div style="margin-left: 50px; width: 100%"> |
| | | <el-row> |
| | | <el-col |
| | | style=" |
| | | font-weight: bold; |
| | | text-align: left; |
| | | font-size: 14px; |
| | | " |
| | | ><span>æ ·åç¼å·: </span |
| | | >{{ item.sampleCode }}</el-col |
| | | > |
| | | </el-row> |
| | | <el-row style="margin-top: 1px; font-size: 14px"> |
| | | <el-col style="font-weight: bold; text-align: left" |
| | | ><span>å§æåå·: </span>{{ item.code }}</el-col |
| | | > |
| | | </el-row> |
| | | <el-row style="margin-top: 1px; font-size: 14px"> |
| | | <el-col style="font-weight: bold; text-align: left" |
| | | ><span>è§æ ¼åå·: </span>{{ item.model }}</el-col |
| | | > |
| | | </el-row> |
| | | <el-row style="margin-top: 1px; font-size: 14px"> |
| | | <el-col style="font-weight: bold; text-align: left" |
| | | ><span>æ ·ååç§°: </span |
| | | >{{ item.sample }}</el-col |
| | | > |
| | | </el-row> |
| | | <el-row |
| | | style="margin-top: 1px; font-size: 14px" |
| | | class="ellipsis-multiline" |
| | | > |
| | | <el-col style="font-weight: bold; text-align: left" |
| | | ><span>æ£æµé¡¹ç®: </span>{{ item.item }}</el-col |
| | | > |
| | | </el-row> |
| | | <el-row style="margin-top: 2px; font-size: 14px"> |
| | | <el-col |
| | | style=" |
| | | font-weight: bold; |
| | | display: flex; |
| | | align-items: center; |
| | | " |
| | | ><span>æ ·åç¶æ: </span |
| | | ><el-radio-group |
| | | :value="item.insState" |
| | | style="margin-top: 7px; margin-left: 4px" |
| | | disabled |
| | | > |
| | | <el-radio |
| | | :label="0" |
| | | style="font-weight: bold; margin-right: 7px" |
| | | >å¾
æ£</el-radio |
| | | > |
| | | <el-radio |
| | | :label="1" |
| | | style="font-weight: bold; margin-right: 7px" |
| | | >卿£</el-radio |
| | | > |
| | | <el-radio |
| | | :label="2" |
| | | style="font-weight: bold; margin-right: 7px" |
| | | >å·²æ£</el-radio |
| | | > </el-radio-group |
| | | ><el-radio |
| | | :label="1" |
| | | style="font-weight: bold; margin-top: 7px" |
| | | v-model="item.isLeave" |
| | | disabled |
| | | >çæ ·</el-radio |
| | | ></el-col |
| | | > |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="printDialogVisible = false">å æ¶</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitPrint" |
| | | :loading="printLoading" |
| | | >æ å°</el-button |
| | | > |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <div |
| | | class="el-dialog__body" |
| | | style=" |
| | | overflow-y: auto; |
| | | margin-top: 0; |
| | | position: fixed; |
| | | top: 999px; |
| | | z-index: 99999; |
| | | display: none; |
| | | " |
| | | > |
| | | <div id="printMOrder" class="printMOrder" ref="printMOrder"> |
| | | <el-card |
| | | class="box-card" |
| | | v-for="(item, i) in checkDataList" |
| | | :key="i + 'uuuuu'" |
| | | style=" |
| | | font-size: 0.2cm !important; |
| | | page-break-after: always; |
| | | color: #000; |
| | | box-shadow: none; |
| | | margin: 0 !important; |
| | | padding: 0 !important; |
| | | " |
| | | > |
| | | <div style="display: flex"> |
| | | <div> |
| | | <el-col :span="10" :offset="2"> |
| | | <vueQr |
| | | :text=" |
| | | 'https://zttx-lims.ztt.cn:8021/lims/qr/qrScan?code=' + |
| | | item.id + |
| | | '&type=sample' |
| | | " |
| | | :size="60" |
| | | :margin="2" |
| | | ></vueQr> |
| | | </el-col> |
| | | </div> |
| | | <div style="margin-left: 0.32cm; line-height: 0.22cm"> |
| | | <el-row> |
| | | <el-col |
| | | style="font-size: 0.2cm; width: 4cm" |
| | | class="single-line-ellipsis" |
| | | ><span>æ ·åç¼å·: </span>{{ item.sampleCode }}</el-col |
| | | > |
| | | </el-row> |
| | | <el-row style="font-size: 0.2cm"> |
| | | <el-col><span>å§æåå·: </span>{{ item.code }}</el-col> |
| | | </el-row> |
| | | <el-row style="font-size: 0.2cm"> |
| | | <el-col><span>è§æ ¼åå·: </span>{{ item.model }}</el-col> |
| | | </el-row> |
| | | <el-row style="font-size: 0.2cm"> |
| | | <el-col |
| | | ><span>æ ·ååç§°: </span>{{ item.sample }}</el-col |
| | | > |
| | | </el-row> |
| | | <el-row style="font-size: 0.2cm; width: 4cm"> |
| | | <el-col class="ellipsis-multiline" |
| | | ><span>æ£æµé¡¹ç®: </span>{{ item.item }}</el-col |
| | | > |
| | | </el-row> |
| | | <el-row style="margin-top: 0.01cm; font-size: 0.2cm"> |
| | | <el-col style="display: flex; align-items: center" |
| | | ><span>æ ·åç¶æ: </span> |
| | | <span style="white-space: nowrap" |
| | | ><span v-if="item.insState == 0">â</span |
| | | ><span class="scor" v-if="item.insState != 0"></span>å¾
æ£ |
| | | <span v-if="item.insState == 1">â</span |
| | | ><span class="scor" v-if="item.insState != 1"></span>卿£ |
| | | <span v-if="item.insState == 2">â</span |
| | | ><span class="scor" v-if="item.insState != 2"></span>å·²æ£ |
| | | <span v-if="item.isLeave == 1">â</span |
| | | ><span class="scor" v-if="item.isLeave != 1"></span |
| | | >çæ ·</span |
| | | > |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default {}; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | addCustom, |
| | | selectCustomPageList, |
| | | delCustomById, |
| | | upCustom, |
| | | } from "@/api/business/inspectionOrder"; |
| | | import vueQr from "vue-qr"; |
| | | import getLodop from "@/utils/lodop"; |
| | | import Add from "./add.vue"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | Add, |
| | | vueQr, |
| | | }, |
| | | data() { |
| | | return { |
| | | tableData: [], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | column: [ |
| | | { label: "å§æç¼å·", prop: "entrustCode" }, |
| | | { label: "å¤é¨å§æç¼å·", prop: "outEntrustCode" }, |
| | | { label: "å§æåä½", prop: "company" }, |
| | | { label: "æ ·ååç§°", prop: "sampleName" }, |
| | | { label: "æ ·åç¼å·", prop: "sampleCode" }, |
| | | { label: "æ ·ååå·", prop: "sampleModel" }, |
| | | { label: "æ ·åæ°é", prop: "sampleNum" }, |
| | | { label: "æ£éªè¿åº¦%", prop: "insProgress" }, |
| | | { label: "ç´§æ¥ç¨åº¦", prop: "type" }, |
| | | { label: "夿³¨", prop: "remark" }, |
| | | { label: "å¶å人", prop: "custom" }, |
| | | { label: "çº¦å®æ¶é´", prop: "appointed" }, |
| | | { label: "ä¸åæ¶é´", prop: "createTime" }, |
| | | { label: "ä¸åæ¶é´", prop: "sendTime" }, |
| | | { label: "éåçç±", prop: "tell" }, |
| | | { label: "å§æäºº", prop: "prepareUser" }, |
| | | { label: "æ¤éæ¥æ", prop: "revocationTime" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ°æ®æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => {}, |
| | | }, |
| | | { |
| | | name: "æ¥åä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => {}, |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => {}, |
| | | }, |
| | | { |
| | | name: "æ¤é", |
| | | type: "text", |
| | | clickFun: (row) => {}, |
| | | }, |
| | | { |
| | | name: "æ¤éå®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => {}, |
| | | }, |
| | | { |
| | | name: "åé
", |
| | | type: "text", |
| | | clickFun: (row) => {}, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | //old |
| | | tableHeader: [], |
| | | type: "", |
| | | revokeDataAll: [], |
| | | revokeData: [], |
| | | treeTableData: [], |
| | | treeTableData2: [], |
| | | exportCheckedDate: [], |
| | | exportCheckedLoading: false, |
| | | dialogVisible1: false, |
| | | dialogVisible: false, |
| | | viewDetailsList: [], |
| | | deleteTilte: "æ¤é", |
| | | examine: null, |
| | | deleteList: [], |
| | | loadPint: false, |
| | | checkAll: false, |
| | | isIndeterminate: true, |
| | | printLoading: false, |
| | | printDialogVisible: false, |
| | | //æ¯å¦å®¡æ ¸éè¿ trueæ¯ false䏿¯ |
| | | isPass: false, |
| | | //æ¯å¦å®¡æ ¸æ¤é trueæ¯ false䏿¯ |
| | | isQuash: false, |
| | | verifyDialogVisible: false, |
| | | quashDialogVisible: false, |
| | | issuedDialogVisible: false, |
| | | dataDialogVisible: false, |
| | | formData: {}, |
| | | formData0: {}, |
| | | formData1: {}, |
| | | distributeData: { |
| | | orderId: "", |
| | | sampleId: "", |
| | | appointed: "", |
| | | userId: null, |
| | | sonLaboratory: "", |
| | | }, |
| | | // 人åå表 |
| | | personList: [], |
| | | currentTableData: [], |
| | | componentData: { |
| | | entity: { |
| | | entrustCode: null, |
| | | sample: null, |
| | | sampleName: null, |
| | | sampleModel: null, |
| | | sampleCode: null, |
| | | outEntrustCode: null, |
| | | state: 0, |
| | | name: null, |
| | | engineering: null, |
| | | production: null, |
| | | startAndEndTime: [], |
| | | // orderBy: { |
| | | // field: '', |
| | | // order: '' |
| | | // } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: true, |
| | | select: true, |
| | | selectMethod: "selectMethod", |
| | | do: [ |
| | | { |
| | | id: "dataLook", |
| | | font: "æ°æ®æ¥ç", |
| | | type: "text", |
| | | method: "handleDataLook", |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 && row.state != 4; |
| | | }, |
| | | }, |
| | | { |
| | | id: "download", |
| | | font: "æ¥åä¸è½½", |
| | | type: "text", |
| | | method: "download", |
| | | disabFun: (row, index) => { |
| | | return row.state != 4 || row.isRatify != 1; |
| | | }, |
| | | }, |
| | | { |
| | | id: "verify", |
| | | font: "å®¡æ ¸", |
| | | type: "text", |
| | | method: "handleVerify", |
| | | disabFun: (row, index) => { |
| | | return row.state != 0; |
| | | }, |
| | | }, |
| | | { |
| | | id: "quash", |
| | | font: "æ¤é", |
| | | type: "text", |
| | | method: "handlEquash", |
| | | disabFun: (row, index) => { |
| | | return row.state != 1 && row.state != 0; |
| | | }, |
| | | }, |
| | | { |
| | | id: "quashCheck", |
| | | font: "æ¤éå®¡æ ¸", |
| | | type: "text", |
| | | method: "handlEquashCheck", |
| | | disabFun: (row, index) => { |
| | | return ( |
| | | (row.state != 1 && row.state != 0) || |
| | | this.tabIndex != 1 || |
| | | row.isRevocation != 1 |
| | | ); |
| | | }, |
| | | }, |
| | | { |
| | | font: "åé
", |
| | | type: "text", |
| | | method: "handleIssued", |
| | | disabFun: (row, index) => { |
| | | return ( |
| | | row.state != 1 || |
| | | (row.entrustCode != null && |
| | | Number(row.assign) > 0 && |
| | | row.inspectId != null) |
| | | ); |
| | | }, |
| | | }, |
| | | ], |
| | | linkEvent: { |
| | | sampleName: { |
| | | method: "selectAllByOne", |
| | | }, |
| | | }, |
| | | tagField: { |
| | | type: { |
| | | select: [ |
| | | { |
| | | value: 0, |
| | | type: "success", |
| | | label: "æ®é", |
| | | }, |
| | | { |
| | | value: 1, |
| | | type: "warning", |
| | | label: "ä¼å
", |
| | | }, |
| | | { |
| | | value: 2, |
| | | type: "danger", |
| | | label: "ç´§æ¥", |
| | | }, |
| | | ], |
| | | }, |
| | | createUser: { |
| | | select: [], |
| | | }, |
| | | orderType: { |
| | | select: [], |
| | | }, |
| | | processing: { |
| | | select: [ |
| | | { |
| | | value: 1, |
| | | label: "å®éªå®¤å¤ç", |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: "å§æåä½åå", |
| | | }, |
| | | ], |
| | | }, |
| | | isLeave: { |
| | | select: [ |
| | | { |
| | | value: 1, |
| | | label: "çæ ·", |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: "ä¸çæ ·", |
| | | }, |
| | | ], |
| | | }, |
| | | send: { |
| | | select: [ |
| | | { |
| | | value: 1, |
| | | label: "èªå", |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: "å
¶ä»", |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: ["createTime", "sendTime", "type", "appointed"], |
| | | }, |
| | | orderId: "", |
| | | revocationInsProductIds: "", |
| | | componentDataDataLook: { |
| | | isPage: false, |
| | | entity: { |
| | | id: 0, |
| | | orderBy: { |
| | | field: "sampleCode", |
| | | order: "asc", |
| | | }, |
| | | }, |
| | | isIndex: false, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [ |
| | | { |
| | | id: "", |
| | | font: "æ¥ç", |
| | | type: "text", |
| | | method: "viewDetails", |
| | | showFun: (row, index) => { |
| | | return ( |
| | | row.inspectionItem == "åæ ¹åç´çç§" || |
| | | row.inspectionItem.includes("æ¾å¥ç®¡") || |
| | | row.inspectionItemSubclass.includes("æ¾å¥ç®¡") || |
| | | (row.inspectionItem == "ææå¼ºåº¦" && |
| | | (row.inspectionItemSubclass == "çèåå¤çå" || |
| | | row.inspectionItemSubclass == "çèåå¤çå")) || |
| | | (row.inspectionItem == "æè£ä¼¸é¿ç" && |
| | | (row.inspectionItemSubclass == "çèåå¤çå" || |
| | | row.inspectionItemSubclass == "çèåå¤çå")) |
| | | ); |
| | | }, |
| | | }, |
| | | ], |
| | | tagField: { |
| | | insState: { |
| | | select: [], |
| | | }, |
| | | insResult: { |
| | | select: [ |
| | | { |
| | | value: 1, |
| | | label: "åæ ¼", |
| | | type: "success", |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: "ä¸åæ ¼", |
| | | type: "danger", |
| | | }, |
| | | { |
| | | value: 3, |
| | | label: "ä¸å¤å®", |
| | | type: "", |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | selectField: {}, |
| | | spanConfig: { |
| | | rows: [ |
| | | // { |
| | | // name: "entrustCode", |
| | | // index: 0, |
| | | // }, |
| | | // { |
| | | // name: "sampleCode", |
| | | // index: 1, |
| | | // }, |
| | | ], |
| | | }, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | }, |
| | | componentDataDelete: { |
| | | entity: { |
| | | // orderId: '', |
| | | // orderBy: { |
| | | // field: 'sampleCode', |
| | | // order: 'asc' |
| | | // } |
| | | }, |
| | | isPage: false, |
| | | isIndex: false, |
| | | showSelect: true, |
| | | select: true, |
| | | selectMethod: "selectDelete", |
| | | do: [], |
| | | tagField: { |
| | | insState: { |
| | | select: [], |
| | | }, |
| | | insResult: { |
| | | select: [ |
| | | { |
| | | value: 1, |
| | | label: "åæ ¼", |
| | | type: "success", |
| | | }, |
| | | { |
| | | value: 0, |
| | | label: "ä¸åæ ¼", |
| | | type: "danger", |
| | | }, |
| | | ], |
| | | }, |
| | | }, |
| | | selectField: {}, |
| | | spanConfig: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | }, |
| | | deleteDialogVisible: false, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | upLoad: false, |
| | | tabList: [ |
| | | { |
| | | label: "å¾
å®¡æ ¸", |
| | | value: 0, |
| | | }, |
| | | { |
| | | label: "å¾
æ£éª", |
| | | value: 1, |
| | | }, |
| | | { |
| | | label: "å·²æ£éª", |
| | | value: 4, |
| | | }, |
| | | { |
| | | label: "éå", |
| | | value: 2, |
| | | }, |
| | | { |
| | | label: "æ¤é", |
| | | value: 3, |
| | | }, |
| | | ], |
| | | tabIndex: 0, |
| | | active: 0, //1ï¼ä¸åï¼2ï¼æ¥çï¼3ï¼å®¡æ ¸ï¼4ï¼å
纤é
ç½®,é»è®¤ä¸º0 |
| | | currentId: null, |
| | | more: false, |
| | | insOrderRow: {}, |
| | | checkIndexList: [], |
| | | checkDataList: [ |
| | | { |
| | | sampleCode: "11111", |
| | | }, |
| | | ], |
| | | qrData: [], |
| | | multipleSelection: [], |
| | | sonLaboratoryList: [], |
| | | queryCount: 0, |
| | | }; |
| | | }, |
| | | methods: { |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getList(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style></style> |
| | | <style scope> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 50px; |
| | | width: 100px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 90px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 90px); |
| | | } |
| | | |
| | | .table { |
| | | /* margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; */ |
| | | } |
| | | |
| | | .tab { |
| | | list-style-type: none; |
| | | display: flex; |
| | | margin-bottom: 12px; |
| | | } |
| | | |
| | | .tab li { |
| | | line-height: 24px; |
| | | padding: 6px 14px; |
| | | font-size: 14px; |
| | | color: #333333; |
| | | border: 1px solid #eeeeee; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .tab li:nth-child(1) { |
| | | border-radius: 8px 0 0 8px; |
| | | } |
| | | |
| | | .tab li:nth-child(5) { |
| | | border-radius: 0 8px 8px 0; |
| | | } |
| | | |
| | | .tab li.active { |
| | | border-color: #3a7bfa; |
| | | color: #3a7bfa; |
| | | } |
| | | |
| | | .el-form-item { |
| | | margin-bottom: 16px; |
| | | } |
| | | .box-card >>> .el-radio__inner { |
| | | border-radius: 2px !important; |
| | | } |
| | | .box-card >>> .el-radio__input.is-checked .el-radio__inner::after { |
| | | content: ""; |
| | | width: 8px; |
| | | height: 3px; |
| | | border: 1px solid white; |
| | | border-top: transparent; |
| | | border-right: transparent; |
| | | text-align: center; |
| | | display: block; |
| | | position: absolute; |
| | | top: 3px; |
| | | left: 2px; |
| | | transform: rotate(-45deg); |
| | | border-radius: 0px; |
| | | background: none; |
| | | } |
| | | >>> .el-radio__label { |
| | | color: #000 !important; |
| | | } |
| | | .el-dialog__body >>> .el-radio__label { |
| | | font-size: 8px; |
| | | } |
| | | .el-dialog__body >>> .el-radio__input.is-checked .el-radio__inner::after { |
| | | content: ""; |
| | | width: 4px; |
| | | height: 3px; |
| | | border: 1px solid #000; |
| | | border-top: transparent; |
| | | border-right: transparent; |
| | | text-align: center; |
| | | display: block; |
| | | position: absolute; |
| | | top: 1px; |
| | | left: 2px; |
| | | transform: rotate(-45deg); |
| | | border-radius: 0px; |
| | | background: none; |
| | | } |
| | | >>> .el-radio__input.is-disabled.is-checked .el-radio__inner { |
| | | background: #3a7bfa; |
| | | } |
| | | .el-dialog__body >>> .el-radio__input.is-disabled.is-checked .el-radio__inner { |
| | | background: transparent; |
| | | } |
| | | .el-dialog__body >>> .el-radio__inner { |
| | | width: 8px !important; |
| | | height: 8px !important; |
| | | } |
| | | .el-dialog__body >>> .el-radio__label { |
| | | padding-left: 2px !important; |
| | | } |
| | | .el-dialog__body >>> .el-card__body { |
| | | padding: 0 !important; |
| | | } |
| | | .el-dialog__body >>> .el-card { |
| | | border: none; |
| | | } |
| | | .el-dialog__body >>> .el-radio__input.is-disabled .el-radio__inner { |
| | | border-color: #000 !important; |
| | | } |
| | | .el-dialog__body >>> .el-radio__input.is-disabled.is-checked .el-radio__inner { |
| | | border: none !important; |
| | | } |
| | | .scor { |
| | | width: 0.01cm; |
| | | height: 0.01cm; |
| | | border-radius: 1px; |
| | | border: 1px solid #000; |
| | | display: inline-block; |
| | | } |
| | | .ellipsis-multiline { |
| | | display: -webkit-box; |
| | | -webkit-line-clamp: 2; |
| | | -webkit-box-orient: vertical; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | word-wrap: break-word; |
| | | max-height: 3em; /* é«åº¦ä¸ºåä½å¤§å°ç两å */ |
| | | line-height: 1.5em; /* è¡é« */ |
| | | height: 3em; /* é«åº¦ä¸ºè¡é«ç两å */ |
| | | } |
| | | .table-container { |
| | | height: 70vh; |
| | | overflow-y: auto; |
| | | } |
| | | .table-container.el-table { |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | white-space: nowrap; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | size="small" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | > |
| | | <el-form-item label="é¨é¨åç§°" prop="deptName"> |
| | | <el-input |
| | | v-model="queryParams.deptName" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="é¨é¨ç¶æ" clearable> |
| | | <el-select |
| | | v-model="queryParams.status" |
| | | placeholder="é¨é¨ç¶æ" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">é ç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >é ç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:dept:add']" |
| | | >æ°å¢</el-button> |
| | | >æ°å¢</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="el-icon-sort" |
| | | size="mini" |
| | | @click="toggleExpandAll" |
| | | >å±å¼/æå </el-button> |
| | | >å±å¼/æå </el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar |
| | | :showSearch.sync="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table |
| | |
| | | :default-expand-all="isExpandAll" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | > |
| | | <el-table-column prop="deptName" label="é¨é¨åç§°" width="260"></el-table-column> |
| | | <el-table-column prop="orderNum" label="æåº" width="200"></el-table-column> |
| | | <el-table-column |
| | | prop="deptName" |
| | | label="é¨é¨åç§°" |
| | | width="260" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="orderNum" |
| | | label="æåº" |
| | | width="200" |
| | | ></el-table-column> |
| | | <el-table-column prop="status" label="ç¶æ" width="100"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | <dict-tag |
| | | :options="dict.type.sys_normal_disable" |
| | | :value="scope.row.status" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="200"> |
| | | <el-table-column |
| | | label="å建æ¶é´" |
| | | align="center" |
| | | prop="createTime" |
| | | width="200" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:dept:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | >ä¿®æ¹</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-plus" |
| | | @click="handleAdd(scope.row)" |
| | | v-hasPermi="['system:dept:add']" |
| | | >æ°å¢</el-button> |
| | | >æ°å¢</el-button |
| | | > |
| | | <el-button |
| | | v-if="scope.row.parentId != 0" |
| | | size="mini" |
| | |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:dept:remove']" |
| | | >å é¤</el-button> |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-row> |
| | | <el-col :span="24" v-if="form.parentId !== 0"> |
| | | <el-form-item label="ä¸çº§é¨é¨" prop="parentId"> |
| | | <treeselect v-model="form.parentId" :options="deptOptions" :normalizer="normalizer" placeholder="éæ©ä¸çº§é¨é¨" /> |
| | | <treeselect |
| | | v-model="form.parentId" |
| | | :options="deptOptions" |
| | | :normalizer="normalizer" |
| | | placeholder="éæ©ä¸çº§é¨é¨" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¾ç¤ºæåº" prop="orderNum"> |
| | | <el-input-number v-model="form.orderNum" controls-position="right" :min="0" /> |
| | | <el-input-number |
| | | v-model="form.orderNum" |
| | | controls-position="right" |
| | | :min="0" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´è´£äºº" prop="leader"> |
| | | <el-input v-model="form.leader" placeholder="请è¾å
¥è´è´£äºº" maxlength="20" /> |
| | | <el-input |
| | | v-model="form.leader" |
| | | placeholder="请è¾å
¥è´è´£äºº" |
| | | maxlength="20" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èç³»çµè¯" prop="phone"> |
| | | <el-input v-model="form.phone" placeholder="请è¾å
¥èç³»çµè¯" maxlength="11" /> |
| | | <el-input |
| | | v-model="form.phone" |
| | | placeholder="请è¾å
¥èç³»çµè¯" |
| | | maxlength="11" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é®ç®±" prop="email"> |
| | | <el-input v-model="form.email" placeholder="请è¾å
¥é®ç®±" maxlength="50" /> |
| | | <el-input |
| | | v-model="form.email" |
| | | placeholder="请è¾å
¥é®ç®±" |
| | | maxlength="50" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | >{{ dict.label }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listDept, getDept, delDept, addDept, updateDept, listDeptExcludeChild } from "@/api/system/dept"; |
| | | import { |
| | | listDept, |
| | | getDept, |
| | | delDept, |
| | | addDept, |
| | | updateDept, |
| | | listDeptExcludeChild, |
| | | } from "@/api/system/dept"; |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | |
| | | export default { |
| | | name: "Dept", |
| | | dicts: ['sys_normal_disable'], |
| | | dicts: ["sys_normal_disable"], |
| | | components: { Treeselect }, |
| | | data() { |
| | | return { |
| | |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | deptName: undefined, |
| | | status: undefined |
| | | status: undefined, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | parentId: [ |
| | | { required: true, message: "ä¸çº§é¨é¨ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | { required: true, message: "ä¸çº§é¨é¨ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | deptName: [ |
| | | { required: true, message: "é¨é¨åç§°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | { required: true, message: "é¨é¨åç§°ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | orderNum: [ |
| | | { required: true, message: "æ¾ç¤ºæåºä¸è½ä¸ºç©º", trigger: "blur" } |
| | | { required: true, message: "æ¾ç¤ºæåºä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | email: [ |
| | | { |
| | | type: "email", |
| | | message: "请è¾å
¥æ£ç¡®çé®ç®±å°å", |
| | | trigger: ["blur", "change"] |
| | | } |
| | | trigger: ["blur", "change"], |
| | | }, |
| | | ], |
| | | phone: [ |
| | | { |
| | | pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, |
| | | message: "请è¾å
¥æ£ç¡®çææºå·ç ", |
| | | trigger: "blur" |
| | | } |
| | | ] |
| | | } |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | /** æ¥è¯¢é¨é¨å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listDept(this.queryParams).then(response => { |
| | | listDept(this.queryParams).then((response) => { |
| | | this.deptList = this.handleTree(response.data, "deptId"); |
| | | this.loading = false; |
| | | }); |
| | |
| | | return { |
| | | id: node.deptId, |
| | | label: node.deptName, |
| | | children: node.children |
| | | children: node.children, |
| | | }; |
| | | }, |
| | | // åæ¶æé® |
| | |
| | | leader: undefined, |
| | | phone: undefined, |
| | | email: undefined, |
| | | status: "0" |
| | | status: "0", |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | } |
| | | this.open = true; |
| | | this.title = "æ·»å é¨é¨"; |
| | | listDept().then(response => { |
| | | listDept().then((response) => { |
| | | this.deptOptions = this.handleTree(response.data, "deptId"); |
| | | }); |
| | | }, |
| | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | getDept(row.deptId).then(response => { |
| | | getDept(row.deptId).then((response) => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹é¨é¨"; |
| | | listDeptExcludeChild(row.deptId).then(response => { |
| | | listDeptExcludeChild(row.deptId).then((response) => { |
| | | this.deptOptions = this.handleTree(response.data, "deptId"); |
| | | if (this.deptOptions.length == 0) { |
| | | const noResultsOptions = { deptId: this.form.parentId, deptName: this.form.parentName, children: [] }; |
| | | const noResultsOptions = { |
| | | deptId: this.form.parentId, |
| | | deptName: this.form.parentName, |
| | | children: [], |
| | | }; |
| | | this.deptOptions.push(noResultsOptions); |
| | | } |
| | | }); |
| | |
| | | }, |
| | | /** æäº¤æé® */ |
| | | submitForm: function() { |
| | | this.$refs["form"].validate(valid => { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.deptId != undefined) { |
| | | updateDept(this.form).then(response => { |
| | | updateDept(this.form).then((response) => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addDept(this.form).then(response => { |
| | | addDept(this.form).then((response) => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤å称为"' + row.deptName + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | this.$modal |
| | | .confirm('æ¯å¦ç¡®è®¤å é¤å称为"' + row.deptName + '"çæ°æ®é¡¹ï¼') |
| | | .then(function () { |
| | | return delDept(row.deptId); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => {}); |
| | | } |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | size="small" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | > |
| | | <el-form-item label="èååç§°" prop="menuName"> |
| | | <el-input |
| | | v-model="queryParams.menuName" |
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="queryParams.status" placeholder="èåç¶æ" clearable> |
| | | <el-select |
| | | v-model="queryParams.status" |
| | | placeholder="èåç¶æ" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">é ç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >é ç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:menu:add']" |
| | | >æ°å¢</el-button> |
| | | >æ°å¢</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :span="1.5"> |
| | | <el-button |
| | |
| | | icon="el-icon-sort" |
| | | size="mini" |
| | | @click="toggleExpandAll" |
| | | >å±å¼/æå </el-button> |
| | | >å±å¼/æå </el-button |
| | | > |
| | | </el-col> |
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| | | <right-toolbar |
| | | :showSearch.sync="showSearch" |
| | | @queryTable="getList" |
| | | ></right-toolbar> |
| | | </el-row> |
| | | |
| | | <el-table |
| | |
| | | :default-expand-all="isExpandAll" |
| | | :tree-props="{children: 'children', hasChildren: 'hasChildren'}" |
| | | > |
| | | <el-table-column prop="menuName" label="èååç§°" :show-overflow-tooltip="true" width="160"></el-table-column> |
| | | <el-table-column |
| | | prop="menuName" |
| | | label="èååç§°" |
| | | :show-overflow-tooltip="true" |
| | | width="160" |
| | | ></el-table-column> |
| | | <el-table-column prop="icon" label="徿 " align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | | <svg-icon :icon-class="scope.row.icon" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="orderNum" label="æåº" width="60"></el-table-column> |
| | | <el-table-column prop="perms" label="æéæ è¯" :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column prop="component" label="ç»ä»¶è·¯å¾" :show-overflow-tooltip="true"></el-table-column> |
| | | <el-table-column |
| | | prop="orderNum" |
| | | label="æåº" |
| | | width="60" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="perms" |
| | | label="æéæ è¯" |
| | | :show-overflow-tooltip="true" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="component" |
| | | label="ç»ä»¶è·¯å¾" |
| | | :show-overflow-tooltip="true" |
| | | ></el-table-column> |
| | | <el-table-column prop="status" label="ç¶æ" width="80"> |
| | | <template slot-scope="scope"> |
| | | <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/> |
| | | <dict-tag |
| | | :options="dict.type.sys_normal_disable" |
| | | :value="scope.row.status" |
| | | /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime"> |
| | |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:menu:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | >ä¿®æ¹</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-plus" |
| | | @click="handleAdd(scope.row)" |
| | | v-hasPermi="['system:menu:add']" |
| | | >æ°å¢</el-button> |
| | | >æ°å¢</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:menu:remove']" |
| | | >å é¤</el-button> |
| | | >å é¤</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | trigger="click" |
| | | @show="$refs['iconSelect'].reset()" |
| | | > |
| | | <IconSelect ref="iconSelect" @selected="selected" :active-icon="form.icon" /> |
| | | <el-input slot="reference" v-model="form.icon" placeholder="ç¹å»éæ©å¾æ " readonly> |
| | | <IconSelect |
| | | ref="iconSelect" |
| | | @selected="selected" |
| | | :active-icon="form.icon" |
| | | /> |
| | | <el-input |
| | | slot="reference" |
| | | v-model="form.icon" |
| | | placeholder="ç¹å»éæ©å¾æ " |
| | | readonly |
| | | > |
| | | <svg-icon |
| | | v-if="form.icon" |
| | | slot="prefix" |
| | | :icon-class="form.icon" |
| | | style="width: 25px;" |
| | | style="width: 25px" |
| | | /> |
| | | <i v-else slot="prefix" class="el-icon-search el-input__icon" /> |
| | | <i |
| | | v-else |
| | | slot="prefix" |
| | | class="el-icon-search el-input__icon" |
| | | /> |
| | | </el-input> |
| | | </el-popover> |
| | | </el-form-item> |
| | |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¾ç¤ºæåº" prop="orderNum"> |
| | | <el-input-number v-model="form.orderNum" controls-position="right" :min="0" /> |
| | | <el-input-number |
| | | v-model="form.orderNum" |
| | | controls-position="right" |
| | | :min="0" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-col :span="12" v-if="form.menuType != 'F'"> |
| | | <el-form-item prop="isFrame"> |
| | | <span slot="label"> |
| | | <el-tooltip content="éæ©æ¯å¤é¾åè·¯ç±å°åéè¦ä»¥`http(s)://`å¼å¤´" placement="top"> |
| | | <el-tooltip |
| | | content="éæ©æ¯å¤é¾åè·¯ç±å°åéè¦ä»¥`http(s)://`å¼å¤´" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | æ¯å¦å¤é¾ |
| | |
| | | <el-col :span="12" v-if="form.menuType != 'F'"> |
| | | <el-form-item prop="path"> |
| | | <span slot="label"> |
| | | <el-tooltip content="访é®çè·¯ç±å°åï¼å¦ï¼`user`ï¼å¦å¤ç½å°åéå
é¾è®¿é®å以`http(s)://`å¼å¤´" placement="top"> |
| | | <el-tooltip |
| | | content="访é®çè·¯ç±å°åï¼å¦ï¼`user`ï¼å¦å¤ç½å°åéå
é¾è®¿é®å以`http(s)://`å¼å¤´" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | è·¯ç±å°å |
| | |
| | | <el-col :span="12" v-if="form.menuType == 'C'"> |
| | | <el-form-item prop="component"> |
| | | <span slot="label"> |
| | | <el-tooltip content="访é®çç»ä»¶è·¯å¾ï¼å¦ï¼`system/user/index`ï¼é»è®¤å¨`views`ç®å½ä¸" placement="top"> |
| | | <el-tooltip |
| | | content="访é®çç»ä»¶è·¯å¾ï¼å¦ï¼`system/user/index`ï¼é»è®¤å¨`views`ç®å½ä¸" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | ç»ä»¶è·¯å¾ |
| | |
| | | </el-col> |
| | | <el-col :span="12" v-if="form.menuType != 'M'"> |
| | | <el-form-item prop="perms"> |
| | | <el-input v-model="form.perms" placeholder="请è¾å
¥æéæ è¯" maxlength="100" /> |
| | | <el-input |
| | | v-model="form.perms" |
| | | placeholder="请è¾å
¥æéæ è¯" |
| | | maxlength="100" |
| | | /> |
| | | <span slot="label"> |
| | | <el-tooltip content="æ§å¶å¨ä¸å®ä¹çæéå符ï¼å¦ï¼@PreAuthorize(`@ss.hasPermi('system:user:list')`)" placement="top"> |
| | | <el-tooltip |
| | | content="æ§å¶å¨ä¸å®ä¹çæéå符ï¼å¦ï¼@PreAuthorize(`@ss.hasPermi('system:user:list')`)" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | æéå符 |
| | |
| | | <el-row> |
| | | <el-col :span="12" v-if="form.menuType == 'C'"> |
| | | <el-form-item prop="query"> |
| | | <el-input v-model="form.query" placeholder="请è¾å
¥è·¯ç±åæ°" maxlength="255" /> |
| | | <el-input |
| | | v-model="form.query" |
| | | placeholder="请è¾å
¥è·¯ç±åæ°" |
| | | maxlength="255" |
| | | /> |
| | | <span slot="label"> |
| | | <el-tooltip content='访é®è·¯ç±çé»è®¤ä¼ éåæ°ï¼å¦ï¼`{"id": 1, "name": "ry"}`' placement="top"> |
| | | <el-tooltip |
| | | content='访é®è·¯ç±çé»è®¤ä¼ éåæ°ï¼å¦ï¼`{"id": 1, "name": "ry"}`' |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | è·¯ç±åæ° |
| | |
| | | <el-col :span="12" v-if="form.menuType == 'C'"> |
| | | <el-form-item prop="isCache"> |
| | | <span slot="label"> |
| | | <el-tooltip content="éæ©æ¯åä¼è¢«`keep-alive`ç¼åï¼éè¦å¹é
ç»ä»¶ç`name`åå°åä¿æä¸è´" placement="top"> |
| | | <el-tooltip |
| | | content="éæ©æ¯åä¼è¢«`keep-alive`ç¼åï¼éè¦å¹é
ç»ä»¶ç`name`åå°åä¿æä¸è´" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | æ¯å¦ç¼å |
| | |
| | | <el-col :span="12" v-if="form.menuType != 'F'"> |
| | | <el-form-item prop="visible"> |
| | | <span slot="label"> |
| | | <el-tooltip content="éæ©éèåè·¯ç±å°ä¸ä¼åºç°å¨ä¾§è¾¹æ ï¼ä½ä»ç¶å¯ä»¥è®¿é®" placement="top"> |
| | | <el-tooltip |
| | | content="éæ©éèåè·¯ç±å°ä¸ä¼åºç°å¨ä¾§è¾¹æ ï¼ä½ä»ç¶å¯ä»¥è®¿é®" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | æ¾ç¤ºç¶æ |
| | |
| | | v-for="dict in dict.type.sys_show_hide" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | >{{ dict.label }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item prop="status"> |
| | | <span slot="label"> |
| | | <el-tooltip content="éæ©åç¨åè·¯ç±å°ä¸ä¼åºç°å¨ä¾§è¾¹æ ï¼ä¹ä¸è½è¢«è®¿é®" placement="top"> |
| | | <el-tooltip |
| | | content="éæ©åç¨åè·¯ç±å°ä¸ä¼åºç°å¨ä¾§è¾¹æ ï¼ä¹ä¸è½è¢«è®¿é®" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | èåç¶æ |
| | |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | >{{ dict.label }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12" v-if="form.menuType != 'M'"> |
| | | <el-form-item prop="status"> |
| | | <span slot="label"> |
| | | <el-tooltip |
| | | content="éæ©åªçææé®ï¼å¨è§è²ç®¡çå¤å¯é
ç½®åªçæçæ°æ®æé" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | åªçææé® |
| | | </span> |
| | | <el-switch |
| | | v-model="form.isRersonalButton" |
| | | inactive-text="䏿¾ç¤º" |
| | | active-text="æ¾ç¤º" |
| | | :inactive-value="0" |
| | | :active-value="1" |
| | | > |
| | | </el-switch> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listMenu, getMenu, delMenu, addMenu, updateMenu } from "@/api/system/menu"; |
| | | import { |
| | | listMenu, |
| | | getMenu, |
| | | delMenu, |
| | | addMenu, |
| | | updateMenu, |
| | | } from "@/api/system/menu"; |
| | | import Treeselect from "@riophae/vue-treeselect"; |
| | | import "@riophae/vue-treeselect/dist/vue-treeselect.css"; |
| | | import IconSelect from "@/components/IconSelect"; |
| | | |
| | | export default { |
| | | name: "Menu", |
| | | dicts: ['sys_show_hide', 'sys_normal_disable'], |
| | | dicts: ["sys_show_hide", "sys_normal_disable"], |
| | | components: { Treeselect, IconSelect }, |
| | | data() { |
| | | return { |
| | |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | menuName: undefined, |
| | | visible: undefined |
| | | visible: undefined, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | menuName: [ |
| | | { required: true, message: "èååç§°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | { required: true, message: "èååç§°ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | orderNum: [ |
| | | { required: true, message: "èå顺åºä¸è½ä¸ºç©º", trigger: "blur" } |
| | | { required: true, message: "èå顺åºä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | path: [ |
| | | { required: true, message: "è·¯ç±å°åä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | } |
| | | { required: true, message: "è·¯ç±å°åä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | |
| | | /** æ¥è¯¢èåå表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listMenu(this.queryParams).then(response => { |
| | | listMenu(this.queryParams).then((response) => { |
| | | this.menuList = this.handleTree(response.data, "menuId"); |
| | | this.loading = false; |
| | | }); |
| | |
| | | return { |
| | | id: node.menuId, |
| | | label: node.menuName, |
| | | children: node.children |
| | | children: node.children, |
| | | }; |
| | | }, |
| | | /** æ¥è¯¢èå䏿æ ç»æ */ |
| | | getTreeselect() { |
| | | listMenu().then(response => { |
| | | listMenu().then((response) => { |
| | | this.menuOptions = []; |
| | | const menu = { menuId: 0, menuName: '主类ç®', children: [] }; |
| | | const menu = { menuId: 0, menuName: "主类ç®", children: [] }; |
| | | menu.children = this.handleTree(response.data, "menuId"); |
| | | this.menuOptions.push(menu); |
| | | }); |
| | |
| | | isFrame: "1", |
| | | isCache: "0", |
| | | visible: "0", |
| | | status: "0" |
| | | status: "0", |
| | | isRersonalButton: 0, |
| | | }; |
| | | this.resetForm("form"); |
| | | }, |
| | |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | this.getTreeselect(); |
| | | getMenu(row.menuId).then(response => { |
| | | getMenu(row.menuId).then((response) => { |
| | | this.form = response.data; |
| | | this.form.isRersonalButton = Number(this.form.isRersonalButton); |
| | | this.open = true; |
| | | this.title = "ä¿®æ¹èå"; |
| | | }); |
| | | }, |
| | | /** æäº¤æé® */ |
| | | submitForm: function() { |
| | | this.$refs["form"].validate(valid => { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.menuId != undefined) { |
| | | updateMenu(this.form).then(response => { |
| | | updateMenu(this.form).then((response) => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | addMenu(this.form).then(response => { |
| | | addMenu(this.form).then((response) => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | |
| | | }, |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤å称为"' + row.menuName + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | this.$modal |
| | | .confirm('æ¯å¦ç¡®è®¤å é¤å称为"' + row.menuName + '"çæ°æ®é¡¹ï¼') |
| | | .then(function () { |
| | | return delMenu(row.menuId); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => {}); |
| | | } |
| | | } |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <div class="app-container"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"> |
| | | <el-form |
| | | :model="queryParams" |
| | | ref="queryForm" |
| | | size="small" |
| | | :inline="true" |
| | | v-show="showSearch" |
| | | > |
| | | <el-form-item label="è§è²åç§°" prop="roleName"> |
| | | <el-input |
| | | v-model="queryParams.roleName" |
| | |
| | | ></el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">é ç½®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="handleQuery" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" |
| | | >é ç½®</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="addButton mb8"> |
| | | <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['system:role:add']">æ°å¢</el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | @click="handleAdd" |
| | | v-hasPermi="['system:role:add']" |
| | | >æ°å¢</el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | |
| | | <el-table v-loading="loading" :data="roleList" @selection-change="handleSelectionChange"> |
| | | <el-table |
| | | v-loading="loading" |
| | | :data="roleList" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column label="è§è²ç¼å·" prop="roleId" width="120" /> |
| | | <el-table-column label="è§è²åç§°" prop="roleName" :show-overflow-tooltip="true" width="150" /> |
| | | <el-table-column label="æéå符" prop="roleKey" :show-overflow-tooltip="true" width="150" /> |
| | | <el-table-column |
| | | label="è§è²åç§°" |
| | | prop="roleName" |
| | | :show-overflow-tooltip="true" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | label="æéå符" |
| | | prop="roleKey" |
| | | :show-overflow-tooltip="true" |
| | | width="150" |
| | | /> |
| | | <el-table-column label="æ¾ç¤ºé¡ºåº" prop="roleSort" width="100" /> |
| | | <el-table-column label="ç¶æ" align="center" width="100"> |
| | | <template slot-scope="scope"> |
| | |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" width="180"> |
| | | <el-table-column |
| | | label="å建æ¶é´" |
| | | align="center" |
| | | prop="createTime" |
| | | width="180" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ parseTime(scope.row.createTime) }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æä½" align="center" class-name="small-padding fixed-width"> |
| | | <el-table-column |
| | | label="æä½" |
| | | align="center" |
| | | class-name="small-padding fixed-width" |
| | | > |
| | | <template slot-scope="scope" v-if="scope.row.roleId !== 1"> |
| | | <el-button |
| | | size="mini" |
| | |
| | | icon="el-icon-edit" |
| | | @click="handleUpdate(scope.row)" |
| | | v-hasPermi="['system:role:edit']" |
| | | >ä¿®æ¹</el-button> |
| | | >ä¿®æ¹</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-delete" |
| | | @click="handleDelete(scope.row)" |
| | | v-hasPermi="['system:role:remove']" |
| | | >å é¤</el-button> |
| | | >å é¤</el-button |
| | | > |
| | | <el-button |
| | | size="mini" |
| | | type="text" |
| | | icon="el-icon-view" |
| | | @click="handleView(scope.row)" |
| | | >详ç»</el-button> |
| | | >详ç»</el-button |
| | | > |
| | | <!-- <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">--> |
| | | <!-- <el-button size="mini" type="text" icon="el-icon-d-arrow-right">æ´å¤</el-button>--> |
| | | <!-- <el-dropdown-menu slot="dropdown">--> |
| | |
| | | <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="100px"> |
| | | <el-form-item label="è§è²åç§°" prop="roleName"> |
| | | <el-input v-model="form.roleName" placeholder="请è¾å
¥è§è²åç§°" :disabled="title === 'æ¥çè§è²'"/> |
| | | <el-input |
| | | v-model="form.roleName" |
| | | placeholder="请è¾å
¥è§è²åç§°" |
| | | :disabled="title === 'æ¥çè§è²'" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item prop="roleKey"> |
| | | <span slot="label"> |
| | | <el-tooltip content="æ§å¶å¨ä¸å®ä¹çæéå符ï¼å¦ï¼@PreAuthorize(`@ss.hasRole('admin')`)" placement="top"> |
| | | <el-tooltip |
| | | content="æ§å¶å¨ä¸å®ä¹çæéå符ï¼å¦ï¼@PreAuthorize(`@ss.hasRole('admin')`)" |
| | | placement="top" |
| | | > |
| | | <i class="el-icon-question"></i> |
| | | </el-tooltip> |
| | | æéå符 |
| | | </span> |
| | | <el-input v-model="form.roleKey" placeholder="请è¾å
¥æéå符" :disabled="title === 'æ¥çè§è²'"/> |
| | | <el-input |
| | | v-model="form.roleKey" |
| | | placeholder="请è¾å
¥æéå符" |
| | | :disabled="title === 'æ¥çè§è²'" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="è§è²é¡ºåº" prop="roleSort"> |
| | | <el-input-number v-model="form.roleSort" controls-position="right" :min="0" :disabled="title === 'æ¥çè§è²'"/> |
| | | <el-input-number |
| | | v-model="form.roleSort" |
| | | controls-position="right" |
| | | :min="0" |
| | | :disabled="title === 'æ¥çè§è²'" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ"> |
| | | <el-radio-group v-model="form.status" :disabled="title === 'æ¥çè§è²'"> |
| | | <el-radio-group |
| | | v-model="form.status" |
| | | :disabled="title === 'æ¥çè§è²'" |
| | | > |
| | | <el-radio |
| | | v-for="dict in dict.type.sys_normal_disable" |
| | | :key="dict.value" |
| | | :label="dict.value" |
| | | >{{dict.label}}</el-radio> |
| | | >{{ dict.label }}</el-radio |
| | | > |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="èåæé"> |
| | | <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')" v-if="title !== 'æ¥çè§è²'">å±å¼/æå </el-checkbox> |
| | | <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')" v-if="title !== 'æ¥çè§è²'">å
¨é/å
¨ä¸é</el-checkbox> |
| | | <el-checkbox v-model="form.menuCheckStrictly" @change="handleCheckedTreeConnect($event, 'menu')" v-if="title !== 'æ¥çè§è²'">ç¶åèå¨</el-checkbox> |
| | | <el-checkbox |
| | | v-model="menuExpand" |
| | | @change="handleCheckedTreeExpand($event, 'menu')" |
| | | v-if="title !== 'æ¥çè§è²'" |
| | | >å±å¼/æå </el-checkbox |
| | | > |
| | | <el-checkbox |
| | | v-model="menuNodeAll" |
| | | @change="handleCheckedTreeNodeAll($event, 'menu')" |
| | | v-if="title !== 'æ¥çè§è²'" |
| | | >å
¨é/å
¨ä¸é</el-checkbox |
| | | > |
| | | <el-checkbox |
| | | v-model="form.menuCheckStrictly" |
| | | @change="handleCheckedTreeConnect($event, 'menu')" |
| | | v-if="title !== 'æ¥çè§è²'" |
| | | >ç¶åèå¨</el-checkbox |
| | | > |
| | | <el-tree |
| | | :disabled="title === 'æ¥çè§è²'" |
| | | class="tree-border" |
| | |
| | | :check-strictly="!form.menuCheckStrictly" |
| | | empty-text="å è½½ä¸ï¼è¯·ç¨å" |
| | | :props="defaultProps" |
| | | ></el-tree> |
| | | > |
| | | <span class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span>{{ node.label }}</span> |
| | | <span> |
| | | <el-checkbox |
| | | v-model="data.isRersonal" |
| | | :true-label="1" |
| | | :false-label="0" |
| | | v-if="data.isRersonalButton == 1" |
| | | @change="(m) => chooseMe(m, data)" |
| | | :disabled="title === 'æ¥çè§è²'" |
| | | >åªçæ</el-checkbox |
| | | > |
| | | </span> |
| | | </span> |
| | | </el-tree> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input v-model="form.remark" type="textarea" placeholder="请è¾å
¥å
容" :disabled="title === 'æ¥çè§è²'"></el-input> |
| | | <el-input |
| | | v-model="form.remark" |
| | | type="textarea" |
| | | placeholder="请è¾å
¥å
容" |
| | | :disabled="title === 'æ¥çè§è²'" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="cancel">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm" v-if="title !== 'æ¥çè§è²'">ç¡® å®</el-button> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitForm" |
| | | v-if="title !== 'æ¥çè§è²'" |
| | | >ç¡® å®</el-button |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- åé
è§è²æ°æ®æéå¯¹è¯æ¡ --> |
| | | <el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body> |
| | | <el-dialog |
| | | :title="title" |
| | | :visible.sync="openDataScope" |
| | | width="500px" |
| | | append-to-body |
| | | > |
| | | <el-form :model="form" label-width="80px"> |
| | | <el-form-item label="è§è²åç§°"> |
| | | <el-input v-model="form.roleName" :disabled="true"/> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ°æ®æé" v-show="form.dataScope == 2"> |
| | | <el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">å±å¼/æå </el-checkbox> |
| | | <el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">å
¨é/å
¨ä¸é</el-checkbox> |
| | | <el-checkbox v-model="form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">ç¶åèå¨</el-checkbox> |
| | | <el-checkbox |
| | | v-model="deptExpand" |
| | | @change="handleCheckedTreeExpand($event, 'dept')" |
| | | >å±å¼/æå </el-checkbox |
| | | > |
| | | <el-checkbox |
| | | v-model="deptNodeAll" |
| | | @change="handleCheckedTreeNodeAll($event, 'dept')" |
| | | >å
¨é/å
¨ä¸é</el-checkbox |
| | | > |
| | | <el-checkbox |
| | | v-model="form.deptCheckStrictly" |
| | | @change="handleCheckedTreeConnect($event, 'dept')" |
| | | >ç¶åèå¨</el-checkbox |
| | | > |
| | | <el-tree |
| | | class="tree-border" |
| | | :data="deptOptions" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { listRole, getRole, delRole, addRole, updateRole, dataScope, changeRoleStatus, deptTreeSelect } from "@/api/system/role"; |
| | | import { treeselect as menuTreeselect, roleMenuTreeselect } from "@/api/system/menu"; |
| | | import { |
| | | listRole, |
| | | getRole, |
| | | delRole, |
| | | addRole, |
| | | updateRole, |
| | | dataScope, |
| | | changeRoleStatus, |
| | | deptTreeSelect, |
| | | } from "@/api/system/role"; |
| | | import { |
| | | treeselect as menuTreeselect, |
| | | roleMenuTreeselect, |
| | | } from "@/api/system/menu"; |
| | | |
| | | export default { |
| | | name: "Role", |
| | | dicts: ['sys_normal_disable'], |
| | | dicts: ["sys_normal_disable"], |
| | | data() { |
| | | return { |
| | | // åªçææ°ç» |
| | | isRersonalMenuIds: [], |
| | | // é®ç½©å± |
| | | loading: true, |
| | | // é䏿°ç» |
| | |
| | | dataScopeOptions: [ |
| | | { |
| | | value: "1", |
| | | label: "å
¨é¨æ°æ®æé" |
| | | label: "å
¨é¨æ°æ®æé", |
| | | }, |
| | | { |
| | | value: "2", |
| | | label: "èªå®æ°æ®æé" |
| | | label: "èªå®æ°æ®æé", |
| | | }, |
| | | { |
| | | value: "3", |
| | | label: "æ¬é¨é¨æ°æ®æé" |
| | | label: "æ¬é¨é¨æ°æ®æé", |
| | | }, |
| | | { |
| | | value: "4", |
| | | label: "æ¬é¨é¨å以䏿°æ®æé" |
| | | label: "æ¬é¨é¨å以䏿°æ®æé", |
| | | }, |
| | | { |
| | | value: "5", |
| | | label: "ä»
æ¬äººæ°æ®æé" |
| | | } |
| | | label: "ä»
æ¬äººæ°æ®æé", |
| | | }, |
| | | ], |
| | | // èåå表 |
| | | menuOptions: [], |
| | |
| | | pageSize: 10, |
| | | roleName: undefined, |
| | | roleKey: undefined, |
| | | status: undefined |
| | | status: undefined, |
| | | }, |
| | | // 表ååæ° |
| | | form: {}, |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "label" |
| | | label: "label", |
| | | }, |
| | | // è¡¨åæ ¡éª |
| | | rules: { |
| | | roleName: [ |
| | | { required: true, message: "è§è²åç§°ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | { required: true, message: "è§è²åç§°ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | roleKey: [ |
| | | { required: true, message: "æéå符ä¸è½ä¸ºç©º", trigger: "blur" } |
| | | { required: true, message: "æéå符ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | roleSort: [ |
| | | { required: true, message: "è§è²é¡ºåºä¸è½ä¸ºç©º", trigger: "blur" } |
| | | ] |
| | | } |
| | | { required: true, message: "è§è²é¡ºåºä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | // åªçæ |
| | | chooseMe(val, data) { |
| | | let index = this.isRersonalMenuIds.findIndex((m) => m == data.id); |
| | | if (index < 0 && val == 1) { |
| | | this.isRersonalMenuIds.push(data.id); |
| | | } else if (val == 0 && index > -1) { |
| | | this.isRersonalMenuIds.splice(index, 1); |
| | | } |
| | | }, |
| | | /** æ¥è¯¢è§è²å表 */ |
| | | getList() { |
| | | this.loading = true; |
| | | listRole(this.addDateRange(this.queryParams, this.dateRange)).then(response => { |
| | | listRole(this.addDateRange(this.queryParams, this.dateRange)).then( |
| | | (response) => { |
| | | this.roleList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | |
| | | }, |
| | | /** æ¥è¯¢èåæ ç»æ */ |
| | | getMenuTreeselect() { |
| | | menuTreeselect().then(response => { |
| | | menuTreeselect().then((response) => { |
| | | this.menuOptions = response.data; |
| | | }); |
| | | }, |
| | |
| | | }, |
| | | /** æ ¹æ®è§è²IDæ¥è¯¢èåæ ç»æ */ |
| | | getRoleMenuTreeselect(roleId) { |
| | | return roleMenuTreeselect(roleId).then(response => { |
| | | return roleMenuTreeselect(roleId).then((response) => { |
| | | this.menuOptions = response.menus; |
| | | return response; |
| | | }); |
| | | }, |
| | | /** æ ¹æ®è§è²IDæ¥è¯¢é¨é¨æ ç»æ */ |
| | | getDeptTree(roleId) { |
| | | return deptTreeSelect(roleId).then(response => { |
| | | return deptTreeSelect(roleId).then((response) => { |
| | | this.deptOptions = response.depts; |
| | | return response; |
| | | }); |
| | |
| | | // è§è²ç¶æä¿®æ¹ |
| | | handleStatusChange(row) { |
| | | let text = row.status === "0" ? "å¯ç¨" : "åç¨"; |
| | | this.$modal.confirm('确认è¦"' + text + '""' + row.roleName + '"è§è²åï¼').then(function() { |
| | | this.$modal |
| | | .confirm('确认è¦"' + text + '""' + row.roleName + '"è§è²åï¼') |
| | | .then(function () { |
| | | return changeRoleStatus(row.roleId, row.status); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.$modal.msgSuccess(text + "æå"); |
| | | }).catch(function() { |
| | | }) |
| | | .catch(function () { |
| | | row.status = row.status === "0" ? "1" : "0"; |
| | | }); |
| | | }, |
| | |
| | | if (this.$refs.menu != undefined) { |
| | | this.$refs.menu.setCheckedKeys([]); |
| | | } |
| | | this.menuExpand = false, |
| | | this.menuNodeAll = false, |
| | | this.deptExpand = true, |
| | | this.deptNodeAll = false, |
| | | this.form = { |
| | | (this.menuExpand = false), |
| | | (this.menuNodeAll = false), |
| | | (this.deptExpand = true), |
| | | (this.deptNodeAll = false), |
| | | (this.form = { |
| | | roleId: undefined, |
| | | roleName: undefined, |
| | | roleKey: undefined, |
| | |
| | | status: "0", |
| | | menuIds: [], |
| | | deptIds: [], |
| | | isRersonalMenuIds: [], |
| | | menuCheckStrictly: true, |
| | | deptCheckStrictly: true, |
| | | remark: undefined |
| | | }; |
| | | remark: undefined, |
| | | }); |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | |
| | | }, |
| | | // å¤éæ¡é䏿°æ® |
| | | handleSelectionChange(selection) { |
| | | this.ids = selection.map(item => item.roleId) |
| | | this.single = selection.length!=1 |
| | | this.multiple = !selection.length |
| | | this.ids = selection.map((item) => item.roleId); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | }, |
| | | // æ´å¤æä½è§¦å |
| | | handleCommand(command, row) { |
| | |
| | | }, |
| | | // æ æéï¼å±å¼/æå ï¼ |
| | | handleCheckedTreeExpand(value, type) { |
| | | if (type == 'menu') { |
| | | if (type == "menu") { |
| | | let treeList = this.menuOptions; |
| | | for (let i = 0; i < treeList.length; i++) { |
| | | this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value; |
| | | } |
| | | } else if (type == 'dept') { |
| | | } else if (type == "dept") { |
| | | let treeList = this.deptOptions; |
| | | for (let i = 0; i < treeList.length; i++) { |
| | | this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value; |
| | |
| | | }, |
| | | // æ æéï¼å
¨é/å
¨ä¸éï¼ |
| | | handleCheckedTreeNodeAll(value, type) { |
| | | if (type == 'menu') { |
| | | if (type == "menu") { |
| | | this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []); |
| | | } else if (type == 'dept') { |
| | | } else if (type == "dept") { |
| | | this.$refs.dept.setCheckedNodes(value ? this.deptOptions: []); |
| | | } |
| | | }, |
| | | // æ æéï¼ç¶åèå¨ï¼ |
| | | handleCheckedTreeConnect(value, type) { |
| | | if (type == 'menu') { |
| | | if (type == "menu") { |
| | | this.form.menuCheckStrictly = value ? true: false; |
| | | } else if (type == 'dept') { |
| | | } else if (type == "dept") { |
| | | this.form.deptCheckStrictly = value ? true: false; |
| | | } |
| | | }, |
| | |
| | | /** ä¿®æ¹æé®æä½ */ |
| | | handleUpdate(row) { |
| | | this.reset(); |
| | | const roleId = row.roleId || this.ids |
| | | const roleId = row.roleId || this.ids; |
| | | const roleMenu = this.getRoleMenuTreeselect(roleId); |
| | | getRole(roleId).then(response => { |
| | | getRole(roleId).then((response) => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.$nextTick(() => { |
| | | roleMenu.then(res => { |
| | | let checkedKeys = res.checkedKeys |
| | | roleMenu.then((res) => { |
| | | let checkedKeys = res.checkedKeys; |
| | | checkedKeys.forEach((v) => { |
| | | this.$nextTick(()=>{ |
| | | this.$refs.menu.setChecked(v, true ,false); |
| | | }) |
| | | }) |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | |
| | | handleView (row) { |
| | | this.title = "æ¥çè§è²"; |
| | | this.reset(); |
| | | const roleId = row.roleId || this.ids |
| | | const roleId = row.roleId || this.ids; |
| | | const roleMenu = this.getRoleMenuTreeselect(roleId); |
| | | getRole(roleId).then(response => { |
| | | getRole(roleId).then((response) => { |
| | | this.form = response.data; |
| | | this.open = true; |
| | | this.$nextTick(() => { |
| | | roleMenu.then(res => { |
| | | let checkedKeys = res.checkedKeys |
| | | roleMenu.then((res) => { |
| | | let checkedKeys = res.checkedKeys; |
| | | checkedKeys.forEach((v) => { |
| | | this.$nextTick(()=>{ |
| | | this.$refs.menu.setChecked(v, true ,false); |
| | | }) |
| | | }) |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | }); |
| | | }, |
| | | /** éæ©è§è²æéèå´è§¦å */ |
| | | dataScopeSelectChange(value) { |
| | | if(value !== '2') { |
| | | if (value !== "2") { |
| | | this.$refs.dept.setCheckedKeys([]); |
| | | } |
| | | }, |
| | |
| | | handleDataScope(row) { |
| | | this.reset(); |
| | | const deptTreeSelect = this.getDeptTree(row.roleId); |
| | | getRole(row.roleId).then(response => { |
| | | getRole(row.roleId).then((response) => { |
| | | this.form = response.data; |
| | | this.openDataScope = true; |
| | | this.$nextTick(() => { |
| | | deptTreeSelect.then(res => { |
| | | deptTreeSelect.then((res) => { |
| | | this.$refs.dept.setCheckedKeys(res.checkedKeys); |
| | | }); |
| | | }); |
| | |
| | | }, |
| | | /** æäº¤æé® */ |
| | | submitForm: function() { |
| | | this.$refs["form"].validate(valid => { |
| | | this.$refs["form"].validate((valid) => { |
| | | if (valid) { |
| | | if (this.form.roleId != undefined) { |
| | | this.form.menuIds = this.getMenuAllCheckedKeys(); |
| | | updateRole(this.form).then(response => { |
| | | this.form.isRersonalMenuIds = this.isRersonalMenuIds; |
| | | updateRole(this.form).then((response) => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | | }); |
| | | } else { |
| | | this.form.menuIds = this.getMenuAllCheckedKeys(); |
| | | addRole(this.form).then(response => { |
| | | this.form.isRersonalMenuIds = this.isRersonalMenuIds; |
| | | addRole(this.form).then((response) => { |
| | | this.$modal.msgSuccess("æ°å¢æå"); |
| | | this.open = false; |
| | | this.getList(); |
| | |
| | | submitDataScope: function() { |
| | | if (this.form.roleId != undefined) { |
| | | this.form.deptIds = this.getDeptAllCheckedKeys(); |
| | | dataScope(this.form).then(response => { |
| | | dataScope(this.form).then((response) => { |
| | | this.$modal.msgSuccess("ä¿®æ¹æå"); |
| | | this.openDataScope = false; |
| | | this.getList(); |
| | |
| | | /** å é¤æé®æä½ */ |
| | | handleDelete(row) { |
| | | const roleIds = row.roleId || this.ids; |
| | | this.$modal.confirm('æ¯å¦ç¡®è®¤å é¤è§è²ç¼å·ä¸º"' + roleIds + '"çæ°æ®é¡¹ï¼').then(function() { |
| | | this.$modal |
| | | .confirm('æ¯å¦ç¡®è®¤å é¤è§è²ç¼å·ä¸º"' + roleIds + '"çæ°æ®é¡¹ï¼') |
| | | .then(function () { |
| | | return delRole(roleIds); |
| | | }).then(() => { |
| | | }) |
| | | .then(() => { |
| | | this.getList(); |
| | | this.$modal.msgSuccess("å 餿å"); |
| | | }).catch(() => {}); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | /** å¯¼åºæé®æä½ */ |
| | | handleExport() { |
| | | this.download('system/role/export', { |
| | | ...this.queryParams |
| | | }, `role_${new Date().getTime()}.xlsx`) |
| | | } |
| | | } |
| | | this.download( |
| | | "system/role/export", |
| | | { |
| | | ...this.queryParams, |
| | | }, |
| | | `role_${new Date().getTime()}.xlsx` |
| | | ); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | class="default-theme" |
| | | > |
| | | <!--é¨é¨æ°æ®--> |
| | | <pane size="12"> |
| | | <pane size="14"> |
| | | <el-col> |
| | | <div class="head-container addButton"> |
| | | <el-input |
| | |
| | | prefix-icon="el-icon-search" |
| | | style="margin-bottom: 20px" |
| | | /> |
| | | <el-button |
| | | <!-- <el-button |
| | | style="margin-left: 4px" |
| | | type="primary" |
| | | plain |
| | |
| | | size="mini" |
| | | circle |
| | | @click="addSchema" |
| | | ></el-button> |
| | | ></el-button> --> |
| | | </div> |
| | | <div class="head-container"> |
| | | <el-tree |
| | |
| | | </el-col> |
| | | </pane> |
| | | <!--ç¨æ·æ°æ®--> |
| | | <pane size="88"> |
| | | <pane size="86"> |
| | | <div class="search_form"> |
| | | <div> |
| | | <el-form |
| | |
| | | v-for="item in postOptions" |
| | | :key="item.id" |
| | | :label="item.company" |
| | | :value="item.id + ''" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½å±é¨é¨" prop="deptId"> |
| | | <treeselect |
| | | v-model="form.deptId" |
| | | :options="enabledDeptOptions" |
| | | :show-count="true" |
| | | placeholder="è¯·éæ©å½å±é¨é¨" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | class="avatar-uploader" |
| | | :action="uploadAction" |
| | | :show-file-list="false" |
| | | :headers="upload.headers" |
| | | accept=".png, .jpg, .jpeg, .gif" |
| | | :on-error="handleUploadError" |
| | | :on-success="handleUploadSuccess" |
| | | :before-upload="handleBeforeUpload" |
| | | > |
| | | <img |
| | | v-if="signatureUrl" |
| | | :src="signatureUrl" |
| | | v-if="form.signatureUrl" |
| | | :src="javaApi + '/img/' + form.signatureUrl" |
| | | class="avatar" |
| | | alt="" |
| | | /> |
| | |
| | | class="avatar-uploader" |
| | | :action="uploadAction" |
| | | :show-file-list="false" |
| | | :headers="upload.headers" |
| | | accept=".png, .jpg, .jpeg, .gif" |
| | | :on-error="handleUploadError1" |
| | | :on-success="handleUploadSuccess1" |
| | | :before-upload="handleBeforeUpload1" |
| | | > |
| | | <img |
| | | v-if="pictureUrl" |
| | | :src="pictureUrl" |
| | | v-if="form.pictureUrl" |
| | | :src="javaApi + '/img/' + form.pictureUrl" |
| | | class="avatar" |
| | | alt="" |
| | | /> |
| | |
| | | <el-tree |
| | | :data="datathirdParty" |
| | | node-key="companyId" |
| | | :props="defaultProps" |
| | | :props="companyProps" |
| | | @node-click="nodeClick2" |
| | | style="height: calc(100% - 42px)" |
| | | @node-expand="nodeOpen0" |
| | |
| | | <el-table-column type="selection" width="50"> </el-table-column> |
| | | <el-table-column prop="employeeID" label="åå·¥å·"> |
| | | </el-table-column> |
| | | <el-table-column prop="nickName" label="åå·¥å§å"> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="åå·¥å§å"> </el-table-column> |
| | | <el-table-column prop="department" label="é¨é¨" min-width="200"> |
| | | </el-table-column> |
| | | <el-table-column |
| | |
| | | children: "children", |
| | | label: "label", |
| | | }, |
| | | companyProps: { |
| | | children: "children", |
| | | label: "companyName", |
| | | }, |
| | | // ç¨æ·å¯¼å
¥åæ° |
| | | upload: { |
| | | // æ¯å¦æ¾ç¤ºå¼¹åºå±ï¼ç¨æ·å¯¼å
¥ï¼ |
| | |
| | | url: process.env.VUE_APP_BASE_API + "/system/user/importData", |
| | | }, |
| | | uploadAction: process.env.VUE_APP_BASE_API + "/deviceScope/uploadFile", |
| | | signatureUrl: "", |
| | | pictureUrl: "", |
| | | // æ¥è¯¢åæ° |
| | | queryParams: { |
| | | pageNum: 1, |
| | |
| | | rules: { |
| | | nickName: [{ required: true, message: "请填åå§å", trigger: "blur" }], |
| | | userName: [{ required: true, message: "请填åè´¦å·", trigger: "blur" }], |
| | | nameEn: [{ required: true, message: "请è¾å
¥å§åEN", trigger: "blur" }], |
| | | // nameEn: [ |
| | | // { required: true, message: "请è¾å
¥å§åEN", trigger: "blur" } |
| | | // ], |
| | | status: [{ required: true, message: "è¯·éæ©ç¶æ", trigger: "change" }], |
| | | roleIds: [{ required: true, message: "è¯·éæ©è§è²", trigger: "change" }], |
| | | password: [ |
| | | { required: true, message: "å¯ç ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | ], |
| | | // password: [ |
| | | // { required: true, message: "å¯ç ä¸è½ä¸ºç©º", trigger: "blur" }, |
| | | // ], |
| | | phonenumber: [ |
| | | { |
| | | required: true, |
| | |
| | | fatherId: 10001, |
| | | nickName: "", |
| | | }, |
| | | multipleSelection: [], |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | status: "0", |
| | | company: "", |
| | | roleIds: [], |
| | | signatureUrl: "", |
| | | pictureUrl: "", |
| | | }; |
| | | // this.signatureUrl = ''; |
| | | // this.pictureUrl = '' |
| | | this.resetForm("form"); |
| | | }, |
| | | /** æç´¢æé®æä½ */ |
| | |
| | | this.ids = selection.map((item) => item.userId); |
| | | this.single = selection.length != 1; |
| | | this.multiple = !selection.length; |
| | | this.multipleSelection = selection; |
| | | }, |
| | | // æ´å¤æä½è§¦å |
| | | handleCommand(command, row) { |
| | |
| | | .catch(() => { |
| | | this.thirdPartyLoading = false; |
| | | }); |
| | | if (this.componentData.entity.roleId > 10000) |
| | | this.$message.warning("ç±äºæªéä¸å
·ä½è§è²ï¼æ°å¢ç¨æ·å°æä¸ºé»è®¤è§è²"); |
| | | // if (this.componentData.entity.roleId > 10000) |
| | | // this.$message.warning("ç±äºæªéä¸å
·ä½è§è²ï¼æ°å¢ç¨æ·å°æä¸ºé»è®¤è§è²"); |
| | | }, |
| | | tranListToTreeData(list, rootValue) { |
| | | const arr = []; |
| | |
| | | } |
| | | }, |
| | | nodeOpen0(data, node, el) { |
| | | this.currentCompaniesList[node.level - nodeOpen01] = data.id; |
| | | this.currentCompaniesList[node.level - 1] = data.id; |
| | | }, |
| | | filterNode2(value, data) { |
| | | if (!value) return true; |
| | |
| | | if (this.currentCompaniesList.length === 0) { |
| | | return this.$message.error("è¯·éæ©ç»ç»"); |
| | | } |
| | | /* for (let index = this.currentCompaniesList.length-1; index >1; index--) { |
| | | let obj = this.multipleSelection.find(a=>a.companyId==this.currentCompaniesList[index]) |
| | | if(!obj){ |
| | | this.currentCompaniesList.splice(index,1) |
| | | } |
| | | } */ |
| | | let arr = []; |
| | | this.currentCompaniesList.forEach((b) => { |
| | | let obj = this.companiesList.find((a) => a.companyId == b); |
| | |
| | | addPersonUser({ |
| | | company: arr, |
| | | person: this.multipleSelection, |
| | | roleId: this.componentData.entity.roleId, |
| | | roleId: null, |
| | | }) |
| | | .then((res) => { |
| | | if (res.code === 201) { |
| | |
| | | /** æ°å¢æé®æä½ */ |
| | | handleAdd() { |
| | | this.reset(); |
| | | this.form.deptId = this.queryParams.deptId; |
| | | this.open = true; |
| | | selectCustomEnum().then((res) => { |
| | | this.postOptions = res.data; |
| | |
| | | const userId = row.userId || this.ids; |
| | | getUser(userId).then((response) => { |
| | | this.form = response.data; |
| | | this.form.password = ""; |
| | | this.roleOptions = response.roles; |
| | | this.$set(this.form, "roleIds", response.roleIds); |
| | | this.open = true; |
| | |
| | | // 妿ä¸ä¼ æå |
| | | if (res.code == 200) { |
| | | // è·å坿æ¬ç»ä»¶å®ä¾ |
| | | let quill = this.Quill; |
| | | // è·åå
æ æå¨ä½ç½® |
| | | let length = quill.getSelection().index; |
| | | // æå
¥å¾ç res.url为æå¡å¨è¿åçå¾çå°å |
| | | quill.insertEmbed( |
| | | length, |
| | | "image", |
| | | process.env.VUE_APP_BASE_API + res.fileName |
| | | ); |
| | | // è°æ´å
æ å°æå |
| | | quill.setSelection(length + 1); |
| | | this.signatureUrl = res.data.url; |
| | | // let quill = this.Quill; |
| | | // // è·åå
æ æå¨ä½ç½® |
| | | // let length = quill.getSelection().index; |
| | | // // æå
¥å¾ç res.url为æå¡å¨è¿åçå¾çå°å |
| | | // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); |
| | | // // è°æ´å
æ å°æå |
| | | // quill.setSelection(length + 1); |
| | | this.form.signatureUrl = res.data.url; |
| | | } else { |
| | | this.$message.error("å¾çæå
¥å¤±è´¥"); |
| | | } |
| | |
| | | // 妿ä¸ä¼ æå |
| | | if (res.code == 200) { |
| | | // è·å坿æ¬ç»ä»¶å®ä¾ |
| | | let quill = this.Quill; |
| | | // è·åå
æ æå¨ä½ç½® |
| | | let length = quill.getSelection().index; |
| | | // æå
¥å¾ç res.url为æå¡å¨è¿åçå¾çå°å |
| | | quill.insertEmbed( |
| | | length, |
| | | "image", |
| | | process.env.VUE_APP_BASE_API + res.fileName |
| | | ); |
| | | // è°æ´å
æ å°æå |
| | | quill.setSelection(length + 1); |
| | | this.pictureUrl = res.data.url; |
| | | // let quill = this.Quill; |
| | | // // è·åå
æ æå¨ä½ç½® |
| | | // let length = quill.getSelection().index; |
| | | // // æå
¥å¾ç res.url为æå¡å¨è¿åçå¾çå°å |
| | | // quill.insertEmbed(length, "image", process.env.VUE_APP_BASE_API + res.fileName); |
| | | // // è°æ´å
æ å°æå |
| | | // quill.setSelection(length + 1); |
| | | this.form.pictureUrl = res.data.url; |
| | | } else { |
| | | this.$message.error("å¾çæå
¥å¤±è´¥"); |
| | | } |
| | |
| | | .search_form { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | |
| | | .options_button { |
| | | margin-top: 3px; |
| | | } |
| | | } |
| | | |
| | | .avatar-uploader ::v-deep .el-upload { |
| | | border: 1px dashed #666666; |
| | | border-radius: 6px; |
| | |
| | | position: relative; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | .avatar-uploader ::v-deep .el-upload:hover { |
| | | border-color: #409eff; |
| | | } |
| | | |
| | | .avatar-uploader-icon { |
| | | font-size: 20px; |
| | | color: #8c939d; |
| | |
| | | line-height: 90px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .avatar { |
| | | width: 90px; |
| | | height: 90px; |
| | | display: block; |
| | | } |
| | | |
| | | .addButton { |
| | | display: flex; |
| | | align-items: flex-start; |