With the widespread use of Mobile Edge Computing (MEC) in smart manufacturing systems in Industrial Internet of Things (IIoT) and 5G networks, determining how to efficiently offload computing tasks has become a hot research area. The Role-Based Collaboration (RBC) Environments-Classes, Agents, Roles, Groups, and Objects (E-CARGO) model is introduced to comprehensively manage MEC servers and user computation tasks in edge network environments, thereby improving the effectiveness and performance of task offloading in smart manufacturing systems. To begin with, latency and energy consumption are important indicators for evaluating the offloading effect. A pre-allocation algorithm based on user latency tolerance is proposed to dynamically adjust the latency-energy consumption weighting factor to optimize system resource allocation for real-time adjustment of offloading decisions. Second, the Group Role Assignment of Agent Role Conflicts (GRACAR) model based on E-CARGO is extended, along with a dynamic weighting of the GRACAR (GRACAR-DW) model and formal modeling. By introducing resource contention constraints, the resource contention caused by excessive task data offloading to the same MEC server is proactively mitigated. Finally, a Gurobi solution based on Mixed-Integer Linear Programming (MILP) is developed to help validate and synthesize the proposed model. Simulation results show that the strategy considerably enhances the MEC system's overall performance in terms of latency and energy consumption while also providing new ideas and technological support for offloading decisions in edge networks.