From a48d89e9821e7bfeed78fa5185433facf13ca003 Mon Sep 17 00:00:00 2001 From: value <z1292839451@163.com> Date: 星期五, 01 九月 2023 08:23:27 +0800 Subject: [PATCH] bug修复 --- src/views/experiment/reportAuditing/index.vue | 10 src/views/experiment/inspectionApplication/index.vue | 23 src/components/experiment/checkTheReport/index.vue | 341 ++++--- src/views/experiment/planAssignments/plan.vue | 6 src/components/experiment/template_testReport/index.vue | 1341 +++++++++++++++++--------------- src/views/experiment/checkTheReport/index.vue | 701 +++++++--------- 6 files changed, 1,214 insertions(+), 1,208 deletions(-) diff --git a/src/components/experiment/checkTheReport/index.vue b/src/components/experiment/checkTheReport/index.vue index 3f4d022..cbcf0f9 100644 --- a/src/components/experiment/checkTheReport/index.vue +++ b/src/components/experiment/checkTheReport/index.vue @@ -1,167 +1,184 @@ <template> - <div class="preview-main"> - <div class="logo"> - <img :src="logoSrc" /> - </div> - <div class="center"> - <h1>鍘熸潗鏂欐娴嬫姤鍛�</h1> - <table height="30px"> - <tr> - <td>鏉愭枡鍚嶇О</td> - <td colspan="5">{{reportData.name}}</td> - </tr> - <tr> - <td>瑙勬牸鍨嬪彿</td> - <td colspan="2"> - {{reportData.specifications.split("-")[1]}} - </td> - <td>鏉愭枡鍘傚</td> - <td colspan="2">{{reportData.supplier}}</td> - </tr> - <tr> - <td>鏉愭枡缂栧彿</td> - <td colspan="2">{{reportData.imCode}}</td> - <td>妫�娴嬬紪鍙�</td> - <td colspan="2">{{reportData.insCode}}</td> - </tr> - <tr> - <td>妫�娴嬩緷鎹�</td> - <td colspan="2"> - {{reportData.specifications.split("-")[0]}} - </td> - <td>妫�娴嬬被鍒�</td> - <td colspan="2">鍘熸潗鏂�</td> - </tr> - <tr> - <td>搴忓彿</td> - <td>妫�楠岄」鐩�</td> - <td>鍗曚綅</td> - <td>鏍囧噯瑕佹眰</td> - <td>妫�娴嬬粨鏋�</td> - <td>鍗曢」鍒ゆ柇</td> - </tr> - <tr v-for="(item,index) in arr" :key="index"> - <td>{{index+1}}</td> - <td>{{item.ipName}}</td> - <td>{{item.unit}}</td> - <td>{{item.required}}</td> - <td>{{item.testValue}}</td> - <td > - {{isIfState(item.testState) }} - </td> - </tr> - <tr> - <td colspan="6">妫�楠岀粨璁猴細{{reportData.type == 1 ? "鍚堟牸" : "涓嶅悎鏍�"}}</td> - </tr> - <tr> - <td colspan="6"> - 娉細鈥溾垰鈥濊〃绀鸿椤圭洰鍚堟牸锛屸�溍椻�濊〃绀鸿椤圭洰涓嶅悎鏍硷紝鈥溾�斺�濊〃绀鸿椤圭洰涓嶈姹傛娴嬨�� - </td> - </tr> - </table> - <el-row class="date-group"> - <p>妫�娴嬨�佹棩鏈燂細<span>{{reportData.createTime}}</span></p> - <p>瀹℃牳銆佹棩鏈燂細<span>{{reportData.checkTime}}</span></p> - </el-row> - <p class="footer"> - <span>缂栧彿锛�</span><span>{{reportData.rcode}} </span> - <span>鍙戣鏃ユ湡锛�</span><span>{{now}} </span> - <span>淇濆瓨鏈熼檺锛�</span><span>闀挎湡</span> - </p> - </div> - </div> + <div class="preview-main"> + <div class="logo"> + <img :src="logoSrc" /> + </div> + <div class="center"> + <h1>鍘熸潗鏂欐娴嬫姤鍛�</h1> + <table height="30px"> + <tr> + <td>鏉愭枡鍚嶇О</td> + <td colspan="5">{{reportData.name}}</td> + </tr> + <tr> + <td>瑙勬牸鍨嬪彿</td> + <td colspan="2"> + {{reportData.length==0?null:reportData.specifications.split("-")[1]}} + </td> + <td>鏉愭枡鍘傚</td> + <td colspan="2">{{reportData.supplier}}</td> + </tr> + <tr> + <td>鏉愭枡缂栧彿</td> + <td colspan="2">{{reportData.imCode}}</td> + <td>妫�娴嬬紪鍙�</td> + <td colspan="2">{{reportData.insCode}}</td> + </tr> + <tr> + <td>妫�娴嬩緷鎹�</td> + <td colspan="2"> + {{reportData.length==0?null:reportData.specifications.split("-")[0]}} + </td> + <td>妫�娴嬬被鍒�</td> + <td colspan="2">鍘熸潗鏂�</td> + </tr> + <tr> + <td>搴忓彿</td> + <td>妫�楠岄」鐩�</td> + <td>鍗曚綅</td> + <td>鏍囧噯瑕佹眰</td> + <td>妫�娴嬬粨鏋�</td> + <td>鍗曢」鍒ゆ柇</td> + </tr> + <tr v-for="(item,index) in arr" :key="index"> + <td>{{index+1}}</td> + <td>{{item.ipName}}</td> + <td>{{item.unit}}</td> + <td>{{item.required}}</td> + <td>{{item.testValue}}</td> + <td> + {{isIfState(item.testState) }} + </td> + </tr> + <tr> + <td colspan="6">妫�楠岀粨璁猴細{{reportData.type == 1 ? "鍚堟牸" : "涓嶅悎鏍�"}}</td> + </tr> + <tr> + <td colspan="6"> + 娉細鈥溾垰鈥濊〃绀鸿椤圭洰鍚堟牸锛屸�溍椻�濊〃绀鸿椤圭洰涓嶅悎鏍硷紝鈥溾�斺�濊〃绀鸿椤圭洰涓嶈姹傛娴嬨�� + </td> + </tr> + </table> + <el-row class="date-group"> + <p>妫�娴嬨�佹棩鏈燂細<span>{{reportData.createTime}}</span></p> + <p>瀹℃牳銆佹棩鏈燂細<span>{{reportData.checkTime}}</span></p> + </el-row> + <p class="footer"> + <span>缂栧彿锛�</span><span>{{reportData.rcode}} </span> + <span>鍙戣鏃ユ湡锛�</span><span>{{now}} </span> + <span>淇濆瓨鏈熼檺锛�</span><span>闀挎湡</span> + </p> + </div> + </div> </template> <script> -export default({ - name: 'Preview', - data() { - return { - logoSrc : require("@/assets/404_images/logo.png"), - now: new Date().toLocaleDateString(), - arr: [] - } - }, - mounted(){ - this.arr = this.reportData.products; - if(this.reportData.products.length < 10){ - let size = this.reportData.products.length; - let num=10-size - for(let i=0;i< num;i++){ - this.arr.push({ - code: null, - ipName: "", - required: "", - testState: null, - testValue: "", - unit: ""}) - } - } - }, - methods:{ - formatDate(val){ - var dt = new Date(val); - let year = dt.getFullYear(); - let month = (dt.getMonth() + 1).toString().padStart(2,'0'); - let date = dt.getDate().toString().padStart(2,'0'); - return `${year}-${month}-${date}`; - }, - isIfState(val){ - if(val===1)return "鈭�" - else if(val===null || val=== undefined) return null - else return "X" - } - }, - props:["reportData"] -}) + export default ({ + name: 'Preview', + data() { + return { + logoSrc: require("@/assets/404_images/logo.png"), + now: new Date().toLocaleDateString(), + arr: [] + } + }, + mounted() { + this.arr = this.reportData.products; + if(this.reportData.length>0){ + if (this.reportData.products.length < 10) { + let size = this.reportData.products.length; + let num = 10 - size + for (let i = 0; i < num; i++) { + this.arr.push({ + code: null, + ipName: "", + required: "", + testState: null, + testValue: "", + unit: "" + }) + } + } + } + }, + methods: { + formatDate(val) { + var dt = new Date(val); + let year = dt.getFullYear(); + let month = (dt.getMonth() + 1).toString().padStart(2, '0'); + let date = dt.getDate().toString().padStart(2, '0'); + return `${year}-${month}-${date}`; + }, + isIfState(val) { + if (val === 1) return "鈭�" + else if (val === null || val === undefined) return null + else return "X" + } + }, + props: ["reportData"] + }) </script> <style scoped lang="scss"> - .preview-main{ - margin: 0; - padding: 0; - width:90%; - margin-left: 5%; - .logo{ - img{ - width: 150px; - height: 60px; - } - } - .center{ - width: 100%; - h1{ - width:100%; - font-family: "寰蒋闆呴粦" !important; - text-align: center; - } - table{ - width:100%; - border-collapse: collapse; - font-size: 18px; - } - table,tr,th,td{ - border: 2px solid black; - } - tr,td,th{ - padding: 15px 10px; - } - .date-group{ - width: 90%; - margin-left: 5%; - p{ - width: 50%; - float: left; - text-align: center; - padding: 50px 0px; - font-size: 18px; - } - } - .footer{ - width:90%; - margin-left: 5%; - color: lightgray; - text-align: center; - margin-top: 300px; - } - } - } -</style> + .preview-main { + margin: 0; + padding: 0; + width: 90%; + margin-left: 5%; + + .logo { + img { + width: 150px; + height: 60px; + } + } + + .center { + width: 100%; + + h1 { + width: 100%; + font-family: "寰蒋闆呴粦" !important; + text-align: center; + } + + table { + width: 100%; + border-collapse: collapse; + font-size: 18px; + } + + table, + tr, + th, + td { + border: 2px solid black; + } + + tr, + td, + th { + padding: 15px 10px; + } + + .date-group { + width: 90%; + margin-left: 5%; + + p { + width: 50%; + float: left; + text-align: center; + padding: 50px 0px; + font-size: 18px; + } + } + + .footer { + width: 90%; + margin-left: 5%; + color: lightgray; + text-align: center; + margin-top: 300px; + } + } + } +</style> \ No newline at end of file diff --git a/src/components/experiment/template_testReport/index.vue b/src/components/experiment/template_testReport/index.vue index ecc76e1..3fa121c 100644 --- a/src/components/experiment/template_testReport/index.vue +++ b/src/components/experiment/template_testReport/index.vue @@ -1,648 +1,709 @@ <template> - <div class="content-wrapper"> - <div class="content-main"> - <div class="cover"> - <div class="cover-top"> - <div> - <div style="height: 30px; line-height: 30px;">鎶ュ憡缂栧彿:</div> - <div style="height: 30px; line-height: 30px;">Reference No:</div> - </div> - </div> - <div class="title"> - <h1 style="text-align-last:justify ;">妫�楠屾姤鍛�</h1> - <h1>Test Report</h1> - </div> - <div class="cover-body"> - <div class="name"> - <div style="width:140px; text-align-last: justify;"> - <div>璇曟牱鍚嶇О</div> - <span style="font-size: 14px;">Name of Product</span> - </div> - <div class="line"> 娴嬭瘯鍚嶇О</div> - </div> - <div class="name"> - <div style="width:140px; text-align-last: justify;"> - <div style="text-align-last: justify;">鍨嬪彿</div> - <span style="font-size: 14px;">Type and Size</span> - </div> - <div class="line"> 娴嬭瘯鍚嶇О</div> - </div> - <div class="name"> - <div style="width:140px; text-align-last: justify;"> - <div>濮旀墭鍗曚綅</div> - <span style="font-size: 14px;display: block;margin: 10px 45px 0px;">Client</span> - </div> - <div class="line"> 娴嬭瘯鍚嶇О</div> - </div> - <div class="name"> - <div style="width:140px; text-align-last: justify;"> - <div>妫�楠岀被鍒�</div> - <span style="font-size: 14px;">Kind of Test</span></div> - <div class="line"> 娴嬭瘯鍚嶇О</div> - </div> - </div> - <div class="cover-footer"> - <span>姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</span><br> - <span style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</span> - </div> - </div> - <div class="pageOne"> - <div class="statement"> - <div><h2>澹版槑</h2></div> - <div style="text-align-last: center;"><h2 style="font-size: 14px;">Statement</h2></div> - </div> - <div class="statement-body"> - <div> - <span>1. 鏈楠屾姤鍛婏紙鍖呮嫭澶嶅嵃浠讹級鏈姞妫�娴嬩笓鐢ㄧ珷涓�寰嬫棤鏁堛��</span><br> - <span>This test report (including any duplicates) shall become effective only with pecial chapter for testing on.</span> - </div> - <div> - <span>2. 鏈楠屾姤鍛婃棤缂栧啓銆佸鏍搞�佹壒鍑嗕汉绛剧珷鏃犳晥銆�</span><br> - <span>This test report shall become effective only with the signatures of compiler checker and approver.</span> - </div> - <div> - <span>3. 鏈楠屾姤鍛婃秱鏀规棤鏁堛��</span><br> - <span>This test report will be invalid if altered.</span> - </div> - <div> - <span>4. 鏈楠屾姤鍛婁笉寰楅儴鍒嗗鍗般��</span><br> - <span>This test report mustn鈥檛 copy partly.</span> - </div> - <div> - <span>5. 閫佹牱濮旀墭妫�楠岋紝浠呭鏉ユ牱璐熻矗銆�</span><br> - <span>For the sample submitted by clients, the test result is valid only for these samples.</span> - </div> - <div> - <span>6. 鏍峰搧鍙婂鎵樺崟浣嶄负濮旀墭鏂硅嚜鍛藉悕銆�</span><br> - <span>Samples and consignor name for the principal.</span> - </div> - <div> - <span>7. 鏈楠屾姤鍛婁腑鑻辨枃鎻忚堪鏈夊啿绐佹椂锛屼互涓枃瑙i噴涓哄噯銆�</span><br> - <span>If the Chinese and English version of the test report have any conflict, the Chinese version should be the standard for arbitrament.</span> - </div> - <div> - <span>8. 濮旀墭鏂瑰鏈楠屾姤鍛婅嫢鏈夊紓璁紝搴斾簬鏍峰搧淇濆瓨鏈熷唴鍚戞湰涓績鎻愬嚭锛岃仈绯荤數璇濓細0513-84885657</span><br> - <span>Clients who have any different ideas about this test report, may contract with Test Central within the sample reservation time. Tel: 0513-84885657</span> - </div> - <div> - <span>9. 鏈腑蹇冩牱鍝佽嚜鎶ュ憡鍙戦�佹棩璧凤紝涓�鑸繚瀛樹竴涓湀锛屼互澶囧楠屻��</span><br> - <span>The sample shall be reserved for one month beginning from the data when this test report is submitted for examine or review.</span> - </div> - </div> - <div class="statement-footer"> - <div class="depart"> - <span>姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</span><br> - <span>Test Center of Jiangsu Zhongtian Technology Co., LTD</span> - </div> - <div class="address"> - <span>鍦� 鍧�锛氭睙鑻忕渷鍗楅�氬競缁忔祹鎶�鏈紑鍙戝尯鏂板紑鍗楄矾19鍙�</span><br> - <span>Address: No.19 Xinkai South Road, Nantong Economic and Technological Development Zone, Jiangsu Province</span> - </div> - <div class="zipcode">閭斂缂栫爜Zip Code锛�226010</div> - <div class="tel">鐢� 璇漈el锛�0513-89059043</div> - <div class="email">閭� 绠盓-mail:锛歾tttc@chinaztt.com </div> - </div> - </div> - <div class="pageTwo"> - <div class="header" style="line-height: 10px;"> - <div style="width: 350px;margin: 0 auto; text-align-last: justify;"> - <h2 style="font-size: 18px;">姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</h2> - </div> - <div style="width: 500px; margin: 0 auto;text-align-last: justify;"> - <h2 style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</h2> - </div> - <div style="width: 120px;margin: 0 auto;text-align-last: justify;"> - <h2 style="font-size: 18px;">妫�娴嬫姤鍛�</h2> - </div> - <div style="width: 100px; margin: 0 auto;text-align-last: justify;"> - <h2 style="font-size: 14px;">Test Report</h2> - </div> - </div> - <div class="table"> - <div class="table-header"> - <div> - <span>鎶ュ憡缂栧彿锛�</span><br> - <span>Reference No锛�</span> - </div> - <div> - <span>绗�1椤靛叡2椤�</span><br> - <span>Page 1 of 2</span> - </div> - </div> - <div class="table-body"> - <table width="100%" border="1" cellspacing="0" style="text-align: center;"> - <tr> - <td><span>璇曟牱鍚嶇О</span><br> - <span>Name of product</span></td> - <td colspan="2"></td> - <td> - <span>瑙勬牸鍨嬪彿</span><br> - <span>Type and size</span> - </td> - <td colspan="2"></td> - </tr> - <tr> - <td> - <span>鏍峰搧鏁伴噺</span><br> - <span>Test item</span> - </td> - <td colspan="2"></td> - <td> - <span>妫�楠岄」鐩�</span><br> - <span>Test item</span> - </td> - <td colspan="2"></td> - </tr> - <tr> - <td> - <span>鏉ユ牱鏂瑰紡</span><br> - <span>Delivering method</span> - </td> - <td colspan="2"></td> - <td> - <span>妫�楠岀被鍨�</span><br> - <span>Type of test</span> - </td> - <td colspan="2"></td> - </tr> - <tr> - <td> - <span>鏍峰搧鐘舵��</span><br> - <span>Sample discription</span> - </td> - <td colspan="2"></td> - <td> - <span>鐢熶骇鍗曚綅</span><br> - <span>Producer</span> - </td> - <td colspan="2"></td> - </tr> - <tr> - <td> - <span>鏀舵牱鏃堕棿</span><br> - <span>Received date</span> - </td> - <td colspan="2"></td> - <td> - <span>妫�楠屾棩鏈�</span><br> - <span>Test date</span> - </td> - <td colspan="2"></td> - </tr> - <tr> - <td> - <span>濮旀墭浜�</span><br> - <span>Consignor</span> - </td> - <td colspan="2"></td> - <td> - <span>鐢佃瘽</span><br> - <span>Tel</span> - </td> - <td colspan="2"></td> - </tr> - <tr> - <td> - <span>濮旀墭鍗曚綅</span><br> - <span>Client</span> - </td> - <td colspan="5"></td> - </tr> - <tr> - <td> - <span>濮旀墭鍗曚綅鍦板潃</span><br> - <span>Address</span> - </td> - <td colspan="5"></td> - </tr> - <tr> - <td> - <span>妫�楠岀幆澧�</span><br> - <span>Test environment</span> - </td> - <td colspan="5"></td> - </tr> - <tr> - <td> - <span>妫�楠屼緷鎹�</span><br> - <span>Test standard</span> - </td> - <td colspan="5"></td> - </tr> - <tr> - <td style="height: 180px;"> - <span>缁撹</span><br> - <span>Conclusion </span> - </td> - <td colspan="5"> - <div style="height: 120px;"></div> - <div style="height: 60px;margin-left: 250px;"> - <span>锛堟娴嬫姤鍛婁笓鐢ㄧ珷锛�</span><br> - <span>( SPECIFIC STAMP FOR TEST RTORT) </span><br> - <span>绛惧彂鏃ユ湡锛� 骞� 鏈� 鏃�</span><br> - <span>Date of issue: August 23, 2023</span> - </div> - </td> - </tr> - <tr> - <td> - <span>澶囨敞</span><br> - <span>Remark </span> - </td> - <td colspan="5"></td> - </tr> - <tr> - <td> - <span>缂栧埗</span><br> - <span>Preparer</span> - </td> - <td colspan="2"></td> - <td> - <span>妫�楠�</span><br> - <span>Tester</span> - </td> - <td colspan="2"></td> - </tr> - <tr> - <td> - <span>瀹℃牳</span><br> - <span>Checker </span> - </td> - <td colspan="2"></td> - <td> - <span>鎵瑰噯</span><br> - <span>Approver</span> - </td> - <td colspan="2"></td> - </tr> - </table> - </div> - </div> - </div> - <div class="pageThree"> - <div class="header" style="line-height: 10px;"> - <div style="width: 350px;margin: 0 auto; text-align-last: justify;"> - <h2 style="font-size: 18px;">姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</h2> - </div> - <div style="width: 500px; margin: 0 auto;text-align-last: justify;"> - <h2 style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</h2> - </div> - <div style="width: 120px;margin: 0 auto;text-align-last: justify;"> - <h2 style="font-size: 18px;">妫�娴嬫姤鍛�</h2> - </div> - <div style="width: 100px; margin: 0 auto;text-align-last: justify;"> - <h2 style="font-size: 14px;">Test Report</h2> - </div> - </div> - <div class="table"> - <div class="table-header"> - <div> - <span>鎶ュ憡缂栧彿锛�</span><br> - <span>Reference No锛�</span> - </div> - <div> - <span>绗�2椤靛叡2椤�</span><br> - <span>Page 2 of 2</span> - </div> - </div> - <div class="table-body"> - <table width="100%" border="1" cellspacing="0" style="text-align: center;"> - <tr> - <td colspan="4"> - <span>鏍峰搧缂栧彿</span><br> - <span>Sample No</span></td> - <td colspan="3"></td> - <td colspan="4"> - <span>瑙勬牸鍨嬪彿</span><br> - <span>Type</span> - </td> - <td colspan="3"></td> - </tr> - <tr> - <td> - <span>搴忓彿</span><br> - <span>No</span> - </td> - <td colspan="3"> - <span>妫�楠岄」鐩�</span><br> - <span>Test item</span> - </td> - <td> - <span>鍗曚綅</span><br> - <span>Unit</span> - </td> - <td colspan="3"> - <span>鏍囧噯瑕佹眰</span><br> - <span>Requirement</span> - </td> - <td colspan="3"> - <span>妫�楠岀粨鏋�</span><br> - <span>Test result</span> - </td> - <td> - <span>缁撹</span><br> - <span>Conclusion</span> - </td> - </tr> - <tr> - <td> - <span></span><br> - <span></span> - </td> - <td colspan="3"> - <span>鏍峰搧鏍囪瘑</span><br> - <span>Sample labeling</span> - </td> - <td> - <span></span><br> - <span>I</span> - </td> - <td colspan="3"> - <span></span><br> - <span></span> - </td> - <td colspan="3"> - <span></span><br> - <span></span> - </td> - <td> - <span></span><br> - <span></span> - </td> - </tr> - <tr v-for="item in resultTable" :key="index"> - <td> - <span>{{ item.id }}</span><br> - </td> - <td colspan="3"> - <span>{{ item.testitem }}</span><br> - <span>{{ item.testitem_engName }}</span> - </td> - <td> - <span>{{ item.unit }}</span> - </td> - <td colspan="3"> - <span>{{ item.requirement }}</span><br> - <span>{{ item.requirement_eng }}</span> - </td> - <td colspan="3"> - <span>{{ item.testresult }}</span><br> - <span>{{ item.testresult_engName }}</span> - </td> - <td> - <span>{{ item.conclusion }}</span> - </td> - </tr> - - </table> - </div> - </div> - </div> - <div class="pageFour"> - <div class="page-header" style="display: flex;justify-content: space-between;font-size: 12px;"> - <div> - <span>鎶ュ憡缂栧彿锛�</span><br> - <span>Reference No锛�</span> - </div> - <div> - <span>闄勯〉</span><br> - <span>Appenfix</span> - </div> - </div> - <hr> - <div class="table"> - <div class="table-header"> - <div style="width: 200px; margin: 0 auto;text-align-last: justify;"><h2>妫�楠岃澶囦竴瑙堣〃</h2></div> - <div style="text-align-last: center;"><h2 style="font-size: 14px;">Equipment List</h2></div> - </div> - <div class="table-body"> - <table width="100%" border="1" cellspacing="0" style="text-align: center;"> - <thead> - <tr> - <td> - <span>搴忓彿</span><br> - <span>No</span> - </td> - <td colspan="2"> - <span>璁惧鍚嶇О</span><br> - <span>Equipment name</span> - </td> - <td> - <span>璁惧鍨嬪彿</span><br> - <span>type</span> - </td> - <td colspan="2"> - <span>缂栧彿</span><br> - <span>Factory number</span> - </td> - <td colspan="2"> - <span>鏍″噯鏈夋晥鏈�</span><br> - <span>Date of validity</span> - </td> - </tr> - </thead> - <tr v-for="item in table" :key="index"> - <td> - <span>{{ item.id }}</span> - </td> - <td colspan="2"> - <span>{{ item.equipment_name }}</span> - </td> - <td> - <span>{{ item.type }}</span><br> - </td> - <td colspan="2"> - <span>{{ item.factory_number }}</span> - </td> - <td colspan="2"> - <span>{{ item.validity }}</span> - </td> - </tr> - - </table> - </div> - </div> - </div> - </div> - </div> + <div class="content-wrapper"> + <div class="content-main"> + <div class="cover"> + <div class="cover-top"> + <div> + <div style="height: 30px; line-height: 30px;">鎶ュ憡缂栧彿锛歿{reportData.rcode}}</div> + <div style="height: 30px; line-height: 30px;">Reference No锛歿{reportData.rcode}}</div> + </div> + </div> + <div class="title"> + <h1 style="text-align-last:justify ;">妫�楠屾姤鍛�</h1> + <h1>Test Report</h1> + </div> + <div class="cover-body"> + <div class="name"> + <div style="width:140px; text-align-last: justify;"> + <div>璇曟牱鍚嶇О</div> + <span style="font-size: 14px;">Name of Product</span> + </div> + <div class="line"> {{reportData.name}}</div> + </div> + <div class="name"> + <div style="width:140px; text-align-last: justify;"> + <div style="text-align-last: justify;">鍨嬪彿</div> + <span style="font-size: 14px;">Type and Size</span> + </div> + <div class="line"> {{reportData.specifications}}</div> + </div> + <div class="name"> + <div style="width:140px; text-align-last: justify;"> + <div>濮旀墭鍗曚綅</div> + <span style="font-size: 14px;display: block;margin: 10px 45px 0px;">Client</span> + </div> + <div class="line"> {{reportData.supplier}}</div> + </div> + <div class="name"> + <div style="width:140px; text-align-last: justify;"> + <div>妫�楠岀被鍒�</div> + <span style="font-size: 14px;">Kind of Test</span> + </div> + <div class="line"> {{reportData.type==1?'鎴愬搧妫�楠�':'濮旀墭妫�楠�'}}</div> + </div> + </div> + <div class="cover-footer"> + <span>{{enterprise.name}}</span><br> + <span style="font-size: 14px;">{{enterprise.nameEn}}</span> + </div> + </div> + <div class="pageOne"> + <div class="statement"> + <div> + <h2>澹版槑</h2> + </div> + <div style="text-align-last: center;"> + <h2 style="font-size: 14px;">Statement</h2> + </div> + </div> + <div class="statement-body"> + <div> + <span>1. 鏈楠屾姤鍛婏紙鍖呮嫭澶嶅嵃浠讹級鏈姞妫�娴嬩笓鐢ㄧ珷涓�寰嬫棤鏁堛��</span><br> + <span>This test report (including any duplicates) shall become effective only with pecial chapter for + testing on.</span> + </div> + <div> + <span>2. 鏈楠屾姤鍛婃棤缂栧啓銆佸鏍搞�佹壒鍑嗕汉绛剧珷鏃犳晥銆�</span><br> + <span>This test report shall become effective only with the signatures of compiler checker and + approver.</span> + </div> + <div> + <span>3. 鏈楠屾姤鍛婃秱鏀规棤鏁堛��</span><br> + <span>This test report will be invalid if altered.</span> + </div> + <div> + <span>4. 鏈楠屾姤鍛婁笉寰楅儴鍒嗗鍗般��</span><br> + <span>This test report mustn鈥檛 copy partly.</span> + </div> + <div> + <span>5. 閫佹牱濮旀墭妫�楠岋紝浠呭鏉ユ牱璐熻矗銆�</span><br> + <span>For the sample submitted by clients, the test result is valid only for these samples.</span> + </div> + <div> + <span>6. 鏍峰搧鍙婂鎵樺崟浣嶄负濮旀墭鏂硅嚜鍛藉悕銆�</span><br> + <span>Samples and consignor name for the principal.</span> + </div> + <div> + <span>7. 鏈楠屾姤鍛婁腑鑻辨枃鎻忚堪鏈夊啿绐佹椂锛屼互涓枃瑙i噴涓哄噯銆�</span><br> + <span>If the Chinese and English version of the test report have any conflict, the Chinese version should be + the standard for arbitrament.</span> + </div> + <div> + <span>8. 濮旀墭鏂瑰鏈楠屾姤鍛婅嫢鏈夊紓璁紝搴斾簬鏍峰搧淇濆瓨鏈熷唴鍚戞湰涓績鎻愬嚭锛岃仈绯荤數璇濓細{{enterprise.linkPhone}}</span><br> + <span>Clients who have any different ideas about this test report, may contract with Test Central within the + sample reservation time. Tel: {{enterprise.linkPhone}}</span> + </div> + <div> + <span>9. 鏈腑蹇冩牱鍝佽嚜鎶ュ憡鍙戦�佹棩璧凤紝涓�鑸繚瀛樹竴涓湀锛屼互澶囧楠屻��</span><br> + <span>The sample shall be reserved for one month beginning from the data when this test report is submitted + for examine or review.</span> + </div> + </div> + <div class="statement-footer"> + <div class="depart"> + <span>{{enterprise.name}}</span><br> + <span>{{enterprise.nameEn}}</span> + </div> + <div class="address"> + <span>鍦� 鍧�锛歿{enterprise.address}}</span><br> + <span>Address: {{enterprise.addressEn}}</span> + </div> + <div class="zipcode">閭斂缂栫爜Zip Code锛歿{enterprise.code}}</div> + <div class="tel">鐢� 璇漈el锛歿{enterprise.linkPhone}}</div> + <div class="email">閭� 绠盓-mail锛歿{enterprise.email}}</div> + </div> + </div> + <div class="pageTwo"> + <div class="header" style="line-height: 10px;"> + <div style="width: 350px;margin: 0 auto; text-align-last: justify;"> + <h2 style="font-size: 18px;">{{enterprise.name}}</h2> + </div> + <div style="width: 500px; margin: 0 auto;text-align-last: justify;"> + <h2 style="font-size: 14px;">{{enterprise.nameEn}}</h2> + </div> + <div style="width: 120px;margin: 0 auto;text-align-last: justify;"> + <h2 style="font-size: 18px;">妫�娴嬫姤鍛�</h2> + </div> + <div style="width: 100px; margin: 0 auto;text-align-last: justify;"> + <h2 style="font-size: 14px;">Test Report</h2> + </div> + </div> + <div class="table"> + <div class="table-header"> + <div> + <span>鎶ュ憡缂栧彿锛歿{reportData.rcode}}</span><br> + <span>Reference No锛歿{reportData.rcode}}</span> + </div> + <div> + <span>绗�1椤靛叡2椤�</span><br> + <span>Page 1 of 2</span> + </div> + </div> + <div class="table-body"> + <table width="100%" border="1" cellspacing="0" style="text-align: center;"> + <tr> + <td><span>璇曟牱鍚嶇О</span><br> + <span>Name of product</span> + </td> + <td colspan="2">{{reportData.name}}</td> + <td> + <span>瑙勬牸鍨嬪彿</span><br> + <span>Type and size</span> + </td> + <td colspan="2">{{reportData.specifications}}</td> + </tr> + <tr> + <td> + <span>鏍峰搧鏁伴噺</span><br> + <span>Test item</span> + </td> + <td colspan="2">{{reportData.num}}</td> + <td> + <span>妫�楠岄」鐩�</span><br> + <span>Test item</span> + </td> + <td colspan="2">{{reData.productNames}}</td> + </tr> + <tr> + <td> + <span>鏉ユ牱鏂瑰紡</span><br> + <span>Delivering method</span> + </td> + <td colspan="2"></td> + <td> + <span>妫�楠岀被鍨�</span><br> + <span>Type of test</span> + </td> + <td colspan="2"></td> + </tr> + <tr> + <td> + <span>鏍峰搧鐘舵��</span><br> + <span>Sample discription</span> + </td> + <td colspan="2"></td> + <td> + <span>鐢熶骇鍗曚綅</span><br> + <span>Producer</span> + </td> + <td colspan="2"></td> + </tr> + <tr> + <td> + <span>鏀舵牱鏃堕棿</span><br> + <span>Received date</span> + </td> + <td colspan="2"></td> + <td> + <span>妫�楠屾棩鏈�</span><br> + <span>Test date</span> + </td> + <td colspan="2"></td> + </tr> + <tr> + <td> + <span>濮旀墭浜�</span><br> + <span>Consignor</span> + </td> + <td colspan="2"></td> + <td> + <span>鐢佃瘽</span><br> + <span>Tel</span> + </td> + <td colspan="2"></td> + </tr> + <tr> + <td> + <span>濮旀墭鍗曚綅</span><br> + <span>Client</span> + </td> + <td colspan="5"></td> + </tr> + <tr> + <td> + <span>濮旀墭鍗曚綅鍦板潃</span><br> + <span>Address</span> + </td> + <td colspan="5"></td> + </tr> + <tr> + <td> + <span>妫�楠岀幆澧�</span><br> + <span>Test environment</span> + </td> + <td colspan="5"></td> + </tr> + <tr> + <td> + <span>妫�楠屼緷鎹�</span><br> + <span>Test standard</span> + </td> + <td colspan="5"></td> + </tr> + <tr> + <td style="height: 180px;"> + <span>缁撹</span><br> + <span>Conclusion </span> + </td> + <td colspan="5"> + <div style="height: 120px;"></div> + <div style="height: 60px;margin-left: 250px;"> + <span>锛堟娴嬫姤鍛婁笓鐢ㄧ珷锛�</span><br> + <span>( SPECIFIC STAMP FOR TEST RTORT) </span><br> + <span>绛惧彂鏃ユ湡锛� 骞� 鏈� 鏃�</span><br> + <span>Date of issue: August 23, 2023</span> + </div> + </td> + </tr> + <tr> + <td> + <span>澶囨敞</span><br> + <span>Remark </span> + </td> + <td colspan="5"></td> + </tr> + <tr> + <td> + <span>缂栧埗</span><br> + <span>Preparer</span> + </td> + <td colspan="2"></td> + <td> + <span>妫�楠�</span><br> + <span>Tester</span> + </td> + <td colspan="2"></td> + </tr> + <tr> + <td> + <span>瀹℃牳</span><br> + <span>Checker </span> + </td> + <td colspan="2"></td> + <td> + <span>鎵瑰噯</span><br> + <span>Approver</span> + </td> + <td colspan="2"></td> + </tr> + </table> + </div> + </div> + </div> + <div class="pageThree"> + <div class="header" style="line-height: 10px;"> + <div style="width: 350px;margin: 0 auto; text-align-last: justify;"> + <h2 style="font-size: 18px;">姹熻嫃涓ぉ绉戞妧鑲′唤鏈夐檺鍏徃妫�娴嬩腑蹇�</h2> + </div> + <div style="width: 500px; margin: 0 auto;text-align-last: justify;"> + <h2 style="font-size: 14px;">TEST CENTER OF JIANGSU ZHONGTIAN TECHNOLOGY CO.,LTD</h2> + </div> + <div style="width: 120px;margin: 0 auto;text-align-last: justify;"> + <h2 style="font-size: 18px;">妫�娴嬫姤鍛�</h2> + </div> + <div style="width: 100px; margin: 0 auto;text-align-last: justify;"> + <h2 style="font-size: 14px;">Test Report</h2> + </div> + </div> + <div class="table"> + <div class="table-header"> + <div> + <span>鎶ュ憡缂栧彿锛�</span><br> + <span>Reference No锛�</span> + </div> + <div> + <span>绗�2椤靛叡2椤�</span><br> + <span>Page 2 of 2</span> + </div> + </div> + <div class="table-body"> + <table width="100%" border="1" cellspacing="0" style="text-align: center;"> + <tr> + <td colspan="4"> + <span>鏍峰搧缂栧彿</span><br> + <span>Sample No</span> + </td> + <td colspan="3"></td> + <td colspan="4"> + <span>瑙勬牸鍨嬪彿</span><br> + <span>Type</span> + </td> + <td colspan="3"></td> + </tr> + <tr> + <td> + <span>搴忓彿</span><br> + <span>No</span> + </td> + <td colspan="3"> + <span>妫�楠岄」鐩�</span><br> + <span>Test item</span> + </td> + <td> + <span>鍗曚綅</span><br> + <span>Unit</span> + </td> + <td colspan="3"> + <span>鏍囧噯瑕佹眰</span><br> + <span>Requirement</span> + </td> + <td colspan="3"> + <span>妫�楠岀粨鏋�</span><br> + <span>Test result</span> + </td> + <td> + <span>缁撹</span><br> + <span>Conclusion</span> + </td> + </tr> + <tr> + <td> + <span></span><br> + <span></span> + </td> + <td colspan="3"> + <span>鏍峰搧鏍囪瘑</span><br> + <span>Sample labeling</span> + </td> + <td> + <span></span><br> + <span>I</span> + </td> + <td colspan="3"> + <span></span><br> + <span></span> + </td> + <td colspan="3"> + <span></span><br> + <span></span> + </td> + <td> + <span></span><br> + <span></span> + </td> + </tr> + <tr v-for="(item, index) in resultTable" :key="index"> + <td> + <span>{{ item.id }}</span><br> + </td> + <td colspan="3"> + <span>{{ item.testitem }}</span><br> + <span>{{ item.testitem_engName }}</span> + </td> + <td> + <span>{{ item.unit }}</span> + </td> + <td colspan="3"> + <span>{{ item.requirement }}</span><br> + <span>{{ item.requirement_eng }}</span> + </td> + <td colspan="3"> + <span>{{ item.testresult }}</span><br> + <span>{{ item.testresult_engName }}</span> + </td> + <td> + <span>{{ item.conclusion }}</span> + </td> + </tr> + </table> + </div> + </div> + </div> + <div class="pageFour"> + <div class="page-header" style="display: flex;justify-content: space-between;font-size: 12px;"> + <div> + <span>鎶ュ憡缂栧彿锛�</span><br> + <span>Reference No锛�</span> + </div> + <div> + <span>闄勯〉</span><br> + <span>Appenfix</span> + </div> + </div> + <hr> + <div class="table"> + <div class="table-header"> + <div style="width: 200px; margin: 0 auto;text-align-last: justify;"> + <h2>妫�楠岃澶囦竴瑙堣〃</h2> + </div> + <div style="text-align-last: center;"> + <h2 style="font-size: 14px;">Equipment List</h2> + </div> + </div> + <div class="table-body"> + <table width="100%" border="1" cellspacing="0" style="text-align: center;"> + <thead> + <tr> + <td> + <span>搴忓彿</span><br> + <span>No</span> + </td> + <td colspan="2"> + <span>璁惧鍚嶇О</span><br> + <span>Equipment name</span> + </td> + <td> + <span>璁惧鍨嬪彿</span><br> + <span>type</span> + </td> + <td colspan="2"> + <span>缂栧彿</span><br> + <span>Factory number</span> + </td> + <td colspan="2"> + <span>鏍″噯鏈夋晥鏈�</span><br> + <span>Date of validity</span> + </td> + </tr> + </thead> + <tr v-for="(item, index) in table" :key="index"> + <td> + <span>{{ item.id }}</span> + </td> + <td colspan="2"> + <span>{{ item.equipment_name }}</span> + </td> + <td> + <span>{{ item.type }}</span><br> + </td> + <td colspan="2"> + <span>{{ item.factory_number }}</span> + </td> + <td colspan="2"> + <span>{{ item.validity }}</span> + </td> + </tr> + </table> + </div> + </div> + </div> + </div> + </div> </template> <script> -export default { - name:'TestReport', - props:["reportData"], - data(){ - return { - resultTable:[ - { - id: '1', - testitem: '鍘熷鎷変几', - testitem_engName: 'Primitive strength', - unit: 'MPa', - requirement: '鏈�灏�10.0', - requirement_eng: 'Minimun 10.0', - testresult: '', - testitem_engName: '' - } - ], - table:[{ - id: 1, - equipment_name: '鎷栨媺鏈�', - type: 1, - factory_number: 'Akjgfewof', - validity:'2023.8.25~2023.8.27' - }] - } - } -} + import { + get, + post, + wpost + } from "@/api/util/requestUtil.js" + export default { + name: 'TestReport', + props: ["reportData"], + data() { + return { + resultTable: [{ + id: '1', + testitem: '鍘熷鎷変几', + testitem_engName: 'Primitive strength', + unit: 'MPa', + requirement: '鏈�灏�10.0', + requirement_eng: 'Minimun 10.0', + testresult: '', + testitem_engName: '' + }], + table: [{ + id: 1, + equipment_name: '鎷栨媺鏈�', + type: 1, + factory_number: 'Akjgfewof', + validity: '2023.8.25~2023.8.27' + }], + enterprise: {}, + reData: { + productNames: null + } + } + }, + mounted() { + this.getEnterprise() + if (Object.keys(this.reportData).length > 0) { + this.reData.productNames = '' + this.reportData.products.forEach(a=>{ + this.reData.productNames += ("," + a.ipName) + }) + this.reData.productNames = this.reData.productNames.replace(',','') + } + }, + methods: { + getEnterprise() { + get("/report/getEnterprise").then(res => { + this.enterprise = res.data + }) + } + } + } </script> <style lang="scss" scoped> -.content-wrapper{ - // background-color: #f0f2f5; - // width: 100%; - // height: 100vh; - // overflow-y: auto; - .content-main{ - margin: -100px auto; - width: 90%; - .cover{ - margin: 80px 0px; - padding:0px 50px; - height: 1200px; - background-color: #fff; - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); - .cover-top{ - display: flex; - justify-content: end; - font-size: 20px; - margin-right: 50px; - padding-top: 50px; - // font-weight: bold; - } - .title{ - margin-top: 100px; - padding: 0px 220px; - text-align: center; - font-size: 25px; - } - .cover-body{ - font-size: 25px; - margin: 100px 80px; - .name{ - // background-color: #bfa; - display: flex; - justify-content: space-between; - margin-bottom: 20px; - .line{ - width: 500px; - border-bottom: solid 1px black; - text-align: center; - // height: 60px; - line-height: 60px; - } - } - } - .cover-footer{ - text-align: center; - margin-top: 200px; - span{ - font-size: 23px; - height: 40px; - line-height: 40px; - } - } - } - .pageOne{ - margin-top: -50px; - background-color: #fff; - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); - padding:50px 100px; - height: 1200px; - .statement{ - margin: 0 auto; - width: 100px; - text-align-last: justify; - } - .statement-body{ - line-height: 32px; - text-align: justify; - margin: 30px 0px; - font-size: 12px; - } - .statement-footer{ - line-height: 30px; - font-size: 12px; - } - } - .pageTwo{ - margin-top: 30px; - background-color: #fff; - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); - padding:50px 60px; - height: 1200px; - .table{ - margin-top: 20px; - .table-header{ - display: flex; - justify-content: space-between; - font-size: 14px; - line-height: 20px; - } - .table-body{ - font-size: 12px; - table td{ - width: 150px; - height: 52px; - } - } - } - } - .pageThree{ - margin-top: 30px; - background-color: #fff; - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); - padding:50px 60px; - height: 1200px; - .table{ - margin-top: 20px; - .table-header{ - display: flex; - justify-content: space-between; - font-size: 14px; - line-height: 20px; - } - .table-body{ - font-size: 12px; - table td{ - width: 8%; - height: 52px; - } - } - } - } - .pageFour{ - margin-top: 30px; - background-color: #fff; - box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); - padding:50px 60px; - height: 1200px; - .table{ - margin-top: 50px; - .table-header{ - line-height: 20px; - } - .table-body{ - margin-top: 20px; - font-size: 12px; - table td{ - width: 80px; - height: 52px; - } - } - } - } - - } -} + .content-wrapper { + .content-main { + margin: -100px auto; + width: 90%; + + .cover { + margin: 80px 0px; + padding: 0px 50px; + height: 1200px; + background-color: #fff; + box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); + + .cover-top { + display: flex; + justify-content: end; + font-size: 20px; + margin-right: 50px; + padding-top: 50px; + // font-weight: bold; + } + + .title { + margin-top: 100px; + padding: 0px 220px; + text-align: center; + font-size: 25px; + } + + .cover-body { + font-size: 25px; + margin: 100px 80px; + + .name { + // background-color: #bfa; + display: flex; + justify-content: space-between; + margin-bottom: 20px; + + .line { + width: 500px; + border-bottom: solid 1px black; + text-align: center; + // height: 60px; + line-height: 60px; + } + } + } + + .cover-footer { + text-align: center; + margin-top: 200px; + + span { + font-size: 23px; + height: 40px; + line-height: 40px; + } + } + } + + .pageOne { + margin-top: -50px; + background-color: #fff; + box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); + padding: 50px 100px; + height: 1200px; + + .statement { + margin: 0 auto; + width: 100px; + text-align-last: justify; + } + + .statement-body { + line-height: 32px; + text-align: justify; + margin: 30px 0px; + font-size: 12px; + } + + .statement-footer { + line-height: 30px; + font-size: 12px; + } + } + + .pageTwo { + margin-top: 30px; + background-color: #fff; + box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); + padding: 50px 60px; + height: 1200px; + + .table { + margin-top: 20px; + + .table-header { + display: flex; + justify-content: space-between; + font-size: 14px; + line-height: 20px; + } + + .table-body { + font-size: 12px; + + table td { + width: 150px; + height: 52px; + } + } + } + } + + .pageThree { + margin-top: 30px; + background-color: #fff; + box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); + padding: 50px 60px; + height: 1200px; + + .table { + margin-top: 20px; + + .table-header { + display: flex; + justify-content: space-between; + font-size: 14px; + line-height: 20px; + } + + .table-body { + font-size: 12px; + + table td { + width: 8%; + height: 52px; + } + } + } + } + + .pageFour { + margin-top: 30px; + background-color: #fff; + box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.2); + padding: 50px 60px; + height: 1200px; + + .table { + margin-top: 50px; + + .table-header { + line-height: 20px; + } + + .table-body { + margin-top: 20px; + font-size: 12px; + + table td { + width: 80px; + height: 52px; + } + } + } + } + + } + } </style> \ No newline at end of file diff --git a/src/views/experiment/checkTheReport/index.vue b/src/views/experiment/checkTheReport/index.vue index 253340f..1d97b93 100644 --- a/src/views/experiment/checkTheReport/index.vue +++ b/src/views/experiment/checkTheReport/index.vue @@ -1,136 +1,92 @@ <template> - <div class="content-main"> - <div class="top-bar"> - <el-form ref="form" :inline="true" :model="searchData" label-position="left"> - <el-form-item label="鏍峰搧缂栧彿:"> - <el-input - v-model="searchData.sample_code" - class="input-form" - placeholder="璇疯緭鍏ユ牱鍝佺紪鍙�" - @keyup.enter.native="getData" - /> - </el-form-item> - <el-form-item label="鎶ュ憡鍗曞彿:"> - <el-input - v-model="searchData.reportCode" - class="input-form" - placeholder="璇疯緭鍏ユ姤鍛婂崟鍙�" - /> - </el-form-item> - <el-form-item label="鐢宠鍗曞彿:"> - <el-input - v-model="searchData.application_code" - class="input-form" - placeholder="璇疯緭鍏ョ敵璇峰崟鍙�" - /> - </el-form-item> - <el-form-item> - <el-button type="primary" @click="getData()">鏌ヨ</el-button> - <el-button type="primary" plain @click="resetData()">閲嶇疆</el-button> - </el-form-item> - </el-form> - <el-form> - <el-button @click="exportToPDF" class="rightBtn" type="primary" icon="el-icon-document" - >瀵煎嚭鎶ュ憡</el-button - > - </el-form> - </div> - <div class="library-table"> - <div class="table-header"> - <div class="search-bar"> - <el-radio-group v-model="checkStatus" @change="handleRadioChange"> - <el-radio-button>鍏ㄩ儴</el-radio-button> - <el-radio-button label="0">寰呮彁浜�</el-radio-button> - <el-radio-button label="1">寰呭鏍�</el-radio-button> - <el-radio-button label="2">寰呯瀛�</el-radio-button> - <el-radio-button label="3">宸插畬鎴�</el-radio-button> - </el-radio-group> - - <el-checkbox v-model="checked" style="margin-left: 20px" - >浠呯湅鎴戠殑</el-checkbox - > - </div> - </div> - <el-dialog - top="10vh" - title="鎶ュ憡棰勮" - :visible.sync="dialogVisible" - width="60%"> - <span slot="footer" class="dialog-footer"> - <el-button type="primary" @click="printFun()">鎵撳嵃</el-button> - </span> - <div class="printStyle"> - <Preview id="printRaw" :reportData="reportData" v-if="reportType===0"></Preview> - <TestReport ref="testreport" id="printFinished" :reportData="reportData" v-else></TestReport> - </div> - </el-dialog> - <div class="table-box"> - <el-table - ref="reportTable" - :max-height="800" - :cell-style="{ textAlign: 'center' }" - :header-cell-style="{ + <div class="content-main"> + <div class="top-bar"> + <el-form ref="form" :inline="true" :model="searchData" label-position="left"> + <el-form-item label="鏍峰搧缂栧彿:"> + <el-input v-model="searchData.sample_code" class="input-form" placeholder="璇疯緭鍏ユ牱鍝佺紪鍙�" + @keyup.enter.native="getData" /> + </el-form-item> + <el-form-item label="鎶ュ憡鍗曞彿:"> + <el-input v-model="searchData.reportCode" class="input-form" placeholder="璇疯緭鍏ユ姤鍛婂崟鍙�" /> + </el-form-item> + <el-form-item label="鐢宠鍗曞彿:"> + <el-input v-model="searchData.application_code" class="input-form" placeholder="璇疯緭鍏ョ敵璇峰崟鍙�" /> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="getData()">鏌ヨ</el-button> + <el-button type="primary" plain @click="resetData()">閲嶇疆</el-button> + </el-form-item> + </el-form> + <el-form> + <el-button @click="exportToPDF" class="rightBtn" type="primary" icon="el-icon-document">瀵煎嚭鎶ュ憡</el-button> + </el-form> + </div> + <div class="library-table"> + <div class="table-header"> + <div class="search-bar"> + <el-radio-group v-model="checkStatus" @change="handleRadioChange"> + <el-radio-button>鍏ㄩ儴</el-radio-button> + <el-radio-button label="0">寰呮彁浜�</el-radio-button> + <el-radio-button label="1">寰呭鏍�</el-radio-button> + <el-radio-button label="2">寰呯瀛�</el-radio-button> + <el-radio-button label="3">宸插畬鎴�</el-radio-button> + </el-radio-group> + <el-checkbox v-model="checked" style="margin-left: 20px">浠呯湅鎴戠殑</el-checkbox> + </div> + </div> + <el-dialog top="10vh" title="鎶ュ憡棰勮" :visible.sync="dialogVisible" width="60%"> + <span slot="footer" class="dialog-footer"> + <el-button type="primary" @click="printFun()">鎵撳嵃</el-button> + </span> + <div class="printStyle" v-if="dialogVisible"> + <Preview id="printRaw" :reportData="reportData" v-if="reportType===0"></Preview> + <TestReport ref="testreport" id="printFinished" :reportData="reportData" v-else></TestReport> + </div> + </el-dialog> + <div class="table-box"> + <el-table ref="reportTable" :max-height="800" :cell-style="{ textAlign: 'center' }" :header-cell-style="{ border: '0px', background: '#f5f7fa', color: '#606266', boxShadow: 'inset 0 1px 0 #ebeef5', textAlign: 'center', - }" - :data="reportTable" - @selection-change="handleSelectionChange" - style="width: 100%" - > - <el-table-column type="selection" label="" min-width="5%" /> - - <el-table-column - prop="materialCode" - label="鏍峰搧缂栧彿" - sortable - min-width="10%" - > - <template slot-scope="scope"> - <span style="color: #409eff;"> - {{ scope.row.materialCode }} - </span> - </template></el-table-column - > - <el-table-column - prop="reportCode" - label="鎶ュ憡鍗曞彿" - sortable - min-width="10%" - > - <template slot-scope="scope"> - <span style="color: #409eff;"> - {{ scope.row.reportCode }} - </span> - </template></el-table-column - > - <el-table-column - prop="inspectionCode" - label="鐢宠鍗曞彿" - sortable - min-width="10%" - > - <template slot-scope="scope"> - <span style="color: #409eff;"> - {{ scope.row.inspectionCode }} - </span> - </template></el-table-column - > - <el-table-column prop="approver" label="瀹℃壒浜�" min-width="8%"> - <template slot-scope="scope"> - <span> - <el-tag v-if="scope.row.approver!=null && scope.row.approver!=''" type="info" icon="el-icon-user"> - <i class="el-icon-user">{{ scope.row.approver }}</i> - </el-tag> - </span> - </template> - </el-table-column> - <el-table-column prop="status" label="瀹℃壒鐘舵��" min-width="8%"> - <template slot-scope="scope"> - <span> - <el-tag type="info">{{ + }" :data="reportTable" @selection-change="handleSelectionChange" style="width: 100%"> + <el-table-column type="selection" min-width="5%" /> + <el-table-column prop="type" label="鎶ュ憡绫诲瀷" min-width="5%"> + <template slot-scope="scope"> + <el-tag>{{scope.row.type == 0?'鍘熸潗鏂欐姤鍛�':scope.row.type==1?'鎴愬搧鎶ュ憡':'濮旀墭鎶ュ憡'}}</el-tag> + </template></el-table-column> + <el-table-column prop="materialCode" label="鏍峰搧缂栧彿" sortable min-width="10%"> + <template slot-scope="scope"> + <span style="color: #409eff;"> + {{ scope.row.materialCode }} + </span> + </template></el-table-column> + <el-table-column prop="reportCode" label="鎶ュ憡鍗曞彿" sortable min-width="10%"> + <template slot-scope="scope"> + <span style="color: #409eff;"> + {{ scope.row.reportCode }} + </span> + </template></el-table-column> + <el-table-column prop="inspectionCode" label="鐢宠鍗曞彿" sortable min-width="10%"> + <template slot-scope="scope"> + <span style="color: #409eff;"> + {{ scope.row.inspectionCode }} + </span> + </template></el-table-column> + <el-table-column prop="approver" label="瀹℃壒浜�" min-width="8%"> + <template slot-scope="scope"> + <span> + <el-tag v-if="scope.row.approver!=null && scope.row.approver!=''" type="info" icon="el-icon-user"> + <i class="el-icon-user">{{ scope.row.approver }}</i> + </el-tag> + </span> + </template> + </el-table-column> + <el-table-column prop="status" label="瀹℃壒鐘舵��" min-width="8%"> + <template slot-scope="scope"> + <span> + <el-tag type="info">{{ scope.row.status == 0 ? "寰呮彁浜�" : scope.row.status == 1 @@ -139,264 +95,247 @@ ? "浠g瀛�" : "宸插畬鎴�" }}</el-tag> - </span> - </template></el-table-column - > - <el-table-column prop="conclusion" label="妫�楠岀粨璁�" min-width="8%" /> - <el-table-column prop="name" label="缂栧埗浜�" min-width="8%"> - <template slot-scope="scope"> - <span> - <el-tag type="info" icon="el-icon-user"> - <i class="el-icon-user">{{ scope.row.name }}</i> - </el-tag> - </span> - </template> - </el-table-column> - <el-table-column label="鎿嶄綔" min-width="8%"> - <template slot-scope="scope"> - <el-button - type="text" - size="small" - @click="previewFun(scope.row)" - >鏌ョ湅鎶ュ憡</el-button - > - </template> - </el-table-column> - </el-table> - <!-- 鍒嗛〉鍣� --> - <div> - <el-pagination - :current-page="page" - :page-sizes="[10, 20, 30, 40]" - :page-size="pageSize" - layout="total, sizes, prev, pager, next, jumper" - :total="total" - @size-change="handleSizeChange" - @current-change="handleCurrentChange" - /> - </div> - </div> - </div> - <Preview ref="preview" id="printRaw" :reportData="reportData" v-show="false"></Preview> - <TestReport ref="testreport" id="printFinished" :reportData="reportData" v-show="false"></TestReport> - <el-dialog - title="瀵煎嚭pdf" - :visible.sync="dialogPdfVisible" - width="30%" - :before-close="handleClose"> - <span>纭畾寮�濮嬪鍑哄悧锛�</span> - <span slot="footer" class="dialog-footer"> - <el-button @click="dialogPdfVisible = false">鍙� 娑�</el-button> - <el-button type="primary" @click="confirmExport">纭� 瀹�</el-button> - </span> - </el-dialog> - </div> + </span> + </template></el-table-column> + <el-table-column prop="conclusion" label="妫�楠岀粨璁�" min-width="8%"> + <template slot-scope="scope"> + <span :style="`color: ${scope.row.conclusion=='鍚堟牸'?'#67c23a':'#f56c6c'}`">{{scope.row.conclusion}}</span> + </template> + </el-table-column> + <el-table-column prop="name" label="缂栧埗浜�" min-width="8%"> + <template slot-scope="scope"> + <span> + <el-tag type="info" icon="el-icon-user"> + <i class="el-icon-user">{{ scope.row.name }}</i> + </el-tag> + </span> + </template> + </el-table-column> + <el-table-column label="鎿嶄綔" min-width="8%"> + <template slot-scope="scope"> + <el-button type="text" size="small" @click="previewFun(scope.row)">鏌ョ湅鎶ュ憡</el-button> + </template> + </el-table-column> + </el-table> + <!-- 鍒嗛〉鍣� --> + <div> + <el-pagination :current-page="page" :page-sizes="[10, 20, 30, 40]" :page-size="pageSize" + layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" + @current-change="handleCurrentChange" /> + </div> + </div> + </div> + <Preview ref="preview" id="printRaw" :reportData="reportData" v-show="false"></Preview> + <TestReport ref="testreport" id="printFinished" :reportData="reportData" v-show="false"></TestReport> + <el-dialog title="瀵煎嚭pdf" :visible.sync="dialogPdfVisible" width="30%"> + <span>纭畾寮�濮嬪鍑哄悧锛�</span> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogPdfVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="confirmExport">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> </template> <script> -import { selectAllReport,getReportData } from "@/api/experiment/checkTheReport"; -import Preview from "@/components/experiment/checkTheReport/index.vue"; -import TestReport from "@/components/experiment/template_testReport/index.vue" -import PrintJS from 'print-js' -import html2pdf from 'html2pdf.js' + import { + selectAllReport, + getReportData + } from "@/api/experiment/checkTheReport"; + import Preview from "@/components/experiment/checkTheReport/index.vue"; + import TestReport from "@/components/experiment/template_testReport/index.vue" + import PrintJS from 'print-js' + import html2pdf from 'html2pdf.js' -export default { - data() { - return { - reportData: [], - reportType: 0, - searchData:{ - sample_code:'', - reportCode:'', - application_code: '' - }, - checkStatus: undefined, - reportTable: [ - { - materialCode:'SN23-0517001', - reportCode: 'SN23-0517001', - inspectionCode: 'SN23-0517001', - approver:'榛勫皬鏄�', - status: '', - conclusion: 1, - name: '榛勫皬鏄�' - }, - { - materialCode:'SN23-0517001', - reportCode: 'SN23-0517001', - inspectionCode: 'SN23-0517001', - approver:'榛勫皬鏄�', - status: '', - conclusion: 1, - name: '榛勫皬鏄�' - } - ], - page: 1, - total: 0, - pageSize: 10, - checked: true, - dialogVisible: false, - dialogPdfVisible: false, - selectedRows: [] - }; - }, - created() { - // this.getData(); - }, - mounted(){ - }, - components:{ - Preview, - TestReport - }, - methods: { - async queryReportByRCode(code){ - const resp = await getReportData({code:code}); - this.reportData = resp.data; - this.dialogVisible = true; - console.log(this.reportData); - }, - //鏌ョ湅鎶ュ憡鎸夐挳 - previewFun(row){ - console.log(row) - this.reportType = row.type; - this.queryReportByRCode(row.reportCode); - }, - handleSelectionChange(selection){ - this.selectedRows = selection; - }, - // 鎵归噺瀵煎嚭鎶ュ憡 - exportToPDF() { - this.dialogPdfVisible = true; - }, - // 纭瀵煎嚭妯℃�佹 - confirmExport(){ - this.selectedRows.forEach(async row => { - const element = document.getElementById('printFinished'); - console.log(element) - // 璁剧疆TestReport缁勪欢鐨剅eportData灞炴�т负褰撳墠琛岀殑鎶ュ憡鏁版嵁 - const resp = await getReportData({code:row.reportCode}); - this.$nextTick(() => { - this.$refs.testreport.reportData = resp.data; - html2pdf().from(element).save(`exported_${row.reportCode}.pdf`); - }); - }); - this.dialogPdfVisible = false; - this.selectedRows = []; - }, - //鎵撳嵃鎸夐挳 - printFun(){ - this.dialogVisible = false; - PrintJS({ - printable: this.reportType===0 ? "printRaw" : "printFinished", - type: "html", - // header: "鍘熸潗鏂欐娴嬫姤鍛�", - targetStyles: ["*"], - ignoreElements: ["no-ignore"], - }); - }, - // 鐘舵�佹寜閽� - handleRadioChange() { - this.getData(); - }, - // 姣忛〉鏉℃暟鏀瑰彉鏃惰Е鍙� 閫夋嫨涓�椤垫樉绀哄灏戣 - handleSizeChange(val) { - console.log(`姣忛〉 ${val} 鏉); - this.pageSize = val; - this.getData(); - }, - // 褰撳墠椤垫敼鍙樻椂瑙﹀彂 璺宠浆鍏朵粬椤� - handleCurrentChange(val) { - console.log(`褰撳墠椤�: ${val}`); - this.page = val; - this.getData(); - }, - // 閲嶇疆鎸夐挳 - resetData() { - this.searchData={ - sample_code:'', - reportCode:'', - application_code: '' - }, - this.page = 1; - this.pageSize = 10; - this.checkStatus = undefined; - this.getData(); - }, - // 鏌ヨ鍒楄〃 - async getData() { - const params = { - page: this.page, - pageSize: this.pageSize, - name: this.searchData.sample_code ? this.searchData.sample_code : undefined, - status: this.checkStatus ? this.checkStatus : undefined, - }; - const { data } = await selectAllReport(params); - this.reportTable = data.row; - console.log(data.row); - this.total = data.total; - }, - }, -}; + export default { + data() { + return { + reportData: [], + reportType: 0, + searchData: { + sample_code: '', + reportCode: '', + application_code: '' + }, + checkStatus: undefined, + reportTable: [], + page: 1, + total: 0, + pageSize: 10, + checked: true, + dialogVisible: false, + dialogPdfVisible: false, + selectedRows: [] + }; + }, + created() { + this.getData(); + }, + mounted() {}, + components: { + Preview, + TestReport + }, + methods: { + async queryReportByRCode(code) { + const resp = await getReportData({ + code: code + }); + this.reportData = resp.data; + this.dialogVisible = true; + console.log(this.reportData); + }, + //鏌ョ湅鎶ュ憡鎸夐挳 + previewFun(row) { + this.reportType = row.type; + this.queryReportByRCode(row.reportCode); + }, + handleSelectionChange(selection) { + this.selectedRows = selection; + }, + // 鎵归噺瀵煎嚭鎶ュ憡 + exportToPDF() { + this.dialogPdfVisible = true; + }, + // 纭瀵煎嚭妯℃�佹 + confirmExport() { + this.selectedRows.forEach(async row => { + const element = document.getElementById('printFinished'); + console.log(element) + // 璁剧疆TestReport缁勪欢鐨剅eportData灞炴�т负褰撳墠琛岀殑鎶ュ憡鏁版嵁 + const resp = await getReportData({ + code: row.reportCode + }); + this.$nextTick(() => { + this.$refs.testreport.reportData = resp.data; + html2pdf().from(element).save(`exported_${row.reportCode}.pdf`); + }); + }); + this.dialogPdfVisible = false; + this.selectedRows = []; + }, + //鎵撳嵃鎸夐挳 + printFun() { + this.dialogVisible = false; + PrintJS({ + printable: this.reportType === 0 ? "printRaw" : "printFinished", + type: "html", + // header: "鍘熸潗鏂欐娴嬫姤鍛�", + targetStyles: ["*"], + ignoreElements: ["no-ignore"], + }); + }, + // 鐘舵�佹寜閽� + handleRadioChange() { + this.getData(); + }, + // 姣忛〉鏉℃暟鏀瑰彉鏃惰Е鍙� 閫夋嫨涓�椤垫樉绀哄灏戣 + handleSizeChange(val) { + this.pageSize = val; + this.getData(); + }, + // 褰撳墠椤垫敼鍙樻椂瑙﹀彂 璺宠浆鍏朵粬椤� + handleCurrentChange(val) { + this.page = val; + this.getData(); + }, + // 閲嶇疆鎸夐挳 + resetData() { + this.searchData = { + sample_code: '', + reportCode: '', + application_code: '' + }, + this.page = 1; + this.pageSize = 10; + this.checkStatus = undefined; + this.getData(); + }, + // 鏌ヨ鍒楄〃 + async getData() { + const params = { + page: this.page, + pageSize: this.pageSize, + name: this.searchData.sample_code ? this.searchData.sample_code : undefined, + status: this.checkStatus ? this.checkStatus : undefined, + }; + const { + data + } = await selectAllReport(params); + this.reportTable = data.row; + this.total = data.total; + }, + }, + }; </script> <style lang="scss" scoped> -.top-bar { - margin: -25px -15px; - background: #fff; - display: flex; - justify-content: space-between; - padding: 5px 24px 0px 24px; - .input-form { - width: 250px; - margin-right: 30px; - } - .el-dropdown-link { - cursor: pointer; - color: #409eff; - } - .el-icon-arrow-down { - font-size: 12px; - } -} -.library-table { - height: 80vh; - overflow: scroll; - background-color: #fff; - flex: 1; - margin: 0px -15px; - margin-top: 40px; - display: flex; - flex-direction: column; - .table-header { - padding: 20px; - display: flex; - justify-content: space-between; - .el-form-item { - margin-bottom: 30px !important; - } - } - .table-box { - padding: 0px 20px; - margin-top: 0px; - flex: 1; - background: #fff; - display: flex; - flex-direction: column; - > div:nth-child(2) { - display: flex; - justify-content: end; - margin: 10px 0; - } - } - .printStyle{ - overflow: scroll; - height:500px; - .el-button{ - position: absolute; - top: 10vh; - left: 90%; - } - } -} -</style> + .top-bar { + margin: -25px -15px; + background: #fff; + display: flex; + justify-content: space-between; + padding: 5px 24px 0px 24px; + + .input-form { + width: 250px; + margin-right: 30px; + } + + .el-dropdown-link { + cursor: pointer; + color: #409eff; + } + + .el-icon-arrow-down { + font-size: 12px; + } + } + + .library-table { + height: 80vh; + overflow: scroll; + background-color: #fff; + flex: 1; + margin: 0px -15px; + margin-top: 40px; + display: flex; + flex-direction: column; + + .table-header { + padding: 20px; + display: flex; + justify-content: space-between; + + .el-form-item { + margin-bottom: 30px !important; + } + } + + .table-box { + padding: 0px 20px; + margin-top: 0px; + flex: 1; + background: #fff; + display: flex; + flex-direction: column; + + >div:nth-child(2) { + display: flex; + justify-content: end; + margin: 10px 0; + } + } + + .printStyle { + overflow: scroll; + height: 600px; + + .el-button { + position: absolute; + top: 10vh; + left: 90%; + } + } + } +</style> \ No newline at end of file diff --git a/src/views/experiment/inspectionApplication/index.vue b/src/views/experiment/inspectionApplication/index.vue index 841c940..7fcd26e 100644 --- a/src/views/experiment/inspectionApplication/index.vue +++ b/src/views/experiment/inspectionApplication/index.vue @@ -55,7 +55,7 @@ :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" :data="inspectionTable"> <el-table-column type="selection" min-width="30px" /> - <el-table-column prop="icode" label="鐢宠鍗曞彿" min-width="150px" /> + <el-table-column prop="icode" label="鐢宠鍗曞彿" min-width="160px" /> <el-table-column prop="type" label="妫�楠岀被鍨�" min-width="100px"> <template slot-scope="scope"> <div v-if="scope.row.type === 0"><el-tag type="success">鍘熸潗鏂欐楠�</el-tag></div> @@ -66,22 +66,22 @@ <el-table-column prop="formTime" label="鏉ユ枡鏃ユ湡" min-width="90px" /> <el-table-column prop="supplier" label="渚涘簲鍟嗗悕绉�" min-width="150px" show-overflow-tooltip /> <el-table-column prop="mcode" label="鍘熸潗鏂欑紪鐮�" min-width="170px" /> - <el-table-column prop="name" label="鍘熸潗鏂欏悕绉�" min-width="80px" /> + <el-table-column prop="name" label="鍘熸潗鏂欏悕绉�" min-width="90px" /> <el-table-column prop="specifications" label="瑙勬牸鍨嬪彿" min-width="160px" /> <el-table-column prop="unit" label="鍗曚綅" min-width="50px" /> <el-table-column prop="num" label="鏁伴噺" min-width="50px" /> - <el-table-column prop="createTime" label="鐧昏鏃ユ湡" min-width="80px" /> - <el-table-column prop="inspection_status" label="妫�楠岀粨鏋�" min-width="80px"> + <el-table-column prop="createTime" label="鐧昏鏃ユ湡" min-width="90px" /> + <el-table-column prop="inspection_status" label="妫�楠岀粨鏋�" min-width="95px"> <template slot-scope="scope"> - <el-tag class="tag" type="danger" disable-transitions + <el-tag class="tag" effect="dark" type="danger" disable-transitions v-if="scope.row.inspection_status == 0">涓嶅悎鏍�</el-tag> - <el-tag class="tag" type="success" disable-transitions + <el-tag class="tag" effect="dark" type="success" disable-transitions v-else-if="scope.row.inspection_status == 1">鍚堟牸</el-tag> </template> </el-table-column> <el-table-column prop="userName" label="鐧昏浜�" min-width="80px" /> - <el-table-column prop="checkdate" label="妫�楠屾棩鏈�" min-width="160px" /> - <el-table-column label="鎿嶄綔" min-width="150" fixed="right"> + <el-table-column prop="checkdate" label="妫�楠屾棩鏈�" min-width="170px" /> + <el-table-column label="鎿嶄綔" min-width="120" fixed="right"> <template slot-scope="scope"> <el-button type="text" size="small" @click="handleClick(scope.row)">鏌ョ湅</el-button> <el-button type="text" size="small" @click="delInspect(scope.row)">浣滃簾</el-button> @@ -298,7 +298,6 @@ </div> <span slot="footer" class="dialog-footer"> <el-button @click="checkTypeVisible = false">鍙� 娑�</el-button> - <!-- <el-button type="primary" @click="addInspection">纭� 瀹�</el-button> --> <el-button type="primary" @click="QUEding">纭� 瀹�</el-button> </span> </el-dialog> @@ -314,7 +313,7 @@ </el-select> </template> </el-card> - <el-table :data="tableData" style="width: 100%; margin-bottom: 20px" row-key="id" border height="calc(40vh)" + <el-table :data="tableData" style="width: 100%; margin-bottom: 20px;overflow-y: auto;" row-key="id" border height="40vh" default-expand-all ref="multipleTable" :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> <el-table-column type="index" width="50px" label="搴忓彿"></el-table-column> <el-table-column prop="name" label="椤圭洰鍚嶇О" sortable> @@ -331,9 +330,9 @@ </span> </el-dialog> <!-- 鍘熸潗鏂欐楠屾ā鎬佹 --> - <el-dialog title="鍘熸潗鏂欐楠�" :visible.sync="rawmaterialVisible" width="60%"> + <el-dialog title="鍘熸潗鏂欐楠�" :visible.sync="rawmaterialVisible" width="60%" top="100px"> <div class="table-box"> - <el-table ref="multipleTable" :max-height="800" :cell-style="{textAlign: 'center'}" + <el-table ref="multipleTable" :max-height="600" :cell-style="{textAlign: 'center'}" :header-cell-style="{border:'0px',background:'#f5f7fa',color:'#606266',boxShadow: 'inset 0 1px 0 #ebeef5',textAlign: 'center'}" :data="rawMaterialTable" style="width: 100%" @selection-change="handleSelectionChange"> <el-table-column type="selection" min-width="10%" /> diff --git a/src/views/experiment/planAssignments/plan.vue b/src/views/experiment/planAssignments/plan.vue index 8ec2c74..8d55e13 100644 --- a/src/views/experiment/planAssignments/plan.vue +++ b/src/views/experiment/planAssignments/plan.vue @@ -106,7 +106,7 @@ </el-table-column> <el-table-column label="鎿嶄綔" width="150"> <template slot-scope="scope"> - <el-button size="mini" type="primary" v-if="isIfReport(scope.row)" + <el-button size="mini" :disabled="!isIfReport(scope.row)" type="primary" v-if="scope.row.orderNum == '01'" @click="addReported(scope.row.id)">涓婃姤</el-button> <el-button size="mini" type="text" @click="openUpDia(scope.row)" v-if="scope.row.orderNum=='02'">鍒嗛厤</el-button> @@ -182,7 +182,7 @@ </el-input> </template> </el-table-column> - <el-table-column label="鎿嶄綔" width="60"> + <el-table-column label="鎿嶄綔" width="80"> <template slot-scope="scope"> <el-button size="mini" type="text" @click.native.prevent="deleteRow(scope.$index, upData.testValue)">鍒犻櫎</el-button> @@ -264,7 +264,7 @@ row.children.forEach(a => { if (a.testState != null && a.testState != undefined) count++ }) - return row.testState == undefined && row.orderNum == '01' && count == row + return row.testState == undefined && count == row .children.length }, openUpDia(row) { diff --git a/src/views/experiment/reportAuditing/index.vue b/src/views/experiment/reportAuditing/index.vue index 4386859..cfe3239 100644 --- a/src/views/experiment/reportAuditing/index.vue +++ b/src/views/experiment/reportAuditing/index.vue @@ -24,13 +24,6 @@ </el-dropdown> </el-form> </div> - - - - - - - <div class="library-table"> <div class="table-header"> <div class="search-bar"> @@ -156,14 +149,11 @@ pageSize: 8, checkskipvisible: false, form:{}, - // handleClose:{}, formLabelWidth: '120px', checked:{}, usertt:[], Auditconclusion:{}, tableRow: {}, - - }; }, created() { -- Gitblit v1.9.3