zhaoke 2 ani în urmă
părinte
comite
840f47bb74

+ 2 - 1
public/config.js

@@ -12,7 +12,8 @@ window.SERVICE_ID = {
   getAppId: 18133, //获取应用列表
   roleListId: 10024, //角色列表
   userListId: 10026, //用户管理列表
-  userAuthorizationId: 10027, //用户授权
+  userAuthorizationId: 200228, //用户授权
+  userGroupAuthorizationId: 10027, //用户组授权
   depTableId: 185, //机器维护-表头
   serTableId: 203, //服务设置-表头
   bagTableId: 20030, //行李详情-表头

+ 19 - 9
src/views/newBagDetails/index.vue

@@ -138,9 +138,13 @@ export default {
           this.passengerName = datasObj['passengerName']
           this.PNRNO = datasObj['PNRNO']
           const { luggageNum, PNRNO } = datasObj
-          this.queryObj = {
-            luggageNum,
-            PNRNO
+          if (PNRNO) {
+            this.queryObj = {
+              luggageNum,
+              PNRNO
+            }
+          } else {
+            this.queryObj = this.query
           }
           for (const key in datasObj) {
             this.infoArrs.map(item => {
@@ -168,12 +172,18 @@ export default {
     async getLuggageNums () {
       try {
         const { carrierFlights, carrierFlightsDate } = this.query
-        const { code, returnData } = await this.getQueryList(SERVICE_ID.bagTableId, {
-          PNRNO: this.PNRNO,
-          passengerName: this.passengerName,
-          carrierFlights,
-          carrierFlightsDate
-        })
+        let parmObj = null
+        if (this.PNRNO) {
+          parmObj = {
+            PNRNO: this.PNRNO,
+            passengerName: this.passengerName,
+            carrierFlights,
+            carrierFlightsDate
+          }
+        } else {
+          parmObj = this.query
+        }
+        const { code, returnData } = await this.getQueryList(SERVICE_ID.bagTableId, parmObj)
         if (code == 0 && returnData && returnData.length) {
           this.detailsArr = _.uniq([...returnData])
         }

+ 50 - 8
src/views/newRole/index.vue

@@ -278,7 +278,13 @@ export default {
       } else {
         newObj.user_group_id = newItem.user_group_id
       }
-      const { code, returnData } = await this.getQueryList(SERVICE_ID.userAuthorizationId, newObj)
+      let msgId = null
+      if (newItem.hasOwnProperty('user_id')) {
+        msgId = SERVICE_ID.userAuthorizationId
+      } else {
+        msgId = SERVICE_ID.userGroupAuthorizationId
+      }
+      const { code, returnData } = await this.getQueryList(msgId, newObj)
       if (code == 0) {
         const result = returnData
         if (result && result.length) {
@@ -317,6 +323,7 @@ export default {
       this.treeCheckId = null
       this.$refs.tree.setCurrentKey(null)
       this.msgUserId = null
+      this.checkDatas = []
       this.getRoleQuth(item)
     },
     //服务列表-保存
@@ -427,7 +434,13 @@ export default {
             const newObj = { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_group_id, user_id }
             newDatas.push(newObj)
           })
-          const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, newDatas, 1)
+          let msgId = null
+          if (newItem.hasOwnProperty('user_id')) {
+            msgId = SERVICE_ID.userAuthorizationId
+          } else {
+            msgId = SERVICE_ID.userGroupAuthorizationId
+          }
+          const { code } = await this.getChangeList(msgId, newDatas, 1)
           if (code == 0) {
             setTimeout(() => {
               this.getRoleQuth(this.dataObj)
@@ -467,11 +480,22 @@ export default {
       const newMsgs = _.cloneDeep(addRes)
       newMsgs.forEach(item => {
         const { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_group_id, user_id } = item
-        const newObj = { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_group_id, user_id }
+        let newObj = null
+        if (newItem.hasOwnProperty('user_id')) {
+          newObj = { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_id }
+        } else {
+          newObj = { auth_id, auth_type, queryTemplateColumnSetID, row_auth, user_group_id }
+        }
         newDatas.push(newObj)
       })
       if (type == 'add') {
-        const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, newDatas, 1)
+        let msgId = null
+        if (newItem.hasOwnProperty('user_id')) {
+          msgId = SERVICE_ID.userAuthorizationId
+        } else {
+          msgId = SERVICE_ID.userGroupAuthorizationId
+        }
+        const { code } = await this.getChangeList(msgId, newDatas, 1)
         if (code == 0) {
           setTimeout(() => {
             this.getRoleQuth(this.dataObj)
@@ -479,7 +503,13 @@ export default {
         }
         this.tipMsg(code)
       } else {
-        const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, newDatas, 3)
+        let msgId = null
+        if (newItem.hasOwnProperty('user_id')) {
+          msgId = SERVICE_ID.userAuthorizationId
+        } else {
+          msgId = SERVICE_ID.userGroupAuthorizationId
+        }
+        const { code } = await this.getChangeList(msgId, newDatas, 3)
         if (code == 0) {
           this.msgUserId = null
           this.checkArrs = []
@@ -510,7 +540,13 @@ export default {
               item.row_auth = null
             })
             this.checkArrs = [...result]
-            const { code, returnData } = await this.getQueryList(SERVICE_ID.userAuthorizationId, newObj)
+            let msgId = null
+            if (newItem.hasOwnProperty('user_id')) {
+              msgId = SERVICE_ID.userAuthorizationId
+            } else {
+              msgId = SERVICE_ID.userGroupAuthorizationId
+            }
+            const { code, returnData } = await this.getQueryList(msgId, newObj)
             if (code == 0 && returnData && returnData.length) {
               const res = returnData.filter(item => item.queryTemplateColumnSetID)
               if (res && res.length) {
@@ -599,9 +635,15 @@ export default {
           newObj.user_group_id = newItem.user_group_id
         }
         const result = this.sendCheckData(this.multipleTable)
-        const tes = await this.getChangeList(SERVICE_ID.userAuthorizationId, [newObj], 3)
+        let msgId = null
+        if (newItem.hasOwnProperty('user_id')) {
+          msgId = SERVICE_ID.userAuthorizationId
+        } else {
+          msgId = SERVICE_ID.userGroupAuthorizationId
+        }
+        const tes = await this.getChangeList(msgId, [newObj], 3)
         if (tes.code == 0) {
-          const { code } = await this.getChangeList(SERVICE_ID.userAuthorizationId, result, 1)
+          const { code } = await this.getChangeList(msgId, result, 1)
           this.tipMsg(code)
         }
       } else {

+ 1 - 1
src/views/upload/index.vue

@@ -62,7 +62,7 @@
                   <div>{{ currDate(scope.row.thedate) }}</div>
                 </template>
               </el-table-column>
-              <el-table-column width="100" prop="total" label="数"></el-table-column>
+              <el-table-column width="100" prop="total" label="数"></el-table-column>
             </el-table>
           </div>
           <div v-loading="loading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" class="upload-main-content-right">