Prechádzať zdrojové kódy

修复参建单位选中bug

ellisran 1 rok pred
rodič
commit
fb2b2212bf

+ 2 - 2
app/middleware/session_auth.js

@@ -52,12 +52,12 @@ module.exports = options => {
                         if (accountInfo.company_id) {
                             companyInfo = yield this.service.datacollectAudit.getDataByCondition({
                                 pid: projectData.id,
-                                company_id: accountInfo.company_id
+                                company_id: accountInfo.company_id,
                             });
                         } else {
                             const cuInfo = yield this.service.constructionUnit.getDataByCondition({
                                 pid: projectData.id,
-                                name: accountInfo.company
+                                name: accountInfo.company,
                             });
                             if (cuInfo) {
                                 companyInfo = yield this.service.datacollectAudit.getDataByCondition({

+ 1 - 2
app/public/js/setting.js

@@ -227,8 +227,7 @@ $(document).ready(() => {
     })
 
     // 参建单位页切换单位右侧显示
-    $('#unit_list tr').on('click', function () {
-        console.log('hello');
+    $('body').on('click', '#unit_list tr', function () {
         const id = parseInt($(this).data('id'));
         $(this).siblings('tr').removeClass('table-warning');
         $(this).addClass('table-warning');