You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
423 lines
11 KiB
423 lines
11 KiB
2 years ago
|
import Vue from "vue";
|
||
|
import Router from "vue-router";
|
||
|
// 问卷
|
||
|
import NoTopLayout from "@/components/layouts/NoTopLayout.vue";
|
||
|
import DwSurveyAttr from "@/views/dw-survey/dw-collect/DwSurveyAttr";
|
||
|
import DwAnswerUrl from "@/views/dw-survey/dw-collect/DwAnswerUrl";
|
||
|
import DwSiteComp from "@/views/dw-survey/dw-collect/DwSiteComp";
|
||
|
import DwSiteShare from "@/views/dw-survey/dw-collect/DwSiteShare";
|
||
|
import DwAnswerWeixin from "@/views/dw-survey/dw-collect/DwAnswerWeixin";
|
||
|
import DwSurveyCharts from "@/views/dw-survey/dw-data/DwSurveyCharts";
|
||
|
import DwSurveyAnswer from "@/views/dw-survey/dw-data/DwSurveyAnswer";
|
||
|
import DwSurveyAnswerInfo from "@/views/dw-survey/dw-data/DwSurveyAnswerInfo";
|
||
|
|
||
|
Vue.use(Router);
|
||
|
/* Layout */
|
||
|
import Layout from "@/layout";
|
||
|
|
||
|
export const constantRoutes = [
|
||
|
// 调查问卷
|
||
|
{
|
||
|
path: "/dw/survey/c/attr/:id",
|
||
|
name: "DwSurveyAttr",
|
||
|
component: DwSurveyAttr,
|
||
|
},
|
||
|
{
|
||
|
path: "/dw/survey/c/url/:id",
|
||
|
name: "DwAnswerUrl",
|
||
|
component: DwAnswerUrl,
|
||
|
},
|
||
|
{
|
||
|
path: "/dw/survey/c/comp/:id",
|
||
|
name: "DwSiteComp",
|
||
|
component: DwSiteComp,
|
||
|
},
|
||
|
{
|
||
|
path: "/dw/survey/c/share/:id",
|
||
|
name: "DwSiteShare",
|
||
|
component: DwSiteShare,
|
||
|
},
|
||
|
{
|
||
|
path: "/dw/survey/c/weixin/:id",
|
||
|
name: "DwAnswerWeixin",
|
||
|
component: DwAnswerWeixin,
|
||
|
},
|
||
|
{
|
||
|
path: "/dw/survey/d/chart/:id",
|
||
|
name: "DwSurveyCharts",
|
||
|
component: DwSurveyCharts,
|
||
|
},
|
||
|
{
|
||
|
path: "/dw/survey/d/data/:id",
|
||
|
name: "DwSurveyAnswer",
|
||
|
component: DwSurveyAnswer,
|
||
|
},
|
||
|
{
|
||
|
path: "/no-top",
|
||
|
name: "NoTopLayout",
|
||
|
component: NoTopLayout,
|
||
|
children: [
|
||
|
{
|
||
|
path: "/no-top/dw-survey/d/data/:id/:answerId",
|
||
|
name: "DwSurveyAnswerInfo",
|
||
|
component: DwSurveyAnswerInfo,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
{
|
||
|
path: "/dw-survey/d/data/:id/:answerId",
|
||
|
name: "DwSurveyAnswerInfo",
|
||
|
component: DwSurveyAnswerInfo,
|
||
|
},
|
||
|
{
|
||
|
path: "/dw/survey/back",
|
||
|
name: "DwSurveyBack",
|
||
|
component: (resolve) => require(["@/views/dw-survey/DwBack"], resolve),
|
||
|
hidden: true,
|
||
|
},
|
||
|
{
|
||
|
path: "/redirect",
|
||
|
component: Layout,
|
||
|
hidden: true,
|
||
|
children: [
|
||
|
{
|
||
|
path: "/redirect/:path(.*)",
|
||
|
component: () => import("@/views/redirect"),
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
// {
|
||
|
// path: "/login",
|
||
|
// name: "login",
|
||
|
// component: () => import("@/views/login"),
|
||
|
// hidden: true,
|
||
|
// },
|
||
|
{
|
||
|
path: "/register",
|
||
|
component: () => import("@/views/register"),
|
||
|
hidden: true,
|
||
|
},
|
||
|
{
|
||
|
path: "/404",
|
||
|
component: () => import("@/views/error/404"),
|
||
|
hidden: true,
|
||
|
},
|
||
|
{
|
||
|
path: "/401",
|
||
|
component: () => import("@/views/error/401"),
|
||
|
hidden: true,
|
||
|
},
|
||
|
|
||
|
// {
|
||
|
// path: "",
|
||
|
// component: Layout,
|
||
|
// redirect: "index",
|
||
|
// children: [
|
||
|
// {
|
||
|
// path: "index",
|
||
|
// component: () => import("@/views/index"),
|
||
|
// name: "Index",
|
||
|
// meta: { title: "首页", icon: "dashboard", affix: true },
|
||
|
// },
|
||
|
// ],
|
||
|
// },
|
||
|
{
|
||
|
path: "/",
|
||
|
// component: Layout,
|
||
|
redirect: {
|
||
|
name: "/",
|
||
|
},
|
||
|
},
|
||
|
|
||
|
{
|
||
|
path: "/user",
|
||
|
component: Layout,
|
||
|
hidden: true,
|
||
|
redirect: "noredirect",
|
||
|
children: [
|
||
|
{
|
||
|
path: "profile",
|
||
|
component: () => import("@/views/system/user/profile/index"),
|
||
|
name: "Profile",
|
||
|
meta: { title: "个人中心", icon: "user" },
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
// !企业端
|
||
|
{
|
||
|
path: "/",
|
||
|
name: "/",
|
||
|
redirect: { name: "homework" },
|
||
|
component: (resolve) => require(["@/views/index.vue"], resolve),
|
||
|
hidden: true,
|
||
|
children: [
|
||
|
// 工作台
|
||
|
{
|
||
|
path: "/",
|
||
|
name: "homework",
|
||
|
component: (resolve) => require(["@/views/homework.vue"], resolve),
|
||
|
hidden: true,
|
||
|
},
|
||
|
// 政策详情
|
||
|
{
|
||
|
path: "homework/policy",
|
||
|
component: (resolve) => require(["@/views/policy/index.vue"], resolve),
|
||
|
name: "policy",
|
||
|
hidden: true,
|
||
|
},
|
||
|
// 通知公告详情
|
||
|
{
|
||
|
path: "homework/annunciate",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/annunciate/index.vue"], resolve),
|
||
|
name: "annunciate",
|
||
|
hidden: true,
|
||
|
},
|
||
|
// 通知公告
|
||
|
{
|
||
|
path: "homework/messageList",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/messageList/index.vue"], resolve),
|
||
|
name: "messageList",
|
||
|
hidden: true,
|
||
|
},
|
||
|
/*
|
||
|
* !事务中心
|
||
|
*/
|
||
|
{
|
||
|
path: "affair",
|
||
|
component: (resolve) => require(["@/views/affair/index.vue"], resolve),
|
||
|
name: "affair",
|
||
|
redirect: { name: "myTianbao" },
|
||
|
hidden: true,
|
||
|
children: [
|
||
|
{
|
||
|
path: "myTianbao",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/affair/myTianbao/index.vue"], resolve),
|
||
|
name: "myTianbao",
|
||
|
hidden: true,
|
||
|
},
|
||
|
{
|
||
|
path: "myZhaohui",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/affair/myZhaohui/index.vue"], resolve),
|
||
|
name: "myZhaohui",
|
||
|
hidden: true,
|
||
|
},
|
||
|
{
|
||
|
path: "myShenqing",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/affair/myShenqing/index.vue"], resolve),
|
||
|
name: "myShenqing",
|
||
|
hidden: true,
|
||
|
},
|
||
|
{
|
||
|
path: "myWenshu",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/affair/myWenshu/index.vue"], resolve),
|
||
|
name: "myWenshu",
|
||
|
hidden: true,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
// 企业中心
|
||
|
{
|
||
|
path: "firmContent",
|
||
|
name: "firmContent",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/firmContent/index.vue"], resolve),
|
||
|
hidden: true,
|
||
|
redirect: { name: "firmInfo"},
|
||
|
children: [
|
||
|
{
|
||
|
path: "firmInfo",
|
||
|
name: "firmInfo",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/firmContent/firmInfo/index.vue"], resolve),
|
||
|
hidden: true,
|
||
|
redirect: { name: "basicInfo" },
|
||
|
children: [
|
||
|
{
|
||
|
path: "basicInfo",
|
||
|
name: "basicInfo",
|
||
|
component: (resolve) =>
|
||
|
require([
|
||
|
"@/views/firmContent/firmInfo/basicInfo/index.vue",
|
||
|
], resolve),
|
||
|
hidden: true,
|
||
|
meta: {
|
||
|
id: 1,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
path: "pinzhongInfo",
|
||
|
name: "pinzhongInfo",
|
||
|
component: (resolve) =>
|
||
|
require([
|
||
|
"@/views/firmContent/firmInfo/pinzhongInfo/index.vue",
|
||
|
], resolve),
|
||
|
hidden: true,
|
||
|
meta: {
|
||
|
id: 2,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
path: "xingzhengchufa",
|
||
|
name: "xingzhengchufa",
|
||
|
component: (resolve) =>
|
||
|
require([
|
||
|
"@/views/firmContent/firmInfo/xingzhengchufa/index.vue",
|
||
|
], resolve),
|
||
|
hidden: true,
|
||
|
meta: {
|
||
|
id: 3,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
path: "jiandujiancha",
|
||
|
name: "jiandujiancha",
|
||
|
component: (resolve) =>
|
||
|
require([
|
||
|
"@/views/firmContent/firmInfo/jiandujiancha/index.vue",
|
||
|
], resolve),
|
||
|
hidden: true,
|
||
|
meta: {
|
||
|
id: 4,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
path: "primaryWorkforce",
|
||
|
name: "primaryWorkforce",
|
||
|
component: (resolve) =>
|
||
|
require([
|
||
|
"@/views/firmContent/firmInfo/primaryWorkforce/index.vue",
|
||
|
], resolve),
|
||
|
hidden: true,
|
||
|
meta: {
|
||
|
id: 6,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
path: "teyaojihua",
|
||
|
name: "teyaojihua",
|
||
|
component: (resolve) =>
|
||
|
require([
|
||
|
"@/views/firmContent/firmInfo/teyaojihua/index.vue",
|
||
|
], resolve),
|
||
|
hidden: true,
|
||
|
meta: {
|
||
|
id: 7,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
path: "revisionHistory",
|
||
|
name: "revisionHistory",
|
||
|
component: (resolve) =>
|
||
|
require([
|
||
|
"@/views/firmContent/firmInfo/revisionHistory/index.vue",
|
||
|
], resolve),
|
||
|
hidden: true,
|
||
|
meta: {
|
||
|
id: 8,
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
path: "GSPinfo",
|
||
|
name: "GSPinfo",
|
||
|
component: (resolve) =>
|
||
|
require([
|
||
|
"@/views/firmContent/firmInfo/GSPinfo/index.vue",
|
||
|
], resolve),
|
||
|
hidden: true,
|
||
|
meta: {
|
||
|
id: 9,
|
||
|
},
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
{
|
||
|
path: "drugInfo",
|
||
|
name: "drugInfo",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/firmContent/drugInfo/index.vue"], resolve),
|
||
|
hidden: true,
|
||
|
// redirect:{name:'drugBasicInfo'},
|
||
|
// children:[
|
||
|
// {
|
||
|
// path:'drugBasicInfo',
|
||
|
// name:'drugBasicInfo',
|
||
|
// component: (resolve) => require(['@/views/firmContent/drugInfo/drugBasicInfo/drugBasicInfo.vue'],resolve),
|
||
|
// hidden:true,
|
||
|
// meta:{
|
||
|
// id:1
|
||
|
// }
|
||
|
// },
|
||
|
// {
|
||
|
// path:'PZchouyang',
|
||
|
// name:'PZchouyang',
|
||
|
// component: (resolve) => require(['@/views/firmContent/drugInfo/PZchouyang/PZchouyang.vue'],resolve),
|
||
|
// hidden:true,
|
||
|
// meta:{
|
||
|
// id:2
|
||
|
// }
|
||
|
// },
|
||
|
// {
|
||
|
// path:'adverseReaction',
|
||
|
// name:'adverseReaction',
|
||
|
// component: (resolve) => require(['@/views/firmContent/drugInfo/adverseReaction/adverseReaction.vue'],resolve),
|
||
|
// hidden:true,
|
||
|
// meta:{
|
||
|
// id:3
|
||
|
// }
|
||
|
// }
|
||
|
// ]
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
/*
|
||
|
* !操作指南
|
||
|
*/
|
||
|
{
|
||
|
path: "CaozuoLIst",
|
||
|
component: (resolve) =>
|
||
|
require(["@/views/CaozuoLIst/index.vue"], resolve),
|
||
|
name: "CaozuoLIst",
|
||
|
hidden: true,
|
||
|
},
|
||
|
{
|
||
|
path: "/CaozuoLIst/Czaozuo",
|
||
|
component: (resolve) => require(["@/views/Czaozuo/index.vue"], resolve),
|
||
|
name: "Czaozuo",
|
||
|
hidden: true,
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
//自定义默认首页
|
||
|
// {
|
||
|
// path: "",
|
||
|
// redirect: "/home",
|
||
|
// },
|
||
|
|
||
|
// !监管端
|
||
|
];
|
||
|
// 防止连续点击多次路由报错
|
||
|
let routerPush = Router.prototype.push;
|
||
|
let routerReplace = Router.prototype.replace;
|
||
|
// push
|
||
|
Router.prototype.push = function push(location) {
|
||
|
return routerPush.call(this, location).catch((err) => err);
|
||
|
};
|
||
|
// replace
|
||
|
Router.prototype.replace = function push(location) {
|
||
|
return routerReplace.call(this, location).catch((err) => err);
|
||
|
};
|
||
|
|
||
|
// const router =
|
||
|
|
||
|
export default new Router({
|
||
|
// mode: "history", // 去掉url中的#
|
||
|
scrollBehavior: () => ({ y: 0 }),
|
||
|
routes: constantRoutes,
|
||
|
});
|