U.O.W.Meeting.js 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. /*
  2. 此js用来处理会议记录模板
  3. */
  4. Namespace.register("U.Boom.O.M"); //会议记录处理
  5. //导航模板功能。原名U.O.W.Meeting,缩写:U.O.W.MT
  6. Namespace.register("U.O.W.MT");
  7. //初始化
  8. window.onload = function () {
  9. var d = new Date();
  10. $("#U_Boom_O_M_Data span")[1].innerHTML += d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate();
  11. //获取传入id同时获取数据
  12. //事件处理
  13. }
  14. //获取数据
  15. U.Boom.O.M.GetData = function () {
  16. }
  17. //获取数据回调处理
  18. U.Boom.O.M.AsynGetData = function () {
  19. }
  20. //生成数据页面
  21. U.Boom.O.M.Generate = function () {
  22. }
  23. //会议记录输入处理
  24. U.Boom.O.M.GetData = function () {
  25. //此地方处理了 删除 删除的时候不允许把默认模板的样式删除
  26. //回车处理
  27. }
  28. //添加会议成员
  29. U.Boom.O.M.AddPeople = function () {
  30. var _UFFD = $$("div", { "style": { "text-align": "center", "margin": "15px" }, "id": "test" }); //创建对话框中的内容div元素。
  31. $$("span", { "innerHTML": "请输入会议成员:" }, _UFFD); //追加字符串
  32. var _h = $$("input", { 'value': '' }, _UFFD); //追加输入框
  33. $$("div", {}, _UFFD); //追加div用于换行
  34. var _CUM = new U.UF.UI.confirm("会议成员", function () { U.Boom.O.M.Sub_Add(_h); }, _UFFD); //创建对话框
  35. }
  36. U.Boom.O.M.Sub_Add = function (r, add) {
  37. if (r.value == '' || r.value == null) {
  38. U.alert("请输入名称");
  39. return;
  40. }
  41. $$("li", { "style": { "list-style": "none" }, "id": r.value }, $("#U_Boom_O_M_PeopleList")[0]);
  42. var a = $("#U_Boom_O_M_PeopleList li");
  43. var number = a.length - 1;
  44. $$("a", { "style": { "list-style": "none" }, "contenteditable": "true", "innerHTML": r.value }, $("#U_Boom_O_M_PeopleList li")[number]);
  45. $$("span", { "style": { "color": "red" }, "id": "spana", "contenteditable": "flase", "innerHTML": " X", "onclick": function () { U.Boom.O.M.cy($("#U_Boom_O_M_PeopleList li")[number]); } }, $("#U_Boom_O_M_PeopleList li")[number]);
  46. }
  47. U.Boom.O.M.cy = function (a) {
  48. $(a).remove();
  49. }
  50. //修改会议标题
  51. /*U.Boom.O.M.ChangeTitle = function (metting_title) {
  52. var _UFFD = $$("div", { "style": { "text-align": "center", "margin": "15px" }, "id": "test" }); //创建对话框中的内容div元素。
  53. $$("span", { "innerHTML": "请输入会议主题:" }, _UFFD); //追加字符串
  54. var _h = $$("input", { 'value': metting_title.innerHTML }, _UFFD); //追加输入框
  55. $$("div", {}, _UFFD); //追加div用于换行
  56. var _CUM = new U.UF.UI.confirm("会议主题", { "width": "350px", "text-align": "center" }, null, function(){U.Boom.O.M.ChangeMetting(_h, metting_title);}, _UFFD); //创建对话框
  57. }
  58. U.Boom.O.M.ChangeMetting = function (r, area) {
  59. if (r.value == '' || r.value == null) {
  60. U.alert("请输入会议主题");
  61. return;
  62. }
  63. area.innerHTML = r.value;
  64. }
  65. */
  66. //添加会议通知
  67. U.Boom.O.M.AddNotice = function () {
  68. var _UFFD = $$("div", { "style": { "text-align": "center", "margin": "15px" }, "id": "test" }); //创建对话框中的内容div元素。
  69. $$("span", { "innerHTML": "请输入会议通知:" }, _UFFD); //追加字符串
  70. var _h = $$("input", { 'value': '' }, _UFFD); //追加输入框
  71. $$("div", {}, _UFFD); //追加div用于换行
  72. var _CUM = new U.UF.UI.confirm("会议通知", function () { U.Boom.O.M.AddNotice_Add(_h); }, _UFFD); //创建对话框
  73. }
  74. U.Boom.O.M.AddNotice_Add = function (r, add) {
  75. if (r.value == '' || r.value == null) {
  76. U.alert("请输入通知");
  77. return;
  78. }
  79. $$("li", { "style": { "list-style": "none", "width": "50%", "text-align": "left", "height": "20px", "line-height": "20px" }, "id": r.value }, $("#U_Boom_O_M_List_tz")[0]);
  80. var a = $("#U_Boom_O_M_List_tz li");
  81. var number = a.length - 1;
  82. $$("a", { "style": { "list-style": "none" }, "contenteditable": "true", "innerHTML": r.value }, $("#U_Boom_O_M_List_tz li")[number]);
  83. $$("span", { "style": { "color": "red" }, "contenteditable": "flase", "innerHTML": " X", "onclick": function () { U.Boom.O.M.tz($("#U_Boom_O_M_List_tz li")[number]); } }, $("#U_Boom_O_M_List_tz li")[number]);
  84. }
  85. U.Boom.O.M.tz = function (a) {
  86. $(a).remove();
  87. }
  88. //添加讨论
  89. U.Boom.O.M.Discuss = function () {
  90. var _UFFD = $$("div", { "style": { "text-align": "center", "margin": "15px" }, "id": "test" }); //创建对话框中的内容div元素。
  91. $$("span", { "innerHTML": "请输入讨论内容:" }, _UFFD); //追加字符串
  92. var _h = $$("input", { 'value': '' }, _UFFD); //追加输入框
  93. $$("div", {}, _UFFD); //追加div用于换行
  94. var _CUM = new U.UF.UI.confirm("讨论内容", function () { U.Boom.O.M.Add_tl(_h); }, _UFFD); //创建对话框
  95. }
  96. U.Boom.O.M.Add_tl = function (r, add) {
  97. if (r.value == '' || r.value == null) {
  98. U.alert("请输入讨论");
  99. return;
  100. }
  101. $$("li", { "style": { "list-style": "none", "width": "50%", "text-align": "left", "height": "20px", "line-height": "20px" }, "id": r.value }, $("#U_Boom_O_M_tl")[0]);
  102. var a = $("#U_Boom_O_M_tl li");
  103. var number = a.length - 1;
  104. $$("a", { "style": { "list-style": "none" }, "contenteditable": "true", "innerHTML": r.value }, $("#U_Boom_O_M_tl li")[number]);
  105. $$("span", { "style": { "color": "red" }, "contenteditable": "flase", "innerHTML": " X", "onclick": function () { U.Boom.O.M.tz($("#U_Boom_O_M_tl li")[number]); } }, $("#U_Boom_O_M_tl li")[number]);
  106. }
  107. U.Boom.O.M.tz = function (a) {
  108. $(a).remove();
  109. }
  110. function U_Boom_O_M_List_yl() {
  111. var a = $("#U_Boom_O_M_PeopleList li"); //会议成员个数
  112. var b = $("#U_Boom_O_M_List_tz li"); //通知个数
  113. var c = $("#U_Boom_O_M_tl li"); //讨论个数
  114. var U_Boom_O_M_Title = document.querySelectorAll(".U_Boom_O_M_Title")[0];
  115. var OutputDiv = document.createElement("div");
  116. var OutputDiv_Title = document.createElement("div");
  117. var OutputDiv_people = document.createElement("div");
  118. var Transparent = document.createElement("div");
  119. Transparent.style.cssText = "width:100%;height:100%;text-align:center;background:#aaa;margin:0 auto;position:fixed;top:0;left:0;filter:alpha(Opacity=80);-moz-opacity:0.8;opacity: 0.8;";
  120. OutputDiv.style.cssText = "border:1px solid #eee;width:50%;height:100%;text-align:center;background:#fff;margin:0 auto;position:fixed;left:25%;top:20px";
  121. OutputDiv_Title.style.cssText = "background-color:#595959;width:100%;height:40px;color:#fff;text-align:center;vertical-align:middle;font-size:26pt;font-family:'Microsoft YaHei UI',sans-serif;line-height:40px;";
  122. OutputDiv_Title.innerHTML = U_Boom_O_M_Title.innerHTML;
  123. OutputDiv_people.style.cssText = "margin:10px;font-size:17pt;line-height:33px;text-align:left;";
  124. OutputDiv_people.innerHTML = "会议人员";
  125. document.body.appendChild(Transparent);
  126. document.body.appendChild(OutputDiv);
  127. OutputDiv.appendChild(OutputDiv_Title);
  128. OutputDiv.appendChild(OutputDiv_people);
  129. for (var i = 0; i < a.length; i++) {
  130. var OutputDiv_people_user = document.createElement("div");
  131. OutputDiv_people_user.style.cssText = "color: #595959;font-weight:700px;font-size: 10.5pt;width:90%;text-align:left;height:30px;line-height:30px;margin-left:5%;"
  132. OutputDiv_people_user.innerHTML = a[i].id;
  133. OutputDiv.appendChild(OutputDiv_people_user);
  134. }
  135. var OutputDiv_Notice = document.createElement("div");
  136. OutputDiv_Notice.style.cssText = "margin:10px;color:#000;font-size:17pt;line-height:33px;text-align:left;";
  137. OutputDiv_Notice.innerHTML = "会议内容";
  138. OutputDiv.appendChild(OutputDiv_Notice);
  139. for (var x = 0; x < b.length; x++) {
  140. var OutputDiv_Notice_content = document.createElement("div");
  141. OutputDiv_Notice_content.style.cssText = "color: #595959;font-size: 10.5pt;width:90%;text-align:left;height:30px;line-height:30px;margin-left:5%;";
  142. OutputDiv_Notice_content.innerHTML = b[x].id;
  143. OutputDiv.appendChild(OutputDiv_Notice_content);
  144. }
  145. var OutputDiv_tl = document.createElement("div");
  146. OutputDiv_tl.style.cssText = "margin:10px;color:#000;font-size:17pt;line-height:33px;text-align:left;";
  147. OutputDiv_tl.innerHTML = "讨论";
  148. OutputDiv.appendChild(OutputDiv_tl);
  149. for (var y = 0; y < c.length; y++) {
  150. var OutputDiv_tl_content = document.createElement("div");
  151. OutputDiv_tl_content.style.cssText = "color: #595959;;font-size: 10.5pt;width:90%;text-align:left;height:30px;line-height:30px;margin-left:5%;";
  152. OutputDiv_tl_content.innerHTML = c[y].id;
  153. OutputDiv.appendChild(OutputDiv_tl_content);
  154. }
  155. Transparent.onclick = function () {
  156. OutputDiv.remove(OutputDiv);
  157. Transparent.remove(Transparent);
  158. }
  159. }
  160. window.onload = function () {
  161. var yl = document.querySelector("#U_Boom_O_M_head_yl");
  162. var U_Boom_O_M_body = document.querySelectorAll(".U_Boom_O_M_body")[0];
  163. yl.onclick = function () {
  164. var Opacity = document.createElement("div");
  165. Opacity.style.cssText = "width:100%;height:100%;position:fixed;top:0;left:0; z-index:999; background:#ccc;filter:alpha(Opacity=0);-moz-opacity:0;opacity: 0;"
  166. U_Boom_O_M_body.appendChild(Opacity);
  167. }
  168. }