leaderHprocess.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  1. <template>
  2. <div class="pmain">
  3. <div class="layui-col-md6" v-for="(ite, index) in funcData" :key="index">
  4. <div class="mc-nomal-title">
  5. <span style="font-size: 15px">{{ ite.lineName }}</span>
  6. </div>
  7. <div class="bg-style">
  8. <div class="mc-function-box">
  9. <div
  10. v-for="item in ite.unitList"
  11. :key="item.unitName"
  12. class="function-box"
  13. >
  14. <div
  15. v-for="items in item.modList"
  16. :key="items.moduleName"
  17. class="f-box-info"
  18. >
  19. <el-badge
  20. :value="items.noTaskNum"
  21. :max="99"
  22. :hidden="items.noTaskNum == 0"
  23. >
  24. <div class="elbadgefather">
  25. <div class="elbadgeson1">
  26. <i
  27. @click="jumpTo(items)"
  28. v-if="items.sts == '0' && items.icon"
  29. v-html="items.icon"
  30. >
  31. {{ items.icon }}
  32. </i>
  33. <i
  34. @click="jumpTo(items)"
  35. :class="'el-icon-user'"
  36. v-if="items.sts == '0' && !items.icon"
  37. style="background: #0b82ff"
  38. ></i>
  39. <i
  40. :class="'iconfont icon-tongji'"
  41. v-if="items.sts != '0'"
  42. style="background: #ddd"
  43. ></i>
  44. <el-tooltip
  45. class="item"
  46. effect="dark"
  47. :content="items.moduleName"
  48. placement="bottom"
  49. >
  50. </el-tooltip>
  51. </div>
  52. <div class="elbadgeson2">
  53. <div
  54. class="span"
  55. style="float: right"
  56. @click="jumpTo(items)"
  57. >
  58. {{ items.moduleName }}
  59. </div>
  60. <div class="f-box-tit">
  61. {{ item.unitName }}
  62. </div>
  63. </div>
  64. </div>
  65. </el-badge>
  66. </div>
  67. <div class="f-box-info" v-if="item.modList.length == 0"></div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </div>
  73. </template>
  74. <script>
  75. export default {
  76. data() {
  77. return {
  78. funcData: [],
  79. boxHeight: {
  80. height: "auto",
  81. },
  82. outsideModules: [],
  83. groupName: "",
  84. };
  85. },
  86. methods: {
  87. getList() {
  88. let loginNo = JSON.parse(window.sessionStorage.userInfo).loginNo;
  89. this.$http({
  90. url: "/market/cmkline/queryInfo",
  91. method: "post",
  92. headers: {
  93. "Content-Type": "application/json",
  94. },
  95. data: {},
  96. }).then((res) => {
  97. this.funcData = res.data.lineList;
  98. this.outsideModules = res.data.outsideModules;
  99. this.groupName = res.data.groupName;
  100. });
  101. },
  102. hAuto() {
  103. let boxLinel = this.$refs.boxLinel.offsetHeight;
  104. let boxLiner = this.$refs.boxLiner.offsetHeight;
  105. if (boxLinel > boxLiner) {
  106. this.boxHeight.height = boxLinel + "px";
  107. } else {
  108. this.boxHeight.height = boxLiner + "px";
  109. }
  110. },
  111. jumpTo(v) {
  112. if (v.moduleUrl) {
  113. if (this.groupName == "default") {
  114. //加入外部人员权限控制start
  115. if (this.outsideModules.length > 0) {
  116. let moduleIndex = -1;
  117. for (let i = 0; i < this.outsideModules.length; i++) {
  118. if (this.outsideModules[i].moduleUrl == v.moduleUrl) {
  119. moduleIndex = i;
  120. break;
  121. }
  122. }
  123. if (moduleIndex < 0) {
  124. global.$vm.$notify.error({
  125. title: "提示",
  126. message: "暂无使用权限",
  127. });
  128. return;
  129. }
  130. }
  131. //加入外部人员权限控制end
  132. } else {
  133. let childrenMenus = JSON.parse(window.sessionStorage.childrenMenus);
  134. if (childrenMenus != undefined && childrenMenus.length > 0) {
  135. let moduleIndex = -1;
  136. for (let a = 0; a < childrenMenus.length; a++) {
  137. if (childrenMenus[a].jspUrl == v.moduleUrl) {
  138. moduleIndex = a;
  139. break;
  140. }
  141. }
  142. if (moduleIndex < 0) {
  143. global.$vm.$notify.error({
  144. title: "提示",
  145. message: "暂无使用权限",
  146. });
  147. return;
  148. }
  149. }
  150. }
  151. this.$router.push({
  152. path: v.moduleUrl,
  153. });
  154. this.setabList(v.moduleName, v.moduleUrl);
  155. }
  156. },
  157. setabList(n, p) {
  158. let params = {
  159. children: "",
  160. name: n,
  161. rountPath: p,
  162. target: "_self",
  163. };
  164. // console.log(this.$store.state.tabList)
  165. // for (let i = 0; i < this.$store.state.tabList.length; i++) {
  166. // if (this.$store.state.tabList[i].name === params.name) {
  167. // this.$store.state.tabList[i] = params;
  168. // }
  169. // }
  170. // let set = new Set([...this.$store.state.tabList, params]);
  171. // set.add(params);
  172. // this.$store.commit("setDefaultActive", params.rountPath);
  173. // this.$store.commit("setTabList", Array.from(set));
  174. },
  175. },
  176. mounted() {},
  177. created() {
  178. this.getList();
  179. },
  180. };
  181. </script>
  182. <style scoped lang="scss">
  183. .mc-red {
  184. color: #ff6060;
  185. }
  186. .pmain {
  187. display: flex;
  188. flex-wrap: wrap;
  189. justify-content: space-between;
  190. .layui-col-md6 {
  191. display: inline-block;
  192. margin-bottom: 10px;
  193. width: 100%;
  194. background: #fafafa;
  195. border-radius: 5px;
  196. }
  197. }
  198. .mc-nomal-title {
  199. padding-left: 38px;
  200. background: url(../../../../src/assets/dbyb-bt-bj3.jpg) no-repeat 10px center;
  201. // font-size: 20px;
  202. line-height: 20px;
  203. width: 150px;
  204. // font-weight: 500;
  205. color: rgb(255, 255, 255);
  206. padding-bottom: 10px;
  207. padding-top: 10px;
  208. }
  209. .mc-nomal-checked {
  210. color: #999;
  211. font-size: 12px;
  212. }
  213. .mc-title-box {
  214. display: flex;
  215. justify-content: space-between;
  216. }
  217. .mc-nomal-show-num {
  218. display: flex;
  219. justify-content: space-between;
  220. text-align: center;
  221. margin-top: 10px;
  222. .num-box {
  223. margin-right: 40px;
  224. }
  225. }
  226. .mc-right-title {
  227. margin-top: 10px;
  228. text-align: right;
  229. padding-right: 20px;
  230. }
  231. .mc-nomal-num {
  232. font-size: 20px;
  233. }
  234. .bg-style {
  235. height: 60px;
  236. overflow-y: auto;
  237. margin: 5px;
  238. .custom-tree-node {
  239. width: 100%;
  240. }
  241. .tree-box {
  242. overflow: hidden;
  243. height: 26px;
  244. width: 100%;
  245. img {
  246. width: 26px;
  247. height: 26px;
  248. float: left;
  249. }
  250. div {
  251. display: inline-block;
  252. height: 26px;
  253. line-height: 26px;
  254. }
  255. }
  256. }
  257. .mc-function-box {
  258. margin-left: 5px;
  259. margin-right: 5px;
  260. .function-box {
  261. display: inline;
  262. .f-box-tit {
  263. font-size: 14px;
  264. color: #4aaff5;
  265. }
  266. .f-box-info {
  267. display: inline-block;
  268. height: 60px;
  269. width: 245px;
  270. text-align: center;
  271. i {
  272. width: 40px;
  273. height: 40px;
  274. border-radius: 18px;
  275. display: block;
  276. color: #fff;
  277. text-align: center;
  278. line-height: 40px;
  279. cursor: pointer;
  280. }
  281. .span {
  282. font-size: 13px;
  283. text-align: left;
  284. width: 200px;
  285. // height: 40px;
  286. line-height: 20px;
  287. cursor: pointer;
  288. }
  289. .f-box-tit{
  290. font-size: 13px;
  291. text-align: left;
  292. width: 200px;
  293. // height: 20px;
  294. line-height: 20px;
  295. cursor: pointer;
  296. }
  297. .span:hover {
  298. color: blue;
  299. }
  300. .mybadge {
  301. top: 0;
  302. right: 40px;
  303. }
  304. .icon {
  305. width: 100% !important;
  306. height: 100% !important;
  307. }
  308. }
  309. }
  310. .function-box:nth-child(2) {
  311. .f-box-tit {
  312. color: #9dc914;
  313. }
  314. }
  315. .function-box:nth-child(3) {
  316. .f-box-tit {
  317. color: #ffa042;
  318. }
  319. }
  320. .function-box:nth-child(4) {
  321. .f-box-tit {
  322. color: palevioletred;
  323. }
  324. }
  325. }
  326. ::v-deep .el-badge__content {
  327. margin-top: 8px;
  328. margin-right: 35px;
  329. }
  330. .elbadgefather{
  331. display: flex;
  332. }
  333. .elbadgeson2{
  334. display: flex;
  335. flex-direction: column;
  336. }
  337. </style>