Meeting.js 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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 () {
  35. U.Boom.O.M.Sub_Add(_h)
  36. }); //创建对话框
  37. }
  38. U.Boom.O.M.Sub_Add = function (r, add) {
  39. if (r.value == '' || r.value == null) {
  40. U.alert("请输入名称");
  41. return;
  42. }
  43. $$("li",{"style":{"list-style": "none"},"id": r.value},$("#U_Boom_O_M_PeopleList")[0]);
  44. var a = $("#U_Boom_O_M_PeopleList li");
  45. var number = a.length - 1;
  46. $$("a",{"style":{"list-style": "none"},"contenteditable": "true","innerHTML": r.value},$("#U_Boom_O_M_PeopleList li")[number]);
  47. $$("span",{
  48. "style":
  49. {
  50. "color": "red"
  51. },
  52. "id": "spana",
  53. "contenteditable": "flase",
  54. "innerHTML": " X",
  55. "onclick": function () {
  56. U.Boom.O.M.cy($("#U_Boom_O_M_PeopleList li")[number]);
  57. }
  58. },
  59. $("#U_Boom_O_M_PeopleList li")[number]);
  60. }
  61. U.Boom.O.M.cy = function (a) {
  62. $(a).remove();
  63. }
  64. //修改会议标题
  65. /*U.Boom.O.M.ChangeTitle = function (metting_title) {
  66. var _UFFD = $$("div", { "style": { "text-align": "center", "margin": "15px" }, "id": "test" }); //创建对话框中的内容div元素。
  67. $$("span", { "innerHTML": "请输入会议主题:" }, _UFFD); //追加字符串
  68. var _h = $$("input", { 'value': metting_title.innerHTML }, _UFFD); //追加输入框
  69. $$("div", {}, _UFFD); //追加div用于换行
  70. var _CUM = new U.UF.UI.confirm("会议主题", { "width": "350px", "text-align": "center" }, null, function(){U.Boom.O.M.ChangeMetting(_h, metting_title);}, _UFFD); //创建对话框
  71. }
  72. U.Boom.O.M.ChangeMetting = function (r, area) {
  73. if (r.value == '' || r.value == null) {
  74. U.alert("请输入会议主题");
  75. return;
  76. }
  77. area.innerHTML = r.value;
  78. }
  79. */
  80. //添加会议通知
  81. U.Boom.O.M.AddNotice = function () {
  82. var _UFFD = $$("div",{"style":{"text-align": "center","margin": "15px"},"id": "test"}); //创建对话框中的内容div元素。
  83. $$("span",{"innerHTML": "请输入会议通知:"},_UFFD); //追加字符串
  84. var _h = $$("input",{'value': ''},_UFFD); //追加输入框
  85. $$("div",{},_UFFD); //追加div用于换行
  86. var _CUM = new U.UF.UI.confirm(_UFFD, function () {
  87. U.Boom.O.M.AddNotice_Add(_h)
  88. }); //创建对话框
  89. }
  90. U.Boom.O.M.AddNotice_Add = function (r, add) {
  91. if (r.value == '' || r.value == null) {
  92. U.alert("请输入通知");
  93. return;
  94. }
  95. $$("li",{"style":{
  96. "list-style": "none",
  97. "width": "50%",
  98. "text-align": "left",
  99. "height": "20px",
  100. "line-height": "20px"
  101. },
  102. "id": r.value
  103. },
  104. $("#U_Boom_O_M_List_tz")[0]);
  105. var a = $("#U_Boom_O_M_List_tz li");
  106. var number = a.length - 1;
  107. $$("a",{"style":{"list-style": "none"},"contenteditable": "true","innerHTML": r.value},$("#U_Boom_O_M_List_tz li")[number]);
  108. $$("span",
  109. {
  110. "style":
  111. {
  112. "color": "red"
  113. },
  114. "contenteditable": "flase",
  115. "innerHTML": " X",
  116. "onclick": function () {
  117. U.Boom.O.M.tz($("#U_Boom_O_M_List_tz li")[number]);
  118. }
  119. },
  120. $("#U_Boom_O_M_List_tz li")[number]);
  121. }
  122. U.Boom.O.M.tz = function (a) {
  123. $(a).remove();
  124. }
  125. //添加讨论
  126. U.Boom.O.M.Discuss = function () {
  127. var _UFFD = $$("div",{"style":{"text-align": "center","margin": "15px"},"id": "test"}); //创建对话框中的内容div元素。
  128. $$("span",{"innerHTML": "请输入讨论内容:"},_UFFD); //追加字符串
  129. var _h = $$("input",{'value': ''},_UFFD); //追加输入框
  130. $$("div",{},_UFFD); //追加div用于换行
  131. var _CUM = new U.UF.UI.confirm(_UFFD, function () {
  132. U.Boom.O.M.Add_tl(_h)
  133. }); //创建对话框
  134. }
  135. U.Boom.O.M.Add_tl = function (r, add) {
  136. if (r.value == '' || r.value == null) {
  137. U.alert("请输入讨论");
  138. return;
  139. }
  140. $$("li",
  141. {
  142. "style":
  143. {
  144. "list-style": "none",
  145. "width": "50%",
  146. "text-align": "left",
  147. "height": "20px",
  148. "line-height": "20px"
  149. },
  150. "id": r.value
  151. },
  152. $("#U_Boom_O_M_tl")[0]);
  153. var a = $("#U_Boom_O_M_tl li");
  154. var number = a.length - 1;
  155. $$("a",{"style":{"list-style": "none"},"contenteditable": "true","innerHTML": r.value},$("#U_Boom_O_M_tl li")[number]);
  156. $$("span",
  157. {
  158. "style":
  159. {
  160. "color": "red"
  161. },
  162. "contenteditable": "flase",
  163. "innerHTML": " X",
  164. "onclick": function () {
  165. U.Boom.O.M.tz($("#U_Boom_O_M_tl li")[number]);
  166. }
  167. },
  168. $("#U_Boom_O_M_tl li")[number]);
  169. }
  170. U.Boom.O.M.tz = function (a) {
  171. $(a).remove();
  172. }
  173. function U_Boom_O_M_List_yl() {
  174. var a = $("#U_Boom_O_M_PeopleList li"); //会议成员个数
  175. var b = $("#U_Boom_O_M_List_tz li"); //通知个数
  176. var c = $("#U_Boom_O_M_tl li"); //讨论个数
  177. var U_Boom_O_M_Title = document.querySelectorAll(".U_Boom_O_M_Title")[0];
  178. var OutputDiv = document.createElement("div");
  179. var OutputDiv_Title = document.createElement("div");
  180. var OutputDiv_people = document.createElement("div");
  181. var Transparent = document.createElement("div");
  182. 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;";
  183. 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";
  184. 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;";
  185. OutputDiv_Title.innerHTML = U_Boom_O_M_Title.innerHTML;
  186. OutputDiv_people.style.cssText = "margin:10px;font-size:17pt;line-height:33px;text-align:left;";
  187. OutputDiv_people.innerHTML = "会议人员";
  188. document.body.appendChild(Transparent);
  189. document.body.appendChild(OutputDiv);
  190. OutputDiv.appendChild(OutputDiv_Title);
  191. OutputDiv.appendChild(OutputDiv_people);
  192. for (var i = 0; i < a.length; i++) {
  193. var OutputDiv_people_user = document.createElement("div");
  194. 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%;"
  195. OutputDiv_people_user.innerHTML = a[i].id;
  196. OutputDiv.appendChild(OutputDiv_people_user);
  197. }
  198. var OutputDiv_Notice = document.createElement("div");
  199. OutputDiv_Notice.style.cssText = "margin:10px;color:#000;font-size:17pt;line-height:33px;text-align:left;";
  200. OutputDiv_Notice.innerHTML = "会议内容";
  201. OutputDiv.appendChild(OutputDiv_Notice);
  202. for (var x = 0; x < b.length; x++) {
  203. var OutputDiv_Notice_content = document.createElement("div");
  204. OutputDiv_Notice_content.style.cssText = "color: #595959;font-size: 10.5pt;width:90%;text-align:left;height:30px;line-height:30px;margin-left:5%;";
  205. OutputDiv_Notice_content.innerHTML = b[x].id;
  206. OutputDiv.appendChild(OutputDiv_Notice_content);
  207. }
  208. var OutputDiv_tl = document.createElement("div");
  209. OutputDiv_tl.style.cssText = "margin:10px;color:#000;font-size:17pt;line-height:33px;text-align:left;";
  210. OutputDiv_tl.innerHTML = "讨论";
  211. OutputDiv.appendChild(OutputDiv_tl);
  212. for (var y = 0; y < c.length; y++) {
  213. var OutputDiv_tl_content = document.createElement("div");
  214. OutputDiv_tl_content.style.cssText = "color: #595959;;font-size: 10.5pt;width:90%;text-align:left;height:30px;line-height:30px;margin-left:5%;";
  215. OutputDiv_tl_content.innerHTML = c[y].id;
  216. OutputDiv.appendChild(OutputDiv_tl_content);
  217. }
  218. Transparent.onclick = function () {
  219. OutputDiv.remove(OutputDiv);
  220. Transparent.remove(Transparent);
  221. }
  222. }
  223. window.onload = function () {
  224. var yl = document.querySelector("#U_Boom_O_M_head_yl");
  225. var U_Boom_O_M_body = document.querySelectorAll(".U_Boom_O_M_body")[0];
  226. yl.onclick = function () {
  227. var Opacity = document.createElement("div");
  228. 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;"
  229. U_Boom_O_M_body.appendChild(Opacity);
  230. }
  231. }