leaderHome.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285
  1. <template>
  2. <div class="mc-wrap">
  3. <div class="container-box">
  4. <div class="mc-top">
  5. <div class="mc-top-left">
  6. <el-row>
  7. <el-col :span="24">
  8. <div class="car-line">
  9. <el-carousel height="40px" direction="vertical" trigger="click">
  10. <el-carousel-item
  11. v-for="item in noticeData"
  12. :key="item.noticeId"
  13. >
  14. <div class="car-box">
  15. <i class="el-icon-message-solid"></i>
  16. <span>公告</span>
  17. <span style="color: #0b82ff" @click="uploadsee(item)">{{
  18. item.noticeTitle
  19. }}</span>
  20. <span @click="jNotice">更多</span>
  21. </div>
  22. </el-carousel-item>
  23. </el-carousel>
  24. </div>
  25. </el-col>
  26. </el-row>
  27. <el-row>
  28. <el-col :span="24">
  29. <leaderTag :dynamicTags="dynamicTags"></leaderTag>
  30. </el-col>
  31. </el-row>
  32. <el-row>
  33. <div v-if="status">
  34. <el-col :span="18">
  35. <hometask></hometask>
  36. </el-col>
  37. <el-col :span="6">
  38. <numberhits :numHits="numHits"></numberhits>
  39. </el-col>
  40. </div>
  41. <div v-else>
  42. <el-col :span="24">
  43. <hometask></hometask>
  44. </el-col>
  45. </div>
  46. </el-row>
  47. <el-row style="margin-top: 10px">
  48. <ProcessingInstruction></ProcessingInstruction>
  49. </el-row>
  50. </div>
  51. </div>
  52. </div>
  53. </div>
  54. </template>
  55. <script>
  56. import ProcessingInstruction from "./leaderHprocess.vue";
  57. import hometask from "./leaderhomeTask.vue";
  58. import numberhits from "./numberHits.vue";
  59. import leaderTag from "./leaderTag.vue";
  60. export default {
  61. components: {
  62. ProcessingInstruction,
  63. hometask,
  64. numberhits,
  65. leaderTag,
  66. },
  67. data() {
  68. return {
  69. noticeData: [], // 公告数据源
  70. status: true,
  71. dynamicTags: [], //已添加的常用功能
  72. numHits: [], //点击率排行
  73. menuqList: [], //有权限的菜单
  74. };
  75. },
  76. methods: {
  77. //获取员工信息
  78. getpeo() {
  79. this.$http({
  80. url: "/sysmgr/csysdept/queryGroupListByLoginNo",
  81. method: "post",
  82. headers: {
  83. "Content-Type": "application/json",
  84. },
  85. data: {},
  86. }).then((res) => {
  87. if (res.data[0].parentorgid === "00440063000000000000") {
  88. this.status = false;
  89. }
  90. });
  91. },
  92. //获取公告
  93. getNotice() {
  94. this.$http({
  95. url: "/sysmgr/notice/queryPage",
  96. method: "post",
  97. headers: {
  98. "Content-Type": "application/json",
  99. page: '{"pageNo":"' + 1 + '","pageSize":"10"}',
  100. },
  101. data: {
  102. sts: 2,
  103. },
  104. }).then((res) => {
  105. this.noticeData = res.data.data;
  106. });
  107. },
  108. //预览公告
  109. uploadsee(v) {
  110. this.dialogStatus = true;
  111. this.infolist = v;
  112. this.$http({
  113. url: "/sysmgr/cnotice/queryInfo",
  114. method: "post",
  115. headers: {
  116. "Content-Type": "application/json",
  117. },
  118. data: {
  119. noticeId: v.noticeId,
  120. },
  121. }).then((res) => {
  122. this.uploadstatus = !this.uploadstatus;
  123. this.datalist.attList = [];
  124. this.datalist.attList = res.data.attList;
  125. // if(res.data.attList){
  126. // res.data.attList.forEach(item => {
  127. // this.attList.push({
  128. // name: item.fileName,
  129. // url: '',
  130. // id: item.id,
  131. // fileName: item.fileName
  132. // });
  133. // })
  134. // this.datalist.attList = this.attList;
  135. // console.log(this.datalist.attList)
  136. // }
  137. });
  138. },
  139. jNotice() {
  140. this.$router.push("/noticec");
  141. // this.setabList("公告管理","/noticec");
  142. },
  143. //获取初始Tags
  144. getTags() {
  145. this.$http({
  146. url: "/market/usuaFun/queryFun",
  147. method: "post",
  148. headers: {
  149. "Content-Type": "application/json",
  150. },
  151. data: {},
  152. }).then((res) => {
  153. this.dynamicTags = res.data;
  154. });
  155. },
  156. //获取点击量
  157. getnumberHit() {
  158. // this.$http({
  159. // url: "/sysmgr/sys/login/auth/functions",
  160. // method: "post",
  161. // headers: {
  162. // "Content-Type": "application/json",
  163. // },
  164. // data: {
  165. // // roleCode: val.roleCode,
  166. // // roleCode: "647733085966045184"
  167. // },
  168. // }).then((res) => {
  169. // let men = res.data.functions;
  170. // let newmen = [];
  171. // for (let i in men) {
  172. // if (men[i].jspUrl != "#") {
  173. // newmen.push(men[i]);
  174. // }
  175. // }
  176. // console.log("array", newmen);
  177. // this.menuqList = newmen;
  178. // let newmen1 = [];
  179. // for (let b in this.menuqList) {
  180. // for (let a in this.numHits) {
  181. // if (this.menuqList[b].jspUrl == this.numHits[a].jsp_url) {
  182. // newmen1.push(this.numHits[a]);
  183. // }
  184. // }
  185. // }
  186. // console.log(this.numHits)
  187. // console.log([...newmen1]);
  188. // });
  189. this.$http({
  190. url: "/market/clickRate/queryClickRate",
  191. method: "post",
  192. headers: {
  193. "Content-Type": "application/json",
  194. },
  195. data: {},
  196. }).then((res) => {
  197. let men = res.data;
  198. let newmen = [];
  199. for (let i in men) {
  200. if (men[i].jspUrl != "#") {
  201. newmen.push(men[i]);
  202. }
  203. }
  204. this.numHits = newmen;
  205. });
  206. },
  207. },
  208. mounted() {
  209. this.getpeo();
  210. this.getNotice();
  211. this.getTags();
  212. this.getnumberHit();
  213. },
  214. };
  215. </script>
  216. <style lang="scss" scoped>
  217. .mc-wrap {
  218. box-sizing: border-box !important;
  219. margin: 0;
  220. height: calc(100vh - 120px);
  221. overflow: hidden;
  222. width: 100%;
  223. padding-right: 10px;
  224. .container-box {
  225. width: 100%;
  226. height: calc(100% - 40px);
  227. margin-top: 10px;
  228. overflow-y: scroll;
  229. padding: 0 0 0 15px;
  230. }
  231. }
  232. .mc-top {
  233. display: flex;
  234. width: 100%;
  235. }
  236. .mc-wrap .mc-top-left {
  237. width: 100%;
  238. margin-right: 15px;
  239. }
  240. .mc-wrap .mc-top-right {
  241. width: calc(20% - 15px);
  242. background-color: white;
  243. overflow: hidden;
  244. .inner-box {
  245. width: calc(100% + 20px);
  246. background-color: white;
  247. overflow-y: scroll;
  248. }
  249. }
  250. .car-line {
  251. height: 40px;
  252. background: #fff;
  253. border-radius: 5px;
  254. // margin: 10px 0 0 0;
  255. .car-box {
  256. padding: 0 20px;
  257. line-height: 40px;
  258. color: #333;
  259. span {
  260. cursor: pointer;
  261. margin-right: 20px;
  262. }
  263. span:first-child {
  264. cursor: auto;
  265. }
  266. span:last-child {
  267. float: right;
  268. margin-right: 0;
  269. }
  270. }
  271. }
  272. </style>