网站
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

complaintAdd.js 1.5 KiB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. * Created by Administrator on 2021/4/5.
  3. */
  4. define(['jquery', "template", "Tools", "echarts", 'swiper'], function ($, template, Tools, echarts, swiper) {
  5. //数据存储
  6. var module = {
  7. data: {
  8. //服务器地址
  9. serverApi:'',
  10. //焦点图数据
  11. focusList: [],
  12. communicateList: [],
  13. deptId:''
  14. },
  15. };
  16. var tools = new Tools();
  17. module.init = function (page) {
  18. tools.doGet(getTopDeptId, {}, module.getInformation , true);
  19. };
  20. module.getInformation = function (data) {
  21. console.log(data)
  22. module.data.deptId = data.data;
  23. }
  24. goAdd = function () {
  25. var form = {
  26. title:$('#title').val(),
  27. communicateType:$('input:radio:checked').val(),
  28. content:$('#content').val(),
  29. name:$('#name').val(),
  30. phone:$('#phone').val(),
  31. }
  32. tools.doPost(communicateAdd, {
  33. title:$('#title').val(),
  34. communicateType:$('input:radio:checked').val(),
  35. content:$('#content').val(),
  36. name:$('#name').val(),
  37. phone:$('#phone').val(),
  38. deptId:module.data.deptId
  39. }, module.addEnd , true);
  40. }
  41. module.addEnd = function(data){
  42. tools.initError('发布成功');
  43. setTimeout(function(){
  44. tools.skip('complaintList.html')
  45. },2000)
  46. }
  47. goDetail = function(id){
  48. tools.skip('/agriculturalLawEnforcement/view/complaint/complaintDetail.html?id='+id);
  49. }
  50. return module;
  51. });