messageNotification.vue 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <template>
  2. <!-- 消息通知 -->
  3. <div class="messageNotification">
  4. <div class="pAHeader">
  5. <div class="pAHeader1">消息通知</div>
  6. </div>
  7. <hr>
  8. <div class="twoSelectInp">
  9. <div class="selectTwo">
  10. <div class="selectsBlock">
  11. <el-input v-model="selectInput" style="width:200px" placeholder="请输入"></el-input>
  12. <el-button type="primary" class="btn2" >查询</el-button>
  13. </div>
  14. </div>
  15. <el-button type="primary" class="btn" @click="addMessage" size="mini">新建全站通知</el-button>
  16. </div>
  17. <!-- 通知表格开始 -->
  18. <div class="projectBlock">
  19. <el-table
  20. :data="tableData"
  21. tooltip-effect="dark"
  22. stripe
  23. class="fontSize"
  24. :header-cell-style="{ background: '#f2f2f2',color:'#000' }"
  25. >
  26. <el-table-column
  27. prop="projectName"
  28. label="通知内容"
  29. align="center"
  30. min-width="25%">
  31. </el-table-column>
  32. <el-table-column
  33. prop="founder"
  34. label="创建者"
  35. align="center"
  36. min-width="20%">
  37. </el-table-column>
  38. <el-table-column
  39. prop="date"
  40. label="创建时间"
  41. align="center"
  42. min-width="25%">
  43. </el-table-column>
  44. <el-table-column
  45. prop="operation"
  46. label="操作"
  47. align="center"
  48. min-width="30%"
  49. >
  50. <template #default="scope">
  51. <div class="operations">
  52. <!-- <el-button type="primary" > -->
  53. <el-button type="primary" size="mini" @click="lookIntro(scope)">查看信息</el-button>
  54. <el-button type="primary" size="mini" @click="deletes" >删除</el-button>
  55. <!-- </el-button> -->
  56. </div>
  57. </template>
  58. </el-table-column>
  59. </el-table>
  60. </div>
  61. <!-- 通知表格结束-->
  62. <!-- 添加全站通知开始 -->
  63. <el-dialog
  64. title="添加全站通知"
  65. :visible.sync="dialogVisible"
  66. width="600px"
  67. class="addDialog">
  68. <div class="addDialogLogo">LOGO</div>
  69. <div class="addDialogMid">
  70. <div class="addDialogTit">
  71. <span>通知标题</span>
  72. <el-input v-model="input" placeholder="请输入内容"></el-input>
  73. </div>
  74. <div class="addDialogTit addDialogCon">
  75. <span>通知内容</span>
  76. <el-input
  77. type="textarea"
  78. :rows="10"
  79. resize="none"
  80. placeholder="请输入内容"
  81. v-model="textarea">
  82. </el-input>
  83. </div>
  84. </div>
  85. <span slot="footer" class="dialog-footer">
  86. <el-button type="primary" @click="init" class="btn5">确认添加</el-button>
  87. <el-button @click="init" class="btn5">取 消</el-button>
  88. </span>
  89. </el-dialog>
  90. <!-- 添加全站通知结束-->
  91. <!-- 删除通知开始 -->
  92. <el-dialog
  93. title="删除通知"
  94. :visible.sync="dialogVisible1"
  95. width="600px"
  96. class="addDialog">
  97. <div class="addDialogLogo">LOGO</div>
  98. <span class="deleteContent">确定删除通知</span>
  99. <span slot="footer" class="dialog-footer">
  100. <el-button type="primary" @click="dialogVisible1=false" class="btn5">确认删除</el-button>
  101. <el-button @click="dialogVisible1=false" class="btn5" >取消</el-button>
  102. </span>
  103. </el-dialog>
  104. <!-- 删除通知结束-->
  105. <!-- 查看通知开始 -->
  106. <el-dialog
  107. title="查看通知"
  108. :visible.sync="dialogVisible2"
  109. width="600px"
  110. class="addDialog">
  111. <div class="addDialogLogo">LOGO</div>
  112. <div class="addDialogMid">
  113. <div class="addDialogTit1">
  114. <div style="font-size:18px;color:#000">关于"一校一案"创客有关通知</div>
  115. <div style="margin-top: 13px;font-size: 16px;">蝎子莱莱</div>
  116. </div>
  117. <hr>
  118. <div class="addDialogTit2">
  119. <p>
  120. 活过,总要留下些什么
  121. 每一个活过的人,都能给后人的路途上添些光亮,也许是一颗巨
  122. 星,也许是一把火炬,也许只是一支含泪的蜡烛
  123. -《奶奶的星星》
  124. </p>
  125. </div>
  126. </div>
  127. <span slot="footer" class="dialog-footer">
  128. <el-button type="primary" @click="dialogVisible2=false" class="btn5">关闭</el-button>
  129. </span>
  130. </el-dialog>
  131. <!-- 查看通知结束 -->
  132. </div>
  133. </template>
  134. <script>
  135. export default {
  136. data() {
  137. return {
  138. textarea:'',
  139. //查询框
  140. selectInput:"",
  141. dialogVisible:false,
  142. dialogVisible1:false,
  143. dialogVisible2:false,
  144. input:'',
  145. options:[],
  146. options1:[],
  147. options2:[],
  148. options3:[],
  149. options4:[],
  150. tableData:[{
  151. projectName:'创业孵化基地企业情况信息表',
  152. date:'2022-11-12 10:18',
  153. size:'50k',
  154. founder:'黄猿'
  155. },
  156. {
  157. projectName:'创业孵化基地企业情况信息表',
  158. size:'50k',
  159. date:'2022-11-12 10:18',
  160. founder:'黄猿'
  161. }
  162. ],
  163. pavalues:{
  164. value:'',
  165. value1:'',
  166. value2:'',
  167. value3:'',
  168. value4:'',
  169. }
  170. }
  171. },
  172. methods:{
  173. deletes(){
  174. this.dialogVisible1=true;
  175. },
  176. init(){
  177. //重置
  178. console.log(this.textarea)
  179. console.log(this.input)
  180. if(this.textarea==''||this.input=='')return;
  181. const date = new Date();
  182. let data = {
  183. projectName:this.input,
  184. date:`${date.getFullYear()}-${date.getMonth()+1}-${date.getDate()} ${date.getHours()}:${date.getMinutes()}`,
  185. founder:"覃罡彤",
  186. }
  187. this.tableData.push(data);
  188. this.dialogVisible=false;
  189. this.dialogVisible1=false;
  190. this.dialogVisible2=false;
  191. },
  192. addMessage(){
  193. this.dialogVisible=true;
  194. },
  195. lookIntro(){
  196. this.dialogVisible2=true;
  197. }
  198. }
  199. }
  200. </script>
  201. <style lang="less">
  202. .messageNotification{
  203. .el-dialog{
  204. border-radius:5px;
  205. overflow: hidden;
  206. }
  207. .btn{
  208. height: 35px;
  209. width: 125px;
  210. background: #477edd;
  211. font-size: 16px;
  212. }
  213. .addDialog{
  214. font-size: 18px;
  215. .deleteContent{
  216. margin: 30px 0;
  217. font-size: 22px;
  218. color: #000;
  219. }
  220. .addDialogLogo{
  221. width: 60px;
  222. height: 30px;
  223. line-height: 30px;
  224. background: #f2f2f2;
  225. position: absolute;
  226. left: 20px; top: 15px;
  227. }
  228. .el-dialog__header{
  229. background: #32455b;
  230. }
  231. .el-dialog__title{
  232. color:#fff;
  233. font-size: 22px;
  234. }
  235. .addDialogMid{
  236. box-sizing: border-box;
  237. padding:0 60px 0 10px;
  238. .addDialogTit{
  239. display: flex;
  240. span{
  241. width: 80px;
  242. font-size: 16px;
  243. line-height: 40px;
  244. text-align: left;
  245. }
  246. }
  247. .addDialogTit1{
  248. display: flex;
  249. justify-content: space-between;
  250. margin-bottom: 15px;
  251. }
  252. .addDialogTit2{
  253. margin-top: 10px;
  254. font-size: 16px;
  255. color: #000;
  256. text-indent: 2em;
  257. }
  258. .addDialogCon{
  259. margin-top: 20px;
  260. }
  261. }
  262. .dialog-footer{
  263. display: flex;
  264. justify-content: center;
  265. box-sizing: border-box;
  266. padding-left: 50px;
  267. // background-color: red;
  268. .btn5{
  269. font-size: 16px;
  270. }
  271. }
  272. }
  273. }
  274. </style>