Compare commits

...

16 Commits

Author SHA1 Message Date
giaogiao bfa7669e66 从本地电脑提交 2023-12-21 10:20:45 +08:00
aoli.qu bdf1cabc33 新增政治面貌等需求 2023-10-30 00:08:11 +08:00
aoli.qu f04d80924f 荣誉展示栏动态数据 2023-10-25 00:44:16 +08:00
aoli.qu 59ec7b2faf 数据统计联调接口 2023-10-24 23:56:38 +08:00
aoli.qu 3ea56e80bf 修改 2023-10-18 22:44:18 +08:00
aoli.qu 07e4aed932 数据统计大屏修改 2023-10-16 00:57:02 +08:00
aoli.qu ba934dc592 init 2023-10-11 11:57:19 +08:00
aoli.qu a353b4ed7c 通知公告修改 2022-05-19 19:55:47 +08:00
Yjhon b6b9e1fa36 详情考试次数显示条件调整 2022-05-19 16:47:34 +08:00
Yjhon 6dd1374860 Merge branch 'develop' of https://gitee.com/siwa-team/dawa-vue into develop 2022-05-19 14:31:03 +08:00
cgd 3b129374f1 feat: 修改本地服务地址 2022-05-19 10:38:56 +08:00
cgd ef0828f271 feat: cdn改为本地依赖 2022-05-19 10:37:59 +08:00
QuAoLi f1093cb41c 项目列表移除更多 2022-05-12 15:34:03 +08:00
QuAoLi f22e9da55b 修改⽤户注册后⾃动审核通过 2022-05-12 15:13:56 +08:00
QuAoLi dce5343985 人员详情新增所在项目组字段 2022-05-12 14:25:46 +08:00
QuAoLi ca16194e99 新增功能 移除人员项目关联 2022-05-12 14:10:28 +08:00
224 changed files with 44810 additions and 26822 deletions

2
.env
View File

@ -1,3 +1,3 @@
NODE_ENV=production NODE_ENV=production
VUE_APP_PREVIEW=false VUE_APP_PREVIEW=false
VUE_APP_API_BASE_URL=/dawa VUE_APP_API_BASE_URL=/welfare

View File

@ -1,4 +1,4 @@
NODE_ENV=development NODE_ENV=development
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/dawa VUE_APP_API_BASE_URL=/welfare
VUE_APP_PUBLIC_PATH =/ VUE_APP_PUBLIC_PATH =/

View File

@ -1,3 +1,3 @@
NODE_ENV=production NODE_ENV=production
VUE_APP_PREVIEW=true VUE_APP_PREVIEW=true
VUE_APP_API_BASE_URL=/dawa VUE_APP_API_BASE_URL=/welfare

18643
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -14,12 +14,14 @@
"@ant-design-vue/pro-layout": "^0.3.4", "@ant-design-vue/pro-layout": "^0.3.4",
"@antv/data-set": "^0.10.2", "@antv/data-set": "^0.10.2",
"@icon-park/vue": "^1.3.5", "@icon-park/vue": "^1.3.5",
"@jiaminghi/data-view": "^2.7.3",
"@types/echarts": "^4.4.3",
"ant-design-vue": "^1.7.7", "ant-design-vue": "^1.7.7",
"axios": "^0.19.0", "axios": "^0.19.0",
"core-js": "^3.1.2", "core-js": "^3.6.4",
"dplayer": "^1.26.0", "dplayer": "^1.26.0",
"draftjs-to-html": "^0.9.1", "draftjs-to-html": "^0.9.1",
"echarts": "^5.2.2", "echarts": "^4.6.0",
"enquire.js": "^2.1.6", "enquire.js": "^2.1.6",
"file-saver": "^2.0.5", "file-saver": "^2.0.5",
"html-to-draftjs": "^1.5.0", "html-to-draftjs": "^1.5.0",
@ -39,6 +41,7 @@
"store": "^2.0.12", "store": "^2.0.12",
"viser-vue": "^2.4.6", "viser-vue": "^2.4.6",
"vue": "^2.6.10", "vue": "^2.6.10",
"vue-awesome": "^4.5.0",
"vue-clipboard2": "^0.2.1", "vue-clipboard2": "^0.2.1",
"vue-cropper": "0.4.9", "vue-cropper": "0.4.9",
"vue-echarts": "^6.0.2", "vue-echarts": "^6.0.2",
@ -50,6 +53,7 @@
"vue-svg-component-runtime": "^1.0.1", "vue-svg-component-runtime": "^1.0.1",
"vue-ueditor-wrap": "^2.5.6", "vue-ueditor-wrap": "^2.5.6",
"vue-video-player": "^5.0.2", "vue-video-player": "^5.0.2",
"vue2-scale-box": "^0.1.7",
"vuex": "^3.1.1", "vuex": "^3.1.1",
"wangeditor": "^3.1.1" "wangeditor": "^3.1.1"
}, },
@ -75,6 +79,9 @@
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"opencollective": "^1.0.3", "opencollective": "^1.0.3",
"opencollective-postinstall": "^2.0.2", "opencollective-postinstall": "^2.0.2",
"sass": "^1.25.0",
"sass-loader": "^8.0.2",
"swiper": "^3.4.0",
"vue-svg-icon-loader": "^2.1.1", "vue-svg-icon-loader": "^2.1.1",
"vue-template-compiler": "^2.6.10", "vue-template-compiler": "^2.6.10",
"webpack": "^4.44.2", "webpack": "^4.44.2",

2
public/index.html vendored
View File

@ -6,7 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>logo.png"> <link rel="icon" href="<%= BASE_URL %>logo.png">
<title>安全培训平台管理系统</title> <title class="index-title">下堡坪乡农村福利院长者信息管理系统</title>
<style> <style>
.first-loading-wrp { .first-loading-wrp {
display: flex; display: flex;

BIN
public/logo.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@ -0,0 +1,162 @@
import { ref } from 'vue'
export default function () {
const mapData1 = ref({
middle: [
{ label: '村/社区', count: 0 },
{ label: '党群服务中心', count: 0 },
{ label: '村组/小区', count: 0 },
{ label: '有物业小区', count: 0 },
{ label: '党群连心站', count: 0 },
{ label: '楼栋', count: 0 },
{ label: '党员中心户', count: 0 },
{ label: '户籍数', count: 0 },
{ label: '常住人口', count: 0 },
],
charts: {
follow: {
look: [0, 0, 0, 0],
room: [0, 0, 0, 0],
},
partyMember: {
member_1: [0, 0, 0, 0],
member_2: [0, 0, 0, 0],
member_3: [0, 0, 0, 0],
member_4: [0, 0, 0, 0],
},
},
resource: {
position: { area: 0, interest: '0%' },
party: { area: 0, interest: '0%' },
stand: { area: 0, interest: '0%' },
venue: { area: 0, interest: '0%' },
},
properyService: {
service1: [
{
value: 0,
name: '市场化管理0个',
},
{
value: 0,
name: '公益性物业托底0个',
},
{
value: 0,
name: '业主自治0个',
},
{
value: 0,
name: '单位代管0个',
},
],
service2: [
{
value: 0,
name: '已建党组0个',
},
{
value: 0,
name: '未建党组织0个',
},
],
},
orgCharts: {
data: [1, 0, 5, 0, 1, 20],
Proportion: [
{ name: '下沉党员干部占比0%', value: 0 },
{ name: '业委会成员占比0%', value: 0 },
{ name: '物业公司负责人占比0%', value: 0 },
{ name: '小区网格员占比0%', value: 0 },
{ name: '社区“两委”成员占比0%', value: 0 },
{ name: '居民群众代表占比0%', value: 0 },
],
number: [
{ name: '50-200㎡ 数量', value: 0 },
{ name: '200-500㎡ 数量', value: 0 },
{ name: '500-1000㎡ 数量', value: 0 },
],
},
fourTwo: {
fourCharts: [0, 0, 0, 0, 0, 0],
buCharts: [
{ value: 0, name: '自管党员' },
{ value: 0, name: '下沉党员' },
{ value: 0, name: '其他党员' },
],
unitCharts: [
{ value: 0, name: '自管党员' },
{ value: 0, name: '下沉党员' },
{ value: 0, name: '其他党员' },
],
},
activity: {
activityNum: 0,
proport: '0%',
directNUm: 0,
finishNum: 0,
progress: 0,
forPeople: 0,
proportion: '0%',
},
bigBranch: {
allBuild: { small: 0, big: 0 },
branchMember: [
{ value: 0, name: '社区两委成员占比0%' },
{ value: 0, name: '业委会成员占比0%' },
{ value: 0, name: '小区网格员占比0%' },
{ value: 0, name: '物业公司服务负责人占比0%' },
{ value: 0, name: '下沉党员干部占比0%' },
{ value: 0, name: '居民群众干部占比0%' },
],
},
bigParty: {
allBuild: { small: 0, big: 0 },
branchMember: [
{ value: 0, name: '社区两委成员占比0%' },
{ value: 0, name: '业委会成员占比0%' },
{ value: 0, name: '小区网格员占比0%' },
{ value: 0, name: '物业公司服务负责人占比0%' },
{ value: 0, name: '下沉党员干部占比0%' },
{ value: 0, name: '居民群众干部占比0%' },
],
},
indus: {
allNum: 0,
member: 0,
zb: [
{ value: 0, name: '自管党员' },
{ value: 0, name: '下沉党员' },
{ value: 0, name: '其他党员' },
],
overSix: [
{ value: 0, name: '已达到60%' },
{ value: 0, name: '未达到60%' },
],
},
twoTeam: {
emergencyCount: {
proportion: 0,
teamCount: 11,
totalCount: 0,
xcMemberCount: 0,
},
volunteerCount: {
proportion: 0,
teamCount: 11,
totalCount: 0,
xcMemberCount: 0,
},
},
orgTable: {
partyService: [],
residen: [],
service: [],
activityList: [],
directList: [],
vence: [],
social: [],
},
})
return { mapData1 }
}

2739
public/static/js/statics.js Normal file

File diff suppressed because it is too large Load Diff

9
public/static/lib/axios.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
public/static/lib/vue-router.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
public/static/lib/vue.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
public/static/lib/vuex.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,115 +0,0 @@
import request from '@/utils/request'
const api = {
list: '/sys/dictionary/item/list',
findMaxValue: '/sys/dictionary/item/findMaxValue',
get: '/sys/dictionary/item/get',
add: '/sys/dictionary/item/add',
del: '/sys/dictionary/item/del',
edit: '/sys/dictionary/item/edit',
certificateList: '/archives/certificate/listPage',
addCertificate: '/person/certificate/add',
certificateDetail: '/person/certificate/detail',
delCertificate: '/person/certificate/del',
certificateExport: 'person/certificate/export'
}
// 证书类型 列表
export function getCertificateTypeList(params) {
return request({
url: api.list,
method: 'get',
params: params
})
}
// 查询最大词典项值 列表
export function getCertificateTypeMaxValue(params) {
return request({
url: api.findMaxValue,
method: 'get',
params: params
})
}
// 根据ID查询证书类型 列表
export function getCertificateType(params) {
return request({
url: api.get,
method: 'post',
params: params
})
}
// 证书类型 新增
export function addCertificateType(params) {
return request({
url: api.add,
method: 'post',
data: params
})
}
// 证书类型 删除
export function delCertificateType(params) {
return request({
url: api.del,
method: 'post',
params: params
})
}
// 证书类型 修改
export function editCertificateType(params) {
return request({
url: api.edit,
method: 'post',
data: params
})
}
// 证书列表
export function getArchivesCertificatelist(params) {
return request({
url: api.certificateList,
method: 'get',
params: params
})
}
// 新增人员证书
export function addPersonCertificate(params) {
return request({
url: api.addCertificate,
method: 'post',
data: params
})
}
// 获取证书详情
export function findPersonCertificateDetail(params) {
return request({
url: api.certificateDetail,
method: 'get',
params: params
})
}
// 删除人员证书
export function delCertificate(params) {
return request({
url: api.delCertificate,
method: 'post',
params: params
})
}
// 导出证书详情
export function exportCertificate(params) {
return request({
url: api.certificateExport,
method: 'get',
params: params
})
}

View File

@ -1,44 +0,0 @@
import request from '@/utils/request'
const api = {
list: '/archives/project/listPage',
projectUserList: '/archives/project/user/listPage',
projectUserCourseList: '/archives/project/user/course/listPage',
projectUserAnswerList: '/archives/project/user/answer/listPage'
}
// 项目档案 列表
export function getArchivesProjectList(params) {
return request({
url: api.list,
method: 'get',
params: params
})
}
// 项目档案-人员记录 列表
export function getArchivesProjectUserList(params) {
return request({
url: api.projectUserList,
method: 'get',
params: params
})
}
// 项目档案-人员记录-培训详情 列表
export function getArchivesProjectUserCourseList(params) {
return request({
url: api.projectUserCourseList,
method: 'get',
params: params
})
}
// 项目档案-人员记录-答题记录 列表
export function getArchivesProjectUserAnswerList(params) {
return request({
url: api.projectUserAnswerList,
method: 'get',
params: params
})
}

View File

@ -1,84 +0,0 @@
import request from '@/utils/request'
const courseApi = {
list: '/archives/user/listPage',
autoTrainList: '/archives/user/autoTrainPageList',
autoTrainDetailList: '/archives/user/autoTrainDetailPageList',
autoTrainAnswerList: '/archives/user/autoTrainAnswerPageList',
terminalTrainList: '/archives/user/terminalTrainPageList',
terminalTrainDetail: '/archives/user/terminalTrainDetail',
selfStudyList: '/archives/user/selfStudyPageList',
violationList: '/archives/user/violationPageList'
}
// 人员档案 列表
export function getArchivesUserList(params) {
return request({
url: courseApi.list,
method: 'get',
params: params
})
}
// 人员档案-自主培训 列表
export function getArchivesUserAutoTrainList(params) {
return request({
url: courseApi.autoTrainList,
method: 'get',
params: params
})
}
// 人员档案-自主培训-培训详情 列表
export function getArchivesUserAutoTrainDetailList(params) {
return request({
url: courseApi.autoTrainDetailList,
method: 'get',
params: params
})
}
// 人员档案-自主培训-答题记录 列表
export function getArchivesUserAutoTrainAnswerList(params) {
return request({
url: courseApi.autoTrainAnswerList,
method: 'get',
params: params
})
}
// 人员档案-终端培训 列表
export function getArchivesUserTerminalTrainList(params) {
return request({
url: courseApi.terminalTrainList,
method: 'get',
params: params
})
}
// 人员档案-终端培训-查看详情
export function getArchivesUserTerminalTrainDetail(params) {
return request({
url: courseApi.terminalTrainDetail,
method: 'get',
params: params
})
}
// 人员档案-自学档案
export function getArchivesUserSelfStudyList(params) {
return request({
url: courseApi.selfStudyList,
method: 'get',
params: params
})
}
// 人员档案-违章档案
export function getArchivesUserViolationList(params) {
return request({
url: courseApi.violationList,
method: 'get',
params: params
})
}

View File

@ -1,5 +1,5 @@
const api = { const api = {
download: '/dawa/common/download', download: '/welfare/common/download',
} }
// 附件下载 // 附件下载

View File

@ -1,80 +0,0 @@
import request from '@/utils/request'
const courseApi = {
add: '/courseManagement/course/addOrUpdate',
get: '/courseManagement/course/details',
// update: 'sys/menu/update',
del: 'courseManagement/course/delete',
// updateStatus: 'sys/menu/updateStatus',
list: '/courseManagement/course/listPage',
coursewareList: '/courseManagement/course/courseware/details',
questionList: '/courseManagement/course/questionList',
listByClass: '/courseManagement/course/list',
}
export function courseAdd(params) {
return request({
url: courseApi.add,
method: 'post',
data: params
})
}
export function listByClass(params) {
return request({
url: courseApi.listByClass,
method: 'get',
params: params
})
}
// export function menuUpdate (params) {
// return request({
// url: menuApi.update,
// method: 'post',
// data: params
// })
// }
export function deleteCourse(params) {
return request({
url: courseApi.del,
method: 'delete',
params: params
})
}
// 查询课程列表
export function getCourseList(params) {
if (params.tag) params.tag = params.tag.toString();
return request({
url: courseApi.list,
method: 'get',
params: params
})
}
// 查看课程详情
export function getCourseDetails(params) {
return request({
url: courseApi.get,
method: 'get',
params: params
})
}
//通过课程ID获取课件列表
export function getCoursewareListByCourseId(params) {
return request({
url: courseApi.coursewareList,
method: 'get',
params: params
})
}
//通过课程ID获取题目列表
export function getQuestionListByCourseId(params) {
return request({
url: courseApi.questionList,
method: 'get',
params: params
})
}

View File

@ -1,58 +0,0 @@
import request from '@/utils/request'
const coursewareApi = {
add: '/courseManagement/xmCourseCourseware/addOrUpdate',
get: '/courseManagement/xmCourseCourseware/details',
del: 'courseManagement/xmCourseCourseware/delete',
classList: '/courseManagement/coursewareClassify/listPage',
resource:'/courseManagement/xmCourseCourseware/resource'
}
//删除课件
export function deleteCourseware(params) {
return request({
url: coursewareApi.del,
method: 'delete',
params: params
})
}
// 课件新增
export function coursewareAdd(params) {
return request({
url: coursewareApi.add,
method: 'post',
data: params
})
}
// 课件分类列表
export function coursewareClassList(params) {
return request({
url: coursewareApi.classList,
method: 'get',
params: params
})
}
// 课件详情
export function coursewareDeatil(params) {
return request({
url: coursewareApi.get,
method: 'get',
params: params
})
}
// 资源库
export function resource(params) {
return request({
url: coursewareApi.resource,
method: 'get',
params: params
})
}

View File

@ -1,53 +0,0 @@
import request from '@/utils/request'
const projectApi = {
// add: 'sys/menu/add',
// get: 'sys/menu/get',
// update: 'sys/menu/update',
// del: 'sys/menu/delete',
// updateStatus: 'sys/menu/updateStatus',
list: 'courseManagement/customCourse/listPage'
}
// export function menuAdd (params) {
// return request({
// url: menuApi.add,
// method: 'post',
// data: params
// })
// }
// export function menuGet (params) {
// return request({
// url: menuApi.get,
// method: 'post',
// data: params
// })
// }
// export function menuUpdate (params) {
// return request({
// url: menuApi.update,
// method: 'post',
// data: params
// })
// }
// export function menuDelete (params) {
// return request({
// url: menuApi.del,
// method: 'post',
// data: params
// })
// }
export function getcustomCourseList (params) {
return request({
url: customApi.list,
method: 'get',
params: params
})
}
// export function menuUpdateStatus (params) {
// return request({
// url: menuApi.updateStatus,
// method: 'post',
// data: params
// })
// }

View File

@ -1,74 +0,0 @@
import request from '@/utils/request'
const questionApi = {
add: 'courseManagement/question/addOrUpdate',
get: '/courseManagement/question/details',
// update: 'sys/menu/update',
del: 'courseManagement/question/delete',
// updateStatus: 'sys/menu/updateStatus',
// list: '/courseManagement/course/listPage',
// coursewareList:'/courseManagement/course/courseware/details',
// questionList:'/courseManagement/course/questionList',
importTemplate: "courseManagement/question/importTemplate",
getQuestionNumByCourseIds: '/courseManagement/question/getQuestionNumByCourseIds',
}
// 题目新增
export function questionAdd(params) {
return request({
url: questionApi.add,
method: 'post',
data: params
})
}
// 题目数量
export function getQuestionNumByCourseIds(params) {
return request({
url: questionApi.getQuestionNumByCourseIds,
method: 'post',
data: params
})
}
// export function menuGet (params) {
// return request({
// url: menuApi.get,
// method: 'post',
// data: params
// })
// }
// export function menuUpdate (params) {
// return request({
// url: menuApi.update,
// method: 'post',
// data: params
// })
// }
export function deleteQuestion(params) {
return request({
url: questionApi.del,
method: 'delete',
params: params
})
}
// 查看课程详情
export function getQuestionDeatil(params) {
return request({
url: questionApi.get,
method: 'get',
params: params
})
}
// 题目批量导入
export function importTemplate(params) {
return request({
url: questionApi.importTemplate,
method: 'post',
params: params
})
}

View File

@ -1,62 +0,0 @@
import request from '@/utils/request'
const requiredQuesitonApi = {
list: 'courseManagement/requiredQuestion/listPage',
addOrUpdate: 'courseManagement/requiredQuestion/addOrUpdate',
requiredQuestionId:'courseManagement/requiredQuestion/requiredQuestionId',
testing:'/courseManagement/requiredQuestion/testing',
}
// 必选题列表
export function requiredList(params) {
return request({
url: requiredQuesitonApi.list,
method: 'get',
params: params
})
}
// 必选题新增和设置
export function addOrUpdate(params) {
return request({
url: requiredQuesitonApi.addOrUpdate,
method: 'post',
params: params
})
}
//必选题题目ID
export function requiredQuestionId(params) {
return request({
url: requiredQuesitonApi.requiredQuestionId,
method: 'get',
params: params
})
}
//必选题题目内容
export function testing(params) {
return request({
url: requiredQuesitonApi.testing,
method: 'get',
params: params
})
}
// export function menuGet (params) {
// return request({
// url: menuApi.get,
// method: 'post',
// data: params
// })
// }
// export function menuUpdate (params) {
// return request({
// url: menuApi.update,
// method: 'post',
// data: params
// })
// }

View File

@ -1,29 +1,12 @@
import request from '@/utils/request' import request from '@/utils/request'
const dataApi = { const dataApi = {
orgStatistics: 'data/orgStatistics', statistics: 'data/statistics'
personalStatistics: 'data/personalStatistics',
classHourTop: 'data/personalStatistics/classHourTop'
} }
export function dataOrgStatistics (params) { export function dataStatistics () {
return request({ return request({
url: dataApi.orgStatistics, url: dataApi.statistics,
method: 'get', method: 'post'
params: params
})
}
export function dataPersonalStatistics (params) {
return request({
url: dataApi.personalStatistics,
method: 'get',
params: params
})
}
export function dataClassHourTop (params) {
return request({
url: dataApi.classHourTop,
method: 'get',
params: params
}) })
} }

45
src/api/honor/honor.js Normal file
View File

@ -0,0 +1,45 @@
import request from '@/utils/request'
const honorApi = {
addOrUpdate: '/honor/show/addOrUpdate',
detail: '/honor/show/detail',
del: '/honor/show/del',
list: '/honor/show/list',
setTop: '/honor/show/setTop'
}
export function honorAddOrUpdate (params) {
return request({
url: honorApi.addOrUpdate,
method: 'post',
data: params
})
}
export function honorDetail (params) {
return request({
url: honorApi.detail,
method: 'post',
data: params
})
}
export function honorDel (params) {
return request({
url: honorApi.del,
method: 'post',
data: params
})
}
export function honorPage (params) {
return request({
url: honorApi.list,
method: 'get',
params: params
})
}
export function honorSetTop (params) {
return request({
url: honorApi.setTop,
method: 'post',
data: params
})
}

View File

@ -1,187 +0,0 @@
import request from '@/utils/request'
const mycourseApi = {
changePassword: '/sys/user/changePwd',
mycourseList: 'myCourse/getMyCourseList', // 我的课程列表,课程搜索
addMyCourse: 'myCourse/addMyCourse', // 添加课程
centerList: 'focusTrain/getList', // 集中培训列表
centerDetail: 'focusTrain/getDetail', // 集中培训详情
centerJoin: 'project/terminalTrain/enroll', // 集中培训报名
centerSign: 'project/terminalTrain/sign', // 集中培训签到
recommendList: 'sys/recommend/listPage', // 系统推荐课程列表
recommendDetail: 'sys/recommend/detail', // 系统课程推荐详情
trainPlanList: '/myCourse/getMyTrainPlanList', // 培训计划列表
getMyTrainPlanCourse: '/myCourse/getMyTrainPlanCourse', // 获取培训计划中的课程列表
getCourseDetail: 'myCourse/getCourseDetail', // 我的课程详情
getCourseCatalogue: 'myCourse/getCourseCatalogue', // 获取课程目录
reqCourseExam: 'testInClass/add', // 课中检测
simulateTestList: 'simulateTest/list', // 模拟测试列表
simulateTestDetail: 'simulateTest/getQuestions', // 获取模拟测试详情
operationList: 'classwork/list', // 作业列表
reqOperationDetail: 'classwork/get', // 作业详情
reqOperationSubmit: 'classwork/submit', // 作业提交
getMyCourseList: 'studyStatistics/getMyCourseList', // 课程学习统计
addRecord: '/testInClass/addRecord' // pdf学习完成
}
export function reqMyTrainPlanCourse (data) {
return request({
url: mycourseApi.getMyTrainPlanCourse,
method: 'get',
params: data
})
}
export function reqAddRecord (data) {
return request({
url: mycourseApi.addRecord,
method: 'post',
params: data
})
}
export function reqChangePassword (data) {
return request({
url: mycourseApi.changePassword,
method: 'get',
params: data
})
}
export function reqCenterJoin (data) {
return request({
url: mycourseApi.centerJoin,
method: 'POST',
data: data
})
}
export function reqMycourseCount (params) {
return request({
url: mycourseApi.getMyCourseList,
method: 'get',
params: params
})
}
export function reqOperationDetail (params) {
return request({
url: mycourseApi.reqOperationDetail,
method: 'get',
params: params
})
}
export function reqOperationSubmit (params) {
return request({
url: mycourseApi.reqOperationSubmit,
method: 'post',
data: params
})
}
export function reqOperationList (params) {
return request({
url: mycourseApi.operationList,
method: 'get',
params: params
})
}
export function reqSimulateTestDetail (params) {
return request({
url: mycourseApi.simulateTestDetail,
method: 'post',
params: params
})
}
export function reqSimulateTestList (data) {
return request({
url: mycourseApi.simulateTestList,
method: 'post',
data: data,
params: data
})
}
export function reqMyCourseList (params) {
return request({
url: mycourseApi.mycourseList,
method: 'get',
params: params
})
}
export function reqMyTrainPlanList (params) {
return request({
url: mycourseApi.trainPlanList,
method: 'get',
params: params
})
}
export function reqAddMyCourse (params) {
return request({
url: mycourseApi.addMyCourse,
method: 'get',
params: params
})
}
export function reqCourseCenterList (params) {
return request({
url: mycourseApi.centerList,
method: 'get',
params: params
})
}
export function reqCourseCenterDetail (params) {
return request({
url: mycourseApi.centerDetail,
method: 'get',
params: params
})
}
export function reqRecommendList (params) {
return request({
url: mycourseApi.recommendList,
method: 'get',
params: params
})
}
export function recommendDetail (params) {
return request({
url: mycourseApi.recommendDetail,
method: 'get',
params: params
})
}
export function reqCourseDetail (params) {
return request({
url: mycourseApi.getCourseDetail,
method: 'get',
params: params
})
}
export function reqCourseCatalogue (params) {
return request({
url: mycourseApi.getCourseCatalogue,
method: 'get',
params: params
})
}
export function reqCourseExam (params, data) {
return request({
url: mycourseApi.reqCourseExam,
method: 'post',
params: params,
data: data
})
}

View File

@ -1,67 +0,0 @@
import request from '@/utils/request'
const examApi = {
examList: 'exam/list', // 我的考试-预约考试列表
attendList: 'exam/attend', // 我的考试-已参加考试
exam: 'exam/exam', // 我的考试进入考试
viewReport: 'exam/viewReport', // 查看报告
viewResolution: 'exam/viewResolution', // 查看解析
submit: 'exam/submit', // 交卷
subscribe: '/exam/subscribe'
}
export function reqExamViewResolution (data) {
return request({
url: examApi.viewResolution,
method: 'get',
params: data
})
}
export function reqExamSubscribe (data) {
return request({
url: examApi.subscribe,
method: 'get',
params: data
})
}
export function reqExamSubmit (data) {
return request({
url: examApi.submit,
method: 'post',
data: data
})
}
export function reqExamList (params) {
return request({
url: examApi.examList,
method: 'get',
params: params
})
}
export function reqExamAttendList (params) {
return request({
url: examApi.attendList,
method: 'get',
params: params
})
}
export function reqExamExam (params) {
return request({
url: examApi.exam,
method: 'get',
params: params
})
}
export function reqExamViewReport (params) {
return request({
url: examApi.viewReport,
method: 'get',
params: params
})
}

View File

@ -1,13 +0,0 @@
import request from '@/utils/request'
const countApi = {
myexamCount: 'data/person/learningStatistics' // 学习统计
}
export function getMyexamCount (params) {
return request({
url: countApi.myexamCount,
method: 'get',
params: params
})
}

View File

@ -1,22 +0,0 @@
import request from '@/utils/request'
const myresourceApi = {
list: 'courseManagement/xmCourseCourseware/resource', // 学习统计
addPreview: 'courseManagement/xmCourseCourseware/details', // 预览次数
}
export function gerMyresource (params) {
return request({
url: myresourceApi.list,
method: 'get',
params: params
})
}
export function reqAddPreview (params) {
return request({
url: myresourceApi.addPreview,
method: 'get',
params: params
})
}

View File

@ -1,62 +0,0 @@
import request from '@/utils/request'
const noticeApi = {
add: 'notice/addOrUpdate',
del: 'notice/del',
get: 'notice/get',
page: 'notice/pageList',
read: 'notice/read',
pagePerson: 'notice/pagePersonList',
cancel: 'notice/cancel'
}
export function noticeAdd (params) {
return request({
url: noticeApi.add,
method: 'post',
data: params
})
}
export function noticeDel (params) {
return request({
url: noticeApi.del,
method: 'post',
params: params
})
}
export function noticeGet (params) {
return request({
url: noticeApi.get,
method: 'get',
params: params
})
}
export function noticePage (params) {
return request({
url: noticeApi.page,
method: 'post',
params: {pageSize: params.pageSize, pageNum: params.pageNum},
data: params
})
}
export function noticeRead (params) {
return request({
url: noticeApi.read,
method: 'get',
params: params
})
}
export function noticePagePerson (params) {
return request({
url: noticeApi.pagePerson,
method: 'post',
params: params
})
}
export function noticeCancel (params) {
return request({
url: noticeApi.cancel,
method: 'post',
params: params
})
}

View File

@ -1,45 +0,0 @@
import request from '@/utils/request'
const orgApi = {
add: 'sys/org/add',
edit: 'sys/org/edit',
del: 'sys/org/del',
list: 'sys/org/list',
page: 'sys/org/pageList',
}
export function orgAdd (params) {
return request({
url: orgApi.add,
method: 'post',
data: params
})
}
export function orgEdit (params) {
return request({
url: orgApi.edit,
method: 'post',
data: params
})
}
export function orgDel (params) {
return request({
url: orgApi.del,
method: 'post',
params: params
})
}
export function orgList (params) {
return request({
url: orgApi.list,
method: 'get',
params: params
})
}
export function orgPage (params) {
return request({
url: orgApi.page,
method: 'get',
params: params
})
}

View File

@ -1,93 +0,0 @@
import request from '@/utils/request'
const personApi = {
addOrUpdate: 'person/addOrUpdate',
del: 'person/del',
get: 'person/get',
page: 'person/pageList',
transferOrg: 'person/transferOrg',
quit: 'person/quit',
resetPwd: 'person/resetPwd',
setAdmin: 'person/setAdmin',
changeLogPage: '/person/changeLog/pageList',
exportList: '/person/exportList',
importList: '/person/importList'
}
export function personAddOrUpdate (params) {
return request({
url: personApi.addOrUpdate,
method: 'post',
data: params
})
}
export function personGet (params) {
return request({
url: personApi.get,
method: 'get',
params: params
})
}
export function personDel (params) {
return request({
url: personApi.del,
method: 'post',
params: params
})
}
export function personPage (params) {
return request({
url: personApi.page,
method: 'get',
params: params
})
}
export function personTransferOrg (params) {
return request({
url: personApi.transferOrg,
method: 'get',
params: params
})
}
export function personQuit (params) {
return request({
url: personApi.quit,
method: 'get',
params: params
})
}
export function personResetPwd (params) {
return request({
url: personApi.resetPwd,
method: 'get',
params: params
})
}
export function personSetAdmin (params) {
return request({
url: personApi.setAdmin,
method: 'get',
params: params
})
}
export function personChangeLogPage (params) {
return request({
url: personApi.changeLogPage,
method: 'get',
params: params
})
}
export function personExport (params) {
return request({
url: personApi.exportList,
method: 'get',
params: params
})
}
export function personImport (params) {
return request({
url: personApi.importList,
method: 'post',
params: params
})
}

View File

@ -1,21 +0,0 @@
import request from '@/utils/request'
const personOrgApi = {
listByOrgId: 'person/org/listByOrgId',
addPersonOrg: 'person/org/addPersonOrg'
}
export function listPersonByOrgId(params) {
return request({
url: personOrgApi.listByOrgId,
method: 'get',
params: params
})
}
export function addPersonOrg(params) {
return request({
url: personOrgApi.addPersonOrg,
method: 'post',
data: params
})
}

View File

@ -1,13 +0,0 @@
import request from '@/utils/request'
const personRegisterApi = {
page: 'person/register/pageList'
}
export function personRegisterPage (params) {
return request({
url: personRegisterApi.page,
method: 'get',
params: params
})
}

View File

@ -0,0 +1,37 @@
import request from '@/utils/request'
const personApi = {
addOrUpdate: '/person/service/addOrUpdate',
detail: '/person/service/detail',
del: '/person/service/del',
list: '/person/service/list'
}
export function personServiceAddOrUpdate (params) {
return request({
url: personApi.addOrUpdate,
method: 'post',
data: params
})
}
export function personServiceDetail (params) {
return request({
url: personApi.detail,
method: 'post',
data: params
})
}
export function personServiceDel (params) {
return request({
url: personApi.del,
method: 'post',
data: params
})
}
export function personServicePage (params) {
return request({
url: personApi.list,
method: 'get',
params: params
})
}

View File

@ -0,0 +1,37 @@
import request from '@/utils/request'
const personApi = {
addOrUpdate: '/person/support/addOrUpdate',
detail: '/person/support/detail',
del: '/person/support/del',
list: '/person/support/list'
}
export function personAddOrUpdate (params) {
return request({
url: personApi.addOrUpdate,
method: 'post',
data: params
})
}
export function personDetail (params) {
return request({
url: personApi.detail,
method: 'post',
data: params
})
}
export function personDel (params) {
return request({
url: personApi.del,
method: 'post',
data: params
})
}
export function personPage (params) {
return request({
url: personApi.list,
method: 'get',
params: params
})
}

View File

@ -1,82 +0,0 @@
import request from '@/utils/request'
const practiceApi = {
get: 'practice/get',
add: 'practice/add',
del: 'practice/del',
list: 'practice/list',
collectionList: 'practice/collection/pageList', // 我的收藏列表
recordList: 'practice/record/pageList', // 答题记录
wrongList: 'practice/wrong/pageList', // 错题集
startAnswer: 'practice/startAnswer', // 开始答题
executeSubmit: 'practice/executeSubmit', // 练习交卷
}
export function practiceExecuteSubmit(data) {
return request({
url: practiceApi.executeSubmit,
method: 'post',
data: data
})
}
export function practiceStartAnswer(params) {
return request({
url: practiceApi.startAnswer,
method: 'post',
params: params
})
}
export function practiceCollectionPageList(params) {
return request({
url: practiceApi.collectionList,
method: 'get',
params: params
})
}
export function practiceRecordPageList(params) {
return request({
url: practiceApi.recordList,
method: 'get',
params: params
})
}
export function practiceWrongPageList(params) {
return request({
url: practiceApi.wrongList,
method: 'get',
params: params
})
}
export function practiceAdd(params) {
return request({
url: practiceApi.add,
method: 'post',
data: params
})
}
export function practiceGet(params) {
return request({
url: practiceApi.getDict,
method: 'get',
params: params
})
}
export function practiceDel (params) {
return request({
url: practiceApi.del,
method: 'delete',
params: params
})
}
export function practiceList(params) {
return request({
url: practiceApi.list,
method: 'get',
params: params
})
}

View File

@ -1,42 +0,0 @@
import request from '@/utils/request'
const answerApi = {
answerViewReport: 'answer/viewReport', // 查看报告
answerViewResolution: 'answer/viewResolution', // 查看解析
collection: 'practice/collection', // 收藏
collectionCancel: 'practice/cancel/collection' // 取消收藏
}
export function answerViewReport (params) {
return request({
url: answerApi.answerViewReport,
method: 'get',
params: params
})
}
export function reqCollection (params) {
return request({
url: answerApi.collection,
method: 'post',
params: params,
data: params
})
}
export function reqCollectionCancel (params) {
return request({
url: answerApi.collectionCancel,
method: 'get',
params: params,
data: params
})
}
export function answerViewResolution (params) {
return request({
url: answerApi.answerViewResolution,
method: 'get',
params: params
})
}

View File

@ -1,38 +0,0 @@
import request from '@/utils/request'
const classApi = {
get: '/project/species/get',
add: '/project/species/add',
del: '/project/species/del',
list: '/project/species/pageList'
}
export function classAdd(params) {
return request({
url: classApi.add,
method: 'post',
data: params
})
}
export function classGet(params) {
return request({
url: classApi.getDict,
method: 'get',
params: params
})
}
export function classDel (params) {
return request({
url: classApi.del,
method: 'delete',
params: params
})
}
export function classList(params) {
console.log("------------{}", params)
return request({
url: classApi.list,
method: 'get',
params: params
})
}

View File

@ -1,59 +0,0 @@
import request from '@/utils/request'
const projectApi = {
add: 'project/addOrUpdate',
getDict: 'project/dict/get',
list: 'project/pageList',
get: 'project/get',
del: 'project/del',
projectCourseList: '',
release: '/project/release',
}
export function projectAdd(params) {
return request({
url: projectApi.add,
method: 'post',
data: params
})
}
export function projectDel(params) {
return request({
url: projectApi.del,
method: 'post',
params: params
})
}
export function dictGet(params) {
return request({
url: projectApi.getDict,
method: 'get',
params: params
})
}
export function getProjectList(params) {
return request({
url: projectApi.list,
method: 'get',
params: params
})
}
export function getProjectDetail(params) {
return request({
url: projectApi.get,
method: 'get',
params: params
})
}
export function releaseProject(params) {
return request({
url: projectApi.release,
method: 'post',
params: params
})
}

View File

@ -1,30 +0,0 @@
import request from '@/utils/request'
const projectCourseApi = {
// add: 'project/add',
// getDict:'project/dict/get',
// get: 'sys/menu/get',
// update: 'sys/menu/update',
// del: 'sys/menu/delete',
// // updateStatus: 'sys/menu/updateStatus',
// list: 'project/pageList',
projectCourseList: '/project/course/list',
courseList: '/project/course/listByCourseIds'
}
/** 通过项目id查询 */
export function getCourseList (params) {
return request({
url: projectCourseApi.projectCourseList,
method: 'get',
params: params
})
}
/** 通过课程列表查询 */
export function getCourseListByCourseIds (params) {
return request({
url: projectCourseApi.courseList,
method: 'Post',
params: params
})
}

View File

@ -1,56 +0,0 @@
import request from '@/utils/request'
const terminalTrainApi = {
edit: '/project/terminal/addOrUpdate',
del: '/project/terminal/del',
list: '/project/terminal/pageList',
get: '/project/terminal/get',
release: '/project/terminal/release', //发布项目
}
export function terminalTrainEdit(params) {
return request({
url: terminalTrainApi.edit,
method: 'post',
data: params
})
}
export function terminalTrainDel(params) {
return request({
url: terminalTrainApi.del,
method: 'delete',
params: params
})
}
export function terminalTrainList(params) {
console.log("terminalTrainList------------{}", params)
return request({
url: terminalTrainApi.list,
method: 'get',
params: params
})
}
export function terminalTrainGet(params) {
console.log("terminalTrainGet------------{}", params)
return request({
url: terminalTrainApi.get,
method: 'get',
params: {
id: params,
}
})
}
// releaseTerminalTrain
export function releaseTerminalTrain(params) {
console.log("terminalTrainRelease------------{}", params)
return request({
url: terminalTrainApi.release,
method: 'put',
params: params
})
}

View File

@ -1,15 +0,0 @@
import request from '@/utils/request'
const terminalTrainSignApi = {
list: 'project/terminalTrain/list',
}
export function terminalTrainSignList(params) {
// console.log("terminalTrainList------------{}", params)
return request({
url: terminalTrainSignApi.list,
method: 'get',
params: params
})
}

54
src/api/room/room.js Normal file
View File

@ -0,0 +1,54 @@
import request from '@/utils/request'
const roomApi = {
addOrUpdate: '/room/addOrUpdate',
detail: '/room/detail',
del: '/room/del',
list: '/room/list',
listAllRoom: '/room/listAllRoom',
listAllBed: '/room/listAllBed',
}
export function roomAddOrUpdate (params) {
return request({
url: roomApi.addOrUpdate,
method: 'post',
data: params
})
}
export function roomDetail (params) {
return request({
url: roomApi.detail,
method: 'post',
data: params
})
}
export function roomDel (params) {
return request({
url: roomApi.del,
method: 'post',
data: params
})
}
export function roomPage (params) {
return request({
url: roomApi.list,
method: 'get',
params: params
})
}
export function roomListAll (params) {
return request({
url: roomApi.listAllRoom,
method: 'post',
data: params
})
}
export function roomListAllBed (params) {
return request({
url: roomApi.listAllBed,
method: 'post',
data: params
})
}

45
src/api/room/roomCheck.js Normal file
View File

@ -0,0 +1,45 @@
import request from '@/utils/request'
const roomCheckApi = {
addOrUpdate: '/hospital/record/addOrUpdate',
detail: '/hospital/record/detail',
del: '/hospital/record/del',
checkinList: '/hospital/record/checkin/list',
checkoutList: '/hospital/record/checkout/list'
}
export function roomCheckAddOrUpdate (params) {
return request({
url: roomCheckApi.addOrUpdate,
method: 'post',
data: params
})
}
export function roomCheckDetail (params) {
return request({
url: roomCheckApi.detail,
method: 'post',
data: params
})
}
export function roomCheckDel (params) {
return request({
url: roomCheckApi.del,
method: 'post',
data: params
})
}
export function roomCheckinList (params) {
return request({
url: roomCheckApi.checkinList,
method: 'get',
params: params
})
}
export function roomCheckoutList (params) {
return request({
url: roomCheckApi.checkoutList,
method: 'get',
params: params
})
}

View File

@ -9,7 +9,8 @@ const userApi = {
page: '/sys/user/pageList', page: '/sys/user/pageList',
getInfo: '/sys/user/getInfo', getInfo: '/sys/user/getInfo',
ownRole: '/sys/user/ownRole', ownRole: '/sys/user/ownRole',
grantRole: '/sys/user/grantRole' grantRole: '/sys/user/grantRole',
changePassword: '/sys/user/changePwd'
} }
const userPasswordApi = { const userPasswordApi = {
@ -89,3 +90,10 @@ export function passwordReset (params) {
params: params params: params
}) })
} }
export function reqChangePassword (data) {
return request({
url: mycourseApi.changePassword,
method: 'get',
params: data
})
}

View File

@ -1,40 +0,0 @@
import request from '@/utils/request'
const trainPlanAPI = {
add: '/trainPlan/add',
list: '/trainPlan/list',
get: '/trainPlan/get',
del: '/trainPlan/del'
}
export function trainPlanAdd(params) {
return request({
url: trainPlanAPI.add,
method: 'post',
data: params
})
}
export function trainPlanList(params) {
return request({
url: trainPlanAPI.list,
method: 'get',
params: params
})
}
export function trainPlanGet(params) {
return request({
url: trainPlanAPI.get,
method: 'get',
params: params
})
}
export function trainPlanDel(params) {
return request({
url: trainPlanAPI.del,
method: 'delete',
params: params
})
}

BIN
src/assets/build.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/assets/login.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
src/assets/pageBg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 KiB

View File

@ -0,0 +1,99 @@
// 颜色
$colors: (
"primary": #1A5CD7,
"info-1": #4394e4,
"info": #4b67af,
"white": #ffffff,
"light": #f9f9f9,
"grey-1": #999999,
"grey": #666666,
"dark-1": #5f5f5f,
"dark": #222222,
"black-1": #171823,
"black": #000000,
"icon": #5cd9e8
);
// 字体大小
$base-font-size: 0.2rem;
$font-sizes: (
xxs: 0.1,
//8px
xs: 0.125,
//10px
sm: 0.2875,
//12px
md: 0.1625,
//13px
lg: 0.175,
//14px
xl: 0.2,
//16px
xxl: 0.225,
//18px
xxxl: 0.25 //20px,,,,
);
// 宽高
.w-100 {
width: 100%;
}
.h-100 {
height: 100%;
}
//flex
.d-flex {
display: flex;
line-height: 1
}
.flex-column {
flex-direction: column;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-nowrap {
flex-wrap: nowrap;
}
$flex-jc: (
start: flex-start,
end: flex-end,
center: center,
between: space-between,
around: space-around,
evenly: space-evenly,
);
$flex-ai: (
start: flex-start,
end: flex-end,
center: center,
stretch: stretch,
);
.flex-1 {
flex: 1;
}
//.mt-1 => margin top
//spacing
$spacing-types: (
m: margin,
p: padding,
);
$spacing-directions: (
t: top,
r: right,
b: bottom,
l: left,
);
$spacing-base-size: 0.5rem;
$spacing-sizes: (
0: 0,
1: 0.5,
2: 1,
3: 1.5,
4: 2,
5: 2.5,
);

144
src/assets/scss/index.scss Normal file
View File

@ -0,0 +1,144 @@
#index {
color: #d3d6dd;
width: 1920px;
height: 1080px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
transform-origin: left top;
overflow: hidden;
.bg {
width: 100%;
height: 100%;
padding: 16px 16px 0 16px;
background-image: url("../../assets/pageBg.png");
background-size: cover;
background-position: center center;
}
.host-body {
.dv-dec-10,
.dv-dec-10-s {
width: 33.3%;
height: 5px;
}
.dv-dec-10-s {
transform: rotateY(180deg);
}
.dv-dec-8 {
width: 200px;
height: 50px;
}
.title {
position: relative;
width: 500px;
text-align: center;
background-size: cover;
background-repeat: no-repeat;
.title-text {
font-size: 30px;
position: absolute;
bottom: 0;
left: 50%;
transform: translate(-50%);
}
.dv-dec-6 {
position: absolute;
bottom: -30px;
left: 50%;
width: 250px;
height: 8px;
transform: translate(-50%);
}
}
// 第二行
.aside-width {
width: 40%;
}
.react-r-s,
.react-l-s {
background-color: #0f1325;
}
// 平行四边形
.react-right {
/* &.react-l-s {
text-align: right;
width: 500px;
} */
font-size: 24px;
width: 300px;
line-height: 50px;
text-align: center;
transform: skewX(-45deg);
.react-after {
position: absolute;
right: -25px;
top: 0;
height: 50px;
width: 50px;
background-color: #0f1325;
transform: skewX(45deg);
}
.text {
display: inline-block;
transform: skewX(45deg);
}
}
.react-left {
&.react-l-s {
width: 500px;
text-align: left;
}
font-size: 24px;
width: 300px;
height: 50px;
line-height: 50px;
text-align: center;
transform: skewX(45deg);
background-color: #0f1325;
.react-left {
position: absolute;
left: -25px;
top: 0;
height: 50px;
width: 50px;
background-color: #0f1325;
transform: skewX(-45deg);
}
.text {
display: inline-block;
transform: skewX(-45deg);
}
}
.body-box {
margin-top: 16px;
display: flex;
flex-direction: column;
//下方区域的布局
.content-box {
display: grid;
grid-template-columns: 2fr 3fr 5fr 3fr 2fr;
}
// 底部数据
.bottom-box {
margin-top: 10px;
display: grid;
grid-template-columns: repeat(2, 50%);
}
}
}
}

186
src/assets/scss/style.scss Normal file
View File

@ -0,0 +1,186 @@
@import "./variables";
// 全局样式
* {
margin: 0;
padding: 0;
list-style-type: none;
outline: none;
box-sizing: border-box;
}
html {
margin: 0;
padding: 0;
}
body {
font-family: Arial, Helvetica, sans-serif;
line-height: 1.2em;
background-color: #f1f1f1;
margin: 0;
padding: 0;
overflow: hidden;
}
a {
color: #343440;
text-decoration: none;
}
.clearfix {
&::after {
content: "";
display: table;
height: 0;
line-height: 0;
visibility: hidden;
clear: both;
}
}
//浮动
.float-r {
float: right;
}
//浮动
.float-l {
float: left;
}
// 字体加粗
.fw-b {
font-weight: bold;
}
//文章一行显示多余省略号显示
.title-item {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.bg-color-black {
background-color: rgba(19, 25, 47, 0.6);
}
.bg-color-blue {
background-color: #1a5cd7;
}
.colorBlack {
color: #272727 !important;
&:hover {
color: #272727 !important;
}
}
.colorGrass {
color: #33cea0;
&:hover {
color: #33cea0 !important;
}
}
.colorRed {
color: #ff5722;
&:hover {
color: #ff5722 !important;
}
}
.colorText {
color: #d3d6dd !important;
&:hover {
color: #d3d6dd !important;
}
}
.colorBlue {
color: #257dff !important;
&:hover {
color: #257dff !important;
}
}
//颜色
@each $colorkey, $color in $colors {
.text-#{$colorkey} {
color: $color;
}
.bg-#{$colorkey} {
background-color: $color;
}
}
//对齐
@each $var in (left, center, right) {
.text-#{$var} {
text-align: $var !important;
}
}
//flex
@each $key, $value in $flex-jc {
.jc-#{$key} {
justify-content: $value;
}
}
@each $key, $value in $flex-ai {
.ai-#{$key} {
align-items: $value;
}
}
//字体
@each $fontkey, $fontvalue in $font-sizes {
.fs-#{$fontkey} {
font-size: $fontvalue * $base-font-size;
}
}
//.mt-1 => margin top
//spacing
@each $typekey, $type in $spacing-types {
//.m-1
@each $sizekey, $size in $spacing-sizes {
.#{$typekey}-#{$sizekey} {
#{$type}: $size * $spacing-base-size;
}
}
//.mx-1
@each $sizekey, $size in $spacing-sizes {
.#{$typekey}x-#{$sizekey} {
#{$type}-left: $size * $spacing-base-size;
#{$type}-right: $size * $spacing-base-size;
}
.#{$typekey}y-#{$sizekey} {
#{$type}-top: $size * $spacing-base-size;
#{$type}-bottom: $size * $spacing-base-size;
}
}
//.mt-1
@each $directionkey, $direction in $spacing-directions {
@each $sizekey, $size in $spacing-sizes {
.#{$typekey}#{$directionkey}-#{$sizekey} {
#{$type}-#{$direction}: $size * $spacing-base-size;
}
}
}
.#{$typekey} {
#{$type}: 0;
}
}

BIN
src/assets/user_head.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,67 @@
<template>
<div :id="id" :class="className" :style="{ height: height, width: width }" />
</template>
<script>
import tdTheme from './theme.json' //
import '../map/fujian.js'
export default {
name: 'echart',
props: {
className: {
type: String,
default: 'chart'
},
id: {
type: String,
default: 'chart'
},
width: {
type: String,
default: '100%'
},
height: {
type: String,
default: '2.5rem'
},
options: {
type: Object,
default: ()=>({})
}
},
data () {
return {
chart: null
}
},
watch: {
options: {
handler (options) {
// trueechart
this.chart.setOption(options, true)
},
deep: true
}
},
mounted () {
this.$echarts.registerTheme('tdTheme', tdTheme); //
this.initChart();
},
beforeDestroy () {
this.chart.dispose()
this.chart = null
},
methods: {
initChart () {
// echart
this.chart = this.$echarts.init(this.$el, 'tdTheme')
document.getElementById(this.id).setAttribute('_echarts_instance_', '')
this.chart.setOption(this.options, true)
}
}
}
</script>
<style>
</style>

View File

@ -0,0 +1,490 @@
{
"color": [
"#2d8cf0",
"#19be6b",
"#ff9900",
"#E46CBB",
"#9A66E4",
"#ed3f14"
],
"backgroundColor": "rgba(0,0,0,0)",
"textStyle": {},
"title": {
"textStyle": {
"color": "#516b91"
},
"subtextStyle": {
"color": "#93b7e3"
}
},
"line": {
"itemStyle": {
"normal": {
"borderWidth": "2"
}
},
"lineStyle": {
"normal": {
"width": "2"
}
},
"symbolSize": "6",
"symbol": "emptyCircle",
"smooth": true
},
"radar": {
"itemStyle": {
"normal": {
"borderWidth": "2"
}
},
"lineStyle": {
"normal": {
"width": "2"
}
},
"symbolSize": "6",
"symbol": "emptyCircle",
"smooth": true
},
"bar": {
"itemStyle": {
"normal": {
"barBorderWidth": 0,
"barBorderColor": "#ccc"
},
"emphasis": {
"barBorderWidth": 0,
"barBorderColor": "#ccc"
}
}
},
"pie": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"scatter": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"boxplot": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"parallel": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"sankey": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"funnel": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"gauge": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"emphasis": {
"borderWidth": 0,
"borderColor": "#ccc"
}
}
},
"candlestick": {
"itemStyle": {
"normal": {
"color": "#edafda",
"color0": "transparent",
"borderColor": "#d680bc",
"borderColor0": "#8fd3e8",
"borderWidth": "2"
}
}
},
"graph": {
"itemStyle": {
"normal": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"lineStyle": {
"normal": {
"width": 1,
"color": "#aaa"
}
},
"symbolSize": "6",
"symbol": "emptyCircle",
"smooth": true,
"color": [
"#2d8cf0",
"#19be6b",
"#f5ae4a",
"#9189d5",
"#56cae2",
"#cbb0e3"
],
"label": {
"normal": {
"textStyle": {
"color": "#eee"
}
}
}
},
"map": {
"itemStyle": {
"normal": {
"areaColor": "#f3f3f3",
"borderColor": "#516b91",
"borderWidth": 0.5
},
"emphasis": {
"areaColor": "rgba(165,231,240,1)",
"borderColor": "#516b91",
"borderWidth": 1
}
},
"label": {
"normal": {
"textStyle": {
"color": "#000"
}
},
"emphasis": {
"textStyle": {
"color": "rgb(81,107,145)"
}
}
}
},
"geo": {
"itemStyle": {
"normal": {
"areaColor": "#f3f3f3",
"borderColor": "#516b91",
"borderWidth": 0.5
},
"emphasis": {
"areaColor": "rgba(165,231,240,1)",
"borderColor": "#516b91",
"borderWidth": 1
}
},
"label": {
"normal": {
"textStyle": {
"color": "#000"
}
},
"emphasis": {
"textStyle": {
"color": "rgb(81,107,145)"
}
}
}
},
"categoryAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#fff"
}
},
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#eeeeee"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"valueAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#fff"
}
},
"splitLine": {
"show": false,
"lineStyle": {
"color": [
"#eeeeee"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"logAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#999999"
}
},
"splitLine": {
"show": true,
"lineStyle": {
"color": [
"#eeeeee"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"timeAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"textStyle": {
"color": "#999999"
}
},
"splitLine": {
"show": true,
"lineStyle": {
"color": [
"#eeeeee"
]
}
},
"splitArea": {
"show": false,
"areaStyle": {
"color": [
"rgba(250,250,250,0.05)",
"rgba(200,200,200,0.02)"
]
}
}
},
"toolbox": {
"iconStyle": {
"normal": {
"borderColor": "#999"
},
"emphasis": {
"borderColor": "#666"
}
}
},
"legend": {
"textStyle": {
"color": "#fff"
}
},
"tooltip": {
"axisPointer": {
"lineStyle": {
"color": "#ccc",
"width": 1
},
"crossStyle": {
"color": "#ccc",
"width": 1
}
}
},
"timeline": {
"lineStyle": {
"color": "#8fd3e8",
"width": 1
},
"itemStyle": {
"normal": {
"color": "#8fd3e8",
"borderWidth": 1
},
"emphasis": {
"color": "#8fd3e8"
}
},
"controlStyle": {
"normal": {
"color": "#8fd3e8",
"borderColor": "#8fd3e8",
"borderWidth": 0.5
},
"emphasis": {
"color": "#8fd3e8",
"borderColor": "#8fd3e8",
"borderWidth": 0.5
}
},
"checkpointStyle": {
"color": "#8fd3e8",
"borderColor": "rgba(138,124,168,0.37)"
},
"label": {
"normal": {
"textStyle": {
"color": "#8fd3e8"
}
},
"emphasis": {
"textStyle": {
"color": "#8fd3e8"
}
}
}
},
"visualMap": {
"color": [
"#516b91",
"#59c4e6",
"#a5e7f0"
]
},
"dataZoom": {
"backgroundColor": "rgba(0,0,0,0)",
"dataBackgroundColor": "rgba(255,255,255,0.3)",
"fillerColor": "rgba(167,183,204,0.4)",
"handleColor": "#a7b7cc",
"handleSize": "100%",
"textStyle": {
"color": "#333"
}
},
"markPoint": {
"label": {
"normal": {
"textStyle": {
"color": "#eee"
}
},
"emphasis": {
"textStyle": {
"color": "#eee"
}
}
}
}
}

48
src/common/map/fujian.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,174 @@
<template>
<div>
<div class="dynamic-wrap" :style="{ maxHeight: wrapHeight + 'px' }">
<div v-for="item in keysList" :key="item">
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="id" v-show="false" >
<a-input
placeholder="id"
v-decorator="[
`${title}Id[${item}]`,
{
initialValue: arr[item] ? arr[item].id : undefined
}
]"
/>
</a-form-item>
<a-form-item label="姓名" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-input
placeholder="请填写姓名"
v-decorator="[
`${title}FamilyName[${item}]`,
{
initialValue: arr[item] ? arr[item].familyName : undefined
// ,rules: [{ required: true, message: '!' }]
}
]"
/>
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="关系" :labelCol="{span: 6}" :wrapperCol="{span: 16}">
<a-input
placeholder="请填写关系"
v-decorator="[
`${title}Relation[${item}]`,
{
initialValue: arr[item] ? arr[item].relation : undefined
}
]"
/>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="联系方式" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-input
placeholder="请填写联系方式"
v-decorator="[
`${title}Phone[${item}]`,
{
initialValue: arr[item] ? arr[item].phone : undefined
}
]" />
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="工作单位" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-input
placeholder="请填写工作单位"
v-decorator="[
`${title}WorkInfo[${item}]`,
{
initialValue: arr[item] ? arr[item].workInfo : undefined
}
]" />
</a-form-item>
</a-col>
<a-col :span="2" style="padding-left: 0px">
<a-form-item :labelCol="{span: 0}" :wrapperCol="{span: 24}">
<template >
<a-button type="dashed" icon="minus" @click="removeRow(item)" class="minusRowBtn"></a-button>
</template>
</a-form-item>
</a-col>
</a-row>
</div>
<a-button type="dashed" icon="plus" @click="addRow" class="addRowBtn">
新增一行
</a-button>
</div>
</div>
</template>
<script>
export default {
name: 'DynamicForm',
props: {
title: {
type: String,
default: ''
},
wrapHeight: { //
type: Number,
default: 120
},
arr: {
type: Array,
default: function () {
return []
}
}
},
data () {
return {
id: 0,
keysList: []
}
},
created () {
this.form = this.$form.createForm(this)
this.init()
},
methods: {
//
init () {
const arr = [0]
if (this.arr.length !== 0) {
for (let i = 1; i < (this.arr).length; i++) {
arr.push(i)
this.id = this.id + 1
}
}
this.keysList = arr
},
//
removeRow (k) {
/*
if (this.keysList.length === 0) { // this.keysList.length === 0
return
} */
this.keysList = this.keysList.filter(item => item !== k)
},
//
addRow () {
this.id = this.id + 1
this.keysList = this.keysList.concat(this.id)
}
}
}
</script>
<style lang="less" scoped>
.dynamic-wrap {
padding-top: 10px;
background-color: white;
overflow-y: scroll;
overflow-x: hidden;
&::-webkit-scrollbar {
width: 7px;
}
&::-webkit-scrollbar-thumb {
background: #d8d8d8;
border-radius: 10px;
}
&::-webkit-scrollbar-track-piece {
background: transparent;
}
}
.minusRowBtn {
color: #f5222d;
background: #fff1f0;
border-color: #ffa39e;
padding-right: 7px;
padding-left: 7px;
height: 29px;
margin-left: 10px;
}
.addRowBtn {
width: 70%;
color: #1890ff;
border-color: #91d5ff;
margin: 0px 0px 20px 70px;
}
</style>

View File

@ -0,0 +1,150 @@
<template>
<div>
<div class="dynamic-wrap" :style="{ maxHeight: wrapHeight + 'px' }">
<div v-for="item in keysList" :key="item">
<a-row :gutter="24">
<a-col :span="10">
<a-form-item label="id" v-show="false" >
<a-input
placeholder="id"
v-decorator="[
`${title}Id[${item}]`,
{
initialValue: arr[item] ? arr[item].id : undefined
}
]"
/>
</a-form-item>
<a-form-item label="床位号" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-input
placeholder="请填写床位号"
v-decorator="[
`${title}Name[${item}]`,
{
initialValue: arr[item] ? arr[item].name : undefined
// ,rules: [{ required: true, message: '!' }]
}
]"
/>
</a-form-item>
</a-col>
<a-col :span="10">
<a-form-item label="备注" :labelCol="{span: 6}" :wrapperCol="{span: 16}">
<a-input
placeholder="请填写备注"
v-decorator="[
`${title}Remark[${item}]`,
{
initialValue: arr[item] ? arr[item].remark : undefined
}
]"
/>
</a-form-item>
</a-col>
<a-col :span="2" style="padding-left: 0px">
<a-form-item :labelCol="{span: 0}" :wrapperCol="{span: 24}">
<template >
<a-button type="dashed" icon="minus" @click="removeRow(item)" class="minusRowBtn"></a-button>
</template>
</a-form-item>
</a-col>
</a-row>
</div>
<a-button type="dashed" icon="plus" @click="addRow" class="addRowBtn">
新增一行
</a-button>
</div>
</div>
</template>
<script>
export default {
name: 'DynamicFormRoom',
props: {
title: {
type: String,
default: ''
},
wrapHeight: { //
type: Number,
default: 120
},
arr: {
type: Array,
default: function () {
return []
}
}
},
data () {
return {
id: 0,
keysList: []
}
},
created () {
this.form = this.$form.createForm(this)
this.init()
},
methods: {
//
init () {
const arr = [0]
if (this.arr.length !== 0) {
for (let i = 1; i < (this.arr).length; i++) {
arr.push(i)
this.id = this.id + 1
}
}
this.keysList = arr
},
//
removeRow (k) {
/*
if (this.keysList.length === 0) { // this.keysList.length === 0
return
} */
this.keysList = this.keysList.filter(item => item !== k)
},
//
addRow () {
this.id = this.id + 1
this.keysList = this.keysList.concat(this.id)
}
}
}
</script>
<style lang="less" scoped>
.dynamic-wrap {
padding-top: 10px;
background-color: white;
overflow-y: scroll;
overflow-x: hidden;
&::-webkit-scrollbar {
width: 7px;
}
&::-webkit-scrollbar-thumb {
background: #d8d8d8;
border-radius: 10px;
}
&::-webkit-scrollbar-track-piece {
background: transparent;
}
}
.minusRowBtn {
color: #f5222d;
background: #fff1f0;
border-color: #ffa39e;
padding-right: 7px;
padding-left: 7px;
height: 29px;
margin-left: 10px;
}
.addRowBtn {
width: 70%;
color: #1890ff;
border-color: #91d5ff;
margin: 0px 0px 20px 70px;
}
</style>

View File

@ -20,6 +20,7 @@
:customRequest="uploadFile" :customRequest="uploadFile"
:remove="handlerRemove" :remove="handlerRemove"
@preview="handlePreview" @preview="handlePreview"
:disabled="disabled"
> >
<div v-if="max>value.length"> <div v-if="max>value.length">
<a-icon type="plus" /> <a-icon type="plus" />
@ -38,7 +39,7 @@
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import { reqUploadFile, reqUploadImg } from '@/api/sys/upload' import { reqUploadFile, reqUploadImg } from '@/api/sys/upload'
function getBase64(file) { function getBase64 (file) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const reader = new FileReader() const reader = new FileReader()
reader.readAsDataURL(file) reader.readAsDataURL(file)
@ -60,7 +61,7 @@ export default {
// //
max: { max: {
type: [Number, String], type: [Number, String],
default: 2 // default: 999 //
}, },
// [{name: '', uid: '', url: ''}] // [{name: '', uid: '', url: ''}]
value: { value: {
@ -72,26 +73,30 @@ export default {
default: 'image/*' // ,* default: 'image/*' // ,*
}, },
// //
fileSize:{ fileSize: {
type:[Number, String], type: [Number, String],
default:500 default: 500
}, },
disabled: {
type: Boolean,
default: false
}
}, },
model: { model: {
prop: 'value', prop: 'value',
event: 'change' event: 'change'
}, },
data() { data () {
return { return {
previewVisible: false, previewVisible: false,
previewImage: '' previewImage: ''
} }
}, },
methods: { methods: {
handleCancel() { handleCancel () {
this.previewVisible = false this.previewVisible = false
}, },
async handlePreview(file) { async handlePreview (file) {
if (!file.url && !file.preview) { if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj) file.preview = await getBase64(file.originFileObj)
} }
@ -99,13 +104,14 @@ export default {
this.previewVisible = true this.previewVisible = true
}, },
// //
uploadFile(data) { uploadFile (data) {
const { max } = this const { max } = this
const { type } = this const { type } = this
const formData = new FormData() const formData = new FormData()
formData.append('file', data.file) formData.append('file', data.file)
if (type == 'img') { if (type == 'img') {
formData.append('fileSize', this.fileSize) //
// formData.append('fileSize', this.fileSize)
reqUploadImg(formData).then(res => { reqUploadImg(formData).then(res => {
if (res.code === 200) { if (res.code === 200) {
const file = { const file = {
@ -142,7 +148,7 @@ export default {
} }
}, },
// //
handlerRemove(file) { handlerRemove (file) {
const index = _.findIndex(this.value, ['uid', file.uid]) const index = _.findIndex(this.value, ['uid', file.uid])
const newFileList = this.value.slice() const newFileList = this.value.slice()
newFileList.splice(index, 1) newFileList.splice(index, 1)

View File

@ -1,4 +1,3 @@
<!-- 作者cgd 邮箱349008059@qq.com 时间2022年02月24日 16:54:58 -->
<template> <template>
<a-modal <a-modal
title="修改密码" title="修改密码"
@ -13,7 +12,7 @@
size="large" size="large"
type="text" type="text"
placeholder="用户名" placeholder="用户名"
:value="$store.state.user.person.userName" :value="$store.state.user.person.name"
disabled disabled
></a-input> ></a-input>
</a-form-item> </a-form-item>

View File

@ -0,0 +1,109 @@
<template>
<div>
<Echart :options="options" id="bottomLeftChart" height="220px" width="100%" ref="myChart"></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data () {
return {
options: {}
}
},
components: {
Echart
},
props: {
cdata: {
type: Object,
default: () => ({})
}
},
watch: {
cdata: {
handler (newData) {
this.options = {
tooltip: {
trigger: 'axis',
axisPointer: {
// Use axis to trigger tooltip
type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
}
},
legend: {},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'value',
show: false
},
color: [
'#73c0D1',
'#5470c6'
],
textStyle: {
fontSize: 20
},
yAxis: {
type: 'category',
data: ['供养床位','供养房间'],
axisLabel: {
fontSize: 20
}
},
series: [{
name: '入住数',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.cdata.seriesData.map(item => item.value2)
},
{
name: '剩余数',
type: 'bar',
stack: 'total',
label: {
show: true
},
emphasis: {
focus: 'series'
},
data: this.cdata.seriesData.map(item => item.value)
}
]
}
},
immediate: true,
deep: true
}
},
methods: {
},
mounted () {
const myChart = this.$refs['myChart'].chart
//
myChart.on('click', (params) => {
if (params.seriesName == '总数') {
this.$router.push({
path: '/room/list'
})
} else {
this.$router.push({
path: '/room/checkin'
})
}
})
}
}
</script>

View File

@ -0,0 +1,35 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue'
export default {
props: {
roomCountList: {
type: Array,
default: () => ([])
}
},
data () {
return {
cdata: {
xData: this.roomCountList.map(item => item.name),
seriesData: this.roomCountList
}
}
},
components: {
Chart
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,194 @@
<template>
<div>
<Echart :options="options" id="bottomLeftChart" height="480px" width="100%" ref="myChart"></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data () {
return {
options: {}
}
},
components: {
Echart
},
props: {
cdata: {
type: Object,
default: () => ({})
}
},
watch: {
cdata: {
handler (newData) {
this.options = {
tooltip: {
trigger: 'axis',
backgroundColor: 'rgba(255,255,255,0.1)',
axisPointer: {
type: 'shadow',
label: {
show: true,
backgroundColor: '#7B7DDC'
}
}
},
legend: {
data: ['集中供养数', '供养总人数', '集中供养率'],
textStyle: {
color: '#B4B4B4',
fontSize: 20
},
top: '0%'
},
grid: {
x: '8%',
width: '88%',
y: '4%'
},
xAxis: {
data: newData.category,
axisLine: {
lineStyle: {
color: '#B4B4B4'
}
},
axisLabel: {
fontSize: 18
},
axisTick: {
show: false
}
},
yAxis: [{
splitLine: {
show: false
},
axisLine: {
lineStyle: {
color: '#B4B4B4'
}
},
axisLabel: {
formatter: '{value} '
}
},
{
splitLine: {
show: false
},
axisLine: {
lineStyle: {
color: '#B4B4B4'
}
},
axisLabel: {
formatter: '{value} '
}
}
],
series: [{
name: '集中供养率',
type: 'line',
smooth: true,
showAllSymbol: true,
symbol: 'emptyCircle',
symbolSize: 8,
yAxisIndex: 1,
itemStyle: {
normal: {
color: '#F02FC2'
}
},
data: newData.rateData
},
{
name: '集中供养数',
type: 'bar',
barWidth: 20,
itemStyle: {
normal: {
barBorderRadius: 10,
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: '#956FD4'
},
{
offset: 1,
color: '#3EACE5'
}
])
}
},
data: newData.barData
},
{
name: '供养总人数',
type: 'bar',
barGap: '-100%',
barWidth: 20,
itemStyle: {
normal: {
barBorderRadius: 10,
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: 'rgba(156,107,211,0.8)'
},
{
offset: 0.2,
color: 'rgba(156,107,211,0.5)'
},
{
offset: 1,
color: 'rgba(156,107,211,0.2)'
}
])
}
},
z: -12,
data: newData.lineData
}
]
}
},
immediate: true,
deep: true
}
},
methods: {
clickChart () {
}
},
mounted () {
const myChart = this.$refs['myChart'].chart
//
myChart.getZr().on('click', (params) => {
// echartsData
if (this.cdata.category.length > 0) {
const pointInPixel = [params.offsetX, params.offsetY]
//
let index
if (myChart.containPixel('grid', pointInPixel)) {
index = myChart.convertFromPixel({
seriesIndex: 0
}, [params.offsetX, params.offsetY])[0]
}
if (index !== undefined) {
var village = this.cdata.category[index]
this.$router.push({
name: 'Console',
params: {
village: village.id,
type: 1
}
})
}
}
})
}
}
</script>

View File

@ -0,0 +1,48 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue'
export default {
props: {
villageCountList: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.category = this.villageCountList.map(item => ({ value: item.name, id: item.id }));
},
data () {
return {
cdata: {
category: [],
lineData: this.villageCountList.map(item => item.value),
barData: this.villageCountList.map(item => item.value2),
rateData: []
}
}
},
components: {
Chart
},
mounted () {
this.setData()
},
methods: {
//
setData () {
for (let i = 0; i <= this.cdata.barData.length - 1; i++) {
const rate = this.cdata.barData[i] / this.cdata.lineData[i]
this.cdata.rateData.push(rate.toFixed(2))
}
}
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,358 @@
<template>
<div>
<Echart
:options="options"
id="centreLeft1Chart"
height="480px"
width="100%"
></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data() {
return {
options: {},
//
colorList: {
linearYtoG: {
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 1,
colorStops: [
{
offset: 0,
color: '#f5b44d'
},
{
offset: 1,
color: '#28f8de'
}
]
},
linearGtoB: {
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [
{
offset: 0,
color: '#43dfa2'
},
{
offset: 1,
color: '#28f8de'
}
]
},
linearBtoG: {
type: 'linear',
x: 0,
y: 0,
x2: 1,
y2: 0,
colorStops: [
{
offset: 0,
color: '#1c98e8'
},
{
offset: 1,
color: '#28f8de'
}
]
},
areaBtoG: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: 'rgba(35,184,210,.2)'
},
{
offset: 1,
color: 'rgba(35,184,210,0)'
}
]
}
}
}
},
components: {
Echart
},
props: {
cdata: {
type: Object,
default: () => ({})
}
},
watch: {
cdata: {
handler(newData) {
this.options = {
title: {
text: '',
textStyle: {
color: '#D3D6DD',
fontSize: 24,
fontWeight: 'normal'
},
subtext: newData.year + '/' + newData.weekCategory[6],
subtextStyle: {
color: '#fff',
fontSize: 16
},
top: 50,
left: 80
},
legend: {
top: 120,
left: 80,
orient: 'vertical',
itemGap: 15,
itemWidth: 12,
itemHeight: 12,
data: ['平均指标', '我的指标'],
textStyle: {
color: '#fff',
fontSize: 14
}
},
tooltip: {
trigger: 'item'
},
radar: {
center: ['68%', '27%'],
radius: '40%',
name: {
color: '#fff'
},
splitNumber: 8,
axisLine: {
lineStyle: {
color: this.colorList.linearYtoG,
opacity: 0.6
}
},
splitLine: {
lineStyle: {
color: this.colorList.linearYtoG,
opacity: 0.6
}
},
splitArea: {
areaStyle: {
color: '#fff',
opacity: 0.1,
shadowBlur: 25,
shadowColor: '#000',
shadowOffsetX: 0,
shadowOffsetY: 5
}
},
indicator: [
{
name: '服务态度',
max: newData.maxData
},
{
name: '产品质量',
max: 10
},
{
name: '任务效率',
max: 12
},
{
name: '售后保障',
max: 3.5
}
]
},
grid: {
left: 90,
right: 80,
bottom: 40,
top: '60%'
},
xAxis: {
type: 'category',
position: 'bottom',
axisLine: true,
axisLabel: {
color: 'rgba(255,255,255,.8)',
fontSize: 12
},
data: newData.weekCategory
},
// Y
yAxis: {
name: '工单',
nameLocation: 'end',
nameGap: 24,
nameTextStyle: {
color: 'rgba(255,255,255,.5)',
fontSize: 14
},
max: newData.maxData,
splitNumber: 4,
axisLine: {
lineStyle: {
opacity: 0
}
},
splitLine: {
show: true,
lineStyle: {
color: '#fff',
opacity: 0.1
}
},
axisLabel: {
color: 'rgba(255,255,255,.8)',
fontSize: 12
}
},
series: [
{
name: '',
type: 'radar',
symbolSize: 0,
data: [
{
value: newData.radarDataAvg[6],
name: '平均指标',
itemStyle: {
normal: {
color: '#f8d351'
}
},
lineStyle: {
normal: {
opacity: 0
}
},
areaStyle: {
normal: {
color: '#f8d351',
shadowBlur: 25,
shadowColor: 'rgba(248,211,81,.3)',
shadowOffsetX: 0,
shadowOffsetY: -10,
opacity: 1
}
}
},
{
value: newData.radarData[6],
name: '我的指标',
itemStyle: {
normal: {
color: '#43dfa2'
}
},
lineStyle: {
normal: {
opacity: 0
}
},
areaStyle: {
normal: {
color: this.colorList.linearGtoB,
shadowBlur: 15,
shadowColor: 'rgba(0,0,0,.2)',
shadowOffsetX: 0,
shadowOffsetY: 5,
opacity: 0.8
}
}
}
]
},
{
name: '',
type: 'line',
smooth: true,
symbol: 'emptyCircle',
symbolSize: 8,
itemStyle: {
normal: {
color: '#fff'
}
},
lineStyle: {
normal: {
color: this.colorList.linearBtoG,
width: 3
}
},
areaStyle: {
normal: {
color: this.colorList.areaBtoG
}
},
data: newData.weekLineData,
lineSmooth: true,
markLine: {
silent: true,
data: [
{
type: 'average',
name: '平均值'
}
],
precision: 0,
label: {
normal: {
formatter: '平均值: \n {c}'
}
},
lineStyle: {
normal: {
color: 'rgba(248,211,81,.7)'
}
}
},
tooltip: {
position: 'top',
formatter: '{c} m',
backgroundColor: 'rgba(28,152,232,.2)',
padding: 6
}
},
{
name: '占位背景',
type: 'bar',
itemStyle: {
normal: {
show: true,
color: '#000',
opacity: 0
}
},
silent: true,
barWidth: '50%',
data: newData.weekMaxData,
animation: false
}
]
}
},
immediate: true,
deep: true
}
}
}
</script>

View File

@ -0,0 +1,89 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue'
export default {
data () {
return {
drawTiming: null,
cdata: {
year: null,
weekCategory: [],
radarData: [],
radarDataAvg: [],
maxData: 12000,
weekMaxData: [],
weekLineData: []
}
}
},
components: {
Chart,
},
mounted () {
this.drawTimingFn();
},
beforeDestroy () {
clearInterval(this.drawTiming);
},
methods: {
drawTimingFn () {
this.setData();
this.drawTiming = setInterval(() => {
this.setData();
}, 6000);
},
setData () {
//
this.cdata.weekCategory = [];
this.cdata.weekMaxData = [];
this.cdata.weekLineData = [];
this.cdata.radarData = [];
this.cdata.radarDataAvg = [];
let dateBase = new Date();
this.cdata.year = dateBase.getFullYear();
//
for (let i = 0; i < 7; i++) {
//
let date = new Date();
this.cdata.weekCategory.unshift([date.getMonth() + 1, date.getDate()-i].join("/"));
// 线
this.cdata.weekMaxData.push(this.cdata.maxData);
let distance = Math.round(Math.random() * 11000 + 500);
this.cdata.weekLineData.push(distance);
//
//
let averageSpeed = +(Math.random() * 5 + 3).toFixed(3);
let maxSpeed = averageSpeed + +(Math.random() * 3).toFixed(2);
let hour = +(distance / 1000 / averageSpeed).toFixed(1);
let radarDayData = [distance, averageSpeed, maxSpeed, hour];
this.cdata.radarData.unshift(radarDayData);
//
let distanceAvg = Math.round(Math.random() * 8000 + 4000);
let averageSpeedAvg = +(Math.random() * 4 + 4).toFixed(3);
let maxSpeedAvg = averageSpeedAvg + +(Math.random() * 2).toFixed(2);
let hourAvg = +(distance / 1000 / averageSpeed).toFixed(1);
let radarDayDataAvg = [
distanceAvg,
averageSpeedAvg,
maxSpeedAvg,
hourAvg
];
this.cdata.radarDataAvg.unshift(radarDayDataAvg);
}
}
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,104 @@
<template>
<div>
<!-- 通过率/达标率 -->
<Echart
:options="options"
:id="id"
height="100px"
width="100px"
></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data () {
return {
options: {},
};
},
components: {
Echart,
},
props: {
id: {
type: String,
required: true,
default: "chartRate"
},
tips: {
type: Number,
required: true,
default: 50
},
colorObj: {
type: Object,
default: function () {
return {
textStyle: "#3fc0fb",
series: {
color: ["#00bcd44a", "transparent"],
dataColor: {
normal: "#03a9f4",
shadowColor: "#97e2f5"
}
}
};
}
}
},
watch: {
// tips
tips: {
handler (newData) {
this.options = {
title:{
text: newData * 1 + "%",
x: "center",
y: "center",
textStyle: {
color: this.colorObj.textStyle,
fontSize: 16
}
},
series: [
{
type: "pie",
radius: ["75%", "80%"],
center: ["50%", "50%"],
hoverAnimation: false,
color: this.colorObj.series.color,
label: {
normal: {
show: false
}
},
data: [
{
value: newData,
itemStyle: {
normal: {
color: this.colorObj.series.dataColor.normal,
shadowBlur: 10,
shadowColor: this.colorObj.series.dataColor.shadowColor
}
}
},
{
value: 100 - newData
}
]
}
]
}
},
immediate: true,
deep: true
}
}
};
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,98 @@
<template>
<div>
<Echart :options="options" id="hldj" height="340px" width="300px" ref="myChart2"></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data () {
return {
options: {}
}
},
components: {
Echart
},
props: {
cdata: {
type: Object,
default: () => ({})
}
},
watch: {
cdata: {
handler (newData) {
this.options = {
color: [
'#37a2da',
'#32c5e9',
'#fb7293'
],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
toolbox: {
show: true
},
calculable: true,
legend: {
orient: 'horizontal',
icon: 'circle',
bottom: 1,
x: 'center',
data: newData.xData,
textStyle: {
color: '#fff',
'fontSize': 18
}
},
series: [{
name: '等级统计',
type: 'pie',
radius: [20, 100],
roseType: 'area',
center: ['50%', '40%'],
data: newData.seriesData,
label: {
normal: {
show: false
}
}
}]
}
},
immediate: true,
deep: true
}
},
mounted () {
const myChart = this.$refs['myChart2'].chart
//
myChart.on('click', (param) => {
let index
// dataIndex
index = param.dataIndex
//
if (index !== undefined) {
// seriesData
if (this.cdata.seriesData[index].value != 0) {
/* 跳转路由 */
this.$router.push({
name: 'Console',
params: {
nursingLevel: this.cdata.seriesData[index].id,
supportType: 1
}
})
}
}
})
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,35 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue'
export default {
props: {
nursingLevelList: {
type: Array,
default: () => ([])
}
},
data () {
return {
cdata: {
xData: this.nursingLevelList.map(item => item.name),
seriesData: this.nursingLevelList
}
}
},
components: {
Chart
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,111 @@
<template>
<div>
<Echart :options="options" id="centreLeft2Chart" height="340px" width="270px" style="padding: 10px;" ref="myChart"></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data() {
return {
options: {}
}
},
components: {
Echart
},
props: {
cdata: {
type: Object,
default: () => ({})
}
},
watch: {
cdata: {
handler(newData) {
this.options = {
// title: {
// text: 'Referer of a Website',
// subtext: 'Fake Data',
// left: 'center'
// },
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left',
textStyle: {
color: '#fff',
"fontSize": 18
}
},
series: [{
// name: 'Access From',
type: 'pie',
radius: '75%',
data: newData.seriesData,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
itemStyle: {
normal: {
color: function(colors) {
var colorList = [
'#457bef',
'#ffaaff'
];
return colorList[colors.dataIndex];
}
},
},
label: {
normal: {
show: false,
},
},
labelLine: {
normal: {
show: false
}
}
}]
}
},
immediate: true,
deep: true
}
},
mounted() {
let myChart = this.$refs["myChart"].chart
//
myChart.on('click', (param) => {
let index;
//dataIndex
index = param.dataIndex;
//
if (index !== undefined) {
//seriesData
if (this.cdata.seriesData[index].value != 0) {
/*跳转路由*/
this.$router.push({
name: 'Console',
params: {
gender: this.cdata.seriesData[index].id,
supportType: 1
}
})
}
}
});
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,41 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue'
export default {
props: {
sexData: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.seriesData = this.sexData.map(item => {
// id
return { ...item, id: item.id.toString() }
})
},
data () {
return {
cdata: {
xData: this.sexData.map(item => item.name),
seriesData: []
}
}
},
components: {
Chart
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,102 @@
<template>
<div>
<Echart :options="options" id="nlqj" height="340px" width="380px" ref="nlqjChart"></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data() {
return {
options: {}
}
},
components: {
Echart
},
props: {
cdata: {
type: Object,
default: () => ({})
}
},
watch: {
cdata: {
handler(newData) {
this.options = {
color: [
'#37a2da',
"#ffdb5c",
"#ff9f7f",
'#fb7293',
"#e7bcf3",
'#8378ea'
],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b} : {c} ({d}%)'
},
toolbox: {
show: true
},
calculable: true,
legend: {
orient: 'horizontal',
icon: 'circle',
bottom: 0,
x: 'center',
data: newData.xData,
textStyle: {
color: '#fff',
"fontSize": 18
}
},
series: [{
name: '年龄统计',
type: 'pie',
radius: [20, 100],
roseType: 'area',
center: ['50%', '40%'],
data: newData.seriesData,
label: {
normal: {
show: true,
"fontSize": 18
},
},
}]
}
},
immediate: true,
deep: true
}
},
mounted() {
let myChart = this.$refs["nlqjChart"].chart
//
myChart.on('click', (param) => {
let index;
//dataIndex
index = param.dataIndex;
//
if (index !== undefined) {
//seriesData
if (this.cdata.seriesData[index].value != 0) {
/*跳转路由*/
this.$router.push({
name: 'Console',
params: {
ageRange: this.cdata.seriesData[index].id,
supportType: 1
}
})
}
}
});
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,41 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue'
export default {
props: {
ageList: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.seriesData = this.ageList.map(item => {
// id
return { ...item, id: item.id.toString() }
})
},
data () {
return {
cdata: {
xData: this.ageList.map(item => item.name),
seriesData: []
}
}
},
components: {
Chart
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,111 @@
<template>
<div>
<Echart :options="options" id="jzfp" height="360px" width="270px" style="padding: 10px;" ref="jzfpChart"></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data() {
return {
options: {}
}
},
components: {
Echart
},
props: {
cdata: {
type: Object,
default: () => ({})
}
},
watch: {
cdata: {
handler(newData) {
this.options = {
// title: {
// text: 'Referer of a Website',
// subtext: 'Fake Data',
// left: 'center'
// },
tooltip: {
trigger: 'item'
},
legend: {
orient: 'vertical',
left: 'left',
textStyle: {
color: '#fff',
"fontSize": 18
}
},
series: [{
// name: 'Access From',
type: 'pie',
radius: '75%',
data: newData.seriesData,
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
},
itemStyle: {
normal: {
color: function(colors) {
var colorList = [
'#5470c6',
'#9A60B4',
];
return colorList[colors.dataIndex];
}
},
},
label: {
normal: {
show: false,
}
},
labelLine: {
normal: {
show: false
}
}
}]
}
},
immediate: true,
deep: true
}
},
mounted() {
let myChart = this.$refs["jzfpChart"].chart
//
myChart.on('click', (param) => {
let index;
//dataIndex
index = param.dataIndex;
//
if (index !== undefined) {
//seriesData
if (this.cdata.seriesData[index].value != 0) {
/*跳转路由*/
this.$router.push({
name: 'Console',
params: {
ifHelpPoor: this.cdata.seriesData[index].id,
supportType: 1
}
})
}
}
});
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,41 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue'
export default {
props: {
ifHelpPoorList: {
type: Array,
default: () => ([])
}
},
created () {
this.cdata.seriesData = this.ifHelpPoorList.map(item => {
// id
return { ...item, id: item.id.toString() }
})
},
data () {
return {
cdata: {
xData: this.ifHelpPoorList.map(item => item.name),
seriesData: []
}
}
},
components: {
Chart
},
mounted () {
},
methods: {
}
}
</script>
<style lang="scss" scoped>
</style>

View File

@ -0,0 +1,132 @@
<template>
<div>
<Echart
:options="options"
id="centreRight2Chart1"
height="200px"
width="260px"
></Echart>
</div>
</template>
<script>
import Echart from '@/common/echart'
export default {
data () {
return {
options: {},
};
},
components: {
Echart,
},
props: {
cdata: {
type: Object,
default: () => ({})
},
},
watch: {
cdata: {
handler (newData) {
//
let lineStyle = {
normal: {
width: 1,
opacity: 0.5
}
};
this.options = {
radar: {
indicator: newData.indicatorData,
shape: "circle",
splitNumber: 5,
radius: ["0%", "65%"],
name: {
textStyle: {
color: "rgb(238, 197, 102)"
}
},
splitLine: {
lineStyle: {
color: [
"rgba(238, 197, 102, 0.1)",
"rgba(238, 197, 102, 0.2)",
"rgba(238, 197, 102, 0.4)",
"rgba(238, 197, 102, 0.6)",
"rgba(238, 197, 102, 0.8)",
"rgba(238, 197, 102, 1)"
].reverse()
}
},
splitArea: {
show: false
},
axisLine: {
lineStyle: {
color: "rgba(238, 197, 102, 0.5)"
}
}
},
series: [
{
name: "北京",
type: "radar",
lineStyle: lineStyle,
data: newData.dataBJ,
symbol: "none",
itemStyle: {
normal: {
color: "#F9713C"
}
},
areaStyle: {
normal: {
opacity: 0.1
}
}
},
{
name: "上海",
type: "radar",
lineStyle: lineStyle,
data: newData.dataSH,
symbol: "none",
itemStyle: {
normal: {
color: "#B3E4A1"
}
},
areaStyle: {
normal: {
opacity: 0.05
}
}
},
{
name: "广州",
type: "radar",
lineStyle: lineStyle,
data: newData.dataGZ,
symbol: "none",
itemStyle: {
normal: {
color: "rgb(238, 197, 102)"
}
},
areaStyle: {
normal: {
opacity: 0.05
}
}
} //end
]
}
},
immediate: true,
deep: true
}
}
};
</script>

View File

@ -0,0 +1,55 @@
<template>
<div>
<Chart :cdata="cdata" />
</div>
</template>
<script>
import Chart from './chart.vue';
export default {
data () {
return {
cdata: {
indicatorData: [
{ name: "data1", max: 300 },
{ name: "data2", max: 250 },
{ name: "data3", max: 300 },
{ name: "data4", max: 5},
{ name: "data5", max: 200 },
{ name: "data6", max: 100 }
],
dataBJ: [
[94, 69, 114, 2.08, 73, 39, 22],
[99, 73, 110, 2.43, 76, 48, 23],
[31, 12, 30, 0.5, 32, 16, 24],
[42, 27, 43, 1, 53, 22, 25],
[154, 117, 157, 3.05, 92, 58, 26],
[234, 185, 230, 4.09, 123, 69, 27],
[160, 120, 186, 2.77, 91, 50, 28]
],
dataGZ: [
[84, 94, 140, 2.238, 68, 18, 22],
[93, 77, 104, 1.165, 53, 7, 23],
[99, 130, 227, 3.97, 55, 15, 24],
[146, 84, 139, 1.094, 40, 17, 25],
[113, 108, 137, 1.481, 48, 15, 26],
[81, 48, 62, 1.619, 26, 3, 27],
[56, 48, 68, 1.336, 37, 9, 28]
],
dataSH: [
[91, 45, 125, 0.82, 34, 23, 1],
[65, 27, 78, 0.86, 45, 29, 2],
[83, 60, 84, 1.09, 73, 27, 3],
[109, 81, 121, 1.28, 68, 51, 4],
[106, 77, 114, 1.07, 55, 51, 5],
[109, 81, 121, 1.28, 68, 51, 6],
[106, 77, 114, 1.07, 55, 51, 7]
]
}
}
},
components: {
Chart,
}
}
</script>

View File

@ -12,7 +12,7 @@
* *
*/ */
export default { export default {
navTheme: 'light', // theme for nav menu navTheme: 'dark', // theme for nav menu
primaryColor: '#1890ff', // primary color of ant design primaryColor: '#1890ff', // primary color of ant design
layout: 'sidemenu', // nav menu position: `sidemenu` or `topmenu` layout: 'sidemenu', // nav menu position: `sidemenu` or `topmenu`
contentWidth: 'Fluid', // layout of content: `Fluid` or `Fixed`, only works when layout is topmenu contentWidth: 'Fluid', // layout of content: `Fluid` or `Fixed`, only works when layout is topmenu
@ -22,7 +22,7 @@ export default {
menu: { menu: {
locale: true locale: true
}, },
title: '安全培训平台', title: '下堡坪乡农村福利院长者信息管理系统',
pwa: false, pwa: false,
iconfontUrl: '', iconfontUrl: '',
production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true' production: process.env.NODE_ENV === 'production' && process.env.VUE_APP_PREVIEW !== 'true'

View File

@ -1,5 +1,5 @@
// eslint-disable-next-line // eslint-disable-next-line
import { UserLayout, BasicLayout, RouteView } from '@/layouts'; import { UserLayout, BasicLayout, RouteView, BigScreenLayout } from '@/layouts';
import { bxAnaalyse } from '@/core/icons' import { bxAnaalyse } from '@/core/icons'
export const asyncRouterMap = [ export const asyncRouterMap = [
@ -72,6 +72,24 @@ export const constantRouterMap = [
} }
] ]
}, },
{
path: '/screen',
component: BigScreenLayout,
redirect: '/screen/data2',
hidden: true,
children: [
{
path: 'data2',
name: 'data2',
component: () => import( '@/views/bigScreen/index')
},
{
path: 'data3',
name: 'data3',
component: () => import( '@/views/index/welcome')
}
]
},
{ {
path: '/404', path: '/404',
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404') component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')

View File

@ -49,7 +49,8 @@ import {
Transfer, Transfer,
Tree, Tree,
Empty, Empty,
TreeSelect TreeSelect,
Carousel
} from 'ant-design-vue' } from 'ant-design-vue'
import Viser from 'viser-vue' import Viser from 'viser-vue'
@ -107,6 +108,7 @@ Vue.use(Tree)
Vue.use(Transfer) Vue.use(Transfer)
Vue.use(Empty) Vue.use(Empty)
Vue.use(TreeSelect) Vue.use(TreeSelect)
Vue.use(Carousel)
Vue.prototype.$confirm = Modal.confirm Vue.prototype.$confirm = Modal.confirm
Vue.prototype.$message = message Vue.prototype.$message = message

View File

@ -1,22 +1,9 @@
<template> <template>
<pro-layout <pro-layout :title="title" :menus="menus" :collapsed="collapsed" :mediaQuery="query" :isMobile="isMobile"
:title="title" :handleMediaQuery="handleMediaQuery" :handleCollapse="handleCollapse" :logo="logoRender" :i18nRender="i18nRender"
:menus="menus" v-bind="settings">
:collapsed="collapsed"
:mediaQuery="query"
:isMobile="isMobile"
:handleMediaQuery="handleMediaQuery"
:handleCollapse="handleCollapse"
:logo="logoRender"
:i18nRender="i18nRender"
v-bind="settings"
>
<template v-slot:rightContentRender> <template v-slot:rightContentRender>
<right-content <right-content :top-menu="settings.layout === 'topmenu'" :is-mobile="isMobile" :theme="settings.theme" />
:top-menu="settings.layout === 'topmenu'"
:is-mobile="isMobile"
:theme="settings.theme"
/>
</template> </template>
<!-- <template v-slot:footerRender> <!-- <template v-slot:footerRender>
<global-footer /> <global-footer />
@ -26,126 +13,143 @@
</template> </template>
<script> <script>
import { i18nRender } from '@/locales' import {
import { mapState } from 'vuex' i18nRender
import { SIDEBAR_TYPE, TOGGLE_MOBILE_TYPE } from '@/store/mutation-types' } from '@/locales'
import {
mapState
} from 'vuex'
import {
SIDEBAR_TYPE,
TOGGLE_MOBILE_TYPE
} from '@/store/mutation-types'
import defaultSettings from '@/config/defaultSettings' import defaultSettings from '@/config/defaultSettings'
import RightContent from '@/components/GlobalHeader/RightContent' import RightContent from '@/components/GlobalHeader/RightContent'
import GlobalFooter from '@/components/GlobalFooter' import GlobalFooter from '@/components/GlobalFooter'
import LogoSvg from '../assets/logo.svg?inline' import LogoSvg from '../assets/logo.svg?inline'
export default { export default {
name: 'BasicLayout', name: 'BasicLayout',
components: { components: {
RightContent, RightContent,
GlobalFooter GlobalFooter
}, },
data () { data() {
return {
// base
menus: [],
//
collapsed: false,
title: defaultSettings.title,
// settings: {
// //
// layout: defaultSettings.layout, // 'sidemenu', 'topmenu'
// // : true / : false
// contentWidth: defaultSettings.layout === 'sidemenu' ? false : defaultSettings.contentWidth === 'Fixed',
// // 'dark' | 'light'
// theme: defaultSettings.navTheme,
// //
// primaryColor: defaultSettings.primaryColor,
// fixedHeader: defaultSettings.fixedHeader,
// fixSiderbar: defaultSettings.fixSiderbar,
// colorWeak: defaultSettings.colorWeak,
// hideHintAlert: false,
// hideCopyButton: false
// },
//
query: {},
//
isMobile: false
}
},
computed: {
...mapState({
//
mainMenu: state => state.permission.addRouters,
currentRole: state => state.user.currentRole
}),
settings: function () {
const code = this.currentRole && this.currentRole.code
return { return {
// // base
layout: code === 'student' ? 'topmenu' : defaultSettings.layout, // 'sidemenu', 'topmenu' menus: [],
// : true / : false //
contentWidth: code === 'student' ? true : (defaultSettings.layout === 'sidemenu' ? false : defaultSettings.contentWidth === 'Fixed'), collapsed: false,
// 'dark' | 'light' title: defaultSettings.title,
theme: defaultSettings.navTheme, // settings: {
// // //
primaryColor: defaultSettings.primaryColor, // layout: defaultSettings.layout, // 'sidemenu', 'topmenu'
fixedHeader: defaultSettings.fixedHeader, // // : true / : false
fixSiderbar: defaultSettings.fixSiderbar, // contentWidth: defaultSettings.layout === 'sidemenu' ? false : defaultSettings.contentWidth === 'Fixed',
colorWeak: defaultSettings.colorWeak, // // 'dark' | 'light'
hideHintAlert: false, // theme: defaultSettings.navTheme,
hideCopyButton: false // //
// primaryColor: defaultSettings.primaryColor,
// fixedHeader: defaultSettings.fixedHeader,
// fixSiderbar: defaultSettings.fixSiderbar,
// colorWeak: defaultSettings.colorWeak,
// hideHintAlert: false,
// hideCopyButton: false
// },
//
query: {},
//
isMobile: false
} }
} },
}, computed: {
created () { ...mapState({
const routes = this.mainMenu.find(item => item.path === '/') //
this.menus = (routes && routes.children) || [] mainMenu: state => state.permission.addRouters,
// currentRole: state => state.user.currentRole
this.$watch('collapsed', () => { }),
this.$store.commit(SIDEBAR_TYPE, this.collapsed) settings: function() {
}) const code = this.currentRole && this.currentRole.code
this.$watch('isMobile', () => { return {
this.$store.commit(TOGGLE_MOBILE_TYPE, this.isMobile) //
}) layout: code === 'student' ? 'topmenu' : defaultSettings.layout, // 'sidemenu', 'topmenu'
}, // : true / : false
mounted () { contentWidth: code === 'student' ? true : (defaultSettings.layout === 'sidemenu' ? false : defaultSettings.contentWidth ===
const userAgent = navigator.userAgent 'Fixed'),
if (userAgent.indexOf('Edge') > -1) { // 'dark' | 'light'
this.$nextTick(() => { theme: defaultSettings.navTheme,
this.collapsed = !this.collapsed //
setTimeout(() => { primaryColor: defaultSettings.primaryColor,
this.collapsed = !this.collapsed fixedHeader: defaultSettings.fixedHeader,
}, 16) fixSiderbar: defaultSettings.fixSiderbar,
colorWeak: defaultSettings.colorWeak,
hideHintAlert: false,
hideCopyButton: false
}
}
},
created() {
const routes = this.mainMenu.find(item => item.path === '/')
this.menus = (routes && routes.children) || []
//
this.$watch('collapsed', () => {
this.$store.commit(SIDEBAR_TYPE, this.collapsed)
}) })
} this.$watch('isMobile', () => {
}, this.$store.commit(TOGGLE_MOBILE_TYPE, this.isMobile)
methods: { })
i18nRender, },
handleMediaQuery (val) { mounted() {
this.query = val const userAgent = navigator.userAgent
if (this.isMobile && !val['screen-xs']) { if (userAgent.indexOf('Edge') > -1) {
this.isMobile = false this.$nextTick(() => {
return this.collapsed = !this.collapsed
} setTimeout(() => {
if (!this.isMobile && val['screen-xs']) { this.collapsed = !this.collapsed
this.isMobile = true }, 16)
this.collapsed = false })
this.settings.contentWidth = false
// this.settings.fixSiderbar = false
} }
}, },
handleCollapse (val) { methods: {
this.collapsed = val i18nRender,
}, handleMediaQuery(val) {
logoRender () { this.query = val
return <LogoSvg /> if (this.isMobile && !val['screen-xs']) {
this.isMobile = false
return
}
if (!this.isMobile && val['screen-xs']) {
this.isMobile = true
this.collapsed = false
this.settings.contentWidth = false
// this.settings.fixSiderbar = false
}
},
handleCollapse(val) {
this.collapsed = val
},
logoRender() {
return <LogoSvg / >
}
} }
} }
}
</script> </script>
<style lang="less"> <style lang="less">
@import './BasicLayout.less'; @import './BasicLayout.less';
/*隐藏原本的图标*/ /*隐藏原本的图标*/
.ant-pro-global-header-trigger { .ant-pro-global-header-trigger {
display: none; display: none;
} }
.ant-pro-sider-menu-logo h1 {
max-width: 80%;
line-height: 2;
}
.ant-pro-sider-menu-logo {
height: 80px;
}
</style> </style>

View File

@ -0,0 +1,31 @@
<template>
<div id="bigScreenLayout" :class="['user-layout-wrapper', isMobile && 'mobile']">
<!-- <bigScreen></bigScreen> -->
<router-view />
</div>
</template>
<script>
import { deviceMixin } from '@/store/device-mixin'
import BigScreen from '@/views/bigScreen/index.vue'
export default {
name: 'BigScreenLayout',
mixins: [deviceMixin],
components: {
BigScreen
},
mounted () {
document.body.classList.add('bigScreenLayout')
},
beforeDestroy () {
document.body.classList.remove('bigScreenLayout')
}
}
</script>
<style>
#app {
background-color: #03050C;
}
</style>

View File

@ -5,7 +5,7 @@
<div class="header"> <div class="header">
<a href="javascript:void(0);"> <a href="javascript:void(0);">
<img src="~@/assets/logo.svg" class="logo" alt="logo"> <img src="~@/assets/logo.svg" class="logo" alt="logo">
<span class="title">安全培训平台</span> <span class="login_title">夷陵区下堡坪乡农村福利院长者信息管理系统</span>
</a> </a>
</div> </div>
</div> </div>
@ -17,7 +17,7 @@
<a href="_self">条款</a> <a href="_self">条款</a>
</div> --> </div> -->
<div class="copyright"> <div class="copyright">
Copyright &copy; 2022 XinMei Copyright &copy; 2023 湖北道诚科技有限公司
</div> </div>
</div> </div>
</div> </div>
@ -52,11 +52,19 @@ export default {
} }
} }
.container {
background-image: url('~@/assets/login.jpg'); /* 替换为您的背景图路径 */
background-size: cover; /* 让背景图片覆盖整个容器 */
// background-position: center; /* */
background-repeat: no-repeat; /* 防止背景图重复 */
width: 100%; /* 设置容器宽度为100%以适应屏幕宽度 */
height: 100vh; /* 设置容器高度为100vh以适应屏幕高度 */
}
.container { .container {
width: 100%; width: 100%;
min-height: 100%; min-height: 100%;
background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%; // background: #f0f2f5 url(~@/assets/background.svg) no-repeat 50%;
background-size: 100%; // background-size: 100%;
padding: 110px 0 144px; padding: 110px 0 144px;
position: relative; position: relative;
@ -66,7 +74,7 @@ export default {
.top { .top {
text-align: center; text-align: center;
margin-bottom: 40px; margin-bottom: 70px;
.header { .header {
height: 44px; height: 44px;
line-height: 44px; line-height: 44px;
@ -88,7 +96,7 @@ export default {
border-style: none; border-style: none;
} }
.title { .login_title {
font-size: 33px; font-size: 33px;
color: rgba(0, 0, 0, .85); color: rgba(0, 0, 0, .85);
font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif; font-family: Avenir, 'Helvetica Neue', Arial, Helvetica, sans-serif;

View File

@ -3,5 +3,6 @@ import BlankLayout from './BlankLayout'
import BasicLayout from './BasicLayout' import BasicLayout from './BasicLayout'
import RouteView from './RouteView' import RouteView from './RouteView'
import PageView from './PageView' import PageView from './PageView'
import BigScreenLayout from './BigScreenLayout'
export { UserLayout, BasicLayout, BlankLayout, RouteView, PageView } export { UserLayout, BasicLayout, BlankLayout, RouteView, PageView, BigScreenLayout }

View File

@ -25,16 +25,30 @@ import { hasBtnPermission } from './utils/permissions'
window.Vue = Vue window.Vue = Vue
// echart
// import { use } from 'echarts/core' import dataV from '@jiaminghi/data-view';
// import { CanvasRenderer } from 'echarts/renderers' // 引入全局css
// import { BarChart } from 'echarts/charts' import './assets/scss/style.scss';
// import { // 按需引入vue-awesome图标
// TitleComponent, import Icon from 'vue-awesome/components/Icon';
// TooltipComponent, import 'vue-awesome/icons/chart-bar.js';
// LegendComponent, import 'vue-awesome/icons/chart-area.js';
// GridComponent import 'vue-awesome/icons/chart-pie.js';
// } from 'echarts/components' import 'vue-awesome/icons/chart-line.js';
import 'vue-awesome/icons/align-left.js';
//引入echart
//4.x 引用方式
import echarts from 'echarts'
//5.x 引用方式为按需引用
//希望使用5.x版本的话,需要在package.json中更新版本号,并切换引用方式
//import * as echarts from 'echarts'
Vue.prototype.$echarts = echarts
/* import VueAwesomeSwiper from 'vue-awesome-swiper'
import 'swiper/dist/css/swiper.css'
// 全局挂载
Vue.use(VueAwesomeSwiper) */
Vue.use(FormModel) Vue.use(FormModel)
Vue.use(Empty) Vue.use(Empty)
@ -45,6 +59,10 @@ Vue.config.productionTip = false
Vue.use(Print); //注册 Vue.use(Print); //注册
Vue.use(VueAxios) Vue.use(VueAxios)
// 全局注册
Vue.component('icon', Icon);
Vue.use(dataV);
Vue.component('pro-layout', ProLayout) Vue.component('pro-layout', ProLayout)
Vue.component('page-header-wrapper', PageHeaderWrapper) Vue.component('page-header-wrapper', PageHeaderWrapper)

View File

@ -10,16 +10,19 @@ import { ACCESS_TOKEN } from '@/store/mutation-types'
import { Modal } from 'ant-design-vue' // NProgress Configuration import { Modal } from 'ant-design-vue' // NProgress Configuration
NProgress.configure({ showSpinner: false }) NProgress.configure({ showSpinner: false })
const whiteList = ['login', 'register', 'registerResult', 'setting'] // no redirect whitelist const whiteList = ['login', 'register', 'registerResult', 'setting','bigScreen'] // no redirect whitelist
const loginRoutePath = '/user/login' const loginRoutePath = '/user/login'
// 无默认首页的情况 // 无默认首页的情况
const defaultRoutePath = '/welcome' const defaultRoutePath = '/welcome'
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
console.log(to)
NProgress.start() // start progress bar NProgress.start() // start progress bar
to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`)) to.meta && (typeof to.meta.title !== 'undefined' && setDocumentTitle(`${to.meta.title} - ${domTitle}`))
if (storage.get(ACCESS_TOKEN)) { if (storage.get(ACCESS_TOKEN)) {
console.log("ACCESS_TOKEN")
if (to.path === loginRoutePath) { if (to.path === loginRoutePath) {
console.log("to.path === loginRoutePath")
next({ path: defaultRoutePath }) next({ path: defaultRoutePath })
NProgress.done() NProgress.done()
} else { } else {
@ -50,10 +53,14 @@ router.beforeEach((to, from, next) => {
// router.addRoute(element); // router.addRoute(element);
// } // }
// router.addRoutes方法被遗弃 // router.addRoutes方法被遗弃
// router.addRoutes(store.getters.addRouters)
console.log(store.getters.addRouters)
router.addRoutes(store.getters.addRouters) router.addRoutes(store.getters.addRouters)
// 请求带有 redirect 重定向时,登录自动重定向到该地址 // 请求带有 redirect 重定向时,登录自动重定向到该地址
console.log(from.query)
const redirect = decodeURIComponent(from.query.redirect || to.path) const redirect = decodeURIComponent(from.query.redirect || to.path)
console.log("redirect:"+redirect)
if (to.path === redirect) { if (to.path === redirect) {
next({ path: redirect }) next({ path: redirect })
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
@ -74,10 +81,13 @@ router.beforeEach((to, from, next) => {
} }
} }
} else { } else {
console.log("noAccess")
if (whiteList.includes(to.name)) { if (whiteList.includes(to.name)) {
console.log("whiteList.includes")
// 在免登录白名单,直接进入 // 在免登录白名单,直接进入
next() next()
} else { } else {
console.log("whiteList no includes")
next({ path: loginRoutePath, query: { redirect: to.fullPath } }) next({ path: loginRoutePath, query: { redirect: to.fullPath } })
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
} }

View File

@ -1,17 +1,19 @@
// eslint-disable-next-line // eslint-disable-next-line
// eslint-disable-next-line // eslint-disable-next-line
import { BasicLayout, BlankLayout, PageView, RouteView } from '@/layouts' import { BasicLayout, BlankLayout, PageView, RouteView, BigScreenLayout } from '@/layouts'
// 前端路由表 // 前端路由表
const constantRouterComponents = { const constantRouterComponents = {
// 基础页面 layout 必须引入 // 基础页面 layout 必须引入
BasicLayout: BasicLayout, BasicLayout: BasicLayout,
BigScreenLayout: BigScreenLayout,
BlankLayout: BlankLayout, BlankLayout: BlankLayout,
RouteView: RouteView, RouteView: RouteView,
PageView: PageView, PageView: PageView,
'403': () => import('@/views/exception/403'), '403': () => import('@/views/exception/403'),
'404': () => import('@/views/exception/404'), '404': () => import('@/views/exception/404'),
'500': () => import('@/views/exception/500'), '500': () => import('@/views/exception/500'),
'developing': () => import('@/views/exception/developing'),
// 你需要动态引入的页面组件 // 你需要动态引入的页面组件
'Workplace': () => import('@/views/dashboard/Workplace'), 'Workplace': () => import('@/views/dashboard/Workplace'),
@ -32,6 +34,19 @@ const constantRouterComponents = {
const notFoundRouter = { const notFoundRouter = {
path: '*', redirect: '/404', hidden: true path: '*', redirect: '/404', hidden: true
} }
/* const bigScreenRouter = {
path: '/bigScreen',
component: BigScreenLayout,
redirect: '/bigScreen/data',
hidden: true,
children: [
{
path: 'bigScreen',
name: 'bigScreen',
component: () => import( '@/views/bigScreen/index')
}
]
} */
// 个人中心页面 // 个人中心页面
export const userAccount = [ export const userAccount = [
@ -127,6 +142,17 @@ export const userAccount = [
}, },
'component': 'NotificationSettings' 'component': 'NotificationSettings'
}, },
/* {
'name': 'BigScreen',
'path': '/bigScreen',
'pid': 0,
'id': 183183,
'meta': {
'title': '数据统计',
'show': false
},
'component': 'BigScreenLayout'
}, */
{ {
'name': 'Console', 'name': 'Console',
'path': '/welcome', 'path': '/welcome',
@ -150,7 +176,6 @@ const rootRouter = {
meta: { title: '首页' }, meta: { title: '首页' },
children: [] children: []
} }
/** /**
* 动态生成菜单 * 动态生成菜单
* @param token * @param token

View File

@ -1,6 +1,6 @@
import storage from 'store' import storage from 'store'
import { login, getLoginUser, logout } from '@/api/login' import { login, getLoginUser, logout } from '@/api/login'
import { reqChangePassword } from '@/api/mycourse/index' import { reqChangePassword } from '@/api/security/user'
import { ACCESS_TOKEN } from '@/store/mutation-types' import { ACCESS_TOKEN } from '@/store/mutation-types'
import { welcome } from '@/utils/util' import { welcome } from '@/utils/util'
@ -66,7 +66,7 @@ const user = {
commit('SET_ROLES', 1) commit('SET_ROLES', 1)
commit('SET_BUTTONS', data.permissions) commit('SET_BUTTONS', data.permissions)
commit('SET_INFO', data.user) commit('SET_INFO', data.user)
state.person = data.person state.person = data.user
commit('SET_NAME', { name: data.user.userName, welcome: welcome() }) commit('SET_NAME', { name: data.user.userName, welcome: welcome() })
if (data.user.avatar != null) { if (data.user.avatar != null) {
commit( commit(

57
src/utils/drawMixin.js Normal file
View File

@ -0,0 +1,57 @@
// 屏幕适配 mixin 函数
// * 默认缩放值
const scale = {
width: '1',
height: '1',
}
// * 设计稿尺寸px
const baseWidth = 1920
const baseHeight = 1080
// * 需保持的比例默认1.77778
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5))
export default {
data() {
return {
// * 定时函数
drawTiming: null
}
},
mounted () {
this.calcRate()
window.addEventListener('resize', this.resize)
},
beforeDestroy () {
window.removeEventListener('resize', this.resize)
},
methods: {
calcRate () {
const appRef = this.$refs["appRef"]
if (!appRef) return
// 当前宽高比
const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5))
if (appRef) {
if (currentRate > baseProportion) {
// 表示更宽
scale.width = ((window.innerHeight * baseProportion) / baseWidth).toFixed(5)
scale.height = (window.innerHeight / baseHeight).toFixed(5)
appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)`
} else {
// 表示更高
scale.height = ((window.innerWidth / baseProportion) / baseHeight).toFixed(5)
scale.width = (window.innerWidth / baseWidth).toFixed(5)
appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)`
}
}
},
resize () {
clearTimeout(this.drawTiming)
this.drawTiming = setTimeout(() => {
this.calcRate()
}, 200)
}
},
}

51
src/utils/index.js Normal file
View File

@ -0,0 +1,51 @@
/**
* @param {Function} fn 防抖函数
* @param {Number} delay 延迟时间
*/
export function debounce(fn, delay) {
var timer;
return function () {
var context = this;
var args = arguments;
clearTimeout(timer);
timer = setTimeout(function () {
fn.apply(context, args);
}, delay);
};
}
/**
* @param {date} time 需要转换的时间
* @param {String} fmt 需要转换的格式 yyyy-MM-ddyyyy-MM-dd HH:mm:ss
*/
export function formatTime(time, fmt) {
if (!time) return '';
else {
const date = new Date(time);
const o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'H+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds(),
'q+': Math.floor((date.getMonth() + 3) / 3),
S: date.getMilliseconds(),
};
if (/(y+)/.test(fmt))
fmt = fmt.replace(
RegExp.$1,
(date.getFullYear() + '').substr(4 - RegExp.$1.length)
);
for (const k in o) {
if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(
RegExp.$1,
RegExp.$1.length === 1
? o[k]
: ('00' + o[k]).substr(('' + o[k]).length)
);
}
}
return fmt;
}
}

33
src/utils/resizeMixin.js Normal file
View File

@ -0,0 +1,33 @@
// 混入代码 resize-mixins.js
// 改成 Scale 缩放之后,没有使用这个代码,但是保留
import { debounce } from '@/utils';
const resizeChartMethod = '$__resizeChartMethod';
export default {
data() {
// 在组件内部将图表 init 的引用映射到 chart 属性上
return {
chart: null,
};
},
created() {
window.addEventListener('resize', this[resizeChartMethod], false);
},
activated() {
// 防止 keep-alive 之后图表变形
if (this.chart) {
this.chart.resize()
}
},
beforeDestroy() {
window.removeEventListener('reisze', this[resizeChartMethod]);
},
methods: {
// 防抖函数来控制 resize 的频率
[resizeChartMethod]: debounce(function() {
if (this.chart) {
this.chart.resize();
}
}, 300),
},
};

59
src/utils/useDraw.js Normal file
View File

@ -0,0 +1,59 @@
export default function useDraw(appRefParams) {
// * 指向最外层容器
const appRef = appRefParams;
// * 定时函数
let timer = null;
// * 默认缩放值
const scale = {
width: '1',
height: '1',
};
// * 设计稿尺寸px
const baseWidth = 1920;
const baseHeight = 1080;
// * 需保持的比例默认1.77778
const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5));
const calcRate = () => {
// 当前宽高比
const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5));
console.log(appRef)
if (appRef.value) {
if (currentRate > baseProportion) {
// 表示更宽
scale.width = ((window.innerHeight * baseProportion) / baseWidth).toFixed(5);
scale.height = (window.innerHeight / baseHeight).toFixed(5);
appRef.value.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)`;
} else {
// 表示更高
scale.height = ((window.innerWidth / baseProportion) / baseHeight).toFixed(5);
scale.width = (window.innerWidth / baseWidth).toFixed(5);
appRef.value.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)`;
}
}
};
const resize = () => {
clearTimeout(timer);
timer = setTimeout(() => {
calcRate();
}, 200);
};
// 改变窗口大小重新绘制
const windowDraw = () => {
window.addEventListener('resize', resize);
};
// 移除窗口大小改变监听
const unWindowDraw = () => {
window.removeEventListener('resize', resize);
};
return {
appRef,
calcRate,
windowDraw,
unWindowDraw,
};
}

View File

@ -1,155 +0,0 @@
<template>
<a-card :bordered="false" title="证书类型">
<template slot="extra">
<a-button size="small" @click="close">返回</a-button>
</template>
<div class="table-page-search-wrapper">
<div style="width: 100%; height: 32px; margin-bottom: 8px;">
<a-button type="primary" @click="addCertificateType()">新增证书类型</a-button>
</div>
</div>
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData" :showPagination="false">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="edit(record)">编辑</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a-popconfirm title="确定要删除该证书类型?" ok-text="确认" cancel-text="取消" @confirm="del(record)">
<a href="javascript:;">删除</a>
</a-popconfirm>
</template>
</s-table>
<a-modal v-model="isAdd" :width="700" title="新增证书类型" ok-text="确认" cancel-text="取消" @ok="addCertificateTypeQR">
<a-form-model :model="addForm" :label-col="{span: 5}" :wrapper-col="{span: 19}">
<a-form-model-item label="证书类型名称" :rules="{ required: true, message: '请输入证书类型名称!' }">
<a-input v-model="addForm.name" />
</a-form-model-item>
</a-form-model>
</a-modal>
</a-card>
</template>
<script>
import { STable } from '@/components'
import { getCertificateTypeList, getCertificateType, getCertificateTypeMaxValue, addCertificateType, delCertificateType, editCertificateType } from '@/api/archives/certificate'
export default {
// import使
components: { STable },
props: {},
data() {
//
return {
isAdd: false,
addForm: {
name: ''
},
editForm: {},
queryParam: { dictionaryCode: '0001' },
columns: [
{ title: '证书类型', width: 'auto', align: 'center', dataIndex: 'name', key: 'name' },
{ title: '操作', width: '170px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
],
loadData: parameter => { return getCertificateTypeList(Object.assign(parameter, this.queryParam)).then((res) => { return res.data; }); },
};
},
// data
computed: {},
// data
watch: {},
//
methods: {
//
close() {
this.$router.push({
path: '/archives/certificate/Index', query: {
}
});
},
//
addCertificateType() {
this.addForm.name = "";
this.isAdd = true;
},
addCertificateTypeQR() {
if (!this.addForm.name || this.addForm.name === '') {
this.$message.error("请输入证书类型名称!");
return;
}
// form
if (this.editForm.id) {
if (this.editForm.name === this.addForm.name) {
this.$message.success("证书类型名称与之前一致,不需要发起修改");
this.isAdd = false;
return;
}
this.editForm.name = this.addForm.name;
editCertificateType(this.editForm).then(res => {
this.$message.success("修改成功!");
this.editForm = {};
this.isAdd = false;
this.$refs.table.refresh(true);
});
return;
}
let certificateType = {};
certificateType.dictionaryCode = '0001';
certificateType.name = this.addForm.name;
certificateType.parentid = 0;
// value
getCertificateTypeMaxValue(certificateType).then(res => {
certificateType.value = res.data;
//
addCertificateType(certificateType).then(res => {
this.$message.success("新增成功!");
this.isAdd = false;
this.$refs.table.refresh(true);
});
});
},
//
edit(record) {
getCertificateType({ id: record.id }).then(res => {
this.isAdd = true;
this.addForm.name = res.data.name;
this.editForm = res.data;
});
},
//
del(record) {
delCertificateType({ ids: record.id, deleteReason: '' }).then(res => { this.$refs.table.refresh(true); });
}
},
// - 访this
created() { },
// - 访DOM
mounted() { },
// -
beforeCreate() { },
// -
beforeMount() { },
// -
beforeUpdate() { },
// -
updated() { },
// -
beforeDestroy() { },
// -
destroyed() { },
// keep-alive
activated() { }
};
</script>
<style scoped>
</style>

View File

@ -1,136 +0,0 @@
<template>
<a-card :bordered="false" :title="pageName">
<template slot="extra">
<a-button size="small" @click="save" type="primary">保存</a-button>
<a-button size="small" @click="close">返回</a-button>
</template>
<a-form-model :model="form">
<a-form-model-item label="证书名称" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
<a-input v-model="form.name" placeholder="证书名称" />
</a-form-model-item>
<a-form-model-item label="证书注册日期" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
<a-date-picker v-model="form.registerDate" :format="'YYYY-MM-DD'" valueFormat="YYYY-MM-DD" placeholder="证书注册日期" />
</a-form-model-item>
<a-form-model-item label="证书有效期" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
<a-date-picker v-model="form.validityStartDate" :format="'YYYY-MM-DD'" valueFormat="YYYY-MM-DD" placeholder="证书有效期开始日期" />
-
<a-date-picker v-model="form.validityEndDate" :format="'YYYY-MM-DD'" valueFormat="YYYY-MM-DD" placeholder="证书有效期结束日期" />
</a-form-model-item>
<a-form-model-item label="证书类型" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
<a-select v-model="form.type" placeholder="请选择证书类型" :allowClear="true">
<a-select-option v-for="(item, index) in certificateType" :key="index" :value="item.value">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item>
<!-- <a-form-model-item label="证书状态" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
<a-select v-model="form.state" placeholder="请选择证书状态" :allowClear="true">
<a-select-option v-for="(item, index) in certificateState" :key="index" :value="item.value">{{ item.name }}</a-select-option>
</a-select>
</a-form-model-item> -->
<a-form-model-item label="证书照片" :label-col="{ span: 4 }" :wrapper-col="{ span: 15 }">
<db-upload v-model="fileList"></db-upload>
</a-form-model-item>
</a-form-model>
</a-card>
</template>
<script>
import DbUpload from '@/components/DbUpload/DbUpload.vue'
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
import { addPersonCertificate, findPersonCertificateDetail } from '@/api/archives/certificate'
export default {
// import使
components: { DbUpload },
props: {},
data() {
//
return {
pageName: this.$route.query.certificateId ? '证书编辑' : '证书新增',
fileList: [],
form: {},
certificateType: [], //
certificateState: [], //
};
},
// data
computed: {},
// data
watch: {},
//
methods: {
//
close() {
if (this.$route.query.certificateId) this.$router.push({ path: '/archives/certificate/Index', query: {} });
else this.$router.push({ path: '/personList', query: {} });
},
//
loadCertificateInfo() {
if (!this.$route.query.certificateId) return;
findPersonCertificateDetail({ id: this.$route.query.certificateId }).then(res => {
this.form = res.data;
this.fileList = JSON.parse(res.data.file);
})
},
//
dictionaryDropDown() {
//
dictionaryDropDown({ dictionaryCode: '0001' }).then((res) => {
this.certificateType = res.data;
})
//
dictionaryDropDown({ dictionaryCode: '0010' }).then((res) => {
this.certificateState = res.data;
})
},
//
save() {
let personCertificate = this.form;
console.log(this.fileList)
if (!personCertificate.id) personCertificate.personId = parseInt(this.$route.query.personId);
personCertificate.file = JSON.stringify(this.fileList);
console.log('save---', this.form)
addPersonCertificate(personCertificate).then(res => {
this.$message.success(this.pageName + "成功!");
this.close();
});
},
},
// - 访this
created() {
//
this.dictionaryDropDown();
//
this.loadCertificateInfo();
},
// - 访DOM
mounted() { },
// -
beforeCreate() { },
// -
beforeMount() { },
// -
beforeUpdate() { },
// -
updated() { },
// -
beforeDestroy() { },
// -
destroyed() { },
// keep-alive
activated() { }
};
</script>
<style scoped>
</style>

View File

@ -1,251 +0,0 @@
<template>
<a-card :bordered="false" title="证书档案" :loading="treeLoading">
<div class="table-page-search-wrapper">
<SearchCom :form="queryParam" :list="queryOptions" @search="handleRefresh" @reset="() => {queryParam.type = '', handleRefresh()}"></SearchCom>
<div style="width: 100%; height: 32px; margin-bottom: 8px;">
<a-button type="primary" @click="editCertificateType()">编辑证书类型</a-button>
</div>
</div>
<a-row :gutter="24">
<a-col :md="5" :sm="24" class="borderTop ">
<div>
<div v-if="this.orgTree != ''">
<a-tree
:treeData="orgTree"
v-if="orgTree.length"
@select="handleClick"
:defaultExpandAll="true"
:defaultExpandedKeys="expandedKeys"
:replaceFields="replaceFields" />
</div>
<div v-else>
<a-empty :image="simpleImage" />
</div>
<a-button type="primary" @click="changeOrgType" style="display: block; margin: 10px auto;">
{{ queryParam.orgType === 1 ? '切换到项目组' : '切换到单位' }}
</a-button>
</div>
</a-col>
<a-col :md="19" :sm="24" style="padding-left: 0px">
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData">
<template slot="action" slot-scope="text, record">
<a-dropdown>
<a class="ant-dropdown-link">操作
<a-icon type="down" />
</a>
<a-menu slot="overlay">
<a-menu-item v-if="hasPerm('person:certificate:edit')">
<a href="javascript:;" @click="editPersonCertificate(record)">修改</a>
</a-menu-item>
<a-menu-item v-if="hasPerm('person:certificate:export')">
<a href="javascript:;" @click="exportPersonCertificate(record)">导出</a>
</a-menu-item>
<a-menu-item v-if="hasPerm('person:certificate:del')">
<a-popconfirm placement="topRight" title="确认删除?" @confirm="() => delPersonCertificate(record)">
<a href="javascript:;">删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</template>
</s-table>
</a-col>
</a-row>
</a-card>
</template>
<script>
import { Empty } from 'ant-design-vue'
import { STable, SearchCom } from '@/components'
import { getArchivesCertificatelist, delCertificate, exportCertificate } from '@/api/archives/certificate'
import { downloadExportFile } from '@/api/common/common'
import { dictionaryDropDown } from '@/api/sys/dictionaryItem'
import { orgList } from '@/api/org/org'
import { listToTree } from '@/utils/util'
export default {
// import使
components: { STable, SearchCom },
props: {},
data () {
//
return {
queryParam: { orgId: '', orgType: 1, type: '' },
queryOptions: [
{ type: 'select-dic', placeholder: '证书类型', key: 'type', options: [] }
],
state: [], //
//
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
orgTree: [],
expandedKeys: [],
treeLoading: true,
replaceFields: {
children: 'children',
title: 'name',
key: 'id',
value: 'id'
},
//
columns: [
{ title: '姓名', width: '80px', align: 'center', dataIndex: 'personName', key: 'personName' },
{ title: '单位信息', width: 'auto', align: 'center', dataIndex: 'dwOrgName', key: 'dwOrgName' },
{ title: '部门信息', width: 'auto', align: 'center', dataIndex: 'bmOrgName', key: 'bmOrgName' },
{ title: '证书名称', width: 'auto', align: 'center', dataIndex: 'name', key: 'name' },
{
title: '证书类型',
width: 'auto',
align: 'center',
dataIndex: 'type',
key: 'type',
customRender: (text, record, index) => {
let textStr = ''
this.queryOptions[0].options.forEach(element => { if (element.value.toString() === text) textStr = element.name })
return textStr
}
},
{ title: '注册日期', width: 'auto', align: 'center', dataIndex: 'registerDate', key: 'registerDate' },
{ title: '失效日期', width: 'auto', align: 'center', dataIndex: 'validityEndDate', key: 'validityEndDate' },
{
title: '证书状态',
width: '80px',
align: 'center',
dataIndex: 'state',
key: 'state',
customRender: (text, record, index) => {
let textStr = ''
this.state.forEach(element => { if (element.value.toString() === text) textStr = element.name })
return textStr
}
},
{ title: '操作', width: '70px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
],
loadData: null
}
},
// data
computed: {},
// data
watch: {},
//
methods: {
//
getOrgTree () {
orgList({ orgType: this.queryParam.orgType }).then(res => {
this.treeLoading = false
if (!res.code === 200 || !res.data.length) {
return
}
this.expandedKeys = []
this.orgTree = listToTree(res.data, [], 0)
this.queryParam.orgId = this.orgTree[0].id
//
this.orgTree.forEach(item => {
this.expandedKeys.push(item.id)
})
if (!this.loadData) this.loadData = parameter => { return getArchivesCertificatelist(Object.assign(parameter, this.queryParam)).then(res => { return res }) }
else this.handleRefresh()
})
},
//
dictionaryDropDown () {
//
dictionaryDropDown({ dictionaryCode: '0001' }).then((res) => {
this.queryOptions[0].options = res.data
})
//
dictionaryDropDown({ dictionaryCode: '0010' }).then((res) => {
this.state = res.data
})
},
//
editCertificateType () {
this.$router.push({ path: '/archives/certificate/CertificateType', query: {} })
},
//
handleRefresh () {
this.$refs.table.refresh(true)
},
//
changeOrgType () {
this.queryParam.orgType = this.queryParam.orgType === 1 ? 2 : 1
this.getOrgTree()
// this.handleClick();
},
//
handleClick (e) {
this.queryParam.orgId = e.toString()
this.$refs.table.refresh(true)
},
//
editPersonCertificate (record) {
this.$router.push({
path: '/archives/certificate/EditCertificate',
query: {
certificateId: record.id
}
})
},
//
exportPersonCertificate (record) {
exportCertificate({ id: record.id }).then(res => {
downloadExportFile(res.data)
})
},
//
delPersonCertificate (record) {
delCertificate({ id: record.id }).then(res => {
this.$message.success('删除证书成功!')
this.$refs.table.refresh(true)
})
}
},
// - 访this
created () {
//
this.getOrgTree()
//
this.dictionaryDropDown()
},
// - 访DOM
mounted () { },
// -
beforeCreate () { },
// -
beforeMount () { },
// -
beforeUpdate () { },
// -
updated () { },
// -
beforeDestroy () { },
// -
destroyed () { },
// keep-alive
activated () { }
}
</script>
<style scoped>
.borderTop {
border-top: 1px solid #e8e8e8;
}
.borderRight {
border-right: 1px solid #e8e8e8;
}
</style>

View File

@ -1,109 +0,0 @@
<template>
<a-card :bordered="false" title="项目档案">
<div class="table-page-search-wrapper">
<SearchCom :form="queryParam" :list="queryOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}"></SearchCom>
<div style="width: 100%; height: 32px; margin-bottom: 8px;">
<!-- <a-button type="primary">导出</a-button> -->
</div>
</div>
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.pageNum) || 1">
<template slot="action" slot-scope="text, record">
<a-dropdown>
<a class="ant-dropdown-link">操作
<a-icon type="down" />
</a>
<a-menu slot="overlay">
<a-menu-item v-if="hasPerm('archives:project:user:list')">
<a href="javascript:;" @click="archivesProjectUser(record)">人员记录</a>
</a-menu-item>
<!-- <a-menu-item>
<a href="javascript:;" @click="exportData(record)">导出</a>
</a-menu-item> -->
</a-menu>
</a-dropdown>
</template>
</s-table>
</a-card>
</template>
<script>
import { STable, SearchCom } from '@/components'
import { getArchivesProjectList } from '@/api/archives/project'
import { classList } from '@/api/project/class'
export default {
components: { STable, SearchCom },
data() {
return {
queryParam: { trainClass: '', trainWay: '', projectName: '' },
columns: [
// { title: 'ID', width: '60px', align: 'center', dataIndex: 'id', key: 'id' },
{ title: '项目名称', width: 'auto', align: 'center', dataIndex: 'name', key: 'name' },
{ title: '项目时间', width: 'auto', align: 'center', dataIndex: 'time', key: 'time' },
{ title: '项目类别', width: 'auto', align: 'center', dataIndex: 'way', key: 'way' },
{ title: '人数', width: '60px', align: 'center', dataIndex: 'peopleSize', key: 'peopleSize' },
{ title: '创建人', width: 'auto', align: 'center', dataIndex: 'creater', key: 'creater' },
{ title: '创建时间', width: 'auto', align: 'center', dataIndex: 'createTime', key: 'createTime' },
{ title: '项目状态', width: '80px', align: 'center', dataIndex: 'statusName', key: 'statusName' },
{ title: '操作', width: '70px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
],
loadData: parameter => { return getArchivesProjectList(Object.assign(parameter, this.queryParam)).then(res => { return res }) },
trainClass: []
}
},
created: function () {
classList({ pageNum: 1, pageSize: 9999 }).then(res => {
for (let index in res.rows) {
let item = res.rows[index];
let item_ = {};
item_.id = item.id.toString();
item_.name = item.value;
this.trainClass.push(item_);
}
});
if (this.$route.query.queryParamTrainClass) this.queryParam.trainClass = this.$route.query.queryParamTrainClass;
if (this.$route.query.queryParamTrainWay) this.queryParam.trainWay = this.$route.query.queryParamTrainWay;
if (this.$route.query.queryParamProjectName) this.queryParam.projectName = this.$route.query.queryParamProjectName;
},
computed: {
queryOptions: function () {
return [
{ type: 'select', placeholder: '培训种类', key: 'trainClass', options: [{ id: '', name: '全部' }, ...this.trainClass] },
{
type: 'select', placeholder: '培训方式', key: 'trainWay', options: [
// 1- 2- 3- 4-
{ id: '', name: '全部' },
{ id: '1', name: '培训' },
{ id: '2', name: '考试' },
{ id: '3', name: '培训练习' },
{ id: '4', name: '培训练习考试' }
]
},
{ type: 'input', placeholder: '项目名称', key: 'projectName' }
]
}
},
methods: {
handleRefresh() {
this.$refs.table.refresh(true)
},
//
archivesProjectUser(record) {
this.$router.push({
path: '/archives/project/ProjectUser', query: {
id: record.id,
queryParamTrainClass: this.queryParam.trainClass,
queryParamTrainWay: this.queryParam.trainWay,
queryParamProjectName: this.queryParam.projectName,
pageNum: this.$refs.table.localPagination.current
}
});
},
//
exportData(record) {
}
}
}
</script>

View File

@ -1,158 +0,0 @@
<template>
<a-card :bordered="false" title="人员记录">
<template slot="extra">
<a-button size="small" @click="close">返回</a-button>
</template>
<div class="table-page-search-wrapper">
<SearchCom :form="queryParam" :list="queryOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}"></SearchCom>
</div>
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData" :pageNum="Number(this.$route.query.pageNum1) || 1">
<template slot="action" slot-scope="text, record">
<a-dropdown v-if="hasPerm('archives:project:user:course:list') || hasPerm('archives:project:user:answer:list')">
<a class="ant-dropdown-link">操作
<a-icon type="down" />
</a>
<a-menu slot="overlay">
<a-menu-item v-if="hasPerm('archives:project:user:course:list')">
<a href="javascript:;" @click="archivesProjectUserDateil(record)">培训详情</a>
</a-menu-item>
<a-menu-item v-if="hasPerm('archives:project:user:answer:list')">
<a href="javascript:;" @click="archivesProjectUserAnswer(record)">答题记录</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</template>
</s-table>
</a-card>
</template>
<script>
import { STable, SearchCom } from '@/components'
import { getArchivesProjectUserList } from '@/api/archives/project'
export default {
// import使
components: { STable, SearchCom },
props: {},
data() {
//
return {
queryParam: {id:this.$route.query.projectId}, //state: '', userName: ''
columns: [
{ title: '姓名', width: '100px', align: 'center', dataIndex: 'name', key: 'name' },
{ title: '单位信息', width: 'auto', align: 'center', dataIndex: 'dwOrgName', key: 'dwOrgName' },
{ title: '部门信息', width: 'auto', align: 'center', dataIndex: 'bmOrgName', key: 'bmOrgName' },
{ title: '应修学时', width: '80px', align: 'center', dataIndex: 'mustClassHour', key: 'mustClassHour' },
{ title: '已修学时', width: '100px', align: 'center', dataIndex: 'alreadyClassHour', key: 'alreadyClassHour' },
{ title: '总练习题量', width: '60px', align: 'center', dataIndex: 'addUpExercises', key: 'addUpExercises' },
{ title: '已练习题量', width: '60px', align: 'center', dataIndex: 'alreadyExercises', key: 'alreadyExercises' },
{ title: '答对题量', width: '60px', align: 'center', dataIndex: 'yesTopic', key: 'yesTopic' },
{ title: '正确率', width: '60px', align: 'center', dataIndex: 'yesRate', key: 'yesRate' },
{ title: '考试成绩', width: '60px', align: 'center', dataIndex: 'testResult', key: 'testResult' },
{ title: '补考成绩', width: '60px', align: 'center', dataIndex: 'mendTestResult', key: 'mendTestResult' },
{ title: '考试耗时', width: '80px', align: 'center', dataIndex: 'testTime', key: 'testTime' },
{
title: '考试状态', width: '80px', align: 'center', dataIndex: 'testState', key: 'testState', customRender: (text, record, index) => {
// 1- 2- 3-
if (text == 1) return '合格'; else if (text == 2) return '不合格'; else if (text == 3) return '未考试';
}
},
{ title: '操作', width: '70px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
],
loadData: parameter => {
this.queryParam.id = this.$route.query.id;
return getArchivesProjectUserList(Object.assign(parameter, this.queryParam)).then(res => { return res });
},
};
},
// data
computed: {
queryOptions: function () {
let state = [{ id: '1', name: '合格' }, { id: '2', name: '不合格' }, { id: '3', name: '未考试' }]
return [
{ type: 'select', placeholder: '状态', key: 'state', options: [{ id: '', name: '全部' }, ...state] },
{ type: 'input', placeholder: '姓名', key: 'userName' }
]
}
},
// data
watch: {},
//
methods: {
//
close() {
this.$router.push({
path: '/archives/project/Index', query: {
queryParamTrainClass: this.$route.query.queryParamTrainClass,
queryParamTrainWay: this.$route.query.queryParamTrainWay,
queryParamProjectName: this.$route.query.queryParamProjectName,
pageNum: this.$route.query.pageNum
}
});
},
handleRefresh() {
this.$refs.table.refresh(true)
},
//
archivesProjectUserDateil(record) {
this.$router.push({
path: '/archives/project/ProjectUserCourse', query: {
projectId: this.$route.query.id,
userId: record.id,
queryParamState: this.queryParam.testState,
queryParamUserName: this.queryParam.userName,
pageNum1: this.$refs.table.localPagination.current,
queryParamTrainClass: this.$route.query.queryParamTrainClass,
queryParamTrainWay: this.$route.query.queryParamTrainWay,
queryParamProjectName: this.$route.query.queryParamProjectName,
pageNum: this.$route.query.pageNum
}
});
},
//
archivesProjectUserAnswer(record) {
this.$router.push({
path: '/archives/project/ProjectUserAnswer', query: {
projectId: this.$route.query.id,
userId: record.id,
queryParamState: this.queryParam.state,
queryParamUserName: this.queryParam.userName,
pageNum1: this.$refs.table.localPagination.current,
queryParamTrainClass: this.$route.query.queryParamTrainClass,
queryParamTrainWay: this.$route.query.queryParamTrainWay,
queryParamProjectName: this.$route.query.queryParamProjectName,
pageNum: this.$route.query.pageNum
}
});
}
},
// - 访this
created() {
if (this.$route.query.queryParamState) this.queryParam.state = this.$route.query.queryParamState;
if (this.$route.query.queryParamUserName) this.queryParam.userName = this.$route.query.queryParamUserName;
},
// - 访DOM
mounted() { },
// -
beforeCreate() { },
// -
beforeMount() { },
// -
beforeUpdate() { },
// -
updated() { },
// -
beforeDestroy() { },
// -
destroyed() { },
// keep-alive
activated() { }
};
</script>
<style scoped>
</style>

View File

@ -1,92 +0,0 @@
<template>
<a-card :bordered="false" title="答题记录">
<template slot="extra">
<a-button size="small" @click="close">返回</a-button>
</template>
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData">
<template slot="action" slot-scope="text, record">
<a href="javascript:;" @click="archivesProjectUserAnswerDateil(record)">答题记录</a>
</template>
</s-table>
</a-card>
</template>
<script>
import { STable, SearchCom } from '@/components'
import { getArchivesProjectUserAnswerList } from '@/api/archives/project'
export default {
// import使
components: { STable, SearchCom },
props: {},
data() {
//
return {
queryParam: {},
columns: [
{ title: '交卷时间', width: 'auto', align: 'center', dataIndex: 'handDate', key: 'handDate' },
{ title: '考试时长', width: 'auto', align: 'center', dataIndex: 'testTime', key: 'testTime' },
{ title: '考试成绩', width: 'auto', align: 'center', dataIndex: 'testResult', key: 'testResult' },
{ title: '操作', width: '100px', key: 'operation', align: 'center', scopedSlots: { customRender: 'action' } }
],
loadData: parameter => {
this.queryParam.projectId = this.$route.query.projectId;
this.queryParam.userId = this.$route.query.userId;
return getArchivesProjectUserAnswerList(Object.assign(parameter, this.queryParam)).then(res => { return res });
},
};
},
// data
computed: {},
// data
watch: {},
//
methods: {
//
close() {
this.$router.push({
path: '/archives/project/ProjectUser', query: {
queryParamState: this.$route.query.queryParamState,
queryParamUserName: this.$route.query.queryParamUserName,
pageNum1: this.$route.query.pageNum1,
queryParamTrainClass: this.$route.query.queryParamTrainClass,
queryParamTrainWay: this.$route.query.queryParamTrainWay,
queryParamProjectName: this.$route.query.queryParamProjectName,
pageNum: this.$route.query.pageNum
}
});
},
//
archivesProjectUserAnswerDateil(record) {
console.log('详情',record);
this.$router.push({ path: '/myreport', query: { type: 'exam', reportId: record.reportId } })
}
},
// - 访this
created() { },
// - 访DOM
mounted() { },
// -
beforeCreate() { },
// -
beforeMount() { },
// -
beforeUpdate() { },
// -
updated() { },
// -
beforeDestroy() { },
// -
destroyed() { },
// keep-alive
activated() { }
};
</script>
<style scoped>
</style>

View File

@ -1,106 +0,0 @@
<template>
<a-card :bordered="false" title="培训详情">
<template slot="extra">
<a-button size="small" @click="close">返回</a-button>
</template>
<div class="table-page-search-wrapper">
<SearchCom :form="queryParam" :list="queryOptions" @search="handleRefresh" @reset="() => {queryParam = {}, handleRefresh()}"></SearchCom>
</div>
<s-table ref="table" size="small" rowKey="id" :columns="columns" :data="loadData"></s-table>
</a-card>
</template>
<script>
import { STable, SearchCom } from '@/components'
import { getArchivesProjectUserCourseList } from '@/api/archives/project'
export default {
// import使
components: { STable, SearchCom },
props: {},
data() {
//
return {
queryParam: { courseName: '' },
columns: [
{ title: '课程名称', width: 'auto', align: 'center', dataIndex: 'courseName', key: 'name' },
{ title: '应修学时', width: '100px', align: 'center', dataIndex: 'mustClassHour', key: 'mustClassHour' },
{ title: '已修学时', width: '100px', align: 'center', dataIndex: 'alreadyClassHour', key: 'alreadyClassHour' },
{ title: '总题量', width: '80px', align: 'center', dataIndex: 'addUpExercises', key: 'addUpExercises' },
{ title: '已答题量', width: '100px', align: 'center', dataIndex: 'alreadyExercises', key: 'alreadyExercises' },
{ title: '答对题量', width: '90px', align: 'center', dataIndex: 'yesExercises', key: 'yesExercises' },
{ title: '答对正确率', width: '90px', align: 'center', dataIndex: 'yesRate', key: 'yesRate' },
{
title: '完成状态', width: '80px', align: 'center', dataIndex: 'finishState', key: 'finishState', customRender: (text, record, index) => {
// 0- 1-
if (text == 0) return '未完成'; else if (text == 1) return '已完成';
}
}
],
loadData: parameter => {
this.queryParam.projectId = this.$route.query.projectId;
this.queryParam.userId = this.$route.query.userId;
return getArchivesProjectUserCourseList(Object.assign(parameter, this.queryParam)).then(res => { return res });
},
};
},
// data
computed: {
queryOptions: function () {
return [
{ type: 'input', placeholder: '课程名称', key: 'courseName' }
]
}
},
// data
watch: {},
//
methods: {
//
close() {
this.$router.push({
path: '/archives/project/ProjectUser', query: {
projectId:this.$route.query.projectId,
userId:this.$route.query.userId,
queryParamState: this.$route.query.queryParamState,
queryParamUserName: this.$route.query.queryParamUserName,
pageNum1: this.$route.query.pageNum1,
queryParamTrainClass: this.$route.query.queryParamTrainClass,
queryParamTrainWay: this.$route.query.queryParamTrainWay,
queryParamProjectName: this.$route.query.queryParamProjectName,
pageNum: this.$route.query.pageNum
}
});
},
handleRefresh() {
this.$refs.table.refresh(true)
},
},
// - 访this
created() { },
// - 访DOM
mounted() { },
// -
beforeCreate() { },
// -
beforeMount() { },
// -
beforeUpdate() { },
// -
updated() { },
// -
beforeDestroy() { },
// -
destroyed() { },
// keep-alive
activated() { }
};
</script>
<style scoped>
</style>

Some files were not shown because too many files have changed in this diff Show More