guhongwei 3 rokov pred
rodič
commit
b82443288c

+ 10 - 0
src/assets/css/color-dark.css

@@ -30,6 +30,9 @@
 .sidebar {
   background-color: #242f42 !important;
 }
+.el-menu {
+  background-color: transparent;
+}
 .sidebar-el-menu:not(.el-menu--collapse) {
   background-color: #242f42 !important;
 }
@@ -42,3 +45,10 @@
 .el-menu-item.is-active {
   background-color: #142832 !important;
 }
+
+.el-submenu__title {
+  color: #ffffff;
+}
+.el-submenu__title:hover {
+  background-color: #142832 !important;
+}

+ 6 - 0
src/assets/css/theme-ele/color-ele.css

@@ -49,3 +49,9 @@
 .sidebar-el-menu:not(.el-menu--collapse) {
   background-color: #409eff !important;
 }
+.el-submenu__title {
+  color: #000000;
+}
+.el-submenu__title:hover {
+  background-color: #403AFF !important;
+}

+ 7 - 0
src/assets/css/theme-green/color-green.css

@@ -49,3 +49,10 @@
 .sidebar-el-menu:not(.el-menu--collapse) {
   background-color: #00d1b2 !important;
 }
+
+.el-submenu__title {
+  color: #000000;
+}
+.el-submenu__title:hover {
+  background-color: #00a78e !important;
+}

+ 6 - 0
src/assets/css/theme-pink/color-pink.css

@@ -49,3 +49,9 @@
 .sidebar-el-menu:not(.el-menu--collapse) {
   background-color: #D23CE6 !important;
 }
+.el-submenu__title {
+  color: #000000;
+}
+.el-submenu__title:hover {
+  background-color: #963CE6 !important;
+}

+ 6 - 0
src/assets/css/theme-red/color-red.css

@@ -49,3 +49,9 @@
 .sidebar-el-menu:not(.el-menu--collapse) {
   background-color: #e31d33 !important;
 }
+.el-submenu__title {
+  color: #000000;
+}
+.el-submenu__title:hover {
+  background-color: #640F33 !important;
+}

BIN
src/assets/logo.png


+ 1 - 2
src/components/admin-frame/Header.vue

@@ -12,8 +12,7 @@
           </el-col>
           <el-col :span="12" class="right">
             <i class="el-icon-user-solid"></i>
-            <!-- <span>{{ user.name || '游客' }}</span> -->
-            <span>游客</span>
+            <span>{{ user.name || '游客' }}</span>
             <el-button type="danger" size="mini" @click="logout">退出登录</el-button>
           </el-col>
         </el-col>

+ 15 - 4
src/components/admin-frame/Sidebar.vue

@@ -44,7 +44,7 @@
 </template>
 
 <script>
-const { system, userMenu } = require('../../layout/deploy/menu');
+const { system, adminMenu, mechMenu, userMenu, agentMenu, teaMenu, commonMenu } = require('../../layout/deploy/menu');
 const { menuInfo } = require('../../layout/deploy/site');
 import { mapState, createNamespacedHelpers } from 'vuex';
 import _ from 'lodash';
@@ -57,7 +57,7 @@ export default {
     return {
       menuInfo: menuInfo,
       collapse: false,
-      items: system,
+      items: [],
     };
   },
   created() {
@@ -68,8 +68,19 @@ export default {
   },
   methods: {
     getMenu() {
-      let list = _.cloneDeep(this.items);
-      list.push(...userMenu);
+      let token = localStorage.getItem('token');
+      let user = this.user;
+      let list = [];
+      if (token && user) {
+        if (user && user.role == '1') list = [...system, ...adminMenu, ...commonMenu];
+        else if (user && user.role == '2') list = [...system, ...mechMenu, ...commonMenu];
+        else if (user && user.role == '3') list = [...system, ...userMenu, ...commonMenu];
+        else if (user && user.role == '4') list = [...system, ...agentMenu, ...commonMenu];
+        else if (user && user.role == '5') list = [...system, ...teaMenu, ...commonMenu];
+      } else {
+        // this.$message({ type: `error`, message: `暂未登录` });
+        // this.$router.push({ path: '/login' });
+      }
       this.$set(this, `items`, _.uniqBy(list, 'index'));
     },
   },

+ 305 - 4
src/layout/deploy/menu.js

@@ -1,13 +1,314 @@
 export const system = [{ icon: 'icon-shouye', index: '/adminCenter/homeIndex', title: '系统首页' }];
+// 管理用户
+export const adminMenu = [
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/adminMech/index',
+    title: '机构用户',
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/adminUser/index',
+    title: '平台用户',
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/adminAgent/index',
+    title: '代理机构',
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/adminTea/index',
+    title: '咨询师',
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '3',
+    title: '我的消息',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminMessage/notice/index',
+        title: '通知管理',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminMessage/question/index',
+        title: '问题管理',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminMessage/examine/index',
+        title: '审核通知',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminMessage/warning/index',
+        title: '专利预警',
+      },
+    ],
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '4',
+    title: '专利审核',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminExamine/apply/index',
+        title: '专利申请',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminExamine/bureau/index',
+        title: '国知局反馈信息',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminExamine/search/index',
+        title: '查新检索',
+      },
+    ],
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '5',
+    title: '专利管理',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminPatent/info/index',
+        title: '专利信息',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminPatent/batch/index',
+        title: '专利信息批量处理',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminPatent/value/index',
+        title: '价值评估',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminPatent/trans/index',
+        title: '专利交易',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminPatent/maintain/index',
+        title: '专利维权',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/adminPatent/demand/index',
+        title: '专利需求',
+      },
+    ],
+  },
+];
+// 机构用户
+export const mechMenu = [
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/mechUser/index',
+    title: '平台用户',
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '3',
+    title: '我的消息',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechMessage/examine/index',
+        title: '审核通知',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechMessage/notice/index',
+        title: '通知管理',
+      },
+    ],
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '4',
+    title: '我的审核',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechExamine/apply/index',
+        title: '申请审核',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechExamine/trans/index',
+        title: '交易审核',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechExamine/contract/index',
+        title: '合同审核',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechExamine/file/index',
+        title: '交易归档',
+      },
+    ],
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '5',
+    title: '我的审核',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechPatent/info/index',
+        title: '专利信息',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechPatent/search/index',
+        title: '专利检索',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/mechPatent/warning/index',
+        title: '专利预警',
+      },
+    ],
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/mechTrans/index',
+    title: '专利交易',
+  },
+];
+// 平台用户
 export const userMenu = [
   {
     icon: 'icon-ceshi',
-    index: '/adminCenter/test/index',
-    title: '测试页面',
+    index: '3',
+    title: '我的消息',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userMessage/unread/index',
+        title: '未读信息',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userMessage/read/index',
+        title: '已读信息',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userMessage/notice/index',
+        title: '通知信息',
+      },
+    ],
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '4',
+    title: '我的申请',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userApply/apply/index',
+        title: '专利申请',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userApply/search/index',
+        title: '查新检索',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userApply/value/index',
+        title: '价值评估',
+      },
+    ],
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '5',
+    title: '我的专利',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userPatent/info/index',
+        title: '专利管理',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userPatent/maintain/index',
+        title: '专利维权',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/userPatent/warning/index',
+        title: '专利预警',
+      },
+    ],
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/userTrans/index',
+    title: '我的交易',
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/userService/index',
+    title: '咨询服务',
+  },
+];
+// 代理机构
+export const agentMenu = [
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/agentNotice/index',
+    title: '审核通知',
+  },
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/agentExamine/index',
+    title: '专利审核',
   },
   {
     icon: 'icon-ceshi',
-    index: '/adminCenter/statistics/index',
-    title: '绩效目标表',
+    index: '/adminCenter/agentApply/index',
+    title: '专利申请',
+  },
+];
+// 咨询师
+export const teaMenu = [
+  {
+    icon: 'icon-ceshi',
+    index: '/adminCenter/teaQuestion/index',
+    title: '问题管理',
+  },
+];
+// 公共菜单设置
+export const commonMenu = [
+  {
+    icon: 'icon-ceshi',
+    index: '2',
+    title: '系统设置',
+    subs: [
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/comBasic/index',
+        title: '基本信息',
+      },
+      {
+        icon: 'icon-ceshi',
+        index: '/adminCenter/comPad/index',
+        title: '修改密码',
+      },
+    ],
   },
 ];

+ 1 - 1
src/layout/deploy/site.js

@@ -1,7 +1,7 @@
 // 网站基本设置
 export const siteInfo = {
   display: true,
-  zhTitle: '长春市福瑞科技有限公司',
+  zhTitle: '吉林专利市场', //吉林省科企技术转移转化研究院有限责任公司
   enTitle: 'Changchun Furui Technology Co., Ltd',
   logo_url: require('../../assets/logo.png'),
 };

+ 57 - 0
src/store/adminLogin.js

@@ -0,0 +1,57 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+const jwt = require('jsonwebtoken');
+Vue.use(Vuex);
+const api = {
+  adminLoginInfo: `/api/live/v0/users/admin`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.adminLoginInfo}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.adminLoginInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.adminLoginInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.adminLoginInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.adminLoginInfo}/${payload}`);
+    return res;
+  },
+  async login({ commit }, { user }) {
+    const res = await this.$axios.$post(`${api.adminLoginInfo}/login`, user);
+    if (res.errcode === 0) {
+      localStorage.setItem('token', res.data);
+      user = jwt.decode(res.data);
+      commit('setUser', user, { root: true });
+      res.user = user;
+    }
+    return res;
+  },
+  async updatePwd({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.adminLoginInfo}/password/${id}`, data);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 57 - 0
src/store/agent_mech.js

@@ -0,0 +1,57 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+const jwt = require('jsonwebtoken');
+Vue.use(Vuex);
+const api = {
+  interface: `/api/live/v0/patent/agentMech`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.interface}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.interface}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.interface}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.interface}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
+    return res;
+  },
+  async login({ commit }, { user }) {
+    const res = await this.$axios.$post(`${api.interface}/login`, user);
+    if (res.errcode === 0) {
+      localStorage.setItem('token', res.data);
+      user = jwt.decode(res.data);
+      commit('setUser', user, { root: true });
+    }
+    return res;
+  },
+  // 修改密码
+  async updatePassword({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.interface}/password/${id}`, data);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 57 - 0
src/store/answer_tea.js

@@ -0,0 +1,57 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+const jwt = require('jsonwebtoken');
+Vue.use(Vuex);
+const api = {
+  interface: `/api/live/v0/patent/answerTea`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.interface}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.interface}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.interface}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.interface}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
+    return res;
+  },
+  async login({ commit }, { user }) {
+    const res = await this.$axios.$post(`${api.interface}/login`, user);
+    if (res.errcode === 0) {
+      localStorage.setItem('token', res.data);
+      user = jwt.decode(res.data);
+      commit('setUser', user, { root: true });
+    }
+    return res;
+  },
+  // 修改密码
+  async updatePassword({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.interface}/password/${id}`, data);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 70 - 0
src/store/personal.js

@@ -0,0 +1,70 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+const jwt = require('jsonwebtoken');
+Vue.use(Vuex);
+const api = {
+  personalInfo: `/api/live/v0/users/personal`,
+};
+const state = () => ({});
+const mutations = {};
+
+const actions = {
+  async query({ commit }, { skip = 0, limit, ...info } = {}) {
+    const res = await this.$axios.$get(`${api.personalInfo}`, {
+      skip,
+      limit,
+      ...info,
+    });
+    return res;
+  },
+  async create({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.personalInfo}`, payload);
+    return res;
+  },
+  async fetch({ commit }, payload) {
+    const res = await this.$axios.$get(`${api.personalInfo}/${payload}`);
+    return res;
+  },
+  async update({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.personalInfo}/update/${id}`, data);
+    return res;
+  },
+  async delete({ commit }, payload) {
+    const res = await this.$axios.$delete(`${api.personalInfo}/${payload}`);
+    return res;
+  },
+  // 修改密码
+  async updatePassword({ commit }, { id, ...data }) {
+    const res = await this.$axios.$post(`${api.personalInfo}/password/${id}`, data);
+    return res;
+  },
+  async perLogin({ commit }, { user }) {
+    const res = await this.$axios.$post(`${api.personalInfo}/login`, user);
+    if (res.errcode === 0) {
+      localStorage.setItem('token', res.data);
+      user = jwt.decode(res.data);
+      commit('setUser', user, { root: true });
+    }
+    return res;
+  },
+  async upgradeUser({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.personalInfo}/upgrade`, payload);
+    return res;
+  },
+  // 批量注册用户
+  async import({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.personalInfo}/import`, payload);
+    return res;
+  },
+  async export({ commit }, payload) {
+    const res = await this.$axios.$post(`${api.personalInfo}/export`, payload);
+    return res;
+  },
+};
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};