2
3
lining 6 жил өмнө
parent
commit
c3ab1f5a4f

+ 23 - 18
src/dashoo.cn/backend/api/controllers/casbin/organize.go

@@ -36,7 +36,17 @@ type OrganizeModel struct {
 func (this *OrganizesController) List() {
 	page := this.GetPageInfoForm()
 	svc := organize.GetOrganizeService(utils.DBE)
-	topid := svc.GetMyUnitDepartmentId(this.User.DepartmentId)
+
+	svcPerm := permission.GetPermissionService(utils.DBE)
+	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_admin")
+	topid := ""
+	if isauth {
+		paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+		topid = paramSvc.GetBaseparameterMessage("", "paramset", "HeadquartersID") // 总公司Id
+	} else {
+		topid = svc.GetMyUnitDepartmentId(this.User.DepartmentId)
+	}
+
 	depids := svc.GetAllChildById(topid)
 	where := "( Createuserid=" + this.User.Id + " or id in (" + depids + "))"
 	keyword := this.GetString("keyword")
@@ -96,7 +106,16 @@ func (this *OrganizesController) Detailed() {
 func (this *OrganizesController) Listbandparentname() {
 	page := this.GetPageInfoForm()
 	svc := organize.GetOrganizeService(utils.DBE)
-	topid := svc.GetMyUnitDepartmentId(this.User.DepartmentId)
+	svcPerm := permission.GetPermissionService(utils.DBE)
+	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_admin")
+	topid := ""
+	if isauth {
+		paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+		topid = paramSvc.GetBaseparameterMessage("", "paramset", "HeadquartersID") // 总公司Id
+	} else {
+		topid = svc.GetMyUnitDepartmentId(this.User.DepartmentId)
+	}
+
 	depids := svc.GetAllChildById(topid)
 	where := "( a.Createuserid=" + this.User.Id + " or a.id in (" + depids + "))"
 	keyword := this.GetString("keyword")
@@ -376,10 +395,7 @@ func (this *OrganizesController) OrganizeParentList() {
 // @Success 200 {object} business.device.DeviceChannels
 // @router /listbydeptid [get]
 func (this *OrganizesController) ListByDeptId() {
-	//ParentId := this.GetString("ParentId")
-	//var user userRole.Base_User
 	svc := organize.GetOrganizeService(utils.DBE)
-	//unitId := svc.GetMyUnitDepartmentId(this.User.DepartmentId)
 
 	svcPerm := permission.GetPermissionService(utils.DBE)
 	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_admin")
@@ -390,20 +406,9 @@ func (this *OrganizesController) ListByDeptId() {
 	} else {
 		unitId = svc.GetMyUnitDepartmentId(this.User.DepartmentId)
 	}
-	//svc.GetEntityById(this.User.Id, &user)
-	//companyids := strings.Split(user.Superior, ",")
+
 	ids := svc.GetAllChildById(unitId)
-	//ids := ""
-	//if ParentId != "" {
-	//	ids = svc.GetAllChildById("100000180")
-	//} else {
-	//	has := svc.UserInRoleById(this.User.Id, "10000203")
-	//	if has {
-	//		ids = svc.GetAllChildById("100000054")
-	//	} else {
-	//		ids = svc.GetAllChildById(companyids[len(companyids)-1])
-	//	}
-	//}
+
 	where := " Id in ( " + ids + " ) "
 
 	list := make([]organize.Base_Organize, 0)

+ 4 - 1
src/dashoo.cn/frontend_web/src/components/workflow/wfmultihistory.vue

@@ -102,7 +102,7 @@
         const params = {
           process: _this.entryinfo.process,
           business: _this.entryinfo.business,
-          instance: instanceIds,
+          instance: instanceIds
         }
         this.$axios.get('/workflow/historymultitask', {
           params
@@ -119,6 +119,7 @@
             if (useridstr) {
               useridstr = useridstr.substring(0, useridstr.length - 1)
             }
+            console.log(useridstr, 'useridstr')
             this.getuserlist(useridstr)
           })
           .catch(err => {
@@ -154,7 +155,9 @@
           .then(res => {
             // response
             this.userlist = res.data.items
+            console.log(this.userlist, 'this.userlist')
             this.historyTask = this.tmp_historyTask
+            console.log(this.historyTask, 'this.historyTask')
           })
           .catch(err => {
             // handle error

+ 3 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue

@@ -174,7 +174,7 @@
             <div slot="header" class="clearfix">
               <span>审批流程</span>
             </div>
-            <wf-history :entryinfo="entrydetail"></wf-history>
+            <wf-multi-history :entryinfo="entrydetail"></wf-multi-history>
           </el-card>
         </el-tab-pane>
 
@@ -333,6 +333,7 @@
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
   import WfHistory from '@/components/workflow/wfhistory.vue'
   import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
+  import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
@@ -350,6 +351,7 @@
       SupplierFileTable,
       WfHistory,
       WfBackHistory,
+      WfMultiHistory,
       SupplierCertEdit,
 
       EquipmentList, // 企业主要情况

+ 3 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue

@@ -174,7 +174,7 @@
             <div slot="header" class="clearfix">
               <span>审批流程</span>
             </div>
-            <wf-history :entryinfo="entrydetail"></wf-history>
+            <wf-multi-history :entryinfo="entrydetail"></wf-multi-history>
           </el-card>
         </el-tab-pane>
 
@@ -344,6 +344,7 @@
   import apiCert from '@/api/oilsupplier/suppliercert'
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
   import WfHistory from '@/components/workflow/wfhistory.vue'
+  import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
   import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
@@ -362,6 +363,7 @@
       SupplierFileTable,
       WfHistory,
       WfBackHistory,
+      WfMultiHistory,
       SupplierCertEdit,
 
       EquipmentList, // 企业主要情况

+ 3 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

@@ -172,7 +172,7 @@
             <div slot="header" class="clearfix">
               <span>审批流程</span>
             </div>
-            <wf-history :entryinfo="entrydetail"></wf-history>
+            <wf-multi-history :entryinfo="entrydetail"></wf-multi-history>
           </el-card>
         </el-tab-pane>
         <!--<el-tab-pane label="审批历史" v-if="this.formData.AuditIndex > 0 ">-->
@@ -331,6 +331,7 @@
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
   import WfHistory from '@/components/workflow/wfhistory.vue'
   import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
+  import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
@@ -348,6 +349,7 @@
       SupplierFileTable,
       WfHistory,
       WfBackHistory,
+      WfMultiHistory,
       SupplierCertEdit,
 
       EquipmentList, // 企业主要情况