1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- @using IwbZero.ToolCommon.StringModel
- @using WeApp.Helpers
- @model string
- @{
- string[] arr = Model.Split('#');
- string groupNo = arr[0];
- string id = $"scene-flow";
- bool withScript = (arr.Length > 1 ? arr[1] : "").ValB();
- int type = (arr.Length > 2 ? arr[2] : "").ValI();
- string body = $"<div class=\"scene-box-header\">" +
- //$"<i class=\"fa fa-sitemap\"></i>" +
- $"<img src=\"/Content/V2/Img/Icon/icon-5-3.png\" />" +
- $"推演网图</div>" +
- $"<div class=\"scene-flow-box\" style=\"height:calc(100% - 30px)\"><div class=\"box-body\"></div></div>";
- }
- @Html.Partial("__/_AreaBox", $"情景路径#{id}_{groupNo}#{body}")
- @if (withScript)
- {
- <style>
- .scene-flow-box .path-box {
- --color: #3a89be;
- --colorNode: #3a89be;
- opacity: 0.9;
- }
- .scene-flow-box .path-box .round-box .sfb-box .sfb-title {
- background: transparent;
- background: rgba(81, 189, 246,.75);
- }
- </style>
- using (Html.BeginScripts())
- {
- <script src="~/Content/Js/scene-path_v2.js"></script>
- <script id="path-script">
- function GetScenePath(no) {
- $.iwbAjax5({
- url: abp.appUrl + 'Query/GetGroupRunningInfo?no='+no,
- success: function(res) {
- var str = FormatterSingleScenePath(res);
- $(`#@(id)_${no} .box-body .scene-flow-box .box-body`).html(str);
- window.Scroll2Bottom($(`#@(id)_${no} .box-body .scene-flow-box`));
- }
- });
- }
- iwbHub.client.getRunningChange = function(msg) {
- console.log('getRunningChange: ', msg);
- if (msg) {
- try {
- var data = JSON.parse(msg);
- if ( @(type) == 2 ||data.no == '@groupNo') {
- GetScenePath(data.no);
- }
- } catch (e) {
- console.log('getRunningChange: ', e);
- }
- }
- };
- </script>
- }
- }
- @using (Html.BeginScripts())
- {
- <script>
- GetScenePath('@(groupNo)');
- </script>
- }
|