123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- @using WePlatform
- @using WePlatform.Configuration
- @using WePlatform.Authorization
- @using WePlatform.Views.Shared.Modals
- @using WePlatform.Views.Shared.SearchForm
- @using WePlatform.Views.Shared.Table
- @{
- ViewBag.Title = "推演引擎事务组件";
- string activeMenu = PermissionNames.PagesEngineModelMgEngineComponentMg; //The menu item will be active for this page.
- ViewBag.ActiveMenu = activeMenu;
- var searchForm = new SearchFormViewModel(new List<SearchItem>()
- {
- new SearchItem("name","组件名称"),
- },"search-form",false);
- var table = new TableViewModel(IwbConsts.ApiAppUrl + "EngineComponent/GetAll", activeMenu, searchForm)
- .SetFields(new List<FieldItem>()
- {
- new FieldItem("name", "组件名称"),
- new FieldItem("parameters", "参数映射"),
- new FieldItem("description", "事务描述"),
- new FieldItem("registerKey", "注册Key"),
- });
- }
- @section css{
-
- }
- @Html.Partial("Table/_Table", table)
- @section modal{
- <!--Main Modal-->
- @{
- var modal = new ModalViewModel("推演引擎事务组件", new ModalBodyViewModel(new List<Input>()
- {
- new InputHide("id"),
- new Input("name", "组件名称").SetNotRequired(),
- new Input("parameters", "参数映射").SetNotRequired(),
- new InputTextarea("description", "事务描述").SetNotRequired(),
- new InputTextarea("componentScript", "事务逻辑").SetNotRequired(),
- new Input("componentClass", "类全名").SetNotRequired(),
- new Input("componentLib", "程序集").SetNotRequired(),
- new Input("registerKey", "注册Key").SetNotRequired(),
- }));
- }
- @Html.Partial("Modals/_Modal", modal)
- }
- @section scripts
- {
- <script type="text/javascript">
- var $table;
- $(function () {
- $table = LoadTable();
- var funs = window.iwbfuns || { none: function () { console.log("No type"); } };
- funs["btnCreate"] = function() { BtnCreate({ data: { id: "" } }); }
- funs["btnUpdate"] = function () { BtnUpdate({ disabled: "" }); };
- });
- </script>
- <!--格式化-->
- <script id="formatter-script" type="text/javascript">
- function TypeFormatter(v) {
- var name = $('#hid-type option[value="' + v + '"]').text();
- switch (v) {
- case 0:
- return '<span class="label label-danger">' + name +'</span>';
- default:
- return '<span class="label label-info">' + name +'</span>';
- }
- }
- </script>
- }
- <section style="display: none">
- <select id="hid-type">
- <option value=""></option>
- </select>
- @*@Html.DropDownList("hid-type", type)*@
- </section>
|