index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <h2 style="margin-top: 20px;">知识库</h2>
  5. <div class="adv-type">
  6. <div
  7. class="wfour"
  8. @click="jumpinfo('/knowledgeManagement', '知识库管理')"
  9. >
  10. <span><i class="el-icon-folder-opened"></i></span>
  11. <span>知识库管理</span>
  12. </div>
  13. <!-- <div
  14. class="wfour"
  15. @click="jumpinfo('/knowledgeExaminetop', '知识库审核')"
  16. >
  17. <span><i class="el-icon-folder-opened"></i></span>
  18. <span>知识库审核</span>
  19. </div> -->
  20. <div
  21. class="wfour"
  22. @click="jumpinfo('/knowledgeTypetop', '知识类型管理')"
  23. v-if="lockFlag == 'add'"
  24. >
  25. <span><i class="el-icon-folder-opened"></i></span>
  26. <span>知识类型管理</span>
  27. </div>
  28. <div
  29. class="wfour"
  30. @click="
  31. jumpinfo('/knowledgeCatalogtop', '知识库目录管理')
  32. "
  33. v-if="lockFlag == 'add'"
  34. >
  35. <span><i class="el-icon-folder-opened"></i></span>
  36. <span>知识库目录管理</span>
  37. </div>
  38. </div>
  39. </div>
  40. </fullscreen>
  41. </template>
  42. <script>
  43. import mySearch from "../../../components/search.vue";
  44. import myMessage from "../../../components/myMessage.vue";
  45. import toolList from "../../../components/toolList";
  46. import myUpload from "../../../components/upload";
  47. export default {
  48. components: {
  49. mySearch,
  50. myMessage,
  51. toolList,
  52. myUpload
  53. },
  54. data() {
  55. return {
  56. fullscreen: false,
  57. lockFlag: "see",
  58. province: true
  59. };
  60. },
  61. methods: {
  62. jumpinfop(p, v, n) {
  63. this.$router.push({
  64. path: p,
  65. query: {
  66. type: v
  67. }
  68. });
  69. this.setabList(n, p + "?type=" + v);
  70. },
  71. jumpinfo(p, n) {
  72. this.$router.push({
  73. path: p
  74. });
  75. this.setabList(n, p);
  76. },
  77. setabList(n, p) {
  78. let params = {
  79. children: "",
  80. name: n,
  81. rountPath: p,
  82. target: "_self"
  83. };
  84. for (let i = 0; i < this.$store.state.tabList.length; i++) {
  85. if (this.$store.state.tabList[i].name === params.name) {
  86. this.$store.state.tabList[i] = params;
  87. }
  88. }
  89. let set = new Set([...this.$store.state.tabList, params]);
  90. set.add(params);
  91. this.$store.commit("setDefaultActive", params.rountPath);
  92. this.$store.commit("setTabList", Array.from(set));
  93. },
  94. getRole(){
  95. this.$http({
  96. url:"/market/mkNewknowledge/queryRole",
  97. method: "post",
  98. headers: {
  99. "Content-Type": "application/json",
  100. },
  101. data: {}
  102. }).then(res => {
  103. console.log("vue"+res.data);
  104. if(res.data == "1"){
  105. this.lockFlag = 'add';//管理员
  106. }else{
  107. this.lockFlag = 'updata';//普通员工
  108. }
  109. });
  110. },
  111. // getUser() {
  112. // this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  113. // let Menus = JSON.parse(window.sessionStorage.childrenMenus);
  114. // for (let i = 0; i < Menus.length; i++) {
  115. // if (
  116. // Menus[i].systemflag == 1 &&
  117. // Menus[i].jspUrl == "/publicityAccount"
  118. // ) {
  119. // this.lockFlag = "add"; //省级
  120. // }
  121. // if (
  122. // Menus[i].systemflag == 1 &&
  123. // Menus[i].jspUrl == "/publicity"
  124. // ) {
  125. // this.lockFlag = "updata"; //管理员
  126. // i = Menus.length;
  127. // }
  128. // }
  129. // for (let i = 0; i < Menus.length; i++) {
  130. // if (
  131. // Menus[i].systemflag == 1 &&
  132. // Menus[i].jspUrl == "/province"
  133. // ) {
  134. // this.province = true; //省公司
  135. // }
  136. // }
  137. // }
  138. },
  139. mounted() {
  140. this.getRole();
  141. // this.getUser();
  142. },
  143. created() {}
  144. };
  145. </script>
  146. <style scoped lang="scss">
  147. .container-box {
  148. height: calc(100vh - 200px);
  149. overflow-y: scroll;
  150. padding-bottom: 20px;
  151. }
  152. .adv-type {
  153. margin-top: 20px;
  154. display: flex;
  155. justify-content: space-between;
  156. flex-wrap: wrap;
  157. // border: 1px solid #ddd;
  158. border-radius: 5px;
  159. padding: 20px;
  160. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
  161. div {
  162. width: 33%;
  163. text-align: center;
  164. height: 80px;
  165. overflow: hidden;
  166. min-width: 100px;
  167. cursor: pointer;
  168. padding-top: 10px;
  169. margin: 10px 0;
  170. }
  171. div:hover {
  172. background: #cfe8fc;
  173. border-radius: 5px;
  174. }
  175. span {
  176. width: 100%;
  177. display: inline-block;
  178. height: 40px;
  179. // line-height: 40px;
  180. i {
  181. color: #0074d9;
  182. font-size: 36px;
  183. }
  184. }
  185. .wfour {
  186. width: 25%;
  187. }
  188. .wfive {
  189. width: 20%;
  190. }
  191. }
  192. </style>