Sfoglia il codice sorgente

巡检功能更新

ellisran 4 giorni fa
parent
commit
473c1dcf56

File diff suppressed because it is too large
+ 2 - 2
app/view/dashboard/index.ejs


File diff suppressed because it is too large
+ 2 - 2
app/view/dashboard/workspace.ejs


+ 54 - 43
app/view/quality/inspection_information.ejs

@@ -282,49 +282,60 @@
                             <td width="30%" style="vertical-align: top">
                                 <div class="card">
                                     <ul class="list-group list-group-flush">
-                                            <% inspection.auditors2.forEach((item, idx) => { %>
-                                                <% if (idx === 0) { %>
-                                                    <li class="list-group-item d-flex justify-content-between align-items-center">
-                                                        <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
-                                                        <span class="text-muted">
-                                                            <% for (const u of item) { %>
-                                                                <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
-                                                            <% } %>
-                                                        </span>
-                                                        <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
-                                                    </li>
-                                                <% } else if(idx === inspection.auditors2.length -1 && idx !== 0) { %>
-                                                    <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
-                                                        <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
-                                                        <span class="text-muted">
-                                                            <% for (const u of item) { %>
-                                                                <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
-                                                            <% } %>
-                                                        </span>
-                                                        <div class="d-flex ml-auto">
-                                                            <% if (item[0].audit_type !== auditType.key.common) { %>
-                                                                <span class="badge badge-pill badge-<%-  auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
-                                                            <% } %>
-                                                            <span class="badge badge-light badge-pill"><small>终审</small></span>
-                                                        </div>
-                                                    </li>
-                                                <% } else {%>
-                                                    <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
-                                                        <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
-                                                        <span class="text-muted">
-                                                            <% for (const u of item) { %>
-                                                                <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
-                                                            <% } %>
-                                                        </span>
-                                                        <div class="d-flex ml-auto">
-                                                            <% if (item[0].audit_type !== auditType.key.common) { %>
-                                                                <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
-                                                            <% } %>
-                                                            <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
-                                                        </div>
-                                                    </li>
-                                                <% } %>
-                                            <% }) %>
+                                        <% inspection.auditors2.forEach((item, idx) => { %>
+                                            <% if (idx === 0) { %>
+                                                <li class="list-group-item d-flex justify-content-between align-items-center">
+                                                    <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
+                                                    <span class="text-muted">
+                                                        <% for (const u of item) { %>
+                                                            <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
+                                                        <% } %>
+                                                    </span>
+                                                    <span class="badge badge-light badge-pill ml-auto"><small>原报</small></span>
+                                                </li>
+                                            <% } else if(idx === inspection.auditors2.length -1 && idx !== 0) { %>
+                                                <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
+                                                    <span class="mr-1"><i class="fa <% if (inspection.rectification_uid && inspection.rectification_user) { %>fa-play-circle fa-rotate-90<% } else { %>fa-stop-circle<% } %>"></i></span>
+                                                    <span class="text-muted">
+                                                        <% for (const u of item) { %>
+                                                            <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
+                                                        <% } %>
+                                                    </span>
+                                                    <div class="d-flex ml-auto">
+                                                        <% if (item[0].audit_type !== auditType.key.common) { %>
+                                                            <span class="badge badge-pill badge-<%-  auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
+                                                        <% } %>
+                                                        <span class="badge badge-light badge-pill"><small>终审</small></span>
+                                                    </div>
+                                                </li>
+                                            <% } else {%>
+                                                <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
+                                                    <span class="mr-1"><i class="fa fa-chevron-circle-down"></i></span>
+                                                    <span class="text-muted">
+                                                        <% for (const u of item) { %>
+                                                            <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
+                                                        <% } %>
+                                                    </span>
+                                                    <div class="d-flex ml-auto">
+                                                        <% if (item[0].audit_type !== auditType.key.common) { %>
+                                                            <span class="badge badge-pill badge-<%- auditType.info[item[0].audit_type].class %> p-1"><small><%- auditType.info[item[0].audit_type].short %></small></span>
+                                                        <% } %>
+                                                        <span class="badge badge-light badge-pill"><small><%= ctx.helper.transFormToChinese(idx) %>审</small></span>
+                                                    </div>
+                                                </li>
+                                            <% } %>
+                                        <% }) %>
+                                        <% if (inspection.rectification_uid && inspection.rectification_user) { %>
+                                            <li class="list-group-item d-flex justify-content-between align-items-center">
+                                                <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
+                                                <span class="text-muted">
+                                                    <small class="d-inline-block text-dark mx-1" title="<%- inspection.rectification_user.role %>"><%- inspection.rectification_user.name %></small>
+                                                </span>
+                                                <div class="d-flex ml-auto">
+                                                    <span class="badge badge-light badge-pill"><small>整改</small></span>
+                                                </div>
+                                            </li>
+                                        <% } %>
                                         </ul>
                                     </div>
                                 </td>

+ 13 - 2
app/view/safe/inspection_information.ejs

@@ -285,7 +285,7 @@
                                             <% inspection.auditors2.forEach((item, idx) => { %>
                                                 <% if (idx === 0) { %>
                                                     <li class="list-group-item d-flex justify-content-between align-items-center">
-                                                        <span class="mr-1"><i class="fa fa fa-play-circle fa-rotate-90"></i></span>
+                                                        <span class="mr-1"><i class="fa fa-play-circle fa-rotate-90"></i></span>
                                                         <span class="text-muted">
                                                             <% for (const u of item) { %>
                                                                 <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
@@ -295,7 +295,7 @@
                                                     </li>
                                                 <% } else if(idx === inspection.auditors2.length -1 && idx !== 0) { %>
                                                     <li class="list-group-item d-flex justify-content-between align-items-center" data-auditorid="<%- item[0].aid %>">
-                                                        <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
+                                                        <span class="mr-1"><i class="fa <% if (inspection.rectification_uid && inspection.rectification_user) { %>fa-play-circle fa-rotate-90<% } else { %>fa-stop-circle<% } %>"></i></span>
                                                         <span class="text-muted">
                                                             <% for (const u of item) { %>
                                                                 <small class="d-inline-block text-dark mx-1" title="<%- u.role %>" data-auditorId="<%- u.aid %>"><%- u.name %></small>
@@ -325,6 +325,17 @@
                                                     </li>
                                                 <% } %>
                                             <% }) %>
+                                            <% if (inspection.rectification_uid && inspection.rectification_user) { %>
+                                                <li class="list-group-item d-flex justify-content-between align-items-center">
+                                                    <span class="mr-1"><i class="fa fa fa-stop-circle"></i></span>
+                                                    <span class="text-muted">
+                                                    <small class="d-inline-block text-dark mx-1" title="<%- inspection.rectification_user.role %>"><%- inspection.rectification_user.name %></small>
+                                                </span>
+                                                    <div class="d-flex ml-auto">
+                                                        <span class="badge badge-light badge-pill"><small>整改</small></span>
+                                                    </div>
+                                                </li>
+                                            <% } %>
                                         </ul>
                                     </div>
                                 </td>