index.vue 8.1 KB

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