gateWayNotificationDetail.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <div class="notificationDetail">
  3. <el-dialog title="公告详情" custom-class="startToDia" v-model="dialogVisible" width="900px" :close-on-click-modal="false">
  4. <div class="notifcaFrom">
  5. <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" :validate-on-rule-change="false">
  6. <el-form-item label="公告标题" prop="noticeTitle">
  7. <el-input v-model="ruleForm.noticeTitle" placeholder="请输入公告标题" />
  8. </el-form-item>
  9. <el-form-item label="公告内容" prop="noticeContent">
  10. <el-input v-model="ruleForm.noticeContent"
  11. type="textarea" :rows="10" placeholder="请输入公告内容"></el-input>
  12. </el-form-item>
  13. <el-form-item label="发布对象" prop="sendTo">
  14. <el-select v-model="ruleForm.sendTo" placeholder="请选择发布对象">
  15. <el-option
  16. v-for="item in sendToData"
  17. :key="item.value"
  18. :label="item.label"
  19. :value="item.value">
  20. </el-option>
  21. </el-select>
  22. </el-form-item>
  23. <el-row>
  24. <el-col :span="12" v-if="ruleForm.sendTo === '个别部门'">
  25. <el-form-item label="个别部门" prop="sendToContent">
  26. <el-select v-model="ruleForm.sendToContent" multiple collapse-tags placeholder="请选择部门">
  27. <el-option
  28. v-for="item in departData"
  29. :key="item.id"
  30. :label="item.keyName"
  31. :value="item.id">
  32. </el-option>
  33. </el-select>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="12">
  37. <el-form-item label="排序">
  38. <el-input-number v-model="ruleForm.serialNumber" :min="1" />
  39. </el-form-item>
  40. </el-col>
  41. </el-row>
  42. <el-form-item label="附件">
  43. <div class="fliesHeader">
  44. <span>附件名</span>
  45. <span>发送单位</span>
  46. <span>操作</span>
  47. </div>
  48. <div v-for="it in filesListEdit" :key="it">
  49. <div class="fliesMain">
  50. <div>
  51. <img :src="file" style="margin-right: 10px" >
  52. <span class="fliesMainSpan spanOne">{{it}}</span>
  53. </div>
  54. <span class="fliesMainSpan spanTwo" style="font-size:14px">{{it.releaseDeptName}}</span>
  55. <!-- <span>{{userMes.unitName}}</span> -->
  56. <div class="fileOperate">
  57. <div @click="previewFile(it)" style="cursor:pointer">
  58. <img :src="yulan" style="margin-right: 10px;" >
  59. <span style="font-size:14px">预览</span>
  60. </div>
  61. </div>
  62. </div>
  63. </div>
  64. </el-form-item>
  65. </el-form>
  66. </div>
  67. </el-dialog>
  68. </div>
  69. </template>
  70. <script>
  71. import yulan from '../../assets/btnIcon/yulan.png'
  72. import fileDelete from '../../assets/btnIcon/fileDelete.png'
  73. export default {
  74. data() {
  75. return {
  76. dialogVisible: false,
  77. ruleForm: {
  78. serialNumber: 1,
  79. noticeTitle: '',
  80. noticeContent: '',
  81. sendTo: '',
  82. sendToContent: [],
  83. releaseDept: '',
  84. releasePeople: '',
  85. },
  86. filesListEdit: [],
  87. yulan: yulan,
  88. fileDelete: fileDelete
  89. }
  90. },
  91. methods: {
  92. init(row) {
  93. this.dialogVisible = true
  94. this.filesListEdit = []
  95. this.ruleForm = {
  96. serialNumber: row.serialNumber*1,
  97. noticeTitle: row.noticeTitle,
  98. noticeContent: row.noticeContent,
  99. sendTo: row.sendTo,
  100. sendToContent: row.sendToContent.split(','),
  101. releaseDept: row.releaseDept,
  102. releasePeople: row.releasePeople
  103. }
  104. let filesArr = row.noticeAnnex.split(',')
  105. this.filesListEdit = filesArr
  106. },
  107. }
  108. }
  109. </script>
  110. <style lang="less">
  111. .notificationDetail{
  112. .el-overlay{
  113. .startToDia{
  114. margin-top: 5vh;
  115. background: #EDEFF5;
  116. .el-dialog__body{
  117. padding: 30px 60px 30px 20px !important;
  118. .notifcaFrom{
  119. .el-select, .el-input{
  120. width: 100%;
  121. }
  122. .el-input{
  123. height: 30px;
  124. }
  125. .uploadFiles{
  126. .el-button{
  127. height: 25px !important;
  128. }
  129. }
  130. .fliesHeader{
  131. width: 100%;
  132. display: flex;
  133. justify-content: space-around;
  134. span{
  135. font-size: 14px;
  136. }
  137. }
  138. .fliesMain{
  139. width: 100%;
  140. display: flex;
  141. .fliesMainSpan{
  142. display: inline-block;
  143. width: 260px;
  144. overflow: hidden;
  145. text-overflow: ellipsis;
  146. white-space: nowrap;
  147. }
  148. .spanOne{
  149. color: #1063CB;
  150. font-size: 14px;
  151. }
  152. .fileOperate{
  153. width: 160px;
  154. display: flex;
  155. justify-content: space-around;
  156. .removeImg{
  157. margin-right: 10px;
  158. position: relative;
  159. top: 2px;
  160. }
  161. }
  162. .removeDiv{
  163. width: 160px;
  164. .removeImg{
  165. margin: 0 10px 0 20px;
  166. position: relative;
  167. top: 3px;
  168. }
  169. }
  170. }
  171. }
  172. .flowSty{
  173. width: 100%;
  174. height: 70vh;
  175. }
  176. }
  177. .el-dialog__footer{
  178. background: #fff;
  179. border-radius: 0 0 10px 10px;
  180. text-align: left;
  181. .notificationFooter{
  182. margin-left: 20px;
  183. .el-button{
  184. height: 30px !important;
  185. }
  186. }
  187. }
  188. }
  189. }
  190. }
  191. </style>