Built files from Bizgaze WebServer
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

routeaddress.js 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. var Bizgaze;
  2. (function (Bizgaze) {
  3. let Apps;
  4. (function (Apps) {
  5. let Routes;
  6. (function (Routes) {
  7. let Components;
  8. (function (Components) {
  9. class routeaddress extends Unibase.Platform.Core.BaseComponent {
  10. constructor() {
  11. super(...arguments);
  12. this.routeAddressIds = [];
  13. }
  14. cssFiles() {
  15. return [];
  16. }
  17. jsFiles() {
  18. return ['apps/routes/managers/routemanager.js'];
  19. }
  20. html(id, containerid) {
  21. let html = ``;
  22. return html;
  23. }
  24. load(id, containerid, callback) {
  25. }
  26. getrouteaddressids(containerid) {
  27. const instance = this;
  28. instance.routeAddressIds = [];
  29. $(`#layout_list_container_${containerid}`).find(".added-copy-item").each(function (i, e) {
  30. $(e).find('.index-number').text(i);
  31. var routeaddressid = $(e).find("#hf_routeaddressid").val();
  32. if (routeaddressid != 0) {
  33. instance.routeAddressIds.push(routeaddressid);
  34. }
  35. });
  36. return instance.routeAddressIds;
  37. }
  38. Updateindex(containerid) {
  39. var instance = this;
  40. $(`#layout_list_container_${containerid}`).sortable({
  41. update: function (event, ui) {
  42. Bizgaze.Apps.Routes.Components.routeaddress.Instance().getrouteaddressids(containerid);
  43. instance.updateRouteIndex();
  44. }
  45. });
  46. }
  47. updateRouteIndex() {
  48. var instance = this;
  49. instance.fileCacheHelper.loadJsFile("apps/routes/managers/routemanager.js", function () {
  50. Bizgaze.Apps.Routes.Managers.RouteManager.Instance().updateRouteIndexes(instance.routeAddressIds).then(function (response) {
  51. MessageHelper.Instance().showSuccess(response.message, '');
  52. });
  53. });
  54. }
  55. static Instance() {
  56. if (this.instance === undefined) {
  57. this.instance = new routeaddress();
  58. }
  59. return this.instance;
  60. }
  61. }
  62. Components.routeaddress = routeaddress;
  63. })(Components = Routes.Components || (Routes.Components = {}));
  64. })(Routes = Apps.Routes || (Apps.Routes = {}));
  65. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  66. })(Bizgaze || (Bizgaze = {}));