fileListIndex.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <div class="inner-container">
  3. <el-col :span="24" style="padding:20px">
  4. <div style="height: 100%">
  5. <router-view />
  6. </div>
  7. </el-col>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. activeName: "",
  15. showList: [],
  16. routerList: [
  17. {
  18. label: "在线文档管理",
  19. path: "/fileList",
  20. name: "fileList",
  21. sts:0,
  22. num:0
  23. },
  24. ],
  25. };
  26. },
  27. computed: {
  28. menuList: function() {
  29. let arr = [];
  30. this.routerList.map((item) => {
  31. // arr.push(item);
  32. this.showList.map((row) => {
  33. if (item.path == row.jspUrl && row.systemflag == '1') {
  34. arr.push(item);
  35. }
  36. });
  37. });
  38. return arr;
  39. },
  40. },
  41. methods: {
  42. handleClick(val) {
  43. this.activeName = val.path;
  44. for (let i = 0; i < this.routerList.length; i++) {
  45. this.routerList[i].sts = 0;
  46. }
  47. val.sts = 1;
  48. if (this.$route.path != this.activeName) {
  49. this.$router.push(this.activeName);
  50. }
  51. this.getnunm();
  52. },
  53. getnunm(){
  54. this.$http({
  55. url: "/market/filepreTask/queryTaskToDoNumByFunc",
  56. method: "post",
  57. headers: {
  58. "Content-Type": "application/json",
  59. },
  60. data: {},
  61. }).then((res) => {
  62. for (let i = 0; i < res.data.length; i++) {
  63. if(res.data[i].funcCode == '1000'){
  64. this.routerList[2].num = res.data[i].taskNum;
  65. }
  66. if(res.data[i].funcCode == '1001'){
  67. this.routerList[0].num = res.data[i].taskNum;
  68. }
  69. if(res.data[i].funcCode == '1003'){
  70. this.routerList[3].num = res.data[i].taskNum;
  71. }
  72. if(res.data[i].funcCode == '1004'){
  73. this.routerList[1].num = res.data[i].taskNum;
  74. }
  75. }
  76. });
  77. }
  78. },
  79. mounted() {
  80. this.activeName = this.$route.path;
  81. },
  82. created() {
  83. JSON.parse(sessionStorage.childrenMenus).map((item) => {
  84. this.showList.push(item);
  85. });
  86. this.getnunm();
  87. },
  88. watch: {
  89. $route(to, from) {
  90. this.activeName = this.$route.path;
  91. },
  92. },
  93. };
  94. </script>
  95. <style>
  96. .el-tabs__content {
  97. display: none;
  98. }
  99. .spanbox{
  100. display: block;
  101. text-align: center;
  102. padding: 10px 0;
  103. border-right: 3px solid #f1f1f1;
  104. margin-right: 20px;
  105. }
  106. .bg{
  107. border-right: 3px solid #0080FF;
  108. color: #007AFF;
  109. }
  110. </style>