processInitiation.vue 6.7 KB

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