2f273b5fb04edacb40a0a5a8b6830c892573464d.svn-base 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <a-modal
  3. :title="title"
  4. :width="900"
  5. :visible="visible"
  6. :confirmLoading="confirmLoading"
  7. @cancel="handleCancel"
  8. :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
  9. cancelText="关闭">
  10. <a-spin :spinning="confirmLoading">
  11. <a-table :dataSource="dataSource" :columns="columns" />
  12. </a-spin>
  13. </a-modal>
  14. </template>
  15. <script>
  16. import { httpAction } from '@/api/manage'
  17. import pick from 'lodash.pick'
  18. import { getAction } from '@/api/manage'
  19. import JDate from '@/components/jeecg/JDate'
  20. import JEditor from '@/components/jeecg/JEditor'
  21. import SelectUserListModal from "./SelectUserListModal";
  22. import moment from 'moment'
  23. export default {
  24. components: { JEditor, JDate, SelectUserListModal},
  25. name: "SysAlreadlyModal",
  26. data () {
  27. return {
  28. dataSource: [
  29. {
  30. userName: '',
  31. sendTime: 0,
  32. acceptTime: 0,
  33. alreadly: '',
  34. },
  35. ],
  36. columns: [
  37. {
  38. title: '接收人',
  39. align: "center",
  40. dataIndex: 'userName',
  41. key: 'userName',
  42. },
  43. {
  44. title: '联系方式',
  45. align: "center",
  46. dataIndex: 'phone',
  47. key: 'phone',
  48. },
  49. {
  50. title: '发送时间',
  51. align: "center",
  52. dataIndex: 'sendTime',
  53. key: 'sendTime',
  54. scopedSlots: {customRender: 'action'},
  55. },
  56. {
  57. title: '接受时间',
  58. align: "center",
  59. dataIndex: 'acceptTime',
  60. key: 'acceptTime',
  61. customRender: function (text,record) {
  62. if (record.alreadly == "0") {
  63. return " ";
  64. } else if (text == "1") {
  65. return text;
  66. } else {
  67. return text;
  68. }
  69. }
  70. },
  71. {
  72. title: '是否已读',
  73. align: "center",
  74. dataIndex: 'alreadly',
  75. key: 'alreadly',
  76. customRender: function (text) {
  77. if (text == '0') {
  78. return "未读";
  79. } else if (text == "1") {
  80. return "已读";
  81. } else {
  82. return text;
  83. }
  84. }
  85. },
  86. ],
  87. title:"通知详情",
  88. visible: false,
  89. disableSubmit:true,
  90. model: {},
  91. labelCol: {
  92. xs: { span: 24 },
  93. sm: { span: 6 },
  94. },
  95. wrapperCol: {
  96. xs: { span: 24 },
  97. sm: { span: 18 },
  98. },
  99. labelColX1: {
  100. xs: { span: 24 },
  101. sm: { span: 3 },
  102. },
  103. wrapperColX1: {
  104. xs: { span: 24 },
  105. sm: { span: 21 },
  106. },
  107. confirmLoading: false,
  108. userType:false,
  109. userIds:[],
  110. selectedUser:[],
  111. disabled:false,
  112. msgContent:"",
  113. userList:[],
  114. userAlready:[{alreadly:"0",userName:"11"}]
  115. }
  116. },
  117. created () {
  118. console.log(this.userAlready)
  119. },
  120. methods: {
  121. add () {
  122. this.edit({});
  123. },
  124. edit (record) {
  125. getAction("/sys/annountCement/findAlready",{id:record.id}).then(res=>{
  126. if (res.success) {
  127. if(res.result != null){
  128. this.dataSource=res.result;
  129. console.log(this.userAlready)
  130. this.disable = false;
  131. this.visible = true;
  132. }else{
  133. this.$message.warning("全体通知暂不支持查看详情")
  134. }
  135. }
  136. })
  137. },
  138. close () {
  139. this.$emit('close');
  140. this.visible = false;
  141. },
  142. handleCancel () {
  143. this.visible = false;
  144. },
  145. // 子modal回调
  146. choseUser:function(userList){
  147. this.selectedUser = [];
  148. this.userIds = [];
  149. for(var i=0;i<userList.length;i++){
  150. //update--begin--autor:wangshuai-----date:20200601------for:系统公告选人后,不能删除------
  151. var user={};
  152. user.label =userList[i].realname;
  153. user.key=userList[i].id;
  154. this.selectedUser.push(user);
  155. //update--end--autor:wangshuai-----date:20200601------for:系统公告选人后,不能删除------
  156. this.userIds += userList[i].id+","
  157. }
  158. },
  159. handleChange(userList) {
  160. if (userList) {
  161. this.userIds = [];
  162. var users=[];
  163. for (var i = 0; i < userList.length; i++) {
  164. var user={};
  165. user.id=userList[i].key;
  166. user.realname=userList[i].label;
  167. this.userIds += userList[i].key + ',';
  168. users.push(user);
  169. }
  170. }
  171. this.$refs.UserListModal.edit(users,this.userIds);
  172. }
  173. }
  174. }
  175. </script>
  176. <style scoped>
  177. </style>