leaderHprocess.vue 8.3 KB

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