Просмотр исходного кода

获取在线计价,编办过滤调整

MaiXinRong 6 дней назад
Родитель
Сommit
d8da4e084f

+ 5 - 1
app/controller/profile_controller.js

@@ -430,7 +430,11 @@ module.exports = app => {
                         const account = JSON.parse(dskAccount.dsk_account);
                         const compilation = await dsk.getCompilation(data.mobile);
                         response.data = {};
-                        response.data.compilation = compilation && compilation.length > 0 ? ctx.helper._.filter(compilation, { type: 'highway' }) : [];
+                        if (data.filterCompilationType) {
+                            response.data.compilation = compilation && compilation.length > 0 ? ctx.helper._.filter(compilation, { type: data.filterCompilationType }) : [];
+                        } else {
+                            response.data.compilation = compilation || [];
+                        }
                         if (data.getProject) {
                             const compilationInfo = data.compilationId ? ctx.helper._.find(compilation, { ID: data.compilationId }) : null;
                             const compilationId = compilationInfo ? compilationInfo.ID : (compilation.length > 0 ? compilation[0].ID : null);

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

@@ -5091,7 +5091,8 @@ $(document).ready(() => {
                     postData('/profile/dsk/api', {
                         type: 'compilation',
                         getProject: 1,
-                        compilationId: getLocalCache(dskCompilation)
+                        compilationId: getLocalCache(dskCompilation),
+                        filterCompilationType: 'highway',
                     }, function (result) {
                         let html = '';
                         for (const data of result.compilation) {

+ 0 - 1
app/service/sub_proj_permission.js

@@ -440,7 +440,6 @@ module.exports = app => {
             } else {
                 const viewPermission = permissionBlock.permission.find(x => { return x.key === 'view'; });
                 if (!viewPermission) return true;
-                console.log(viewPermission, ctx.subProject.permission);
                 return ctx.subProject.permission[permissionBlock.field].indexOf(viewPermission.value) >= 0;
             }
         };