From f943eafd889d193274158c1a7a5811e289687601 Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 21 十月 2024 14:46:36 +0800 Subject: [PATCH] 优化电路试验、报告生成页面 --- src/components/do/b1-inspect-order-plan/circuit-parameters1.vue | 87 ++++++++++++++--- src/components/do/b1-inspect-order-plan/circuit-parameters2.vue | 75 ++++++++++++-- src/main.js | 4 src/components/do/b1-report-preparation/order.vue | 102 ++++++++++---------- src/components/view/b1-inspect-order-plan.vue | 22 ++- 5 files changed, 199 insertions(+), 91 deletions(-) diff --git a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue index 1ac292c..07e0c6d 100644 --- a/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue +++ b/src/components/do/b1-inspect-order-plan/circuit-parameters1.vue @@ -98,11 +98,6 @@ <el-input size="small" placeholder="绔彛" v-model="item.value" :disabled="state>1"></el-input> </div> </td> - <td :rowspan="n.angleList.length+1"> - <el-button icon="el-icon-minus" circle size="mini" type="danger" - @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> - <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> - </td> </tr> <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> <td> @@ -115,7 +110,10 @@ </table> </div> </el-col> - <el-col :span="2"> + <el-col :span="1"> + <el-input-number v-model="n.portNum" :min="1" :max="100" label="鏁伴噺" size="small" @change="m=>changePort(m,n.portList)" :disabled="state>1"></el-input-number> + </el-col> + <el-col :span="1"> <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'涓嶅悎鏍�':(n.result===1?'鍚堟牸':(n.result===3?'涓嶅垽瀹�':(n.result===3?'涓嶅垽瀹�':'寰呭畾'))) }} </div> </el-col> @@ -149,11 +147,11 @@ <el-input size="small" placeholder="绔彛" v-model="item.value" :disabled="state>1"></el-input> </div> </td> - <td :rowspan="n.angleList.length+1"> + <!-- <td :rowspan="n.angleList.length+1"> <el-button icon="el-icon-minus" circle size="mini" type="danger" @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> - </td> + </td> --> </tr> <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> <td> @@ -166,7 +164,10 @@ </table> </div> </el-col> - <el-col :span="2"> + <el-col :span="1"> + <el-input-number v-model="n.portNum" :min="1" :max="100" label="鏁伴噺" size="small" @change="m=>changePort(m,n.portList)" :disabled="state>1"></el-input-number> + </el-col> + <el-col :span="1"> <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'涓嶅悎鏍�':(n.result===1?'鍚堟牸':(n.result===3?'涓嶅垽瀹�':(n.result===3?'涓嶅垽瀹�':'寰呭畾'))) }} </div> </el-col> @@ -192,11 +193,11 @@ <el-input size="small" placeholder="棰戞" v-model="item.value" :disabled="state>1"></el-input> </div> </td> - <td :rowspan="n.angleList.length+1"> + <!-- <td :rowspan="n.angleList.length+1"> <el-button icon="el-icon-minus" circle size="mini" type="danger" @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> - </td> + </td> --> </tr> <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> <td> @@ -209,7 +210,10 @@ </table> </div> </el-col> - <el-col :span="2"> + <el-col :span="1"> + <el-input-number v-model="n.portNum" :min="1" :max="100" label="鏁伴噺" size="small" @change="m=>changePort(m,n.portList)" :disabled="state>1"></el-input-number> + </el-col> + <el-col :span="1"> <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'涓嶅悎鏍�':(n.result===1?'鍚堟牸':(n.result===3?'涓嶅垽瀹�':'寰呭畾')) }} </div> </el-col> @@ -225,7 +229,7 @@ <el-col :span="2"> <div style="text-align: center;" v-html="n.tell"></div> </el-col> - <el-col :span="16"> + <el-col :span="17"> <div class="content" style="text-align: center;width: 100%;overflow-x: auto;"> <table border="1" cellpadding="10" class="thermal-table"> <tr> @@ -247,7 +251,7 @@ </table> </div> </el-col> - <el-col :span="2"> + <el-col :span="1"> <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'涓嶅悎鏍�':(n.result===1?'鍚堟牸':(n.result===3?'涓嶅垽瀹�':'寰呭畾')) }} </div> </el-col> @@ -475,7 +479,8 @@ equipName:n.equipName, equipValue:n.equipValue, frequency:n.frequency, - sonLaboratory:item.sonLaboratory + sonLaboratory:item.sonLaboratory, + portNum:JSON.parse(n.value).length>0?JSON.parse(n.value)[0].length:4 } this.$set(obj,'portList', n.port?portList:[]) this.$set(obj,'angleList', n.angle?angleList:[]) @@ -528,6 +533,7 @@ item.result = '' // 璧嬪�兼渶宸�� item.value = [] + item.portNum = 4 if(item.inspectionItemSubclass.includes('鑰﹀悎搴�')){ for(let i = 0;i<item.angleList.length;i++){ item.value.push(['']) @@ -649,9 +655,27 @@ } }) list.push(obj) + }else if('绔彛'){ + let obj = JSON.parse(JSON.stringify(list[0])); + obj.value = null; + list.push(obj) }else{ let obj = JSON.parse(JSON.stringify(list[0])); list.push(obj) + } + }, + // 鏀瑰彉绔彛 + changePort(num,list){ + if(num>list.length){ + for(let i = list.length;i<num;i++){ + let obj = JSON.parse(JSON.stringify(list[0])); + obj.value = null; + list.push(obj) + } + }else if(num<list.length){ + for(let i = list.length;i>num;i--){ + list.pop() + } } }, // 鑾峰彇璁惧閫夐」 id:涓烘楠岄」id @@ -798,4 +822,37 @@ .green{ color: green; } +>>>.el-input-number { + display: inline-flex; + flex-direction: column !important; + line-height: 26px; +} + +>>>.el-input-number__increase, >>>.el-input-number__decrease { + width: 26px; + height: 26px; +} +>>>.el-input-number__increase{ + top: 36px; + left: 10px; + border: 0px; + border-radius: 50%; + background: #3A7BFA; + color: #fff; +} +>>>.el-input-number__decrease{ + top: -30px; + border: 0px; + border-radius: 50%; + left: 10px; + background: #F56C6C; + color: #fff; +} +>>>.el-input-number .el-input{ + width: 50px; +} +>>>.el-input-number .el-input__inner{ + width: 50px; + padding: 0; +} </style> diff --git a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue index 5afe6f5..75d357a 100644 --- a/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue +++ b/src/components/do/b1-inspect-order-plan/circuit-parameters2.vue @@ -98,11 +98,6 @@ <el-input size="small" placeholder="绔彛" v-model="item.value" :disabled="state>1"></el-input> </div> </td> - <td :rowspan="n.angleList.length+1"> - <el-button icon="el-icon-minus" circle size="mini" type="danger" - @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> - <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> - </td> </tr> <tr> <td> @@ -115,7 +110,10 @@ </table> </div> </el-col> - <el-col :span="2"> + <el-col :span="1"> + <el-input-number v-model="n.portNum" :min="1" :max="100" label="鏁伴噺" size="small" @change="m=>changePort(m,n.portList)" :disabled="state>1"></el-input-number> + </el-col> + <el-col :span="1"> <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'涓嶅悎鏍�':(n.result===1?'鍚堟牸':(n.result===3?'涓嶅垽瀹�':'寰呭畾')) }} </div> </el-col> @@ -149,11 +147,6 @@ <el-input size="small" placeholder="绔彛" v-model="item.value" :disabled="state>1"></el-input> </div> </td> - <td :rowspan="n.angleList.length+1"> - <el-button icon="el-icon-minus" circle size="mini" type="danger" - @click="deleteList(n.portList.length-1,n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> - <el-button icon="el-icon-plus" circle size="mini" type="primary" @click="addList(n.portList)" :disabled="state>1" style="margin: 5px;"></el-button> - </td> </tr> <tr v-for="(item,index) in n.angleList" :key="index + 'eee'"> <td> @@ -166,7 +159,10 @@ </table> </div> </el-col> - <el-col :span="2"> + <el-col :span="1"> + <el-input-number v-model="n.portNum" :min="1" :max="100" label="鏁伴噺" size="small" @change="m=>changePort(m,n.portList)" :disabled="state>1"></el-input-number> + </el-col> + <el-col :span="1"> <div style="text-align: center;" :class="{red:n.result===0,green:n.result===1}">{{ n.result===0?'涓嶅悎鏍�':(n.result===1?'鍚堟牸':(n.result===3?'涓嶅垽瀹�':'寰呭畾')) }} </div> </el-col> @@ -354,7 +350,8 @@ equipName:n.equipName, equipValue:n.equipValue, frequency:n.frequency, - sonLaboratory:item.sonLaboratory + sonLaboratory:item.sonLaboratory, + portNum:JSON.parse(n.value).length>0?JSON.parse(n.value)[0].length:4 } this.$set(obj,'portList', n.port?portList:[]) this.$set(obj,'angleList', n.angle?angleList:[]) @@ -408,6 +405,7 @@ item.angleList = JSON.parse(JSON.stringify(this.angleList)) // 璧嬪�肩粨璁� item.result = '' + item.portNum = 4 // 璧嬪�兼渶宸�� item.value = [] if(item.inspectionItemSubclass.includes('浜掕皟')){ @@ -531,9 +529,27 @@ } }) list.push(obj) + }else if(type=='绔彛'){ + let obj = JSON.parse(JSON.stringify(list[0])); + obj.value = null; + list.push(obj) }else{ let obj = JSON.parse(JSON.stringify(list[0])); list.push(obj) + } + }, + // 鏀瑰彉绔彛 + changePort(num,list){ + if(num>list.length){ + for(let i = list.length;i<num;i++){ + let obj = JSON.parse(JSON.stringify(list[0])); + obj.value = null; + list.push(obj) + } + }else if(num<list.length){ + for(let i = list.length;i>num;i--){ + list.pop() + } } }, // 鑾峰彇璁惧閫夐」 id:涓烘楠岄」id @@ -679,4 +695,37 @@ .green{ color: green; } +>>>.el-input-number { + display: inline-flex; + flex-direction: column !important; + line-height: 26px; +} + +>>>.el-input-number__increase, >>>.el-input-number__decrease { + width: 26px; + height: 26px; +} +>>>.el-input-number__increase{ + top: 36px; + left: 10px; + border: 0px; + border-radius: 50%; + background: #3A7BFA; + color: #fff; +} +>>>.el-input-number__decrease{ + top: -30px; + border: 0px; + border-radius: 50%; + left: 10px; + background: #F56C6C; + color: #fff; +} +>>>.el-input-number .el-input{ + width: 50px; +} +>>>.el-input-number .el-input__inner{ + width: 50px; + padding: 0; +} </style> diff --git a/src/components/do/b1-report-preparation/order.vue b/src/components/do/b1-report-preparation/order.vue index b17cf56..497ec80 100644 --- a/src/components/do/b1-report-preparation/order.vue +++ b/src/components/do/b1-report-preparation/order.vue @@ -38,58 +38,56 @@ :append-to-body="true" :modal="!dialogVisible0" > - <span>璇烽�夋嫨濮旀墭缂栧彿涓� {{currentInfo.entrustCode}} 瑕佺敓鎴愮殑鏁版嵁</span> - <el-card class="box-card" style="margin-top: 16px;" v-for="(item,index) in historyList" :key="index"> - <div slot="header" style="display: flex;justify-content: space-between;"> - <span>{{ item.laboratory }}</span> - <!-- <el-checkbox v-model="item.checked"></el-checkbox> --> - </div> - <!-- <el-radio-group v-model="item.numValue" ref="radio"> - <el-radio :label="m.value" v-for="(m,i) in item.arr" :key="i"><el-link type="primary" @click="lookDetail(item,m.value)">{{ m.label }}</el-link></el-radio> - </el-radio-group> --> - <el-table - :data="item.insOrderUserList" - border - style="width: 100%" @selection-change="list=>handleSelectionChange(list,item.insOrderUserList)"> - <el-table-column - type="selection" - width="55"> - </el-table-column> - <el-table-column - prop="submitTime" - label="鎻愪氦鏃ユ湡" - width="150"> - </el-table-column> - <el-table-column - prop="submitUserName" - label="鎻愪氦浜�" - width="90"> - </el-table-column> - <el-table-column - prop="term" - label="瀹為獙闃舵" - width="120"> - </el-table-column> - <el-table-column - prop="note" - label="瀹為獙鎿嶄綔" - width="120"> - </el-table-column> - <el-table-column - prop="tell" - label="鍐嶆妫�楠屽師鍥�" - width="120"> - </el-table-column> - <el-table-column - fixed="right" - label="鎿嶄綔" - width="100"> - <template slot-scope="scope"> - <el-button @click="lookDetail(item,scope.row.num)" type="text" size="small">鏌ョ湅</el-button> - </template> - </el-table-column> - </el-table> - </el-card> + <span>璇烽�夋嫨濮旀墭缂栧彿涓� <span style="color: #3A7BFA">{{currentInfo.entrustCode}}</span> 瑕佺敓鎴愮殑鏁版嵁</span> + <div style="max-height: 75vh;overflow-y: auto;"> + <el-card class="box-card" style="margin-top: 16px;" v-for="(item,index) in historyList" :key="index"> + <div slot="header" style="display: flex;justify-content: space-between;"> + <span>{{ item.laboratory }}</span> + </div> + <el-table + :data="item.insOrderUserList" + border + style="width: 100%" @selection-change="list=>handleSelectionChange(list,item.insOrderUserList)"> + <el-table-column + type="selection" + width="55"> + </el-table-column> + <el-table-column + prop="submitTime" + label="鎻愪氦鏃ユ湡" + min-width="150"> + </el-table-column> + <el-table-column + prop="submitUserName" + label="鎻愪氦浜�" + min-width="90"> + </el-table-column> + <el-table-column + prop="term" + label="瀹為獙闃舵" + min-width="120"> + </el-table-column> + <el-table-column + prop="note" + label="瀹為獙鎿嶄綔" + min-width="120"> + </el-table-column> + <el-table-column + prop="tell" + label="鍐嶆妫�楠屽師鍥�" + min-width="120"> + </el-table-column> + <el-table-column + fixed="right" + label="鎿嶄綔" + min-width="100"> + <template slot-scope="scope"> + <el-button @click="lookDetail(item,scope.row.num)" type="text" size="small">鏌ョ湅</el-button> + </template> + </el-table-column> + </el-table> + </el-card> + </div> <span slot="footer" class="dialog-footer"> <el-button :loading="loading0" @click="handleNoCreate">涓嶇敓鎴�</el-button> <el-button type="primary" @click="handleCreate" :loading="loading1">鐢� 鎴�</el-button> diff --git a/src/components/view/b1-inspect-order-plan.vue b/src/components/view/b1-inspect-order-plan.vue index bec7b50..41402db 100644 --- a/src/components/view/b1-inspect-order-plan.vue +++ b/src/components/view/b1-inspect-order-plan.vue @@ -166,8 +166,8 @@ </el-col> <el-col :span="6"> <div class="center-title"> - <el-button size="small" type="primary" @click="qrCodeVisible=true">鎵爜鎶ユ</el-button> - <el-button size="small" type="primary" @click="exportVisible=true" style="margin-right: 16px;">鍑哄簱</el-button> + <el-button size="small" type="primary" @click="qrCodeVisible=true" v-if="selectWarehouse">鎵爜鎶ユ</el-button> + <el-button size="small" type="primary" @click="exportVisible=true" style="margin-right: 16px;" v-if="selectWarehouse">鍑哄簱</el-button> <span>鎬昏浠诲姟鏁伴噺:</span> <span>{{total}}</span> </div> @@ -335,32 +335,32 @@ <el-table-column prop="submitTime" label="鎻愪氦鏃ユ湡" - width="150"> + min-width="150"> </el-table-column> <el-table-column prop="submitUserName" label="鎻愪氦浜�" - width="90"> + min-width="90"> </el-table-column> <el-table-column prop="term" label="瀹為獙闃舵" - width="120"> + min-width="120"> </el-table-column> <el-table-column prop="note" label="瀹為獙鎿嶄綔" - width="120"> + min-width="120"> </el-table-column> <el-table-column prop="tell" label="鍐嶆妫�楠屽師鍥�" - width="120"> + min-width="120"> </el-table-column> <el-table-column fixed="right" label="鎿嶄綔" - width="100"> + min-width="100"> <template slot-scope="scope"> <el-button @click="lookHistory(scope.row)" type="text" size="small">鏌ョ湅</el-button> </template> @@ -660,6 +660,7 @@ upLoadStorage: false, exportVisible: false, upLoadExport: false, + selectWarehouse:false } }, created() { @@ -667,7 +668,6 @@ this.getTypeDicts() this.getInsStateDicts() this.getAuthorizedPerson() - this.selectList() this.currentTime = getYearAndMonthAndDays() }, mounted() { @@ -892,6 +892,10 @@ if (power[i].menuMethod == 'scanInsOrderState') { this.scanInsOrderState = true } + if (power[i].menuMethod == 'selectWarehouse') { + this.selectWarehouse = true + this.selectList() + } } // if (!getInsProduct2) { // this.componentData.do.splice(5, 1) diff --git a/src/main.js b/src/main.js index ab48d7d..6984607 100644 --- a/src/main.js +++ b/src/main.js @@ -21,11 +21,11 @@ //鏈湴 // Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; // const javaApi = 'http://127.0.0.1:8001'; -const javaApi = 'http://172.20.10.5:8001'; +// const javaApi = 'http://172.20.10.5:8001'; // //閫氫俊娴嬭瘯搴� // Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080"; -// const javaApi = 'http://10.1.13.77:8001'; +const javaApi = 'http://10.1.13.77:8001'; //浜� // Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080"; -- Gitblit v1.9.3