123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- <template>
- <fullscreen :fullscreen.sync="fullscreen" class="container">
- <div class="container-box">
- <h2 style="margin-top: 20px;">知识库</h2>
- <div class="adv-type">
- <div
- class="wfour"
- @click="jumpinfo('/knowledgeManagement', '知识库管理')"
- >
- <span><i class="el-icon-folder-opened"></i></span>
- <span>知识库管理</span>
- </div>
- <!-- <div
- class="wfour"
- @click="jumpinfo('/knowledgeExaminetop', '知识库审核')"
- >
- <span><i class="el-icon-folder-opened"></i></span>
- <span>知识库审核</span>
- </div> -->
- <div
- class="wfour"
- @click="jumpinfo('/knowledgeTypetop', '知识类型管理')"
- v-if="lockFlag == 'add'"
- >
- <span><i class="el-icon-folder-opened"></i></span>
- <span>知识类型管理</span>
- </div>
- <div
- class="wfour"
- @click="
- jumpinfo('/knowledgeCatalogtop', '知识库目录管理')
- "
- v-if="lockFlag == 'add'"
- >
- <span><i class="el-icon-folder-opened"></i></span>
- <span>知识库目录管理</span>
- </div>
- </div>
- </div>
- </fullscreen>
- </template>
- <script>
- import mySearch from "../../../components/search.vue";
- import myMessage from "../../../components/myMessage.vue";
- import toolList from "../../../components/toolList";
- import myUpload from "../../../components/upload";
- export default {
- components: {
- mySearch,
- myMessage,
- toolList,
- myUpload
- },
- data() {
- return {
- fullscreen: false,
- lockFlag: "see",
- province: true
- };
- },
- methods: {
- jumpinfop(p, v, n) {
- this.$router.push({
- path: p,
- query: {
- type: v
- }
- });
- this.setabList(n, p + "?type=" + v);
- },
- jumpinfo(p, n) {
- this.$router.push({
- path: p
- });
- this.setabList(n, p);
- },
- setabList(n, p) {
- let params = {
- children: "",
- name: n,
- rountPath: p,
- target: "_self"
- };
- for (let i = 0; i < this.$store.state.tabList.length; i++) {
- if (this.$store.state.tabList[i].name === params.name) {
- this.$store.state.tabList[i] = params;
- }
- }
- let set = new Set([...this.$store.state.tabList, params]);
- set.add(params);
- this.$store.commit("setDefaultActive", params.rountPath);
- this.$store.commit("setTabList", Array.from(set));
- },
- getRole(){
- this.$http({
- url:"/market/mkNewknowledge/queryRole",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {}
- }).then(res => {
- console.log("vue"+res.data);
- if(res.data == "1"){
- this.lockFlag = 'add';//管理员
- }else{
- this.lockFlag = 'updata';//普通员工
- }
- });
- },
- // getUser() {
- // this.userInfo = JSON.parse(window.sessionStorage.userInfo);
- // let Menus = JSON.parse(window.sessionStorage.childrenMenus);
- // for (let i = 0; i < Menus.length; i++) {
- // if (
- // Menus[i].systemflag == 1 &&
- // Menus[i].jspUrl == "/publicityAccount"
- // ) {
- // this.lockFlag = "add"; //省级
- // }
- // if (
- // Menus[i].systemflag == 1 &&
- // Menus[i].jspUrl == "/publicity"
- // ) {
- // this.lockFlag = "updata"; //管理员
- // i = Menus.length;
- // }
- // }
- // for (let i = 0; i < Menus.length; i++) {
- // if (
- // Menus[i].systemflag == 1 &&
- // Menus[i].jspUrl == "/province"
- // ) {
- // this.province = true; //省公司
- // }
- // }
- // }
- },
- mounted() {
- this.getRole();
- // this.getUser();
- },
- created() {}
- };
- </script>
- <style scoped lang="scss">
- .container-box {
- height: calc(100vh - 200px);
- overflow-y: scroll;
- padding-bottom: 20px;
- }
- .adv-type {
- margin-top: 20px;
- display: flex;
- justify-content: space-between;
- flex-wrap: wrap;
- // border: 1px solid #ddd;
- border-radius: 5px;
- padding: 20px;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
- div {
- width: 33%;
- text-align: center;
- height: 80px;
- overflow: hidden;
- min-width: 100px;
- cursor: pointer;
- padding-top: 10px;
- margin: 10px 0;
- }
- div:hover {
- background: #cfe8fc;
- border-radius: 5px;
- }
- span {
- width: 100%;
- display: inline-block;
- height: 40px;
- // line-height: 40px;
- i {
- color: #0074d9;
- font-size: 36px;
- }
- }
- .wfour {
- width: 25%;
- }
- .wfive {
- width: 20%;
- }
- }
- </style>
|