update_notice.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. <template>
  2. <div class="integral_statistics_box" v-loading="noticeLoad">
  3. <el-row>
  4. <el-col :span="24" style="height:60px;line-height:60px;">
  5. <el-col :span="6" style="color:#9e9d9d;padding-left:25px;max-width: 280px;">系统公告列表</el-col>
  6. <el-col :span="18" style="padding-left:30px;">
  7. <span style="font-size:16px;">{{articleOne.title?articleOne.title:''}}</span>
  8. <span style="font-size:15px;margin-left:25px;color:#9e9d9d">{{articleOne.publish_time?articleOne.publish_time:''}}</span>
  9. </el-col>
  10. </el-col>
  11. </el-row>
  12. <el-row class="architecture">
  13. <el-col :span="6" class="rule_class_box RuleLeft" style="height:700px;max-width: 280px;">
  14. <div >
  15. <el-tree v-show="announcement.length != 0" ref="tree" :data="announcement" :props="defaultProps" node-key="id"
  16. @node-click="dept_click" :expand-on-click-node="false" :highlight-current="true" class="cate-tree"></el-tree>
  17. <div v-show="announcement.length == 0" class="" style="margin-top: 100px;">
  18. <div style="color:#909399; text-align: center; line-height:50px">暂无数据</div>
  19. </div>
  20. </div>
  21. </el-col>
  22. <el-col :span="17" class="contentRig RuleRight" style="height:700px;overflow-y:auto" v-loading="detailsLoad">
  23. <div v-if="announcement.length!=0" v-html="aAtripOfDetails" style="padding:15px 0 0 15px;"></div>
  24. <div v-else style="text-align:center;margin-top:100px;">
  25. <img src="@/assets/image/nodata.png" style="width: 266px;height: 182px;margin: 30px auto;">
  26. <div style="color:#909399;">暂无数据</div>
  27. </div>
  28. </el-col>
  29. </el-row>
  30. </div>
  31. </template>
  32. <script>
  33. var aS = null;
  34. export default {
  35. data() {
  36. return {
  37. articleOne:{},
  38. announcement:[],
  39. noticeLoad:false,
  40. defaultProps: {
  41. label: 'title',
  42. },
  43. aAtripOfDetails:'',
  44. detailsLoad:false,
  45. };
  46. },
  47. components: {},
  48. watch: {
  49. },
  50. created() {
  51. },
  52. mounted() {
  53. this.noticeList()
  54. },
  55. methods: {
  56. noticeList(){
  57. this.noticeLoad = true
  58. let params = {
  59. page:1,
  60. page_size:2000,
  61. }
  62. this.$axios('get','/api/announcement/list',params).then((res)=>{
  63. if(res.data.code == 1){
  64. let list = res.data.data.list
  65. this.announcement = list
  66. this.$nextTick(() => {
  67. if(list[0]){
  68. this.articleOne = list[0]
  69. }
  70. this.$refs.tree.setCurrentKey(this.articleOne.id);
  71. this.noticeDetails()
  72. });
  73. }
  74. }).finally(()=>{
  75. this.noticeLoad = false
  76. })
  77. },
  78. noticeDetails(){
  79. this.detailsLoad = true
  80. this.$axios('get','/api/announcement/info',{announcement_id:this.articleOne.id}).then((res)=>{
  81. if(res.data.code == 1){
  82. this.aAtripOfDetails=res.data.data.focus+res.data.data.update_msg
  83. }
  84. }).finally(()=>{
  85. this.detailsLoad = false
  86. })
  87. },
  88. dept_click(item) {
  89. this.detailsLoad = true
  90. this.articleOne = item
  91. if(aS!=null){
  92. clearTimeout(aS)
  93. }
  94. aS=setTimeout(()=>{
  95. this.noticeDetails()
  96. },500)
  97. },
  98. },
  99. };
  100. </script>
  101. <style scoped lang="scss">
  102. .integral_statistics_box {
  103. min-width:980px;
  104. background-color: #ffffff;
  105. padding: 0 20px 0 0;
  106. min-height: calc(100vh - 160px);
  107. }
  108. // .cate-tree {
  109. // margin-top: 16px;
  110. // }
  111. .cate-tree ::v-deep .is-focusable .el-tree-node__content:hover{
  112. background:#F5F7FA !important;
  113. }
  114. .rule_class_box{
  115. border-top: 1px solid #f0f0f0;
  116. }
  117. .rule_class_box ::v-deep .el-tree--highlight-current{
  118. .el-tree-node{
  119. border-bottom:1px #f0f0f0 solid;
  120. }
  121. .el-tree-node__content{
  122. background-color: rgb(255, 255, 255);
  123. height:56px;
  124. line-height:56px;
  125. }
  126. .is-current{
  127. .el-tree-node__content{
  128. .el-icon-caret-right{
  129. // color:#409EFF !important;
  130. }
  131. .el-tree-node__label{
  132. color:#409EFF !important;
  133. }
  134. }
  135. .el-tree-node__children{
  136. .el-icon-caret-right{
  137. color:#C0C4CC !important;
  138. }
  139. .el-tree-node__label{
  140. color:#606266 !important;
  141. }
  142. }
  143. }
  144. }
  145. .contentRig{
  146. margin-left: 20px;
  147. border-top:1px #f0f0f0 solid;
  148. }
  149. .architecture {
  150. display: flex;
  151. // text-align: center;
  152. // margin-top:20px;
  153. padding-left: 0px;
  154. background-color: #fff;
  155. width: 100%;
  156. overflow: hidden;
  157. cursor: default;
  158. min-height: calc(60vh - 160px);
  159. }
  160. .architecture .RuleLeft {
  161. overflow-x: hidden;
  162. display: block;
  163. text-align: center;
  164. // padding: 20px 10px;
  165. border-right: none;
  166. overflow-y: auto;
  167. overflow-x: none;
  168. }
  169. /*滚动条的宽度*/
  170. .architecture .RuleLeft::-webkit-scrollbar {
  171. width: 9px;
  172. height: 9px;
  173. }
  174. .architecture .RuleRight::-webkit-scrollbar {
  175. width: 9px;
  176. height: 9px;
  177. }
  178. /*外层轨道。可以用display:none让其不显示,也可以添加背景图片,颜色改变显示效果*/
  179. .architecture .RuleLeft::-webkit-scrollbar-track {
  180. width: 6px;
  181. background-color: #fff0;
  182. -webkit-border-radius: 2em;
  183. -moz-border-radius: 2em;
  184. border-radius: 2em;
  185. }
  186. .architecture .RuleRight::-webkit-scrollbar-track {
  187. width: 6px;
  188. background-color: #fff0;
  189. -webkit-border-radius: 2em;
  190. -moz-border-radius: 2em;
  191. border-radius: 2em;
  192. }
  193. /*滚动条的设置*/
  194. .architecture .RuleLeft::-webkit-scrollbar-thumb {
  195. background-color: #fff0;
  196. background-clip: padding-box;
  197. min-height: 28px;
  198. -webkit-border-radius: 2em;
  199. -moz-border-radius: 2em;
  200. border-radius: 2em;
  201. }
  202. .architecture .RuleRight::-webkit-scrollbar-thumb {
  203. background-color: #fff0;
  204. background-clip: padding-box;
  205. min-height: 28px;
  206. -webkit-border-radius: 2em;
  207. -moz-border-radius: 2em;
  208. border-radius: 2em;
  209. }
  210. /*滚动条移上去的背景*/
  211. .architecture .RuleLeft:hover::-webkit-scrollbar-thumb {
  212. overflow-x: none;
  213. background-color: rgba(144, 147, 153, 0.3);
  214. }
  215. .architecture .RuleRight:hover::-webkit-scrollbar-thumb {
  216. background-color: rgba(115, 118, 124, 0.3);
  217. }
  218. </style>