leaderHome.vue 6.9 KB

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