From bd08b30389140909ae7c27223dc1a33bad04da83 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 06 六月 2025 10:35:04 +0800 Subject: [PATCH] 1、实现数据加工程序确认表以及刀具清单打印功能(未联调后端数据) 2、终端故障报修页面开发完成并联调 3、调整终端首页样式 4、增加系统页面访问终端页面的岗位限制功能(登录用户必须为操作工) --- src/permission.js | 4 src/components/layouts/TerminalLayout.vue | 40 +-- src/assets/terminal/call.svg | 1 src/assets/terminal/passRate.svg | 1 src/assets/terminal/fault.svg | 1 src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue | 209 ++++++++++++++++ src/views/dnc/base/modules/TerminalIndex/ReportEquipmentFault.vue | 182 ++++++++++++- src/assets/terminal/spotCheck.svg | 1 src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue | 28 + src/assets/terminal/work.svg | 1 src/views/dnc/base/TerminalIndex.vue | 251 ++++++++++++------ src/assets/terminal/close.svg | 1 src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardPrintModal.vue | 6 src/assets/terminal/maintenance.svg | 1 14 files changed, 591 insertions(+), 136 deletions(-) diff --git a/src/assets/terminal/call.svg b/src/assets/terminal/call.svg new file mode 100644 index 0000000..4723c34 --- /dev/null +++ b/src/assets/terminal/call.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749006270893" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="57981" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M785.723077 673.476923c0-1.969231-1.969231-3.938462-1.969231-3.938461l-59.076923-66.953847v-108.307692c0-98.461538-68.923077-183.138462-165.415385-204.8 3.938462-7.876923 7.876923-17.723077 7.876924-27.569231 0-29.538462-25.6-53.169231-57.107693-53.16923S452.923077 232.369231 452.923077 261.907692c0 9.846154 3.938462 19.692308 7.876923 27.569231-98.461538 21.661538-165.415385 106.338462-165.415385 204.8v108.307692L236.307692 669.538462l-1.96923 1.96923c-3.938462 5.907692-3.938462 11.815385-3.938462 21.661539 0 27.569231 21.661538 49.230769 51.2 49.230769h133.907692c9.846154 43.323077 51.2 74.830769 96.492308 74.830769 47.261538 0 86.646154-29.538462 96.492308-74.830769h133.907692c27.569231 0 51.2-21.661538 51.2-49.230769-3.938462-7.876923-5.907692-13.784615-7.876923-19.692308zM512 246.153846c11.815385 0 19.692308 7.876923 19.692308 17.723077s-7.876923 17.723077-19.692308 17.723077-19.692308-7.876923-19.692308-17.723077 7.876923-17.723077 19.692308-17.723077z m0 533.661539c-23.630769 0-43.323077-13.784615-49.230769-33.476923h100.430769c-9.846154 19.692308-29.538462 33.476923-51.2 33.476923z m222.523077-104.369231c0 7.876923-5.907692 13.784615-13.784615 13.784615H303.261538c-7.876923 0-13.784615-7.876923-13.784615-13.784615v-3.938462l55.138462-61.046154c1.969231-1.969231 1.969231-7.876923 1.96923-9.846153v-104.369231c0-88.615385 72.861538-159.507692 163.446154-159.507692s163.446154 70.892308 163.446154 159.507692v104.369231c1.969231 3.938462 1.969231 7.876923 5.907692 9.846153l55.138462 61.046154v3.938462z" p-id="57982" fill="#ffffff"></path><path d="M923.569231 29.538462H100.430769c-39.384615 0-72.861538 33.476923-72.861538 72.861538V925.538462c0 39.384615 33.476923 72.861538 72.861538 72.861538h823.138462c39.384615 0 72.861538-33.476923 72.861538-72.861538V102.4c0-41.353846-31.507692-72.861538-72.861538-72.861538z m-5.907693 846.76923c0 21.661538-17.723077 41.353846-41.353846 41.353846H149.661538c-21.661538 0-41.353846-17.723077-41.353846-41.353846V149.661538c0-21.661538 17.723077-41.353846 41.353846-41.353846h726.646154c21.661538 0 41.353846 17.723077 41.353846 41.353846v726.646154z" p-id="57983" fill="#ffffff"></path></svg> \ No newline at end of file diff --git a/src/assets/terminal/close.svg b/src/assets/terminal/close.svg new file mode 100644 index 0000000..de4e162 --- /dev/null +++ b/src/assets/terminal/close.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749015960411" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="67039" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M128 109.714286h768c30.281143 0 54.857143 30.72 54.857143 68.608v226.377143c0 37.888-24.576 68.608-54.857143 68.608H128a49.956571 49.956571 0 0 1-38.765714-20.114286A78.116571 78.116571 0 0 1 73.142857 404.699429V178.249143c0-37.814857 24.576-68.534857 54.857143-68.534857z m81.92 135.021714a24.576 24.576 0 0 0-19.163429 9.874286 38.473143 38.473143 0 0 0-7.899428 23.917714c0 8.923429 2.852571 17.554286 7.899428 23.844571 5.12 6.290286 11.922286 9.874286 19.090286 9.874286h165.449143a24.576 24.576 0 0 0 19.017143-9.874286 38.473143 38.473143 0 0 0 7.972571-23.917714 38.473143 38.473143 0 0 0-7.899428-23.844571 24.576 24.576 0 0 0-19.090286-9.874286H209.846857zM128 582.948571h485.376A292.352 292.352 0 0 0 512 804.571429c0 53.174857 14.482286 103.131429 39.643429 146.285714H128a50.029714 50.029714 0 0 1-38.765714-20.114286 78.116571 78.116571 0 0 1-16.091429-48.420571V651.556571c0-37.888 24.576-68.534857 54.857143-68.534857z m81.92 165.449143a24.576 24.576 0 0 0-19.163429 9.874286 38.473143 38.473143 0 0 0-7.899428 23.844571c0 8.923429 2.852571 17.554286 7.899428 23.844572 5.12 6.363429 11.922286 9.947429 19.090286 9.947428h165.449143a24.576 24.576 0 0 0 19.017143-9.947428 38.473143 38.473143 0 0 0 7.972571-23.844572 38.473143 38.473143 0 0 0-7.899428-23.844571 24.576 24.576 0 0 0-19.090286-9.947429H209.846857z" p-id="67040" fill="#ffffff"></path><path d="M797.988571 585.142857A212.699429 212.699429 0 0 0 585.142857 797.988571a213.723429 213.723429 0 0 0 212.845714 212.772572 213.723429 213.723429 0 0 0 212.772572-212.845714c0-116.809143-94.354286-212.772571-212.845714-212.772572z m111.908572 266.020572l-54.857143 54.857142-54.857143-54.857142-54.857143 54.857142-54.857143-54.857142 54.857143-54.857143-54.857143-54.857143 54.857143-54.857143 54.857143 54.857143 54.857143-54.857143 54.857143 54.857143-54.857143 54.857143 54.857143 54.857143z" p-id="67041" fill="#ffffff"></path></svg> \ No newline at end of file diff --git a/src/assets/terminal/fault.svg b/src/assets/terminal/fault.svg new file mode 100644 index 0000000..b66ac7c --- /dev/null +++ b/src/assets/terminal/fault.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749005493852" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11672" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M316.928 564.736h153.088c20.992 0 38.4 16.896 38.4 38.4s-16.896 38.4-38.4 38.4H316.928c-20.992 0-38.4-16.896-38.4-38.4s17.408-38.4 38.4-38.4z m467.968 25.088v344.576c0 20.992-16.896 38.4-38.4 38.4-20.992 0-38.4-16.896-38.4-38.4v-344.576c0-20.992 16.896-38.4 38.4-38.4 20.992 0 38.4 17.408 38.4 38.4z m-210.944 134.144h344.576c20.992 0 38.4 16.896 38.4 38.4s-16.896 38.4-38.4 38.4h-344.576c-20.992 0-38.4-16.896-38.4-38.4s17.408-38.4 38.4-38.4zM316.928 393.216h344.576c20.992 0 38.4 16.896 38.4 38.4 0 20.992-16.896 38.4-38.4 38.4H316.928c-20.992 0-38.4-16.896-38.4-38.4 0.512-20.992 17.408-38.4 38.4-38.4zM873.472 128h-96.768v76.8c0 22.528-18.432 40.96-40.96 40.96H281.088c-22.528 0-40.96-18.432-40.96-40.96V128H143.36v765.952h370.176v76.8H143.36c-42.496 0-76.8-34.304-76.8-76.8V128c0-42.496 34.304-76.8 76.8-76.8h730.112c42.496 0 76.8 34.304 76.8 76.8v385.536h-76.8V128z" fill="#ffffff" p-id="11673"></path></svg> \ No newline at end of file diff --git a/src/assets/terminal/maintenance.svg b/src/assets/terminal/maintenance.svg new file mode 100644 index 0000000..1167291 --- /dev/null +++ b/src/assets/terminal/maintenance.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749021394243" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="74746" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M759.025791 192.027246c0 35.310345-31.750248 63.936427-70.838655 63.936426h-425.031928c-39.088406 0-70.838655-28.626082-70.838655-63.936426v-21.360579H97.865013v767.963672h377.806159c23.97616 0 44.101604 16.202072 46.862495 37.707961l0.363275 5.013197c0 21.578544-17.945793 39.814957-41.703988 42.357883l-5.521782 0.29062H74.252129c-36.472825 0-66.987938-25.065986-70.47538-57.833404L3.413474 959.990918V149.306088c0-32.912729 27.754222-60.52164 64.009082-63.645807l6.829573-0.29062H192.316553V63.936427C192.316553 28.626082 224.066801 0 263.155208 0h425.031928c39.088406 0 70.838655 28.626082 70.838655 63.936427v21.433234h118.064425c36.472825 0 66.987938 24.99333 70.475379 57.833404l0.363275 6.103023v277.324251c0 22.595714-19.544203 41.268057-44.464878 42.575848-24.920675 1.307791-46.717185-15.112246-49.696041-37.562651l-0.29062-5.013197V170.739322h-94.45154v21.360579zM664.574251 85.369661H286.768093v85.297006h377.806158V85.297006z" p-id="74747" fill="#ffffff"></path><path d="M269.839471 682.666667h42.357882q42.357883 0 42.357883 42.648503t-42.357883 42.648502h-42.357882q-42.430538 0-42.430538-42.648502t42.430538-42.648503zM269.839471 426.630339h339.008372q42.430538 0 42.430538 42.721158 0 42.648503-42.430538 42.648503H269.839471q-42.430538 0-42.430538-42.648503 0-42.721158 42.430538-42.721158z" p-id="74748" fill="#ffffff"></path><path d="M1020.583901 841.127288c0 100.990492-81.373634 182.872712-181.637576 182.872712S657.308748 942.117781 657.308748 841.127288q0-87.331347 135.864907-269.840783 21.215269-28.480772 45.77267-59.286505 24.5574 30.805733 45.772669 59.286505Q1020.583901 753.795942 1020.583901 841.127288z m-290.620122 0q0-61.248191 108.982546-209.755073 108.982546 148.506882 108.982545 209.755073 0 45.772669-32.113523 78.104158-31.895558 32.113523-76.869022 32.113523-45.046119 0-76.869023-32.113523Q729.963779 886.899957 729.963779 841.127288z" p-id="74749" fill="#ffffff"></path></svg> \ No newline at end of file diff --git a/src/assets/terminal/passRate.svg b/src/assets/terminal/passRate.svg new file mode 100644 index 0000000..9c56a75 --- /dev/null +++ b/src/assets/terminal/passRate.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749006119453" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="49554" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M544 972.8v-44.8H115.2c-19.2 0-32-12.8-32-32V102.4c0-19.2 12.8-32 32-32h723.2c19.2 0 32 12.8 32 32v403.2h64V102.4c0-51.2-44.8-96-96-96H115.2C64 6.4 19.2 51.2 19.2 102.4V896c0 51.2 44.8 96 96 96h435.2c0-6.4-6.4-12.8-6.4-19.2z" p-id="49555" fill="#ffffff"></path><path d="M876.8 505.6c0 19.2 12.8 32 32 32s32-12.8 32-32-12.8-32-32-32-32 12.8-32 32zM518.4 960c0 19.2 12.8 32 32 32s32-12.8 32-32-12.8-32-32-32-32 12.8-32 32zM358.4 697.6H198.4c-19.2 0-32-12.8-32-32s12.8-32 32-32h160c19.2 0 32 12.8 32 32s-12.8 32-32 32z m371.2-332.8H569.6c-19.2 0-32-12.8-32-32s12.8-32 32-32h160c19.2 0 32 12.8 32 32s-19.2 32-32 32z m64-128h-256c-19.2 0-32-12.8-32-32s12.8-32 32-32h256c19.2 0 32 12.8 32 32s-19.2 32-32 32z m-352 588.8h-256c-19.2 0-32-12.8-32-32s12.8-32 32-32h256c19.2 0 32 12.8 32 32s-19.2 32-32 32z m345.6-243.2c-108.8 0-198.4 89.6-198.4 198.4s89.6 198.4 198.4 198.4 198.4-89.6 198.4-198.4-83.2-198.4-198.4-198.4z m147.2 134.4L755.2 896c-6.4 6.4-12.8 6.4-12.8 0l-25.6-25.6-76.8-76.8c-6.4-6.4-6.4-12.8 0-12.8l25.6-25.6c6.4-6.4 12.8-6.4 12.8 0l70.4 70.4 147.2-147.2c6.4-6.4 12.8-6.4 12.8 0l25.6 25.6c6.4 0 6.4 6.4 0 12.8z m-268.8-224h-64c-19.2 0-32-12.8-32-32s12.8-32 32-32h64c19.2 0 32 12.8 32 32s-12.8 32-32 32zM371.2 345.6c12.8-6.4 19.2 0 25.6 0 12.8 0 19.2 0 32-6.4 19.2-6.4 32-12.8 38.4-25.6 12.8-12.8 19.2-19.2 19.2-32s0-19.2-12.8-25.6h-6.4l-25.6 6.4h-12.8l-19.2-25.6 12.8-32 38.4-12.8c6.4 0 12.8 0 12.8-6.4v-12.8c0-6.4-6.4-6.4-6.4-6.4-12.8-6.4-25.6-12.8-38.4-12.8-12.8-6.4-32-6.4-44.8 0-25.6 6.4-38.4 19.2-57.6 44.8 0 6.4-12.8 38.4-6.4 64l-12.8 12.8-44.8-44.8v-6.4c0-6.4 0-6.4 6.4-6.4v-6.4c0-6.4 6.4-6.4 12.8-12.8h19.2c6.4 0 12.8 0 19.2-6.4 0 0 0-12.8-6.4-19.2-19.2-6.4-32-19.2-51.2-19.2-12.8 0-25.6 0-44.8 19.2h-12.8c-6.4-6.4-19.2 0-19.2 0l-38.4 32s-6.4 6.4-6.4 12.8 0 6.4 6.4 12.8h-12.8v6.4H128l-19.2 19.2s-6.4 6.4-6.4 12.8 0 6.4 6.4 12.8l51.2 51.2s6.4 6.4 12.8 6.4 6.4 0 12.8-6.4l6.4-19.2c6.4 0 6.4-6.4 6.4-12.8h6.4l44.8 44.8L147.2 448s-6.4 6.4-6.4 12.8 0 6.4 6.4 12.8l38.4 38.4s12.8 0 19.2-6.4l102.4-102.4L416 512c6.4 6.4 6.4 6.4 12.8 6.4s6.4 0 12.8-6.4l38.4-38.4s6.4-6.4 6.4-12.8 0-6.4-6.4-12.8L371.2 345.6zM217.6 256c0-6.4 0-6.4-6.4-6.4H192c-6.4 0-6.4 6.4-6.4 6.4-6.4 6.4-6.4 12.8-6.4 19.2v6.4h-6.4L147.2 256h6.4c12.8 0 12.8-6.4 19.2-6.4h6.4s0-6.4 6.4-6.4v-6.4c0-6.4 6.4-6.4 0-12.8 0 0 0-6.4-6.4-6.4l12.8-19.2c6.4 6.4 19.2 6.4 19.2 0h12.8c6.4 0 6.4 0 12.8-6.4s19.2-6.4 19.2-12.8c0 6.4-6.4 12.8-12.8 25.6v12.8l-12.8 6.4v6.4c0 6.4 0 12.8 6.4 19.2l51.2 51.2-19.2 12.8-51.2-57.6zM192 460.8L179.2 448l172.8-172.8c6.4-6.4 6.4-12.8 6.4-19.2v-6.4c-6.4-19.2 0-32 0-44.8 6.4-12.8 19.2-19.2 32-25.6l-6.4 6.4-12.8 51.2c0 6.4 0 12.8 6.4 19.2l38.4 38.4c6.4 6.4 6.4 6.4 12.8 6.4h-32c-6.4 0-12.8 0-19.2-6.4-6.4-6.4-12.8 0-19.2 0L192 460.8z m236.8 0L326.4 364.8l19.2-19.2L441.6 448l-12.8 12.8z" p-id="49556" fill="#ffffff"></path></svg> \ No newline at end of file diff --git a/src/assets/terminal/spotCheck.svg b/src/assets/terminal/spotCheck.svg new file mode 100644 index 0000000..7432b59 --- /dev/null +++ b/src/assets/terminal/spotCheck.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749005921157" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="30430" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M791.23684 1023.988284H232.710439A230.479197 230.479197 0 0 1 0.018225 791.230982V232.70458A230.479197 230.479197 0 0 1 232.710439 0.012367h558.526401a230.479197 230.479197 0 0 1 232.692213 232.692213v558.526402a230.479197 230.479197 0 0 1-232.692213 232.757302zM232.710439 93.089252A143.195208 143.195208 0 0 0 93.09511 232.70458v558.526402A143.195208 143.195208 0 0 0 232.710439 930.781221h558.526401a143.195208 143.195208 0 0 0 139.550239-139.550239V232.70458a143.195208 143.195208 0 0 0-139.550239-139.615328H232.710439z" p-id="30431" fill="#ffffff"></path><path d="M791.23684 372.384997h-186.153771a46.538443 46.538443 0 1 1 0-93.076885h186.153771a46.538443 46.538443 0 1 1 0 93.076885z m0 372.372631h-186.153771a46.538443 46.538443 0 1 1 0-93.076886h186.153771a46.538443 46.538443 0 1 1 0 93.076886zM456.094964 260.692735L297.864258 437.538817a34.88756 34.88756 0 0 1-55.846131 0l-46.538443-55.846131a79.538429 79.538429 0 0 1 0-65.088731 34.88756 34.88756 0 0 1 55.846132 0l27.923065 27.923065 130.177462-148.923016a42.307675 42.307675 0 0 1 46.538443 0 55.455599 55.455599 0 0 1 0.130178 65.088731z m-130.177463 577.141778a139.615328 139.615328 0 1 1 139.615329-139.615328 143.195208 143.195208 0 0 1-139.745506 139.615328z m0-186.153771a46.538443 46.538443 0 1 0 46.538443 46.538443 43.999982 43.999982 0 0 0-46.66862-46.538443z" p-id="30432" fill="#ffffff"></path></svg> \ No newline at end of file diff --git a/src/assets/terminal/work.svg b/src/assets/terminal/work.svg new file mode 100644 index 0000000..e969d16 --- /dev/null +++ b/src/assets/terminal/work.svg @@ -0,0 +1 @@ +<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749004629199" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5303" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M870.182019 205.005158h-107.493073a255.935888 255.935888 0 0 0-501.63434 0H153.561533a153.561533 153.561533 0 0 0-153.561533 153.561533v511.871776a153.561533 153.561533 0 0 0 153.561533 153.561533h716.620486a153.561533 153.561533 0 0 0 153.561533-153.561533V358.566691a153.561533 153.561533 0 0 0-153.561533-153.561533z m-358.310243-102.374355a153.561533 153.561533 0 0 1 144.347841 102.374355H368.547679A153.561533 153.561533 0 0 1 511.871776 102.630803zM153.561533 307.379513h716.620486a51.187178 51.187178 0 0 1 51.187178 51.187178v102.374355H102.374355V358.566691a51.187178 51.187178 0 0 1 51.187178-51.187178z m716.620486 614.246132H153.561533a51.187178 51.187178 0 0 1-51.187178-51.187178v-307.123066h358.310244v51.187178a51.187178 51.187178 0 0 0 102.374355 0v-51.187178h358.310243v307.123066a51.187178 51.187178 0 0 1-51.187178 51.187178z" fill="#ffffff" p-id="5304"></path></svg> \ No newline at end of file diff --git a/src/components/layouts/TerminalLayout.vue b/src/components/layouts/TerminalLayout.vue index 01ef462..585a051 100644 --- a/src/components/layouts/TerminalLayout.vue +++ b/src/components/layouts/TerminalLayout.vue @@ -2,17 +2,17 @@ <div class="full-screen-container"> <router-view class="router-view"> <template v-slot:function> - <a-space> - <button class="button" @click="handleLogout">鍒囨崲鐢ㄦ埛</button> - <button class="button" @click="backToIndex">杩斿洖涓婚〉</button> - <button class="button">璁剧疆</button> + <a-space class="common-button-container"> + <a-button type="primary" @click="handleLogout" size="large">鍒囨崲鐢ㄦ埛</a-button> + <a-button @click="backToIndex" size="large">杩斿洖涓婚〉</a-button> + <!--<button class="button">璁剧疆</button>--> </a-space> </template> </router-view> <div class="footer" v-if="$route.path!=='/terminal/login'"> - <div>濮撳悕锛歿{nickname()}}</div> - <div>褰撳墠鏃堕棿锛歿{currentDateAndTime}}</div> + <!--<div>濮撳悕锛歿{nickname()}}</div>--> + <div>{{currentDateAndTime}}</div> </div> </div> </template> @@ -90,37 +90,25 @@ display: flex; flex-direction: column; height: 100vh; + background-color: #fff; .router-view { flex: 1; - padding: 24px; + padding: 1.25vw; display: flex; flex-direction: column; } } - .button { - font-weight: bold; - padding: 15px 15px; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 5px; - cursor: pointer; - box-shadow: 6px 6px 16px rgba(0, 0, 0, 0.2), - -6px -6px 16px rgba(255, 255, 255, 0.8), - inset 0 0 0 transparent; - - &:hover { - box-shadow: 0 0 0 transparent, - inset 6px 6px 12px rgba(0, 0, 0, 0.2), - inset -6px -6px 12px rgba(255, 255, 255, 0.8); - } + .common-button-container { + margin-bottom: 1vw; } .footer { - font-size: 16px; - padding: 12px 24px; + font-size: 0.8vw; + padding: 0.5vw 0; color: #000; - display: flex; - justify-content: space-between; + /*font-weight: bold;*/ + text-align: center; } </style> \ No newline at end of file diff --git a/src/permission.js b/src/permission.js index ddd93e2..5aaa878 100644 --- a/src/permission.js +++ b/src/permission.js @@ -72,7 +72,9 @@ } else { // 璺宠浆鍒扮洰鐨勮矾鐢� - if (to.path !== '/terminal/login' && from.path !== '/' && from.path.split('/') [1] !== 'terminal' && to.path.split('/')[1] === 'terminal') { + const postCode = store.getters.userInfo.post + // 濡傛灉闈炴搷浣滃伐鐢ㄦ埛涓旇璁块棶鎿嶄綔宸ラ〉闈㈠垯蹇呴』鍏堣烦杞嚦缁堢鐧诲綍椤电櫥褰曞矖浣嶄负鎿嶄綔宸ョ敤鎴锋柟鍙闂� + if (to.path !== '/terminal/login' && to.path.split('/')[1] === 'terminal' && postCode !== 'PCR0001') { next({ path: '/terminal/login' }) } else { next() diff --git a/src/views/dnc/base/TerminalIndex.vue b/src/views/dnc/base/TerminalIndex.vue index 0289c4e..900da25 100644 --- a/src/views/dnc/base/TerminalIndex.vue +++ b/src/views/dnc/base/TerminalIndex.vue @@ -1,109 +1,194 @@ <template> - <div class="page-view-container"> + <div> + <div class="page-header"> + <div>鐜板満鎯呭喌涓婃姤骞冲彴</div> + <span class="username">娆㈣繋鎮紝{{nickname()}}</span> + </div> <slot name="function"/> - <div class="header-container">鐜板満鎯呭喌涓婃姤骞冲彴</div> <div class="content-container"> <a-row> - <a-col :span="8"> - <div class="button" @click="navigateTo('work','涓婄彮')">涓婄彮</div> - </a-col> - <a-col :span="8"> - <div class="button">涓嬬彮</div> - </a-col> - <a-col :span="8"> - <div class="button" @click="navigateTo('fault','璁惧鏁呴殰')">璁惧鏁呴殰</div> - </a-col> + <template v-for="(item,index) in buttonList"> + <a-col :span="6" v-if="index<4"> + <div :class="'button button'+(index+1)" @click="navigateTo(item)"> + <img :src="require(`@/assets/terminal/${item.routePath}.svg`)"/> + <div>{{item.label}}</div> + </div> + </a-col> + </template> </a-row> + <a-row> - <a-col :span="8"> - <div class="button" @click="navigateTo('close','鍋滄満涓婃姤')">鍋滄満涓婃姤</div> - </a-col> - <a-col :span="8"> - <div class="button" @click="navigateTo('spotCheck','鐐规')">鐐规</div> - </a-col> - <a-col :span="8"> - <div class="button">鍚堟牸鐜�</div> - </a-col> - </a-row> - <a-row> - <a-col :span="8"> - <div class="button">绋嬪簭鍛煎彨</div> - </a-col> - <a-col :span="8"> - <div class="button">寮�宸ュ畬宸�</div> - </a-col> - <a-col :span="8"> - <div class="button">绋嬪簭鍥炰紶</div> - </a-col> + <template v-for="(item,index) in buttonList"> + <a-col :span="6" v-if="index>=4"> + <div :class="'button button'+(index+1)" @click="navigateTo(item)"> + <img :src="require(`@/assets/terminal/${item.routePath}.svg`)"/> + <div>{{item.label}}</div> + </div> + </a-col> + </template> </a-row> </div> </div> </template> <script> + import { mapGetters } from 'vuex' + export default { name: 'TerminalIndex', + data() { + return { + buttonList: [ + { + label: '涓婁笅鐝�', + routePath: 'work', + isOpenNewPage: false + }, + { + label: '鏁呴殰鎶ヤ慨', + routePath: 'fault', + isOpenNewPage: false + }, + { + label: '鍋滄満涓婃姤', + routePath: 'close', + isOpenNewPage: false + }, + { + label: '鐐规', + routePath: 'spotCheck', + isOpenNewPage: true + }, + { + label: '鍚堟牸鐜�', + routePath: 'passRate', + isOpenNewPage: false + }, + { + label: '绋嬪簭鍛煎彨', + routePath: 'call', + isOpenNewPage: false + }, + { + label: '浜屼繚', + routePath: 'maintenance', + isOpenNewPage: true + }, + { + label: '涓変繚', + routePath: 'maintenance', + isOpenNewPage: true + } + ] + } + }, methods: { - navigateTo(url, projectTitle) { - this.$router.push('/terminal/' + url) - document.title = 'MDC鏅烘収杞﹂棿-' + projectTitle + ...mapGetters(['nickname']), + + navigateTo(record) { + if (!record.isOpenNewPage) this.$router.push('/terminal/' + record.routePath) + else { + window.open(this.$router.resolve('/flowable/workflow/FlowTodo').href, '_blank') + return + } + document.title = record.label + '-MDC鏅烘収杞﹂棿' } } } </script> <style scoped lang="less"> - .page-view-container { - background: linear-gradient(to bottom, #fff -15%, #000 55%,); + .page-header { + font-size: 2vw; + color: #000; + display: flex; + justify-content: space-between; + margin-bottom: 1vw; - .header-container { - font-size: 50px; - color: #eee; - text-align: center; - height: 15%; - display: flex; - justify-content: center; - align-items: flex-end; - -webkit-align-items: flex-end; - } - - .content-container { - flex: 1; - display: flex; - flex-direction: column; - padding: 3% 10%; - - .ant-row { - flex: 1; - - .ant-col { - height: 100%; - display: flex; - justify-content: center; - align-items: center; - - .button { - width: 250px; - height: 125px; - display: flex; - justify-content: center; - align-items: center; - background-color: #E3F2D9; - font-size: 45px; - border: 2px solid #33579D; - box-shadow: inset -5px 5px 12px rgba(0, 0, 0, 0.6); - cursor: pointer; - transition: all .1s ease-in-out; - - &:hover { - transform: scale(1.05); - } - } - } - /*display: flex;*/ - /*flex-direction: column;*/ - } + span { + font-size: 1.3vw; + color: #999; } } + .content-container { + flex: 1; + display: flex; + flex-direction: column; + padding: 3% 10%; + + .ant-row { + flex: 1; + + .ant-col { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + + .button { + width: 9.63vw; + height: 9.38vw; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + font-size: 1.3vw; + color: #fff; + border-radius: 1vw; + cursor: pointer; + transition: all .1s ease-in-out; + + img { + width: 2.6vw; + margin-bottom: 0.8vw; + } + + &:hover { + transform: scale(1.05); + } + + &.button1 { + background: linear-gradient(top, #5ADEAD, #3BC3A6); + background: -webkit-linear-gradient(top, #5ADEAD, #3BC3A6); + } + + &.button2 { + background: linear-gradient(top, #76A9FA, #5B8CF3); + background: -webkit-linear-gradient(top, #76A9FA, #5B8CF3); + } + + &.button3 { + background: linear-gradient(top, #FAB976, #FB9557); + background: -webkit-linear-gradient(top, #FAB976, #FB9557); + } + + &.button4 { + background: linear-gradient(top, #5FC2F9, #45A4F4); + background: -webkit-linear-gradient(top, #5FC2F9, #45A4F4); + } + + &.button5 { + background: linear-gradient(top, #62F2EA, #55D6CE); + background: -webkit-linear-gradient(top, #62F2EA, #55D6CE); + } + + &.button6 { + background: linear-gradient(top, #91A0F5, #6D7CF7); + background: -webkit-linear-gradient(top, #91A0F5, #6D7CF7); + } + + &.button7 { + background: linear-gradient(top, #FF6A5A, #DB5A50); + background: -webkit-linear-gradient(top, #FF6A5A, #DB5A50); + } + + &.button8 { + background: linear-gradient(top, #FFF248, #EADE46); + background: -webkit-linear-gradient(top, #FFF248, #EADE46); + } + } + } + } + } </style> \ No newline at end of file diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue index bb6f69f..13e58f0 100644 --- a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue +++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardBatchList.vue @@ -71,7 +71,11 @@ <a-divider type="vertical" /> - <a @click="handleOpenPrintModal(record)">鐢熸垚鏁版帶鍔犲伐绋嬪簭纭琛�</a> + <a @click="handleOpenPrintGuideCardModal(record)">鐢熸垚鏁版帶鍔犲伐绋嬪簭纭琛�</a> + + <a-divider type="vertical" /> + + <a @click="handleOpenPrintKnifeListModal(record)">鐢熸垚鍒�鍏锋竻鍗�</a> <a-divider type="vertical" /> @@ -91,6 +95,8 @@ <GuideCardBatchModalDrawer ref="modalEditForm" @ok="modalFormOk"></GuideCardBatchModalDrawer> <guide-card-print-modal ref="guideCardPrintModal"/> + + <knife-list-print-modal ref="knifeListPrintModal"/> </a-card> </template> @@ -103,6 +109,7 @@ import GuideCardBatchModalDrawer from './GuideCardBatchModal.Style#Drawer.vue' import { getAction } from '@api/manage' import GuideCardPrintModal from './GuideCardPrintModal' + import KnifeListPrintModal from './KnifeListPrintModal' export default { name: 'GuideCardBatchList', @@ -116,6 +123,7 @@ } }, components: { + KnifeListPrintModal, GuideCardPrintModal, GuideCardBatchModal, GuideCardBatchModalDrawer @@ -165,7 +173,7 @@ dataIndex: 'action', align:"center", fixed:"right", - width:147, + width:500, scopedSlots: { customRender: 'action' } } ], @@ -247,9 +255,23 @@ this.$refs.modalEditForm.disableSubmit = false; }, - handleOpenPrintModal(record){ + /** + * 鎺у埗鏁版嵁鍔犲伐绋嬪簭纭琛ㄥ脊绐楀脊鍑� + * @param record 鎵规鍒楄〃琛岃褰� + */ + handleOpenPrintGuideCardModal(record){ this.$refs.guideCardPrintModal.visible = true this.$refs.guideCardPrintModal.detail = Object.assign({},record) + }, + + + /** + * 鎺у埗鏁版嵁鍔犲伐绋嬪簭纭琛ㄥ脊绐楀脊鍑� + * @param record 鎵规鍒楄〃琛岃褰� + */ + handleOpenPrintKnifeListModal(record){ + this.$refs.knifeListPrintModal.visible = true + this.$refs.knifeListPrintModal.detail = Object.assign({},record) } } } diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardPrintModal.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardPrintModal.vue index 023ea3d..ca84eb8 100644 --- a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardPrintModal.vue +++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/GuideCardPrintModal.vue @@ -1,7 +1,7 @@ <template> - <a-modal title="鏁版帶鍔犲伐鍔犲伐绋嬪簭纭琛�" :width="1000" :visible="visible" @cancel="handleCancel" centered> + <a-modal :width="1000" :visible="visible" @cancel="handleCancel" centered> - <div id="table"> + <div id="table1"> <div class="table-header"> <h3>鏁版帶鍔犲伐绋嬪簭纭琛�</h3> <div> @@ -70,7 +70,7 @@ </div> <template slot="footer"> - <a-button type="primary" v-print="'#table'">鎵撳嵃</a-button> + <a-button type="primary" v-print="'#table1'">鎵撳嵃</a-button> </template> </a-modal> </template> diff --git a/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue new file mode 100644 index 0000000..173cc7f --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/GuideCardBatch/KnifeListPrintModal.vue @@ -0,0 +1,209 @@ +<template> + <a-modal :width="1000" :visible="visible" @cancel="handleCancel" centered> + + <div id="table2"> + <div class="table-header"> + <h3>鍒�鍏锋竻鍗�</h3> + <div> + <div>鍗曚綅锛�<span>鏈哄姞涓績</span></div> + <div>缂栧彿锛�<span>25-C140-PST-293</span></div> + </div> + </div> + + <table border="1"> + <tr> + <th colspan="2">绋嬪簭澶栭儴鏂囦欢鍚�</th> + <td colspan="9">TY9F-11-2507-002-TY9F1W0130-30-3</td> + </tr> + + <tr> + <th colspan="2">闆朵欢鍥惧彿</th> + <td colspan="5">TY9F-11-2507-002-TY9F1W0130</td> + <th>闆朵欢鍚嶇О</th> + <td colspan="3">杞帴澶�</td> + </tr> + + <tr> + <th colspan="2">闆朵欢鏉愭枡</th> + <td colspan="3">閽㈡</td> + <th colspan="2">澶瑰叿</th> + <td colspan="4">{{detail.fixtureInformation}}</td> + </tr> + + <tr> + <th colspan="2">宸ュ簭锛堝伐姝ュ彿锛�</th> + <td>30-3</td> + <th colspan="2">鍔犲伐鎵规</th> + <td colspan="2">S2501</td> + <th>鍔犲伐鏁伴噺</th> + <td>20</td> + <th>鍔犲伐璁惧</th> + <td>3140123</td> + </tr> + + <tr> + <th colspan="2">鍒�浣嶅彿</th> + <th>鍒�鍏锋弿杩�</th> + <th colspan="2">鏈�鐭伐浣滈暱搴�</th> + <th colspan="2">鍒�鍏风紪鍙�</th> + <th>瑙勬牸</th> + <th>搴撲綅</th> + <th colspan="2">澶囨敞</th> + </tr> + + <tr v-for="item in knifeList" :key="item.knifeId"> + <td colspan="2">{{item.knifeNo}}</td> + <td>{{item.knifeDescription}}</td> + <td colspan="2">{{item.minWorkLength}}</td> + <td colspan="2">{{item.knifeId}}</td> + <td>{{item.spec}}</td> + <td>{{item.position}}</td> + <td colspan="2">{{item.remark}}</td> + </tr> + </table> + </div> + + <template slot="footer"> + <a-button type="primary" v-print="'#table2'">鎵撳嵃</a-button> + </template> + </a-modal> +</template> + +<script> + export default { + name: 'KnifeListPrintModal', + data() { + return { + visible: false, + detail: {}, + knifeList: [ + { + knifeNo: '1', + knifeDescription: '8E', + minWorkLength: '35', + knifeId: 'Q20110211', + spec: '', + position: '05070201', + remark: '' + }, + { + knifeNo: '2', + knifeDescription: '6E', + minWorkLength: '35', + knifeId: 'Q20110212', + spec: '', + position: '05070202', + remark: '' + }, + { + knifeNo: '5', + knifeDescription: '6R', + minWorkLength: '20', + knifeId: 'Q20110213', + spec: '', + position: '05070203', + remark: '' + }, + { + knifeNo: '1', + knifeDescription: '8E', + minWorkLength: '35', + knifeId: 'Q20110214', + spec: '', + position: '05070201', + remark: '' + }, + { + knifeNo: '2', + knifeDescription: '6E', + minWorkLength: '35', + knifeId: 'Q20110215', + spec: '', + position: '05070202', + remark: '' + }, + { + knifeNo: '5', + knifeDescription: '6R', + minWorkLength: '20', + knifeId: 'Q20110216', + spec: '', + position: '05070203', + remark: '' + }, + { + knifeNo: '1', + knifeDescription: '8E', + minWorkLength: '35', + knifeId: 'Q20110217', + spec: '', + position: '05070201', + remark: '' + }, + { + knifeNo: '2', + knifeDescription: '6E', + minWorkLength: '35', + knifeId: 'Q20110218', + spec: '', + position: '05070202', + remark: '' + }, + { + knifeNo: '5', + knifeDescription: '6R', + minWorkLength: '20', + knifeId: 'Q20110219', + spec: '', + position: '05070203', + remark: '' + }, + { + knifeNo: '1', + knifeDescription: '8E', + minWorkLength: '35', + knifeId: 'Q20110220', + spec: '', + position: '05070201', + remark: '' + } + ] + } + }, + methods: { + getImageUrl(imgSrcSuffix) { + return `${window._CONFIG['domianURL']}/${imgSrcSuffix}` + }, + + handleCancel() { + this.visible = false + } + } + } +</script> + +<style scopedl lang="less"> + .table-header { + display: flex; + flex-direction: column; + align-items: center; + + > div { + width: 100%; + display: flex; + justify-content: space-between; + padding: 10px 5px; + } + } + + table { + width: 100%; + table-layout: fixed; + text-align: center; + font-size: 12px; + + th, td { + padding: 10px 5px; + } + } +</style> \ No newline at end of file diff --git a/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentFault.vue b/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentFault.vue index 8514266..21dadd0 100644 --- a/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentFault.vue +++ b/src/views/dnc/base/modules/TerminalIndex/ReportEquipmentFault.vue @@ -3,22 +3,70 @@ <slot name="function"/> <div class="content-container"> - <a-form-model ref="form" :model="model" :rules="validateRules" :labelCol="{span:10}" :wrapperCol="{span:6}"> - <a-form-model-item label="璁惧鍚嶇О" prop="equipmentId"> - <a-select placeholder="璇烽�夋嫨璁惧" v-model="model.equipmentId"></a-select> - </a-form-model-item> - <a-form-model-item label="鏁呴殰鍘熷洜" prop="faultReasonId"> - <a-select placeholder="璇烽�夋嫨鏁呴殰鍘熷洜" v-model="model.faultReasonId"></a-select> - </a-form-model-item> - <a-form-model-item label="鏁呴殰鎻忚堪" prop="faultDescription"> - <a-textarea placeholder="璇疯緭鍏ユ晠闅滄弿杩�" v-model="model.faultDescription"/> - </a-form-model-item> + <a-form-model ref="form" :model="model" :rules="validateRules" :labelCol="labelCol" :wrapperCol="wrapperCol"> + <a-row> + <a-col :span="12"> + <a-form-model-item prop="equipmentId" label="璁惧缂栧彿"> + <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="model.equipmentId"/> + </a-form-model-item> + </a-col> + + <a-col :span="12"> + <a-form-model-item prop="faultName" label="鏁呴殰绠�绉�"> + <a-select placeholder="璇烽�夋嫨鏁呴殰绠�绉�" v-model="model.faultName" @change="handleFaultNameChange"> + <a-select-option v-for="item in faultReasonList" :key="item.faultName"> + {{ item.faultName }} + </a-select-option> + </a-select> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item label="鏁呴殰鍒嗙被"> + <a-input placeholder="璇疯緭鍏ユ晠闅滃垎绫�" v-model="model.faultType_dictText" readOnly/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item label="鏁呴殰鎻忚堪" prop="faultDescription"> + <a-textarea placeholder="璇疯緭鍏ユ晠闅滄弿杩�" v-model="model.faultDescription"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item prop="faultStartTime" label="鏁呴殰寮�濮嬫椂闂�"> + <a-date-picker showTime placeholder="璇烽�夋嫨鏁呴殰寮�濮嬫椂闂�" v-model="model.faultStartTime" + :allow-clear="false" value-format="YYYY-MM-DD HH:mm:ss" :disabledDate="disabledDate" + :disabledTime="disabledTime"/> + </a-form-model-item> + </a-col> + + <a-col :span="12"> + <a-form-model-item prop="breakdownFlag" label="鏄惁鍋滄満"> + <j-dict-select-tag v-model="model.breakdownFlag" dictCode="breakdown_flag" type="radio"/> + </a-form-model-item> + </a-col> + </a-row> + + <a-row> + <a-col :span="12"> + <a-form-model-item prop="imageFiles" label="鎶ヤ慨鍥剧墖"> + <lx-upload :returnUrl="false" :isMultiple="true" file-type="image" :number="3" + v-model="model.imageFilesResult"/> + </a-form-model-item> + </a-col> + <a-col :span="12"> + <a-form-model-item prop="remark" label="澶囨敞"> + <a-textarea placeholder="璇疯緭鍏ュ娉�" v-model="model.remark"/> + </a-form-model-item> + </a-col> + </a-row> <div style="text-align: center"> - <a-space> - <a-button @click="handleReportFault">鏁呴殰涓婃姤</a-button> - <a-button>鏁呴殰瑙i櫎</a-button> - </a-space> + <a-button type="primary" @click="handleReportFault" icon="alert" :loading="loading">鏁呴殰涓婃姤</a-button> </div> </a-form-model> </div> @@ -26,23 +74,113 @@ </template> <script> + import { getAction, postAction } from '@/api/manage' + import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import moment from 'moment' + export default { name: 'ReportEquipmentFault', + components: { LxSearchEquipmentSelect }, data() { return { - model: {}, + model: { + breakdownFlag: '1' + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 8 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 12 } + }, validateRules: { - equipmentId: [{ required: true, message: '璇烽�夋嫨璁惧锛�' }], - faultReasonId: [{ required: true, message: '璇烽�夋嫨鏁呴殰鍘熷洜锛�' }], - faultDescription: [{ required: true, message: '璇疯緭鍏ユ晠闅滄弿杩帮紒' }] + equipmentId: [{ required: true, message: '璇烽�夋嫨璁惧锛�', trigger: 'change' }], + faultReasonId: [{ required: true, message: '璇烽�夋嫨鏁呴殰鍘熷洜锛�', trigger: 'change' }], + faultDescription: [{ required: true, message: '璇疯緭鍏ユ晠闅滄弿杩帮紒', trigger: 'change' }] + }, + faultReasonList: [], + loading: false, + url: { + confirm: '/eam/eamReportRepair/add', + faultReasonList: '/eam/equipmentFaultReason/list' } } }, + created() { + this.getFaultReasonListByApi() + }, methods: { + // 璋冪敤鎺ュ彛鑾峰彇鏁呴殰鍘熷洜鍒楄〃 + getFaultReasonListByApi() { + const that = this + getAction(this.url.faultReasonList) + .then(res => { + that.faultReasonList = res.result.records + }) + }, + + /** + * 鏁呴殰绠�绉版敼鍙樻椂瑙﹀彂 + * @params value 鏀瑰彉鍚庣殑鍊� + */ + handleFaultNameChange(value) { + const faultReasonItem = this.faultReasonList.find(item => item.faultName === value) + this.model.faultType = faultReasonItem.faultCategory + this.model.faultType_dictText = faultReasonItem.faultCategory_dictText + this.model.faultDescription = faultReasonItem.faultDescription + }, + + /** + * 绂佺敤鏃ユ湡 + * @params current 琚鐢ㄧ殑鏃堕棿 + */ + disabledDate(current) { + // Can not select days after today + return current > moment().endOf('day') + }, + + /** + * 绂佺敤鏃ユ湡涓殑鏃堕棿 + * @returns {{disabledHours: (function(): Array), disabledMinutes: (function(): Array)}} + */ + disabledTime() { + function range(start, end) { + const result = [] + for (let i = start; i < end; i++) { + result.push(i) + } + return result + } + + return { + disabledHours: () => range(moment().hour() + 1, 24), + disabledMinutes: () => range(moment().minute() + 1, 60), + disabledSeconds: () => range(moment().second() + 1, 60) + } + }, + handleReportFault() { + const that = this this.$refs.form.validate(valid => { if (valid) { - + that.loading = true + postAction(that.url.confirm, this.model).then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + } + else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + } + }).finally(() => { + that.loading = false + }) } else { return false } @@ -60,7 +198,11 @@ align-items: center; /deep/ .ant-form { - width: 100%; + width: 75%; + + .ant-form-item { + margin-bottom: 12px; + } } } </style> \ No newline at end of file -- Gitblit v1.9.3