diff --git a/src/api/duty/duty.js b/src/api/duty/duty.js index 4b068dd..a26619c 100644 --- a/src/api/duty/duty.js +++ b/src/api/duty/duty.js @@ -160,4 +160,20 @@ export const setevaluationobjectives = (data) => { data: data }) } +//获取定性考核列表用于列表展示 +export const dutydepartmentlist = (data) => { + return request({ + url: '/admin/dutydepartmentlist', + method: 'post', + data: data + }) +} +//获取定性考核列表用于下拉列表 +export const selectdutylist = (data) => { + return request({ + url: '/admin/selectdutylist', + method: 'post', + data: data + }) +} diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 29f9a04..bb9234c 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -32,9 +32,9 @@ export default { let matched = this.$route.matched.filter(item => item.meta && item.meta.title) const first = matched[0] - if (!this.isDashboard(first)) { - matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched) - } + // if (!this.isDashboard(first)) { + // matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched) + // } this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false) }, diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 7ffc1df..a5454fb 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -11,6 +11,9 @@ export default { name: 'AppMain', computed: { key() { + console.log("AppMain") + console.log("AppMain") + console.log(this.$route.path) return this.$route.path } } diff --git a/src/layout/components/Sidebar/Link.vue b/src/layout/components/Sidebar/Link.vue index 530b3d5..cd46e19 100644 --- a/src/layout/components/Sidebar/Link.vue +++ b/src/layout/components/Sidebar/Link.vue @@ -14,6 +14,10 @@ export default { required: true } }, + created () { + console.log("tiaozhuan") + }, + computed: { isExternal() { return isExternal(this.to) @@ -27,7 +31,14 @@ export default { }, methods: { linkProps(to) { + console.log("to") + console.log(to) + console.log("this.isExternal") + console.log(this.isExternal) + console.log("this.type") + console.log(this.type) if (this.isExternal) { + console.log("isExternal") return { href: to, target: '_blank', diff --git a/src/router/index1.js b/src/router/index1.js new file mode 100644 index 0000000..5e69c87 --- /dev/null +++ b/src/router/index1.js @@ -0,0 +1,164 @@ +import Vue from 'vue' +import Router from 'vue-router' +import {getmenu} from '../api/user.js' + +Vue.use(Router) + + +/* Layout */ +import Layout from '@/layout' + +export const constantRoutes = [ + { + path: '/login', + component: () => import('@/views/login/index'), + hidden: true + }, + { + path: '/approval', + component: () => import('@/views/approval/index'), + hidden: true + }, + { + path: '/index', + component: () => import('@/views/index'), + hidden: true + }, + { + path: '/404', + component: () => import('@/views/404'), + hidden: true + }, + { + path: '/', + component: Layout, + redirect: '/frontPage', + children: [{ + path: 'frontPage', + name: 'frontPage', + component: () => import('@/views/frontPage/index'), + meta: { title: '首页'} + }] + }, + + { + path: '/assessmentProgram', + component: Layout, + redirect: '/assessmentProgram/departmentalAssessment', + name: 'Example', + meta: { title: '考核方案', icon: 'el-icon-s-help' }, + children: [ + { + path: 'departmentalAssessment', + name: 'departmentalAssessment', + component: () => import('@/views/assessmentProgram/departmentalAssessment'), + meta: { title: '部门考核', icon: 'table' } + }, + + { + path: 'qualitativeIndicators', + name: 'qualitativeIndicators', + component: () => import('@/views/assessmentProgram/qualitativeIndicators'), + meta: { title: '定性考核', icon: 'tree' } + }, + + ] + }, + { + path: '/basicInfo', + component: Layout, + redirect: '/basicInfo/assessmentDimension', + name: 'Example', + meta: { title: '基础信息', icon: 'el-icon-s-help' }, + children: [ + { + path: 'assessmentDimension', + name: 'assessmentDimension', + component: () => import('@/views/basicInfo/assessmentDimension.vue'), + meta: { title: '考核维度', icon: 'table' } + }, + + { + path: 'project', + name: 'project', + component: () => import('@/views/basicInfo/project'), + meta: { title: '考核指标', icon: 'tree' } + }, + { + path: 'Target', + name: 'Target', + component: () => import('@/views/basicInfo/target'), + meta: { title: '指标目标', icon: 'tree' } + }, + + ] + }, + + { + path: '/details', + component: Layout, + redirect: '/details', + children: [{ + path: 'details', + name: 'Details', + component: () => import('@/views/record/details'), + + }] + }, + + // 404 page must be placed at the end !!! + { path: '*', redirect: '/404', hidden: true } +] + +const routert = new Router({ + linkActiveClass:"selected", + constantRoutes +}) + +const createRouter = () => new Router({ + // mode: 'history', // require service support + scrollBehavior: () => ({ y: 0 }), + routes: constantRoutes +}) +// 路由拦截 +routert.beforeEach((to,from,next)=>{ + + addRouters(); + console.log("123456") + next(); +}); +// 获取后台给的路由 +async function addRouters(){ + const res = await getmenu() + var data = routersData(res.data) + // 动态添加 + router.addRoute(data) + console.log("luyou") +} +// 拼接数据(路由) +function routersData(result){ + + router.push({ + path: '/aaa', + component: Layout, + redirect: '/aaa', + children: [{ + path: 'aaa', + name: 'aaa', + component: () => import('@/views/frontPage/index'), + meta: { title: '首页1'} + }] + + }) + +} + +const router = createRouter() + +// Detail see: https://github.com/vuejs/vue-router/issues/1234#issuecomment-357941465 +export function resetRouter() { + const newRouter = createRouter() + router.matcher = newRouter.matcher // reset router +} + +export default router diff --git a/src/views/assessmentProgram/departmentalAssessment.vue b/src/views/assessmentProgram/departmentalAssessment.vue index 7a5f5b8..db0c8a7 100644 --- a/src/views/assessmentProgram/departmentalAssessment.vue +++ b/src/views/assessmentProgram/departmentalAssessment.vue @@ -263,14 +263,14 @@ 考核纬度:{{item.name}} - + 指标合计分:{{item.zhiFraction}} @@ -585,7 +585,7 @@ export default { }, // 组合提交 async zhuheTi(){ - if (this.weiduFraction<=100) { + if (this.weiduFraction==100) { console.log(this.weiDuList) this.form.group=this.form.group.toString() this.form.parentid=this.form.parentid.toString() @@ -612,7 +612,7 @@ export default { }else{ this.$message({ type: 'error', - message: '总分不能超过100!' + message: '总分不是100!' }) } diff --git a/src/views/assessmentProgram/qualitativeIndicators.vue b/src/views/assessmentProgram/qualitativeIndicators.vue index 67f134d..654f4af 100644 --- a/src/views/assessmentProgram/qualitativeIndicators.vue +++ b/src/views/assessmentProgram/qualitativeIndicators.vue @@ -32,7 +32,7 @@ 新增 - + 班 @@ -91,16 +90,67 @@ >删除 - + + + + {{scope.row.targetname}} + + + + + + + {{item.parentname}} + + + + + 班 + 天 + 周 + 月 + 季度 + 年 + + + + + 每班{{scope.row.cycleattr}}次 + 每天{{scope.row.cycleattr}}次 + 每周{{scope.row.cycleattr}}次 + 每月{{scope.row.cycleattr}}次 + 每季度{{scope.row.cycleattr}}次 + 每年{{scope.row.cycleattr}}次 + + + 查看 - --> + + + + 修改 + 删除 + + @@ -270,7 +320,7 @@ :data="editAdd.list" style="width: 100%"> @@ -278,7 +328,7 @@ @@ -364,8 +414,8 @@ - - + + @@ -396,7 +446,7 @@ We're sorry but 绩效考核 doesn't work properly without JavaScript enabled. Please enable it to continue.