Compare commits

...

4 Commits

54 changed files with 18620 additions and 4 deletions

11
apiCa/job.js Normal file
View File

@@ -0,0 +1,11 @@
import request from '@/utilCa/request.js'
const api = {}
// 获取职业大类 中类
api.queryJobDictionaryListByParentCode = (code) => request.globalRequest(`/Job/QueryJobDictionaryListByParentCode?code=${code}`,'GET', {}, 1,3)
// 搜索
api.queryJobListByParentCode = (name,code) => request.globalRequest(`/Job/QueryJobListByParentCode?name=${name}&code=${code}`,'GET', {}, 1,3)
// 职业详情
api.queryJobDetailById = (id) => request.globalRequest(`/Job/QueryJobDetailById?id=${id}`,'GET', {}, 2,3)
export default api

32
apiCa/studentProfile.js Normal file
View File

@@ -0,0 +1,32 @@
import request from '@/utilCa/request.js'
const api = {}
// 获取生涯罗盘
api.getCareerCompassList = (name) => request.globalRequest(`/StudentProfile/GetCareerCompassList`,'GET', {}, 1)
// 保存生涯罗盘--职业方向
api.saveGXCareerPlan = (jobId) => request.globalRequest(`/StudentProfile/SaveGXCareerPlan?jobId=${jobId}`,'POST', {}, 1)
// 生涯罗盘--获取职业规划
api.getGXCareerPlanList = (keyword,page,ps) => request.globalRequest(`/StudentProfile/GetGXCareerPlanList?keyword=${keyword}&page=${page}&ps=${ps}`,'GET', {}, 1)
// smart目标制定获取学习目标
api.querySmartTargets = () => request.globalRequest(`/StudentProfile/QuerySmartTargets`,'GET', {}, 1)
// smart目标制定获取单个目标
api.querySmartInfo = (encodeId) => request.globalRequest(`/StudentProfile/QuerySmartInfo?encodeId=${encodeId}`,'GET', {}, 1)
// smart目标制定保存smart目标
api.saveSmartTarget = (data) => request.globalRequest(`/StudentProfile/SaveSmartTarget`,'POST', data, 1)
// smart目标制定删除Smart目标
api.deleteSmartTarg = (encodeId) => request.globalRequest(`/StudentProfile/DeleteSmartTarg?encodeId=${encodeId}`,'POST', {}, 1)
// smart目标制定获取年度计划
api.queryPlanList = (encodeId) => request.globalRequest(`/StudentProfile/QueryPlanList?encodeId=${encodeId}`,'GET', {}, 1)
// smart目标制定保存年度计划
api.savePlanList = (data) => request.globalRequest(`/StudentProfile/SavePlanList`,'POST', data, 1)
// 获取生涯档案(高校
api.getGXWechatStudentProfile = () => request.globalRequest(`/StudentProfile/GetGXWechatStudentProfile`,'GET', {}, 1)
//获取职业路径职业列表
api.queryCareerPath = () => request.globalRequest(`/StudentManage/QueryCareerPath`,'POST', {}, 1)
// 获取职业详情参数encodeId 加密id
api.queryPathInfo = (encodeId) => request.globalRequest(`/StudentManage/QueryPathInfo?encodeId=${encodeId}`,'POST', {}, 1)
export default api

125
apiCa/testManage.js Normal file
View File

@@ -0,0 +1,125 @@
import request from '@/utilCa/request.js'
const api = {}
// 检查综合解释是否完成
api.checkUnionTest = () => request.globalRequest(`/TaskManage/CheckUnionTest`,'GET', {}, 2,5)
api.queryUnionTestResult = () => request.globalRequest(`/Test/QueryUnionTestResult`,'GET', {}, 2,5)
// 测评列表
api.queryTaskListForWeChart = (eduLevel) => request.globalRequest(`/TaskManage/QueryTaskListForWeChart?eduLevel=${eduLevel}`,'GET', {}, 2,5)
// 获取测评题目
api.queryTestContent = (type) => request.globalRequest(`/TaskManage/QueryTestContent?type=${type}`,'GET', {}, 2,5)
// 保存学科信心测评结果
api.saveSubjectTest = (testStr) => request.globalRequest(`/TaskManage/SaveSubjectTest?testStr=${testStr}`,'POST', "", 2,5)
// 保存自我评估
api.saveStudentSscoreResult = (data) => request.globalRequest(`/Test/SaveStudentSscoreResult`,'POST', data, 2,5)
// 保存MBTI
api.saveMBTITest = (data) => request.globalRequest(`/TaskManage/SaveMBTITest`,'POST', data, 2,5)
// 保存工作价值
api.saveWorkValuesResult = (data) => request.globalRequest(`/TaskManage/SaveWorkValuesResult`,'POST', data, 2,5)
// 保存多元智能
api.saveMultipleIntelligenceResult = (data) => request.globalRequest(`/TaskManage/SaveMultipleIntelligenceResult`,'POST', data, 2,5)
// 保存人格测评
api.saveCharacterTestResult = (data) => request.globalRequest(`/TaskManage/SaveCharacterTestResult`,'POST', data, 2,5)
// 保存兴趣测评
api.saveInterestTestResult = (data) => request.globalRequest(`/TaskManage/SaveInterestTestResult`,'POST', data, 2,5)
// 保存初中测评结果
api.querySaveTestRecord = (data) => request.globalRequest(`/ResearchStudy/QuerySaveTestRecord`,'POST', data, 1)
// 保存简易测评
api.saveCustomerTestResult = (data) => request.globalRequest(`/TaskManage/SaveCustomerTestResult`,'POST', data, 2,5)
//保存测评结果(通用能力,多元能力,领导力)
api.saveCustomTestResult = (data) => request.globalRequest(`/TaskManage/SaveCustomTestResult`,'POST', data, 2,5)
//保存结果(学习力相关测评(文本类),图形类(-45推理能力测评),(生涯构建)(生涯适应力))
api.saveStudyCustomTestResult = (data) => request.globalRequest(`/TestManage/SaveStudyCustomTestResult`,'POST', data, 1,0)
//保存结果(学习力:图形类22注意力测评23记忆力测评25场独立-场依存认知风格测评)
api.saveStudyGraphic_TestResult = (data) => request.globalRequest(`/TestManage/SaveStudyGraphic_TestResult`,'POST', data, 1,0)
//保存结果(学习力:图形类:沉思型-冲动型认知风格测评,
api.saveStudyGraphic_DependencyResult = (data) => request.globalRequest(`/TestManage/SaveStudyGraphic_DependencyResult`,'POST', data, 1,0)
// 获取自我评估结果
api.querySubjectScoreResult = () => request.globalRequest(`/TaskManage/QuerySubjectScoreResult`,'GET', {}, 2,5)
// 获取兴趣测评结果
api.queryInterestTestResult = (year,term,recordId) => request.globalRequest(`/TestManage/QueryInterestTestResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {}, 1)
// 获取学科信心结果
api.querySubjectResult = (year,term,recordId) => request.globalRequest(`/TestManage/QuerySubjectResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {},1)
// 获取MBTI结果
api.queryMBTIResult = (year,term,recordId)=> request.globalRequest(`/TestManage/QueryMBTIResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {}, 1)
// 获取多元智能结果
api.multipleIntelligenceResult = (year,term,recordId) => request.globalRequest(`/TestManage/MultipleIntelligenceResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {}, 1)
// 获取工作价值结果
api.workValuesResult = (year,term,recordId) => request.globalRequest(`/TestManage/WorkValuesResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {}, 1)
// 获取人格测评结果
api.personalityTestResult = (year,term,recordId) => request.globalRequest(`/TestManage/PersonalityTestResult?year=${year}&term=${term}&recordId=${recordId}`,'GET', {},1)
// 获取初中兴趣题目
api.getTestTitle = (testtype) => request.globalRequest(`/ResearchStudy/GetTestTitle?testtype=${testtype}`,'GET', {}, 1)
// 获取初中测评结果
api.queryJuniorTestRecord = (year,term,recordId) => request.globalRequest(`/ResearchStudy/QueryJuniorTestRecord?year=${year}&term=${term}&recordId=${recordId}`,'GET', {}, 1)
// 获取简易测评
api.queryCustomerTestTite = (testtype) => request.globalRequest(`/TaskManage/QueryTestContent?type=${testtype}`,'GET', {}, 2,5)
// 获取简易测评报告
api.queryPrimaryInterestResult = () => request.globalRequest(`/TaskManage/QueryPrimaryInterestResult`,'GET', {}, 2,5)
// 获取多元智能结果(简版)
api.multipleIntelligenceSimpleResult = () => request.globalRequest(`/Test/MultipleIntelligenceSimpleResult`,'GET', {}, 2,5)
// 获取测评结果(通用能力,多元能力,领导力)
api.queryCustomTestResult = (testType,year,term,recordId) => request.globalRequest(`/TestManage/QueryCustomTestResult?type=${testType}&year=${year}&term=${term}&recordId=${recordId}`,'GET', {}, 1)
//获取测评结果(生涯构建和学习力相关测评)
api.getStudyCustomTestResult = (testType,year,term,recordId) => request.globalRequest(`/TestManage/GetStudyCustomTestResult?testType=${testType}&year=${year}&term=${term}&recordId=${recordId}`,'GET', {}, 1,0)
//获取结果时间维度对比(生涯构建和学习力相关测评)
api.getStudyTimeGroupTestResult = (testType,userId,year,term,recordId) => request.globalRequest(`/TestManage/GetStudyTimeGroupTestResult?testType=${testType}&userId=${userId}&year=${year}&term=${term}&recordId=${recordId}`,'GET', {}, 1,0)
//小程序获取时间维度接口(所有生涯测评)
api.getCareerYearAndTermList = (testType) => request.globalRequest(`/TestManage/GetCareerYearAndTermList?testType=${testType}`,'GET', {}, 1,0)
//兴趣测评对比数据
api.getInterestTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetInterestTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//人格测评对比数据
api.getPersonTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetPersonTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//多元智能测评对比数据
api.getMultipleTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetMultipleTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//工作价值观测评对比数据
api.getWorkValuesTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetWorkValuesTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//MBTI测评对比数据
api.getMBTITestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetMBTITestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//学科信心测评对比数据
api.getSubjectTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetSubjectTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//SCL-90对比/领导力数据
api.getCustomTestGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,typeId,userId,recordId) => request.globalRequest(`/TestManage/GetCustomTestGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&typeId=${typeId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//多元能力测评对比数据
api.getMultipleAbilityGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetMultipleAbilityGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//通用职业能力测评对比数据
api.getBeCurrentJobGroupResult = (year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetBeCurrentJobGroupResult?year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//获取学习力测评(文本类)群体维度对比数据,(生涯构建)
api.getStudyTestGroupResult = (typeId,year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetStudyTestGroupResult?typeId=${typeId}&year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//记忆力测评群体维度对比数据
api.getLearningMemoryGroupResult = (typeId,year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetLearningMemoryGroupResult?typeId=${typeId}&year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//场独立-场依存认知风格测评群体维度对比数据
api.getLearningUniqueGroupResult = (typeId,year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetLearningUniqueGroupResult?typeId=${typeId}&year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//沉思型-冲动型认知风格测评群体维度对比数据
api.getLearningDependencyGroupResult = (typeId,year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetLearningDependencyGroupResult?typeId=${typeId}&year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//学习力(图形类)测评群体维度对比数据(22注意力测评-45推理能力测评)
api.getGraphic_TestGroupResult = (typeId,year,term,schoolId,gradeId,classId,sex,departId,userId,recordId) => request.globalRequest(`/TestManage/GetGraphic_TestGroupResult?typeId=${typeId}&year=${year}&term=${term}&schoolId=${schoolId}&gradeid=${gradeId}&classid=${classId}&sex=${sex}&departId=${departId}&userId=${userId}&recordId=${recordId}`,'GET', {}, 1,0)
//获取测评分类标签
api.getTestTypeTagLIst = () => request.globalRequest(`/TestManage/GetTestTypeTagLIst`,'GET', {}, 1)
//获取测评报告日期列表
api.getCareerYearAndTermListNew = (testType,userId) => request.globalRequest(`/TestManage/GetCareerYearAndTermListNew?testType=${testType}&userId=${userId}`,'GET', {}, 1)
// 保存测评答题过程记录
api.saveTestRecordProcess = (data) => request.globalRequest(`/TestRecordProcess/SaveTestRecordProcess`,'POST', data, 1)
//获取测评答题记录
api.getTestRecordProcessList = (testType) => request.globalRequest(`/TestRecordProcess/GetTestRecordProcessList?testType=${testType}`,'GET', {}, 1)
// 删除测评数据
api.removeTestRecordProcess = (testType) => request.globalRequest(`/TestRecordProcess/RemoveTestRecordProcess?testType=${testType}`,'POST', {}, 1)
// 获取测评列表答题记录状态
api.getUserTestTypeProcessList = (testTypes) => request.globalRequest(`/TestRecordProcess/GetUserTestTypeProcessList?testTypes=${testTypes}`,'GET', {}, 1)
export default api

78
apiCa/user.js Normal file
View File

@@ -0,0 +1,78 @@
import request from '@/utilCa/request.js'
const api = {}
//根据openId,获取token,并判断用户是否已绑定账号
api.queryKaShiToken = (userId,name) => request.globalRequest(`/KaShi/QueryKaShiToken?userId=${userId}&name=${name}&schoolId=2268`,'GET', {})
//根据openId,获取token,并判断用户是否已绑定账号
api.getAccessTokenAndUser = (params) => request.globalRequest(`/WeChartToken/GetAccessTokenAndUser?openId=${params}`,'GET', {})
//获取用户token 生涯平台token
api.queryWechartToken = (userId,schoolId,userType) => request.globalRequest(`/Auth/QueryWechartToken?userId=${userId}&schoolId=${schoolId}&userType=${userType}`,'GET', {},1,4)
// 获取openid
api.getOpenId = (params) => request.globalRequest(`/WishOrder/GetOpenId?code=${params}`,'GET', {}, "")
// 微信支付
api.createWeiXinOrder = (data) => request.globalRequest(`/TenpayOrder/CreateWeiXinOrder`, 'POST', data)
// 用户绑定登录
api.userBindLogin = (data) => request.globalRequest(`/user/UserBindLogin`, 'POST', data)
//用户解绑账号或切换账号有返回User, Token话,前端重新绑定到header上
api.userUnBindOrChangeCodeNumber = (userId,type) => request.globalRequest(`/user/UserUnBindOrChangeCodeNumber?userId=${userId}&type=${type}`,'GET', {}, 1)
//获取当前微信用户已绑定的账号列表
api.getUserCodeNumber = () => request.globalRequest(`/user/GetUserCodeNumber`,'GET', {}, 1)
//根据学号获取学校列表
api.getSchoolByCodeNumber = (params) => request.globalRequest(`/user/GetSchoolByCodeNumber?codeNumber=${params}`,'GET', {}, 1)
// 判断学生是否完成生涯成熟度问卷, taskId大于0需要进行问卷taskId 等于0不需要问卷
// api.getQuestionnaireTitlePower = () => request.globalRequest(`/CareerMaturityTask/GetQuestionnaireTitlePower`,'GET', {}, 1)
// 获取生涯成熟度题目
// api.getTestTitleListList = () => request.globalRequest(`/CareerMaturityTask/GetTestTitleListList`,'GET', {}, 1)
// 保存生涯成熟度测评结果
// api.saveCareerMaturityTestResult = (data) => request.globalRequest(`/CareerMaturityTask/SaveCareerMaturityTestResult`, 'POST', data, 1)
// 获取手机验证码
api.getMobileCode = (mobile) => request.globalRequest(`/WeChartUser/GetMobileCode?mobile=${mobile}&token=SQEIfNmlFufmOMNVPZCvNVWpDeldYjH`,'GET', {}, 1)
// 提交手机注册
api.checkSmsCode = (data) => request.globalRequest(`/user/CheckSmsCode`, 'POST', data, 1)
// 获取个人档案
api.queryStudentProfile = () => request.globalRequest(`/StudentResource/QueryStudentProfile`,'GET', {}, 2,4)
// 添加,取消个人意向
api.doIntention = (type,id,actionType) => request.globalRequest(`/StudentResource/DoIntention?type=${type}&actionType=${actionType}&id=${id}`,'GET', {}, 2,4)
//绑vip卡
api.bindCard = (data) => request.globalRequest(`/user/BindCard`,'POST', data, 1)
// 一体机激活 绑定 获取列表
api.queryMachineOrderCountList = (machineNumber) => request.globalRequest(`/Onemachine/QueryMachineOrderCountList?machineNumber=${machineNumber}`,'GET', {}, 1)
// 绑定设备
api.activityMachine = (data) => request.globalRequest(`/Onemachine/ActivityMachine`,'POST', data, 1)
// 解绑
api.removeMachine = (orderId,machineModelId,machineNumber) => request.globalRequest(`/Onemachine/RemoveMachine?orderId=${orderId}&machineModelId=${machineModelId}&machineNumber=${machineNumber}`,'POST', {}, 1)
// ai咨询问题
api.aISearch = (keyword,sessionId) => request.globalRequest(`/AIAgents/search?keyword=${keyword}&sessionId=${sessionId}`,'GET', {}, 1)
// ai获取历史咨询
api.aIGetHistoryRecord = (page) => request.globalRequest(`/AIAgents/GetHistoryRecord?page=${page}&pageSize=20`,'GET', {}, 1)
// 保存人脸图片
api.queryUploadPhoto = (address) => request.globalRequest(`/user/QueryUploadPhoto?address=${address}`,'GET', {}, 1)
// 保存操作日志
api.saveUserOperationLog = (data) => request.globalRequest(`/UserOperationLog/SaveUserOperationLog`,'POST', data, 3)
// 获取操作日志
api.getUserOperationLogList = (pageIndex,pageSize,keyword,operationType) => request.globalRequest(`/UserOperationLog/GetUserOperationLogList?pageIndex=${pageIndex}&pageSize=${pageSize}&keyword=${keyword}&operationType=${operationType}`,'GET', {}, 1)
// 设备登录
api.loginOneMachine = (machineNo) => request.globalRequest(`/user/LoginOneMachine?machineNo=${machineNo}`,'POST', {}, 1)
// 获取系统菜单权限
api.querySchoolMenu = () => request.globalRequest(`/user/QuerySchoolMenu`,'GET', {}, 1)
// 保存高校个人信息
api.saveUserBasisInfo = (mobileCode,data) => request.globalRequest(`/user/SaveUserBasisInfo?mobileCode=${mobileCode}`,'POST', data, 1)
// 获取高校个人信息
api.getUserBasisInfo = () => request.globalRequest(`/user/GetUserBasisInfo`,'GET', {}, 1)
export default api

2
package-lock.json generated
View File

@@ -1,6 +1,4 @@
{
"name": "ks-app-employment-service",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {

386
packageCa/job/details.vue Normal file
View File

@@ -0,0 +1,386 @@
<template>
<view class="specialtyItem">
<view class="content">
<view class="head">
<view class="h3">
{{jobDetailData.Name}}
</view>
<view class="h2">所属大类<text>{{jobDetailData.BigCategoryName}}</text></view>
<view class="h2">所属中类<text>{{jobDetailData.MidCategoryName}}</text></view>
<view class="h2">所属小类<text>{{jobDetailData.SmallCategoryName}}</text></view>
<view class="intention-btn" v-if="jobDetailData.ShowIntention" v-text="jobDetailData.IsIntention?'取消意向':'加入意向'" @click="changeIntention"></view>
</view>
<view class="txt-content">
<view class="article-item" v-if="jobDetailData.VideoUrl">
<text class="h4">职业新说</text>
<video :src="jobDetailData.VideoUrl"></video>
</view>
<view class="article-item" v-if="jobDetailData.TopIntroduction">
<text class="h4">职业说明</text>
<view class="article-content" v-html="jobDetailData.TopIntroduction"></view>
</view>
<view class="article-item" v-if="jobDetailData.TopWorkContent">
<text class="h4">工作内容</text>
<view class="article-content" v-html="jobDetailData.TopWorkContent"></view>
</view>
<view class="article-item" v-if="jobDetailData.QualityRequirements">
<text class="h4">从业要求</text>
<view class="article-content" v-html="jobDetailData.QualityRequirements"></view>
</view>
<view class="article-item" v-if="jobDetailData.AbilityRequirements">
<text class="h4">能力要求</text>
<view class="article-content" v-html="jobDetailData.AbilityRequirements"></view>
</view>
<view class="article-item" v-if="jobDetailData.SalaryStr">
<text class="h4">薪资范围</text>
<view class="article-content" v-html="jobDetailData.SalaryStr"></view>
</view>
<view class="article-item" v-if="jobDetailData.CareerProspects">
<text class="h4">就业前景</text>
<view class="article-content" v-html="jobDetailData.CareerProspects"></view>
</view>
<view class="article-item" v-if="listOne.length > 0">
<text class="h4">职业技能</text>
<view class="attr-wrap">
<view class="row" v-for="(item,index) in listOne" :key="index">
<view class="name">
<text class="label">{{index + 1}}</text>{{item.Name}}
</view>
<view class="desc">
{{item.Explain}}
</view>
</view>
</view>
</view>
<view class="article-item" v-if="listTwo.length > 0">
<text class="h4">职业能力</text>
<view class="attr-wrap">
<view class="row" v-for="(item,index) in listTwo" :key="index">
<view class="name">
<text class="label">{{index + 1}}</text>{{item.Name}}
</view>
<view class="desc">
{{item.Explain}}
</view>
</view>
</view>
</view>
<view class="article-item" v-if="listThree.length > 0">
<text class="h4">具备知识</text>
<view class="attr-wrap">
<view class="row" v-for="(item,index) in listThree" :key="index">
<view class="name">
<text class="label">{{index + 1}}</text>{{item.Name}}
</view>
<view class="desc">
{{item.Explain}}
</view>
</view>
</view>
</view>
<view class="article-item" v-if="listFour.length > 0">
<text class="h4">职业素养</text>
<view class="attr-wrap">
<view class="row" v-for="(item,index) in listFour" :key="index">
<view class="name">
<text class="label">{{index + 1}}</text>{{item.Name}}
</view>
<view class="desc">
{{item.Explain}}
</view>
</view>
</view>
</view>
<view class="article-item" v-if="listFive.length > 0">
<text class="h4">职业活动</text>
<view class="attr-wrap">
<view class="row" v-for="(item,index) in listFive" :key="index">
<view class="name">
<text class="label">{{index + 1}}</text>{{item.Name}}
</view>
<view class="desc">
{{item.Explain}}
</view>
</view>
</view>
</view>
<view class="article-item" v-if="jobDetailData.DevelopmentPath">
<text class="h4">发展路径</text>
<view class="article-content" v-html="jobDetailData.DevelopmentPath"></view>
</view>
<view class="article-item" v-if="jobDetailData.SpecialtyList != null && jobDetailData.SpecialtyList.length > 0">
<text class="h4">推荐专业</text>
<view class="sp-wrap">
<view class="item" v-for="(item,index) in jobDetailData.SpecialtyList":key="index">
{{item.Name}}
</view>
</view>
</view>
</view>
</view>
<view class="fiexd-visitor" v-if="isVisitor">
<navigator class="btn" url="/pagesUserInfo/binding/binding?routeType=6">请先登录</navigator>
</view>
<!-- <u-modal :show="showLogin" content='观看完整内容,请先登录' width='500rpx' @confirm="showLogin=false"></u-modal> -->
</view>
</template>
<script>
import api from "@/apiCa/job.js"
import api1 from "@/apiCa/user.js"
export default {
data() {
return {
showLogin: false,
isVisitor: false, //游客
user: uni.getStorageSync("CAuserInfo").user,
id: 0,
jobDetailData: {
Name: "",
BigCategoryName: "",
MidCategoryName: "",
SmallCategoryName: "",
VideoUrl: "",
TopIntroduction: "",
TopWorkContent: "",
QualityRequirements: "",
},
listOne: [],//职业技能
listTwo: [],//职业能力
listThree: [],//具备知识
listFour: [],//职业素养
listFive: [],//职业活动
}
},
onLoad(e) {
if(this.user == undefined || this.user == null){
this.isVisitor = true;
}else {
this.isVisitor = false;
}
this.id = e.id;
this.queryJobDetailById();
},
methods: {
showConfirmInfor(){
uni.showModal({
content:"观看完整内容,请先登录",
confirmText:"确认",
confirmColor:"#1677ff",
showCancel:false
})
},
changeIntention(){
uni.showLoading({
title: "加载中"
})
let isIntention = this.jobDetailData.IsIntention;
api1.doIntention(2,this.id,isIntention?1:0).then((res)=>{
uni.hideLoading();
if(res.Result == 1){
this.jobDetailData.IsIntention = !this.jobDetailData.IsIntention;
}
})
},
// 获取专业信息
queryJobDetailById(){
uni.showLoading({
title:"加载中"
})
api.queryJobDetailById(this.id).then((res) => {
uni.hideLoading();
if(res.Result == 1){
this.jobDetailData = res.Data;
let attList = res.Data.AttList;
if(attList != null){
let listOne = [],//职业技能
listTwo = [],//职业能力
listThree = [],//具备知识
listFour = [],//职业素养
listFive = [];//职业活动
attList.forEach(item => {
switch(item.Identify){
case 1 :{
listOne.push(item);
break;
}
case 2 :{
listTwo.push(item);
break;
}
case 3 :{
listThree.push(item);
break;
}
case 5 :{
listFour.push(item);
break;
}
case 6 :{
listFive.push(item);
break;
}
}
});
this.listOne = listOne;
this.listTwo = listTwo;
this.listThree = listThree;
this.listFour = listFour;
this.listFive = listFive;
}
}
})
},
}
}
</script>
<style lang="scss" scoped>
.specialtyItem {
// background-color: #f6f6f6;
padding-bottom: 150rpx;
.head {
position: relative;
padding: 20rpx 30rpx 20rpx;
display: flex;
width: 690rpx;
background-color: #ffffff;
justify-content: center;
flex-direction: column;
border-bottom: 20rpx solid #f6f6f6;
.intention-btn {
position: absolute;
right: 30rpx;
top: 10rpx;
width: 160rpx;
height: 60rpx;
line-height: 60rpx;
border-radius: 8rpx;
font-size: 24rpx;
background: #1676FF;
color: #fff;
text-align: center;
}
.h3 {
display: flex;
align-items: center;
height: 60rpx;
font-size: 36rpx;
font-weight: 600;
color: #525252;
margin-bottom: 10rpx;
}
.h2{
font-size: 24rpx;
color: #999;
margin-bottom: 10rpx;
text {
color: #333;
}
}
}
.txt-content {
position: relative;
overflow: auto;
background: #fff;
padding: 34rpx 30rpx 60rpx 30rpx;
border-bottom-left-radius: 20rpx;
border-bottom-right-radius: 20rpx;
.article-item {
margin-bottom: 32rpx;
padding-bottom: 40rpx;
border-bottom: 2rpx solid #f6f6f6;
.h4 {
display: flex;
align-items: center;
font-size: 32rpx;
color: #323233;
font-weight: 500;
margin-bottom: 34rpx;
}
video {
width: 100%;
}
.article-content {
line-height: 46rpx;
font-size: 28rpx;
color: #969799;
}
.attr-wrap {
.row {
margin-bottom: 25rpx;
.name {
display: flex;
align-items: center;
font-size: 28rpx;
color: #20b664;
margin-bottom: 18rpx;
.label {
display: block;
width: 64rpx;
height: 32rpx;
line-height: 32rpx;
margin-right: 20rpx;
background: #FF8A00;
border-radius: 12rpx;
color: #fff;
font-size: 24rpx;
text-align: center;
}
}
.desc {
font-size: 28rpx;
color: #969799;
line-height: 42rpx;
}
}
}
.sp-wrap {
display: flex;
flex-wrap: wrap;
.item {
display: block;
border: 2rpx solid #1677ff;
border-radius: 8rpx;
height: 52rpx;
margin-right: 20rpx;
line-height: 52rpx;
padding: 0 15rpx;
font-size: 28rpx;
margin-bottom: 20rpx;
color: #1677ff;
}
}
}
}
.fiexd-visitor {
position: fixed;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 150rpx;
background: rgba(255, 255, 255, 0.9);
z-index: 99;
border-top: 1px solid #eee;
.btn {
width: 300rpx;
height: 80rpx;
border-radius: 40rpx;
line-height: 80rpx;
background: #1677ff;
font-size: 28rpx;
text-align: center;
color: #fff;
}
}
}
</style>
<style>
page {
overflow-y: scroll;
}
</style>

566
packageCa/job/index.vue Normal file
View File

@@ -0,0 +1,566 @@
<template>
<view class="jobIndex">
<view class="searchbox">
<view class="input-wrap">
<view class="school-tip" @click="showTipLayer()">
<view class="txt">职业</view>
<view class="txt">1639</view>
<view class="icon"></view>
</view>
<text class="icon icon-search"></text>
<input type="search" v-model="kw" placeholder="请输入职业名称" @input="inputKeywrok"/>
<view class="list-wrap" v-show="kw != ''">
<navigator class="link" :url="'/packageCa/job/details?id='+item.Id" v-for="(item, index) in jobDataList" :key="index">{{item.Name}}</navigator>
</view>
</view>
</view>
<!-- :style="{height: winHeight - barHeight - loginHeight + 'px'}" -->
<view class="u-menu-wrap" >
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId">
<view v-for="(item,index) in jobList" :key="index" class="u-tab-item"
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
<text class="u-line-3">{{item.Name}}</text>
</view>
</scroll-view>
<scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll">
<view class="page-view">
<view class="class-item" :id="'item' + index" v-for="(item , index) in jobList" :key="index">
<view class="item-title">
<text>{{item.Name}}</text>
</view>
<view class="item-container">
<view class="thumb-box" v-for="(item1, index1) in item.SubList" :key="index1" >
<navigator class="item-menu-name" :url="`/packageCa/job/midList?code=${item1.Code}&name=${item1.Name}`" >{{item1.Name}}</navigator>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<view class="fiexd-visitor" v-if="isVisitor">
<navigator class="btn" url="/packageB/pagesUserInfo/binding/binding?routeType=6">请先登录</navigator>
</view>
<!-- <u-modal :show="showTip" @confirm="showTip=false" @cancel="showTip=false" confirmText="我明白了">
<view class="slot-content">
<view class="tip-layer">
<view class="title">{{layerTitile}}</view>
<view class="desc" v-html="layerDesc"></view>
</view>
</view>
</u-modal> -->
</view>
</template>
<script>
import api from "@/apiCa/job.js"
import jobList from "@/packageCa/job/jobList.json";
export default {
data() {
return {
kw: "", //搜索关键
user: uni.getStorageSync("CAuserInfo").user,
isVisitor: false, //游客
barHeight: wx.getWindowInfo().statusBarHeight,
winHeight: wx.getWindowInfo().windowHeight,
jobDataList: [],
jobList,
scrollTop: 0, //tab标题的滚动条位置
oldScrollTop: 0, // tab标题的滚动条旧位置
current: 0, // 预设当前项的值
menuHeight: 0, // 左边菜单的高度
menuItemHeight: 0, // 左边菜单item的高度
itemId: '', // 栏目右边scroll-view用于滚动的id
arr: [], // 储存距离顶部高度的数组
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
timer: null, // 定时器
showTip: false, //数据弹窗
layerTitile: "",
layerDesc: "",
loginHeight:99,
}
},
onLoad(e) {
if(this.user == undefined || this.user == null){
this.isVisitor = true;
this.loginHeight=99;
}else {
this.isVisitor = false;
this.loginHeight=0;
}
this.scrollRightTop = 1;
},
methods: {
showTipLayer(){
this.layerTitile = "数据说明";
this.layerDesc = "共1639个职业数据来源《中华人民共和国职业分类大典(2022年版)》如有变更以官方最新公布为准。部分职业详情页中提供与职业相关的3-5分钟介绍视频截至2025年10月职业介绍视频共计200个。";
uni.showModal({
title:this.layerTitile,
content:this.layerDesc,
confirmText:"我明白了",
confirmColor:"#1677ff",
showCancel:false
})
//this.showTip = true;
},
// 滚动新旧值
getElRect(elClass, dataVal) {
new Promise((resolve, reject) => {
const query = uni.createSelectorQuery().in(this);
query.select('.' + elClass).fields({
size: true
}, res => {
// 如果节点尚未生成res值为null循环调用执行
if (!res) {
setTimeout(() => {
this.getElRect(elClass);
}, 10);
return;
}
this[dataVal] = res.height;
resolve();
}).exec();
})
},
//滚动位置
getMenuItemTop() {
new Promise(resolve => {
let selectorQuery = uni.createSelectorQuery();
selectorQuery.selectAll('.class-item').boundingClientRect((rects) => {
// 如果节点尚未生成rects值为[](因为用selectAll所以返回的是数组),循环调用执行
if (!rects.length) {
setTimeout(() => {
this.getMenuItemTop();
}, 10);
return;
}
rects.forEach((rect) => {
// 视情况而定这里减去rects[0].top是因为第一项顶部可能不是贴到导航栏(比如有个搜索框的情况)
// this.arr.push(rect.top - rects[0].top);
this.arr.push(rect.top - rects[0].top)
resolve();
})
}).exec()
})
},
/**
* 观测元素相交状态
* 检测右边scroll-view的id为itemxx的元素与right-box的相交状态
* 如果跟.right-box底部相交就动态设置左边栏目的活动状态
*/
async observer() {
this.tabbar.map((val, index) => {
let observer = uni.createIntersectionObserver(this);
observer.relativeTo('.right-box', {
top: 0
}).observe('#item' + index, res => {
if (res.intersectionRatio > 0) {
let id = res.id.substring(4);
this.leftMenuStatus(id);
}
})
})
},
/**
* 设置左边菜单的滚动状态
* @index 传入的 ID
*/
async leftMenuStatus(index) {
this.current = index;
// 如果为0意味着尚未初始化
if (this.menuHeight == 0 || this.menuItemHeight == 0) {
await this.getElRect('menu-scroll-view', 'menuHeight');
await this.getElRect('u-tab-item', 'menuItemHeight');
}
// 将菜单活动item垂直居中
this.scrollTop = index * this.menuItemHeight + this.menuItemHeight / 2 - this.menuHeight / 2;
},
/**
* 点击左边的栏目切换
* @index 传入的 ID
*/
async swichMenu(index) {
if (this.arr.length == 0) {
await this.getMenuItemTop();
}
if (index == this.current) return;
this.scrollRightTop = this.oldScrollTop;
this.$nextTick(()=> {
this.scrollRightTop = this.arr[index];
this.current = index;
this.leftMenuStatus(index);
})
},
/**
* 右边菜单滚动
* 如果不存在height2意味着数据循环已经到了最后一个设置左边菜单为最后一项即可
*/
async rightScroll(e) {
this.oldScrollTop = e.detail.scrollTop;
if (this.arr.length == 0) {
await this.getMenuItemTop();
}
if (this.timer) return;
if (!this.menuHeight) {
await this.getElRect('menu-scroll-view', 'menuHeight');
}
setTimeout(() => { // 节流
this.timer = null;
// scrollHeight为右边菜单垂直中点位置
// let scrollHeight = e.detail.scrollTop + this.menuHeight / 2;
// scrollHeight为右边菜单头部位置
let scrollHeight = e.detail.scrollTop + 20;
for (let i = 0; i < this.arr.length; i++) {
let height1 = this.arr[i];
let height2 = this.arr[i + 1];
if (!height2 || scrollHeight >= height1 && scrollHeight < height2) {
this.leftMenuStatus(i);
return;
}
}
}, 10)
},
inputKeywrok(){
if(this.user == undefined || this.user == null){
return;
}
if(this.kw.trim() == ''){
return;
}
api.queryJobListByParentCode(this.kw.trim(),"").then((res) => {
if(res.Result == 1){
this.jobDataList = res.Data.List;
}
})
},
// 查询专业
bindSearchList() {
if(this.user == undefined || this.user == null){
return uni.showToast({
title: "请先登录",
icon: "none"
})
}
if(this.kw == ""){
return uni.showToast({
title: "请输入搜索内容",
icon: "none"
})
}
uni.navigateTo({
url: "/packageCa/job/smallList?name=" + this.kw.trim()
})
},
}
}
</script>
<style lang="scss" scoped>
.tip-layer {
.title {
font-size: 36rpx;
color: #333;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 28rpx;
color: #666666;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
.jobIndex {
position: relative;
padding-top: 0;
height: 100vh;
.u-menu-wrap {
display: flex;
height: calc(100vh - 100rpx);
overflow: auto;
padding-top: 100rpx;
.u-tab-view {
width: 350rpx;
height: 100%;
border-radius: 0rpx 40rpx 0rpx 0rpx;
background-color: #F7FAFF;
.u-tab-item {
padding-left: 34rpx;
padding-right: 10rpx;
height: 160rpx;
background: #F7FAFF;
box-sizing: border-box;
display: flex;
align-items: center;
font-size: 26rpx;
color: #444;
font-weight: 400;
}
.u-tab-item-active {
position: relative;
color: #fff;
font-size: 26rpx;
font-weight: 500;
background: #1677ff;
border-radius:5px;
}
.u-tab-item-active::before {
content: "";
position: absolute;
border-left: 6rpx solid #1677ff;
border-radius: 8rpx;
height: 28rpx;
left: 16rpx;
top: 50%;
transform: translateY(-50%);
}
}
.right-box {
.page-view {
padding: 24rpx 24rpx 1200rpx;
}
.class-item {
margin-bottom: 20rpx;
background-color: #fff;
.item-title {
font-size: 28rpx;
color: #333;
margin-bottom: 25rpx;
font-weight: 600;
}
.item-container {
display: flex;
flex-wrap: wrap;
}
.item-menu-name {
display: flex;
align-items: center;
justify-content: center;
width: 420rpx;
height: 80rpx;
padding: 0 20rpx;
line-height: 40rpx;
margin-bottom: 25rpx;
background: #FFF;
border-radius: 12rpx;
font-size: 24rpx;
color: #333;
&:nth-child(2n){
margin-right: 0;
}
&.sel {
background: #E7F1FF;
color: #1677ff;
}
}
.thumb-box {
display: flex;
justify-content: center;
flex-direction: column;
.row {
display: flex;
flex-wrap: wrap;
margin-bottom: 25rpx;
}
}
}
}
}
}
.searchbox {
position: absolute;
left: 0;
top: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 100rpx;
background-color: #fff;
.input-wrap {
position: relative;
width: 544rpx;
height: 76rpx;
background: #F8F8F8;
border-radius: 12rpx;
font-size: 28rpx;
margin-left: 130rpx;
.school-tip {
position: absolute;
left: -142rpx;
top: 0;
padding-left: 10rpx;
padding-top: 6rpx;
width: 110rpx;
height: 70rpx;
background: #E7F1FF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
font-size: 24rpx;
color: #1677ff;
}
.icon {
position: absolute;
right: 12rpx;
top: 8rpx;
width: 29rpx;
height: 29rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAKDSURBVEiJtZXBceJAEEVfDxyo4aIQ5AzYCAwZmAiML6hUPtiKwHYE8p5U8gUcgTeDZSMwGaAMrAsqDlbPHjyqpUDCXPZX6aCemf49Pd2/hRPIsiwExiJyLSIBEPqlElgDf6qqWiZJUnb5kC7HvV7vwTk386Y1UPgPEQmcc+OGUESW2+02aSM6Isjz/ApYAIGILOu6forjuOgKxBhzDdx7000URb86CfI8fwAegbWqTrscdxC9ASPgMYqipyMCH/mbiCzn8/nNOY73kaZpMBwOU5/WaXMTaRattRugqKpq0vVoaZoGg8Eg2O12ZdeePM/fgVBVf8RxXBiA4XCYAqjqtO1glmWzPM831toPY8zGWrvx6TyCqk6BoNfrPQCIj/7jMHd7zsfGmN++gn56852voNYzLy8vC+fcTFUvjLV25plf2yIyxtwBfH5+TqMoeo6i6FlVJ375qu1MXdcN6dgAl0DRVTEiEojI6vb2dt3Ydrtdk8aw7Yz3tRaR6z4wEpFV20aA+Xw+ObRZa+88+br10BcKEQkNEDjnOlv9EFmWjfnqlaKu61PlXABh/1zHfD3eyDn3BhSqOjmnEfsN0zkEzrkFEDQ1fmqv16vS+PScReD3dRbEQTBjYC1Zls2MMQtVvThXe76D16YNkPSBFYDvvM5H8w35LiJFW2XtwyssVVUtTRzHhYgsnXMzP2BaMRgMRkDonBunaRqcih64F5FlkiSl4V/nlV5yWxHH8QqYqupJMWx8bLfbhC657ppO36HRoCO53iP5fwPn4CYL//usqq+nRube7C6/HZkNDqYTXldWe5IS+m+EH/pds7uVYJ/Iy/mld9ZUT+GcK51zr8DqVCr/AulAaepbjIRGAAAAAElFTkSuQmCC") center no-repeat;
background-size: 100%;
}
input {
width: 400rpx;
height: 100%;
margin-left: 90rpx;
outline: none;
background: transparent;
border: none;
}
.icon-search {
position: absolute;
left: 30rpx;
top: 50%;
transform: translateY(-50%);
width: 30rpx;
height: 30rpx;
background-image: url("data:image/gif;base64,R0lGODlhHgAeAKIAAMfHx6WlpbS0tNPT0+Tk5J2dnZaWlvHx8SwAAAAAHgAeAAADv3i6SiChhCAGu5gRYbr3AZCNB/CdX0CQDOcVAiC778rSIeacdjZ4Ahah8CIRDUGWIuARYVwB5YJQu1A7Uoap41xsk1kF6OKyhBW03oFpMJ+3bcZRnf113AcPXWo3dA9HeFlweGyCUmktHWBhRwZWHQVnJUAYR4xKjod9fyRwmAtscSxwfiNXXKc0kYcKfQYwAAMDMyhNp462HzK7JKu2BWarrQ0CuR05DKKjJLMyA3sHQx/Ek9MekyTXj9mnEQAJADs=");
background-size: 100%;
}
.list-wrap {
position: absolute;
left: 0;
top: 70rpx;
width: 480rpx;
height: 350rpx;
background: #fff;
overflow: auto;
box-shadow: 0 0 4rpx 2rpx #f2f2f2;
border-radius: 8rpx;
z-index: 90;
.link {
display: flex;
align-items: center;
height: 60rpx;
border-bottom: 2rpx solid #f2f2f2;
padding-left: 20rpx;
color: #333;
font-size: 24rpx;
}
}
}
.icon-search {
position: absolute;
left: 30rpx;
top: 50%;
transform: translateY(-50%);
width: 30rpx;
height: 30rpx;
background-image: url("data:image/gif;base64,R0lGODlhHgAeAKIAAMfHx6WlpbS0tNPT0+Tk5J2dnZaWlvHx8SwAAAAAHgAeAAADv3i6SiChhCAGu5gRYbr3AZCNB/CdX0CQDOcVAiC778rSIeacdjZ4Ahah8CIRDUGWIuARYVwB5YJQu1A7Uoap41xsk1kF6OKyhBW03oFpMJ+3bcZRnf113AcPXWo3dA9HeFlweGyCUmktHWBhRwZWHQVnJUAYR4xKjod9fyRwmAtscSxwfiNXXKc0kYcKfQYwAAMDMyhNp462HzK7JKu2BWarrQ0CuR05DKKjJLMyA3sHQx/Ek9MekyTXj9mnEQAJADs=");
background-size: 100%;
}
input {
width: 70%;
height: 100%;
margin-left: 90rpx;
outline: none;
background: transparent;
border: none;
}
}
.specialty-index-main {
padding-top: 110rpx;
}
.specialty-index-con {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
display: flex;
.specialty-index-left,
.specialty-index-right {
position: absolute;
bottom: 0;
overflow-y: auto;
top: 0;
-webkit-overflow-scrolling: touch;
}
.specialty-index-left {
left: 0;
width: 40%;
z-index: 2;
background: #fff;
border-right: 1px solid #ddd;
.ul {
.li {
position: relative;
padding: 35rpx 19rpx;
font-size: 26rpx;
line-height: 46rpx;
&.sel {
background: #fff;
box-shadow: 4rpx 0 6px #ccc;
&:before {
content: "";
display: block;
width: 8rpx;
height: 100%;
background: #1677ff;
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
}
}
}
}
.specialty-index-right {
right: 0;
width: 60%;
background: #fff;
padding-bottom: 30rpx;
background: #f6f6f6;
.link {
display: block;
font-size: 26rpx;
background-color: #ffff;
padding: 32rpx 25rpx;
border-bottom: 2rpx solid #f1f1f1;
text {
color: #333;
}
}
}
}
.fiexd-visitor {
position: fixed;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 150rpx;
background: rgba(255, 255, 255, 0.9);
z-index: 99;
border-top: 1px solid #eee;
.btn {
width: 300rpx;
height: 80rpx;
border-radius: 40rpx;
line-height: 80rpx;
background: #1677ff;
font-size: 28rpx;
text-align: center;
color: #fff;
}
}
</style>

284
packageCa/job/jobList.json Normal file
View File

@@ -0,0 +1,284 @@
[
{
"Name": "党的机关、国家机关、群众团体和社会组织、企事业单位负责人",
"Code": 1,
"SubList": [{
"Name": "中国共产党机关负责人",
"Code": "1-01"
}, {
"Name": "国家机关负责人",
"Code": "1-02"
}, {
"Name": "民主党派和工商联负责人",
"Code": "1-03"
}, {
"Name": "人民团体和群众团体、社会组织及其他成员组织负责人",
"Code": "1-04"
}, {
"Name": "基层群众自治组织负责人",
"Code": "1-05"
}, {
"Name": "企事业单位负责人",
"Code": "1-06"
}]
},
{
"Name": "专业技术人员",
"Code": 2,
"SubList": [{
"Name": "科学研究人员",
"Code": "2-01"
}, {
"Name": "工程技术人员",
"Code": "2-02"
}, {
"Name": "农业技术人员",
"Code": "2-03"
}, {
"Name": "飞机和船舶技术人员",
"Code": "2-04"
}, {
"Name": "卫生专业技术人员",
"Code": "2-05"
}, {
"Name": "经济和金融专业人员",
"Code": "2-06"
}, {
"Name": "监察、法律、社会和宗教专业人员",
"Code": "2-07"
}, {
"Name": "教学人员",
"Code": "2-08"
}, {
"Name": "文学艺术、体育专业人员",
"Code": "2-09"
}, {
"Name": "新闻出版、文化专业人员",
"Code": "2-10"
}, {
"Name": "其他专业技术人员",
"Code": "2-11"
}]
},
{
"Name": "办事人员和有关人员",
"Code": 3,
"SubList": [{
"Name": "行政办事及辅助人员",
"Code": "3-01"
}, {
"Name": "安全和消防及辅助人员",
"Code": "3-02"
}, {
"Name": "法律事务及辅助人员",
"Code": "3-03"
}, {
"Name": "其他办事人员和有关人员",
"Code": "3-04"
}]
},
{
"Name": "社会生产服务和生活服务人员",
"Code": 4,
"SubList": [{
"Name": "批发与零售服务人员",
"Code": "4-01"
}, {
"Name": "交通运输、仓储物流和邮政业服务人员",
"Code": "4-02"
}, {
"Name": "住宿和餐饮服务人员",
"Code": "4-03"
}, {
"Name": "信息传输、软件和信息技术服务人员",
"Code": "4-04"
}, {
"Name": "金融服务人员",
"Code": "4-05"
}, {
"Name": "房地产服务人员",
"Code": "4-06"
}, {
"Name": "租赁和商务服务人员",
"Code": "4-07"
}, {
"Name": "技术辅助服务人员",
"Code": "4-08"
}, {
"Name": "水利、环境和公共设施管理服务人员",
"Code": "4-09"
}, {
"Name": "居民服务人员",
"Code": "4-10"
}, {
"Name": "电力、燃气及水供应服务人员",
"Code": "4-11"
}, {
"Name": "修理及制作服务人员",
"Code": "4-12"
}, {
"Name": "文化和教育服务人员",
"Code": "4-13"
}, {
"Name": "健康、体育和休闲服务人员",
"Code": "4-14"
}, {
"Name": "其他社会生产服务和生活服务人员",
"Code": "4-15"
}]
},
{
"Name": "农、林、牧、渔业生产及辅助人员",
"Code": 5,
"SubList": [{
"Name": "农业生产人员",
"Code": "5-01"
}, {
"Name": "林业生产人员",
"Code": "5-02"
},
{
"Name": "畜牧业生产人员",
"Code": "5-03"
},
{
"Name": "渔业生产人员",
"Code": "5-04"
},
{
"Name": "农、林、牧、渔业生产辅助人员",
"Code": "5-05"
}, {
"Name": "其他农、林、牧、渔业生产及辅助人员",
"Code": "5-06"
}
]
},
{
"Name": "生产制造及有关人员",
"Code": 6,
"SubList": [{
"Name": "农副产品加工人员",
"Code": "6-01"
},{
"Name": "食品、饮料生产加工人员",
"Code": "6-02"
},{
"Name": "烟草及其制品加工人员",
"Code": "6-03"
},{
"Name": "纺织、针织、印染人员",
"Code": "6-04"
},{
"Name": "纺织品、服装和皮革、毛皮制品加工制作人员",
"Code": "6-05"
},{
"Name": "木材加工、家具与木制品制作人员",
"Code": "6-06"
},{
"Name": "纸及纸制品生产加工人员",
"Code": "6-07"
},{
"Name": "印刷和记录媒介复制人员",
"Code": "6-08"
},{
"Name": "文教、工美、体育和娱乐用品制造人员",
"Code": "6-09"
},{
"Name": "石油加工和炼焦、煤化工生产人员",
"Code": "6-10"
},{
"Name": "化学原料和化学制品制造人员",
"Code": "6-11"
},{
"Name": "医药制造人员",
"Code": "6-12"
},{
"Name": "化学纤维制造人员",
"Code": "6-13"
},{
"Name": "橡胶和塑料制品制造人员",
"Code": "6-14"
},{
"Name": "非金属矿物制品制造人员",
"Code": "6-15"
},{
"Name": "采矿人员",
"Code": "6-16"
},{
"Name": "金属冶炼和压延加工人员",
"Code": "6-17"
},{
"Name": "机械制造基础加工人员",
"Code": "6-18"
},{
"Name": "金属制品制造人员",
"Code": "6-19"
},{
"Name": "通用设备制造人员",
"Code": "6-20"
},{
"Name": "专用设备制造人员",
"Code": "6-21"
},{
"Name": "汽车制造人员",
"Code": "6-22"
},{
"Name": "铁路、船舶、航空设备制造人员",
"Code": "6-23"
},{
"Name": "电气机械和器材制造人员",
"Code": "6-24"
},{
"Name": "计算机、通信和其他电子设备制造人员",
"Code": "6-25"
},{
"Name": "仪器仪表制造人员",
"Code": "6-26"
},{
"Name": "再生资源综合利用人员",
"Code": "6-27"
},{
"Name": "电力、热力、气体、水生产和输配人员",
"Code": "6-28"
},{
"Name": "建筑施工人员",
"Code": "6-29"
},{
"Name": "运输设备和通用工程机械操作人员及有关人员",
"Code": "6-30"
},{
"Name": "生产辅助人员",
"Code": "6-31"
},{
"Name": "其他生产制造及有关人员",
"Code": "6-32"
}]
},
{
"Name": "军队人员",
"Code": 7,
"SubList": [{
"Name": "军官 (警官)",
"Code": "7-01"
}, {
"Name": "军士 (警士)",
"Code": "7-02"
}, {
"Name": "义务兵",
"Code": "7-03"
}, {
"Name": "文职人员",
"Code": "7-04"
}]
},
{
"Name": "不便分类的其他从业人员",
"Code": 8,
"SubList": [{
"Name": "不便分类的其他从业人员",
"Code": "8-01"
}]
}
]

275
packageCa/job/midList.vue Normal file
View File

@@ -0,0 +1,275 @@
<template>
<view class="specialtylist">
<view class="content">
<view class="xx-title" v-html="name">
</view>
<view class="introduce-wrap" v-if="summary != '' && videoUrl != ''">
<view class="item" v-if="summary != ''">
<view class="title">
概述
</view>
<view class="txt" v-html="summary"></view>
</view>
<view class="item video-wrap" v-if="videoUrl != ''">
<view class="title">
介绍视频
</view>
<view class="mask" v-if="isVisitor" @click="showConfirmInfor">请先登录</view>
<video :src="videoUrl" style="width: 100%;"></video>
</view>
</view>
<view class="link-wrap">
<view class="link" :class="(isVisitor && index >2)?'visitor':''" @click="navSmallList(item,index)" v-for="(item, index) in jobList" :key="index">
<view class="head">
<view class="title">{{item.Name}}
<text class="label" v-if="item.HasVideo">视频</text>
<text class="label" v-if="item.ExistPower">职业能力</text>
</view>
</view>
<view class="desc" v-if="item.Introduction != ''" v-html="item.Introduction"></view>
</view>
</view>
</view>
<view class="fiexd-visitor" v-if="isVisitor">
<navigator class="btn" url="/pagesUserInfo/binding/binding?routeType=6">请先登录</navigator>
</view>
<!-- <u-modal :show="showLogin" content='观看完整内容,请先登录' width='500rpx' @confirm="showLogin=false"></u-modal> -->
</view>
</template>
<script>
import api from "@/apiCa/job.js"
export default {
data() {
return {
showLogin: false,
isVisitor: false, //游客
user: uni.getStorageSync("CAuserInfo").user,
name: "",
code: "",
jobList: [],
summary: "",
videoUrl: "",
}
},
onLoad(e) {
if(this.user == undefined || this.user == null){
this.isVisitor = true;
}else {
this.isVisitor = false;
}
this.name =e.name;
this.code = e.code;
this.queryJobDictionaryListByParentCode();
},
methods: {
showConfirmInfor(){
uni.showModal({
content:"观看完整内容,请先登录",
confirmText:"确认",
confirmColor:"#1677ff",
showCancel:false
})
},
navSmallList(item,index){
if(this.vipType==0&&index>0){
this.showVIP = true;
}else{
if(this.isVisitor && index > 2){
this.showConfirmInfor();
//this.showLogin = true;
}else {
uni.navigateTo({
url: `/packageCa/job/smallList?code=${item.Code}&name=${item.Name}`
})
}
}
},
// 获取职业信息
queryJobDictionaryListByParentCode(){
uni.showLoading({
title:"加载中"
})
api.queryJobDictionaryListByParentCode(this.code).then((res) => {
uni.hideLoading();
if(res.Result == 1){
this.summary = res.Data.CategoryIntroduction;
this.videoUrl = res.Data.CategoryVideo;
this.jobList = res.Data.List;
}
})
},
}
}
</script>
<style lang="scss" scoped>
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 28rpx;
color: #666666;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
.specialtylist {
background-color: #f6f6f6;
.content {
background: #fff;
padding-bottom: 150rpx;
.xx-title {
background: #1676FF;
color: #fff;
padding: 20rpx 30rpx;
font-size: 32rpx;
}
.introduce-wrap {
padding: 10rpx 30rpx 0;
.item {
position: relative;
padding-top: 20rpx;
padding-bottom: 30rpx;
border-bottom: 2rpx solid #ebedf0;
.title {
font-size: 32rpx;
color: #333;
font-weight: 600;
margin-bottom: 20rpx;
}
.txt {
font-size: 28rpx;
line-height: 40rpx;
color: #999 !important;
text-indent: 2em;
}
&.video-wrap {
position: relative;
.mask {
position: absolute;
left: 0;
top: 84rpx;
width: 690rpx;
height: 450rpx;
background: rgba(0, 0, 0, 0.6);
z-index: 9;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
color: #fff;
}
}
}
}
.link-wrap {
padding: 0 30rpx 50rpx;
.link {
padding: 36rpx 0;
display: flex;
flex-direction: column;
border-bottom: 1rpx solid #f2f2f2;
&:visited,
&:link,
&:active {
color: #333;
}
&.visitor {
position: relative;
&::after {
position: absolute;
left: 0;
top: 0;
content: "";
display: block;
width: 100%;
height: calc(100% + 2rpx);
z-index: 9;
background: rgba(0, 0, 0, 0.6);
}
}
.head {
display: flex;
align-items: center;
.title {
display: flex;
flex-wrap: wrap;
font-size: 32rpx;
color: #323232;
font-weight: 600;
.label {
display: inline-block;
color: #20b664;
font-size: 24rpx;
line-height: 38rpx;
padding: 0 8rpx;
border: 2rpx solid #20b664;
margin-left: 20rpx;
}
.vip-container {
width: 54rpx;
height: 40rpx;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAAA8CAMAAAApO6aAAAAAOVBMVEUAAAD6UDr8UDz4UDz8UDv8UDv9UDz7UDv3UDj6UD3/UED8UDz8UDz9UD36UDr/UDj7UDz7UD38UDx6NEBaAAAAEnRSTlMAYL9A359/cCBQEK/vjzAgz4+7n+EJAAAB9UlEQVRYw+1W25aDIAxckIsoatv//9g9gnaADLXn7D46T4JJOmQm2J8bN27c+AqD2jGyV2N6NeyPIT8lTKpGGNYqzb92LKyiTa/s/pie9MHhJaHV9E4LaWdmFHPwuNPKP4sMCaPOvC2vSUWVfwu0PE7F4M7EmJakokkvAmiFvL+8OhiOxEdabVKygrwvM+ZeRVP1P3R08QWtCRTKNk2rMhVJj0yqyw5ddia+dUdRI6WzbUV/bIPW48hm8cO5CbEfXJdB0lohLDCdhkV4bAoG9Bp2LOgoRkB/EntGHmgJ3YFYzolFCNFF2lEQwCmggTiGQ6e5Hal5XdWyhesiaWk2tep9Cog9iwCkzR07AhZN2lGnw9EKy8Jf1L4GJXDEqdUlpp1rO6LtDeWVXLXtlHA7Tk84I8O1QQYBHTv64UTwS8wFn60ODmuMlKTlunfZ0SSIbZku39+Opvr41XfF2GrvhB0l9Ci1j0IXakdD6ynqz03qQqakLRaN9rkh0k6h1eXSjhwo4mtdAExp853lwA8vUhdJS0F3CX6nW7i1b8dV1qCDLnWRtCzugI+Y33GqbBqhpWG0LnClLs45A9m5HdGfa7EB6AJaUvdrsQHV/XBucMUFYjv0f7Bj859QTsRW7gXofgU16wO2iV/T7jmiaTH+3Lhx43/wC+JRSzKfwZ9vAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 100%;
margin-left: 20rpx;
}
}
}
.desc {
margin-top: 8rpx;
font-size: 28rpx;
color: #969799;
// overflow: hidden;
// display: -webkit-box;
// -webkit-line-clamp: 2;
// /*! autoprefixer: ignore next */
// -webkit-box-orient: vertical;
text {
margin-bottom: 10rpx;
line-height: 40rpx;
}
}
}
}
}
.fiexd-visitor {
position: fixed;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 150rpx;
background: rgba(255, 255, 255, 0.9);
z-index: 99;
border-top: 1px solid #eee;
.btn {
width: 300rpx;
height: 80rpx;
border-radius: 40rpx;
line-height: 80rpx;
background: #1677ff;
font-size: 28rpx;
text-align: center;
color: #fff;
}
}
}
</style>
<style>
page {
overflow-y: scroll;
}
</style>

272
packageCa/job/smallList.vue Normal file
View File

@@ -0,0 +1,272 @@
<template>
<view class="specialtylist">
<view class="content">
<view class="xx-title" v-html="name">
</view>
<view class="introduce-wrap">
<view class="item">
<view class="title">
概述
</view>
<view class="txt" v-html="summary"></view>
</view>
<view class="item video-wrap" v-if="videoUrl != '' && videoUrl != undefined">
<view class="title">
介绍视频
</view>
<view class="mask" v-if="isVisitor" @click="showConfirmInfor">请先登录</view>
<video :src="videoUrl" style="width: 100%;"></video>
</view>
</view>
<view class="link-wrap">
<view class="link" :class="(isVisitor && index >2)?'visitor':''" @click="navDetails(item,index)" v-for="(item, index) in jobList" :key="index">
<view class="head">
<view class="title">{{item.Name}}<text class="label" v-if="item.HasVideo">视频</text><text class="label" v-if="item.ExistPower">职业能力</text> </view>
</view>
<view class="desc" v-if="item.TopIntroduction != ''" v-html="item.TopIntroduction"></view>
</view>
</view>
</view>
<view class="fiexd-visitor" v-if="isVisitor">
<navigator class="btn" url="/pagesUserInfo/binding/binding?routeType=6">请先登录</navigator>
</view>
<!-- <u-modal :show="showLogin" content='观看完整内容,请先登录' width='500rpx' @confirm="showLogin=false"></u-modal> -->
</view>
</template>
<script>
import api from "@/apiCa/job.js"
export default {
data() {
return {
showLogin: false,
isVisitor: false, //游客
user: uni.getStorageSync("CAuserInfo").user,
name: "",
code: "",
jobList: [],
summary: "",
videoUrl: "",
}
},
onLoad(e) {
if(this.user == undefined || this.user == null){
this.isVisitor = true;
}else {
this.isVisitor = false;
}
this.name =e.name;
this.code = e.code || "";
this.queryJobListByParentCode();
},
methods: {
showConfirmInfor(){
uni.showModal({
content:"观看完整内容,请先登录",
confirmText:"确认",
confirmColor:"#1677ff",
showCancel:false
})
},
navDetails(item,index){
if(this.isVisitor && index > 2){
this.showConfirmInfor();
//this.showLogin = true;
}else {
uni.navigateTo({
url: `/packageCa/job/details?id=${item.Id}&name=${item.Name}`
})
}
},
// 获取职业信息
queryJobListByParentCode(){
uni.showLoading({
title:"加载中"
})
let name = "";
if(!this.code){
name = this.name
}
api.queryJobListByParentCode(name,this.code).then((res) => {
uni.hideLoading();
if(res.Result == 1){
this.jobList = res.Data.List;
this.summary = res.Data.CategoryIntroduction;
this.videoUrl = res.Data.CategoryVideo;
}
})
},
}
}
</script>
<style lang="scss" scoped>
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 28rpx;
color: #666666;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
.specialtylist {
background-color: #f6f6f6;
.content {
background: #fff;
padding-bottom: 150rpx;
.xx-title {
background: #1676FF;
color: #fff;
padding: 20rpx 30rpx;
font-size: 32rpx;
}
.introduce-wrap {
padding: 10rpx 30rpx 0;
.item {
padding-top: 20rpx;
padding-bottom: 30rpx;
border-bottom: 2rpx solid #ebedf0;
.title {
font-size: 32rpx;
color: #333;
font-weight: 600;
margin-bottom: 20rpx;
}
.txt {
font-size: 28rpx;
line-height: 40rpx;
color: #999 !important;
text-indent: 2em;
}
&.video-wrap {
position: relative;
.mask {
position: absolute;
left: 0;
top: 84rpx;
width: 690rpx;
height: 450rpx;
background: rgba(0, 0, 0, 0.6);
z-index: 9;
display: flex;
align-items: center;
justify-content: center;
font-size: 36rpx;
color: #fff;
}
}
}
}
.link-wrap {
padding: 0 30rpx 50rpx;
.link {
padding: 36rpx 0;
display: flex;
flex-direction: column;
border-bottom: 1rpx solid #f2f2f2;
&:visited,
&:link,
&:active {
color: #333;
}
&.visitor {
position: relative;
&::after {
position: absolute;
left: 0;
top: 0;
content: "";
display: block;
width: 100%;
height: calc(100% + 2rpx);
z-index: 9;
background: rgba(0, 0, 0, 0.6);
}
}
.head {
display: flex;
align-items: center;
.title {
display: flex;
flex-wrap: wrap;
font-size: 32rpx;
color: #323232;
font-weight: 600;
.label {
display: inline-block;
color: #20b664;
font-size: 24rpx;
line-height: 38rpx;
padding: 0 8rpx;
border: 2rpx solid #20b664;
margin-left: 20rpx;
}
.vip-container {
width: 54rpx;
height: 40rpx;
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFEAAAA8CAMAAAApO6aAAAAAOVBMVEUAAAD6UDr8UDz4UDz8UDv8UDv9UDz7UDv3UDj6UD3/UED8UDz8UDz9UD36UDr/UDj7UDz7UD38UDx6NEBaAAAAEnRSTlMAYL9A359/cCBQEK/vjzAgz4+7n+EJAAAB9UlEQVRYw+1W25aDIAxckIsoatv//9g9gnaADLXn7D46T4JJOmQm2J8bN27c+AqD2jGyV2N6NeyPIT8lTKpGGNYqzb92LKyiTa/s/pie9MHhJaHV9E4LaWdmFHPwuNPKP4sMCaPOvC2vSUWVfwu0PE7F4M7EmJakokkvAmiFvL+8OhiOxEdabVKygrwvM+ZeRVP1P3R08QWtCRTKNk2rMhVJj0yqyw5ddia+dUdRI6WzbUV/bIPW48hm8cO5CbEfXJdB0lohLDCdhkV4bAoG9Bp2LOgoRkB/EntGHmgJ3YFYzolFCNFF2lEQwCmggTiGQ6e5Hal5XdWyhesiaWk2tep9Cog9iwCkzR07AhZN2lGnw9EKy8Jf1L4GJXDEqdUlpp1rO6LtDeWVXLXtlHA7Tk84I8O1QQYBHTv64UTwS8wFn60ODmuMlKTlunfZ0SSIbZku39+Opvr41XfF2GrvhB0l9Ci1j0IXakdD6ynqz03qQqakLRaN9rkh0k6h1eXSjhwo4mtdAExp853lwA8vUhdJS0F3CX6nW7i1b8dV1qCDLnWRtCzugI+Y33GqbBqhpWG0LnClLs45A9m5HdGfa7EB6AJaUvdrsQHV/XBucMUFYjv0f7Bj859QTsRW7gXofgU16wO2iV/T7jmiaTH+3Lhx43/wC+JRSzKfwZ9vAAAAAElFTkSuQmCC');
background-repeat: no-repeat;
background-size: 100%;
margin-left: 20rpx;
}
}
}
.desc {
margin-top: 8rpx;
font-size: 28rpx;
color: #969799;
// overflow: hidden;
// display: -webkit-box;
// -webkit-line-clamp: 2;
// /*! autoprefixer: ignore next */
// -webkit-box-orient: vertical;
text {
margin-bottom: 10rpx;
line-height: 40rpx;
}
}
}
}
}
.fiexd-visitor {
position: fixed;
bottom: 0;
left: 0;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 150rpx;
background: rgba(255, 255, 255, 0.9);
z-index: 99;
border-top: 1px solid #eee;
.btn {
width: 300rpx;
height: 80rpx;
border-radius: 40rpx;
line-height: 80rpx;
background: #1677ff;
font-size: 28rpx;
text-align: center;
color: #fff;
}
}
}
</style>
<style>
page {
overflow-y: scroll;
}
</style>

View File

@@ -0,0 +1,511 @@
<template>
<view class="title-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" v-if="taskId ==0" @click="goback"></view>
<text v-if="testTitle != ''">{{testTitle}}</text>
</view>
<view class="progress-block">
<view class="row">
<view class="title-index">
{{pageIndex+1}}
</view>
<view class="all-title">
{{allNum}}道题
</view>
<view class="time" v-if="doTime >0">
{{doTime}}分钟
</view>
</view>
<view class="bar">
<view class="bar-inner" :style="{width: rate + '%'}"></view>
</view>
</view>
<view class="content">
<view class="item" v-show="pageIndex == index" v-for="(item, index) in list" :key="index">
<view class="title">{{ item.TitleName }}</view>
<view class="sel-label-block">
<view class="label" v-if="item.OptionsA != null && item.OptionsA.trim() != ''"
:class="item.Value === 1 ? 'sel' : ''" @click="checkedTitle(1,index)">{{item.OptionsA}}</view>
<view class="label" v-if="item.OptionsB != null && item.OptionsB.trim() != ''"
:class="item.Value === 2 ? 'sel' : ''" @click="checkedTitle(2,index)">{{item.OptionsB}}</view>
<view class="label" v-if="item.OptionsC != null && item.OptionsC.trim() != ''"
:class="item.Value === 3 ? 'sel' : ''" @click="checkedTitle(3,index)">{{item.OptionsC}}</view>
<view class="label" v-if="item.OptionsD != null && item.OptionsD.trim() != ''"
:class="item.Value === 4 ? 'sel' : ''" @click="checkedTitle(4,index)">{{item.OptionsD}}</view>
<view class="label" v-if="item.OptionsE != null && item.OptionsE.trim() != ''"
:class="item.Value === 5 ? 'sel' : ''" @click="checkedTitle(5,index)">{{item.OptionsE}}</view>
<view class="label" v-if="item.OptionsF != null && item.OptionsF.trim() != ''"
:class="item.Value === 6 ? 'sel' : ''" @click="checkedTitle(6,index)">{{item.OptionsF}}</view>
</view>
</view>
<view class="btn-wrap">
<view class="pre-btn" @click="prePage">上一题</view>
<view class="com-btn" v-show="commit" @click="submitTitle">提交</view>
</view>
</view>
<!-- <u-modal :show="showBakcTip" @confirm="showBakcTip=false" @cancel="goback" confirmText="继续测评" cancelText="放弃测评"
:showCancelButton="true">
<view class="slot-content">
<view class="tip-layer">
<view class="title">提示</view>
<view class="desc">确认要放弃测评吗</view>
</view>
</view>
</u-modal> -->
</view>
</template>
<script>
import api from "@/apiCa/testManage.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
list: [],
allNum: 0, //总题目数
pageIndex: 0, //显示页
showBakcTip: false,
lastTapTime: 0, // 记录上次点击的时间
testType: -27,
taskId: 0,
testTitle: "自定义测评",
doTime: 2,
historyTitle: [],// 历史题目
}
},
computed: {
rate: function() {
let num = 0;
this.list.forEach(item => {
if (item.Value !== '') {
num++
}
});
return Math.round(num * 100 / this.allNum)
},
commit: function() {
let num = 0;
this.list.forEach(item => {
if (item.Value !== '') {
num++
}
});
if (num == this.list.length) {
return true;
} else {
return false;
}
}
},
onLoad(e) {
this.testType = e.testType;
if (e.taskId > 0) {
this.taskId = e.taskId
}
this.computeTitle(this.testType);
this.getHistoryTitle();
},
methods: {
// 返回
goback() {
uni.showModal({
title: '提示',
content: '确认要放弃测评吗?',
cancelText: '取消',
confirmText: '确认',
confirmColor: '#1677ff',
cancelColor: '#999999',
success: function (res) {
if (res.confirm) {
uni.navigateBack(-1);
} else if (res.cancel) {
}
}
});
//uni.navigateBack(-1);
},
computeTitle(testType) {
switch (parseInt(testType) ) {
case -27: {
// 多元能力
this.doTime = 25;
this.testTitle = "多元(职业)能力测评";
break;
}
case -28: {
// 通用职业
this.doTime = 8;
this.testTitle = "通用(职业)能力测评";
break;
}
}
},
//获取答题记录
getHistoryTitle(){
api.getTestRecordProcessList(this.testType).then(res => {
if (res.Result === 1) {
let data = res.Data;
this.historyTitle = data;
this.getTitle();
}
})
},
// 获取题目
getTitle() {
uni.showLoading({
title: "加载中..."
})
api.queryTestContent(this.testType).then(res => {
uni.hideLoading();
if (res.Result === 1) {
let list = res.Data.List.Item1;
list.forEach(item => {
item.Value = "";
this.historyTitle.forEach(ritem=>{
if(item.Id == ritem.TestTitleId){
switch (ritem.TestResult) {
case "A": {
item.Value = 1;
break;
}
case "B": {
item.Value = 2;
break;
}
case "C": {
item.Value = 3;
break;
}
case "D": {
item.Value = 4;
break;
}
case "E": {
item.Value = 5;
break;
}
case "F": {
item.Value = 6;
break;
}
}
}
})
})
if(this.historyTitle.length == 0){
this.pageIndex = 0;
}else if(this.historyTitle.length == list.length){
this.pageIndex = list.length - 1;
}else {
this.pageIndex = this.historyTitle.length;
}
this.allNum = list.length;
this.list = list;
this.testTitle = res.Data.List.Item2;
}
})
},
// 上一页
prePage() {
if (this.pageIndex == 0) {
return
}
this.pageIndex--
},
//选中题目
checkedTitle(NUM, INDEX) {
const now = Date.now();
if (now - this.lastTapTime < 500) {
console.log('双击事件被阻止');
return;
} else {
// 处理单击事件
console.log('单击事件被触发');
this.lastTapTime = now;
this.list[INDEX].Value = NUM;
this.saveTestRecordProcess(this.list[INDEX].Id,NUM);
setTimeout(() => {
if (this.pageIndex != this.list.length - 1) {
this.pageIndex = INDEX + 1;
}
}, 300)
}
},
//存储答题记录
saveTestRecordProcess(ID,VALUE){
let val = ""
switch (VALUE) {
case 1: {
val = "A";
break;
}
case 2: {
val = "B";
break;
}
case 3: {
val = "C";
break;
}
case 4: {
val = "D";
break;
}
case 5: {
val = "E";
break;
}
case 6: {
val = "F";
break;
}
}
let data = {
testType: this.testType,
testTitleId: ID,
testResult: val
}
api.saveTestRecordProcess(data).then(res => {
if (res.Result === 1) {
}
})
},
// 提交题目
submitTitle() {
let testStr = "";
this.list.forEach(item => {
switch (item.Value) {
case 1: {
testStr += `${item.Id}|A,`
break;
}
case 2: {
testStr += `${item.Id}|B,`
break;
}
case 3: {
testStr += `${item.Id}|C,`
break;
}
case 4: {
testStr += `${item.Id}|D,`
break;
}
case 5: {
testStr += `${item.Id}|E,`
break;
}
case 6: {
testStr += `${item.Id}|F,`
break;
}
}
});
uni.showLoading({
title: "提交中"
})
let data = {
testType: this.testType,
taskId: this.taskId,
testStr
}
api.removeTestRecordProcess(this.testType).then((res) => {
return api.saveCustomTestResult(data);
}).then((res) => {
uni.hideLoading();
if (res.Result === 1) {
uni.showToast({
title: "提交成功",
icon: "success"
})
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 上一页
if (beforePage != undefined) {
beforePage.data.refreshIfNeeded = true;
}
setTimeout(() => {
if (this.testType == -27) {
uni.redirectTo({
url: `/packageCa/testReport/multipleAbilityTestReport?id=${res.Data.TestId}`
})
} else if (this.testType == -28) {
uni.redirectTo({
url: `/packageCa/testReport/generalCareerTestReport?id=${res.Data.TestId}`
})
}
}, 1000)
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 32rpx;
color: #666666;
margin-bottom: 20rpx;
text-align: center;
&:last-child {
margin-bottom: 0;
}
}
}
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
margin-bottom: 30rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.title-wrap {
background: #fff;
.progress-block {
padding: 0 40rpx;
.row {
position: relative;
display: flex;
align-items: flex-end;
height: 40rpx;
margin-bottom: 20rpx;
.title-index {
font-size: 32rpx;
color: #1677ff;
font-weight: 600;
}
.all-title {
font-size: 28rpx;
color: #999999;
margin-left: 10rpx;
}
.time {
position: absolute;
right: 0;
top: 0;
font-size: 28rpx;
color: #20B664;
}
}
.bar {
position: relative;
width: 670rpx;
height: 8rpx;
background: #EBEBEB;
border-radius: 8rpx 8rpx 8rpx 8rpx;
.bar-inner {
position: absolute;
left: 0;
top: 0;
height: 8rpx;
background: #1677ff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
}
.content {
padding: 0 40rpx;
.item {
padding-top: 40rpx;
.title {
font-size: 32rpx;
color: #000000;
font-weight: 600;
margin-bottom: 40rpx;
}
.sel-label-block {
.label {
display: flex;
align-items: center;
width: 630rpx;
height: 96rpx;
padding-left: 40rpx;
background: #F5F5F5;
margin-bottom: 24rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-size: 28rpx;
color: #000000;
&.sel {
background: #EDF6FF;
color: #1677ff;
}
}
}
}
.btn-wrap {
display: flex;
justify-content: center;
padding-top: 50rpx;
.pre-btn {
width: 316rpx;
height: 76rpx;
line-height: 76rpx;
text-align: center;
background: #F8F8F8;
border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 2rpx solid #EAEAEA;
font-size: 28rpx;
color: #666666;
}
.com-btn {
width: 320rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #1677ff;
margin-left: 20rpx;
border-radius: 60rpx 60rpx 60rpx 60rpx;
font-size: 28rpx;
color: #fff;
}
}
}
}
</style>

View File

@@ -0,0 +1,503 @@
<template>
<view class="title-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback"></view>
<text>职业兴趣测评</text>
</view>
<view class="progress-block">
<view class="row">
<view class="title-index">
{{pageIndex+1}}
</view>
<view class="all-title">
{{allNum}}道题
</view>
<view class="time">
约25分钟
</view>
</view>
<view class="bar">
<view class="bar-inner" :style="{width: rate + '%'}"></view>
</view>
</view>
<view class="content">
<view class="item" v-show="pageIndex == index" v-for="(item, index) in list" :key="index">
<view class="title">{{ item.Title }}</view>
<view class="sel-label-block">
<view class="label" :class="item.Value == 4 ? 'sel' : ''" @click="checkedTitle(4,index)">非常喜欢</view>
<view class="label" :class="item.Value == 3 ? 'sel' : ''" @click="checkedTitle(3,index)">喜欢</view>
<view class="label" :class="item.Value == 2 ? 'sel' : ''" @click="checkedTitle(2,index)">不喜欢</view>
<view class="label" :class="item.Value == 1 ? 'sel' : ''" @click="checkedTitle(1,index)">非常不喜欢</view>
</view>
</view>
<view class="item" v-show="pageIndex == 180">
<view class="title">只能选一种[自我介绍]代表你自己你最想选哪一种</view>
<view class="sel-label-block">
<view class="long-label" :class="item.Value === firstDescVal ? 'sel' : ''" v-for="(item,index) in checkTitleList" :key="index" @click="checkItem(1,item,index)">{{item.Title}}</view>
</view>
</view>
<view class="item" v-show="pageIndex == 181">
<view class="title">让您再选一种[自我介绍]代表你自己你会选哪一种</view>
<view class="sel-label-block">
<view class="long-label" v-show="item.Value != firstDescVal" :class="item.Value === secondDescVal ? 'sel' : ''" v-for="(item,index) in checkTitleList" :key="index" @click="checkItem(2,item,index)">{{item.Title}}</view>
</view>
</view>
<view class="item" v-show="pageIndex == 182">
<view class="title">如果能有选择第三种你会选哪一种</view>
<view class="sel-label-block">
<view class="long-label" v-show="item.Value !== firstDescVal && item.Value !== secondDescVal" :class="item.Value === thirdDescVal? 'sel' : ''" v-for="(item,index) in checkTitleList" :key="index" @click="checkItem(3,item,index)">{{item.Title}}</view>
</view>
</view>
<view class="btn-wrap">
<view class="pre-btn" @click="prePage">上一题</view>
<view class="com-btn" v-show="commit" @click="submitTitle">提交</view>
</view>
</view>
<!-- <u-modal :show="showBakcTip" @confirm="showBakcTip=false" @cancel="goback" confirmText="继续测评" cancelText="放弃测评" :showCancelButton="true">
<view class="slot-content">
<view class="tip-layer">
<view class="title">提示</view>
<view class="desc">确认要放弃测评吗</view>
</view>
</view>
</u-modal> -->
</view>
</template>
<script>
import api from "@/apiCa/testManage.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
list: [],
allNum: 0,//总题目数
pageIndex: 0, //显示页
showBakcTip: false,
lastTapTime: 0 ,// 记录上次点击的时间
checkTitleList: [{
Title: "我有操作机械的能力,倾向自己独立完成工作,避免做些常常与人沟通的事。爱动手操弄,喜欢做和机械、工具、电器、户外有关的工作。我认为自己是勤奋的技术家,期望从事机械、电子、土木建筑、工程技术等工作。",
Checked: false,
Value: 0
},
{
Title: "我有分析推理的能力,倾向自己思考解决问题,胜过在商场或政界发展。喜欢观察、分析、探究和研发的工作,我认为自己是客观的科学家,期望从事物理、生物、化学、医药、数学、地科等相关工作。",
Checked: false,
Value: 1
},
{
Title: "我乐于助人、善解人意并具洞察力,倾向与人接触胜过操作机械仪器,喜欢协助他人增进知识与技能、健全身心健康与信念。我认为自己是教育或心理学家,期望从事教师、咨商辅导、社会救助、健康照护等相关工作。",
Checked: false,
Value: 2
},
{
Title: "我有敏捷文书整理或计算能力,倾向在有清楚规范的环境下工作,胜过创作或研究工作,喜欢有条理的将文书、数字与物品归类管理。我认为自己是谨慎的事务家。期望从事财务、金融、会计、物流管理等工作。",
Checked: false,
Value: 3
},
{
Title: "我有艺术创作的能力,倾向运用想象力,胜过快速计算或物品归类。喜欢藉文字、声音、色彩或形式来表达美感创作。我认为自己是表现美的艺术家,期望从事音乐、写作、戏剧、绘画、设计、舞蹈等工作。",
Checked: false,
Value: 4
},
{
Title: "我有领导、说服他人的能力,倾向在法政与商界工作,胜过基础科学研究。喜欢影响他人,获取相当的报酬。我认为自己是有自信的事业家,期望未来从事管理、销售、司法、从政等工作。",
Checked: false,
Value: 5
}
],
firstDescVal: "", //第一种
secondDescVal: "",//第二种
thirdDescVal: "", //第三种
historyTitle: [],// 历史题目
}
},
computed: {
rate: function() {
let num = 0;
this.list.forEach(item => {
if (item.Value > 0) {
num++
}
});
if(this.firstDescVal !== ''){
num++
}
if(this.secondDescVal !== ''){
num++
}
if(this.thirdDescVal !== ''){
num++
}
return Math.round(num * 100 / this.allNum)
},
commit: function(){
let num = 0;
this.list.forEach(item => {
if (item.Value > 0) {
num++
}
});
if(this.firstDescVal !== ''){
num++
}
if(this.secondDescVal !== ''){
num++
}
if(this.thirdDescVal !== ''){
num++
}
console.log(num);
if(num == this.allNum){
return true;
}else {
return false;
}
}
},
onLoad(e) {
this.getHistoryTitle();
},
methods: {
// 返回
goback(){
uni.showModal({
title: '提示',
content: '确认要放弃测评吗?',
cancelText: '取消',
confirmText: '确认',
confirmColor: '#1677ff',
cancelColor: '#999999',
success: function (res) {
if (res.confirm) {
uni.navigateBack(-1);
} else if (res.cancel) {
}
}
});
//uni.navigateBack(-1);
},
//获取答题记录
getHistoryTitle(){
api.getTestRecordProcessList(11).then(res => {
if (res.Result === 1) {
let data = res.Data;
this.historyTitle = data;
this.getTitle();
}
})
},
// 获取题目
getTitle() {
uni.showLoading({
title: "加载中..."
})
api.queryTestContent(11).then(res => {
uni.hideLoading();
if (res.Result === 1) {
let list = res.Data;
list.forEach(item => {
item.Value = 0
this.historyTitle.forEach(ritem=>{
if(item.Id == ritem.TestTitleId){
item.Value = Number(ritem.TestResult);
}
})
})
if(this.historyTitle.length > 180){
let len = this.historyTitle.length - 180;
for(let i = 0; i < len; i++){
this.checkTitleList[i].Value = this.historyTitle[i + 180];
this.checkTitleList[i].Checked = true;
}
}
if(this.historyTitle.length == 0){
this.pageIndex = 0;
}else if(this.historyTitle.length == list.length){
this.pageIndex = list.length - 1;
}else {
this.pageIndex = this.historyTitle.length;
}
this.allNum = list.length + 3;
this.list = list;
}
})
},
// 上一页
prePage() {
if (this.pageIndex == 0) {
return
}
this.pageIndex--
},
//选中题目
checkedTitle(NUM,INDEX){
const now = Date.now();
if (now - this.lastTapTime < 500) {
return;
} else {
// 处理单击事件
this.lastTapTime = now;
this.list[INDEX].Value = NUM;
this.saveTestRecordProcess(this.list[INDEX].Id,NUM);
setTimeout(()=>{
if(this.pageIndex != this.allNum - 1){
this.pageIndex = INDEX + 1;
}
},400)
}
},
// 选中题目
checkItem(TYPE,ITEM,INDEX) {
switch(TYPE){
case 1: {
this.checkTitleList.forEach(item=>{
item.Checked = false;
})
this.checkTitleList[INDEX].Checked = true;
this.firstDescVal = ITEM.Value;
this.secondDescVal = "";
this.thirdDescVal = "";
this.saveTestRecordProcess(181,ITEM.Value);
break;
}
case 2: {
this.checkTitleList.forEach(item=>{
if(item.Value != this.firstDescVal){
item.Checked = false;
}
})
this.checkTitleList[INDEX].Checked = true;
this.secondDescVal = ITEM.Value;
this.thirdDescVal = "";
this.saveTestRecordProcess(182,ITEM.Value);
break;
}
case 3: {
this.checkTitleList[INDEX].Checked = true;
this.thirdDescVal = ITEM.Value;
this.saveTestRecordProcess(183,ITEM.Value);
break;
}
}
setTimeout(()=>{
if(this.pageIndex != this.allNum - 1){
this.pageIndex = 180 + TYPE;
}
},400)
},
//存储答题记录
saveTestRecordProcess(ID,VALUE){
let data = {
testType: 11,
testTitleId: ID,
testResult: VALUE
}
api.saveTestRecordProcess(data).then(res => {
if (res.Result === 1) {
}
})
},
// 提交题目
submitTitle() {
// uni.showToast({
// title: "请选择三个特质描述",
// icon: "none"
// })
// return;
let testStr = "";
this.list.forEach(item => {
testStr += `${item.Id}|${item.Value - 1},`
});
testStr += `181|${this.firstDescVal},182|${this.secondDescVal},183|${this.thirdDescVal}`
uni.showLoading({
title: "提交中"
})
let data = {testStr}
api.removeTestRecordProcess(11).then((res) => {
return api.saveInterestTestResult(data);
}).then((res) => {
uni.hideLoading();
if (res.Result === 1) {
uni.showToast({
title: "提交成功",
icon: "success"
})
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 上一页
beforePage.data.refreshIfNeeded = true;
setTimeout(()=>{
uni.redirectTo({
url: `/packageCa/testReport/interestTestReport`
})
},1000)
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 32rpx;
color: #666666;
margin-bottom: 20rpx;
text-align: center;
&:last-child {
margin-bottom: 0;
}
}
}
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
margin-bottom: 30rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.title-wrap {
background: #fff;
.progress-block {
padding: 0 40rpx;
.row {
position: relative;
display: flex;
align-items: flex-end;
height: 40rpx;
margin-bottom: 20rpx;
.title-index {
font-size: 28rpx;
color: #1677ff;
}
.all-title {
font-size: 24rpx;
color: #999999;
margin-left: 10rpx;
}
.time {
position: absolute;
right: 0;
top: 0;
font-size: 24rpx;
color: #20B664;
}
}
.bar {
position: relative;
width: 670rpx;
height: 8rpx;
background: #EBEBEB;
border-radius: 8rpx 8rpx 8rpx 8rpx;
.bar-inner {
position: absolute;
left: 0;
top: 0;
height: 8rpx;
background: #1677ff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
}
.content {
padding: 0 40rpx 120rpx;
.item {
padding-top: 40rpx;
.title {
font-size: 32rpx;
color: #000000;
font-weight: 600;
margin-bottom: 40rpx;
}
.sel-label-block {
.label {
display: flex;
align-items: center;
width: 630rpx;
height: 96rpx;
padding-left: 40rpx;
background: #F5F5F5;
margin-bottom: 24rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-size: 28rpx;
color: #000000;
&.sel {
background: #EDF6FF;
color: #1677ff;
}
}
.long-label {
align-items: center;
width: 610rpx;
padding: 20rpx 30rpx;
background: #F5F5F5;
margin-bottom: 24rpx;
line-height: 40rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-size: 28rpx;
color: #000000;
&.sel {
background: #EDF6FF;
color: #1677ff;
}
}
}
}
.btn-wrap {
display: flex;
justify-content: center;
padding-top: 50rpx;
.pre-btn {
width: 316rpx;
height: 76rpx;
line-height: 76rpx;
text-align: center;
background: #F8F8F8;
border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 2rpx solid #EAEAEA;
font-size: 28rpx;
color: #666666;
}
.com-btn {
width: 320rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #1677ff;
margin-left: 20rpx;
border-radius: 60rpx 60rpx 60rpx 60rpx;
font-size: 28rpx;
color: #fff;
}
}
}
}
</style>

View File

@@ -0,0 +1,419 @@
<template>
<view class="title-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback()"></view>
<text>人格测评</text>
</view>
<view class="progress-block">
<view class="row">
<view class="title-index">
{{pageIndex+1}}
</view>
<view class="all-title">
{{allNum}}道题
</view>
<view class="time">
约20分钟
</view>
</view>
<view class="bar">
<view class="bar-inner" :style="{width: rate + '%'}"></view>
</view>
</view>
<view class="content">
<view class="item" v-show="pageIndex == index" v-for="(item, index) in list" :key="index">
<view class="title">{{ item.Title }}</view>
<view class="sel-label-block">
<view class="label" :class="item.Value == 4 ? 'sel' : ''" @click="checkedTitle(4,index)">非常符合</view>
<view class="label" :class="item.Value == 3 ? 'sel' : ''" @click="checkedTitle(3,index)">基本符合</view>
<view class="label" :class="item.Value == 2 ? 'sel' : ''" @click="checkedTitle(2,index)">基本不符合</view>
<view class="label" :class="item.Value == 1 ? 'sel' : ''" @click="checkedTitle(1,index)">完全不符合</view>
</view>
</view>
<view class="btn-wrap">
<view class="pre-btn" @click="prePage">上一题</view>
<view class="com-btn" v-show="commit" @click="submitTitle">提交</view>
</view>
</view>
<!-- <u-modal :show="showBakcTip" @confirm="showBakcTip=false" @cancel="goback" confirmText="继续测评" cancelText="放弃测评" :showCancelButton="true">
<view class="slot-content">
<view class="tip-layer">
<view class="title">提示</view>
<view class="desc">确认要放弃测评吗</view>
</view>
</view>
</u-modal> -->
</view>
</template>
<script>
import api from "@/apiCa/testManage.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
list: [],
allNum: 0,//总题目数
pageIndex: 0, //显示页
showBakcTip: false,
lastTapTime: 0 ,// 记录上次点击的时间
historyTitle: [],// 历史题目
}
},
computed: {
rate: function() {
let num = 0;
this.list.forEach(item => {
if (item.Value > 0) {
num++
}
});
return Math.round(num * 100 / this.allNum)
},
commit: function(){
let num = 0;
this.list.forEach(item => {
if (item.Value > 0) {
num++
}
});
if(num == this.list.length){
return true;
}else {
return false;
}
}
},
created() {
this.getHistoryTitle();
},
methods: {
// 返回
goback(){
uni.showModal({
title: '提示',
content: '确认要放弃测评吗?',
cancelText: '取消',
confirmText: '确认',
confirmColor: '#1677ff',
cancelColor: '#999999',
success: function (res) {
if (res.confirm) {
uni.navigateBack(-1);
} else if (res.cancel) {
}
}
});
//uni.navigateBack(-1);
},
//获取答题记录
getHistoryTitle(){
api.getTestRecordProcessList(15).then(res => {
if (res.Result === 1) {
let data = res.Data;
this.historyTitle = data;
this.getTitle();
}
})
},
// 获取题目
getTitle() {
uni.showLoading({
title: "加载中..."
})
api.queryTestContent(15).then(res => {
uni.hideLoading();
if (res.Result === 1) {
let list = res.Data.List;
list.forEach(item => {
item.Value = 0
this.historyTitle.forEach(ritem=>{
if(item.TitleId == ritem.TestTitleId){
switch (ritem.TestResult) {
case "A": {
item.Value = 4;
break;
}
case "B": {
item.Value = 3;
break;
}
case "C": {
item.Value = 2;
break;
}
case "D": {
item.Value = 1;
break;
}
}
}
})
})
if(this.historyTitle.length == 0){
this.pageIndex = 0;
}else if(this.historyTitle.length == list.length){
this.pageIndex = list.length - 1;
}else {
this.pageIndex = this.historyTitle.length;
}
this.allNum = list.length;
this.list = list;
}
})
},
// 上一页
prePage() {
if (this.pageIndex == 0) {
return
}
this.pageIndex--
},
//选中题目
checkedTitle(NUM,INDEX){
const now = Date.now();
if (now - this.lastTapTime < 500) {
return;
} else {
// 处理单击事件
this.lastTapTime = now;
this.list[INDEX].Value = NUM;
this.saveTestRecordProcess(this.list[INDEX].TitleId,NUM);
setTimeout(()=>{
if(this.pageIndex != this.list.length - 1){
this.pageIndex = INDEX + 1;
}
},400)
}
},
//存储答题记录
saveTestRecordProcess(ID,VALUE){
let val = ""
switch (VALUE) {
case 4: {
val = "A";
break;
}
case 3: {
val = "B";
break;
}
case 2: {
val = "C";
break;
}
case 1: {
val = "D";
break;
}
}
let data = {
testType: 15,
testTitleId: ID,
testResult: val
}
api.saveTestRecordProcess(data).then(res => {
if (res.Result === 1) {
}
})
},
// 提交题目
submitTitle() {
let testStr = "";
this.list.forEach(item => {
switch (item.Value) {
case 4: {
testStr += `${item.TitleId}|A,`
break;
}
case 3: {
testStr += `${item.TitleId}|B,`
break;
}
case 2: {
testStr += `${item.TitleId}|C,`
break;
}
case 1: {
testStr += `${item.TitleId}|D,`
break;
}
}
});
uni.showLoading({
title: "提交中"
})
let data = {
testStr,
testType: 15
}
api.removeTestRecordProcess(15).then((res) => {
return api.saveCharacterTestResult(data);
}).then((res) => {
uni.hideLoading();
if (res.Result === 1) {
uni.showToast({
title: "提交成功",
icon: "success"
})
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 上一页
beforePage.data.refreshIfNeeded = true;
setTimeout(()=>{
uni.redirectTo({
url: `/packageCa/testReport/personalTestReport?year=${res.Data.Year}`
})
},1000)
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 32rpx;
color: #666666;
margin-bottom: 20rpx;
text-align: center;
&:last-child {
margin-bottom: 0;
}
}
}
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
margin-bottom: 30rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.title-wrap {
background: #fff;
.progress-block {
padding: 0 40rpx;
.row {
position: relative;
display: flex;
align-items: flex-end;
height: 40rpx;
margin-bottom: 20rpx;
.title-index {
font-size: 28rpx;
color: #1677ff;
}
.all-title {
font-size: 24rpx;
color: #999999;
margin-left: 10rpx;
}
.time {
position: absolute;
right: 0;
top: 0;
font-size: 24rpx;
color: #20B664;
}
}
.bar {
position: relative;
width: 670rpx;
height: 8rpx;
background: #EBEBEB;
border-radius: 8rpx 8rpx 8rpx 8rpx;
.bar-inner {
position: absolute;
left: 0;
top: 0;
height: 8rpx;
background: #1677ff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
}
.content {
padding: 0 40rpx;
.item {
padding-top: 40rpx;
.title {
font-size: 32rpx;
color: #000000;
font-weight: 600;
margin-bottom: 40rpx;
}
.sel-label-block {
.label {
display: flex;
align-items: center;
width: 630rpx;
height: 96rpx;
padding-left: 40rpx;
background: #f5f5f5;
margin-bottom: 24rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-size: 28rpx;
color: #000000;
&.sel {
background: #EDF6FF;
color: #1677ff;
}
}
}
}
.btn-wrap {
display: flex;
justify-content: center;
padding-top: 50rpx;
.pre-btn {
width: 316rpx;
height: 76rpx;
line-height: 76rpx;
text-align: center;
background: #F8F8F8;
border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 2rpx solid #EAEAEA;
font-size: 28rpx;
color: #666666;
}
.com-btn {
width: 320rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #1677ff;
margin-left: 20rpx;
border-radius: 60rpx 60rpx 60rpx 60rpx;
font-size: 28rpx;
color: #fff;
}
}
}
}
</style>

View File

@@ -0,0 +1,942 @@
<template>
<view class="test-list-wrap" style="display:block;">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback"></view>
<text>生涯测评</text>
</view>
<view class="contrast-box" >
<view class="desc">
<text class="icon"></text>
<view class="txt-item">
<text v-for="(item,index) in selectTypeStr" :key="index">{{item}}</text>
</view>
</view>
<view class="btn" @click="showContrastLayer">
筛选
</view>
</view>
<view class="content" style="overflow:hidden;">
<view class="p-item" v-for="(pitem,pindex) in filteredData" :key="pindex">
<view class="h1">{{pitem.title}}</view>
<view class="item" v-for="(item,index) in pitem.list" :key="index">
<view class="h2">{{item.TestName}}</view>
<view class="do-time">
{{item.AvgTime == 0 ? '1' : item.AvgTime}}分钟
</view>
<view class="desc">
{{item.Brief}}
</view>
<view class="btn-wrap">
<view class="btn" v-if="item.HasTest" @click="navTest(item,1)">
重新测评
</view>
<view class="btn" v-else @click="navTest(item,1)">
开始测评
</view>
<view class="btn" v-if="item.HasTestRecordProcess && item.Type != 25" @click="navTest(item,2)">
继续测评
</view>
<view class="report-btn" v-if="item.HasTest" @click="navReport(item)">
查看报告
</view>
</view>
</view>
</view>
</view>
<!-- 筛选 -->
<uni-popup ref="pop_card" type="bottom">
<view class="search-content">
<view class="head-title">
<text>筛选</text>
<view @click="closeDialog()" class="s_close"></view>
</view>
<view class="item-content">
<view class="title">测评等级</view>
<view class="options">
<view class="item" v-for="(item,index) in levelOption" :class="checkedTestLevel==item.value?'on':''" @click="checkedTestLevel = item.value" :key="index">{{item.name}}</view>
</view>
<view class="title">测评类型</view>
<view class="options">
<view class="item" v-for="(item,index) in typeOption" :class="checkedTestType==item.value?'on':''" @click="checkedTestType = item.value" :key="index">{{item.name}}</view>
</view>
<view class="title">测评功能</view>
<view class="options">
<view class="item" v-for="(item,index) in fnOption" :class="checkedTestFun==item.value?'on':''" @click="checkedTestFun = item.value" :key="index">{{item.name}}</view>
</view>
</view>
<view class="btn-wrap">
<view class="btn" v-on:click="confirmCompute">
确认筛选
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import api from "@/apiCa/testManage.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
refreshIfNeeded: false, //是否返回刷新
dataList: [],
selectTypeStr: ["全部"],
showContrast: false,//显示筛选
levelOption: [
{
name: "全部",
value: 0
},
{
name: "基础型",
value: 1
},
{
name: "进阶型",
value: 2
},
{
name: "专项型",
value: 3
},
],
typeOption: [
{
name: "全部",
value: 0
},
{
name: "生涯类",
value: 1
},
{
name: "学习力类",
value: 2
},
{
name: "心理健康类",
value: 3
},
{
name: "其他",
value: 4
},
],
fnOption: [
{
name: "全部",
value: 0
},
{
name: "情感态度",
value: 1
},
{
name: "智力能力",
value: 2
},
{
name: "认知学习",
value: 3
},
{
name: "人格特质",
value: 4
},
{
name: "心理健康",
value: 5
}
],
testLevel:0 ,// 测评等级
testType: 0,// 测评类型
testFun: 0,// 测评功能
checkedTestLevel: 0,// 测评等级
checkedTestType: 0,// 测评类型
checkedTestFun: 0,// 测评功能
testList1: [], //情感
testList2: [], //智力
testList3: [], //认知学习
testList4: [], //人格特质
testList5: [], //心理健康
testList6: [], //其他测评
filteredData: [],//筛选后数据
}
},
onShow() {
this.queryTaskListForWeChart();
},
methods: {
closeDialog(){
this.$refs.pop_card.close();
},
//确认筛选
confirmCompute(){
this.testLevel = this.checkedTestLevel;
this.testType = this.checkedTestType;
this.testFun = this.checkedTestFun;
if(this.checkedTestLevel == 0 && this.checkedTestType == 0 && this.checkedTestFun == 0){
this.selectTypeStr = ["全部"];
}else {
let arr = [];
if(this.checkedTestLevel != 0){
arr.push(this.levelOption[this.checkedTestLevel].name);
}
if(this.checkedTestType != 0){
arr.push(this.typeOption[this.checkedTestType].name);
}
if(this.checkedTestFun != 0){
arr.push(this.fnOption[this.checkedTestFun].name);
}
this.selectTypeStr = arr;
}
this.filteredData = this.dataList.map(category => {
const filteredList = category.list.filter(item => {
// 处理TestLevel筛选
const levelMatch = this.testLevel === 0 || item.TestLevel === this.testLevel;
// 处理TestType特殊映射其他类对应TestType=0
const typeMatch = this.testType === 0 ? true :
this.testType === 4 ? item.TestType === 0 :
item.TestType === this.testType;
// 处理TestFun筛选
const funMatch = this.testFun === 0 || item.TestFun === this.testFun;
return levelMatch && typeMatch && funMatch;
});
return { ...category, list: filteredList };
}).filter(category => category.list.length > 0); // 过滤空分组
//this.showContrast = false;
this.$refs.pop_card.close();
},
// 显示筛选列表
showContrastLayer(){
//this.showContrast = true;
this.$refs.pop_card.open('bottom') //底部弹出
this.checkedTestLevel = this.testLevel;
this.checkedTestType = this.testType;
this.checkedTestFun = this.testFun;
},
// 返回
goback(){
uni.navigateBack(-1);
},
//获取列表
queryTaskListForWeChart() {
uni.showLoading({
title: "加载中"
})
let eduLevel = uni.getStorageSync("CAuserInfo").user.GradeLevel;
new Promise((resolve,reject)=>{
return api.getTestTypeTagLIst().then((res)=>{
resolve(res)
})
}).then((res)=>{
let arr = [];
res.Data.forEach(item=>{
return arr.push(item.Type);
})
return api.getUserTestTypeProcessList(JSON.stringify(arr)).then((res1)=>{
return [res, res1];
})
}).then(([res1, res2]) => {
if (res1.Result === 1 && res2.Result === 1) {
return api.queryTaskListForWeChart(eduLevel).then((res) => {
return [res, res1, res2];
});
}
}).then(([res, res1, res2]) => {
uni.hideLoading();
if (res && res.Result === 1) {
this.testList1 = [];
this.testList2 = [];
this.testList3 = [];
this.testList4 = [];
this.testList5 = [];
this.testList6 = [];
let list = res.Data.TestList;
list.forEach(item=>{
// 处理答题记录匹配
item.HasTestRecordProcess = false;
res2.Data.forEach(ritem=>{
if(item.TestType == ritem.TestType){
item.HasTestRecordProcess = ritem.HasTestRecordProcess;
}
})
})
let num = 0;
let arr = [];
let arr1 = [];
list.forEach(item=>{
if(item.HasTest){
num++
}
let isMatch = false;
// 处理测评分类匹配
res1.Data.forEach((yitem, yindex) => {
if (item.TestType == yitem.Type) {
item.Type = item.TestType;
item.TestType = yitem.TestType;
item.TestLevel = yitem.TestLevel;
item.TestFun = yitem.TestFun;
arr.push(item);
isMatch = true;
}
})
if (!isMatch) {
item.Type = item.TestType;
item.TestType = 0;
item.TestLevel = 0;
item.TestFun = 0;
arr1.push(item);
}
})
this.testList6 = arr1;
this.testList = list;
arr.forEach((item, index) => {
switch (item.Type) {
// 1 情感态度
// 高中大学职业兴趣11
// 工作价值观17
// 学习动机测评-33
// 自我效能感测评-34
// 小学兴趣测评-31
//初中兴趣测评18
case 11:
case 17:
// case 18:
// case -31:
// case -33:
// case -34:
{
this.testList1.push(item);
// this.interestList.push(item);
break;
}
// 2 智力能力
// 注意力22
// 记忆力23
// 多元智能16
// 小学多元智能 -32
// 多元性向潜能发展6
// 推理能力测评-45
// 批判性思维倾向测评-38
// 创造力倾向测评-37
// 多元(职业)能力测评-27
// 通用(职业)能力测评-28
// case 22:
// case 23:
// case 16:
// case 6:
// case -32:
// case -45:
// case -38:
// case -37:
case -27:
case -28: {
this.testList2.push(item);
break;
}
// 3认知学习
// 学科信心-2
// 学科能力测评20
// 学科自评-9999
// 学习习惯-36
// 领导力测评-29
// 生涯建构测评-42
// 生涯适应力测评-43
// 意志力测评 -35
// 场独立-场依存认知风格测评 25
// 沉思型-冲动型认知风格测评 26
// 儿童元认知测评 -39
// 元认知测评 -40
// 学习资源管理能力测评 -41
// 问题解决能力测评-44
// case -2:
// case 20:
// case -9999:
// case -36:
// case -29:
// case -42:
// case -43:
// case -35:
// case 25:
// case 26:
// case -39:
// case -40:
// case -41:
// case -44:
// {
// this.testList3.push(item);
// // this.workValueList.push(item);
// break;
// }
// 4.人格特质
// MBTI 4
// 人格测评15
// case 4:
case 15: {
this.testList4.push(item);
break;
}
// 5.心理健康
// SCL-90
// case -10: {
// this.testList5.push(item);
// break;
// }
}
})
let allList = [];
if(this.testList1.length>0){
allList.push({title: '情感态度', list: this.testList1});
}
if(this.testList2.length>0){
allList.push({title: '智力能力', list: this.testList2});
}
if(this.testList3.length>0){
allList.push({title: '认知学习', list: this.testList3});
}
if(this.testList4.length>0){
allList.push({title: '人格特质', list: this.testList4});
}
// if(this.testList5.length>0){
// allList.push({title: '心理健康', list: this.testList5});
// }
// if(this.testList6.length>0){
// allList.push({title: '其他测评', list: this.testList6});
// }
this.dataList = allList;
this.confirmCompute();
}
}).catch((error) => {
console.error('请求出错:', error);
});
},
routerUrl(TYPE){
switch (TYPE) {
case 11: {
// 高中兴趣测评
uni.navigateTo({
url: "/packageCa/pagesTest/interestTestTitle"
})
break;
}
case 15: {
// 人格测评
uni.navigateTo({
url: "/packageCa/pagesTest/personalTestTitle"
})
break;
}
case 17: {
// 工作价值观测评
uni.navigateTo({
url: "/packageCa/pagesTest/workValuesTestTitle"
})
break;
}
case -27: {
// 多元能力
uni.navigateTo({
url: "/packageCa/pagesTest/customTestTitle?testType=-27"
})
break;
}
case -28: {
// 通用职业
uni.navigateTo({
url: "/packageCa/pagesTest/customTestTitle?testType=-28"
})
break;
}
}
},
navTest(item,index) {
if(index == 1){
uni.showLoading({
title: "加载中..."
})
api.removeTestRecordProcess(item.Type).then((res) => {
if (res.Result == 1) {
uni.hideLoading();
this.routerUrl(item.Type)
}
})
}else {
this.routerUrl(item.Type)
}
},
navReport(item) {
switch (item.Type) {
case 11: {
// 兴趣测评
uni.navigateTo({
url: `/packageCa/testReport/interestTestReport`
})
break;
}
case 15: {
// 人格测评
uni.navigateTo({
url: `/packageCa/testReport/personalTestReport`
})
break;
}
case 17: {
// 工作价值观测评
uni.navigateTo({
url: `/packageCa/testReport/workValuesTestReport`
})
break;
}
case -27: {
// 多元能力
uni.navigateTo({
url: `/packageCa/testReport/multipleAbilityTestReport?id=${item.RecordId}`
})
break;
}
case -28: {
// 通用职业
uni.navigateTo({
url: `/packageCa/testReport/generalCareerTestReport?id=${item.RecordId}`
})
break;
}
}
},
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: url('#{$image-oss-url}/18.png') no-repeat;
background-size: contain;
overflow-y:scroll;
background-color:#f5f5f5;
}
</style>
<style lang="scss" scoped>
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
margin-bottom: 40rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.progress-box {
display: flex;
align-items: center;
margin-bottom: 36rpx;
.progress-txt {
display: flex;
align-items: center;
font-size: 24rpx;
width: 175rpx;
color: #333333;
margin-right: 20rpx;
.strong {
font-size: 32rpx;
color: #20B664;
font-weight: 600;
margin-left: 6rpx;
}
}
.progress-bar {
width: 500rpx;
height: 24rpx;
background: #F8F8F8;
border-radius: 20rpx 20rpx 20rpx 20rpx;
.progress {
position: relative;
background-image: repeating-linear-gradient(-45deg, #20B664, #20B664 20rpx, #47C580 20rpx, #47C580 30rpx);
height: 24rpx;
border-radius: 20rpx;
transition: width 1s ease-in-out;
&::after {
display: block;
content: "";
position: absolute;
right: -20rpx;
top: -8rpx;
width: 40rpx;
height: 40rpx;
background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAA2FBMVEUAAAA60X84z4A60YE50X850n860H860IA6z4A4z4A60X850IA50X84z4Awz4D///860X8iv2khu2ciwmskyW8guWUlzHEky3Ajx20hvWglznEl0HMm0nQjxWwm1HUgt2Q3z3zk+O112KK67dGR47Yu03kyznktzXYuyHQz0nsvxXIqwm/I8NoqyHInv2ys6Mc9yHwr0Xbx+/Wt7Mpa15NZ0ZBO1os/0IEyynfI8tyD3Ktn1Jjx/PbW8+Of5b6E4q9LzYZA1oVLyYTW9eSf6cGf5r+C2qpp35/QM//cAAAAD3RSTlMA70B/37+vn2Agz7+PYBCLRPBlAAACh0lEQVQ4y6XV2XqqMBAAYKKI1i2DgNZWK6AHEHetS7X72d7/jc4kGBJFvTlzARf833yTySRo55HLV8oEgOhGNVdXP2RlEZ0MUsxdpSUdgRuEi8fHx05nMRwCQOEyvzNQhs1m8wGD887TD8bvLqQlSFutVhNDasZJ7dzmAYKmbaPmWOonLCafseG9jZHJjcmFlnZyf6/oh+u6hraL+EbuUtoHAlG3i/pGbiJ6UoDAsjIa+dfz36/hcZVGYnMAlpXVmxVl8ZLkFoUUILIyetunSXii37pMfKY3HhVxrBsgh7gIkWmmejsbD2zbp2l46c4XNa1OwDRTPeDf+XP18cJe/WNPFkBYFYEp9HwsMw5areAV379EB4dYRxWi9lH7HpXxjKv8ie+N6PcQt9GAUTvRPlVjZdtb1rl0LxdQ0XQw24nu05MYsz6/btK9XEBZI9BuNLieUbr0lvQkPuScdHCFAA3ETMf+Ghd5kn+gzgkAw1yLVc5Uq84gwwSxqt8VvLW5FphoZZg6nDM9f5vPFdxXZhCxrlUQOyL3mI7NwUmzZe4QDDxRsSP0H/zum/ulLFqZ7wCquN07R+j4e0aXezNeH2bHzMp8u7jdbIVcc+6h8D4ta83tb/U0AKmzER31hPZpf8wqsT6Z9aKu1CEU+fC7PaG//fbBm2MH9wyv1bPDhh9Dx9RpbmVO3tWzE0IhueXAbUiNPMFvJyeNJeZhQNQ7yx0ffKRSB1CQl8zoXGMoOpSXDBYC01t6AlBTL0ZXaoxTPclco9criaSVeudc0t2dsErUCLgjJ6MnLpDShR9QAcCNHbVuCykYd5f/gshhF0/bjE5HUQAAeun/fpoy6rmqoRN05Uo+I/8B7R+IPTrIPJ8AAAAASUVORK5CYII=');
background-size: 100%;
}
}
}
}
.test-list-wrap {
padding: 0 20rpx 130rpx;
.content {
.p-item {
.h1 {
display: flex;
align-items: center;
margin-bottom: 24rpx;
font-weight: 600;
font-size: 28rpx;
color: #333333;
&:before {
content: "";
display: block;
width: 8rpx;
height: 28rpx;
margin-right: 6rpx;
background: #1677ff;
border-radius: 4rpx 4rpx 4rpx 4rpx;
}
}
}
.item {
position: relative;
padding: 40rpx 20rpx;
background: #fff;
height: 224rpx;
border-radius: 12rpx;
margin-bottom: 25rpx;
/*background: #F2F9FF;*/
background:#fff;
// border: 2rpx solid #E7F4FD;
border: 2rpx solid #fff;
overflow: hidden;
&:nth-child(2n-1) {
&::after {
content: "";
position: absolute;
right: -110rpx;
bottom: -60rpx;
display: block;
width: 118rpx;
height: 118rpx;
border-radius: 50%;
border: 34rpx solid rgba(189, 226, 255, 0.5);
}
&::before {
content: "";
position: absolute;
right: 55rpx;
bottom: 106rpx;
display: block;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: rgba(189, 226, 255, 0.5);
}
}
&:nth-child(2n) {
/*background: #F7F7FF;*/
background: #fff;
border: 2rpx solid #FFF;
&::before {
content: "";
position: absolute;
right: -65rpx;
bottom: 75rpx;
display: block;
width: 102rpx;
height: 102rpx;
border-radius: 24rpx;
transform: rotateZ(45deg) skew(-20deg, -20deg);
background: rgba(205, 217, 255, 0.4);
z-index: 9;
}
&::after {
content: "";
position: absolute;
right: -72rpx;
bottom: 10rpx;
display: block;
width: 128rpx;
height: 128rpx;
border-radius: 33rpx;
transform: rotateZ(45deg) skew(-20deg, -20deg);
background: rgba(205, 217, 255, 0.2);
// background: #3F51B5;
}
}
.h2 {
font-size: 36rpx;
color: #333;
margin-bottom: 20rpx;
}
.do-time {
position: absolute;
right: 20rpx;
top: 40rpx;
display: flex;
align-items: center;
font-size: 24rpx;
color: #20B664;
&:before {
content: "";
display: block;
width: 24rpx;
height: 24rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAIASURBVEiJ3ZaxctNAEIa/tQ5oU1Ieb5A3wJlUNsPEGR4gChE18Qy9cc+MQ6+AeIAMYZjYFRPzBrwBV6Z0yRDZS3GykayTYTyh4a+ku93/313d3koowU5iC4Cah2wDyW8AXCdzq6UV+Tg5BUZbEdfRd930DKB1R4SNkPKLncRWMfuipACodhCZbWRQ3UFkAqDwSiS/CJaoLIKa74X3oeueX27it5+TNhHXni1/VCaHQIkKg2+F/MHG6AGilc10nRzANLhNgV2UNixPVzSomsyH/GCGEiOAMA0RhQUkf4uaUxBrr57HII9Rias2EdzXrwg7fiH/EKRqyAA7fvERtAfqkPleMAONrkEsMHXddO/vMwCQ2z5qep7AHLlOelwNIBkB1msxbKRpFADsJBmgvPaWmi0WrYuWiEHmB6WSnblu2t9KAMBenbxH1uq/hGrmnpwfB/cK/PNO3ihgx8loFb1oBnq4UHnqnwGR2E6SQSMBm05RuUMDda5+n3oH/zmDiCIydaGP6DrpENST6r3GWzgoUMyFtnfWxiP4e097q1myhoY+MEfejxk/F5dNzq7zLrPjkwGIRc1LoJZpWKC4gxAyHpgYDQ8iO076iE5RYpYZr6FWokp55nwKBlANZmmzG8q0PnDUPBN4452LgSNac/T74ioDR0iE/Mt/PpOBO/1t+QUcj9NlQhj6vwAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
}
.desc {
font-size: 26rpx;
color: #666666;
}
.btn-wrap {
position: absolute;
bottom: 40rpx;
left: 20rpx;
display: flex;
align-items: center;
.btn {
width: 200rpx;
height: 64rpx;
line-height: 64rpx;
background: #1677ff;
margin-right: 20rpx;
color: #fff;
font-size: 28rpx;
text-align: center;
border-radius: 60rpx;
}
.report-btn {
width: 200rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 60rpx;
border: 2rpx solid #1677ff;
font-size: 28rpx;
color: #1677ff;
}
}
}
}
}
.contrast-box {
display: flex;
align-items: center;
justify-content: space-between;
width: 666rpx;
height: 76rpx;
margin-bottom: 20rpx;
padding: 0 20rpx;
background: #E7F1FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #FFFFFF;
.desc {
display: flex;
align-items: center;
.icon {
width: 28rpx;
height: 28rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHfSURBVEiJ1Va9btswEP5OlBNr01JAMgpUeYNm7FDAeoP2Ddq1UzK5Roc6Q6AoS7auzps4QDt0i4fu1lYVWThFP7Z4HSIpspC4cCMmyLeQR+nu4/GOvAOeAwYn+dQ9zWf/o0vtBSdIvE0KBpkvmfg7AKyY3i5T85eckLzRZS/NICvZnrBdze8kdMN8AWAj4V1gVfgkxFcwhqX8EcAFGeISYPl7tLtXb7jl2dZkJTww7FoyzFelLRsgzwm4tmu0NbcBMz6tVtiPx9Z5kvR8VoXPqvDjUe+oUKI+yjRDPa+P1AkSjwyx2IZQAW/+jHZ+3vd9EGbvlFIyHlsX1dqDPPznhpSSTU+1EjpBMiRDzEwTM3vCdXy1eljC7u/eJpSpiyXN+nPLyiMAiMcUaSeUE5IS2Guvaz1SN1yeuWF+9iiETpAMAT4AcNDZxd+E+y6+NsKrLztzYpwD6rD5gGtLGgC4TnuH7WqhM4aeZS0XbpitPZc6s9RD19ViE54macDvWRV+M47Pq1oQY7/qgZwg8ZwgGb44zl+XcvfVggjfSIgpAJAQ05Lg0gmSD43f1qpFTRiPrQhAtDWputGpxgpp1p8DHAEcNavFg9vEq8+9H7e6621iZ3BP89ngJJ92alQX/gLMKt2XTOFMygAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
.txt-item {
width: 400rpx;
line-height: 21px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-left: 20rpx;
text {
display: inline-block;
line-height: 50rpx;
font-size: 24rpx;
color: #1677ff;
margin-left: 16rpx;
&::after {
content: "";
display: inline-block;
width: 2rpx;
height: 12rpx;
margin-left: 16rpx;
background: #1677ff;
}
}
}
}
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 120rpx;
height: 48rpx;
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
font-size: 24rpx;
color: #333333;
&::after {
content: "";
display: block;
width: 0;
height: 0;
margin-left: 6rpx;
border-top: 12rpx solid #333;
border-left: 12rpx solid #fff;
border-right: 12rpx solid #fff;
}
}
}
.search-content {
width: 100%;
background: #fff;
border-top-left-radius: 28rpx;
border-top-right-radius: 28rpx;
overflow: hidden;
.head-title {
width: 100%;
height: 96rpx;
line-height: 96rpx;
text-align: center;
font-size: 36rpx;
color: #333;
font-weight:550;
margin-top:10rpx;
position:relative;
}
.item-content {
padding: 0 0 0 30rpx;
.s-line {
position: relative;
width: 630rpx;
margin: 15rpx auto 45rpx;
height: 2rpx;
background: #FAFAFA;
&:before {
content: "";
display: block;
position: absolute;
left: -85rpx;
top: -16rpx;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #EEF1F8;
}
&::after {
content: "";
display: block;
position: absolute;
right: -58rpx;
top: -16rpx;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #EEF1F8;
}
}
.title {
font-size: 28rpx;
color: #333333;
padding: 30rpx 0 20rpx;
}
.options {
display: flex;
flex-wrap: wrap;
.v-line {
border-bottom: 1px dotted #f1ececb8;
margin: 26rpx 0;
}
.item {
position: relative;
min-width: 170rpx;
margin-right: 30rpx;
height: 76rpx;
text-align: center;
line-height: 76rpx;
background: #F5F5F5;
margin-bottom: 30rpx;
padding: 0 20rpx;
border-radius: 12rpx;
font-size: 28rpx;
color: #333333;
&.disable {
color: #C6C6C6;
background: #F8F8F8;
}
&.on {
background: #E7F1FF;
color: #1677ff;
}
}
}
}
.btn-wrap {
display: flex;
justify-content: center;
padding-top: 10rpx;
padding-bottom: 40rpx;
.btn {
width: 688rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #1677ff;
font-size: 32rpx;
color: #fff;
border-radius: 60rpx;
}
}
}
.s_close{position:absolute;top:30rpx;right:6%;width:30rpx;height:30rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAYAAAAFQMh/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjkzQkY4QkFCMjY0MTFGMDlGOThGMzcyM0VCRTJGMkYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjkzQkY4QkJCMjY0MTFGMDlGOThGMzcyM0VCRTJGMkYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGOTNCRjhCOEIyNjQxMUYwOUY5OEYzNzIzRUJFMkYyRiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGOTNCRjhCOUIyNjQxMUYwOUY5OEYzNzIzRUJFMkYyRiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvssjGYAAAO/SURBVHjatJf7a5V1HMef5bN2tduObjp1hMlOTbCpaKTifpI0b1EKXgo0U4Lw/0j8ZSoohkpFKjLvUYrWREX8Qa0oQaw5O7Yzt45jbW7u4nZ8f+R14MvDOdtz9PSB13jOs+37/n6u3+/Ji0aj2zzPaxenxF9i2Mu9lYo66BG/+foxT3SLAXFUtORY9AUxWywTM0WvKDHhWlEkqsSgaBD/5kj0Rdb/VKzms0U34bMjs6jYIvLFd+JBDoTfYc1FiJr9IS6PiUQiteTgZVEhyghHC/l41vDOFRvEKtbuE1fEAXHehBOEOErIJxL2TnFH9GcpmifeFl8gWsJ7E90lfhRtJhzXQ5xqnuR4Pk4kRbN4lIXwfLFZvC9e5d1ZPD2DQ0kTHtLDfUJbgrcW+smiXHSJfwj/SJZPIW0U68QrTni/EqdZ66mZcOrZiumuvRNviUIxXkwl17dpuUw2S2wVK4ia2UWxQ5yjZb10whbWBK2U74S9nJANsrG+NKJzaJkPxGuO6H7xfVA0KJyyNhEjVNWiQEwRlfRgM5tIVe+btMzH4iVhqftV7BQnMnVGOmEPgTjP1YS9HPFOejH1O6velY6nl8Qe8YOb06D5I+TsBq1hLbaENnuXdHSQ7/lMpAieXhffiOPpwhtW2CNk9fSyDYNixMsI9wREk4jWZ8pp2FC7BdcO3bRZFUyh1xOIfU2f/hem2f2QQ+EavV5BXoucGR/nYGnIdqaGtQHyGLRhp8pD22ihTtkMsUYsZKLlBTafz6ZaRxkyoUNti74h1lNcZeSwiYKz0L/O7ycz9c6FOdVG83i6+Fx8SAWn+nQ7g7+HaBTSbjbtHoo/M6QllMc1TKPVDA+zX8QhcZLPCTa0lApfyEk2gOdd2Xo8jTG4gQXNbjLwjzvz2oTvkYIaUlOF5/c5z4fCCtsCm8RH5NBjOOxDNBHo81YmWQH1UIhwhN5Pe3MNCk+lUDaSsyS7tlPmIIMknf2NeITQF7NWKf/TFqx2PxDez2ib8by7JXaHvHleZaN2YVhLy9WhUciVZ8D1eAzh/YRCqnIK6VtxmHCOZkN43uWEeyztVsKGYqlh43MbXMpBnvK0idl7aITwZrKfKT5bezHjdTmbsd6/YJVvHn/JH1Q69969hLfVy96SVHQ7ua4h7BVgvd/lc0cqdnJ6BJ7nq4zlspFRauFewDXqPSo84n6TiHEFfV5R9/BoJPePcTCPm2ivz2Fv0+YncYwLXa6snxFbRE9Pp8jiPvfeDg7x2P/wFbWPVitAx3L8+xMBBgBa0QNtbOSplwAAAABJRU5ErkJggg==") center no-repeat;
background-size:30rpx;
}
</style>

View File

@@ -0,0 +1,387 @@
<template>
<view class="title-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback"></view>
<text>工作价值观测评</text>
</view>
<view class="progress-block">
<view class="row">
<view class="title-index">
{{pageIndex+1}}
</view>
<view class="all-title">
{{allNum}}道题
</view>
<view class="time">
约8分钟
</view>
</view>
<view class="bar">
<view class="bar-inner" :style="{width: rate + '%'}"></view>
</view>
</view>
<view class="content">
<view class="item" v-show="pageIndex == index" v-for="(item, index) in list" :key="index">
<view class="title">{{ item.Title }}</view>
<view class="sel-label-block">
<view class="label" :class="item.Value == 4 ? 'sel' : ''" @click="checkedTitle(4,index)">非常喜欢</view>
<view class="label" :class="item.Value == 3 ? 'sel' : ''" @click="checkedTitle(3,index)">喜欢</view>
<view class="label" :class="item.Value == 2 ? 'sel' : ''" @click="checkedTitle(2,index)">不喜欢</view>
<view class="label" :class="item.Value == 1 ? 'sel' : ''" @click="checkedTitle(1,index)">非常不喜欢</view>
</view>
</view>
<view class="btn-wrap">
<view class="pre-btn" @click="prePage">上一题</view>
<view class="com-btn" v-show="commit" @click="submitTitle">提交</view>
</view>
</view>
<!-- <u-modal :show="showBakcTip" @confirm="showBakcTip=false" @cancel="goback" confirmText="继续测评" cancelText="放弃测评" :showCancelButton="true">
<view class="slot-content">
<view class="tip-layer">
<view class="title">提示</view>
<view class="desc">确认要放弃测评吗</view>
</view>
</view>
</u-modal> -->
</view>
</template>
<script>
import api from "@/apiCa/testManage.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
list: [],
allNum: 0,//总题目数
pageIndex: 0, //显示页
showBakcTip: false,
lastTapTime: 0 ,// 记录上次点击的时间
historyTitle: [],// 历史题目
}
},
computed: {
rate: function() {
let num = 0;
this.list.forEach(item => {
if (item.Value > 0) {
num++
}
});
return Math.round(num * 100 / this.allNum)
},
commit: function(){
let num = 0;
this.list.forEach(item => {
if (item.Value > 0) {
num++
}
});
if(num == this.list.length){
return true;
}else {
return false;
}
}
},
created() {
this.getHistoryTitle();
},
methods: {
// 返回
goback(){
uni.showModal({
title: '提示',
content: '确认要放弃测评吗?',
cancelText: '取消',
confirmText: '确认',
confirmColor: '#1677ff',
cancelColor: '#999999',
success: function (res) {
if (res.confirm) {
uni.navigateBack(-1);
} else if (res.cancel) {
}
}
});
//uni.navigateBack(-1);
},
// 上一页
prePage() {
if (this.pageIndex == 0) {
return
}
this.pageIndex--
},
//获取答题记录
getHistoryTitle(){
api.getTestRecordProcessList(17).then(res => {
if (res.Result === 1) {
let data = res.Data;
this.historyTitle = data;
this.getTitle();
}
})
},
// 获取题目
getTitle() {
uni.showLoading({
title: "加载中..."
})
api.queryTestContent(17).then(res => {
uni.hideLoading();
if (res.Result === 1) {
let list = res.Data.List;
list.forEach(item => {
item.Value = 0;
this.historyTitle.forEach(ritem=>{
if(item.TitleId == ritem.TestTitleId){
item.Value = Number(ritem.TestResult) + 1;
}
})
})
if(this.historyTitle.length == 0){
this.pageIndex = 0;
}else if(this.historyTitle.length == list.length){
this.pageIndex = list.length - 1;
}else {
this.pageIndex = this.historyTitle.length;
}
this.allNum = list.length;
this.list = list;
}
})
},
//选中题目
checkedTitle(NUM,INDEX){
const now = Date.now();
if (now - this.lastTapTime < 500) {
console.log('双击事件被阻止');
return;
} else {
// 处理单击事件
console.log('单击事件被触发');
this.lastTapTime = now;
this.list[INDEX].Value = NUM;
//
this.saveTestRecordProcess(this.list[INDEX].TitleId,NUM-1);
setTimeout(()=>{
if(this.pageIndex != this.list.length - 1){
this.pageIndex = INDEX + 1;
}
},300)
}
},
//存储答题记录
saveTestRecordProcess(ID,VALUE){
let data = {
testType: 17,
testTitleId: ID,
testResult: VALUE
}
api.saveTestRecordProcess(data).then(res => {
if (res.Result === 1) {
}
})
},
// 提交题目
submitTitle() {
let testStr = "";
this.list.forEach(item => {
switch (item.Value) {
case 4: {
testStr += `${item.TitleId}|3,`
break;
}
case 3: {
testStr += `${item.TitleId}|2,`
break;
}
case 2: {
testStr += `${item.TitleId}|1,`
break;
}
case 1: {
testStr += `${item.TitleId}|0,`
break;
}
}
});
uni.showLoading({
title: "提交中"
})
let data = {
testStr
}
api.removeTestRecordProcess(17).then((res) => {
return api.saveWorkValuesResult(data);
}).then((res) => {
uni.hideLoading();
if (res.Result === 1) {
uni.showToast({
title: "提交成功",
icon: "success"
})
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 上一页
beforePage.data.refreshIfNeeded = true;
setTimeout(()=>{
uni.redirectTo({
url: `/packageCa/testReport/workValuesTestReport?year=${res.Data.Year}`
})
},1000)
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 32rpx;
color: #666666;
margin-bottom: 20rpx;
text-align: center;
&:last-child {
margin-bottom: 0;
}
}
}
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
margin-bottom: 30rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.title-wrap {
background: #fff;
.progress-block {
padding: 0 40rpx;
.row {
position: relative;
display: flex;
align-items: flex-end;
height: 40rpx;
margin-bottom: 20rpx;
.title-index {
font-size: 28rpx;
color: #1677ff;
}
.all-title {
font-size: 24rpx;
color: #999999;
margin-left: 10rpx;
}
.time {
position: absolute;
right: 0;
top: 0;
font-size: 24rpx;
color: #20B664;
}
}
.bar {
position: relative;
width: 670rpx;
height: 8rpx;
background: #EBEBEB;
border-radius: 8rpx 8rpx 8rpx 8rpx;
.bar-inner {
position: absolute;
left: 0;
top: 0;
height: 8rpx;
background: #1677ff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
}
}
.content {
padding: 0 40rpx;
.item {
padding-top: 40rpx;
.title {
font-size: 32rpx;
color: #000000;
font-weight: 600;
margin-bottom: 40rpx;
}
.sel-label-block {
.label {
display: flex;
align-items: center;
width: 630rpx;
height: 96rpx;
padding-left: 40rpx;
background: #F5F5F5;
margin-bottom: 24rpx;
border-radius: 12rpx 12rpx 12rpx 12rpx;
font-size: 28rpx;
color: #000000;
&.sel {
background: #EDF6FF;
color: #1677ff;
}
}
}
}
.btn-wrap {
display: flex;
justify-content: center;
padding-top: 50rpx;
.pre-btn {
width: 316rpx;
height: 76rpx;
line-height: 76rpx;
text-align: center;
background: #F8F8F8;
border-radius: 60rpx 60rpx 60rpx 60rpx;
border: 2rpx solid #EAEAEA;
font-size: 28rpx;
color: #666666;
}
.com-btn {
width: 320rpx;
height: 80rpx;
line-height: 80rpx;
text-align: center;
background: #1677ff;
margin-left: 20rpx;
border-radius: 60rpx 60rpx 60rpx 60rpx;
font-size: 28rpx;
color: #fff;
}
}
}
}
</style>

649
packageCa/search/search.vue Normal file
View File

@@ -0,0 +1,649 @@
<template>
<view class="index-wrap">
<view class="yanshi-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback"></view>
<text>素质测评</text>
</view>
<view class="section">
<view class="head-title">测评中心</view>
<view class="nav-block">
<view class="item" @click="navDetail(1)">
<text class="icon icon-101"></text>
<text class="title">职业测评</text>
</view>
<view class="item" @click="navDetail(2)">
<text class="icon icon-102"></text>
<text class="title">测评报告</text>
</view>
</view>
<view class="head-title">探索中心</view>
<view class="nav-block">
<view class="item" @click="navDetail(3)">
<text class="icon icon-103"></text>
<text class="title">职业库</text>
</view>
</view>
<view class="head-title">职业生涯规划</view>
<view class="nav-block">
<view class="item" @click="navDetail(6)">
<text class="icon icon-105"></text>
<text class="title">生涯罗盘</text>
</view>
<view class="item" @click="navDetail(5)">
<text class="icon icon-106"></text>
<text class="title">职业生涯路径</text>
</view>
<view class="item" @click="navDetail(7)">
<text class="icon icon-107"></text>
<text class="title">学业规划</text>
</view>
<view class="item" @click="navDetail(4)">
<text class="icon icon-108"></text>
<text class="title">生涯档案</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import api from "@/apiCa/user.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
user: null,//用户信息
userId: 0,
name: ""
}
},
onLoad(e) {
this.userId = e.userId;
this.name = e.name;
this.queryWechartToken();
},
methods: {
// 返回
goback() {
uni.navigateBack(-1);
},
async getUserInfor(){
const res = await api.getUserBasisInfo();
if (res.Result == 1) {
const data = res.Data.data;
if(data === null){
uni.showToast({
title: "请先完善个人信息",
duration:2000,
icon: "none"
})
setTimeout(() => {
uni.navigateTo({
url: "/packageCa/userCenter/fillInInformation"
})
}, 2000);
}
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 演示入
navDetail(index){
switch (index){
case 1:
case 2: {
uni.navigateTo({
url: "/packageCa/pagesTest/testList"
})
break;
}
case 3 : {
uni.navigateTo({
url: "/packageCa/job/index"
})
break;
}
case 4 : {
uni.navigateTo({
url: "/packageCa/userCenter/personDocument"
})
break;
}
case 5 : {
uni.navigateTo({
url: "/packageCa/userCenter/professionPath"
})
break;
}
case 6 : {
uni.navigateTo({
url: "/packageCa/userCenter/careerCompass"
})
break;
}
case 7 : {
uni.navigateTo({
url: "/packageCa/userCenter/smartTarget"
})
break;
}
}
},
// 登录获取用户信息
async queryKaShiToken() {
const res = await api.queryKaShiToken(this.userId,this.name)
if(res.Result == 1){
return res.Data;
}else {
return null
}
},
// 获取token
async queryWechartToken() {
uni.showLoading({
title: "加载中"
})
const data = await this.queryKaShiToken();
if(data.userInfo != null){
const res = await api.queryWechartToken(data.userInfo.Id,2268,1)
uni.hideLoading();
if(res.Result == 1){
let params = {
token:data.token,
user:data.userInfo,
userToken: res.Data.token
};
uni.setStorageSync('CAuserInfo',params);
this.getUserInfor();
}
}else {
uni.showToast({
title: "获取用户信息失败",
icon: "none"
})
setTimeout(()=>{
uni.reLaunch({
url: "/pages/index/index"
})
},1500)
}
}
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: #EEF1F8 url("#{$image-oss-url}/17.png") no-repeat;
background-size: contain;
}
</style>
<style lang="scss" scoped>
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
$image-oss-url2: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
margin-bottom: 30rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.index-wrap {
padding-bottom: 122rpx;
.izd-link {
position: fixed;
right: 23rpx;
bottom: 280rpx;
width: 80rpx;
height: 80rpx;
line-height: 80rpx;
border: none;
background: #1677ff;
color: #fff;
font-size: 24rpx;
text-align: center;
border-radius: 50%;
}
.person-info {
position: relative;
display: flex;
align-items: center;
width: 664rpx;
height: 174rpx;
padding: 0 20rpx;
margin: 65rpx auto 20rpx;
border: 3px solid #FFFFFF;
background: #EDF5FE;
border-radius: 12px;
.img-wrap {
overflow: hidden;
width: 112rpx;
height: 112rpx;
border-radius: 50%;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.txt-wrap {
.top {
display: flex;
align-items: flex-end;
margin-bottom: 10rpx;
color: #000000;
margin-right: 20rpx;
font-size: 36rpx;
}
.bottom {
color: #666;
font-size: 26rpx;
}
}
.person-btn {
position: absolute;
display: flex;
align-items: center;
justify-content: center;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
font-size: 24rpx;
color: #fff;
width: 100rpx;
height: 48rpx;
background: #1677ff;
border-radius: 40rpx 40rpx 40rpx 40rpx;
// .icon {
// width: 72rpx;
// height: 72rpx;
// margin-bottom: 10rpx;
// background: url("#{$image-oss-url}/index/change_user.png") no-repeat;
// background-size: 100%;
// }
}
}
.notice-wrap {
width: 710rpx;
height: 60rpx;
background-color: #ffffff;
border-radius: 10rpx;
display: flex;
align-items: center;
// padding: 0 20rpx;
margin-top: 20rpx;
.icon {
display: block;
width: 40rpx;
height: 40rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAMAAADWg4HyAAAA5FBMVEUAAAD/lin/lin/lin/lij/lij/lin/lin/lin/lin/lyn/lyn/lyn/lSf/lCr/ji7/lin/lin/lir/lij/lij/lSj/mCn/lCj/lSr/nin/lin/lin/lij/lyn/lSj/lyn/lif/lir/lyj/lSj/nSv/lSj/lin/lin/lij/lyn/lyn/lyn/lyn/lCj/lin/////4rL/rUr/8tb/x3b/1pP/vWT/uF3/+/P/7Mj/wWn/slH/7c7/2pz/slP/qET/oDr/nDL/893/6MP/6L7/79H/5rf/4Kv/36f/zYH/xHH/tVj/pDwNjetyAAAALnRSTlMAzWH065z68Ne3s0QkEw4H2q+slWdHMjApFuPRoHp1b1xMPjghx8W6qJaPf1FK94unHgAAAbJJREFUOMudlelWwjAQRqcUlX3fBBUF92USWjbZBXff/30cEiA0tHG5P8icw+1p0syXgMZhKGdlwvt2NXKRj4OJUBS3CR8Vg8wimTp7FT8ztYd+HNztqpVLDOAqran3GIxd9qgnaOQcFCE0Yyc3anwfdcbuDLeIbeZs6WZnzpgzRqLb7spvB5K6Zj722ZIR4mREIwoaQk1mvOaQSTi6PRocFFwL99jzdoet4S1GDAcoeQCiJusW0X1iCj7jrOeiRM44ISp6nQ6n5ye4IUPuqaj6zMf1kgCQLSP+nbfaBjcEYCl3iugEu7cAB8qlkQe7WUihwXU5MVot0IKyyZWfsL3qerMrlzpYu0mDKzdoipIagP3btcUAIsod4Fcv2L0ByCqXuX3DXtQBCqJ4+3mPSwAlUQw+OOF43W67o9QwEFVv+yp3Sj+LT1yRAyLvjdqz6l+1E6J1iEQYfUPEcfzKNnmLggrRbjjflzFerJdYlG7aQp3Oi+OuoqUSpM4SI7H0H86of519IqEGmuClETjnSAJ0Spa/mk2BDwUfO3YGART0O0s39bswYgvPUneh8YFmxW+S3+b9+8sbaXzQAAAAAElFTkSuQmCC") no-repeat;
background-size: 100%;
}
.info-wrap {
font-size: 30rpx;
color: #ff8a00;
}
}
.section-content {
padding: 0 20rpx 60rpx;
background: #EEF1F8;
min-height: calc(100vh - 350rpx);
}
.section{
background-color: #ffffff;
border-radius: 10rpx;
padding: 25rpx 20rpx 10rpx;
margin-top: 20rpx;
.head-title {
font-size: 34rpx;
color: #000000;
font-weight: 600;
margin-bottom: 10rpx;
}
.nav-block {
display: flex;
flex-wrap: wrap;
.item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-right: 85rpx;
margin-bottom:0rpx;
&:nth-child(4){
margin-right: 0;
}
.icon {
width: 104rpx;
height: 104rpx;
background: #f2f2f2;
&.icon-1 {
background: url("#{$image-oss-url}/search/item_1.png") no-repeat;
background-size: 100%;
}
&.icon-2 {
background: url("#{$image-oss-url}/search/item_2.png") no-repeat;
background-size: 100%;
}
&.icon-4 {
background: url("#{$image-oss-url}/career/icon_4.png") no-repeat;
background-size: 100%;
}
&.icon-5 {
background: url("#{$image-oss-url}/career/icon_5.png") no-repeat;
background-size: 100%;
}
&.icon-6 {
background: url("#{$image-oss-url}/career/icon_6.png") no-repeat;
background-size: 100%;
}
&.icon-7 {
background: url("#{$image-oss-url}/career/icon_7.png") no-repeat;
background-size: 100%;
}
&.icon-8 {
background: url("#{$image-oss-url}/career/icon_8.png") no-repeat;
background-size: 100%;
}
&.icon-9 {
background: url("#{$image-oss-url}/career/icon_9.png") no-repeat;
background-size: 100%;
}
&.icon-10 {
background: url("#{$image-oss-url}/career/icon_10.png") no-repeat;
background-size: 100%;
}
&.icon-11 {
background: url("#{$image-oss-url}/career/icon_11.png") no-repeat;
background-size: 100%;
}
&.icon-12 {
background: url("#{$image-oss-url}/career/icon_12.png") no-repeat;
background-size: 100%;
}
&.icon-13 {
background: url("#{$image-oss-url}/career/icon_13.png") no-repeat;
background-size: 100%;
}
&.icon-14 {
background: url("#{$image-oss-url}/career/icon_14.png") no-repeat;
background-size: 100%;
}
&.icon-15 {
background: url("#{$image-oss-url}/career/icon_15.png") no-repeat;
background-size: 100%;
}
&.icon-16 {
background: url("#{$image-oss-url}/career/icon_16.png") no-repeat;
background-size: 100%;
}
&.icon-17 {
background: url("#{$image-oss-url}/career/icon_17.png") no-repeat;
background-size: 100%;
}
&.icon-18 {
background: url("#{$image-oss-url}/career/icon_18.png") no-repeat;
background-size: 100%;
}
&.icon-19 {
background: url("#{$image-oss-url}/career/icon_19.png") no-repeat;
background-size: 100%;
}
&.icon-20 {
background: url("#{$image-oss-url}/career/icon_20.png") no-repeat;
background-size: 100%;
}
&.icon-22 {
background: url("#{$image-oss-url}/career/icon_22.png") no-repeat;
background-size: 100%;
}
}
.title {
margin-top: 0rpx;
font-size: 24rpx;
color: #333333;
}
}
}
}
.layer-inner {
.head {
position: relative;
display: flex;
align-items: center;
justify-content: center;
height: 170rpx;
width: 100%;
font-size: 34rpx;
color: #000000;
.close-btn {
position: absolute;
top: 19rpx;
right: 27rpx;
width: 52rpx;
height: 52rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAHdElNRQfmChMLCDGRh9c8AAAAmklEQVQ4y7WUMQ7DMAhFnzpmRO3979ABqVN8m/YWdLGcqEkM+lI92Qb+R3wAPgRPjMoxnOANQRCsLGnIwtq98X5pCZvRuucLHuMxY9tYGvffD0tYdsA2ZbsEvWabAp4b09SPDlYp0t4JSAt0YPOhYEH4ja0m+jg+QvzMfKuh/CE9oRBCyQVxhTYSGlYYDWEIpXGXFou0woRl+QUj09L9Yg66GgAAAABJRU5ErkJggg==") center no-repeat;
background-size: 50%;
}
}
.content {
max-height: 600rpx;
overflow: auto;
padding: 0 40rpx;
.li {
position: relative;
height: 114rpx;
line-height: 114rpx;
border-bottom: 2rpx solid #f5f5f5;
text {
font-size: 30rpx;
color: #000000;
margin-right: 20rpx;
}
&.on {
text {
color: #1b88ff;
}
&::after {
position: absolute;
right: 10rpx;
top: 50%;
transform: translateY(-50%);
content: "";
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAZCAMAAACM5megAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAATlBMVEUbiP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8AAAAx8hE2AAAAGHRSTlMAH0f2c0SVAfc7bv6JI/hS+UhR+1D0jxRK42VSAAAAAWJLR0QZ7G61iAAAAAd0SU1FB+YKFBEcF+FCm4sAAABsSURBVCjPzdHHDoAwDANQs1cLlJn//1KGEIKqrY+QY/QOiQ2QiRgA4iTlRCTjJC9+QsqPSMVJ3ShGdCuiwgToegu5zrWQ+6MX8j39QMaby41MILoLmWC6JzKkgGFHI+voQKxGTLMshACrdu83CdwKBKKZxqUAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
display: block;
width: 35rpx;
height: 25rpx;
}
}
}
}
.op-block {
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx 40rpx 0;
width: 670rpx;
height: 115rpx;
.commit-btn {
width: 361rpx;
height: 77rpx;
line-height: 77rpx;
text-align: center;
background-color: #1b88ff;
border-radius: 38rpx;
font-size: 30rpx;
color: #ffffff;
}
}
}
.title-layer {
position: fixed;
z-index: 99;
padding: 30rpx 20rpx;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
.inner {
width: 710rpx;
background: #fff;
}
}
}
.yanshi-wrap {
padding: 0 20rpx 10rpx;
.section{
background: rgba(255,255,255,0.5);
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 4rpx solid #FFFFFF;
padding-top: 40rpx;
.head-title {
font-size: 32rpx;
color: #000000;
font-weight: 600;
margin-bottom: 20rpx;
}
.nav-block {
display: flex;
flex-wrap: wrap;
margin-bottom: 40rpx;
.item {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin-right: 55rpx;
&:nth-child(4){
margin-right: 0;
}
.icon {
width: 112rpx;
height: 112rpx;
background: #f2f2f2;
&.icon-1 {
background: url("#{$image-oss-url}/search/item_1.png") no-repeat;
background-size: 100%;
}
&.icon-2 {
background: url("#{$image-oss-url}/search/item_2.png") no-repeat;
background-size: 100%;
}
&.icon-3 {
background: url("#{$image-oss-url}/search/item_3.png") no-repeat;
background-size: 100%;
}
&.icon-4 {
background: url("#{$image-oss-url}/search/item_4.png") no-repeat;
background-size: 100%;
}
&.icon-5 {
background: url("#{$image-oss-url}/search/item_5.png") no-repeat;
background-size: 100%;
}
&.icon-6 {
background: url("#{$image-oss-url}/search/item_6.png") no-repeat;
background-size: 100%;
}
&.icon-7 {
background: url("#{$image-oss-url}/search/item_7.png") no-repeat;
background-size: 100%;
}
&.icon-8 {
background: url("#{$image-oss-url}/search/item_8.png") no-repeat;
background-size: 100%;
}
&.icon-9 {
background: url("#{$image-oss-url}/search/item_9.png") no-repeat;
background-size: 100%;
}
&.icon-10 {
background: url("#{$image-oss-url}/search/item_10.png") no-repeat;
background-size: 100%;
}
&.icon-11 {
background: url("#{$image-oss-url}/search/item_11.png") no-repeat;
background-size: 100%;
}
&.icon-12 {
background: url("#{$image-oss-url}/search/item_12.png") no-repeat;
background-size: 100%;
}
&.icon-13 {
background: url("#{$image-oss-url}/search/item_13.png") no-repeat;
background-size: 100%;
}
&.icon-14 {
background: url("#{$image-oss-url}/search/item_14.png") no-repeat;
background-size: 100%;
}
&.icon-15 {
background: url("#{$image-oss-url}/search/item_20.png") no-repeat;
background-size: 100%;
}
&.icon-101 {
background: url("#{$image-oss-url2}/kashi/index_icon_1.png") no-repeat;
background-size: 100%;
}
&.icon-102 {
background: url("#{$image-oss-url2}/kashi/index_icon_2.png") no-repeat;
background-size: 100%;
}
&.icon-103 {
background: url("#{$image-oss-url2}/kashi/index_icon_3.png") no-repeat;
background-size: 100%;
}
&.icon-104 {
background: url("#{$image-oss-url2}/kashi/index_icon_4.png") no-repeat;
background-size: 100%;
}
&.icon-105 {
background: url("#{$image-oss-url2}/kashi/index_icon_5.png") no-repeat;
background-size: 100%;
}
&.icon-106 {
background: url("#{$image-oss-url2}/kashi/index_icon_6.png") no-repeat;
background-size: 100%;
}
&.icon-107 {
background: url("#{$image-oss-url2}/kashi/index_icon_7.png") no-repeat;
background-size: 100%;
}
&.icon-108 {
background: url("#{$image-oss-url2}/kashi/index_icon_8.png") no-repeat;
background-size: 100%;
}
}
.title {
font-size: 24rpx;
color: #333;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,32 @@
let opts = {
color: ["#1677ff"],
padding: [15,10,0,10],
enableScroll: false,
xAxis: {
disableGrid: true,
axisLineColor: "#EEEEEE",
},
legend: {
show: false,
},
yAxis: {
gridType: "dash",
dashLength: 2,
showTitle: true,
gridColor: "#EEEEEE",
data: [{
max: 5,
min: 0,
axisLine: false,
title: "等级"
}]
},
extra: {
line: {
type: "straight",
width: 3,
activeType: "hollow"
}
}
}
export default opts

View File

@@ -0,0 +1,693 @@
<template>
<view class="contrast-box">
<view class="head-box">
<view class="desc">
<text class="icon"></text>
<view class="txt-item">
{{allOptionStr}}
</view>
</view>
<view class="btn" @click="showContrastLayer">
数据对比
</view>
</view>
<!-- 数据对比 -->
<uni-popup @change="popupChange" ref="pop_contrast" type="bottom">
<view class="search-content">
<view class="head-title">
<text>数据对比</text>
<view @click="closeDialog()" class="s_close"></view>
</view>
<view class="content" v-if="platformType!=1">
<view class="title">我的报告</view>
<view class="sel-box" @click="selTimeList(1)">
{{optionStr1}}
<view class="iocn"></view>
</view>
<view class="s-line" style="display:none;"><text>对比</text></view>
<view class="title">时间维度</view>
<view class="sel-box" @click="selTimeList(2)">
{{optionStr2}}
<view class="iocn"></view>
</view>
<!-- <view class="title">群体维度</view>
<view class="options">
<view class="item" :class="[schoolLevel == 1?'on':'', gradeShow?'':'disable']" v-on:click="selectSchoolLevel(1)" >班级</view>
<view class="item" :class="[schoolLevel == 2?'on':'', gradeShow?'':'disable']" v-on:click="selectSchoolLevel(2)">年级</view>
<view class="item" v-on:click="selectSchoolLevel(3)" :class="schoolLevel == 3?'on':''">学校</view>
</view>
<view class="title" style="padding-top: 10rpx;">受测对象</view>
<view class="options">
<view class="item" v-on:click="selectSex(1)" :class="sexType == 1?'on':''"></view>
<view class="item" v-on:click="selectSex(2)" :class="sexType == 2?'on':''"></view>
</view> -->
</view>
<view class="content" v-else>
<view class="title">我的报告</view>
<view class="sel-box" @click="selTimeList(1)">
{{optionStr1}}
<view class="iocn"></view>
</view>
<view class="s-line" style='position: relative;'><text>对比</text></view>
<view class="title">时间维度</view>
<view class="sel-box" @click="selTimeList(2)">
{{optionStr2}}
<view class="iocn"></view>
</view>
<!-- <view class="title">群体维度</view>
<view class="options">
<view v-for="(item, index) in departList" :key="index">
<view class="item" v-on:click="selectSchoolLevel(item)" :class="schoolLevel == item.DepartId?'on':''">
{{item.Name}}
</view>
</view>
</view>
<view class="title">受测对象</view>
<view class="options">
<view class="item" v-on:click="selectSex(1)" :class="sexType == 1?'on':''"></view>
<view class="item" v-on:click="selectSex(2)" :class="sexType == 2?'on':''"></view>
</view> -->
</view>
<view class="btn-wrap">
<view class="btn" v-on:click="confirmCompute">
确认对比
</view>
</view>
</view>
</uni-popup>
<uni-popup @change="popupChange" ref="pop_time" type="bottom">
<view class="search-content">
<view class="head-title">选择时间</view>
<!-- 第一个时间 -->
<view class="time-content" v-if="timeType == 1">
<view class="left">
<view class="time-item" :class="item.id == selYTItem1.id?'on':''" v-for="(item,index) in treeList" :key="index" @click="changeYearTrem(item,1)">{{item.label}}</view>
</view>
<view class="right">
<view class="time-item" :class="item.id == selRepItem1.id?'on':''" v-for="(item,index) in childrenList" :key="index" @click="changeRepTime(item,1)">{{item.label}}</view>
</view>
</view>
<!-- 第二个对比时间 -->
<view class="time-content" v-if="timeType == 2">
<view class="left">
<view class="time-item" :class="item.id == selYTItem2.id?'on':''" v-for="(item,index) in treeList" :key="index" @click="changeYearTrem(item,2)">{{item.label}}</view>
</view>
<view class="right">
<view class="time-item" :class="[item.id == selRepItem2.id?'on':'',item.disabled ?'disabled':'']" v-for="(item,index) in childrenList" :key="index" @click="changeRepTime(item,2)">{{item.label}}</view>
</view>
</view>
<view class="btn-wrap">
<view class="btn" v-on:click="comfirmTime">
确认选择
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import api from "@/apiCa/testManage.js";
export default {
props: {
testType: {
type: String,
default: "",
},
userId: {
type: String,
default: "",
},
recordId: {
type: Number,
default: 0,
}
},
data() {
return {
platformType: 0, //高校/普教
showContrast: false, //显示对比
showTime: false, //显示时间选择
treeList: [], //时间列表
childrenList: [],//时间子级
selYTItem1: {},//临时选中的学年1
selRepItem1: {},//临时选中的报告1
selYTItem2: {},//临时选中的学年2
selRepItem2: {},//临时选中的报告2
checkedRepItem1: {},//确认选中报告1
checkedRepItem2: {},//确认选中报告2
timeType: 1,//时间类型是报告时间1还是对比时间2
optionStr1: "",//我的报告展示字段
optionStr2: "",//我的报告展示字段
allOptionStr: "",//全部条件展示字段
schoolLevel: 0,//群体
sexType: 0, //1男2女
gradeShow: false,//是否分班
departName: "",
departList:[],//高校群体对象
}
},
watch: {
recordId: {
handler(val) {
console.log(val);
if(val > 0) {
//this.recordId = val;
this.getCareerYearAndTermListNew()
}
},
immediate: true
}
},
created() {
},
methods: {
closeDialog(){
this.$refs.pop_contrast.close();
},
popupChange(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show)
if (!e.show) {
// 弹窗关闭时的处理逻辑
this.$emit("updateValue", true);
}
},
//改变报告时间
changeRepTime(ITEM,INDEX){
if(INDEX == 1){
this.selRepItem1 = ITEM;
}else {
if(ITEM.disabled){
return
}
this.selRepItem2 = ITEM;
}
},
//确认选择时间
comfirmTime(){
if(this.timeType == 1){
if(this.selRepItem1 == null){
uni.showToast({
title: "请先选择报告时间",
icon: "none"
})
return
}
// 选了我的报告
if(this.checkedRepItem1.id == this.selRepItem1.id){
console.log("选了一样");
this.optionStr1 = this.selYTItem1.label + '/' + this.selRepItem1.label;
this.checkedRepItem1 = this.selRepItem1;
this.$refs.pop_contrast.open('bottom') //底部弹出 //底部弹出
this.$emit("updateValue", false);
//this.showContrast = true;
}else {
//this.showContrast = false;
this.$refs.pop_contrast.close() //底部弹出
const pages = getCurrentPages();
const currentPage = pages[pages.length - 1];
const currentRoute = currentPage.route;
uni.redirectTo({
url: `/${currentRoute}?recordId=${this.selRepItem1.id}&year=${this.selRepItem1.Year}&term=${this.selRepItem1.Term}&testType=${this.testType}`
})
}
}else {
if(this.selRepItem2 == null){
uni.showToast({
title: "请先选择报告时间",
icon: "none"
})
return
}
//this.showContrast = true;
this.$refs.pop_contrast.open('bottom') //底部弹出
this.$emit("updateValue", false);
this.checkedRepItem2 = this.selRepItem2;
this.optionStr2 = this.selYTItem2.label + '/' + this.selRepItem2.label;
this.schoolLevel = 0;
this.sexType = 0;
}
//this.showTime = false;
this.$refs.pop_time.close();
},
//改变学年
changeYearTrem(ITEM,INDEX){
if(INDEX == 1){
this.selYTItem1 = ITEM;
this.selRepItem1 = {};
}else {
this.selYTItem2 = ITEM;
this.selRepItem2 = {};
}
this.childrenList = ITEM.children;
console.log(this.selYTItem2);
console.log(this.selRepItem2);
console.log(this.childrenList);
},
// 显示团队对比弹窗
showContrastLayer(){
this.timeType=1;
this.$refs.pop_contrast.open('bottom') //底部弹出
this.$emit("updateValue", false);
//this.showContrast = true;
},
// 获取报告时间列表
getCareerYearAndTermListNew(){
api.getCareerYearAndTermListNew(this.testType, this.userId).then(res => {
if (res.Result === 1) {
this.treeList = res.Data.DataList.TreeDataList;
this.platformType = res.Data.DataList.PlatformType;
if(this.platformType == 1){
this.departList = res.Data.DepartList;
}
this.schoolId = res.Data.DataList.SchoolId;
let list = JSON.parse(JSON.stringify(res.Data.DataList.TreeDataList));
list.forEach(item => {
if (item.children) {
item.children.forEach(child => {
if (child.id == this.recordId) {
this.selYTItem1 = item;
this.checkedRepItem1 = this.selRepItem1 = child;
this.childrenList = item.children;
this.allOptionStr = this.optionStr1 = item.label + '/' + child.label
if(child.GradeId == 0 && res.Data.DataList.PlatformType == 0){
this.gradeShow = false;
}else {
this.gradeShow = true;
}
}
});
}
});
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
})
},
//选时间
selTimeList(INDEX){
this.$refs.pop_time.open('bottom');
this.$refs.pop_contrast.close();
this.$emit("updateValue", false);
//this.showTime = true;
//this.showContrast = false;
this.timeType = INDEX;
if(INDEX == 1){
this.selRepItem1 = this.checkedRepItem1;
this.treeList.forEach(item => {
if (item.children) {
item.children.forEach(child => {
if (child.id == this.checkedRepItem1.id) {
this.selYTItem1 = item;
this.childrenList = item.children;
}
});
}
});
}else {
this.childrenList = []
this.selYTItem2 = [];
this.selRepItem2 = this.checkedRepItem2;
this.treeList.forEach(item => {
if (item.children) {
item.children.forEach(child => {
child.disabled = false;
if (child.id == this.checkedRepItem1.id) {
child.disabled = true;
}
if (this.checkedRepItem2 != null && child.id == this.checkedRepItem2.id) {
this.selYTItem2 = item;
this.childrenList = item.children;
}
});
}
});
}
},
// 关闭选时间
closeTime(){
this.$refs.pop_contrast.open('bottom');
this.$refs.pop_time.close();
//this.showContrast = true;
//this.showTime = false;
},
//选中群体维度
selectSchoolLevel(info) {
console.log(info);
if (this.platformType == 1) {
this.departName = info.Name;
//高校
this.schoolLevel = info.DepartId;
this.sexType = 0;
} else {
if(!this.gradeShow && info < 3){
return uni.showToast({
title: "当前学期未进行分班,无法进行对比",
icon: "none"
})
}
//普教
this.schoolLevel = info;
this.sexType = 0;
}
this.optionStr2 = "";
this.selYTItem2 = null;
this.selRepItem2 = null;
this.checkedRepItem2 = null;
// this.$forceUpdate();
},
// 选男女
selectSex(INDEX) {
if (this.schoolLevel == 0) {
return uni.showToast({
title: '请先选择群体维度',
icon: "none"
})
}
if (this.sexType == INDEX) {
this.sexType = 0;
} else {
this.sexType = INDEX;
}
},
//关闭弹窗团体对比
closeContrast() {
//this.showContrast = false;
this.$refs.pop_contrast.close();
},
//确定对比
confirmCompute() {
if(this.schoolLevel == 0 && this.checkedRepItem2 == null){
uni.showToast({
title: "请选择对比数据",
icon: "none"
})
return
}
//this.showContrast = false;
this.$refs.pop_contrast.close();
let name1 = this.checkedRepItem1.label;
let name2 = "";
let year2 = "";
let term2 = "";
if (this.schoolLevel == 0) {
name2 = this.checkedRepItem2.label;
year2 = this.checkedRepItem2.Year;
term2 = this.checkedRepItem2.Term;
}else {
if (this.platformType == 1) {
name2 = `${this.departName}${this.sexType == 1 ? '(男)' : this.sexType == 2 ? '(女)' : ''}`;
} else {
if (this.schoolLevel == 1) {
name2 = `班级${this.sexType == 1 ? '(男)' : this.sexType == 2 ? '(女)' : ''}`;
} else if (this.schoolLevel == 2) {
name2 = `年级${this.sexType == 1 ? '(男)' : this.sexType == 2 ? '(女)' : ''}`;
} else if (this.schoolLevel == 3) {
name2 = `学校${this.sexType == 1 ? '(男)' : this.sexType == 2 ? '(女)' : ''}`;
}
}
}
this.allOptionStr = '已对比 | '+ this.optionStr1;
let gradeid = 0,
classid = 0,
departId = 0,
recordId= 0;
if(this.schoolLevel == 0){
recordId = this.checkedRepItem2.id;
}else{
if (this.platformType == 1) {
//高校
departId = this.schoolLevel;
}else {
if (this.schoolLevel == 1) {
classid = this.checkedRepItem1.ClassId;
} else if (this.schoolLevel == 2) {
gradeid = this.checkedRepItem1.GradeId;
}
}
}
let data = {
year: this.checkedRepItem1.Year,
term: this.checkedRepItem1.Term,
year2,
term2,
schoolId: this.schoolId,
gradeid,
classid,
sex: this.sexType,
departId,
recordId,
name1,
name2
}
this.$emit('compareParameters',data)
},
}
}
</script>
<style lang="scss">
.uni-popup{z-index:9999 !important;}
.contrast-box {
.head-box {
display: flex;
align-items: center;
justify-content: space-between;
width: 666rpx;
height: 76rpx;
margin-bottom: 24rpx;
padding: 0 20rpx;
background: #E7F1FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #FFFFFF;
.desc {
display: flex;
align-items: center;
.icon {
width: 28rpx;
height: 28rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHfSURBVEiJ1Va9btswEP5OlBNr01JAMgpUeYNm7FDAeoP2Ddq1UzK5Roc6Q6AoS7auzps4QDt0i4fu1lYVWThFP7Z4HSIpspC4cCMmyLeQR+nu4/GOvAOeAwYn+dQ9zWf/o0vtBSdIvE0KBpkvmfg7AKyY3i5T85eckLzRZS/NICvZnrBdze8kdMN8AWAj4V1gVfgkxFcwhqX8EcAFGeISYPl7tLtXb7jl2dZkJTww7FoyzFelLRsgzwm4tmu0NbcBMz6tVtiPx9Z5kvR8VoXPqvDjUe+oUKI+yjRDPa+P1AkSjwyx2IZQAW/+jHZ+3vd9EGbvlFIyHlsX1dqDPPznhpSSTU+1EjpBMiRDzEwTM3vCdXy1eljC7u/eJpSpiyXN+nPLyiMAiMcUaSeUE5IS2Guvaz1SN1yeuWF+9iiETpAMAT4AcNDZxd+E+y6+NsKrLztzYpwD6rD5gGtLGgC4TnuH7WqhM4aeZS0XbpitPZc6s9RD19ViE54macDvWRV+M47Pq1oQY7/qgZwg8ZwgGb44zl+XcvfVggjfSIgpAJAQ05Lg0gmSD43f1qpFTRiPrQhAtDWputGpxgpp1p8DHAEcNavFg9vEq8+9H7e6621iZ3BP89ngJJ92alQX/gLMKt2XTOFMygAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
.txt-item {
width: 444rpx;
padding-left: 14rpx;
line-height: 21px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 24rpx;
color: #1677ff;
}
}
.btn {
display: flex;
align-items: center;
justify-content: center;
width: 160rpx;
height: 48rpx;
background: #FFFFFF;
border-radius: 8rpx 8rpx 8rpx 8rpx;
font-size: 24rpx;
color: #000000;
&::after {
content: "";
display: block;
width: 0;
height: 0;
margin-left: 6rpx;
border-top: 12rpx solid #333;
border-left: 12rpx solid #fff;
border-right: 12rpx solid #fff;
}
}
}
.search-content {
width: 100%;
background: #fff;
border-top-left-radius: 28rpx;
border-top-right-radius: 28rpx;
overflow: hidden;
.head-title {
width: 100%;
height: 96rpx;
line-height: 96rpx;
text-align: center;
font-size: 32rpx;
color: #333;
font-weight:550;
margin-top:10rpx;
position:relative;
}
.content {
padding: 0 0 0 30rpx;
max-height: 800rpx;
overflow: auto;
.title {
font-size: 28rpx;
color: #333333;
padding: 30rpx 0 20rpx;
}
.sel-box {
display: flex;
align-items: center;
justify-content: space-between;
width: 646rpx;
height: 76rpx;
padding: 0 20rpx;
margin-bottom: 10rpx;
background: #FFFFFF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #EEEEEE;
font-size: 28rpx;
color: #303133;
&::after {
content: "";
display: block;
width: 32rpx;
height: 32rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAOVJREFUWEftldENwiAQhg8mqaM4ifoCYQp1iqY8OYqbWAeBCIlNSEV6HCR9uT6Sy31ff+AQsPMnduYDC3ACnAAnkE3AWnt2zj2NMXOPQTWO4yClPGmt7+t+PwLf4hcAzN77Y6tE0g+894d1v2wC0zRdg+mtVSKFCyEuSqnHZgJLQasEBh5ZxVtAlcDCNwViQa1EDRwlUCNRC0cLYCQo8CqBkgQVXi2Qk4hrYcjEuQH/rlppmJHegvRgAsBAhZMSyMwJ0p8vfUgJpBIh9nduwmHfkCYBLKT7GegB7rIFPUR4CzgBTuAD9XGZISgQdkoAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
}
}
.s-line {
/*position: relative;*/
padding-top: 40rpx;
border-bottom: 2rpx dashed rgba(25,137,250,0.5);
margin-bottom: 30rpx;
width: calc(100% - 30rpx);
text {
position: absolute;
bottom: -30rpx;
left: 50%;
background: #fff;
z-index: 2;
transform: translateX(-50%);
display: block;
padding: 0 20rpx;
font-size: 36rpx;
color: rgba(25,137,250,0.5);
}
}
.options {
display: flex;
flex-wrap: wrap;
.v-line {
border-bottom: 1px dotted #f1ececb8;
margin: 26rpx 0;
}
.item {
position: relative;
min-width: 170rpx;
margin-right: 30rpx;
height: 76rpx;
text-align: center;
line-height: 76rpx;
background: #F3F4F6;
margin-bottom: 30rpx;
padding: 0 20rpx;
border-radius: 12rpx;
font-size: 28rpx;
color: #000000;
&.disable {
color: #C6C6C6;
background: #F8F8F8;
}
&.on {
background: #EDF6FF;
color: #1677ff;
}
}
}
}
.time-content {
background: #fff;
z-index: 9;
display: flex;
padding: 20rpx 30rpx 40rpx;
.left,
.right{
min-height: 400rpx;
overflow: auto;
.time-item {
position: relative;
line-height: 80rpx;
height: 80rpx;
font-size: 28rpx;
color: #333;
border-bottom: 2rpx solid #eee;
&.on {
color: #1b88ff;
&::after {
position: absolute;
right: 20rpx;
top: 50%;
transform: translateY(-50%);
content: "";
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAZCAMAAACM5megAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAATlBMVEUbiP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8AAAAx8hE2AAAAGHRSTlMAH0f2c0SVAfc7bv6JI/hS+UhR+1D0jxRK42VSAAAAAWJLR0QZ7G61iAAAAAd0SU1FB+YKFBEcF+FCm4sAAABsSURBVCjPzdHHDoAwDANQs1cLlJn//1KGEIKqrY+QY/QOiQ2QiRgA4iTlRCTjJC9+QsqPSMVJ3ShGdCuiwgToegu5zrWQ+6MX8j39QMaby41MILoLmWC6JzKkgGFHI+voQKxGTLMshACrdu83CdwKBKKZxqUAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
display: block;
width: 35rpx;
height: 25rpx;
}
}
&.disabled {
color: #ddd;
}
}
}
.left {
width: calc(45% - 20rpx);
padding-left: 10rpx;
}
.right {
width: calc(55% - 20rpx);
padding-left: 10rpx;
}
}
.btn-wrap {
display: flex;
justify-content: center;
padding-top: 10rpx;
padding-bottom: 30rpx;
.btn {
width: 688rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #1677ff;
font-size: 32rpx;
color: #fff;
border-radius: 60rpx;
}
}
}
}
.s_close{position:absolute;top:30rpx;right:6%;width:30rpx;height:30rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAgCAYAAAAFQMh/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjkzQkY4QkFCMjY0MTFGMDlGOThGMzcyM0VCRTJGMkYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjkzQkY4QkJCMjY0MTFGMDlGOThGMzcyM0VCRTJGMkYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGOTNCRjhCOEIyNjQxMUYwOUY5OEYzNzIzRUJFMkYyRiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGOTNCRjhCOUIyNjQxMUYwOUY5OEYzNzIzRUJFMkYyRiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvssjGYAAAO/SURBVHjatJf7a5V1HMef5bN2tduObjp1hMlOTbCpaKTifpI0b1EKXgo0U4Lw/0j8ZSoohkpFKjLvUYrWREX8Qa0oQaw5O7Yzt45jbW7u4nZ8f+R14MvDOdtz9PSB13jOs+37/n6u3+/Ji0aj2zzPaxenxF9i2Mu9lYo66BG/+foxT3SLAXFUtORY9AUxWywTM0WvKDHhWlEkqsSgaBD/5kj0Rdb/VKzms0U34bMjs6jYIvLFd+JBDoTfYc1FiJr9IS6PiUQiteTgZVEhyghHC/l41vDOFRvEKtbuE1fEAXHehBOEOErIJxL2TnFH9GcpmifeFl8gWsJ7E90lfhRtJhzXQ5xqnuR4Pk4kRbN4lIXwfLFZvC9e5d1ZPD2DQ0kTHtLDfUJbgrcW+smiXHSJfwj/SJZPIW0U68QrTni/EqdZ66mZcOrZiumuvRNviUIxXkwl17dpuUw2S2wVK4ia2UWxQ5yjZb10whbWBK2U74S9nJANsrG+NKJzaJkPxGuO6H7xfVA0KJyyNhEjVNWiQEwRlfRgM5tIVe+btMzH4iVhqftV7BQnMnVGOmEPgTjP1YS9HPFOejH1O6velY6nl8Qe8YOb06D5I+TsBq1hLbaENnuXdHSQ7/lMpAieXhffiOPpwhtW2CNk9fSyDYNixMsI9wREk4jWZ8pp2FC7BdcO3bRZFUyh1xOIfU2f/hem2f2QQ+EavV5BXoucGR/nYGnIdqaGtQHyGLRhp8pD22ihTtkMsUYsZKLlBTafz6ZaRxkyoUNti74h1lNcZeSwiYKz0L/O7ycz9c6FOdVG83i6+Fx8SAWn+nQ7g7+HaBTSbjbtHoo/M6QllMc1TKPVDA+zX8QhcZLPCTa0lApfyEk2gOdd2Xo8jTG4gQXNbjLwjzvz2oTvkYIaUlOF5/c5z4fCCtsCm8RH5NBjOOxDNBHo81YmWQH1UIhwhN5Pe3MNCk+lUDaSsyS7tlPmIIMknf2NeITQF7NWKf/TFqx2PxDez2ib8by7JXaHvHleZaN2YVhLy9WhUciVZ8D1eAzh/YRCqnIK6VtxmHCOZkN43uWEeyztVsKGYqlh43MbXMpBnvK0idl7aITwZrKfKT5bezHjdTmbsd6/YJVvHn/JH1Q69969hLfVy96SVHQ7ua4h7BVgvd/lc0cqdnJ6BJ7nq4zlspFRauFewDXqPSo84n6TiHEFfV5R9/BoJPePcTCPm2ivz2Fv0+YncYwLXa6snxFbRE9Pp8jiPvfeDg7x2P/wFbWPVitAx3L8+xMBBgBa0QNtbOSplwAAAABJRU5ErkJggg==") center no-repeat;
background-size:30rpx;
}
</style>

View File

@@ -0,0 +1,213 @@
<template>
<view class="box">
<view class="test-head">
<view class="test-name">
<view class="name">
{{reportTitle}}
</view>
<view class="time">
测评时间{{testTime}}
</view>
</view>
<view class="fun-btn">
<view class="fbtn" @click="playIntroduce" v-if="isIntroduce">
<text class="icon-1"></text>
<text class="name">测评介绍</text>
</view>
<view class="fbtn" @click="playVideo" v-if="isVideo">
<text class="icon-2"></text>
<text class="name">报告解读</text>
</view>
</view>
<!-- 报告解读播放 -->
<uni-popup @change="popupChange" ref="pop_video" type="center">
<view class="video-content">
<video id="visitorVideo" :src="videoUrlVisitor" controls autoplay="true"></video>
</view>
</uni-popup>
<!-- 测评介绍 -->
<uni-popup @change="popupChange" ref="pop_introduce" type="center">
<view class="img-content">
<image :src="introduceUrl" mode="widthFix"></image>
<image v-if="introduceUrl2 !='' " :src="introduceUrl2" mode="widthFix"></image>
</view>
</uni-popup>
</view>
</view>
</template>
<script>
export default {
props: {
// 标题
reportTitle: {
type: String,
default: "",
},
// 时间
testTime: {
type: String,
default: "",
},
//是否测评介绍
isIntroduce: {
type: Boolean,
default: false
},
//是否报告解读
isVideo: {
type: Boolean,
default: false
},
videoUrl: {
type: String,
default: "",
},
//测评介绍图地址
introduceUrl: {
type: String,
default: "",
},
//测评介绍图地址
introduceUrl2: {
type: String,
default: "",
},
value: {
type: Boolean,
default: true,
},
},
data() {
return {
showIntroduce: false,
showVideo: false,
videoUrlVisitor: "",
}
},
methods: {
popupChange(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show)
if (!e.show) {
// 弹窗关闭时的处理逻辑
this.$emit("updateValue", true);
}
},
//视频介绍
playVideo() {
this.videoUrlVisitor = this.videoUrl;
this.$refs.pop_video.open('center');
this.$emit("updateValue", false);
//this.showVideo = true;
},
//报告介绍
playIntroduce() {
this.$refs.pop_introduce.open('center');
this.$emit("updateValue", false);
//this.showIntroduce = true;
},
// showContrastLayer(){
// this.$emit('showParentContrastLayer');
// }
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.test-head {
display: flex;
align-items: center;
justify-content: space-between;
padding-bottom: 30rpx;
margin-bottom: 25rpx;
.test-name {
.name {
font-size: 36rpx;
color: #000000;
font-weight: 600;
margin-bottom: 15rpx;
}
.time {
font-size: 24rpx;
color: #20B664;
}
flex:1;
}
.fun-btn {
display: flex;
align-items: center;
.fbtn {
display: flex;
flex-direction: column;
align-items: center;
margin-left: 40rpx;
.icon-1 {
display: block;
width: 72rpx;
height: 72rpx;
background: url("#{$image-oss-url}/test/btn-1.png") no-repeat;
background-size: 100%;
}
.icon-2 {
display: block;
width: 72rpx;
height: 72rpx;
background: url("#{$image-oss-url}/test/btn-2.png") no-repeat;
background-size: 100%;
}
.name {
font-size: 20rpx;
color: #999;
margin-top: 8rpx;
}
}
}
}
.video-content {
padding: 0;
width: 710rpx;
background: #000;
video {
width: 100%;
// height: 400rpx;
}
}
.img-content {
display: flex;
justify-content: center;
height: 1200rpx;
overflow: auto;
image {
width: 690rpx;
}
}
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 28rpx;
color: #666666;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
</style>

View File

@@ -0,0 +1,767 @@
<template>
<view class="interest-report-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback"></view>
<text>我的报告</text>
</view>
<view class="content">
<contrastBox @updateValue="handleChildValueChange" :testType="testType" :userId="userId" :recordId="recordId" @compareParameters="opCompareParameters"></contrastBox>
<view class="section-block">
<testHead :reportTitle="'通用(职业)能力测评报告'" :testTime="testDate" :isIntroduce="false" :isVideo="false" :videoUrl="videoUrl" :introduceUrl="introduceUrl" ></testHead>
<view class="s-line"></view>
<view class="title">
<view class="name">非常优秀</view>
</view>
<view class="code-value">
<text class="scort" v-text="hightStr==''?'无':hightStr"></text>
</view>
<view class="title">
<view class="name">具有优势</view>
</view>
<view class="code-value">
<text class="scort" v-text="goodStr==''?'无':goodStr"></text>
</view>
<view class="title">
<view class="name">中等</view>
</view>
<view class="code-value">
<text class="scort" v-text="midStr==''?'无':midStr"></text>
</view>
<view class="title">
<view class="name">需要加强</view>
</view>
<view class="code-value">
<text class="scort" v-text="needStr==''?'无':needStr"></text>
</view>
<view class="title">
<view class="name">亟需加强</view>
</view>
<view class="code-value">
<text class="scort" v-text="lowStr==''?'无':lowStr"></text>
</view>
<view class="chat-wrap">
<view class="row-item"><l-echart ref="chartRef" class="charts-box"></l-echart>
</view>
</view>
</view>
<view class="section-block" style="margin-top: -116rpx;">
<view class="title">
<view class="name">测评建议</view>
</view>
<view class="desc-item-wrap">
<view class="desc-item" v-for="(item,index) in list" :key="index">
<view class="name-block" :class="'level-' + item.Level">
<view class="name">{{item.Name}}
<view class="label">{{item.LevelStr}}</view>
</view>
<view class="desc">{{item.Desc}}</view>
</view>
<view class="list" :class="item.showMore?'more':''">
<view class="row">
<text class="strong">提升途径</text>
<text class="txt">{{item.Suggest}}</text>
</view>
<view class="more-btn" @click="changeMore(index)"></view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import testHead from "@/packageCa/testReport/components/testHead.vue"
import contrastBox from "@/packageCa/testReport/components/contrastBox.vue"
import api from "@/apiCa/testManage.js";
import theme from '@/uni_modules/lime-echart/static/walden.json';
const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js');
// import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
// // 注册主题
// echarts.registerTheme('theme', theme);
export default {
components: {
contrastBox,
testHead
},
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
videoUrl: "",
introduceUrl: "",
id: "",
testDate: "",
hightStr: "",
goodStr: "",
midStr: "",
needStr: "",
lowStr: "",
list: [],
result: [],
// 柱状图
barOption: {
title: {
text: ''
},
legend: {
show: true,
},
label: {
show: true,
position: 'right'
},
tooltip: {
className: 'echarts-tooltip',
show: false,
formatter: function(params) {
let result = params.seriesName + '<br>' + params.name + ' ' + params.data +
'分' // 获取横轴对应的数据作为提示信息的标题
return result
}
},
xAxis: {
type: 'value',
max: 5,
},
yAxis: {
type: 'category',
data: ['信息应用', '责任纪律', '创新发展', '问题解决', '团队合作', '人际互动', '持续学习', '沟通表达']
},
grid: {
left: '0%', // 根据实际情况调整
// right: '4%',
// bottom: '3%',
containLabel: true
},
series: [
// {
// name: '2012',
// data: [120, 200, 150, 80, 70, 110, 130,50],
// type: 'bar'
// },
// {
// name: '2011',
// data: [120, 200, 150, 80, 70, 110, 130,50],
// type: 'bar'
// }
]
},
testType: "-28",
userId: 0,
currentYear: 0,
currentTerm: 0,
recordId: 0,
labelName1: "",//表值1
labelName2: "",//表值2
}
},
onLoad(e) {
this.id = e.id;
if (e.year != null) {
this.currentYear = e.year;
}
if (e.term != null) {
this.currentTerm = e.term;
}
if (e.recordId != null) {
this.recordId = e.recordId;
}
this.getTestRecord(this.currentYear, this.currentTerm,this.recordId);
},
methods: {
changeMore(INDEX) {
this.list[INDEX].showMore = !this.list[INDEX].showMore
this.$forceUpdate();
},
//对比参数
opCompareParameters(value){
this.labelName1 = value.name1;
this.labelName2 = value.name2;
this.params = value;
this.getValue()
},
//获取报告结果
getTestRecord(currentYear, currentTerm,recordId) {
uni.showLoading({
title: "加载中"
})
api.queryCustomTestResult(this.testType, currentYear, currentTerm,recordId).then(res => {
uni.hideLoading();
if (res.Result === 1) {
this.testDate = res.Data.TestDate;
let list = res.Data.DimList;
this.result = list;
this.currentYear = res.Data.Year;
this.currentTerm = res.Data.Term;
this.recordId = res.Data.RecordId;
// this.userId = data.UserId;
this.labelName1 = res.Data.TestDate;
let hightStr = "",
goodStr = "",
midStr = "",
needStr = "",
lowStr = "";
list.find(item => {
item.showMore = false;
if (item.Level == 1) {
hightStr += item.Name + '、'
} else if (item.Level == 2) {
goodStr += item.Name + '、'
} else if (item.Level == 3) {
midStr += item.Name + '、'
} else if (item.Level == 4) {
needStr += item.Name + '、'
} else {
lowStr += item.Name + '、'
}
});
this.hightStr = hightStr == '' ? '' : hightStr.substring(0, hightStr.length - 1);
this.goodStr = goodStr == '' ? '' : goodStr.substring(0, goodStr.length - 1);
this.midStr = midStr == '' ? '' : midStr.substring(0, midStr.length - 1);
this.needStr = needStr == '' ? '' : needStr.substring(0, needStr.length - 1);
this.lowStr = lowStr == '' ? '' : lowStr.substring(0, lowStr.length - 1);
this.list = list;
this.initChart();
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
})
},
async initChart() {
let arr = [];
this.result.forEach(item => {
arr.push(item.Score)
})
this.barOption.series = {
name: this.labelName1,
data: arr,
type: "bar"
}
// chart 图表实例不能存在data里
const chart = await this.$refs.chartRef.init(echarts, "theme");
chart.clear();
chart.setOption(this.barOption)
},
//更改对比图
getValue() {
api.getBeCurrentJobGroupResult(this.params.year, this.params.term,this.params.schoolId, this.params.gradeid, this.params.classid, this.params.sex, this.params.departId,this.userId,this.params.recordId).then(res => {
if (res.Result >= 1) {
this.doChart(res.Data.data);
}
})
},
//时间维度/群体维度对比
async doChart(DATA) {
let name1 = this.labelName1;
let name2 = this.labelName2;
let arr = [];
this.result.forEach(item => {
arr.push(item.Score)
})
let arr2 = [];
DATA.forEach(item => {
arr2.push(item.Score)
})
this.barOption.series = [{
name: name1,
data: arr,
type: 'bar'
},
{
name: name2,
data: arr2,
type: 'bar'
},
];
const chart = await this.$refs.chartRef.init(echarts, "theme");
chart.clear();
chart.setOption(this.barOption)
},
goback() {
uni.navigateBack(-1);
}
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: #EEF1F8 url('#{$image-oss-url}/test_bg.png') no-repeat;
background-size: contain;
overflow-y: scroll;
}
</style>
<style lang="scss" scoped>
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.vip-tip-block {
width: 650rpx;
height: 400rpx;
background: #fff url('#{$image-oss-url}/report-vip-tip.png') no-repeat;
background-size: 100%;
}
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 28rpx;
color: #666666;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
.img-content {
display: flex;
justify-content: center;
height: 1200rpx;
overflow: auto;
image {
width: 690rpx;
}
}
.interest-report-wrap {
min-height: 100vh;
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.video-content {
padding: 0;
width: 710rpx;
background: #000;
video {
width: 100%;
}
}
.content {
padding: 35rpx 20rpx 220rpx;
.section-block {
padding: 40rpx 30rpx 20rpx;
background: #fff;
border-radius: 12rpx;
overflow: hidden;
.s-line {
position: relative;
width: 630rpx;
margin: 15rpx auto 45rpx;
height: 2rpx;
background: #FAFAFA;
&:before {
content: "";
display: block;
position: absolute;
left: -56rpx;
top: -16rpx;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #EEF1F8;
}
&::after {
content: "";
display: block;
position: absolute;
right: -56rpx;
top: -16rpx;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #EEF1F8;
}
}
.title {
display: flex;
align-items: center;
margin-bottom: 30rpx;
.name {
position: relative;
font-weight: 600;
font-size: 32rpx;
color: #000000;
z-index: 1;
&::after {
content: "";
display: block;
position: absolute;
bottom: -3rpx;
left: -6rpx;
width: calc(100% + 12rpx);
height: 12rpx;
background: #BBDCFF;
border-radius: 12rpx;
z-index: -1;
}
}
}
.code-value {
position: relative;
display: flex;
align-items: flex-end;
padding-bottom: 40rpx;
.scort {
font-size: 36rpx;
color: #1677ff;
font-weight: 600;
}
}
.job-table {
border-left: 2rpx solid #EEF2FD;
border-top: 2rpx solid #EEF2FD;
border-right: 2rpx solid #EEF2FD;
border-radius: 4rpx;
width: 630rpx;
.tr {
display: flex;
border-bottom: 2rpx solid #EEF2FD;
&:nth-child(2n+1) {
background: #F6F9FE;
}
.th {
width: 469rpx;
height: 72rpx;
font-size: 24rpx;
color: #666666;
text-align: center;
line-height: 72rpx;
background: #f6f9fe;
&:nth-child(1) {
width: 132rpx;
}
}
.td {
display: flex;
align-items: center;
width: 459rpx;
padding: 0 20rpx;
height: 220rpx;
font-size: 28rpx;
color: #333333;
line-height: 42rpx;
&:nth-child(1) {
width: 132rpx;
padding: 0;
color: #666666;
justify-content: center;
}
}
}
}
.chat-wrap {
position: relative;
// padding: 15rpx 0;
// margin: 30rpx 0 0;
z-index: 1;
// &:before {
// position: absolute;
// left: 118rpx;
// top: 0;
// content: "";
// display: block;
// width: 2rpx;
// height: 100%;
// background: #c9cdd4;
// }
.row-item {
display: flex;
align-items: center;
.charts-box {
width: 100%;
height: 400px;
}
.name {
display: flex;
flex-wrap: wrap;
align-items: center;
width: 100rpx;
height: 60rpx;
font-size: 24rpx;
color: #666666;
margin-right: 20rpx;
}
// .bar-wrap {
// display: flex;
// align-items: center;
// width: 488rpx;
// .bar {
// position: relative;
// border-radius: 0 8rpx 8rpx 0rpx;
// height: 16rpx;
// background: linear-gradient(to left, #1677ff 0%, rgba(25, 137, 250, 0.5) 100%);
// .score {
// position: absolute;
// right: -33rpx;
// top: -9rpx;
// font-size: 24rpx;
// margin-left: 8rpx;
// color: #2E94FA;
// }
// }
// }
}
.level-desc {
position: absolute;
left: 110rpx;
bottom: -54rpx;
font-size: 24rpx;
color: #666666;
display: flex;
align-items: center;
z-index: -1;
.item-1 {
margin-right: 82rpx;
}
.item-2,
.item-3,
.item-4,
.item-5 {
position: relative;
margin-right: 67rpx;
width: 30rpx;
text-align: center;
&::after {
position: absolute;
left: 50%;
top: -408rpx;
transform: translateX(-50%);
content: "";
display: block;
width: 0;
height: 388rpx;
border-left: 2rpx dashed #E5E6EB;
}
}
.item-6 {
position: relative;
width: 30rpx;
text-align: center;
&::after {
position: absolute;
left: 50%;
top: -408rpx;
transform: translateX(-50%);
content: "";
display: block;
width: 0;
height: 388rpx;
border-left: 2rpx dashed #E5E6EB;
}
}
}
}
.desc-item-wrap {
.desc-item {
margin-bottom: 40rpx;
.name-block {
width: 590rpx;
padding: 25rpx 20rpx;
margin-bottom: 25rpx;
background: #F2F9FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #E7F4FD;
.name {
display: flex;
align-items: center;
font-size: 32rpx;
color: #000000;
margin-bottom: 15rpx;
.label {
height: 36rpx;
padding: 0 15rpx;
background: #1677ff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
text-align: center;
line-height: 36rpx;
font-size: 20rpx;
margin-left: 10rpx;
color: #FFFFFF;
}
}
.desc {
font-size: 28rpx;
color: #666666;
line-height: 42rpx;
}
&.level-1 {
background: #F2F9FF;
.name {
.label {
background: #1677ff;
}
}
}
&.level-2 {
background: #F7F7FF;
border: 2rpx solid #ECEEFD;
.name {
.label {
background: #7C7CFF;
}
}
}
&.level-3 {
background: #FFFBF7;
border: 2rpx solid #FDF1EC;
.name {
.label {
background: #FF9E3D;
}
}
}
&.level-4 {
background: #F7FFF9;
border: 2rpx solid #C1EDC9;
.name {
.label {
background: #20B664;
}
}
}
&.level-5 {
background: #FFF9F7;
border: 2rpx solid #FFD5D5;
.name {
.label {
background: #FC503C;
}
}
}
}
.list {
position: relative;
height: 83rpx;
line-height: 44rpx;
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
.more-btn {
position: absolute;
right: 30rpx;
top: 20rpx;
width: 44rpx;
height: 44rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAG+SURBVFiF7ZjPTcMwFId/dlEPPXWEbABMAN2gbNCeLJ8oEzSdIOIUOZd2A2CDMgFs0IwAA+SZSwNJiN20TlKB/J2ivMTvp6dPzh/A4/F4/hXMVIiiaDwcDgPO+bjPQAAgpdyaasbASqkdgKCDPE14F0Jc1xW45abeJ1sgMBUuTAUiuuOc33QS5wBE9HqOvh5PH9i2tQWA+x6zFNkIIVZ1BeMuASDqKEwTQgBHBw4BzNrP0ojHM/X1eDx/HuuDgzF2mWXZSkqZ9hEmSZIrrfWSiF6klJu6a2zvw5HWesY53ymllt1E/EEptdBavwGYcs7XputsD45nANP9cZgkSdDFtKMoGo9Go3WhV967FqMSALCfbFg4lRLRpK3QewWeUP7CCE3vEYBdCQghVkQ0AZAHDNpSpKBAHjYlooktLHBgwjlxHAeDwWCttb79vpGxzSmK1CnAGNtmWTZvslajwDmuipyiQBWrElVcFDlVgSpHTTjnGEVcFWglcM4hRdpQoIpTYACI4/h2v9GXQgH4RPmrJSWiue03VBOcAwP1ipSaOCjway3XBYrUKAI4KlCl1cBASZEPInpwVcDj8XiO4wvpvvJkdM3Z9AAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
transition: transform .8s;
}
.row {
position: relative;
width: 536rpx;
.strong {
font-size: 28rpx;
color: #333;
}
.txt {
font-size: 28rpx;
color: #666666;
}
}
&.more {
overflow: inherit;
display: block;
height: 100%;
.more-btn {
transform: rotate(180deg);
}
}
}
}
}
}
}
}
.lime-echart {
z-index: 10 !important;
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,147 @@
[
{
"Name": "阅读理解",
"Desc": "阅读各类书籍文章。书写摘要。参加读书会讨论分享。将所读转换为简报、图画或影音。学好国文、英文。",
"Point": "我能从文章中了解其想表达的讯息或意涵,或能产生自己的观点。"
},
{
"Name": "口语辨识",
"Desc": "练习组织笔记。观察别人发言、专心听讲。看无字幕影片写摘要。",
"Point": "我能听懂别人口语的讯息,并实时反应。"
},
{
"Name": "口语表达",
"Desc": "掌握上台表达机会,观察别人讲话,参加演讲、辩论等活动,录像录音纪录增进表达技巧。",
"Point": "我能用口语清晰流畅的表达思想和情感。"
},
{
"Name": "写作表达",
"Desc": "撰写文章并投稿。为课业成果多写心得反思。写手帐。参加作文或写作比赛。参加校刊社或写作社团。",
"Point": "我能写出文意通顺、逻辑清晰的文章。"
},
{
"Name": "外语能力",
"Desc": "参加英语话剧或演讲比赛。阅读英文小说或看网络新闻。多听唱外国歌曲。用英文与同学交谈。参加交换学生。",
"Point": "我的英文能力听说读写都很好。"
},
{
"Name": "计算能力",
"Desc": "学好数学、练习口算加减乘除、常常练习计算题。",
"Point": "我能快速的使用加减乘除运算出正确结果。"
},
{
"Name": "逻辑推理",
"Desc": "学好数理化。讨论一个主题的定义、辩论对立、如何解释。撰写分析报告。",
"Point": "我能依据讯息或事情发展的趋势,归纳推理出合理的答案。"
},
{
"Name": "数学推理",
"Desc": "学好数学与统计。尝试分析资料。",
"Point": "我能选择正确的数学方法或公式来解决问题。"
},
{
"Name": "空间定向",
"Desc": "学好空间几何。观察实物或画立体图。了解图形的移动、分解与组合。平面与立体的转换。绘制学校小区地图。",
"Point": "我擅于观察空间方位,想象物体在不同方位的旋转样貌。"
},
{
"Name": "机械推理",
"Desc": "学好物理。各种工程师都需要机械推理能力。浏览在线机械开放课程。修理脚踏车或小家电。参加铁道迷社团。",
"Point": "我能了解机械与电子设备的运作方式,且能组装、调整或修理。"
},
{
"Name": "科学能力",
"Desc": "参与科展。参加科学营队或社团。关注科技发展。阅览科学网站或书籍。",
"Point": "我能运用科学规则和方法来解决问题。"
},
{
"Name": "操作控制",
"Desc": "学会骑脚踏车、动手完成生活科技作品、遥控无人机、控制机器手臂、使用电子绘图板。",
"Point": "我的手臂稳定、敏捷,能控制机器或车辆到精确位置,且对信号快速反应。"
},
{
"Name": "近观细察",
"Desc": "学习从顺序观察法、分步观察法、角度观察法去观察生活用品、科学实验,学会用书写或绘图来记录观察。",
"Point": "能够近距离看到细节。"
},
{
"Name": "程序设计",
"Desc": "参加基础信息相关课程,学习程序语言。参加大学信息营队。参观信息展览。",
"Point": "我会撰写计算机程序来解决学习或工作上的需要。"
},
{
"Name": "信息运用",
"Desc": "熟悉计算机软件操作,如文字处理和电子表格、影音剪辑、图像处理软件。参加信息检索竞赛。善用网络找数据。",
"Point": "我很能学习与使用新的软件或APP来解决问题。"
},
{
"Name": "排序分类",
"Desc": "凡举科学实验、工程、会计财金、统计精算等专业,皆需要排序分类的能力。整理书籍讲义与考卷。",
"Point": "我能将数据或物品排列顺序,或将其分门别类。"
},
{
"Name": "自然观察",
"Desc": "体验室外攀岩活动、参加童军社或是野外踏青社团。饲养昆虫或植物并记录。探访动物园、牧场或海洋博物馆。",
"Point": "我乐于欣赏自然现象,能分辨动植物差异,并探讨现象原因。"
},
{
"Name": "养育照护",
"Desc": "参与呼吸急救课程。研究疾病传播的过程。观察与照顾小动物。学好生物课程。多关注营养保健信息。",
"Point": "我对需要照顾的人或小动物能提供妥善的照顾。"
},
{
"Name": "助人服务",
"Desc": "参加慈善社团或活动。阅览与心理社会相关书籍或网站。参加服务性质志工。到餐饮业或休闲园区实习。",
"Point": "我会主动服务他人,帮助他们解决问题。"
},
{
"Name": "说服推广",
"Desc": "参加辩论社或比赛。加入广播社练习推广。在社团练习组织、筹备、规划宣传等工作。练习撰写营销活动企划。",
"Point": "我善于说服他人采纳我的意见或理念。"
},
{
"Name": "合作协调",
"Desc": "担任班级或社团干部。参与分工合作的团体任务。担任活动队长。练习分析问题。参加暑期实习生或志工。",
"Point": "我能掌握细节、依规则有系统地安排事情或分工,并完成任务。"
},
{
"Name": "社会觉察",
"Desc": "走访社会服务机构或公益组织如赡养中心、NGO机构。分析社会环境对人的影响。对社会时事发表自身观点。",
"Point": "我能观察出生活周边的变化、发生事情及其原因。"
},
{
"Name": "教学培训",
"Desc": "协助同学解决学习困难,设计学习活动活动,担任课辅小老师,观察老师的教学方法。",
"Point": "我能观察出生活周边的变化、发生事情及其原因。"
},
{
"Name": "美感鉴赏",
"Desc": "常与同学讨论作品,练习表达自己的想法,培养赏析能力。观看艺术相关专业的影片,多逛逛博物馆与画廊。",
"Point": "我能运用色彩、质感、和结构,来品鉴与沟通东西的质量。"
},
{
"Name": "绘图设计",
"Desc": "提升素描能力,透过各种可素材或载体练习并完成素描、绘画、插画、摄影、影片、海报等。",
"Point": "我能运用素描色彩图样来表达我的风格意念。"
},
{
"Name": "创作力",
"Desc": "累积作品量,阅读创意大师的创作生涯,多逛逛博物馆与画廊,观看艺术相关专业的影片。",
"Point": "能提出不寻常或聪明想法,创造方法解决问题。"
},
{
"Name": "表演能力",
"Desc": "选修表演艺术课程。参加戏剧表演或社团。现场欣赏话剧演出。",
"Point": "我能在舞台或传播媒体上表演戏剧、歌唱或舞蹈。"
},
{
"Name": "音乐能力",
"Desc": "加入学校的乐团或合唱团。时常听不同曲风的音乐。参加音乐表演或竞赛。多练习乐器演奏。多欣赏音乐表演。",
"Point": "我对音乐具有音感、节奏、表演或创作的能力。"
},
{
"Name": "肢体协调",
"Desc": "培养运动的习惯。体验不同运动。参加运动或舞蹈社团。自主身体保养与维护。观看运动赛事。",
"Point": "我的身体强韧,有耐力,灵活,平衡感良好,协调性佳。"
}
]

View File

@@ -0,0 +1,855 @@
<template>
<view class="interest-report-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback"></view>
<text>我的报告</text>
</view>
<view class="content">
<contrastBox :testType="testType" :userId="userId" :recordId="recordId" @compareParameters="opCompareParameters"></contrastBox>
<view class="section-block">
<testHead :reportTitle="'多元(职业)能力测评报告'" :testTime="testDate" :isIntroduce="false" :isVideo="false" :videoUrl="videoUrl" :introduceUrl="introduceUrl" :introduceUrl2="introduceUrl2"></testHead>
<view class="s-line"></view>
<view class="title">
<view class="name">能力强</view>
</view>
<view class="code-value">
<text class="scort" v-text="advantage!=''?advantage:'无'"></text>
</view>
<view class="title">
<view class="name">能力中</view>
</view>
<view class="code-value">
<text class="scort" v-text="mid!=''?mid:'无'"></text>
</view>
<view class="title">
<view class="name">待加强</view>
</view>
<view class="code-value">
<text class="scort" v-text="low!=''?low:'无'"></text>
</view>
<view class="chat-wrap blue-bg" style="margin-bottom:68rpx;">
<view class="chat-title">
语文相关能力得分
</view>
<view class="row-item"><l-echart ref="charts1" class="charts-box"></l-echart>
</view>
</view>
<view class="chat-wrap purple-bg" style="margin-bottom:68rpx;">
<view class="chat-title">
数学相关能力得分
</view>
<view class="row-item"><l-echart ref="charts2" class="charts-box"></l-echart>
</view>
</view>
<view class="chat-wrap orange-bg" style="margin-bottom:68rpx;">
<view class="chat-title">
科技相关能力得分
</view>
<view class="row-item"><l-echart ref="charts3" class="charts-box"></l-echart>
</view>
</view>
<view class="chat-wrap green-bg" style="margin-bottom:68rpx;">
<view class="chat-title">
资讯相关能力得分
</view>
<view class="row-item"><l-echart ref="charts4" class="charts-box"></l-echart>
</view>
</view>
<view class="chat-wrap blue-bg" style="margin-bottom:68rpx;">
<view class="chat-title">
人际相关能力得分
</view>
<view class="row-item"><l-echart ref="charts5" class="charts-box"></l-echart>
</view>
</view>
<view class="chat-wrap purple-bg" style="margin-bottom:68rpx;">
<view class="chat-title">
美感相关能力得分
</view>
<view class="row-item"><l-echart ref="charts6" class="charts-box"></l-echart>
</view>
</view>
<view class="chat-wrap orange-bg" style="margin-bottom:68rpx;">
<view class="chat-title">
自然相关能力得分
</view>
<view class="row-item"><l-echart ref="charts7" class="charts-box"></l-echart>
</view>
</view>
<view class="chat-wrap green-bg">
<view class="chat-title">
艺能相关能力得分
</view>
<view class="row-item"><l-echart ref="charts8" class="charts-box"></l-echart>
</view>
</view>
</view>
<view class="section-block" >
<view class="title">
<view class="name">提升途径</view>
</view>
<view class="desc-item-wrap">
<view class="desc-item" v-for="(item,index) in wayData" :key="index">
<view class="name-block">
<view class="name">{{item.Name}}</view>
<view class="desc">{{item.Point}}</view>
</view>
<view class="list">
<view class="row">
<text class="strong">提升途径</text>
<text class="txt">{{item.Desc}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import testHead from "@/packageCa/testReport/components/testHead.vue"
import contrastBox from "@/packageCa/testReport/components/contrastBox.vue"
import api from "@/apiCa/testManage.js"
import wayData from "./multipleAbilityData.json";
import theme from '@/uni_modules/lime-echart/static/walden.json';
const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js');
// import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
// // 注册主题
// echarts.registerTheme('theme', theme);
export default {
components: {
contrastBox,
testHead
},
data() {
return {
platform: uni.getDeviceInfo().platform,
barHeight: wx.getWindowInfo().statusBarHeight,
introduceUrl: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh/report/multipleAbilityTestReport-1.png",
introduceUrl2: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh/report/multipleAbilityTestReport-2.png",
videoUrl: "http://2-video.oss-cn-shenzhen.aliyuncs.com/2023%E5%B9%B4%E8%A7%86%E9%A2%91/%E5%88%9D%E4%B8%AD%E8%AF%BE%E7%A8%8B%E8%B5%84%E6%BA%90/%E5%A4%9A%E5%85%83%E6%99%BA%E8%83%BD%E6%B5%8B%E8%AF%84%E8%A7%A3%E8%AF%BB1.16%E4%BF%AE%E6%94%B92.mp4",
testDate: "",
id: "",
wayData,
advantage: '',
mid: '',
low: "",
chartData1: {
categories: ["外语能力", "写作表达", "口语表达", "口语辨识", "阅读理解"],
series: [{
name: "",
data: []
}]
},
chartData2: {
categories: ["数学推理", "逻辑推理", "计算能力"],
series: [{
name: "",
data: []
}]
},
chartData3: {
categories: ["近观细察", "操作控制", "科学能力", "机械推理", "空间定向"],
series: [{
name: "",
data: []
}]
},
chartData4: {
categories: ["排序分类", "信息运用", "程序设计"],
series: [{
name: "",
data: []
}]
},
chartData5: {
categories: ["教学培训", "社会觉察", "合作协调", "说服推广", "助人服务"],
series: [{
name: "",
data: []
}]
},
chartData6: {
categories: ["创作力", "绘图设计", "美感鉴赏"],
series: [{
name: "",
data: []
}]
},
chartData7: {
categories: ["养育照护", "自然观察"],
series: [{
name: "",
data: []
}]
},
chartData8: {
categories: ["肢体协调", "音乐能力", "表演能力"],
series: [{
name: "",
data: []
}]
},
opts: {
color: ["#1677ff"],
padding: [10, 0, 0, 0],
enableScroll: false,
xAxis: {
disableGrid: true,
axisLineColor: "#EEEEEE",
fontSize: 12,
},
legend: {
show: false,
},
yAxis: {
gridType: "dash",
dashLength: 2,
showTitle: true,
gridColor: "#EEEEEE",
splitNumber: 4,
data: [{
max: 12,
min: 0,
axisLine: false,
title: "等级"
}]
},
extra: {
line: {
type: "straight",
width: 3,
activeType: "hollow"
}
}
}, //图表配置
opts2: {},
opts3: {},
opts4: {},
result: [],
data1: [], //初始数据1
data2: [],
data3: [],
data4: [],
data5: [],
data6: [],
data7: [],
data8: [],
option1: {},
option2: {},
option3: {},
option4: {},
option5: {},
option6: {},
option7: {},
option8: {},
showIntroduce: false, // 测评介绍
testType: "-27",
userId: 0,
currentYear: 0,
currentTerm: 0,
recordId: 0,
labelName1: "",//表值1
labelName2: "",//表值2
}
},
onLoad(e) {
this.id = e.id;
if (e.year != null) {
this.currentYear = e.year;
}
if (e.term != null) {
this.currentTerm = e.term;
}
if (e.recordId != null) {
this.recordId = e.recordId;
}
this.getTestRecord(this.currentYear, this.currentTerm,this.recordId);
},
methods: {
//对比参数
opCompareParameters(value){
this.labelName1 = value.name1;
this.labelName2 = value.name2;
this.params = value;
this.getValue()
},
//获取报告结果
getTestRecord(currentYear, currentTerm,recordId) {
uni.showLoading({
title: "加载中"
})
api.queryCustomTestResult(this.testType, currentYear, currentTerm,recordId).then(res => {
uni.hideLoading();
if (res.Result === 1) {
let data = res.Data;
this.testDate = data.TestDate;
this.currentYear = data.Year;
this.currentTerm = data.Term;
this.recordId = data.RecordId;
// this.userId = data.UserId;
this.labelName1 = data.TestDate;
this.advantage = data.DimLevelList[0].DimStr;
this.mid = data.DimLevelList[1].DimStr;
this.low = data.DimLevelList[2].DimStr;
let list = data.DimList;
this.result = list;
this.initChart();
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
})
},
async initChart() {
let data1 = [],
data2 = [],
data3 = [],
data4 = [],
data5 = [],
data6 = [],
data7 = [],
data8 = [];
this.result.forEach(item => {
switch (item.Name) {
case "阅读理解":
case "口语表达":
case "写作表达":
case "外语能力": {
data1.push(item);
break
}
case "计算能力":
case "逻辑推理":
case "数学推理": {
data2.push(item);
break
}
case "空间定向":
case "机械推理":
case "科学能力":
case "操作控制":
case "近观细察": {
data3.push(item);
break
}
case "程序设计":
case "信息运用":
case "排序分类": {
data4.push(item);
break
}
case "自省觉察":
case "助人服务":
case "说服推广":
case "合作协调":
case "社会觉察":
case "教学培训": {
data5.push(item);
break
}
case "美感鉴赏":
case "绘图设计":
case "创作力": {
data6.push(item);
break
}
case "自然观察":
case "养育照护": {
data7.push(item);
break
}
case "表演能力":
case "音乐能力":
case "肢体协调": {
data8.push(item);
break
}
}
})
this.data1 = data1;
this.data2 = data2;
this.data3 = data3;
this.data4 = data4;
this.data5 = data5;
if (data5.length == 5) {
data5.push({
Name: "自省觉察",
Score: 0,
})
}
this.data6 = data6;
this.data7 = data7;
this.data8 = data8;
let name = this.labelName1;
let legend = [name];
this.createdChart('charts1', '语文相关能力得分', legend, data1);
this.createdChart('charts2', '数学相关能力得分', legend, data2);
this.createdChart('charts3', '科技相关能力得分', legend, data3);
this.createdChart('charts4', '资讯相关能力得分', legend, data4);
this.createdChart('charts5', '人际相关能力得分', legend, data5);
this.createdChart('charts6', '美感相关能力得分', legend, data6);
this.createdChart('charts7', '自然相关能力得分', legend, data7);
this.createdChart('charts8', '艺能相关能力得分', legend, data8);
},
//更改对比图
getValue() {
api.getMultipleAbilityGroupResult(this.params.year, this.params.term,this.params.schoolId, this.params.gradeid, this.params.classid, this.params.sex, this.params.departId,this.userId,this.params.recordId).then(res => {
if (res.Result >= 1) {
this.doChart(res.Data);
}
})
},
//时间维度/群体维度对比
async doChart(DATA) {
let name1 = this.labelName1;
let name2 = this.labelName2;
let legend = [name1, name2];
let data = [];
DATA.forEach((item, index) => {
switch (index) {
case 0: {
data = this.data1;
break;
}
case 1: {
data = this.data2;
break;
}
case 2: {
data = this.data3;
break;
}
case 3: {
data = this.data4;
break;
}
case 4: {
data = this.data5;
if (item.data.length == 5) {
item.data.push(0)
}
break;
}
case 5: {
data = this.data6;
break;
}
case 6: {
data = this.data7;
break;
}
case 7: {
data = this.data8;
break;
}
}
this.createdChart(`charts${index+1}`, item.name, legend, data, item.data);
})
},
//生成图表
async createdChart(EL, TITLE, LEGEND, DATA1, DATA2) {
let categories = [];
let seriesData1 = [];
let seriesData2 = DATA2;
DATA1.forEach(item => {
categories.push(item.Name);
seriesData1.push(parseInt(item.Score));
})
let seriesDataAll = [{
name: LEGEND[0],
type: 'line',
data: seriesData1
}];
if (seriesData2) {
seriesDataAll.push({
name: LEGEND[1],
type: 'line',
data: seriesData2
})
}
const option = {
title: {
text: "",
textStyle: {
fontSize: 14
},
top: 10,
left: 10
},
tooltip: {
show:false,
trigger: 'axis'
},
label:{
show:true,
},
legend: {
// data: ['Email', 'Union Ads']
show: true,
data: LEGEND,
right: 4,
top: 4
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
// data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
data: categories
},
yAxis: {
type: 'value'
},
series: seriesDataAll
// series: [
// {
// type: 'line',
// data: [120, 132, 101, 134, 90, 230, 210]
// },
// {
// type: 'line',
// data: [220, 182, 191, 234, 290, 330, 310]
// }
// ]
}
// chart 图表实例不能存在data里
if (EL == "charts1") {
this.option1 = option;
const chart = await this.$refs.charts1.init(echarts, "theme");
chart.clear();
chart.setOption(this.option1 )
} else if (EL == "charts2") {
this.option2 = option;
const chart = await this.$refs.charts2.init(echarts, "theme");
chart.clear();
chart.setOption(this.option2)
} else if (EL == "charts3") {
this.option3 = option;
const chart = await this.$refs.charts3.init(echarts, "theme");
chart.clear();
chart.setOption( this.option3 )
} else if (EL == "charts4") {
this.option4 = option;
const chart = await this.$refs.charts4.init(echarts, "theme");
chart.clear();
chart.setOption( this.option4)
} else if (EL == "charts5") {
this.option5 = option;
const chart = await this.$refs.charts5.init(echarts, "theme");
chart.clear();
chart.setOption(this.option5)
} else if (EL == "charts6") {
this.option6 = option;
const chart = await this.$refs.charts6.init(echarts, "theme");
chart.clear();
chart.setOption(this.option6)
} else if (EL == "charts7") {
this.option7 = option;
const chart = await this.$refs.charts7.init(echarts, "theme");
chart.clear();
chart.setOption( this.option7)
} else if (EL == "charts8") {
this.option8 = option;
const chart = await this.$refs.charts8.init(echarts, "theme");
chart.clear();
chart.setOption(this.option8)
}
},
goback() {
uni.navigateBack(-1);
}
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: #EEF1F8 url('#{$image-oss-url}/test_bg.png') no-repeat;
background-size: contain;
overflow-y: scroll;
}
</style>
<style lang="scss" scoped>
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.vip-tip-block {
width: 650rpx;
height: 400rpx;
background: #fff url('#{$image-oss-url}/report-vip-tip.png') no-repeat;
background-size: 100%;
}
.tip-layer {
.title {
font-size: 36rpx;
color: #000000;
text-align: center;
font-weight: 600;
margin-bottom: 30rpx;
}
.desc {
font-size: 28rpx;
color: #666666;
margin-bottom: 20rpx;
&:last-child {
margin-bottom: 0;
}
}
}
.img-content {
width: 690rpx;
height: 1200rpx;
overflow: auto;
image {
width: 690rpx;
}
}
.interest-report-wrap {
min-height: 100vh;
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.video-content {
padding: 0;
width: 710rpx;
background: #000;
video {
width: 100%;
}
}
.content {
padding: 35rpx 20rpx 220rpx;
.section-block {
padding: 40rpx 30rpx 40rpx;
background: #fff;
border-radius: 12rpx;
margin-bottom: 20rpx;
overflow: hidden;
.s-line {
position: relative;
width: 630rpx;
margin: 15rpx auto 45rpx;
height: 2rpx;
background: #FAFAFA;
&:before {
content: "";
display: block;
position: absolute;
left: -56rpx;
top: -16rpx;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #EEF1F8;
}
&::after {
content: "";
display: block;
position: absolute;
right: -56rpx;
top: -16rpx;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #EEF1F8;
}
}
.code-value {
position: relative;
display: flex;
align-items: flex-end;
margin-bottom: 20rpx;
padding-top: 10rpx;
padding-bottom: 20rpx;
.scort {
font-size: 36rpx;
color: #3095F9;
font-weight: 600;
}
}
.chat-wrap {
width: 622rpx;
height: 448rpx;
border-radius: 12rpx;
margin: 0 14rpx;
box-shadow: 0 0 1rpx 14rpx #BBDCFF;
.row-item {
display: flex;
align-items: center;
.charts-box {
width: 100%;
height: 190px;
}
}
.chat {
height: 370rpx;
}
&.blue-bg {
box-shadow: 0 0 1rpx 14rpx #BBDCFF;
margin-bottom: 40rpx;
}
&.purple-bg {
box-shadow: 0 0 1rpx 14rpx #C7C7FF;
margin-bottom: 40rpx;
}
&.orange-bg {
box-shadow: 0 0 1rpx 14rpx #FFD4A8;
margin-bottom: 40rpx;
}
&.green-bg {
box-shadow: 0 0 1rpx 14rpx #8FDAB1;
}
.chat-title {
padding-top: 25rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: 600;
color: #000000;
border-radius: 12rpx 12rpx 0 0;
}
}
.title {
display: flex;
align-items: center;
margin-bottom: 30rpx;
.name {
position: relative;
font-weight: 600;
font-size: 32rpx;
color: #000000;
z-index: 1;
&::after {
content: "";
display: block;
position: absolute;
bottom: -3rpx;
left: -6rpx;
width: calc(100% + 12rpx);
height: 12rpx;
background: #BBDCFF;
border-radius: 12rpx;
z-index: -1;
}
}
.tip-icon {
margin-left: 10rpx;
width: 56rpx;
height: 56rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEUAAADMzMzPz8/Hx8fLy8vMzMzNzc3Nzc3KysrMzMzMzMzMzMzKysrLy8vMzMzMzMzMzMxTlLHLAAAAEHRSTlMA3xAgQFCPfzCfr+9gcL/P9mj/kgAAAQFJREFUKM9tUtsWwyAIUwS1um78/9fOFPB0l7woEAIi6QZikV7SH5Sa9UJu5Tt06A0H3WM9I2U0lnPgOjltPBDqYTHCj20to9Kl0HFQXQ7n0lSV8OkTirKUrK1j5SGW1QDv4h1Xo4sFsabaiNrKdWYx59Vb1ozjpdNTqjsBWCZIwQVlpMsygWmZaYDUVU9ruievnFJUE3uHo+3ZMfwCxm1Uh90siaHjINVX3E/VDsdwO1SioWI9O0oOXrgrKA6Ki1Xz8UWdabwYXwweeBrdB++VVCVewtHZdLW+P5tKio/ljzXZVvE1CfBEeJzCbeRYqA36XM2fzW2x1PX/0ncRppvjDWNoDuKTMIXYAAAAAElFTkSuQmCC") center no-repeat;
background-size: 50%;
border-radius: 50%;
}
}
.desc-item-wrap {
.desc-item {
margin-bottom: 40rpx;
.name-block {
width: 590rpx;
padding: 20rpx;
margin-bottom: 20rpx;
background: #F2F9FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #E7F4FD;
.name {
display: flex;
align-items: center;
font-size: 32rpx;
color: #000000;
margin-bottom: 15rpx;
}
.desc {
font-size: 28rpx;
color: #1677ff;
line-height: 42rpx;
}
}
.list {
position: relative;
line-height: 44rpx;
width: 630rpx;
.row {
.strong {
font-size: 28rpx;
color: #333;
}
.txt {
font-size: 28rpx;
color: #666666;
}
}
}
}
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,448 @@
<template>
<view class="interest-report-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback"></view>
<text>我的报告</text>
</view>
<view class="content">
<contrastBox :testType="testType" :userId="userId" :recordId="recordId" @compareParameters="opCompareParameters"></contrastBox>
<view class="section-block">
<testHead :reportTitle="'工作价值观测评报告'" :testTime="testDate" :isIntroduce="false" :isVideo="true" :videoUrl="videoUrl" :introduceUrl="introduceUrl" ></testHead>
<view class="s-line"></view>
<view class="title">
<view class="name">工作价值类型得分</view>
</view>
<view class="chat-wrap">
<view class="row-item">
<l-echart ref="chartRef" class="charts-box"></l-echart>
</view>
</view>
<view class="title">
<view class="name">高分价值观及说明</view>
</view>
<view class="desc-item-wrap" v-if="tableData.length > 0">
<view class="desc-item" v-show="item.Desc != undefined && item.Desc != ''" v-for="(item,index) in tableData" :key="index">
<view class="name-block">
<view class="name">{{item.Name}}
<view class="label">高分</view>
</view>
<view class="desc">{{item.Desc}}</view>
</view>
</view>
</view>
<view class="desc-item-wrap" v-else>
暂无高分价值观
</view>
</view>
</view>
</view>
</template>
<script>
import testHead from "@/packageCa/testReport/components/testHead.vue"
import contrastBox from "@/packageCa/testReport/components/contrastBox.vue"
import api from "@/apiCa/testManage.js";
import theme from '@/uni_modules/lime-echart/static/walden.json';
const echarts = require('../../uni_modules/lime-echart/static/echarts.min.js');
// import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
// // 注册主题
// echarts.registerTheme('theme', theme);
export default {
components: {
contrastBox,
testHead
},
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
showVideo: false,
showIntroduce: false, // 测评介绍
videoUrl: "http://2-video.oss-cn-shenzhen.aliyuncs.com/2023%E5%B9%B4%E8%A7%86%E9%A2%91/%E5%88%9D%E4%B8%AD%E8%AF%BE%E7%A8%8B%E8%B5%84%E6%BA%90/%E5%B7%A5%E4%BD%9C%E4%BB%B7%E5%80%BC%E8%A7%82%E8%A7%A3%E8%AF%BB1.16%E4%BF%AE%E6%94%B92.mp4",
introduceUrl: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh/report/workValuesTestReport.png",
testDate: "",
workValuesNameList: [
'利他主义',
'美的追求',
'创造发明',
'智力激发',
'成就感',
'独立自主',
'声望地位',
'管理权力',
'经济报酬',
'安全稳定',
'工作环境',
'上司关系',
'同事关系',
'生活方式的选择',
'多样变化'
], //
tableData: [],
// 柱状图
barOption: {
title: {
text: ''
},
legend: {
show: true,
},
label: {
show: true,
position: 'right'
},
tooltip: {
formatter: function(params) {
let result = params.seriesName + '<br>' + params.name + ' ' + params.data +
'分' // 获取横轴对应的数据作为提示信息的标题
return result
}
},
xAxis: {
type: 'value',
max: 12,
},
yAxis: {
inverse: true,
type: 'category',
data: ['利他主义', '美的追求', '创造发明', '智力激发', '成就感', '独立自主', '声望地位', '管理权力', '经济报酬', '安全稳定', '工作环境',
'上司关系', '同事关系', '生活方式的选择', '多样变化'
],
},
grid: {
left: '0%', // 根据实际情况调整
// right: '4%',
// bottom: '3%',
containLabel: true
},
series: [
// {
// name: '2012',
// data: [120, 200, 150, 80, 70, 110, 130,50],
// type: 'bar'
// },
// {
// name: '2011',
// data: [120, 200, 150, 80, 70, 110, 130,50],
// type: 'bar'
// }
]
},
result: [],
testType: "17",
userId: 0,
currentYear: 0,
currentTerm: 0,
recordId: 0,
labelName1: "",//表值1
labelName2: "",//表值2
params: {},//筛选参数
}
},
onLoad(e) {
if (e.year != null) {
this.currentYear = e.year;
}
if (e.term != null) {
this.currentTerm = e.term;
}
if (e.recordId != null) {
this.recordId = e.recordId;
}
this.getTestRecord(this.currentYear, this.currentTerm,this.recordId);
},
methods: {
//对比参数
opCompareParameters(value){
this.labelName1 = value.name1;
this.labelName2 = value.name2;
this.params = value;
this.getValue()
},
//获取报告结果
getTestRecord(currentYear, currentTerm,recordId) {
uni.showLoading({
title: "加载中"
})
api.workValuesResult(currentYear, currentTerm,recordId).then(res => {
uni.hideLoading();
if (res.Result === 1) {
if (res.Data.TestResult != null) {
let data = res.Data;
this.testDate = data.TestDate;
let descList = data.Desc;
let scoreList = data.TestResult;
this.result = scoreList;
this.currentYear = data.Year;
this.currentTerm = data.Term;
this.recordId = data.RecordId;
this.userId = data.UserId;
this.labelName1 = data.TestDate;
this.workValuesNameList.forEach((item, index) => {
scoreList.forEach(ritem => {
if (index + 1 == Number(ritem.Title)) {
ritem.Name = item;
}
})
})
scoreList.forEach(item => {
item.Desc = "";
descList.forEach(ritem => {
if (Number(item.Title) == ritem.TitleId) {
item.Desc = ritem.Title;
}
})
})
console.log(scoreList)
this.tableData = scoreList;
this.initChart();
}
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
})
},
//更改对比图
getValue() {
//群体维度对比
api.getWorkValuesTestGroupResult(this.params.year, this.params.term,this.params.schoolId, this.params.gradeid, this.params.classid, this.params.sex, this.params.departId,this.userId,this.params.recordId).then(res => {
if (res.Result >= 1) {
this.doChart(res.Data.data);
}
})
},
//初始化图表
async initChart() {
let arr = [];
this.result.forEach(item => {
arr.push(item.Score)
})
this.barOption.series = {
name: this.labelName1,
data: arr,
type: "bar",
barWidth: 10
}
// chart 图表实例不能存在data里
const chart = await this.$refs.chartRef.init(echarts, "theme");
chart.clear();
chart.setOption(this.barOption)
},
//时间维度/群体维度对比
async doChart(DATA) {
let arr = [];
this.result.forEach(item => {
arr.push(item.Score)
})
this.barOption.series = [{
name: this.labelName1,
data: arr,
type: 'bar',
barWidth: 10
},
{
name: this.labelName2,
data: DATA,
type: 'bar',
barWidth: 10
},
];
const chart = await this.$refs.chartRef.init(echarts, "theme");
chart.clear();
chart.setOption(this.barOption)
},
goback() {
uni.navigateBack(-1);
}
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: #EEF1F8 url('#{$image-oss-url}/test_bg.png') no-repeat;
background-size: contain;
overflow-y:scroll;
}
</style>
<style lang="scss" scoped>
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.vip-tip-block {
width: 650rpx;
height: 400rpx;
background: #fff url('#{$image-oss-url}/report-vip-tip.png') no-repeat;
background-size: 100%;
}
.interest-report-wrap {
min-height: 100vh;
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.content {
padding: 35rpx 20rpx 220rpx;
.section-block {
padding: 40rpx 30rpx 40rpx;
background: #fff;
border-radius: 12rpx;
margin-bottom: 20rpx;
overflow: hidden;
.s-line {
position: relative;
width: 630rpx;
margin: 15rpx auto 45rpx;
height: 2rpx;
background: #FAFAFA;
&:before {
content: "";
display: block;
position: absolute;
left: -56rpx;
top: -16rpx;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #EEF1F8;
}
&::after {
content: "";
display: block;
position: absolute;
right: -56rpx;
top: -16rpx;
width: 32rpx;
height: 32rpx;
border-radius: 50%;
background: #EEF1F8;
}
}
.title {
display: flex;
align-items: center;
margin-bottom: 30rpx;
.name {
position: relative;
font-weight: 600;
font-size: 32rpx;
color: #000000;
z-index: 1;
&::after {
content: "";
display: block;
position: absolute;
bottom: -3rpx;
left: -6rpx;
width: calc(100% + 12rpx);
height: 12rpx;
background: #BBDCFF;
border-radius: 12rpx;
z-index: -1;
}
}
.tip-icon {
margin-left: 10rpx;
width: 56rpx;
height: 56rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEUAAADMzMzPz8/Hx8fLy8vMzMzNzc3Nzc3KysrMzMzMzMzMzMzKysrLy8vMzMzMzMzMzMxTlLHLAAAAEHRSTlMA3xAgQFCPfzCfr+9gcL/P9mj/kgAAAQFJREFUKM9tUtsWwyAIUwS1um78/9fOFPB0l7woEAIi6QZikV7SH5Sa9UJu5Tt06A0H3WM9I2U0lnPgOjltPBDqYTHCj20to9Kl0HFQXQ7n0lSV8OkTirKUrK1j5SGW1QDv4h1Xo4sFsabaiNrKdWYx59Vb1ozjpdNTqjsBWCZIwQVlpMsygWmZaYDUVU9ruievnFJUE3uHo+3ZMfwCxm1Uh90siaHjINVX3E/VDsdwO1SioWI9O0oOXrgrKA6Ki1Xz8UWdabwYXwweeBrdB++VVCVewtHZdLW+P5tKio/ljzXZVvE1CfBEeJzCbeRYqA36XM2fzW2x1PX/0ncRppvjDWNoDuKTMIXYAAAAAElFTkSuQmCC") center no-repeat;
background-size: 50%;
border-radius: 50%;
}
}
.chat-wrap {
position: relative;
z-index: 1;
.row-item {
display: flex;
align-items: center;
.charts-box {
width: 100%;
height: 600px;
}
}
}
.desc-item-wrap {
.desc-item {
margin-bottom: 30rpx;
.name-block {
width: 590rpx;
padding: 20rpx;
margin-bottom: 25rpx;
background: #F2F9FF;
border-radius: 12rpx 12rpx 12rpx 12rpx;
border: 2rpx solid #E7F4FD;
.name {
display: flex;
align-items: center;
font-size: 32rpx;
color: #000000;
margin-bottom: 15rpx;
.label {
width: 60rpx;
height: 36rpx;
background: #1677ff;
border-radius: 8rpx 8rpx 8rpx 8rpx;
text-align: center;
line-height: 36rpx;
font-size: 20rpx;
margin-left: 10rpx;
color: #FFFFFF;
}
}
.desc {
font-size: 28rpx;
color: #666666;
line-height: 42rpx;
}
}
}
}
}
}
}
</style>
<style>
.lime-echart__canvas {
position: absolute;
top: 0; /* 根据需要调整 */
left: 0; /* 根据需要调整 */
z-index: 1 !important; /* 根据需要调整 */
}
</style>

View File

@@ -0,0 +1,365 @@
<template>
<view class="index-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goBack"></view>
<text>生涯罗盘</text>
</view>
<view class="content">
<view class="title">
生涯罗盘
</view>
<view class="section">
<view class="table">
<view class="tr">
<view class="th">
</view>
<view class="th">
职业名称
</view>
<view class="th">
多元能力
</view>
<view class="th">
兴趣测评
</view>
<view class="th">
人格测评
</view>
</view>
<view class="tr" v-for="(item,index) in compassList" @click="checkedJob(item)" :key="index">
<view class="td">
<view class="checked-btn" :class="checkedIndex==item.JobId?'on':''"></view>
</view>
<view class="td">
{{item.Name}}
</view>
<view class="td">
<view class="is-has" v-if="item.IsMulti"></view>
</view>
<view class="td">
<view class="is-has" v-if="item.IsInterest"></view>
</view>
<view class="td">
<view class="is-has" v-if="item.IsPersonal"></view>
</view>
</view>
</view>
</view>
<view class="title">
我的职业
</view>
<view class="section">
<scroll-view
class="job-table"
scroll-y
scroll-x
@scrolltolower="loadMore"
:scroll-with-animation="false"
>
<view class="tr">
<view class="th">
职业规划方向
</view>
<view class="th">
能力要求
</view>
<view class="th">
推荐学习课程
</view>
<view class="th">
推荐岗位
</view>
</view>
<view
class="tr"
v-for="(item, index) in jobList"
:key="index"
>
<view class="td">
{{item.JobName}}
</view>
<view class="td">
<text v-for="(ritem,rindex) in item.AbilityPlanList" :key="rindex">{{ritem}}</text>
</view>
<view class="td">
<text v-for="(ritem,rindex) in item.CoursePlanList" :key="rindex">{{ritem.Name}}</text>
</view>
<view class="td">
<text v-for="(ritem,rindex) in item.JobNameList" :key="rindex">{{ritem}}</text>
</view>
</view>
<view class="loading" v-if="isLoading">
加载中...
</view>
<view class="no-more" v-if="noMore">
没有更多数据了
</view>
</scroll-view>
</view>
</view>
</view>
</template>
<script>
import api from "@/apiCa/studentProfile.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
compassList: [],//罗盘列表
checkedIndex: null,
jobList: [],//我的职业
page: 1,
isLoading: false,
noMore: false,
}
},
created() {
this.getCareerCompassList();
this.getGXCareerPlanList();
},
methods: {
goBack() {
uni.navigateBack(-1);
},
//选中职业添加
async checkedJob(ITEM){
this.checkedIndex = ITEM.JobId;
const res = await api.saveGXCareerPlan(ITEM.JobId);
if (res.Result == 1) {
uni.showToast({
title: "添加成功",
icon: "none"
})
this.getGXCareerPlanList();
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 获取生涯罗盘
async getCareerCompassList() {
uni.showLoading({
title: "加载中..."
})
const res = await api.getCareerCompassList();
uni.hideLoading();
if (res.Result == 1) {
this.compassList = res.Data.list;
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 获取职业
async getGXCareerPlanList(){
this.noMore = false;
this.page = 1;
const res = await api.getGXCareerPlanList("",this.page,10);
if (res.Result == 1) {
this.jobList = res.Data.list;
// if(res.Data.list.length < 10){
// this.noMore = true;
// }
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 加载更多
async loadMore(){
if(this.noMore){
return;
}
this.isLoading = true;
const res = await api.getGXCareerPlanList("",++this.page,10);
this.isLoading = false;
if (res.Result == 1) {
this.jobList = this.jobList.concat(res.Data.list);
if(res.Data.list.length < 10){
this.noMore = true;
}
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
}
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: #EEF1F8 url("#{$image-oss-url}/17.png") no-repeat;
background-size: contain;
}
</style>
<style lang="scss" scoped>
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.index-wrap {
.content {
padding: 0 20rpx;
margin-top: 60rpx;
.title {
font-size: 36rpx;
color: #010101;
margin-bottom: 30rpx;
font-weight: 600;
}
.section {
width: 650rpx;
padding: 30rpx 30rpx 50rpx;
background-color: #ffffff;
border-radius: 14rpx;
margin-bottom: 50rpx;
.table {
border-left: 2rpx solid #eef2fd;
border-top: 2rpx solid #eef2fd;
border-right: 2rpx solid #eef2fd;
border-radius: 6rpx;
overflow-x: auto;
overflow-y: auto;
max-height: 470rpx;
.tr {
display: -webkit-box;
.th {
width: 192rpx;
height: 72rpx;
line-height: 72rpx;
text-align: center;
background: #F6F9FE;
font-size: 24rpx;
color: #333333;
border-bottom: 2rpx solid #eef2fd;
&:nth-child(1){
width: 60rpx;
}
&:nth-child(2){
width: 250rpx;
}
}
.td {
display: flex;
justify-content: center;
align-items: center;
width: 192rpx;
min-height: 72rpx;
font-size: 24rpx;
color: #333333;
text-align: center;
border-bottom: 2rpx solid #eef2fd;
&:nth-child(1){
width: 60rpx;
}
&:nth-child(2){
width: 250rpx;
word-break: break-all;
}
.checked-btn {
width: 28rpx;
height: 28rpx;
background: #FFFFFF;
border-radius: 50%;
border: 2rpx solid #999999;
&.on {
position: relative;
border-color: #1989fa;
background: #1989fa;
&:before {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
content: "";
display: block;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #fff;
}
}
}
.is-has {
width: 48rpx;
height: 48rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAPXSURBVGiB7VlBbttIEKweLrXH5QKW4JuZH/gHa79g5RfEeoFpwBJ8o3Tz2gGkvCD6gZMXWE/QD8TcDDvA8hopntpDxlnZniFHJGMggOomcWbY1Wx2VzeBLbbY4peGNH3gzhkPRBCLYI9ABCISQUbiswjy5RKzfCJ5U/erTWD3nPHDAw5E8DeArs8eEjMSn759w7QumVoEds6YKIUTAHGV/SRyEUyWS7yvSqQSgXafxyJIqxr+HCRyEqMv72Sy6d6NCXQGTAEMN93nAxLT1QqnmzwNbwJRwihsIRUgqWyhH+ZK4ej2QjKfxcr31DDE+BWMB4B9rXETJYx8FnsR6AyYiuC4tmn+iFu/Y+yzsDSEOgN2AVw3YpbbiikAgC+cNLy7lFHRVp8n4OWJipgrhTd3/0gPhC1khrvnLMx0vxVdNBmnkVT5HAQm95dy+uM3cSCWeNBECqDnOscZQlHCKAyxELF6pha0xul6zo8Sxq0WFq71SuGNKys5QygM0X0N433woHHiulb0Dvy1kWV+GDqMLyxcUqCxrARMDvYSZr4gMHFlFFN5iwpX3O5z33bBSiAMETccPvPVEoXpEIJZ0WUSB7b/XSFkZVsFJHKlcFSmb5QUE1QKf1j/d9zUx/sfSUzJYs+JYOKja24vJCPgfLlJezq31gFR2HMckpMYPW9ETModW+TGvKySwjRFmkgtlXgd/gQcxs+CAD2bNw2ZXrvPWOT/WNUapy8OshiudXWdZQ8hjc+Wv/e1xtsilRgEaxVTMP3yTpzh1Rkw1RqLEq+vw7+QKfVysclKwzDEYueMVll9eyEZBFMS+fKr3fu754w7Ay6waVMk9lphJaC1u7CIIFIK43afH2xPQwlGIpjYsk67z32tcVNFXzmiwq6FooRRq4V/Pc717p7afR4DGFetL1rj0BaSTjHXGfDasxpnSuGwiIQZAnzYxOB1kMjvr+RP2zWnFiLxyfP8WGt3z2AkQL2e4rHhscBJIAgwK9En6+ia3uEJTDNyU1eWULud6SRgQsLJ3IKhiXPAvEda47q28cSsKB0XtpSmivo+BYggfWwBwxbSJjTVk9piQWlPTJaoyKeItca43edxEyMYolxHeQ22fuY0zgUSs/srOSxb5zUXuruUUZnqbBjZaoUjn4Xek7kgQO+VSGRK4dB3PrrxcLc94E8bMRYpXhcqjdd3zpiIIG247SydwtlQ+QOH0UsnJJJaRARTJRht4vWn22ti95yx1nhrJmvWxtuCjMDHQOF9VcMf0ehHPtNadkWwR36fbJj+Onv80Adgfn8l8ybvu8UWW/zC+A/xK5HWhynIGQAAAABJRU5ErkJggg==") center no-repeat;
background-size: 90%;
}
}
}
}
.job-table {
border-left: 2rpx solid #eef2fd;
border-top: 2rpx solid #eef2fd;
border-right: 2rpx solid #eef2fd;
border-radius: 6rpx;
height: 400rpx;
.tr {
display: -webkit-box;
.th {
width: 250rpx;
height: 72rpx;
line-height: 72rpx;
text-align: center;
background: #F6F9FE;
font-size: 24rpx;
color: #333333;
border-bottom: 2rpx solid #eef2fd;
}
.td {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
width: 250rpx;
padding: 10rpx 0;
min-height: 52rpx;
font-size: 24rpx;
color: #333333;
text-align: center;
border-bottom: 2rpx solid #eef2fd;
font-size: 24rpx;
color: #333333;
text {
margin: 0 5rpx 5rpx;
}
}
}
.no-more,
.loading {
font-size: 26rpx;
color: #999;
padding: 30rpx 0;
text-align: center;
}
}
}
}
}
</style>

View File

@@ -0,0 +1,563 @@
<template>
<view class="index-wrap">
<view class="title-h1">
请先完善个人信息
</view>
<view class="item-list">
<view class="item">
<view class="title"><text>*</text>学历(必选)</view>
<view class="option">
<view class="subject-item" :class="eduLevel===3?'on':''" @click="changeEduLevel(3)">研究生</view>
<view class="subject-item" :class="eduLevel===2?'on':''" @click="changeEduLevel(2)">本科</view>
<view class="subject-item" :class="eduLevel===1?'on':''" @click="changeEduLevel(1)">专科</view>
</view>
</view>
<view class="item">
<view class="title"><text>*</text>专业类(必选)</view>
<view class="input-wrap">
<view class="input-value" :class="specialtyName!== ''?'':'placeholder'"
@click="showZhuanYeDialog(true)">
{{specialtyName !== ''? specialtyName: "请选择专业类"}}
</view>
<view class="icon-select">
</view>
</view>
</view>
</view>
<view class="btn-wrap">
<view class="btn" @click="commitForm">
确认提交
</view>
</view>
<uni-popup ref="pop_zhuanye" type="bottom" style="background: #fff !important;">
<view class="layer-inner">
<view class="head">
<text>选择专业类</text>
<view class="close-btn" @click="showZhuanYeDialog(false)"></view>
</view>
<view class="content">
<view class="li" :class="item.value == specialtyName?'on':''" v-for="(item,index) in showSpecialtyList"
:key="index" @click="checkSpecialty(item)">
<text>{{item.label}}</text>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import api from "@/apiCa/user.js"
export default {
data() {
return {
schoolName: "", //
eduLevel: 2, //3研究生2本科1专科
specialtyName: "", //
showSpecialtyList: [{
label: '哲学',
value: '哲学'
},
{
label: '经济学',
value: '经济学'
},
{
label: '法学',
value: '法学'
},
{
label: '教育学',
value: '教育学'
},
{
label: '文学',
value: '文学'
},
{
label: '历史学',
value: '历史学'
},
{
label: '理学',
value: '理学'
},
{
label: '工学',
value: '工学'
},
{
label: '农学',
value: '农学'
},
{
label: '医学',
value: '医学'
},
{
label: '管理学',
value: '管理学'
},
{
label: '艺术学',
value: '艺术学'
},
{
label: '军事学',
value: '军事学'
},
{
label: '交叉学科',
value: '交叉学科'
},],
specialtyOption1: [{
label: '农林牧渔大类',
value: '农林牧渔大类'
},
{
label: '资源环境与安全大类',
value: '资源环境与安全大类'
},
{
label: '能源动力与材料大类',
value: '能源动力与材料大类'
},
{
label: '土木建筑大类',
value: '土木建筑大类'
},
{
label: '水利大类',
value: '水利大类'
},
{
label: '装备制造大类',
value: '装备制造大类'
},
{
label: '生物与化工大类',
value: '生物与化工大类'
},
{
label: '轻工纺织大类',
value: '轻工纺织大类'
},
{
label: '食品药品与粮食',
value: '食品药品与粮食'
},
{
label: '交通运输大类',
value: '交通运输大类'
},
{
label: '电子信息大类',
value: '电子信息大类'
},
{
label: '医药卫生大类',
value: '医药卫生大类'
},
{
label: '财经商贸大类',
value: '财经商贸大类'
},
{
label: '旅游大类',
value: '旅游大类'
},
{
label: '文化艺术大类',
value: '文化艺术大类'
},
{
label: '新闻传播大类',
value: '新闻传播大类'
},
{
label: '教育与体育大类',
value: '教育与体育大类'
},
{
label: '公安与司法大类',
value: '公安与司法大类'
},
{
label: '公共管理与服务大类',
value: '公共管理与服务大类'
},
],
specialtyOption2: [{
label: '哲学',
value: '哲学'
},
{
label: '经济学',
value: '经济学'
},
{
label: '法学',
value: '法学'
},
{
label: '教育学',
value: '教育学'
},
{
label: '文学',
value: '文学'
},
{
label: '历史学',
value: '历史学'
},
{
label: '理学',
value: '理学'
},
{
label: '工学',
value: '工学'
},
{
label: '农学',
value: '农学'
},
{
label: '医学',
value: '医学'
},
{
label: '管理学',
value: '管理学'
},
{
label: '艺术学',
value: '艺术学'
},
{
label: '军事学',
value: '军事学'
},
{
label: '交叉学科',
value: '交叉学科'
},
],
}
},
computed: {
},
created() {
// this.getUserInfor();
},
methods: {
async getUserInfor(){
const res = await api.getUserBasisInfo();
if (res.Result == 1) {
const data = res.Data.data;
this.specialtyName=data.SpecialtyName;
this.eduLevel=data.EduLevel;
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
//显示专业弹窗
showZhuanYeDialog(type){
if(type==false){
this.$refs.pop_zhuanye.close();
}else{
this.$refs.pop_zhuanye.open('bottom');
}
},
// 改变学历
changeEduLevel(INDEX){
if(INDEX == 1){
this.showSpecialtyList = this.specialtyOption1;
}else {
this.showSpecialtyList = this.specialtyOption2;
}
this.specialtyName = "";
this.eduLevel = INDEX;
},
//选中专业类
checkSpecialty(ITEM) {
this.specialtyName = ITEM.value;
this.showZhuanYeDialog(false)
},
//确认表单
async commitForm() {
if (this.specialtyName == "") {
uni.showToast({
title: "请先选择专业类",
icon: "none"
})
return;
}
uni.showLoading({
title: "保存中..."
})
let mobileCode = this.code;
const data = {
//SchoolName: this.schoolName,
EduLevel: this.eduLevel,
SpecialtyName: this.specialtyName,
//Phone: this.mobile,
//StartYear: this.startYear
}
const res = await api.saveUserBasisInfo(mobileCode,data);
uni.hideLoading();
if (res.Result == 1) {
uni.navigateBack()
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
}
}
</script>
<style lang="scss" scoped>
.index-wrap {
padding: 40rpx 20rpx 60rpx;
.title-h1 {
font-size: 36rpx;
color: #000000;
font-weight: 600;
margin-bottom: 40rpx;
}
.item-list {
.item {
padding-bottom: 20px;
.title {
font-size: 28rpx;
color: #333;
margin-bottom: 20rpx;
text{
color:red;
}
}
.input-wrap {
width: 670rpx;
height: 84rpx;
border-radius: 12rpx;
border: 2rpx solid #EEEEEE;
padding: 0 20rpx;
display: flex;
align-items: center;
.icon-input {
width: 32rpx;
height: 32rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAMAAABF0y+mAAAAM1BMVEUAAAAwMDAyMjIzMzMyMjIwMDAzMzMyMjIzMzMyMjIzMzMzMzM0NDQwMDAzMzMzMzMzMzNtKHn7AAAAEHRSTlMAIN+/fzDvYM9wn49AEK9QVfMC+gAAAGNJREFUKM/VzTsSgDAIRVEiIf8o+1+tGcOkIjQ2etvDPOAbdV/bztzBzH6DFHjULD21zURTUf0XHg1OM55KqolqNkuGHe63BtEwSIY5wyAuI7+KgmUQ5i5nEgrmkmXxwlWFV91t2QjwOGHVAgAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
.icon-select {
width: 16rpx;
height: 16rpx;
margin-left: 24rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAS5JREFUWEftltsRgjAQRXehEeyACQ1IJUolYiXSiRRAMnQgjTDRZdCJCOQhhB/yH+7JZnMWhI0XbpwPO8Bega4CjLELIuYeG7IBgJJznmGSJDcAOHsMV6MKAngAQLQRQEMA91c5jhsBFBjHcRSGIUH4rkLTtm3aNWEPQVfhbSFiWlVV+fGAT4h3OJ32S0SMsTMi0qtYbanhPwBrO0FKmQkhCvV0oypeQ0xSylwIcR2WdnIWLAxRkPXG7nUSgJoyCILTAoom5aZTTTU7DfuXQU3pKqrZ8NEmHJL+AaENNwJQRGVjy4ZzfjB5y8Y/JBbK7hRb1zWNXO0yBjBV9lA0OgIrAB2EbbhxDwxPMaZsl3BnAKUS9EQjRMxosunKbSUil4+57LHuAZeQuT07wF6BJ0iYZ7lPYQRvAAAAAElFTkSuQmCC") no-repeat;
background-size: 100%;
}
.input-value {
width: 580rpx;
height: 84rpx;
font-size: 28rpx;
color: #333;
line-height: 84rpx;
padding-left: 20rpx;
&.placeholder {
font-size: 28rpx;
color: #999;
}
&::-webkit-input-placeholder {
font-size: 28rpx;
color: #999;
}
}
.mb-input-value {
width: 440rpx;
height: 84rpx;
font-size: 28rpx;
color: #333;
border-radius: 12rpx;
border: 2rpx solid #EEEEEE;
line-height: 84rpx;
padding-left: 40rpx;
&::-webkit-input-placeholder {
font-size: 28rpx;
color: #999;
}
}
.get-code-btn {
width: 240rpx;
height: 80rpx;
margin-left: 30rpx;
line-height: 80rpx;
background-color: #1b88ff;
border-radius: 12rpx;
font-size: 32rpx;
text-align: center;
color: #ffffff;
z-index: 9;
&.disable {
background: #9f9f9f;
}
}
}
.option {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
.subject-item {
width: 210rpx;
height: 76rpx;
background: #F3F4F6;
border-radius: 12rpx;
font-size: 28rpx;
color: #333;
margin-bottom: 20rpx;
margin-right: 30rpx;
text-align: center;
line-height: 76rpx;
&:nth-child(3n) {
margin-right: 0;
}
&.on {
background: #F3F4F6;
color: #1677ff;
}
&.disadble {
color: #bbb;
}
}
}
}
}
.btn-wrap {
position: fixed;
bottom: 100rpx;
left: 50%;
transform: translateX(-50%);
display: flex;
justify-content: center;
z-index: 9;
.btn {
width: 688rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #1677ff;
font-size: 32rpx;
color: #fff;
border-radius: 60rpx;
&.disable {
background: #F3F4F6;
color: #bbb;
}
}
}
.layer-inner {
background:#fff;
border-radius:10px 10px 0 0;
.head {
position: relative;
display: flex;
align-items: center;
justify-content: center;
height: 120rpx;
width: 100%;
font-size: 34rpx;
color: #000000;
.close-btn {
position: absolute;
top: 39rpx;
right: 27rpx;
width: 52rpx;
height: 52rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAQAAAADQ4RFAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAHdElNRQfmChMLCDGRh9c8AAAAmklEQVQ4y7WUMQ7DMAhFnzpmRO3979ABqVN8m/YWdLGcqEkM+lI92Qb+R3wAPgRPjMoxnOANQRCsLGnIwtq98X5pCZvRuucLHuMxY9tYGvffD0tYdsA2ZbsEvWabAp4b09SPDlYp0t4JSAt0YPOhYEH4ja0m+jg+QvzMfKuh/CE9oRBCyQVxhTYSGlYYDWEIpXGXFou0woRl+QUj09L9Yg66GgAAAABJRU5ErkJggg==") center no-repeat;
background-size: 50%;
}
}
.content {
max-height: 640rpx;
overflow: auto;
padding: 0 40rpx;
.li {
position: relative;
height: 114rpx;
line-height: 114rpx;
border-bottom: 2rpx solid #f5f5f5;
text {
font-size: 30rpx;
color: #000000;
margin-right: 20rpx;
}
&.on {
text {
color: #1b88ff;
}
&::after {
position: absolute;
right: 10rpx;
top: 50%;
transform: translateY(-50%);
content: "";
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAZCAMAAACM5megAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAATlBMVEUbiP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8biP8AAAAx8hE2AAAAGHRSTlMAH0f2c0SVAfc7bv6JI/hS+UhR+1D0jxRK42VSAAAAAWJLR0QZ7G61iAAAAAd0SU1FB+YKFBEcF+FCm4sAAABsSURBVCjPzdHHDoAwDANQs1cLlJn//1KGEIKqrY+QY/QOiQ2QiRgA4iTlRCTjJC9+QsqPSMVJ3ShGdCuiwgToegu5zrWQ+6MX8j39QMaby41MILoLmWC6JzKkgGFHI+voQKxGTLMshACrdu83CdwKBKKZxqUAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
display: block;
width: 35rpx;
height: 25rpx;
}
}
}
}
.op-block {
display: flex;
align-items: center;
justify-content: center;
padding: 30rpx 40rpx 0;
width: 670rpx;
height: 115rpx;
.commit-btn {
width: 361rpx;
height: 77rpx;
line-height: 77rpx;
text-align: center;
background-color: #1b88ff;
border-radius: 38rpx;
font-size: 30rpx;
color: #ffffff;
}
}
}
}
</style>

View File

@@ -0,0 +1,447 @@
<template>
<view class="index-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goBack"></view>
<text>学习计划制定</text>
</view>
<view class="content">
<view class="title-h1">PDCA 循环法</view>
<view class="banner"></view>
<view class="txt-wrap">
<view class="p-txt">
PDCA循环由质量管理专家戴明于20世纪50年代优化完善并推广又称戴明环其核心是通过计划执行检查处理四个阶段的闭环管理进行目标执行效果的持续改进可适用于个人知识管理技能提升等学习场景
</view>
<view class="p-txt">
<text class="strong-txt">Plan(计划)</text>明确目标与步骤包括现状分析问题识别及解决方案制定
</view>
<view class="p-txt">
<text class="strong-txt">Do(执行)</text>根据计划实施具体措施如教学中的课堂授课企业中的产品生产
</view>
<view class="p-txt">
<text class="strong-txt">Check(检查)</text>评估执行效果通过数据对比因果图等方法发现偏差
</view>
<view class="p-txt">
<text class="strong-txt">Act(处理)</text>总结经验并标准化流程如将成功经验纳入培训体系或优化资源配置
</view>
</view>
<view class="title-h1">年度学习计划清单</view>
<view class="txt-wrap">
<view class="strong-txt mb30">
请填写你的年度学习计划清单并按照PDCA循环法执行和落实计划
</view>
<view class="p-txt">
说明:
</view>
<view class="gp-txt">
<text class="strong-txt">1总目标</text>
期望达到的综合成就和发展方向它是整个计划的核心和导向如成为金融领域具有深厚理论基础和丰富实践经验的高端专业人才
</view>
<view class="gp-txt">
<text class="strong-txt">2课程学习</text>
为了达到总目标需完成的各类课程,包括通识教育课程专业课程选修课程等如完成计量经济学的学习
</view>
<view class="gp-txt">
<text class="strong-txt">3实践活动</text>
为了达到总目标需参与的各类实践活动如志愿服务社团活动实习实训创新创业项目等如加入金融学术社团
</view>
<view class="gp-txt">
<text class="strong-txt">4技能提升</text>
通过自学或参加培训等方式提升个人技能包括外语能力计算机技能专业技能等如利用课余时间学习Python课程并考取相应资格证书
</view>
<view class="gp-txt">
<text class="strong-txt">5职业规划</text>
对个人未来职业发展的系统性安排核心包括职业方向定位职业成就预期职业路径设计等通过投行实习明确方向一3年内成为分析师5年内晋升经理
</view>
</view>
<view class="target-content">
<view class="target-tabbar">
<view class="item" :class="checkedTargetCode ==item.EncodeId?'on':''" v-for="(item,index) in targetList" :key="index" @click="changeTarget(item)">
<text v-text=" '学习'+ tabs[index]"></text>
</view>
</view>
<view class="desc-wrap">
<view class="h3-title">
目标描述
</view>
<view class="desc-txt">
<text class="blue-txt">SMART目标制定的数据中读取的内容:</text>
<text v-text="targetForm.TargetDesc?targetForm.TargetDesc:'无'"></text>
</view>
</view>
<view class="form-wrap">
<view class="year-plan-item" v-for="(item,index) in planList" :key="index">
<view class="plan-title">
{{index+1}}年度计划
</view>
<view class="form-item">
<view class="label">
课程学习
</view>
<view class="input-wrap">
<input v-model="item.CourseName" placeholder="通识教育课程、专业课程、选修课程等"></input>
</view>
</view>
<view class="form-item">
<view class="label">
实践活动
</view>
<view class="input-wrap">
<input v-model="item.ActivityName" placeholder="志愿服务、社团活动、实习实训、创新创业项目等"></input>
</view>
</view>
<view class="form-item">
<view class="label">
技能提升
</view>
<view class="input-wrap">
<input v-model="item.Ability" placeholder="外语能力、计算机技能、专业技能等,及计划考..."></input>
</view>
</view>
<view class="form-item">
<view class="label">
职业规划
</view>
<view class="input-wrap">
<input v-model="item.JobPlan" placeholder="职业方向定位、职业成就预期、职业路径设计等"></input>
</view>
</view>
<view class="del-year-btn" @click="deletePlan(index)">
删除该年度计划
</view>
</view>
</view>
</view>
<view class="btn-wrap">
<view class="add-btn" @click="addPlan" v-show="planList.length<5">
+增加年度计划
</view>
<view class="commit-btn" @click="commitForm">
确认提交
</view>
</view>
</view>
</view>
</template>
<script>
import api from "@/apiCa/studentProfile.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
tabs:['目标一 ', '目标二 ', '目标三 ', '目标四 ', '目标五 '],
targetForm: {}, //当前选中的目标
targetList: [],//目标列表
checkedTargetCode: "",// 目标码
planList: [], //年度计划列表
emptyPlanList: [
{
EncodeId: '',//Id
CourseName: '',//课程学习
ActivityName: '',//实践活动
Ability: '',//技能提升
JobPlan: ''//职业规划
}
], //空
delIds:[],//删除的计划id
}
},
created() {
this.queryPlanList();
},
methods: {
goBack(){
uni.navigateBack(-1);
},
// 切换目标标签
changeTarget(ITEM){
if(ITEM.EncodeId == this.checkedTargetCode){
return;
}
this.checkedTargetCode = ITEM.EncodeId;
this.targetForm = this.targetList.filter(item=>item.EncodeId == ITEM.EncodeId)[0];
this.queryPlanList();
},
// 获取学习目标
async querySmartTargets() {
const res = await api.querySmartTargets();
if (res.Result == 1) {
this.targetList = res.Data;
if(res.Data.length>0){
this.checkedTargetCode = res.Data[0].EncodeId;
this.targetForm = res.Data[0];
}
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 获取单个获取年度计划
async queryPlanList() {
if(this.targetList.length == 0){
await this.querySmartTargets();
}
if(!this.checkedTargetCode){
return;
}
const res = await api.queryPlanList(this.checkedTargetCode);
if (res.Result == 1) {
this.planList = res.Data;
if(res.Data.length == 0){
this.planList = JSON.parse(JSON.stringify(this.emptyPlanList));
}
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 增加年度计划
addPlan(){
this.planList.push({...this.emptyPlanList[0]});
},
// 删除年度计划
deletePlan(INDEX){
if (this.planList[INDEX].EncodeId != '') {
this.delIds.push(this.planList[INDEX].EncodeId)
}
this.planList.splice(INDEX, 1);
},
//确认表单
async commitForm() {
uni.showLoading({
title: "保存中..."
})
const data = {
EncodeId: this.checkedTargetCode,
PlanList: this.planList,
DelIds: this.delIds,
}
const res = await api.savePlanList(data);
uni.hideLoading();
if (res.Result == 1) {
uni.showToast({
title: "保存成功",
icon: "success"
})
this.queryPlanList();
this.delIds=[];
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: #f4f7fc url("#{$image-oss-url}/17.png") no-repeat;
background-size: contain;
overflow-y: scroll;
}
</style>
<style lang="scss" scoped>
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.index-wrap {
.content {
padding-top: 40rpx;
.title-h1 {
font-size: 36rpx;
color: #333;
padding: 20rpx 30rpx;
font-weight: 600;
}
.banner {
width: 100%;
height: 423rpx;
background: url("#{$image-oss-url}/gaoxiao/academicEvaluation/pdca-banner.png");
background-size: 100%;
}
.txt-wrap {
padding: 50rpx 30rpx 20rpx;
background: #fff;
.p-txt {
font-size: 28rpx;
line-height: 48rpx;
color: #333333;
margin-bottom: 20rpx;
}
.gp-txt {
font-size: 28rpx;
line-height: 48rpx;
color: #666;
margin-bottom: 20rpx;
}
.mb30 {
margin-bottom: 30rpx;
}
.strong-txt {
color: #333333;
font-weight: 600;
}
}
.target-content {
background: #fff;
padding: 40rpx 30rpx 0;
margin-top: 40rpx;
.target-tabbar {
margin-bottom: 50rpx;
display: flex;
flex-wrap: wrap;
.item {
position: relative;
width: 155rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 34rpx;
border: solid 2rpx #eeeeee;
font-size: 28rpx;
color: #999999;
margin-right: 20rpx;
&.on {
color: #1989fa;
border-color: #1989fa;
}
}
}
.desc-wrap {
margin-bottom: 40rpx;
.h3-title {
color: #333333;
font-size: 28rpx;
margin-bottom: 20rpx;
}
.desc-txt {
color: #666666;
font-size: 28rpx;
line-height: 48rpx;
.blue-txt {
color: #1989fa;
}
}
}
.form-wrap {
padding-bottom: 40rpx;
.year-plan-item {
.plan-title {
display: flex;
align-items: center;
justify-content: center;
color: #333333;
font-size: 32rpx;
padding: 50rpx 0;
font-weight: 600;
&:before {
content: "";
display: block;
width: 18rpx;
height: 6rpx;
margin-right: 40rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAADBAMAAACzJDhFAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUZifoqkvrW6v3t9f4Zifrt9f7W6v1BnftdrPt8u/ybzPy62/0qkvrW6v0AAAA9scLEAAAAB3RSTlOF+fmF+fP6+pjy2gAAAAFiS0dEDm+9ME8AAAAHdElNRQfpChgQCQN2b864AAAAGUlEQVQI12NgrJi1yYDBp2LW3gAGIHubAQA3mgZaYkKVQgAAAABJRU5ErkJggg==");
background-size: 100%;
}
&::after {
content: "";
display: block;
margin-left: 40rpx;
width: 18rpx;
height: 6rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAADBAMAAACzJDhFAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEX+/v7t9f5Bnfsqkvr+/v4qkvpBnfvW6v262/2bzPx8u/xdrPvt9f5BnfsAAADw0cYcAAAAB3RSTlOF+fmF+fP6+pjy2gAAAAFiS0dEDm+9ME8AAAAHdElNRQfpChgQCQmWuiemAAAAGUlEQVQI12NgrJi1yYDBp2LW3gAGIHubAQA3mgZaYkKVQgAAAABJRU5ErkJggg==");
background-size: 100%;
}
}
.form-item {
.label {
font-size: 28rpx;
color: #333333;
margin-bottom: 30rpx;
}
.input-wrap {
margin-bottom: 40rpx;
input {
width: 650rpx;
height: 76rpx;
line-height: 76rpx;
padding: 0 20rpx;
background-color: #ffffff;
border-radius: 6rpx;
border: solid 2rpx #eeeeee;
font-size: 28rpx;
&::-webkit-input-placeholder {
color: #bebebe;
font-size: 28rpx;
}
}
}
}
.del-year-btn {
width: 686rpx;
height: 74rpx;
line-height: 74rpx;
text-align: center;
border-radius: 6rpx;
margin-top: 50rpx;
border: solid 2rpx #ff625f;
color: #ff6157;
font-size: 32rpx;
}
}
}
}
.btn-wrap {
display: flex;
justify-content: center;
align-items: center;
padding: 50rpx 30rpx;
.commit-btn {
width: 335rpx;
height: 80rpx;
background-color: #1989fa;
border-radius: 40rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 80rpx;
}
.add-btn {
width: 331rpx;
height: 76rpx;
font-size: 28rpx;
text-align: center;
line-height: 76rpx;
border-radius: 40rpx;
color: #1989fa;
border: solid 2rpx #1989fa;
margin-right: 20rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,741 @@
<template>
<view class="document">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goback"></view>
<text>生涯档案</text>
</view>
<view class="person-info" style="display:none;">
<view class="img-wrap">
<image v-if="customInfo.AllHeadimgUrl" :src="customInfo.AllHeadimgUrl"></image>
<image v-else src="https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh/avatar.png" mode=""></image>
</view>
<view class="txt-wrap">
<view class="top">
<view class="name">{{user.RealName}}</view>
<!-- <view class="grades">{{user.GradeName}}{{user.ClassName}}</view> -->
</view>
<view class="bottom">{{user.SchoolName}}</view>
</view>
</view>
<view class="section" style="margin-top:60rpx;">
<view class="head">
<view class="left-txt">
<view class="icon icon-1"></view>
意向职业
</view>
<view class="right-txt">
限5种
</view>
</view>
<view class="content" v-if="intentionJobList != null && intentionJobList.length > 0">
<view class="list">
<view class="item" v-for="(item, index) in intentionJobList" :key="index">
<text class="name">{{(index + 1) + '.' +item.Name}}</text>
<view class="cancel-btn" v-on:click="cancleIntention(index,2,item.EnCodeId)">取消</view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="empty">
<view class="icon"></view>
<text>您还未添加意向职业</text>
</view>
</view>
<view class="footer">
<navigator url="/packageCa/job/index" class="btn">添加意向职业</navigator>
</view>
</view>
<view class="section">
<view class="head">
<view class="left-txt">
<view class="icon icon-4"></view>
职业兴趣测评
</view>
</view>
<view class="content" v-if="interestResult != null && interestResult !=''">
<view class="text-wrap">
<view class="row">
<text class="label">兴趣代码</text>
<view class="value">
<text v-for="(item, index) in interestCodeList" :key="index">
{{item}} <text v-if="index < interestCodeList.length -1"></text>
</text>
</view>
</view>
<view class="row">
<text class="label">对应学类</text>
<view class="value"><text v-for="(item, index) in interestRecommendSpecialty" :key="index">
{{item}} <text v-if="index < interestRecommendSpecialty.length -1"></text>
</text></view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="empty">
<view class="icon"></view>
<text>您还未测评</text>
</view>
</view>
<view class="footer">
<navigator v-if="interestResult != null && interestResult !=''" url="/packageCa/testReport/interestTestReport" class="btn">查看报告</navigator>
<navigator v-if="!(interestResult != null && interestResult !='')" url="/packageCa/pagesTest/interestTestTitle" class="btn">去测评</navigator>
</view>
</view>
<view class="section">
<view class="head">
<view class="left-txt">
<view class="icon icon-6"></view>
工作价值观测评
</view>
</view>
<view class="content" v-if="workValueResult != null && workValueResult !=''">
<view class="text-wrap">
<view class="row">
<text class="label">高分价值观 </text>
<view class="long-value" v-if="workValueHight != null && workValueHight.length > 0">
<text v-for="(item, index) in workValueHight" :key="index">
{{item}} <text v-if="index < workValueHight.length -1"></text>
</text>
</view>
<view class="long-value" v-else>
<text></text>
</view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="empty">
<view class="icon"></view>
<text>您还未测评</text>
</view>
</view>
<view class="footer">
<navigator class="btn" v-if="workValueResult != null && workValueResult !=''" url="/packageCa/testReport/workValuesTestReport">查看报告</navigator>
<navigator class="btn" v-else url="/packageCa/pagesTest/workValuesTestTitle">去测评</navigator>
</view>
</view>
<view class="section">
<view class="head">
<view class="left-txt">
<view class="icon icon-8"></view>
人格测评
</view>
</view>
<view class="content" v-if="personResult != null && personResult !=''">
<view class="text-wrap">
<view class="row">
<text class="label">内外向</text>
<view class="value" v-if="personGroupList1 != null && personGroupList1.length > 0">
<text v-for="(item, index) in personGroupList1" :key="index">
{{item}} <text v-if="index < personGroupList1.length -1"></text>
</text>
</view>
<view class="value" v-else>
<text></text>
</view>
</view>
<view class="row">
<text class="label">人际关系</text>
<view class="value" v-if="personGroupList2 != null && personGroupList2.length > 0" >
<text v-for="(item, index) in personGroupList2" :key="index">
{{item}} <text v-if="index < personGroupList2.length -1"></text>
</text>
</view>
<view class="value" v-else>
<text></text>
</view>
</view>
<view class="row">
<text class="label">严谨性</text>
<view class="value" v-if="personGroupList3 != null && personGroupList3.length > 0">
<text v-for="(item, index) in personGroupList3" :key="index">
{{item}} <text v-if="index < personGroupList3.length -1"></text>
</text>
</view>
<view class="value" v-else>
<text></text>
</view>
</view>
<view class="row">
<text class="label">开放性</text>
<view class="value" v-if="personGroupList4 != null && personGroupList4.length > 0" >
<text v-for="(item, index) in personGroupList4" :key="index">
{{item}} <text v-if="index < personGroupList4.length -1"></text>
</text>
</view>
<view class="value" v-else>
<text></text>
</view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="empty">
<view class="icon"></view>
<text>您还未测评</text>
</view>
</view>
<view class="footer">
<navigator class="btn" v-if="personResult != null && personResult !=''" url="/packageCa/testReport/personalTestReport">查看报告</navigator>
<navigator class="btn" v-else url="/packageCa/pagesTest/personalTestTitle">去测评</navigator>
</view>
</view>
<view class="section" v-if="user.GradeLevel == 3">
<view class="head">
<view class="left-txt">
<view class="icon icon-11"></view>
多元能力测评
</view>
</view>
<view class="content" v-if="multResult != null&&multResult !=''">
<view class="text-wrap">
<view class="row">
<text class="label">能力强 </text>
<view class="long-value" v-if="multResult != null && multResult.length > 0 && multGroupList1.length > 0">
<text v-for="(item, index) in multGroupList1" :key="index">
{{item}} <text v-if="index < multGroupList1.length -1"></text>
</text>
</view>
<view class="long-value" v-else>
<text></text>
</view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="empty">
<view class="icon"></view>
<text>您还未测评</text>
</view>
</view>
<view class="footer">
<navigator class="btn" v-if="multResult != null && multResult !=''" :url="`/packageCa/testReport/multipleAbilityTestReport`">查看报告</navigator>
<navigator class="btn" v-else url="/packageCa/pagesTest/customTestTitle?testType=-27">去测评</navigator>
</view>
</view>
<view class="section" v-if="user.GradeLevel == 3">
<view class="head">
<view class="left-txt">
<view class="icon icon-12"></view>
通用能力测评
</view>
</view>
<view class="content" v-if="universalResult != null&&universalResult !=''">
<view class="text-wrap">
<view class="row">
<text class="label">优势的能力 </text>
<view class="long-value" v-if="universalResult != null && universalResult.length > 0 && universalGroupList1.length > 0">
<text v-for="(item, index) in universalGroupList1" :key="index">
{{item}} <text v-if="index < universalGroupList1.length -1"></text>
</text>
</view>
<view class="long-value" v-else>
<text></text>
</view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="empty">
<view class="icon"></view>
<text>您还未测评</text>
</view>
</view>
<view class="footer">
<navigator class="btn" v-if="universalResult != null&&universalResult !=''" :url="`/packageCa/testReport/generalCareerTestReport`">查看报告</navigator>
<navigator class="btn" v-else url="/packageCa/pagesTest/customTestTitle?testType=-28">去测评</navigator>
</view>
</view>
</view>
</template>
<script>
import api from "@/apiCa/user.js"
import api1 from "@/apiCa/studentProfile.js"
export default {
data() {
return {
refreshIfNeeded: false, //是否返回刷新
barHeight: wx.getWindowInfo().statusBarHeight,
user: uni.getStorageSync("CAuserInfo").user,
customInfo: uni.getStorageSync("customInfo"),
intentionJobList: [],//意向职业
intentionSpecialtyList: [],//意向专业
intentionUniversityList: [],//意向院校
interestCodeList: [],//兴趣码
interestRecommendSpecialty: [],//兴趣码
interestResult: "",//兴趣测评结果
customerGroup1: [],//学科效能
customerGroup2: [],//学科效能
customerResult: "",//学科效能
workValueHight: [],//工作价值
workValueResult: "",//工作价值
multHight: "",//多元智能
multResult: "",//多元智能
personGroupList1: [],//人格
personGroupList2: [],//人格
personGroupList3: [],//人格
personGroupList4: [],//人格
personResult: "",//人格
viewScores: false, //是否查看成绩
groupDataList: [],//志愿
examSoreInfo: {},//科目成绩
subjectMatching: 0,//学科信心匹配度 0无1低 2中 3高
groupMatching: 0,//选科组合匹配度 0无1低 2中 3高
specialtyMatching: 0,//意向专业院校匹配度 0无1低 2中 3高
recommendGroups: "",//推荐组合
suggestGroupName: null,//学校建议组合
suggestReason: null,//学校建议原因
scoreMatch: false,
subjectMatch: false,
specialtyUniversityMatch: false,
myStudyCourseList: [],
multResult: "",//多元能力
multGroupList1: [],//多元能力能力强
universalResult: "",//通用能力
universalGroupList1: [],//通用能力 优势
}
},
onShow() {
this.user = uni.getStorageSync("CAuserInfo").user;
this.customInfo = uni.getStorageSync('customInfo');
this.queryStudentProfile();
},
created() {
},
methods: {
goback(){
uni.navigateBack(-1);
},
// 获取个人档案
async queryStudentProfile() {
uni.showLoading({
title: "加载中"
})
const gradeLevel = this.user.GradeLevel;
const res = gradeLevel == 3? await api1.getGXWechatStudentProfile() : await api.queryStudentProfile();
uni.hideLoading();
if(res.Result == 1){
let data = gradeLevel == 3? res.Data.list : res.Data;
// 意向职业
this.intentionJobList = data.IntentionJobList;
// 意向专业
this.intentionSpecialtyList = data.IntentionSpecialtyList;
// 意向院校
this.intentionUniversityList = data.IntentionUniversityList;
// 兴趣测评
this.interestCodeList = data.InterestCodeList;
this.interestRecommendSpecialty = data.InterestRecommendSpecialty;
this.interestResult = data.InterestResult;
// 人格测评
this.personGroupList1 = data.PersonGroupList1;
this.personGroupList2 = data.PersonGroupList2;
this.personGroupList3 = data.PersonGroupList3;
this.personGroupList4 = data.PersonGroupList4;
this.personResult = data.PersonResult;
// 工作价值
this.workValueHight = data.WorkValueHight;
this.workValueResult = data.WorkValueResult;
if(gradeLevel < 3){
// 多元智能
this.multHight = data.MultHight;
this.multResult = data.MultResult;
// 学科信心测评
this.customerGroup1 = data.CustomerGroup1;
this.customerGroup2 = data.CustomerGroup2;
this.customerResult = data.CustomerResult;
// 个人选科报告
this.viewScores = data.ViewScores;
this.scoreMatch = data.ScoreMatch;
this.subjectMatch = data.SubjectMatch;
this.specialtyUniversityMatch = data.SpecialtyUniversityMatch;
this.groupDataList = data.GroupDataList;
this.examSoreInfo = data.ExamSoreInfo;
this.subjectMatching = data.SubjectMatching;
this.groupMatching = data.GroupMatching;
this.specialtyMatching = data.SpecialtyMatching;
if (data.RecommendGroups != null && data.RecommendGroups != '') {
this.recommendGroups = data.RecommendGroups.split(",").join("、");
}else{
this.recommendGroups = "无"
}
if (data.SelectGroup != null) {
this.suggestGroupName = data.SelectGroup.SuggestGroupName;
this.suggestReason = data.SelectGroup.SuggestReason;
}
}else {
// 多元能力
this.multGroupList1 = data.MultGroupList1;
this.multResult = data.MultResult;
// 通用能力
this.universalGroupList1 = data.UniversalGroupList1;
this.universalResult = data.UniversalResult;
}
}
},
// 取消意向
cancleIntention(index,type,ids) {
uni.showLoading({
title: "取消中"
})
api.doIntention(type,ids,1).then((res)=>{
uni.hideLoading();
if(res.Result == 1){
this.queryStudentProfile()
// if(type == 2){
// this.intentionJobList.splice(index, 1);
// }else if(type == 3){
// this.intentionUniversityList.splice(index, 1);
// }else {
// this.intentionSpecialtyList.splice(index, 1);
// }
uni.showToast({
title: "取消成功",
icon: "success"
})
}
})
},
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: url('#{$image-oss-url}/17.png') no-repeat;
background-size: contain;
background-color: #EEF1F8;
overflow-y:scroll;
}
</style>
<style lang="scss" scoped>
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.document {
padding-bottom: 60rpx;
padding-top: 40rpx;
.person-info {
position: relative;
display: flex;
align-items: center;
width: 664rpx;
height: 174rpx;
padding: 0 20rpx;
margin: 65rpx auto 20rpx;
border: 3px solid #FFFFFF;
background: #EDF5FE;
border-radius: 12px;
.img-wrap {
overflow: hidden;
width: 112rpx;
height: 112rpx;
border-radius: 50%;
margin-right: 20rpx;
image {
width: 100%;
height: 100%;
}
}
.txt-wrap {
.top {
display: flex;
align-items: flex-end;
margin-bottom: 10rpx;
.name {
color: #000000;
margin-right: 20rpx;
font-size: 36rpx;
}
.grades {
color: #666;
font-size: 26rpx;
}
}
.bottom {
color: #666;
font-size: 26rpx;
}
}
}
.section {
width: 670rpx;
padding: 30rpx 20rpx 40rpx;
background: #FFFFFF;
margin: 0 auto 24rpx;
border-radius: 12rpx;
.head {
display: flex;
justify-content: space-between;
.left-txt {
display: flex;
align-items: center;
font-size: 32rpx;
color: #000;
font-weight: 500;
.icon-1 {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABqUlEQVR4AexXQU7DMBBcW+09B0AcywvIE8oP+AF9Qg+AuFGugFTxAvoEfhB+0PKC5gxIcK7UmpkKqjSEdB1ZJIdEHtVxdmcn663tWFFc0dBFB5duDjgN9i/cB+xOFdSiEtDpyEBEeqK8jJFIRM6AnU0lAITHayYjk9VKTsrgnAwFF34pAr3yphKwoXCSvt+b5zIg8MvGXtHxE6Ag9DVZCzi8cj0UzgCFc10ETEH8TTzC89JCtFYS2sKnB9tCPsZiYdPO4ibGnCZweMTA6A/8CMBjdWPRFvIxVrcr871z12cGxqCkMX7+r0FEhGyNKaDK24VSGlsqCcVWhYcZqOIXzKcV0GagERlIUdK1wb7emqM6Ybke+wDZEm5eeR9uLkR+fNe9xXqc+IAClkvp532wufAIxvXdi68RRciX8sUMDvmtlmMY9mveGeD8v92ZGQr3JguOYRpU58CsRG8BmP8pTjo8ov8CdtZpllzT9xaAIHxLHmCKoIm5ZeMtYMs7wE0roBEZqPT/DTD9pEiZgSf2asLELhbygOBc1bgloxu2FbHh+/FT8KHL2F8AAAD//4kh6/oAAAAGSURBVAMAtjRliSH3kwIAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
}
.icon-2 {
width: 27rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAgCAYAAADjaQM7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAH4SURBVEiJ1dfBa9NgGMfx75sWUxglRdCRophTdxAlTHpz2DGvQ8GT8yjMqwevsp62y8Sz/QP0KszjYIGO7SBjAUFY8VDX0aJisSsTgyavB9vNicmbdkvR3zHv8+bD+7wvb4gAWNq0LdAWpKQEWCQS6Yrymp07o2vbySFH0fSM9nQUEIAmpSyNAgLQQFgjxEaXgTFDNzF0cygsHadIT2UpmncpmnNk0tnD57W2w2p9mY7XioWJxY1JGVVg6Cb3Llcw9HxozWp9mdetF0osso1xIICb1iPGxwonw66cm1VC/dyZeHIy7Or52VgQgKHnlQdH0cZ4q+qncHZ6OExPZcOGQtPxmsNhnt/l24/uQJiqPrKNbz6txIY6XpPd/a3hsWqjEnt11UZFWROJeX6X52/nlXsBcMm4pqxJzdw3y1EFB98/U2s76Kks42MTx8Z297d49a5Mx2tSNOfIZfLU2k7ou5TX1e/5BRbIpLN8ONg5didevzDP1MUHVBvPWN/7e0tjXcT9eH439BCs71XoeC0+ft0JnT8Qporq9P7bH8//Bvtzz14KgZsEFAS8P8R8P5h+POU6SUD99DDpJgktbkw+BG6kgXpSyFHkLRAlTQgcEHZPTzRiadO2pNTWAAukC3w5bURKYQtBTkD/lym1EATythDkThvrke5P22GeWTkOvPwAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
}
.icon-3 {
width: 31rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB8AAAAgCAYAAADqgqNBAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAMMSURBVEiJ7ZZPSJNhHMe/z97X+W7TfLNWQxPfylLDYAqSSqEdhLl5MDwUnewQiL4XDwXRwTp0CyyS6Fb3Dl0U6qQpvovAKRFOpHQSOHGo7zT1nfvz66CTbW66iXiI/W7P8/y+v8/7+/PwvAxHsE6nTeLA9TJCB4DhEAs/eFf/2ZNpHF2mAllpaeNIN2TQGe/Vnr/tEXhjBR/hJuTR1qZMY7GMwE57L4g9u3iqYrrafLMiuj++NLI4vz5jYcCrNw2DPccK73TaJJ64TzrGWazmBlHKLxcSff78/b04vjQiRij8Ld02HAqXlZY2AuszcCZLY3GrZso5Jaby3QiuqV8XBjQtuCkgwu703xoYPjI8VZkBYCO0Dn9gBWJuIYx8fpwu3TYkhR9WZveqC+4V1966srAGladr4mKk04Z90x6dZoEzVjSXtAuJYN+WF+4VF4oMpY/6GwZZgd78xL3igm/LGxenJO+ypbmkXTvoNsRlflCZo/ZL/YkZ9Yf28sZHQ3Tv8fe7vrKCqrNlYlUySco2MCC9aY7N3On9EjILxbVPq99Ovpjosnq35ifqLM0oMpWmkiVtA+t02iSOdEPpTHPURhYG4d9eVnOZoGrhzQvnjMV8naX5MFncbQjpwtVc/cPyXgNnkuzSfYuey02ZcayV5l+FwBkEI58nXiq4pqssrDlcBEDP5QpXxOt5c2vTIIR5PhLCfIALiLHTm4n5A8vwB5Yz0mxHAiCQyucEcz6EdNuN7lVXtNxNACYBqASSGDERDJMAAIKVGKkMzANABGAFMLxzlOAbEyfRFwD4gP71vq+SFQfJo7YmAOgas3d0K/a5mLMh2WnvBXaGVFYc1Om0ScDOTZEVx1DUt1uxz3WN2TsAQB61NcmKgxJZGb9qx2lZeBaehWfhWfj/B2e7v1DvCSQBAAOTCOQBgN0nUtxbg0kgqMRITeoLIPYs6pskjidC1MNkxTFRZCq1FujPnFC+gE/zwre14OEJJAq8SSsUzIsnBV8LrmqMmIUnwvNZdapv1j8lnRScQB4Cev4BQmp+U4L3kQsAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
}
.icon-4 {
width: 32rpx;
height: 31rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAfCAYAAACGVs+MAAADWElEQVR4AbRWO2wTQRB9ewln0yBDg5AoHKQ0FCRRGiQKYkGFgxRLoUTYBTWmIHEX3DlpYiihsBElkRwpcSqQI6FIaSISCppI2AUSoiEWTUIS3TKz5zvrfvadZUY3t7OzszNvZm93T8MgVMsnUC9UiJuKtxZXUSskB3EVHQAH12MNCpYl5qBJSJGHLmvgMVJGeaID0OPPADEJD5EuFlvyqPsoogFQGcp8oE8p5qIuRTQAZvaJQABAEjqeIAKFB9Av+27QbJQqhAfQP3sLQqQqhAOgtliPtbdCd9ss6i98PtSugSV5AfDEjYU5bC7kwft7s9CgdW0CIoHwRNtz5Avqi8SFivLFPjkRtZRdRyYADmoeLBKgiZpWg9BWwftbYAYDk+AqZJUv9qmjCT1+hK1CAxsF5VczPxjNOlgGDhVposQMNDQ4toYYKohWXgyNdLmqQYLWC0Ohuas3Ubk1j+TFyyH9iUn6BmQbQ6DJS9dQm36M7PVpMJCwLgmAeBXWOMguMRpXwXm8fXaM9V/fWAzDVQ3pUhWQ+/2suawzV274mi2N37fLXjz8hNbxka+dU0kx06UiVYDUp39TENhGAHGGzdQCGrefYmn8nsOKQeXH7igdZ15u7Si590uug2OSkQkgU27jQSlFfaoGvV1P+/zEzuolZWuBYGCViXllzVnnDj4ouc+rivRyBhyTDE0AJKgnXcpR6wsitfvWA6Iy8cgufe5gDQyU5vd6KLiKYds4AbCaQQh4loMzdIOwvvZycwfbv7+jJ7FP9u0y8gJgA4l33LiZQUx9fo39Pz/tIdYVDz/a/UAhwKc/gEAvUGVO7b5B9ceeWpLM3nul6zHFHDIM3/PGH4CQE+Ys/zevde7rGsYaK45q+Ft3tCPibkdyNP4AJIZ2PMMiQ/DNaPXs1h+A71+vPWcwQciQAMwfhuFXgG9c07cjAW8F9Av/IXgn5mjcUwUvgI5tqEaCzgvZ9x6BRedowUVeAKdnHiPXHO62YCCF2VKKjtUpJfNBwyOBLGkbnhA7DbwA+IyWxnOnmd1jcDmkS2N4WKLsO3qW+S5hUEE3q5RF6/zvzFKNFwCrZ1fKMIwMzKwoqOQym4HV9c1GPsxA0stTNJKjK36duE1/XAw0B/ZJA+7nHwAAAP//fvvjBQAAAAZJREFUAwCMpRtDiL0m1gAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
.icon-6 {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAfCAYAAACGVs+MAAACGklEQVR4AeyW0XHaQBCG/2VSgCuIzx04HZgOQgdxB9Fk8ox5zmTkDuIOkg6gA9yBDypIAR7W351sYEDCaCzkF+9o7w7dsv+/e8stAy/DVy/PH1DvWecJeyD5WFJQ/3IpeQkBsdB7SUgE3gs8434Q6CsD93q0IUV3m/O+NfRAwO8kG9rPOJMGE+3IiQnYjRXLayvi/wp3Na7mzXhCAgk8riP28vMfyb5rR1oQsBvJLir1vbPUtqysIOoMzm135uX5XLJvqpEjCRipjBOcxkqXhTIZca7aFlJtI/sRM0HAuWEdcDVedkcQ8FtAX6IJOD0TwjvILKhsQxUloTbk/T8h2CXwKUtmxobnFQJ+RxERrbi1A8D+lxWNK4wB4LME4MyKRTqaL1bEeyHsEbG/Co6pDhHA8fI6GeEQsOwQx0pr6sFTN7vSswBO+qFXBs4624bnrYNTEwEisdHmm6uSdQJnWj8A+JQCQ8MVJC/RseRUuyCpo6SOAJHYaBNR/vkQVaM/suBTgCk2JzONdrUbdQRIfYzJuorIDoEnszdpHQH+IaUiS5G3j6gtmzoC+EjAp40ckPw0EMh7vQwfBFIGcsX3ku99kBkELN12u01l37T7NwRukwEXDr/7BU1kYVb0qhdWxJSB7kNr45EjaGPevW0jAa7h4L9oMl1oGXYb2TqSWgKApwbzoE80mS5UPvffoban1BKAHh1RSXVqeQIAAP//TF3sLQAAAAZJREFUAwCBRGeYQHx5OgAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
.icon-7 {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAMmSURBVFiFrZfPTxNBFMc/0xaxISGLhgMEY1UuxBgK6RGT9iBX9eTR9catBWrire3ZxtabN8pfIPEIMW30SkxJ5KZxjUm9GNiYSKmA42Ha7rbsrxa+SdPJzNv3/c6bmTdvBANCrqET4ikQB+pAQRSpDeqnAxGYOEOMCBtA0mG4NqwQXwEyQ4wwOQS6rzdJhTMKooxxKQLkGjqCHIJYUIeACZQ55bUoYw4lQK7zCCgNSOwkpCCKlAMLGCjcQSExEDxz2x9dATJLDshfGvF51BCsipfUewS0Z129YLiDwkSQsouItI9WMPKoBgkdpufhqgbHJjT24PMWHBpBPGhISkCq0yFklkNA8yVeSsNy3t1mtwLbhUBCRNFa+ogv+UQM9LcwHff2mtDhdhLepIJGoyvAG/3kjTp8ranQT9yEO0n1A7gWg5UqlBeg6ZsCAghI6L3kH8vwbrXXZqeg7J5sWCKW0qo/AEKeo/fTVnu3cp7cPradt32XUfsmDIwOKyCq9c5+22dGOwUr7FENFuOwiPWbdBMgXS6OKRt50wy2sRq2HDMTsxZ4FJh1FuIegeNgm6iLcWDMx6YtRL6gKp8T9xZgn3FUU8fRDTPAXeC6LWpHhosxECaJVCLcBTRNddw6WM45240CN4C5HIy0U8qJCb9qzvYWNCQl71Owu2m1Ezo8cBAxBsxmYC5v9X3xvIHtiAu5zjfPi2ilaiUagAMD9rdUIopqcO8h3LKNHxnwfkFFwQ2fgJZq+guIakqEXyrukH9Iea9/n4AQwqdsappQWuhNNE74XlEz9yMHOLWaQq6zEbgCmoip5ZieV5EBONiDVsU75Ha0UBHoCrhoQTKOOoJByffphh8gJMoYnJGCIR8XfwLa/QT2esmBWm9RmiUJ5HB+fLhjBpULnPAb+NH+74Uqz5y+Gaosn2yL6Nx+LcAADhxsBVucsCrKGK4PE5lBI0IayOBXNXUQBqb4iwAaXOGs3ykGkoJ4RcXS4oOBhLSfZoBJhBygo1KugaAiipy70wd7nLo9WiQGIR731/wyg8YIsf7+oQR0nWZJIkgjSQJ1/rFpD+mg+A9dEv37gzwmcAAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
.icon-5 {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAKSSURBVFiF7ZdNSBRxGMZ/s7Pp6n44SplEwUBGeSjWPhErBmI7FQ2UFFi0EXTNoIsn7VLQxfZWEhh0KiIvnjqkh8AOsbtgFB1qIy1py7RWzY216fDfcdd1x51dZe3gA8uwzDvP87zvfz6eP/zHUNeSqw8wgBgQLNGMAnQAg2muSDEXx9SDLmPPSY/hrJSMNEEfoNm4VgN6gEmnSzJ2n/AY7XcbTI4lcFqxuLwO9JubCFyvI/wkwatHiWAingoCD4BLOeUKYlKnAK12m5N9bT78uofqWpmf4ylLt5YGTLjrZI5cUWi9XMO757OEnyZa3r/4bZ5WgYtAhyShNB6t5sA5H42HqwrR2jdgwiFLNAXcNAXcO5EIzyVSvbdbRm+562Sl+bSXvWe8KFts0xVvYBEMmmWn3A0oF+43UL+joiQaAAfi5ooh1rHscJB5zPQya0eASGlLsHJogB/EBNYU6wbWDawbsDQwPTHPzI/5VRGZS/wt2kBoLJokdHyU/s5vfHmdLEn4U3iOx9fi9LZ9BvEZXwKrN+EdYCiVNK6ODEwHRwam2eqv5FB7DbuOVSNvkCxFU38M3j6b4eXDX4y/SU4BQ0AofbRtACCKCB43AG0smuwai8ZVz0aZ/Wd9bG+t2pxT//XD8Oxwf+d3fWZi/iOi4xAwtYwGIKKSgYhRaoFajXRelCtEVGvrqTfO32vo7o6prnRNIQ4F6MrSZTLrj93spyK+ojFE6CwkaprvyaOHTia5Zv9i2JvKcjC7jeThH0Sk5gWoZMJJvuIg9kOLRv6mJhFNaYUIdDJ7g1wCqyXSyD9iswG9iAYWoCI6zzdCc9OSvfnIPd9ViqgV/FgvUdEjXimCLO7avKHKHmxVVncTW378A9QT5wUjCfL+AAAAAElFTkSuQmCC") no-repeat;
background-size: 100%;
}
.icon-8 {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAgCAYAAADjaQM7AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAJtSURBVEiJ7ZfbVdtAFEX3zHIBooLYFTBTAZ6VAmJXgKkAqABcAbiCuIPQgUwFGiqI6EAFZM3kY65svQAR7L/cL83z3HPuQ5JirOXFFJiDugQyYCorHpQnhFc0W5yt3rpCjQNRd8BqhEsVWj0SwmYI9H2wvLgB9TACpGslxCXO+nFgzy93hHjfvwSPVp4/4XU/O9HfCHEOGJEYoILomoDDYH1GJcQ1zm7f5dOXvAWoBw7MO0BbnJmNAgoscOYKrWpFMlC/6i19sORZbTucuRp0KC+y9qS+RqsH8sJwcb5uAE7JixU9GROr/DARnaR2DpQ4s0z7fC6pv0vlEF2SDIOzuz3TdG4qYXAdZuqyMSjlYB34BXlhZK2SS1ayr8TZag8E4GxJiJs9OzBdGRc9yZx9SpLEK5z15P5nZ5+Rgu+bppH6+mLSkHDaSFtazxfn6/1ziM9olTUAK0kokbhYCFsvpSIWW8w6AScb9Pi73UrsSoi3KVMllgCoHyI9hLYChwTpJQcATyJfv9/lxQJnn3rzh/VmggCUH4HR6HcvgMfZcmBPF2glJdRUxh9iFjBDVQdkqW2JX7mvJBs9qBJNYh1iHfP5QEgAKiWeZKCKjifHNa3uExetr08KBBDCRgmr329QP5btcMZpYXVKICCuATQh3pwY6LZuYzpl1clsi7OP9UBDXEKcodUJGMZ1czSR7lCRFy9jvn++YsNl/B/sn8FSen7cZI8CBkDcSJOtrTpmabTBnH2EOINoIZ7hzBnE22OBTXozqRS+ysaD2uFMKyx9sM9Z1fmL8fKCHfyTGQNWyqUlUKKVJ4Tn/SfcJ+wvprryJJDJBdEAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
}
.icon-9 {
width: 26rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAgCAYAAAAMq2gFAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHESURBVEiJ3ZcxctpAFIa/X5MZ4845gcUNnBNk0nhUkgqTCt8gnAB0AuwbyI0hVXCnSRNuYN8gOoKrgBu9FEjMSsgWxIhk/Fc7b7Xvf//u27dPAgi+2RCjD/jsFwkiirsKlZGM9kxQhBh5mZJmYfQ99r9dVfC9A5AAcDCid2WDwUzGIO4pce3BxHwTY0HHtacpn3980cy1nd9ax/P47to2FFWRAMQ9JTIGu+lw/AZTs4LDC+mlBeXvt8XbS4Z/l3XBxPyqZMjn8nFVtuXYKutMjF2HLomJcW3oz2Aj65rC20uG/4hIjDDaBg9NEiVxV2FW566bIzLCfBj3FAFJcZpHg8fXEiWZc85vrQOgtKAqkfHhaUEbiOqICpXB4ErGHcByuToTp0OaLZ6Ijo4ZCk4wQqeCXAYTuylJ+Og2PYULu1zwfn6p9VYEE/MRPwEf41Pc0zwnji/UzgOJuwopIVv7q1JR65j7YGp5lBicCU5WITEE5svfXLda3DhqR8HU+mye35n7sO1WgjJVecQm7teB1GC3C7tStR5vSwJ/UVSVMkg9TgVfd1m38R7VwTzGLzYVz8CjdIgNIfFQ/WV7NUQkOMxvyx8J8rz3lpEgKQAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
.icon-10 {
width: 27rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAfCAYAAAAWRbZDAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAL6SURBVEiJvZY/TBNxFMc/r9dKQ69QjG0RNDmQBBbiDUJqXBCcaRyMiWEyYXBSF4yJDAQTBwdxYlIXQsJmd8HEBHVgKGHRmEATA+Gf4QTqn5T25wAt0N5xUMDv+N6993nv/d798hPKlFEbMrScZioRQ0QuK+gQRUiJGppdXB2wixHXpKFQCJ/P0DRMUVxWgonCRAg5xWT/ZGpSlmUV272u1YKR96vd0iyUeitISgnT2SzJ1MpKsrE2PCdg4CcElMKMcNjUNF6gMIEQnt12RWEpSIqQVEpNe4Tk80cXrI6Y3/J6vYZSOQPAA6bevpJ0m5IUqrFRle6xNE28mke8Z3ziL/YHdQ893TXEb1SlAlcmG/K5FKQKHyksEZJZMgNeJxDA+mbO8VwAWIaF5QwKSe0178u5PSZTw2cUzmxyrIlgQCt8k3j3k/6hReJdVQw+PF+wD4+uMjz6g8EHtcRvVO8Uv63ZxZUGu5ouRcNrgFmA7QUdVQId6alrc8V2lVM39faPSSVYAobXLrhMpFECE9l3DJ6Tg7nrULCRxBrXbn9jeHT1WDDXMU583iQxvg7A8OgP6iK+smGunW2kczQ3VvDq2UWux3QWljOnB+vuqub1s4u0tVby8kk9PfGasmGOY+y8qgO7/1Jefb0RmhsqaGutPDlYMKCVgPJysrvpv66+bWcb6SwLSxnW07l99vqIj7qoj410li+zf20TtjRWFG6jra2tlCvs/tN5pmZ+2yabHGvi7uPvfHWAdcZ0hp7U2/psYT3xs7S1/imxBwMawYDGvTvn+Dpb6ge4csDi2MI6YzqdMd0xyM1/JNhIYo2pmV+sp7OHStLS6KevN1IebGrmFxOfNw8FAlhY2iof5nTAx5Xj6k98OnxnxWprraQuWnph28L6XyweaYzFclp/W1hfb4TrZWxbAXbVPtYWVhf1EY+Wd/8dpNO9G/1+C0DU9lNdLtWG3wMdwYDnWC8sO80vZ1Kw845UWNJ7yzDHP6TfiGCeKGmvFJZCDfwDa27tlQaAF3UAAAAASUVORK5CYII=") no-repeat;
background-size: 100%;
}
.icon-11 {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAMfSURBVFiFvZc9SFtRFMf/574YGk0hkx+bBDIKcYtC2yc42CyxICnoUBuhU8F26xYDHTpVQzsJajroIF1c1MFiaEEz1bRuDQ3Z/Jgc1KDx3dPB+Exi3st9UfuHB+/j3nN+9757zzmX4FDF/vA4Mb8goiAxZw3mhCeznnZq50qk7Dg01E1EC0Sk3zDCnG4WpCFAMTTULYSIAxhXsJeSUiY8mfXCnQAU+8PjAogD6FY1COAIwIz79DRJ2fRRUwBnfU+HQTTt0PENEGZOPNhem1EGcDjdqipIKV9arQ8T4Kw/HAcwdYeOqx0xp0H01r21mq16Xx715i2nW1VHBAxUQrg0ogVWdE6d7aCA37x4/xCcy0P+/A3sH6qY8EnmaQADJgATBVV6arFRaBNjlt+N5RUYc4vA8Yn9IGriiADgs+3hbUPL13lb5wCgRSNoSX0CdbbbtquVq1EDbWIM1NVhPvPeAeSPDDiXN3+F6O0BAFBXB1yfP6A0ErsbAPEoBC0aMZ+NuUUY80s320UjcE2+MiG02GjddnV92H58Pmzey+/blkbl1f+v0+9WABTwm/cXyVlbQ8b8Eri8AMnbprwWBJjrJ47OdpC3DQAuDStsM/7zty68PYCF6KFXyUB1J7XsXgwNmVvREoBzecdTWjlqmctbthNCbJZDv/0aqJzShnEgNur0l00VQ0O6LYBc+3ZNHR6EVt5qtRLhwSrAyh1hJyHEE9s4IFc3YAT8ZizQohGI3h7Ind3LQFTODeJx33WfnV3I5RUlAKhEQmNusTraBfzQLFY47x3AeP9R2Tkx+wSI7Mum4xNcvH6Hi+SsuSitQEsjMbBaVrwEJvK5AGQBNMyIcnkFcnWjKh1j7+Byt+TyjhxX6n8XJLVKCU9mvSClHCDmpg8XzYqZf9UWpbpGFOc6h497UMF9etp7n2W5ncwDjGXw5qDuO29tnQTwpmHVpK6CBBKerdXU1YuG2cMhSKoEJFuASE37AjMn6x1SHB1OhRDTAOpVG4US8MxbUW5zUPedezw6ALiLxbTVMU0ZoAJEF0JMAtCZOctEXyqn1Kn+Acc8R+azqi7AAAAAAElFTkSuQmCC") no-repeat;
background-size: 100%;
}
.icon-12 {
width: 32rpx;
height: 32rpx;
margin-right: 10rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAALaSURBVFiFxZdPVtpQFMZ/92nBYXbQuILSFYjTUs+BFagrMAykmamzVAfqCrQriD1op2UHxRWYJWQo9JjbQQImkMDDQ9s74rx3893v3f/AfxZ501f9XpsN2SGRBgZAh7zId/aCwd8lEHoO9foJKl45ml4xGp3RuYptITdXIlCr36DSrrxX8ahtOcChLaSxNt7vtWGB8Vc54ME/WD8BI/vWuoq1rj0BaFprijbWS+DBPwFxrAkgDve98kSd1Vx4G/ouNb20jH0Z+oDRc2dRVVQTCD2H2tYvwM1OotzvJaJxzmMRY3bpBFGZZnUI6lthzuApY3atjY/lY1qKGgMudW6qtMsJ3Pc8dJp0p7SCs+wFFvUtXTpBRCu4BemmnGimeVSiPXcSeg61+lPmwltaQdFo32+ywUmOYPZwBshLl9bFsHCeGj4FYMz2bCjmCUw/0JjxaLsygULfZTNJy81oNGe4iPkEuGjS5fP5Vf6qpBWrBwIiw4U9PX1JaWLNiegdKh5ijoACgWIOhL47zV7lmxW4jWgywXJ5OC40qSKBiUsBxs93ayPQuhhmFQHJRqGhFUMguTqvbV1y33tEzfAtcx4yj75L2hh5j05sJA1giveahPlsnRXRKz597a5kfBHepLSnBBYrT2S+JKvkx5fLyqVlhoTQ95sYfloBw2HaYBZIv9fGmNAKLWHXYPTI0rjdnN8w9niGfQNiPbut5rza7wKgDWM/4UjnfOhX6+f7iJ24BmWFEtO4aqzCpDuq9UYMRAaj1T18VkSW66qFzhSPgWEk19Y9/YWzpTq/bVdyjRnJtclcuhwYwLBD6FXHOPRdapxYhUH1jE4QvXbCtB/clCRlBOoUkksYoOSmoTZQcZDCjjD/3eQ8t6KV7APHDVSaiIkZM6ATRNl+eJSN6mVZnnq0FdwSeg6bteZ0xogOZveG1f+cpp3uQ+opbaASIxqDDEmSR/bO1zdF/4X8AW6TCGj4xKy6AAAAAElFTkSuQmCC") no-repeat;
background-size: 100%;
}
}
.right-txt {
font-size: 28rpx;
color: #999;
}
}
.content {
.report-wrap {
padding: 40rpx 0 0;
.row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 35rpx;
&:last-child {
margin-bottom: 0;
}
.item {
.label {
color: #999999;
font-size: 28rpx;
}
.value {
color: #333;
font-size: 28rpx;
}
}
}
}
.course-list {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
padding: 40rpx 0 15rpx;
.item {
width: 320rpx;
background: #F8F9FB;
border-radius: 12rpx;
overflow: hidden;
margin-bottom: 20rpx;
.img-wrap {
display: flex;
justify-content: center;
overflow: hidden;
width: 320rpx;
height: 184rpx;
image {
height: 100%;
}
}
.title {
padding: 10rpx 20rpx 0;
height: 76rpx;
color: #333333;
font-size: 28rpx;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
/*! autoprefixer: ignore next */
-webkit-box-orient: vertical;
}
.count {
margin-top: 10rpx;
font-size: 24rpx;
color: #999999;
padding: 0 20rpx 20rpx;
}
}
}
.text-wrap {
padding: 40rpx 0 15rpx;
.row {
display: flex;
margin-bottom: 25rpx;
.label {
font-size: 28rpx;
color: #999;
}
.value {
width: 500rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 28rpx;
color: #333;
&.w450 {
width: 450rpx;
}
}
.long-value {
width: 450rpx;
font-size: 28rpx;
color: #333;
overflow: hidden;
display: -webkit-box;
-webkit-line-clamp: 2;
/*! autoprefixer: ignore next */
-webkit-box-orient: vertical;
}
}
}
.list {
padding: 40rpx 0 15rpx;
.item {
display: flex;
align-items: center;
margin-bottom: 25rpx;
.name {
color: #1676FF;
font-size: 28rpx;
margin-right: 20rpx;
}
.cancel-btn {
width: 92rpx;
height: 48rpx;
line-height: 48rpx;
text-align: center;
background: #FCF6EC;
border-radius: 8rpx 8rpx 8rpx 8rpx;
border: 2rpx solid #FAECD8;
font-size: 26rpx;
color: #E6A23C;
}
}
}
.empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40rpx 0 25rpx;
.icon {
width: 128rpx;
height: 128rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAATlBMVEUAAABLac1KaMtNbM5Lac1IaMxGZMVPY89JZstNW9ZKaMxJZs1LaMtLaM1Jac1KaM1KaMtKatBKZ8xKaMxKaMpHZMhLaNFKac5LaM1MZ84Bwi/qAAAAGnRSTlMAM4AZmR8IEHAFeFBAJzhgSBNoWGAMLIqVOe7t0vgAAAVXSURBVHja7ZmJrqMgFIYFyiKLUpf2zvu/6Hix5UhprVAaMxO/m5umafQ/nFWwOjg4ODg4ODg4+M8h1b6wvtoXinm1Ky221Z4YjHd1AZUYY7GbBURhh9S7lALqMKD2MIGZ9i5Pq51o8ITYYfWBBfv2wu6rfYBR1OiJBhH2KhWxi/8XksDoQeAFsm3IUxc4S2XhXkCVwE+QUbq7tTMksGjKqXNQj2kb9iRUFvflXKAFXkVq9iQQrFh/A/mubyiZV8hNs3CLoLHXSnnfqwyIRz82Lb7RRwsuu3yhXqyIWnmLQ1N9AX0P8opDmb6ZoIs/TLIOOxR/E6Y5EB93wJY/1Reo8tScUnO5XIwxZKwrjxFzRbLPpoh9pg/lXBODAszZ28BvxrIPOt3vCmgF9KFbR4OeQL0JdjY3v9z0w2OEDRKrjuQjE/SnmYiCEKDgdgStQAILPqjGZS/h0unD8tcw9dKCoVe6MTxn1i8rwiX1Tf+C3nBhPm2A1lL2QUVASjO0AQZ9OxrWGTAXADqvH6HtFpB4WNPsDmzB/xu41HBliGJ5DpDzdWYt+S6RBcwFgQfDuuNZDtBv628Mf6ZQvioc1l2OAwR7lwDG6YUGTfwu3D+Q0janOyHoJybFAANXo9CbInEq+gwY0RrkMUJn74LhIZ4mOQLWOyCBWUbh4IiCQwxSIkA3t4AoCyjEwCFSH1WUjwBFidBZMRzLMtUDwk+BC0rFTwSoPHDIRpivAYaSGf0gYVFKb4X4rCUoGeLXTJdjrU/OwZwUgDpYPJcQGGtJOQhFmMbFp52F+by5BuARX+TkIGThcB8HXKQ+KjdyMT1QBrU3wOsnnFQwhWeGTw1wtzASpySAM7iMAcrdQmOc1gKIwAUN6Oa7SbJdf3aYavNzAJLQkXJq7QPWuB2RzKkCKEPvyoRjIi5vDptDxzL7gIF7pY0gJrzDjM9cgpKhk7wG929HwRXEN9IRJcO5Fn75CdBlwsr79KhRKtrLJ761aZfb2sH3YpooL66wIUrSJ8El1iVBcgysPJ3AAJ2+EaGBOSqtE+j+ejqdflwmCbjbVlT46C7c14Q66OVpwjlAIN65RpLE4NIu3JujrTtTK35OMz/uQI1mHNj14VaCwzg4o3WUuJ48rfEJTaok7EPdDBBFsxZ3eQKu4g9UdFulQR8aF3Lf144n/qjueloge4RqqGhaJdI9HLkPMMh5vPLZ7wDu//iNocnYjsP4aBFbZIHgUSVY1cmbOKjrxVkdgxpMA8F7KMrus6GHM0I9SXfYpXsQd/UnPCvsoYckQgX2iE7djmmRnpTB4wG4s8hDFgUsWeZ7KfyS6xPxaemRPpEfHZVyK/ErfsDtsrXRQelSX5V8OQhcf6ZG27WwcIDUy4fqj1+WMdpY1QlwhhgGpRtDyZvDcgK7kEJQEb6Lqs9RWzSkhgECDzWl4MKfdIIN3ogLBfWKWdAvbEH8VrIex5HVkbOgdRWEd9jR8ncVXF4fXAvn7usNRJXXhx0TDIoQjgb8zRencGThaBvCgoIdcMKJeD60xYDolbJa9UOHAYGqrwImAAXl0aA3mGDlC3VIz0zI1lMMajv8QKdMAfcmTFBGtVKDEKIbhr7Z/lZuPUNbOEf7EsxWu8J7cHEm9S/sKe6n9fW3GEubrMjYyPl5gmzkPMH5yFhsTyP5ZuFJFjTzmWxZTsxmkzQ/k+KcuTODvRUvpE3df2QFq9flOQFo/j8ox/B6RZ+UhEbruFG/NuAce4/mfcKXmA0h+FgdiBbD601JmOWElThAEu5bhimwsBHRtNXHjQj4fismQSsuCwyj8ffPf8AwOjg4OPjX+AveIUqXZPVRsgAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
margin-bottom: 30rpx;
}
text {
font-size: 24rpx;
color: #A4B3E5;
}
}
}
.footer {
display: flex;
justify-content: center;
padding-top: 10rpx;
.btn {
width: 400rpx;
height: 80rpx;
text-align: center;
line-height: 80rpx;
background: #1676FF;
font-size: 28rpx;
color: #fff;
border-radius: 60rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,759 @@
<template>
<view class="index-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goBack"></view>
<text>职业路径</text>
</view>
<view class="content">
<view class="section">
<view class="title-h1">
推荐职业
</view>
<view class="table" v-if="jobList.length > 0">
<view class="tr">
<view class="th">
</view>
<view class="th">
职业名称
</view>
<view class="th">
测评推荐
</view>
<view class="th">
我的意向
</view>
<view class="th">
专业匹配
</view>
</view>
<view class="tr" v-for="(item,index) in jobList" @click="checkedJob(item)" :key="index">
<view class="td">
<view class="checked-btn" :class="checkedCode==item.EncodeId?'on':''"></view>
</view>
<view class="td">
{{item.Name}}
</view>
<view class="td">
<view class="is-has" v-if="item.IsRecommend"></view>
</view>
<view class="td">
<view class="is-has" v-if="item.IsIntention"></view>
</view>
<view class="td">
<view class="is-has" v-if="item.IsSpecialtyMatch"></view>
</view>
</view>
</view>
<view class="empty" v-else>
<view class="icon"></view>
<view class="txt">暂无推荐职业请先进行兴趣测评</view>
<view class="nav-btn" @click="navTest">
去测评
</view>
</view>
<view class="title-h1">
职业介绍
</view>
<view class="desc">
<view class="strong">
{{jobName}}
</view>
{{jobIntroduce}}
</view>
<view class="title-h1">
发展路径
</view>
<view class="desc">
<view class="strong">
{{jobPath}}
</view>
</view>
<view class="path-map">
<view class="origin-item">
大学生
</view>
<view class="path-list" :class="isLoadingEnd?'show':'ing'">
<view class="line-1">
<view class="drop" :class="'drop-' + (index+1)" v-for="(item,index) in academicRequire" :key="index" @click="showName(item)">
<view class="txt">
{{item}}
</view>
<view class="icon"></view>
</view>
</view>
<view class="line-2">
<view class="drop" :class="'drop-' + (index+1)" v-for="(item,index) in generalSkillRequire" :key="index" @click="showName(item)">
<view class="txt">
{{item}}
</view>
<view class="icon"></view>
</view>
</view>
<view class="line-3">
<view class="drop" :class="'drop-' + (index+1)" v-for="(item,index) in certificateRequire" :key="index" @click="showName(item)">
<view class="txt">
{{item}}
</view>
<view class="icon"></view>
</view>
</view>
<view class="line-4">
<view class="drop" :class="'drop-' + (index+1)" v-for="(item,index) in jobSkill" :key="index" @click="showName(item)">
<view class="txt">
{{item}}
</view>
<view class="icon"></view>
</view>
</view>
<view class="line-5">
<view class="drop" :class="'drop-' + (index+1)" v-for="(item,index) in professionalRequire" :key="index" @click="showName(item)">
<view class="txt">
{{item}}
</view>
<view class="icon"></view>
</view>
</view>
<view class="line-6">
<view class="drop" :class="'drop-' + (index+1)" v-for="(item,index) in jobRequire" :key="index" @click="showName(item)">
<view class="txt">
{{item}}
</view>
<view class="icon"></view>
</view>
</view>
</view>
<view class="terminal-point">
{{jobName}}
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import api from "@/apiCa/studentProfile.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
jobList: [],//
checkedCode: null,
jobIntroduce: "",
jobName: "",
jobPath: "",
academicRequire: [], //
generalSkillRequire: [],
certificateRequire: [],
jobRequire: [],
jobSkill: [],
professionalRequire: [],
isLoadingEnd: false,
}
},
created() {
this.init();
},
methods: {
// 获取推荐职业
async init(){
uni.showLoading({
title: "加载中..."
})
await this.queryCareerPath();
await this.queryPathInfo();
uni.hideLoading();
},
async queryCareerPath() {
const res = await api.queryCareerPath();
if (res.Result == 1) {
const list = res.Data.JobList
this.jobList = list;
if(list.length>0){
this.checkedCode = list[0].EncodeId;
}
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 获取职业
async queryPathInfo(){
this.isLoadingEnd = false;
const res = await api.queryPathInfo(this.checkedCode);
if (res.Result == 1) {
let data = res.Data;
this.jobName = data.Name;
this.jobIntroduce = data.JobIntroduce;
this.jobPath = data.JobPath;
this.academicRequire = JSON.parse(data.AcademicRequire).slice(0,5);
this.generalSkillRequire = JSON.parse(data.GeneralSkillRequire).slice(0,5);
this.certificateRequire = JSON.parse(data.CertificateRequire).slice(0,5);
this.jobRequire = JSON.parse(data.JobRequire).slice(0,5);
this.jobSkill = JSON.parse(data.JobSkill).slice(0,5);
this.professionalRequire = JSON.parse(data.ProfessionalRequire).slice(0,5);
this.isLoadingEnd = true;
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 去测评
navTest(){
uni.navigateTo({
url: `/pagesTest/interestTestCollect/interestTestTitle`
})
},
//选中职业
checkedJob(ITEM){
this.checkedCode = ITEM.EncodeId;
this.queryPathInfo();
},
showName(ITEM){
uni.showToast({
title: ITEM,
icon:"none"
});
},
goBack(){
uni.navigateBack(-1);
},
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: #EEF1F8 url("#{$image-oss-url}/17.png") no-repeat;
background-size: contain;
overflow-y: scroll;
}
</style>
<style lang="scss" scoped>
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding-top: 60rpx;
padding-bottom: 100rpx;
.icon {
width: 240rpx;
height: 240rpx;
background: url("#{$image-oss-url}/empty.png") no-repeat;
background-size: 100%;
margin-bottom: 20rpx;
}
.txt {
font-size: 28rpx;
color: #A4B3E5;
}
.nav-btn {
width: 335rpx;
height: 80rpx;
margin: 40rpx auto 0;
background-color: #1989fa;
border-radius: 40rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 80rpx;
}
}
.index-wrap {
.content {
padding: 0 20rpx;
margin-top: 60rpx;
.title-h1 {
font-size: 32rpx;
color: #333;
margin-bottom: 30rpx;
font-weight: 600;
}
.section {
width: 650rpx;
padding: 30rpx 30rpx 50rpx;
background-color: #ffffff;
border-radius: 14rpx;
margin-bottom: 50rpx;
.table {
border-left: 2rpx solid #eef2fd;
border-top: 2rpx solid #eef2fd;
border-right: 2rpx solid #eef2fd;
border-radius: 6rpx;
overflow-x: auto;
overflow-y: auto;
margin-bottom: 30rpx;
max-height: 400rpx;
.tr {
display: -webkit-box;
.th {
width: 145rpx;
height: 72rpx;
line-height: 72rpx;
text-align: center;
background: #F6F9FE;
font-size: 24rpx;
color: #333333;
border-bottom: 2rpx solid #eef2fd;
&:nth-child(1){
width: 60rpx;
}
&:nth-child(2){
width: 250rpx;
}
}
.td {
display: flex;
justify-content: center;
align-items: center;
width: 145rpx;
min-height: 72rpx;
font-size: 24rpx;
color: #333333;
text-align: center;
border-bottom: 2rpx solid #eef2fd;
&:nth-child(1){
width: 60rpx;
}
&:nth-child(2){
width: 250rpx;
word-break: break-all;
}
.checked-btn {
width: 28rpx;
height: 28rpx;
background: #FFFFFF;
border-radius: 50%;
border: 2rpx solid #999999;
&.on {
position: relative;
border-color: #1989fa;
background: #1989fa;
&:before {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
content: "";
display: block;
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #fff;
}
}
}
.is-has {
width: 48rpx;
height: 48rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAPXSURBVGiB7VlBbttIEKweLrXH5QKW4JuZH/gHa79g5RfEeoFpwBJ8o3Tz2gGkvCD6gZMXWE/QD8TcDDvA8hopntpDxlnZniFHJGMggOomcWbY1Wx2VzeBLbbY4peGNH3gzhkPRBCLYI9ABCISQUbiswjy5RKzfCJ5U/erTWD3nPHDAw5E8DeArs8eEjMSn759w7QumVoEds6YKIUTAHGV/SRyEUyWS7yvSqQSgXafxyJIqxr+HCRyEqMv72Sy6d6NCXQGTAEMN93nAxLT1QqnmzwNbwJRwihsIRUgqWyhH+ZK4ej2QjKfxcr31DDE+BWMB4B9rXETJYx8FnsR6AyYiuC4tmn+iFu/Y+yzsDSEOgN2AVw3YpbbiikAgC+cNLy7lFHRVp8n4OWJipgrhTd3/0gPhC1khrvnLMx0vxVdNBmnkVT5HAQm95dy+uM3cSCWeNBECqDnOscZQlHCKAyxELF6pha0xul6zo8Sxq0WFq71SuGNKys5QygM0X0N433woHHiulb0Dvy1kWV+GDqMLyxcUqCxrARMDvYSZr4gMHFlFFN5iwpX3O5z33bBSiAMETccPvPVEoXpEIJZ0WUSB7b/XSFkZVsFJHKlcFSmb5QUE1QKf1j/d9zUx/sfSUzJYs+JYOKja24vJCPgfLlJezq31gFR2HMckpMYPW9ETModW+TGvKySwjRFmkgtlXgd/gQcxs+CAD2bNw2ZXrvPWOT/WNUapy8OshiudXWdZQ8hjc+Wv/e1xtsilRgEaxVTMP3yTpzh1Rkw1RqLEq+vw7+QKfVysclKwzDEYueMVll9eyEZBFMS+fKr3fu754w7Ay6waVMk9lphJaC1u7CIIFIK43afH2xPQwlGIpjYsk67z32tcVNFXzmiwq6FooRRq4V/Pc717p7afR4DGFetL1rj0BaSTjHXGfDasxpnSuGwiIQZAnzYxOB1kMjvr+RP2zWnFiLxyfP8WGt3z2AkQL2e4rHhscBJIAgwK9En6+ia3uEJTDNyU1eWULud6SRgQsLJ3IKhiXPAvEda47q28cSsKB0XtpSmivo+BYggfWwBwxbSJjTVk9piQWlPTJaoyKeItca43edxEyMYolxHeQ22fuY0zgUSs/srOSxb5zUXuruUUZnqbBjZaoUjn4Xek7kgQO+VSGRK4dB3PrrxcLc94E8bMRYpXhcqjdd3zpiIIG247SydwtlQ+QOH0UsnJJJaRARTJRht4vWn22ti95yx1nhrJmvWxtuCjMDHQOF9VcMf0ehHPtNadkWwR36fbJj+Onv80Adgfn8l8ybvu8UWW/zC+A/xK5HWhynIGQAAAABJRU5ErkJggg==") center no-repeat;
background-size: 90%;
}
}
}
}
.desc {
font-size: 28rpx;
color: #666666;
margin-bottom: 50rpx;
.strong {
font-weight: 600;
color: #333;
}
}
.path-map {
display: flex;
flex-direction: column;
align-items: center;
.terminal-point,
.origin-item {
display: flex;
align-items: center;
justify-content: center;
width: 144rpx;
height: 144rpx;
color: #ffffff;
font-size: 28rpx;
text-align: center;
border-radius: 50%;
margin-bottom: 20rpx;
background-color: #1989fa;
animation: change 2s linear infinite 0s;
}
@keyframes change {
0% {
box-shadow: 0 0 1px 6rpx #e8f3fe;
}
25% {
box-shadow: 0 0 1px 12rpx #e8f3fe;
}
50% {
box-shadow: 0 0 1px 16rpx #e8f3fe;
}
75% {
box-shadow: 0 0 1px 12rpx #e8f3fe;
}
100% {
box-shadow: 0 0 1px 6rpx #e8f3fe;;
}
}
.path-list {
position: relative;
padding: 0 30rpx;
height: 1160rpx;
width: 690rpx;
margin-bottom: 30rpx;
.drop {
position: absolute;
left: 0;
top: 0;
.txt {
width: 150rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: center;
height: 52rpx;
padding: 0 10rpx;
line-height: 52rpx;
margin-bottom: 10rpx;
background-color: #ffffff;
border-radius: 26rpx;
color: #1989fa;
font-size: 28rpx;
border: solid 2rpx #1989fa;
}
.icon {
width: 32rpx;
height: 44rpx;
margin: 0 auto;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAsCAMAAAAzZkq9AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAByFBMVEUZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoAAAAhPv4wAAAAlnRSTlMAMGSDm56PbUsPIoDY77RPGv7IUYz6uSGZ9w267UOvJU7FG2OfAgHwvVZzqPFxPBPW0IUM4Oid9doyq/Pi4/LRvm7OePgYl1x65NweDpWx2y9FkHQfBRX5zcbnXuZhR6zlsinqVesZV+42OHBmBolpMwQIqaMrmIKiHTpCaqotUHw9EaUj9MOBaCAkb4jUyaeO4fvdrUZV3EhjAAAAAWJLR0SX5m4brwAAAAd0SU1FB+kKHg8QKp3MRF0AAAH3SURBVDjLfZT5P5tBEMaHCEop6qyUV9QV4oqjrgqNO62rlCC0SJBWaV093UfrPjp/r/fNm92dJO/r+SUz830+u5uZdxeAKCLSEGWMjol9BFqKi3+MASUkPgnDSVHJSJXyNJinpmGo0jMIz0QNZcUx/CwbNWV6HjDkoJ5y/VzS5ZincHOyvgHzZcOLBzimFUBhEcmLU0skS2kZqVihnGSR6qErKkWpCqpFIrH/bavhtVoo5nGdaJy5nhXr4SU3NJDWNrJiEzSzsIXOxsCqr6CVhXZqaBOGPBa2U8NrcQYjCx0dxNDJBwZd/JDdxNDDir3Qxw0tTs7f8OJbgH7hGAhwvi3iIMAQ6fXwO4ARyS4KTbJ99D0d39i4i6YTyoJW/Wn3qltO6hqmVINbj0+HtSVYM6IvHzQNH0nnZjX4HB1OxnwYjwm+nB09IdwSer09lUHcq/FAlAq8sBgKbUu+T2Bh3A6fl7+srHL61fvNgcpFdKsf8xqsKz+mjUGVb9bKWfOW1fodPPLHOv4D4Oev7t8mudqqHKVO9lb/Yatt77BodVe5tV2wh7gMOnLmoAsqlAuqp30s8r8vVflaL+OB4RDRB1AwrAziqPP4xL3y17PnHDX/W5JOz4zncvVCnYfNd6Q5zcttspz3Krv9ev7GDxyu25S74//qtveUBePSekmnEAAAAABJRU5ErkJggg==") no-repeat;
background-size: 100%;
}
}
&.ing {
.drop {
transform: scale(0.1);
}
}
&.show {
.line-1{
.drop-1 {
animation: showDot 0.2s linear 0s;
}
.drop-2 {
animation: showDot 0.2s linear 0.2s;
}
.drop-3 {
animation: showDot 0.25s linear 1.1s;
}
.drop-4 {
animation: showDot 0.2s linear 1.8s;
}
.drop-5 {
animation: showDot 0.2s linear 2s;
}
}
.line-2{
.drop-1 {
animation: showDot 0.2s linear 0.3s;
}
.drop-2 {
animation: showDot 0.2s linear 0.5s;
}
.drop-3 {
animation: showDot 0.2s linear 1.4s;
}
.drop-4 {
animation: showDot 0.2s linear 1.9s;
}
.drop-5 {
animation: showDot 0.2s linear 2.1s;
}
}
.line-3{
.drop-1 {
animation: showDot 0.2s linear 0.1s;
}
.drop-2 {
animation: showDot 0.2s linear 0.8s;
}
.drop-3 {
animation: showDot 0.25s linear 1.3s;
}
.drop-4 {
animation: showDot 0.2s linear 1.5s;
}
.drop-5 {
animation: showDot 0.2s linear 1.7s;
}
}
.line-4{
.drop-1 {
animation: showDot 0.2s linear 0.6s;
}
.drop-2 {
animation: showDot 0.2s linear 0.9s;
}
.drop-3 {
animation: showDot 0.25s linear 1.4s;
}
.drop-4 {
animation: showDot 0.2s linear 1.6s;
}
.drop-5 {
animation: showDot 0.2s linear 1.8s;
}
}
.line-5{
.drop-1 {
animation: showDot 0.2s linear 0.2s;
}
.drop-2 {
animation: showDot 0.2s linear 0.9s;
}
.drop-3 {
animation: showDot 0.2s linear 1.4s;
}
.drop-4 {
animation: showDot 0.2s linear 1.7s;
}
.drop-5 {
animation: showDot 0.2s linear 1.9s;
}
}
.line-6{
.drop-1 {
animation: showDot 0.2s linear 0.4s;
}
.drop-2 {
animation: showDot 0.2s linear 0.8s;
}
.drop-3 {
animation: showDot 0.25s linear 1s;
}
.drop-4 {
animation: showDot 0.2s linear 1.9s;
}
.drop-5 {
animation: showDot 0.2s linear 2.2s;
}
}
}
.line-1 {
position: absolute;
left: 65rpx;
top: 20rpx;
width: 190rpx;
height: 1168rpx;
background: url("#{$image-oss-url}/gaoxiao/jobCareer/path-1.png") center no-repeat;
background-size: 100%;
.drop-1 {
left: 40rpx;
top: -13rpx;
}
.drop-2 {
left: -37rpx;
top: 202rpx;
}
.drop-3 {
left: -77rpx;
top: 381rpx;
}
.drop-4 {
left: -48rpx;
top: 750rpx;
}
.drop-5 {
left: 10rpx;
top: 910rpx;
}
}
.line-2 {
position: absolute;
left: 180rpx;
top: 20rpx;
width: 95rpx;
height: 1169rpx;
background: url("#{$image-oss-url}/gaoxiao/jobCareer/path-2.png") center no-repeat;
background-size: 100%;
.drop-1 {
left: -58rpx;
top: 146rpx;
}
.drop-2 {
left: -76rpx;
top: 316rpx;
}
.drop-3 {
left: -82rpx;
top: 480rpx;
}
.drop-4 {
left: -85rpx;
top: 633rpx;
}
.drop-5 {
left: -57rpx;
top: 822rpx;
}
}
.line-3 {
position: absolute;
left: 310rpx;
top: 0;
width: 16rpx;
height: 1169rpx;
background: url("#{$image-oss-url}/gaoxiao/jobCareer/path-3.png") center no-repeat;
background-size: 100%;
.drop-1 {
left: -78rpx;
top: 90rpx;
}
.drop-2 {
left: -78rpx;
top: 264rpx;
}
.drop-3 {
left: -78rpx;
top: 433rpx;
}
.drop-4 {
left: -78rpx;
top: 589rpx;
}
.drop-5 {
left: -78rpx;
top: 773rpx;
}
}
.line-4 {
position: absolute;
left: 410rpx;
top: 0;
width: 16rpx;
height: 1169rpx;
background: url("#{$image-oss-url}/gaoxiao/jobCareer/path-4.png") center no-repeat;
background-size: 100%;
.drop-1 {
left: -78rpx;
top: 153rpx;
}
.drop-2 {
left: -78rpx;
top: 336rpx;
}
.drop-3 {
left: -78rpx;
top: 504rpx;
}
.drop-4 {
left: -78rpx;
top: 656rpx;
}
.drop-5 {
left: -78rpx;
top: 839rpx;
}
}
.line-5 {
position: absolute;
left: 465rpx;
top: 16rpx;
width: 60rpx;
height: 1168rpx;
background: url("#{$image-oss-url}/gaoxiao/jobCareer/path-5.png") center no-repeat;
background-size: 100%;
.drop-1 {
left: -72rpx;
top: -41rpx;
}
.drop-2 {
left: -39rpx;
top: 219rpx;
}
.drop-3 {
left: -31rpx;
top: 446rpx;
}
.drop-4 {
left: -36rpx;
top: 695rpx;
}
.drop-5 {
left: -61rpx;
top: 933rpx;
}
}
.line-6 {
position: absolute;
left: 480rpx;
top: 20rpx;
width: 186rpx;
height: 1168rpx;
background: url("#{$image-oss-url}/gaoxiao/jobCareer/path-6.png") center no-repeat;
background-size: 100%;
.drop-1 {
left: -5rpx;
top: 57rpx;
}
.drop-2 {
left: 66rpx;
top: 273rpx;
}
.drop-3 {
left: 90rpx;
top: 518rpx;
}
.drop-4 {
left: 54rpx;
top: 753rpx;
}
.drop-5 {
left: -58rpx;
top: 1028rpx;
}
}
@keyframes showDot {
0% {
opacity: 0;
transform: scale(0.1);
}
100% {
opacity: 1;
transform: scale(1);
}
}
}
}
}
}
}
</style>

View File

@@ -0,0 +1,658 @@
<template>
<view class="index-wrap">
<view class="head-bar" :style="{'margin-top': barHeight + 5 + 'px'}">
<view class="go-back" @click="goBack"></view>
<text>smart目标制定</text>
</view>
<view class="content">
<view class="banner-wrap"></view>
<view class="desc">
SMART法则是目标设定和任务管理的一种结构化方法 用于设定和分析目标的可行性其核心是通过五个关键原则实现目标的科学设定与执行:
</view>
<view class="smart-item s-code">
<view class="code">
S
</view>
<view class="info">
<view class="title">
目标具体性
</view>
<view class="txt">
在大学四年内掌握英语教学法教育心理学等专业知识具备独立设计和实施英语课程的教学能力
</view>
</view>
</view>
<view class="smart-item m-code">
<view class="code">
M
</view>
<view class="info">
<view class="title">
目标可测量性
</view>
<view class="txt">
通过参加英语教师资格认证考试获得相关证书每年至少发表一篇英语教学方面的论文或参加一次学术研讨会
</view>
</view>
</view>
<view class="smart-item a-code">
<view class="code">
A
</view>
<view class="info">
<view class="title">
目标可实现性
</view>
<view class="txt">
参加培训课程阅读专业书籍进行教学实践等确保每周投入一定的时间进行学习和实践
</view>
</view>
</view>
<view class="smart-item r-code">
<view class="code">
R
</view>
<view class="info">
<view class="title">
目标相关性
</view>
<view class="txt">
考虑自己的英语水平和教学经验目标符合个人能力和职业发展规划同时关注英语教育行业的动态和趋势确保目标具有前瞻性
</view>
</view>
</view>
<view class="smart-item t-code">
<view class="code">
T
</view>
<view class="info">
<view class="title">
目标时限性
</view>
<view class="txt">
一年内完成英语教师资格认证考试的学习准备两年内积累一定的教学经验三年内发表第一篇教学论文等
</view>
</view>
</view>
<view class="target-content">
<view class="target-tabbar">
<view class="item" :class="checkedTargetCode ==item.EncodeId?'on':''" v-for="(item,index) in targetList" :key="index" @click="changeTarget(item)">
<text v-text="tabs[index]"></text>
<view class="del-btn" @click="delTarget(item)"></view>
</view>
<view class="add-btn" :class="checkedTargetCode ==-1?'on':''" v-if="targetList.length < 5" @click="addTarget">
+ 新增目标
</view>
</view>
<view class="form-wrap" >
<view class="form-item">
<view class="label">
目标描述
</view>
<view class="input-wrap">
<textarea v-model="targetForm.TargetDesc"
placeholder="如:在未来三年内成功考取国内知名大学计算机专业的硕士研究生,并在研究生期间发表至少一篇高水平学术论文"></textarea>
</view>
</view>
<view class="form-item">
<view class="label">
目标类型
</view>
<view class="check-wrap">
<view class="checked-item" @click="targetForm.TargetType = 1">
<view class="icon" :class="targetForm.TargetType == 1?'on':''"></view>
<text class="text">就业型</text>
</view>
<view class="checked-item" @click="targetForm.TargetType = 2">
<view class="icon" :class="targetForm.TargetType == 2?'on':''"></view>
<text class="text">创业型</text>
</view>
<view class="checked-item" @click="targetForm.TargetType = 3">
<view class="icon" :class="targetForm.TargetType == 3?'on':''"></view>
<text class="text">国内升学型</text>
</view>
<view class="checked-item" @click="targetForm.TargetType = 4">
<view class="icon" :class="targetForm.TargetType == 4?'on':''"></view>
<text class="text">国外升学型</text>
</view>
</view>
</view>
<view class="form-item">
<view class="label">
具体性
</view>
<view class="input-wrap">
<textarea v-model="targetForm.Targetspecificity" placeholder="该目标足够具体明确吗?请说明"></textarea>
</view>
</view>
<view class="form-item">
<view class="label">
可测量性
</view>
<view class="input-wrap">
<textarea v-model="targetForm.Measurability" placeholder="该目标的结果如何评估,是否可量化?请说明"></textarea>
</view>
</view>
<view class="form-item">
<view class="label">
可实现性
</view>
<view class="input-wrap">
<textarea v-model="targetForm.Realizability" placeholder="该目标是否考虑自身的条件和外部环境,真的可以实现吗?请说明"></textarea>
</view>
</view>
<view class="form-item">
<view class="label">
相关性
</view>
<view class="input-wrap">
<textarea v-model="targetForm.Correlation" placeholder="该目标符合你自己的兴趣、价值观与未来的人生规划吗?请说明"></textarea>
</view>
</view>
<view class="form-item">
<view class="label">
时限性
</view>
<view class="input-wrap">
<textarea v-model="targetForm.Timeliness" placeholder="该目标是否有明确的时间规划?请说明"></textarea>
</view>
</view>
<view class="tip">
如果分析不下去说明目标不可行需要优化或
重新设定目标
</view>
<view class="btn-wrap">
<view class="commit-btn" @click="saveTarget">
确认提交
</view>
<view @click="goPlan" class="nav-btn">
前往制定学习计划
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import api from "@/apiCa/studentProfile.js"
export default {
data() {
return {
barHeight: wx.getWindowInfo().statusBarHeight,
tabs:['目标一 ', '目标二 ', '目标三 ', '目标四 ', '目标五 '],
targetList: [],////目标列表
checkedTargetCode: "",//// 目标码
newTargetParams: {
Id: 0,
TargetDesc: "",
TargetType: "",
Targetspecificity: "",
Measurability: "",
Realizability: "",
Correlation: "",
Timeliness: "",
},//新增目标字段
targetForm: {},//当前选中的目标
}
},
created() {
this.querySmartTargets();
},
methods: {
goPlan(){
if(this.targetList.length==0){
uni.showToast({
title: "请先新增目标",
icon: "none"
})
return;
}
uni.navigateTo({
url:"/packageCa/userCenter/learningPlan"
})
},
goBack(){
uni.navigateBack(-1);
},
// 添加目标
addTarget(){
this.targetForm = {
Id: 0,
TargetDesc: "",
TargetType: "",
Targetspecificity: "",
Measurability: "",
Realizability: "",
Correlation: "",
Timeliness: "",
};
this.checkedTargetCode = -1;
},
// 保存目标
async saveTarget(){
const res = await api.saveSmartTarget(this.targetForm);
if (res.Result == 1) {
uni.showToast({
title: "保存成功",
icon: "success"
})
this.querySmartTargets();
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 切换目标标签
changeTarget(ITEM){
if(ITEM.EncodeId == this.checkedTargetCode){
return;
}
this.checkedTargetCode = ITEM.EncodeId;
this.targetForm = this.targetList.filter(item=>item.EncodeId == ITEM.EncodeId)[0];
},
// 删除目标
async delTarget(ITEM){
await new Promise((resolve,reject)=>{
uni.showModal({
title: '提示',
content: '是否确认删除该目标',
confirmText: '确定',
cancelText: '取消',
confirmColor: '#1677ff',
cancelColor: '#999999',
success: (res)=> {
if (res.confirm) {
resolve();
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
})
const res = await api.deleteSmartTarg(ITEM.EncodeId);
if (res.Result == 1) {
uni.showToast({
title: '删除成功',
icon: 'success'
});
this.checkedTargetCode="";
this.targetForm={
Id: 0,
TargetDesc: "",
TargetType: "",
Targetspecificity: "",
Measurability: "",
Realizability: "",
Correlation: "",
Timeliness: "",
};
this.querySmartTargets();
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
// 获取
async querySmartTargets() {
const res = await api.querySmartTargets();
if (res.Result == 1) {
this.targetList = res.Data;
if(res.Data.length > 0){
if(this.checkedTargetCode == ""){
this.checkedTargetCode = res.Data[0].EncodeId;
this.targetForm = res.Data[0];
}else if(this.checkedTargetCode == -1){
this.checkedTargetCode = res.Data[res.Data.length-1].EncodeId;
this.targetForm = res.Data[res.Data.length-1];
}else {
this.targetForm = this.targetList.filter(item=>item.EncodeId == this.checkedTargetCode)[0];
}
}
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
//确认表单
async commitForm() {
if (!this.isCommit) {
return;
}
uni.showLoading({
title: "保存中..."
})
let mobileCode = this.code;
const data = {
SchoolName: this.schoolName,
EduLevel: this.eduLevel,
SpecialtyName: this.specialtyName,
Phone: this.mobile,
StartYear: this.startYear
}
const res = await api1.saveUserBasisInfo(mobileCode, data);
uni.hideLoading();
if (res.Result == 1) {
uni.navigateBack()
} else {
uni.showToast({
title: res.Message,
icon: "none"
})
}
},
}
}
</script>
<style lang="scss">
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
page {
background: #fff url("#{$image-oss-url}/17.png") no-repeat;
background-size: contain;
overflow-y: scroll;
}
</style>
<style lang="scss" scoped>
$image-oss-url: "https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh";
.head-bar {
position: relative;
text-align: center;
font-size: 36rpx;
font-weight: 600;
height: 60rpx;
line-height: 60rpx;
.go-back {
position: absolute;
left: 10rpx;
top: 0;
width: 60rpx;
height: 60rpx;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAABUklEQVRoQ+3ZOwrCQBCA4UlyCVsrQauQdPYewcNYWXoHK1s9gYeYdIKlracYWYggkgiTnccuaB3D/+1sYEMKyPxXZN4Pf0DMBOu6XpZluQOANRGduq7bc+/nNoE+/gwAq3c0IrJ72H/grtDQ9UPxAPBAxDn3/uaAkfjQvUXES9IA6fiANZuARrwZQCveBKAZrw7QjlcFWMSrAaziVQCW8eIA63hRgEe8GMArXgTgGR8N8I6PAqQQPxmQSvxkQNM0VwDYfJ3dJ53nuef/7+vZx+l+9W8pxE+aQNu2CyK6ZwsI4VlvoQDI/iFOCcF+iD/3fgqTiAKkMIlogDdCBOCJEAN4IUQBHghxgDVCBWCJUANYIVQBFgh1gDbCBKCJMANoIUwBGghzwA/EExFn3HdkF8AYIpvPrO9VDu8TVVUdiKghomNWH7q5W2Xserct9Af0K/AChQ/cMY9OGScAAAAASUVORK5CYII=") center no-repeat;
background-size: 38rpx 38rpx;
}
}
.index-wrap {
.content {
padding-top: 60rpx;
padding-bottom: 60rpx;
.banner-wrap {
width: 750rpx;
height: 423rpx;
background: url("#{$image-oss-url}/gaoxiao/academicEvaluation/smart-banner.png");
background-size: 100%;
margin-bottom: 50rpx;
}
.desc {
margin-bottom: 40rpx;
font-size: 28rpx;
line-height: 48rpx;
color: #666666;
padding: 0 30rpx;
}
.smart-item {
padding: 0 30rpx 0 55rpx;
position: relative;
margin-bottom: 25rpx;
.code {
position: absolute;
left: 30rpx;
top: 50%;
transform: translateY(-50%);
width: 86rpx;
height: 110rpx;
padding-right: 20rpx;
text-align: center;
line-height: 110rpx;
font-size: 50rpx;
color: #fff;
}
.info {
width: 530rpx;
padding: 30rpx 30rpx 30rpx 106rpx;
background-color: #ffedef;
border-radius: 10rpx;
.title {
font-size: 28rpx;
font-weight: 600;
color: #333333;
margin-bottom: 20rpx;
}
.txt {
font-size: 28rpx;
line-height: 40rpx;
color: #999999;
}
}
&.s-code {
.code {
background: url("#{$image-oss-url}/gaoxiao/academicEvaluation/smart-s.png") no-repeat;
background-size: 100%;
}
.info {
background: #ffedef;
}
}
&.m-code {
.code {
background: url("#{$image-oss-url}/gaoxiao/academicEvaluation/smart-m.png") no-repeat;
background-size: 100%;
}
.info {
background: #fff4e5;
}
}
&.a-code {
.code {
background: url("#{$image-oss-url}/gaoxiao/academicEvaluation/smart-a.png") no-repeat;
background-size: 100%;
}
.info {
background: #e9f8e0;
}
}
&.r-code {
.code {
background: url("#{$image-oss-url}/gaoxiao/academicEvaluation/smart-r.png") no-repeat;
background-size: 100%;
}
.info {
background: #edf3ff;
}
}
&.t-code {
.code {
background: url("#{$image-oss-url}/gaoxiao/academicEvaluation/smart-t.png") no-repeat;
background-size: 100%;
}
.info {
background: #fcedff;
}
}
}
.target-content {
padding: 0 30rpx;
.target-tabbar {
border-top: 2rpx solid #eee;
padding-top: 50rpx;
margin-bottom: 50rpx;
display: flex;
flex-wrap: wrap;
.item {
position: relative;
width: 205rpx;
height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 34rpx;
border: solid 2rpx #eeeeee;
font-size: 28rpx;
color: #999999;
margin-right: 15rpx;
margin-bottom: 15rpx;
&.on {
color: #1676FF;
border-color: #1676FF;
}
.del-btn {
position: absolute;
right: 10rpx;
top: 50%;
transform: translateY(-50%);
width: 48rpx;
height: 48rpx;
z-index: 8;
background: #fff url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAolJREFUaEPtWG1SwjAQTYI4HkIc+KXcgp5EehLxJOBJ4BboLzvgIRyQRFNaplPS7NukjMNM+xOym/f242UTKa78k1eOX3QE/juDXQa6DERGoCuhyABGm0MZ+Hi4fTFCTO1uRut0/PWzit6ZcLAe3g3H2XdG7UMSWA/6UynlvOroz2imlXpDNqAA1P9f399MpFJ2v6EQInva7EY+HySB90F/KaScOJxkUojF42b3ygXpWm8jLg+HeX0vo9TIFyiSQO5Y689GkMasTK+XhmajCXhersak4+1+EZUBa1yQWBZpdfkLykbRWzOXQwS8tSMzUDq3JJTWz0YI54bFuswolVDZ8EUdjXyJCyZQGviiVpLw9QZlb7ROOCrHJpCXlEOZXE1elVwq6lZxQiQ6iADYF3ZZ3ht5WfhKz5jV03afhKhZMAEGCS+uotzSEPCsJm7aAGxupzmqNNEyikSHas6aj6B6d+GIKqG6Q5QEdboiAQuWUZ/zYo6xBx71QecF5aSVHjgddMchDAFfmrRCopUSYkS+HtRoEtEEAPB2prejcdMXRSKKADmp2tNVqcQ1Jp+pEjBDtapCCPjyMgJMs/mpjQyCdRJBGeCAPzU5da84LmSTYBMAwNt7s3OihIdARjmxCMSALzMBHnZwJmACgNrY29GMuiMDYzXrnIAIIOAFYyQGmxrqCZJA2+CZTZ2T8D2teAlA4AOUgz1+eLLrJYA0HPcOW9dxSpmoCw9dQkf9dj6pIE2LTJRNgUL8kwQsAKdyMJqWIuG41cEXHohASaLyLkS+WVKgz0qpeHeyv1NSXLWFCVTVg3q44oKPWc8mELPZJWw7ApeIKsdnlwFOtC6xtsvAJaLK8Xn1GfgFGlSeQAhcb/UAAAAASUVORK5CYII=") center no-repeat;
background-size: 60%;
}
}
.add-btn {
width: 155rpx;
height: 64rpx;
text-align: center;
line-height: 64rpx;
font-size: 28rpx;
color: #1676FF;
border-radius: 34rpx;
border: solid 2rpx #fff;
&.on {
border-color: #1676FF;
}
}
}
.form-wrap {
.form-item {
.label {
font-size: 28rpx;
color: #333333;
margin-bottom: 30rpx;
}
.check-wrap {
display: flex;
flex-wrap: wrap;
.checked-item {
width: 50%;
display: flex;
align-items: center;
margin-bottom: 30rpx;
.icon {
width: 20rpx;
height: 20rpx;
border-radius: 6rpx;
margin-right: 10rpx;
border: solid 2rpx #787a7c;
&.on {
width: 24rpx;
height: 24rpx;
border: none;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAMAAADXqc3KAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAtFBMVEUZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifoZifqezf3S6P5Tp/ur1P3///+o0/2m0f3j8f43mPuhz/3p9P8tk/pJovvd7f652/2gzv3v9/+Fwfy62/3r9f81l/spkfrX6/6y2P2Wyf3w9/8di/qx1/2VyP30+f8lj/rg7/6Qxv18vPz3+/89nPtEn/vt9v/+//8wlfvf7v5GoPsAAABXZ1/lAAAAEHRSTlMABm7H8xvP0Adt+fjRb8v03bb1CgAAAAFiS0dEOzkO9GwAAAAHdElNRQfpChsLJB43hRvxAAAAw0lEQVQoz3WS13LCMBRErxu2aV4Slh5IwDih9/r/HxbBUASW90EzOkczmltExLIdF1pcx7ZExcshlZyn3hs44AcSwphQHLNwJG8WBUmzysenOtOiStZMok42mgbRItsd3MRXt3fn3+TPlV9Fnxzc/iXjIR4i+SX/LpcROW7iKTDpklNgRs6H0AUWS3K1JjdbvAokDapsdngXSPbkQePPOo6n+KwXlNVEN7vtGYOyJfBNvBiYl8H3LmtilcqRTqNySa3PP/+nJn7xFbPrAAAAAElFTkSuQmCC") no-repeat;
background-size: 100%;
}
}
.text {
font-size: 28rpx;
color: #787a7c;
}
}
}
.input-wrap {
margin-bottom: 40rpx;
textarea {
width: 650rpx;
height: 120rpx;
padding: 20rpx;
background-color: #ffffff;
border-radius: 6rpx;
border: solid 2rpx #eeeeee;
resize: none;
font-size: 28rpx;
line-height: 40rpx;
&::-webkit-input-placeholder {
color: #999999;
font-size: 28rpx;
}
}
}
}
.tip {
font-size: 28rpx;
line-height: 40rpx;
color: #1676FF;
margin-bottom: 50rpx;
}
.btn-wrap {
display: flex;
justify-content: space-between;
align-items: center;
padding-bottom: 50rpx;
.commit-btn {
width: 335rpx;
height: 80rpx;
background-color: #1676FF;
border-radius: 40rpx;
font-size: 28rpx;
color: #fff;
text-align: center;
line-height: 80rpx;
}
.nav-btn {
width: 331rpx;
height: 76rpx;
font-size: 28rpx;
text-align: center;
line-height: 76rpx;
background-color: #fff;
border-radius: 40rpx;
color: #1676FF;
border: solid 2rpx #1676FF;
}
}
}
}
}
}
</style>

View File

@@ -421,10 +421,225 @@
"style": {
"navigationBarTitleText": "需求"
}
},
{
"path": "pages/daiban/daibandetail",
"style": {
"navigationBarTitleText": "待办详情"
}
},
{
"path": "pages/demand/demandail",
"style": {
"navigationBarTitleText": "新增需求"
}
},
{
"path": "pages/daiban/addbangfu",
"style": {
"navigationBarTitleText": "添加帮扶"
}
},
{
"path": "pages/service/serviceDetail",
"style": {
"navigationBarTitleText": "服务"
}
},
{
"path": "pages/needs/needDetail",
"style": {
"navigationBarTitleText": "需求"
}
}
]
},
{
"root": "packageCa",
"pages": [
{
"path" : "search/search",
"style" : {
"navigationBarTitleText" : "生涯规划",
"navigationStyle": "custom"
}
},
{
"path": "job/index",
"style": {
"navigationBarTitleText": "职业库"
}
},
{
"path": "job/midList",
"style": {
"navigationBarTitleText": "职业库-中类"
}
},
{
"path": "job/smallList",
"style": {
"navigationBarTitleText": "职业库-小类"
}
},
{
"path": "job/details",
"style": {
"navigationBarTitleText": "职业详情"
}
},
{
"path": "userCenter/professionPath",
"style": {
"navigationBarTitleText": "职业路径",
"navigationStyle": "custom"
}
},
{
"path": "userCenter/personDocument",
"style": {
"navigationBarTitleText": "生涯档案",
"navigationStyle": "custom"
}
},
{
"path": "userCenter/careerCompass",
"style": {
"navigationBarTitleText": "生涯罗盘",
"navigationStyle": "custom"
}
},
{
"path": "userCenter/learningPlan",
"style": {
"navigationBarTitleText": "学业规划",
"navigationStyle": "custom"
}
},
{
"path": "userCenter/smartTarget",
"style": {
"navigationBarTitleText": "学业规划",
"navigationStyle": "custom"
}
},
{
"path": "userCenter/fillInInformation",
"style": {
"navigationBarTitleText": "完善个人信息"
}
},
{
"path": "pagesTest/testList",
"style": {
"navigationBarTitleText": "生涯测评",
"navigationStyle": "custom"
}
},
{
"path": "pagesTest/customTestTitle",
"style": {
"navigationBarTitleText": "自定义测评",
"navigationStyle": "custom"
}
},
{
"path": "pagesTest/interestTestTitle",
"style": {
"navigationBarTitleText": "职业兴趣测评",
"navigationStyle": "custom"
}
},
{
"path": "pagesTest/workValuesTestTitle",
"style": {
"navigationBarTitleText": "工作价值观测评",
"navigationStyle": "custom"
}
},
{
"path": "pagesTest/personalTestTitle",
"style": {
"navigationBarTitleText": "人格测评",
"navigationStyle": "custom"
}
},
{
"path": "testReport/workValuesTestReport",
"style": {
"navigationBarTitleText": "工作价值观测评报告",
"navigationStyle": "custom"
}
},
{
"path": "testReport/multipleAbilityTestReport",
"style": {
"navigationBarTitleText": "多元能力测评报告",
"navigationStyle": "custom"
}
},
{
"path": "testReport/generalCareerTestReport",
"style": {
"navigationBarTitleText": "通用职业能力测评报告",
"navigationStyle": "custom"
}
},
{
"path": "testReport/personalTestReport",
"style": {
"navigationBarTitleText": "人格测评报告",
"navigationStyle": "custom"
}
},
{
"path": "testReport/interestTestReport",
"style": {
"navigationBarTitleText": "职业兴趣测评报告",
"navigationStyle": "custom"
}
}
]
}
],
],
// "tabBar": {
// "custom": true,
// "color": "#5E5F60",
// "selectedColor": "#256BFA",
// "borderStyle": "black",
// "backgroundColor": "#ffffff",
// "list": [{
// "pagePath": "pages/index/index",
// "iconPath": "static/tabbar/calendar.png",
// "selectedIconPath": "static/tabbar/calendared.png",
// "text": "职1"
// },
// {
// "pagePath": "pages/careerfair/careerfair",
// "iconPath": "static/tabbar/post.png",
// "selectedIconPath": "static/tabbar/posted.png",
// "text": "招聘会"
// },
// {
// "pagePath": "pages/chat/chat",
// "iconPath": "static/tabbar/logo3.png",
// "selectedIconPath": "static/tabbar/logo3.png",
// "text": "AI+"
// },
// {
// "pagePath": "pages/msglog/msglog",
// "iconPath": "static/tabbar/chat4.png",
// "selectedIconPath": "static/tabbar/chat4ed.png",
// "text": "消息"
// },
// {
// "pagePath": "pages/mine/mine",
// "iconPath": "static/tabbar/mine.png",
// "selectedIconPath": "static/tabbar/mined.png",
// "text": "我的"
// }
// ]
// },
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "uni-app",

View File

@@ -106,7 +106,7 @@
</view>
<view class="service-title">题库和考试</view>
</view>
<view class="service-item press-button" @click="handleServiceClick('quality-assessment')">
<view class="service-item press-button" @click="goCa()">
<view class="service-icon service-icon-8">
<IconfontIcon name="suzhicepingtiku" :size="48" color="#FFFFFF" />
</view>
@@ -1047,6 +1047,13 @@ function goRc(){
// });
}
}
// 跳转素质测评页面(在线测评,职业库,职业生涯规划)
function goCa(){
if (checkLogin()) {
const userInfo = uni.getStorageSync('userInfo')
navTo(`/packageCa/search/search?userId=${userInfo.userId}&name=${userInfo.name}`);
}
}
defineExpose({ loadData });

View File

@@ -0,0 +1,200 @@
## 0.9.62024-07-23
- fix: 修复 uni is not defined
## 0.9.52024-07-19
- chore: 鸿蒙`measureText`为异步,异步字体不正常,使用模拟方式。
## 0.9.42024-07-18
- chore: 更新文档
## 0.9.32024-07-16
- feat: 鸿蒙 canvas 事件缺失,待官方修复,如何在鸿蒙使用请看文档`常见问题 vue3`
## 0.9.22024-07-12
- chore: 删除多余文件
## 0.9.12024-07-12
- fix: 修复 安卓5不显示图表问题
## 0.9.02024-06-13
- chore: 合并nvue和uvue
## 0.8.92024-05-19
- chore: 更新文档
## 0.8.82024-05-13
- chore: 更新文档和uvue示例
## 0.8.72024-04-26
- fix: uniapp x需要HBX 4.13以上
## 0.8.62024-04-10
- feat: 支持 uniapp x ios
## 0.8.52024-04-03
- fix: 修复 nvue `reset`传值不生效问题
- feat: 支持 uniapp x web
## 0.8.42024-01-27
- chore: 更新文档
## 0.8.32024-01-21
- chore: 更新文档
## 0.8.22024-01-21
- feat: 支持 `uvue`
## 0.8.12023-08-24
- fix: app 的`touch`事件为`object` 导致无法显示 `tooltip`
## 0.8.02023-08-22
- fix: 离屏 报错问题
- fix: 微信小程序PC无法使用事件
- chore: 更新文档
## 0.7.92023-07-29
- chore: 更新文档
## 0.7.82023-07-29
- fix: 离屏 报错问题
## 0.7.72023-07-27
- chore: 更新文档
- chore: lime-echart 里的示例使用自定tooltips
- feat: 对支持离屏的使用离屏创建(微信、字节、支付宝)
## 0.7.62023-06-30
- fix: vue3 报`width`的错
## 0.7.52023-05-25
- chore: 更新文档 和 demo, 使用`lime-echart`这个标签即可查看示例
## 0.7.42023-05-22
- chore: 增加关于钉钉小程序上传时提示安全问题的说明及修改建议
## 0.7.32023-05-16
- chore: 更新 vue3 非微信小程序平台可能缺少`wx`的说明
## 0.7.22023-05-16
- chore: 更新 vue3 非微信小程序平台的可以缺少`wx`的说明
## 0.7.12023-04-26
- chore: 更新demo使用`lime-echart`这个标签即可查看示例
- chore微信小程序的`tooltip`文字有阴影,怀疑是微信的锅,临时解决方法是`tooltip.shadowBlur = 0`
## 0.7.02023-04-24
- fix: 修复`setAttribute is not a function`
## 0.6.92023-04-15
- chore: 更新文档vue3请使用echarts esm的包
## 0.6.82023-03-22
- feat: mac pc无法使用canvas 2d
## 0.6.72023-03-17
- feat: 更新文档
## 0.6.62023-03-17
- feat: 微信小程序PC已经支持canvas 2d故去掉判断PC
## 0.6.52022-11-03
- fix: 某些手机touches为对象导致无法交互。
## 0.6.42022-10-28
- fix: 优化点击事件的触发条件
## 0.6.32022-10-26
- fix: 修复 dataZoom 拖动问题
## 0.6.22022-10-23
- fix: 修复 飞书小程序 尺寸问题
## 0.6.12022-10-19
- fix: 修复 PC mousewheel 事件 鼠标位置不准确的BUG不兼容火狐
- feat: showLoading 增加传参
## 0.6.02022-09-16
- feat: 增加PC的mousewheel事件
## 0.5.42022-09-16
- fix: 修复 nvue 动态数据不显示问题
## 0.5.32022-09-16
- feat: 增加enableHover属性 在PC端时当鼠标进入显示tooltip不必按下。
- chore: 更新文档
## 0.5.22022-09-16
- feat: 增加enableHover属性 在PC端时当鼠标进入显示tooltip不必按下。
## 0.5.12022-09-16
- fix: 修复nvue报错
## 0.5.02022-09-15
- feat: init(echarts, theme?:string, opts?:{}, callback: function(chart))
## 0.4.82022-09-11
- feat: 增加 @finished
## 0.4.72022-08-24
- chore: 去掉 stylus
## 0.4.62022-08-24
- feat: 增加 beforeDelay
## 0.4.52022-08-12
- chore: 更新文档
## 0.4.42022-08-12
- fix: 修复 resize 无参数时报错
## 0.4.32022-08-07
# 评论有说本插件对新手不友好,让我做不好就不要发出来。 还有的说跟官网一样,发出来做什么,给我整无语了。
# 所以在此提醒一下准备要下载的你,如果你从未使用过 echarts 请不要下载 或 谨慎下载。
# 如果你确认要下载麻烦看完文档。还有请注意插件是让echarts在uniapp能运行API 配置请自行去官网查阅!
# 如果你不会echarts 但又需要图表,市场上有个很优秀的图表插件 uchart 你可以去使用这款插件uchart的作者人很好也热情。
# 每个人都有自己的本职工作,如果你能力强可以自行兼容,如果使用了他人的插件也麻烦尊重他人的成果和劳动时间。谢谢。
# 为了心情愉悦,本人已经使用插件屏蔽差评。
- chore: 更新文档
## 0.4.22022-07-20
- feat: 增加 resize
## 0.4.12022-06-07
- fix: 修复 canvasToTempFilePath 不生效问题
## 0.4.02022-06-04
- chore 为了词云 增加一个canvas 标签
- 词云下载地址[echart-wordcloud](https://ext.dcloud.net.cn/plugin?id=8430)
## 0.3.92022-06-02
- chore: 更新文档
- tips: lines 不支持 `trailLength`
## 0.3.82022-05-31
- fix: 修复 因mouse事件冲突tooltip跳动问题
## 0.3.72022-05-26
- chore: 更新文档
- chore: 设置默认宽高300px
- fix: 修复 vue3 微信小程序 拖影BUG
- chore: 支持PC
## 0.3.52022-04-28
- chore: 更新使用方式
- 🔔 必须使用hbuilderx 3.4.8-alpha以上
## 0.3.42021-08-03
- chore: 增加 setOption的参数值
## 0.3.32021-07-22
- fix: 修复 径向渐变报错的问题
## 0.3.22021-07-09
- chore: 统一命名规范,无须主动引入组件
## [代码示例站点1](https://limeui.qcoon.cn/#/echart-example)
## [代码示例站点2](http://liangei.gitee.io/limeui/#/echart-example)
## 0.3.12021-06-21
- fix: 修复 app-nvue ios is-enable 无效的问题
## [代码示例站点1](https://limeui.qcoon.cn/#/echart-example)
## [代码示例站点2](http://liangei.gitee.io/limeui/#/echart-example)
## 0.3.02021-06-14
- fix: 修复 头条系小程序 2d 报 JSON.stringify 的问题
- 目前 头条系小程序 2d 无法在开发工具上预览划动图表页面无法滚动axisLabel 字体颜色无法更改建议使用非2d。
## 0.2.92021-06-06
- fix: 修复 头条系小程序 2d 放大的BUG
- 头条系小程序 2d 无法在开发工具上预览,也存在划动图表页面无法滚动的问题。
## [代码示例http://liangei.gitee.io/limeui/#/echart-example](http://liangei.gitee.io/limeui/#/echart-example)
## 0.2.82021-05-19
- fix: 修复 微信小程序 PC 显示过大的问题
## 0.2.72021-05-19
- fix: 修复 微信小程序 PC 不显示问题
## [代码示例http://liangei.gitee.io/limeui/#/echart-example](http://liangei.gitee.io/limeui/#/echart-example)
## 0.2.62021-05-14
- feat: 支持 `image`
- feat: props 增加 `ec.clear`,更新时是否先删除图表样式
- feat: props 增加 `isDisableScroll` ,触摸图表时是否禁止页面滚动
- feat: props 增加 `webviewStyles` webview 的样式, 仅nvue有效
## 0.2.52021-05-13
- docs: 插件用到了css 预编译器 [stylus](https://ext.dcloud.net.cn/plugin?name=compile-stylus) 请安装它
## 0.2.42021-05-12
- fix: 修复 百度平台 多个图表ctx 和 渐变色 bug
- ## [代码示例http://liangei.gitee.io/limeui/#/echart-example](http://liangei.gitee.io/limeui/#/echart-example)
## 0.2.32021-05-10
- feat: 增加 `canvasToTempFilePath` 方法,用于生成图片
```js
this.$refs.chart.canvasToTempFilePath({success: (res) => {
console.log('tempFilePath:', res.tempFilePath)
}})
```
## 0.2.22021-05-10
- feat: 增加 `dispose` 方法,用于销毁实例
- feat: 增加 `isClickable` 是否派发点击
- feat: 实验性的支持 `nvue` 使用要慎重考虑
- ## [代码示例http://liangei.gitee.io/limeui/#/echart-example](http://liangei.gitee.io/limeui/#/echart-example)
## 0.2.12021-05-06
- fix修复 微信小程序 json 报错
- chore: `reset` 更改为 `setChart`
- feat: 增加 `isEnable` 开启初始化 启用这个后 无须再使用`init`方法
```html
<l-echart ref="chart" is-enable />
```
```js
// 显示加载
this.$refs.chart.showLoading()
// 使用实例回调
this.$refs.chart.setChart(chart => ...code)
// 直接设置图表配置
this.$refs.chart.setOption(data)
```
## 0.2.02021-05-05
- fix修复 头条 百度 偏移的问题
- docs: 更新文档
## [代码示例http://liangei.gitee.io/limeui/#/echart-example](http://liangei.gitee.io/limeui/#/echart-example)
## 0.1.02021-05-02
- chore: 第一次上传,基本全端兼容,使用方法与官网一致。
- 已知BUG非2d 无法使用背景色,已反馈官方
- 已知BUG头条 百度 有许些偏移
- 后期计划兼容nvue

View File

@@ -0,0 +1,393 @@
const cacheChart = {}
const fontSizeReg = /([\d\.]+)px/;
class EventEmit {
constructor() {
this.__events = {};
}
on(type, listener) {
if (!type || !listener) {
return;
}
const events = this.__events[type] || [];
events.push(listener);
this.__events[type] = events;
}
emit(type, e) {
if (type.constructor === Object) {
e = type;
type = e && e.type;
}
if (!type) {
return;
}
const events = this.__events[type];
if (!events || !events.length) {
return;
}
events.forEach((listener) => {
listener.call(this, e);
});
}
off(type, listener) {
const __events = this.__events;
const events = __events[type];
if (!events || !events.length) {
return;
}
if (!listener) {
delete __events[type];
return;
}
for (let i = 0, len = events.length; i < len; i++) {
if (events[i] === listener) {
events.splice(i, 1);
i--;
}
}
}
}
class Image {
constructor() {
this.currentSrc = null
this.naturalHeight = 0
this.naturalWidth = 0
this.width = 0
this.height = 0
this.tagName = 'IMG'
}
set src(src) {
this.currentSrc = src
uni.getImageInfo({
src,
success: (res) => {
this.naturalWidth = this.width = res.width
this.naturalHeight = this.height = res.height
this.onload()
},
fail: () => {
this.onerror()
}
})
}
get src() {
return this.currentSrc
}
}
class OffscreenCanvas {
constructor(ctx, com, canvasId) {
this.tagName = 'canvas'
this.com = com
this.canvasId = canvasId
this.ctx = ctx
}
set width(w) {
this.com.offscreenWidth = w
}
set height(h) {
this.com.offscreenHeight = h
}
get width() {
return this.com.offscreenWidth || 0
}
get height() {
return this.com.offscreenHeight || 0
}
getContext(type) {
return this.ctx
}
getImageData() {
return new Promise((resolve, reject) => {
this.com.$nextTick(() => {
uni.canvasGetImageData({
x:0,
y:0,
width: this.com.offscreenWidth,
height: this.com.offscreenHeight,
canvasId: this.canvasId,
success: (res) => {
resolve(res)
},
fail: (err) => {
reject(err)
},
}, this.com)
})
})
}
}
export class Canvas {
constructor(ctx, com, isNew, canvasNode={}) {
cacheChart[com.canvasId] = {ctx}
this.canvasId = com.canvasId;
this.chart = null;
this.isNew = isNew
this.tagName = 'canvas'
this.canvasNode = canvasNode;
this.com = com;
if (!isNew) {
this._initStyle(ctx)
}
this._initEvent();
this._ee = new EventEmit()
}
getContext(type) {
if (type === '2d') {
return this.ctx;
}
}
setAttribute(key, value) {
if(key === 'aria-label') {
this.com['ariaLabel'] = value
}
}
setChart(chart) {
this.chart = chart;
}
createOffscreenCanvas(param){
if(!this.children) {
this.com.isOffscreenCanvas = true
this.com.offscreenWidth = param.width||300
this.com.offscreenHeight = param.height||300
const com = this.com
const canvasId = this.com.offscreenCanvasId
const context = uni.createCanvasContext(canvasId, this.com)
this._initStyle(context)
this.children = new OffscreenCanvas(context, com, canvasId)
}
return this.children
}
appendChild(child) {
console.log('child', child)
}
dispatchEvent(type, e) {
if(typeof type == 'object') {
this._ee.emit(type.type, type);
} else {
this._ee.emit(type, e);
}
return true
}
attachEvent() {
}
detachEvent() {
}
addEventListener(type, listener) {
this._ee.on(type, listener)
}
removeEventListener(type, listener) {
this._ee.off(type, listener)
}
_initCanvas(zrender, ctx) {
// zrender.util.getContext = function() {
// return ctx;
// };
// zrender.util.$override('measureText', function(text, font) {
// ctx.font = font || '12px sans-serif';
// return ctx.measureText(text, font);
// });
}
_initStyle(ctx, child) {
const styles = [
'fillStyle',
'strokeStyle',
'fontSize',
'globalAlpha',
'opacity',
'textAlign',
'textBaseline',
'shadow',
'lineWidth',
'lineCap',
'lineJoin',
'lineDash',
'miterLimit',
// #ifdef H5
'font',
// #endif
];
const colorReg = /#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])\b/g;
styles.forEach(style => {
Object.defineProperty(ctx, style, {
set: value => {
// #ifdef H5
if (style === 'font' && fontSizeReg.test(value)) {
const match = fontSizeReg.exec(value);
ctx.setFontSize(match[1]);
return;
}
// #endif
if (style === 'opacity') {
ctx.setGlobalAlpha(value)
return;
}
if (style !== 'fillStyle' && style !== 'strokeStyle' || value !== 'none' && value !== null) {
// #ifdef H5 || APP-PLUS || MP-BAIDU
if(typeof value == 'object') {
if (value.hasOwnProperty('colorStop') || value.hasOwnProperty('colors')) {
ctx['set' + style.charAt(0).toUpperCase() + style.slice(1)](value);
}
return
}
// #endif
// #ifdef MP-TOUTIAO
if(colorReg.test(value)) {
value = value.replace(colorReg, '#$1$1$2$2$3$3')
}
// #endif
ctx['set' + style.charAt(0).toUpperCase() + style.slice(1)](value);
}
}
});
});
if(!this.isNew && !child) {
ctx.uniDrawImage = ctx.drawImage
ctx.drawImage = (...a) => {
a[0] = a[0].src
ctx.uniDrawImage(...a)
}
}
if(!ctx.createRadialGradient) {
ctx.createRadialGradient = function() {
return ctx.createCircularGradient(...[...arguments].slice(-3))
};
}
// 字节不支持
if (!ctx.strokeText) {
ctx.strokeText = (...a) => {
ctx.fillText(...a)
}
}
// 钉钉不支持 , 鸿蒙是异步
if (!ctx.measureText || uni.getSystemInfoSync().osName == 'harmonyos') {
ctx._measureText = ctx.measureText
const strLen = (str) => {
let len = 0;
for (let i = 0; i < str.length; i++) {
if (str.charCodeAt(i) > 0 && str.charCodeAt(i) < 128) {
len++;
} else {
len += 2;
}
}
return len;
}
ctx.measureText = (text, font) => {
let fontSize = ctx?.state?.fontSize || 12;
if (font) {
fontSize = parseInt(font.match(/([\d\.]+)px/)[1])
}
fontSize /= 2;
let isBold = fontSize >= 16;
const widthFactor = isBold ? 1.3 : 1;
// ctx._measureText(text, (res) => {})
return {
width: strLen(text) * fontSize * widthFactor
};
}
}
}
_initEvent(e) {
this.event = {};
const eventNames = [{
wxName: 'touchStart',
ecName: 'mousedown'
}, {
wxName: 'touchMove',
ecName: 'mousemove'
}, {
wxName: 'touchEnd',
ecName: 'mouseup'
}, {
wxName: 'touchEnd',
ecName: 'click'
}];
eventNames.forEach(name => {
this.event[name.wxName] = e => {
const touch = e.touches[0];
this.chart.getZr().handler.dispatch(name.ecName, {
zrX: name.wxName === 'tap' ? touch.clientX : touch.x,
zrY: name.wxName === 'tap' ? touch.clientY : touch.y
});
};
});
}
set width(w) {
this.canvasNode.width = w
}
set height(h) {
this.canvasNode.height = h
}
get width() {
return this.canvasNode.width || 0
}
get height() {
return this.canvasNode.height || 0
}
get ctx() {
return cacheChart[this.canvasId]['ctx'] || null
}
set chart(chart) {
cacheChart[this.canvasId]['chart'] = chart
}
get chart() {
return cacheChart[this.canvasId]['chart'] || null
}
}
export function dispatch(name, {x,y, wheelDelta}) {
this.dispatch(name, {
zrX: x,
zrY: y,
zrDelta: wheelDelta,
preventDefault: () => {},
stopPropagation: () =>{}
});
}
export function setCanvasCreator(echarts, {canvas, node}) {
// echarts.setCanvasCreator(() => canvas);
if(echarts && !echarts.registerPreprocessor) {
return console.warn('echarts 版本不对或未传入echartsvue3请使用esm格式')
}
echarts.registerPreprocessor(option => {
if (option && option.series) {
if (option.series.length > 0) {
option.series.forEach(series => {
series.progressive = 0;
});
} else if (typeof option.series === 'object') {
option.series.progressive = 0;
}
}
});
function loadImage(src, onload, onerror) {
let img = null
if(node && node.createImage) {
img = node.createImage()
img.onload = onload.bind(img);
img.onerror = onerror.bind(img);
img.src = src;
return img
} else {
img = new Image()
img.onload = onload.bind(img)
img.onerror = onerror.bind(img);
img.src = src
return img
}
}
if(echarts.setPlatformAPI) {
echarts.setPlatformAPI({
loadImage: canvas.setChart ? loadImage : null,
createCanvas(){
const key = 'createOffscreenCanvas'
return uni.canIUse(key) && uni[key] ? uni[key]({type: '2d'}) : canvas
}
})
}
}

View File

@@ -0,0 +1,252 @@
<template>
<!-- #ifdef APP -->
<web-view class="lime-echart" ref="chartRef" @load="loaded" :style="[customStyle]"
:webview-styles="[webviewStyles]" src="/uni_modules/lime-echart/static/uvue.html?v=10112">
</web-view>
<!-- #endif -->
<!-- #ifdef H5 -->
<div class="lime-echart" ref="chartRef"></div>
<!-- #endif -->
</template>
<script lang="uts" setup>
// @ts-nocheck
import { Echarts } from './uvue';
type EchartsResolve = (value : Echarts) => void
defineOptions({
name: 'l-echart'
})
const emits = defineEmits(['finished'])
const props = defineProps({
// #ifdef APP
webviewStyles: {
type: Object
},
customStyle: {
type: Object
},
// #endif
// #ifndef APP
webviewStyles: {
type: Object
},
customStyle: {
type: [String, Object]
},
// #endif
isDisableScroll: {
type: Boolean,
default: false
},
isClickable: {
type: Boolean,
default: true
},
enableHover: {
type: Boolean,
default: false
},
beforeDelay: {
type: Number,
default: 30
}
})
const finished = ref(false)
const map = [] as EchartsResolve[]
const callbackMap = [] as EchartsResolve[]
// let context = null as UniWebViewElement | null
let chart = null as Echarts | null
let chartRef = ref<UniWebViewElement | null>(null)
const trigger = () => {
// #ifdef APP
if (finished.value) {
if (chart == null) {
chart = new Echarts(chartRef.value!)
}
while (map.length > 0) {
const resolve = map.pop() as EchartsResolve
resolve(chart!)
}
}
// #endif
// #ifdef H5
while (map.length > 0) {
if(chart != null){
const resolve = map.pop() as EchartsResolve
resolve(chart!)
}
}
// #endif
if(chart != null){
while(callbackMap.length > 0){
const callback = callbackMap.pop() as EchartsResolve
callback(chart!)
}
}
}
// #ifdef APP
const loaded = (event : UniWebViewLoadEvent) => {
event.stopPropagation()
event.preventDefault()
finished.value = true
trigger()
emits('finished')
}
// #endif
const _next = () : boolean => {
if (chart == null) {
console.warn(`组件还未初始化,请先使用 init`)
return true
}
return false
}
const setOption = (option : UTSJSONObject) => {
if (_next()) return
chart!.setOption(option);
}
const showLoading = () => {
if (_next()) return
chart!.showLoading();
}
const hideLoading = () => {
if (_next()) return
chart!.hideLoading();
}
const clear = () => {
if (_next()) return
chart!.clear();
}
const dispose = () => {
if (_next()) return
chart!.dispose();
}
const resize = (size : UTSJSONObject) => {
if (_next()) return
chart!.resize(size);
}
const canvasToTempFilePath = (opt : UTSJSONObject) => {
if (_next()) return
chart!.canvasToTempFilePath(opt);
}
// function init() : Promise<Echarts> {
// return new Promise((resolve) => {
// map.push(resolve)
// trigger()
// })
// }
// #ifdef APP
function init(callback : ((chart : Echarts) => void) | null) : Promise<Echarts> {
// if (chart !== null && callback != null) {
// callback(chart!)
// } else {
// console.warn('echarts 未加载完成,您可以延时一下')
// }
if(callback!=null){
callbackMap.push(callback)
}
return new Promise<Echarts>((resolve) => {
map.push(resolve)
trigger()
})
}
// #endif
// #ifdef H5
const touchstart = (e) => {
if(chart == null) return
const handler = chart.getZr().handler;
const rect = chart.getZr().dom.getBoundingClientRect()
handler.dispatch('mousedown', {
zrX: e.touches[0].clientX - rect.left,
zrY: e.touches[0].clientY - rect.top
})
handler.dispatch('click', {
zrX: e.touches[0].clientX - rect.left,
zrY: e.touches[0].clientY - rect.top
})
}
const touchmove = (e) => {
if(chart == null) return
const handler = chart.getZr().handler;
const rect = chart.getZr().dom.getBoundingClientRect()
handler.dispatch('mousemove', {
zrX: e.touches[0].clientX - rect.left,
zrY: e.touches[0].clientY - rect.top
})
}
const mouseup = (e) => {
if(chart == null) return
const handler = chart.getZr().handler;
handler.dispatch('mousemove', {
zrX: 999999999,
zrY: 999999999
})
handler.dispatch('mouseup', {
zrX: 999999999,
zrY: 999999999
})
}
function init(echarts: any, ...args: any[]): Promise<Echarts>{
if(echarts == null){
console.error('请确保已经引入了 ECharts 库');
return Promise.reject('请确保已经引入了 ECharts 库');
}
let theme:string|null=null
let opts={}
let callback:Function|null=null;
args.forEach(item =>{
if(typeof item === 'function') {
callback = item
} else if(['string'].includes(typeof item)){
theme = item
} else if(typeof item === 'object'){
opts = item
}
})
chart = echarts.init(chartRef.value, theme, opts)
window.addEventListener('touchstart', touchstart)
window.addEventListener('touchmove', touchmove)
window.addEventListener('touchend', mouseup)
if(callback!=null && typeof callback == 'function'){
callbackMap.push(callback)
}
return new Promise<Echarts>((resolve) => {
map.push(resolve)
trigger()
})
}
onMounted(()=>{
finished.value = true
trigger()
emits('finished')
})
onUnmounted(()=>{
window.removeEventListener('touchstart', touchstart)
window.removeEventListener('touchmove', touchmove)
window.removeEventListener('touchend', mouseup)
})
// #endif
defineExpose({
init,
setOption,
showLoading,
hideLoading,
clear,
dispose,
resize,
canvasToTempFilePath
})
</script>
<style lang="scss">
.lime-echart {
flex: 1;
}
</style>

View File

@@ -0,0 +1,514 @@
<template>
<view class="lime-echart" :style="customStyle" v-if="canvasId" ref="limeEchart" :aria-label="ariaLabel">
<!-- #ifndef APP-NVUE -->
<canvas
class="lime-echart__canvas"
v-if="use2dCanvas"
type="2d"
:id="canvasId"
:style="canvasStyle"
:disable-scroll="isDisableScroll"
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
/>
<canvas
class="lime-echart__canvas"
v-else
:width="nodeWidth"
:height="nodeHeight"
:style="canvasStyle"
:canvas-id="canvasId"
:id="canvasId"
:disable-scroll="isDisableScroll"
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd"
/>
<view class="lime-echart__mask"
v-if="isPC"
@mousedown="touchStart"
@mousemove="touchMove"
@mouseup="touchEnd"
@touchstart="touchStart"
@touchmove="touchMove"
@touchend="touchEnd">
</view>
<canvas v-if="isOffscreenCanvas" :style="offscreenStyle" :canvas-id="offscreenCanvasId"></canvas>
<!-- #endif -->
<!-- #ifdef APP-NVUE -->
<web-view
class="lime-echart__canvas"
:id="canvasId"
:style="canvasStyle"
:webview-styles="webviewStyles"
ref="webview"
src="/uni_modules/lime-echart/static/uvue.html?v=1"
@pagefinish="finished = true"
@onPostMessage="onMessage"
></web-view>
<!-- #endif -->
</view>
</template>
<script>
// #ifndef APP-NVUE
import {Canvas, setCanvasCreator, dispatch} from './canvas';
import {wrapTouch, convertTouchesToArray, devicePixelRatio ,sleep, canIUseCanvas2d, getRect} from './utils';
// #endif
// #ifdef APP-NVUE
import { base64ToPath, sleep } from './utils';
import {Echarts} from './nvue'
// #endif
const charts = {}
const echartsObj = {}
/**
* LimeChart 图表
* @description 全端兼容的eCharts
* @tutorial https://ext.dcloud.net.cn/plugin?id=4899
* @property {String} customStyle 自定义样式
* @property {String} type 指定 canvas 类型
* @value 2d 使用canvas 2d部分小程序支持
* @value '' 使用原生canvas会有层级问题
* @value bottom right 不缩放图片,只显示图片的右下边区域
* @property {Boolean} isDisableScroll
* @property {number} beforeDelay = [30] 延迟初始化 (毫秒)
* @property {Boolean} enableHover PC端使用鼠标悬浮
* @event {Function} finished 加载完成触发
*/
export default {
name: 'lime-echart',
props: {
// #ifdef MP-WEIXIN || MP-TOUTIAO
type: {
type: String,
default: '2d'
},
// #endif
// #ifdef APP-NVUE
webviewStyles: Object,
// hybrid: Boolean,
// #endif
customStyle: String,
isDisableScroll: Boolean,
isClickable: {
type: Boolean,
default: true
},
enableHover: Boolean,
beforeDelay: {
type: Number,
default: 30
}
},
data() {
return {
// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
use2dCanvas: true,
// #endif
// #ifndef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
use2dCanvas: false,
// #endif
ariaLabel: '图表',
width: null,
height: null,
nodeWidth: null,
nodeHeight: null,
// canvasNode: null,
config: {},
inited: false,
finished: false,
file: '',
platform: '',
isPC: false,
isDown: false,
isOffscreenCanvas: false,
offscreenWidth: 0,
offscreenHeight: 0
};
},
computed: {
canvasId() {
return `lime-echart${this._ && this._.uid || this._uid}`
},
offscreenCanvasId() {
return `${this.canvasId}_offscreen`
},
offscreenStyle() {
return `width:${this.offscreenWidth}px;height: ${this.offscreenHeight}px; position: fixed; left: 99999px; background: red`
},
canvasStyle() {
return this.width && this.height ? ('width:' + this.width + 'px;height:' + this.height + 'px') : ''
}
},
// #ifndef VUE3
beforeDestroy() {
this.clear()
this.dispose()
// #ifdef H5
if(this.isPC) {
document.removeEventListener('mousewheel', this.mousewheel)
}
// #endif
},
// #endif
// #ifdef VUE3
beforeUnmount() {
this.clear()
this.dispose()
// #ifdef H5
if(this.isPC) {
document.removeEventListener('mousewheel', this.mousewheel)
}
// #endif
},
// #endif
created() {
// #ifdef H5
if(!('ontouchstart' in window)) {
this.isPC = true
document.addEventListener('mousewheel', this.mousewheel)
}
// #endif
// #ifdef MP-WEIXIN || MP-TOUTIAO || MP-ALIPAY
const { platform } = uni.getSystemInfoSync();
this.isPC = /windows/i.test(platform)
// #endif
this.use2dCanvas = this.type === '2d' && canIUseCanvas2d()
},
mounted() {
this.$nextTick(() => {
this.$emit('finished')
})
},
methods: {
// #ifdef APP-NVUE
onMessage(e) {
const detail = e?.detail?.data[0] || null;
const data = detail?.data
const key = detail?.event
const options = data?.options
const event = data?.event
const file = detail?.file
if (key == 'log' && data) {
console.log(data)
}
if(event) {
this.chart.dispatchAction(event.replace(/"/g,''), options)
}
if(file) {
thie.file = file
}
},
// #endif
setChart(callback) {
if(!this.chart) {
console.warn(`组件还未初始化,请先使用 init`)
return
}
if(typeof callback === 'function' && this.chart) {
callback(this.chart);
}
// #ifdef APP-NVUE
if(typeof callback === 'function') {
this.$refs.webview.evalJs(`setChart(${JSON.stringify(callback.toString())}, ${JSON.stringify(this.chart.options)})`);
}
// #endif
},
setOption() {
if (!this.chart || !this.chart.setOption) {
console.warn(`组件还未初始化,请先使用 init`)
return
}
this.chart.setOption(...arguments);
},
showLoading() {
if(this.chart) {
this.chart.showLoading(...arguments)
}
},
hideLoading() {
if(this.chart) {
this.chart.hideLoading()
}
},
clear() {
if(this.chart) {
this.chart.clear()
}
},
dispose() {
if(this.chart) {
this.chart.dispose()
}
},
resize(size) {
if(size && size.width && size.height) {
this.height = size.height
this.width = size.width
if(this.chart) {this.chart.resize(size)}
} else {
this.$nextTick(() => {
uni.createSelectorQuery()
.in(this)
.select(`.lime-echart`)
.boundingClientRect()
.exec(res => {
if (res) {
let { width, height } = res[0];
this.width = width = width || 300;
this.height = height = height || 300;
this.chart.resize({width, height})
}
});
})
}
},
canvasToTempFilePath(args = {}) {
// #ifndef APP-NVUE
const { use2dCanvas, canvasId } = this;
return new Promise((resolve, reject) => {
const copyArgs = Object.assign({
canvasId,
success: resolve,
fail: reject
}, args);
if (use2dCanvas) {
delete copyArgs.canvasId;
copyArgs.canvas = this.canvasNode;
}
uni.canvasToTempFilePath(copyArgs, this);
});
// #endif
// #ifdef APP-NVUE
this.file = ''
this.$refs.webview.evalJs(`canvasToTempFilePath()`);
return new Promise((resolve, reject) => {
this.$watch('file', async (file) => {
if(file) {
const tempFilePath = await base64ToPath(file)
resolve(args.success({tempFilePath}))
} else {
reject(args.fail({error: ``}))
}
})
})
// #endif
},
async init(echarts, ...args) {
// #ifndef APP-NVUE
if(args && args.length == 0 && !echarts) {
console.error('缺少参数init(echarts, theme?:string, opts?: object, callback?: function)')
return
}
// #endif
let theme=null,opts={},callback;
Array.from(arguments).forEach(item => {
if(typeof item === 'function') {
callback = item
}
if(['string'].includes(typeof item)) {
theme = item
}
if(typeof item === 'object') {
opts = item
}
})
if(this.beforeDelay) {
await sleep(this.beforeDelay)
}
let config = await this.getContext();
// #ifndef APP-NVUE
setCanvasCreator(echarts, config)
try {
this.chart = echarts.init(config.canvas, theme, Object.assign({}, config, opts))
if(typeof callback === 'function') {
callback(this.chart)
} else {
return this.chart
}
} catch(e) {
console.error(e.messges)
return null
}
// #endif
// #ifdef APP-NVUE
this.chart = new Echarts(this.$refs.webview)
this.$refs.webview.evalJs(`init(null, null, ${JSON.stringify(opts)}, ${theme})`)
if(callback) {
callback(this.chart)
} else {
return this.chart
}
// #endif
},
getContext() {
// #ifdef APP-NVUE
if(this.finished) {
return Promise.resolve(this.finished)
}
return new Promise(resolve => {
this.$watch('finished', (val) => {
if(val) {
resolve(this.finished)
}
})
})
// #endif
// #ifndef APP-NVUE
return getRect(`#${this.canvasId}`, {context: this, type: this.use2dCanvas ? 'fields': 'boundingClientRect'}).then(res => {
if(res) {
let dpr = devicePixelRatio
let {width, height, node} = res
let canvas;
this.width = width = width || 300;
this.height = height = height || 300;
if(node) {
const ctx = node.getContext('2d');
canvas = new Canvas(ctx, this, true, node);
this.canvasNode = node
} else {
// #ifdef MP-TOUTIAO
dpr = !this.isPC ? devicePixelRatio : 1// 1.25
// #endif
// #ifndef MP-ALIPAY || MP-TOUTIAO
dpr = this.isPC ? devicePixelRatio : 1
// #endif
// #ifdef MP-ALIPAY || MP-LARK
dpr = devicePixelRatio
// #endif
// #ifdef WEB
dpr = 1
// #endif
this.rect = res
this.nodeWidth = width * dpr;
this.nodeHeight = height * dpr;
const ctx = uni.createCanvasContext(this.canvasId, this);
canvas = new Canvas(ctx, this, false);
}
return { canvas, width, height, devicePixelRatio: dpr, node };
} else {
return {}
}
})
// #endif
},
// #ifndef APP-NVUE
getRelative(e, touches) {
let { clientX, clientY } = e
if(!(clientX && clientY) && touches && touches[0]) {
clientX = touches[0].clientX
clientY = touches[0].clientY
}
return {x: clientX - this.rect.left, y: clientY - this.rect.top, wheelDelta: e.wheelDelta || 0}
},
getTouch(e, touches) {
const {x} = touches && touches[0] || {}
return x ? touches[0] : this.getRelative(e, touches);
},
touchStart(e) {
this.isDown = true
const next = () => {
const touches = convertTouchesToArray(e.touches)
if(this.chart) {
const touch = this.getTouch(e, touches)
this.startX = touch.x
this.startY = touch.y
this.startT = new Date()
const handler = this.chart.getZr().handler;
dispatch.call(handler, 'mousedown', touch)
dispatch.call(handler, 'mousemove', touch)
handler.processGesture(wrapTouch(e), 'start');
clearTimeout(this.endTimer);
}
}
if(this.isPC) {
getRect(`#${this.canvasId}`, {context: this}).then(res => {
this.rect = res
next()
})
return
}
next()
},
touchMove(e) {
if(this.isPC && this.enableHover && !this.isDown) {this.isDown = true}
const touches = convertTouchesToArray(e.touches)
if (this.chart && this.isDown) {
const handler = this.chart.getZr().handler;
dispatch.call(handler, 'mousemove', this.getTouch(e, touches))
handler.processGesture(wrapTouch(e), 'change');
}
},
touchEnd(e) {
this.isDown = false
if (this.chart) {
const touches = convertTouchesToArray(e.changedTouches)
const {x} = touches && touches[0] || {}
const touch = (x ? touches[0] : this.getRelative(e, touches)) || {};
const handler = this.chart.getZr().handler;
const isClick = Math.abs(touch.x - this.startX) < 10 && new Date() - this.startT < 200;
dispatch.call(handler, 'mouseup', touch)
handler.processGesture(wrapTouch(e), 'end');
if(isClick) {
dispatch.call(handler, 'click', touch)
} else {
this.endTimer = setTimeout(() => {
dispatch.call(handler, 'mousemove', {x: 999999999,y: 999999999});
dispatch.call(handler, 'mouseup', {x: 999999999,y: 999999999});
},50)
}
}
},
// #endif
// #ifdef H5
mousewheel(e){
if(this.chart) {
dispatch.call(this.chart.getZr().handler, 'mousewheel', this.getTouch(e))
}
}
// #endif
}
};
</script>
<style>
.lime-echart {
position: relative;
/* #ifndef APP-NVUE */
width: 100%;
height: 100%;
/* #endif */
/* #ifdef APP-NVUE */
flex: 1;
/* #endif */
}
.lime-echart__canvas {
/* #ifndef APP-NVUE */
width: 100%;
height: 100%;
/* #endif */
/* #ifdef APP-NVUE */
flex: 1;
/* #endif */
}
/* #ifndef APP-NVUE */
.lime-echart__mask {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 1;
}
/* #endif */
</style>

View File

@@ -0,0 +1,51 @@
export class Echarts {
eventMap = new Map()
constructor(webview) {
this.webview = webview
this.options = null
}
setOption() {
this.options = arguments
this.webview.evalJs(`setOption(${JSON.stringify(arguments)})`);
}
getOption() {
return this.options
}
showLoading() {
this.webview.evalJs(`showLoading(${JSON.stringify(arguments)})`);
}
hideLoading() {
this.webview.evalJs(`hideLoading()`);
}
clear() {
this.webview.evalJs(`clear()`);
}
dispose() {
this.webview.evalJs(`dispose()`);
}
resize(size) {
if(size) {
this.webview.evalJs(`resize(${JSON.stringify(size)})`);
} else {
this.webview.evalJs(`resize()`);
}
}
on(type, ...args) {
const query = args[0]
const useQuery = query && typeof query != 'function'
const param = useQuery ? [type, query] : [type]
const key = `${type}${useQuery ? JSON.stringify(query): '' }`
const callback = useQuery ? args[1]: args[0]
if(typeof callback == 'function'){
this.eventMap.set(key, callback)
}
this.webview.evalJs(`on(${JSON.stringify(param)})`);
console.warn('nvue 暂不支持事件')
}
dispatchAction(type, options){
const handler = this.eventMap.get(type)
if(handler){
handler(options)
}
}
}

View File

@@ -0,0 +1,145 @@
// #ifndef APP-NVUE
// 计算版本
export function compareVersion(v1, v2) {
v1 = v1.split('.')
v2 = v2.split('.')
const len = Math.max(v1.length, v2.length)
while (v1.length < len) {
v1.push('0')
}
while (v2.length < len) {
v2.push('0')
}
for (let i = 0; i < len; i++) {
const num1 = parseInt(v1[i], 10)
const num2 = parseInt(v2[i], 10)
if (num1 > num2) {
return 1
} else if (num1 < num2) {
return -1
}
}
return 0
}
const systemInfo = uni.getSystemInfoSync();
function gte(version) {
// 截止 2023-03-22 mac pc小程序不支持 canvas 2d
let {
SDKVersion,
platform
} = systemInfo;
// #ifdef MP-ALIPAY
SDKVersion = my.SDKVersion
// #endif
// #ifdef MP-WEIXIN
return platform !== 'mac' && compareVersion(SDKVersion, version) >= 0;
// #endif
return compareVersion(SDKVersion, version) >= 0;
}
export function canIUseCanvas2d() {
// #ifdef MP-WEIXIN
return gte('2.9.0');
// #endif
// #ifdef MP-ALIPAY
return gte('2.7.0');
// #endif
// #ifdef MP-TOUTIAO
return gte('1.78.0');
// #endif
return false
}
export function convertTouchesToArray(touches) {
// 如果 touches 是一个数组,则直接返回它
if (Array.isArray(touches)) {
return touches;
}
// 如果touches是一个对象则转换为数组
if (typeof touches === 'object' && touches !== null) {
return Object.values(touches);
}
// 对于其他类型,直接返回它
return touches;
}
export function wrapTouch(event) {
for (let i = 0; i < event.touches.length; ++i) {
const touch = event.touches[i];
touch.offsetX = touch.x;
touch.offsetY = touch.y;
}
return event;
}
export const devicePixelRatio = uni.getSystemInfoSync().pixelRatio
// #endif
// #ifdef APP-NVUE
export function base64ToPath(base64) {
return new Promise((resolve, reject) => {
const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64) || [];
const bitmap = new plus.nativeObj.Bitmap('bitmap' + Date.now())
bitmap.loadBase64Data(base64, () => {
if (!format) {
reject(new Error('ERROR_BASE64SRC_PARSE'))
}
const time = new Date().getTime();
const filePath = `_doc/uniapp_temp/${time}.${format}`
bitmap.save(filePath, {},
() => {
bitmap.clear()
resolve(filePath)
},
(error) => {
bitmap.clear()
console.error(`${JSON.stringify(error)}`)
reject(error)
})
}, (error) => {
bitmap.clear()
console.error(`${JSON.stringify(error)}`)
reject(error)
})
})
}
// #endif
export function sleep(time) {
return new Promise((resolve) => {
setTimeout(() => {
resolve(true)
}, time)
})
}
export function getRect(selector, options = {}) {
const typeDefault = 'boundingClientRect'
const {
context,
type = typeDefault
} = options
return new Promise((resolve, reject) => {
const dom = uni.createSelectorQuery().in(context).select(selector);
const result = (rect) => {
if (rect) {
resolve(rect)
} else {
reject()
}
}
if (type == typeDefault) {
dom[type](result).exec()
} else {
dom[type]({
node: true,
size: true,
rect: true
}, result).exec()
}
});
};

View File

@@ -0,0 +1,133 @@
// @ts-nocheck
// #ifdef APP
type EchartsEventHandler = (event: UTSJSONObject)=>void
// type EchartsTempResolve = (obj : UTSJSONObject) => void
// type EchartsTempOptions = UTSJSONObject
export class Echarts {
options: UTSJSONObject = {} as UTSJSONObject
context: UniWebViewElement
eventMap: Map<string, EchartsEventHandler> = new Map()
private temp: UTSJSONObject[] = []
constructor(context: UniWebViewElement){
this.context = context
this.init()
}
init(){
this.context.evalJS(`init(null, null, ${JSON.stringify({})})`)
this.context.addEventListener('message', (e : UniWebViewMessageEvent) => {
// event.stopPropagation()
// event.preventDefault()
const detail = e.detail.data[0]
const file = detail.getString('file')
const data = detail.get('data')
const key = detail.getString('event')
const options = typeof data == 'object' ? (data as UTSJSONObject).getJSON('options'): null
const event = typeof data == 'object' ? (data as UTSJSONObject).getString('event'): null
if (key == 'log' && data != null) {
console.log(data)
}
if (event != null && options != null) {
this.dispatchAction(event.replace(/"/g,''), options)
}
if(file != null){
while (this.temp.length > 0) {
const opt = this.temp.pop()
const success = opt?.get('success')
if(typeof success == 'function'){
success as (res: UTSJSONObject) => void
success({tempFilePath: file})
}
}
}
})
}
setOption(option: UTSJSONObject){
this.options = option;
this.context.evalJS(`setOption(${JSON.stringify([option])})`)
}
setOption(option: UTSJSONObject, notMerge: boolean = false, lazyUpdate: boolean = false){
this.options = option;
this.context.evalJS(`setOption(${JSON.stringify([option, notMerge, lazyUpdate])})`)
}
setOption(option: UTSJSONObject, notMerge: UTSJSONObject){
this.options = option;
this.context.evalJS(`setOption(${JSON.stringify([option, notMerge])})`)
}
getOption(): UTSJSONObject {
return this.options
}
showLoading(){
this.context.evalJS(`showLoading(${JSON.stringify([] as any[])})`);
}
showLoading(type: string, opts: UTSJSONObject){
this.context.evalJS(`showLoading(${JSON.stringify([type, opts])})`);
}
hideLoading(){
this.context.evalJS(`hideLoading()`);
}
clear(){
this.context.evalJS(`clear()`);
}
dispose(){
this.context.evalJS(`dispose()`);
}
resize(size:UTSJSONObject){
setTimeout(()=>{
this.context.evalJS(`resize(${JSON.stringify(size)})`);
},0)
}
resize(){
setTimeout(()=>{
this.context.evalJS(`resize()`);
},10)
}
on(type:string, query: any, callback: EchartsEventHandler) {
const key = `${type}${JSON.stringify(query)}`
if(typeof callback == 'function'){
this.eventMap.set(key, callback)
}
this.context.evalJS(`on(${JSON.stringify([type, query])})`);
console.warn('uvue 暂不支持事件')
}
on(type:string, callback: EchartsEventHandler) {
const key = `${type}`
if(typeof callback == 'function'){
this.eventMap.set(key, callback)
}
this.context.evalJS(`on(${JSON.stringify([type])})`);
console.warn('uvue 暂不支持事件')
}
dispatchAction(type:string, options: UTSJSONObject){
const handler = this.eventMap.get(type)
if(handler!=null){
handler(options)
}
}
canvasToTempFilePath(opt: UTSJSONObject){
// this.context.evalJS(`on(${JSON.stringify(opt)})`);
this.context.evalJS(`canvasToTempFilePath(${JSON.stringify(opt)})`);
this.temp.push(opt)
}
}
// #endif
// #ifndef APP
export class Echarts {
constructor() {}
setOption(option: UTSJSONObject): void
isDisposed(): boolean;
clear(): void;
resize(size:UTSJSONObject): void;
resize(): void;
canvasToTempFilePath(opt : UTSJSONObject): void;
dispose(): void;
showLoading(cfg?: UTSJSONObject): void;
showLoading(name?: string, cfg?: UTSJSONObject): void;
hideLoading(): void;
getZr(): any
}
// #endif

View File

@@ -0,0 +1,159 @@
<template>
<view style="width: 100%; height: 408px;">
<l-echart ref="chartRef" @finished="init"></l-echart>
</view>
</template>
<script>
export default {
data() {
return {
showTip: false,
option: {
tooltip: {
trigger: 'axis',
// shadowBlur: 0,
textStyle: {
textShadowBlur: 0
},
renderMode: 'richText',
},
legend: {
data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '邮件营销',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '联盟广告',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '视频广告',
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: '直接访问',
type: 'line',
stack: '总量',
data: [320, 332, 301, 334, 390, 330, 320]
},
{
name: '搜索引擎',
type: 'line',
stack: '总量',
data: [820, 932, 901, 934, 1290, 1330, 1320]
}
]
}
}
},
mounted() {
console.log('lime echarts nvue')
},
methods: {
init() {
const chartRef = this.$refs['chartRef']
chartRef.init(chart => {
chart.setOption(this.option);
setTimeout(()=>{
const option = {
tooltip: {
trigger: 'axis',
// shadowBlur: 0,
textStyle: {
textShadowBlur: 0
},
renderMode: 'richText',
},
legend: {
data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '邮件营销',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '联盟广告',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '视频广告',
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: '直接访问',
type: 'line',
stack: '总量',
data: [320, 332, 301, 334, 390, 330, 320]
},
{
name: '搜索引擎',
type: 'line',
stack: '总量',
data: [820, 932, 901, 934, 1290, 1330, 1320]
}
]
}
chart.setOption(option);
},1000)
})
},
save() {
// this.$refs.chart.canvasToTempFilePath({
// success(res) {
// console.log('res::::', res)
// }
// })
}
}
}
</script>
<style>
</style>

View File

@@ -0,0 +1,160 @@
<template>
<view style="width: 100%; height: 408px;background-color: aqua;">
<l-echart ref="chartRef" @finished="init"></l-echart>
</view>
</template>
<script lang="uts" setup>
// @ts-nocheck
// #ifdef H5
import * as echarts from 'echarts/dist/echarts.esm.js'
// #endif
const chartRef = ref<LEchartComponentPublicInstance|null>(null)
const option = {
tooltip: {
trigger: 'axis',
// shadowBlur: 0,
textStyle: {
textShadowBlur: 0
},
renderMode: 'richText',
},
// formatter: async (params: any) => {
// console.log('params', params)
// return 1
// },
legend: {
data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '邮件营销',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '联盟广告',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '视频广告',
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: '直接访问',
type: 'line',
stack: '总量',
data: [320, 332, 301, 334, 390, 330, 320]
},
{
name: '搜索引擎',
type: 'line',
stack: '总量',
data: [820, 932, 901, 934, 1290, 1330, 1320]
}
]
}
const init = async () =>{
if(chartRef.value== null) return
// #ifdef APP
const chart = await chartRef.value!.init(null)
// #endif
// #ifdef H5
const chart = await chartRef.value!.init(echarts, null)
// #endif
chart.setOption(option)
chart.on('mouseover', function (params) {
console.log('params', params);
});
// setTimeout(()=> {
// const option1 = {
// tooltip: {
// trigger: 'axis',
// // shadowBlur: 0,
// textStyle: {
// textShadowBlur: 0
// },
// renderMode: 'richText',
// },
// legend: {
// data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
// },
// grid: {
// left: '3%',
// right: '4%',
// bottom: '3%',
// containLabel: true
// },
// xAxis: {
// type: 'category',
// boundaryGap: false,
// data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
// },
// yAxis: {
// type: 'value'
// },
// series: [
// {
// name: '邮件营销',
// type: 'line',
// stack: '总量',
// data: [820, 132, 101, 134, 90, 230, 210]
// },
// {
// name: '联盟广告',
// type: 'line',
// stack: '总量',
// data: [220, 182, 191, 234, 290, 330, 310]
// },
// {
// name: '视频广告',
// type: 'line',
// stack: '总量',
// data: [950, 232, 201, 154, 190, 330, 410]
// },
// {
// name: '直接访问',
// type: 'line',
// stack: '总量',
// data: [320, 332, 301, 334, 390, 330, 320]
// },
// {
// name: '搜索引擎',
// type: 'line',
// stack: '总量',
// data: [820, 932, 901, 934, 1290, 1330, 1320]
// }
// ]
// }
// chart.setOption(option1)
// },1000)
}
</script>
<style>
</style>

View File

@@ -0,0 +1,226 @@
<template>
<view >
<view style="height: 750rpx; position: relative">
<l-echart ref="chart" @finished="init"></l-echart>
<view class="customTooltips" :style="{left: position[0] + 'px',top: position[1] + 'px'}" v-if="params.length && position.length && showTip">
<view>这是个自定的tooltips</view>
<view>{{params[0]['axisValue']}}</view>
<view v-for="item in params">
<view>
<text>{{item.seriesName}}</text>
<text>{{item.value}}</text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
// nvue 不需要引入
// #ifdef VUE2
import * as echarts from '@/uni_modules/lime-echart/static/echarts.min';
// #endif
// #ifdef VUE3
// #ifdef MP
// 由于vue3 使用vite 不支持umd格式的包小程序依然可以使用但需要使用require
const echarts = require('../../static/echarts.min');
// #endif
// #ifndef MP
// 由于 vue3 使用vite 不支持umd格式的包故引入npm的包
import * as echarts from 'echarts/dist/echarts.esm';
// #endif
// #endif
export default {
data() {
return {
showTip: false,
position: [],
params: [],
option: {
tooltip: {
trigger: 'axis',
// shadowBlur: 0,
textStyle: {
textShadowBlur : 0
},
renderMode: 'richText',
position: (point, params, dom, rect, size) => {
// 假设自定义的tooltips尺寸
const box = [170, 170]
// 偏移
const offsetX = point[0] < size.viewSize[0] / 2 ? 20 : -box[0] - 20;
const offsetY = point[1] < size.viewSize[1] / 2 ? 20 : -box[1] - 20;
const x = point[0] + offsetX;
const y = point[1] + offsetY;
this.position = [x, y]
this.params = params
},
formatter: (params, ticket, callback) => {
}
},
legend: {
data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '邮件营销',
type: 'line',
stack: '总量',
data: [120, 132, 101, 134, 90, 230, 210]
},
{
name: '联盟广告',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '视频广告',
type: 'line',
stack: '总量',
data: [150, 232, 201, 154, 190, 330, 410]
},
{
name: '直接访问',
type: 'line',
stack: '总量',
data: [320, 332, 301, 334, 390, 330, 320]
},
{
name: '搜索引擎',
type: 'line',
stack: '总量',
data: [820, 932, 901, 934, 1290, 1330, 1320]
}
]
}
}
},
methods: {
init() {
// init(echarts, theme?:string, opts?:{}, chart => {})
// echarts 必填, 非nvue必填nvue不用填
// theme 可选,应用的主题,目前只支持名称,如:'dark'
// opts = { // 可选
// locale?: string // 从 `5.0.0` 开始支持
// }
// chart => {} callback 返回图表实例
// setTimeout(()=>{
// this.$refs.chart.init(echarts, chart => {
// chart.setOption(this.option);
// });
// },300)
this.$refs.chart.init(echarts, chart => {
chart.setOption(this.option);
// 监听tooltip显示事件
chart.on('showTip', (params) => {
this.showTip = true
console.log('showTip::')
});
chart.on('hideTip', (params) => {
setTimeout(() => {
this.showTip = false
},300)
});
setTimeout(()=>{
const option = {
tooltip: {
trigger: 'axis',
// shadowBlur: 0,
textStyle: {
textShadowBlur: 0
},
renderMode: 'richText',
},
legend: {
data: ['邮件营销', '联盟广告', '视频广告', '直接访问', '搜索引擎']
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
},
yAxis: {
type: 'value'
},
series: [
{
name: '邮件营销',
type: 'line',
stack: '总量',
data: [1120, 132, 101, 134, 90, 230, 210]
},
{
name: '联盟广告',
type: 'line',
stack: '总量',
data: [220, 182, 191, 234, 290, 330, 310]
},
{
name: '视频广告',
type: 'line',
stack: '总量',
data: [150, 632, 201, 154, 190, 330, 410]
},
{
name: '直接访问',
type: 'line',
stack: '总量',
data: [820, 332, 301, 334, 390, 330, 320]
},
{
name: '搜索引擎',
type: 'line',
stack: '总量',
data: [820, 932, 901, 934, 1290, 1330, 1320]
}
]
}
chart.setOption(option);
},1000)
});
},
save() {
this.$refs.chart.canvasToTempFilePath({
success(res) {
console.log('res::::', res)
}
})
}
}
}
</script>
<style>
.customTooltips {
position: absolute;
background-color: rgba(255, 255, 255, 0.8);
padding: 20rpx;
}
</style>

View File

@@ -0,0 +1,90 @@
{
"id": "lime-echart",
"displayName": "echarts",
"version": "0.9.6",
"description": "echarts 全端兼容一款使echarts图表能跑在uniapp各端中的插件, 支持uniapp/uniappx(web,ios,安卓)",
"keywords": [
"echarts",
"canvas",
"图表",
"可视化"
],
"repository": "https://gitee.com/liangei/lime-echart",
"engines": {
"HBuilderX": "^3.6.4"
},
"dcloudext": {
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": "",
"type": "component-vue"
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"App": {
"app-vue": "y",
"app-nvue": "y",
"app-uvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
}
}
}
},
"dependencies": {
"echarts": "^5.4.1",
"zrender": "^5.4.3"
}
}

View File

@@ -0,0 +1,406 @@
# echarts 图表 <span style="font-size:16px;">👑👑👑👑👑 <span style="background:#ff9d00;padding:2px 4px;color:#fff;font-size:10px;border-radius: 3px;">全端</span></span>
> 一个基于 JavaScript 的开源可视化图表库 [查看更多](https://limeui.qcoon.cn/#/echart) <br>
> 基于 echarts 做了兼容处理,更多示例请访问 [uni示例](https://limeui.qcoon.cn/#/echart-example) | [官方示例](https://echarts.apache.org/examples/zh/index.html) <br>
## 平台兼容
| H5 | 微信小程序 | 支付宝小程序 | 百度小程序 | 头条小程序 | QQ 小程序 | App |
| --- | ---------- | ------------ | ---------- | ---------- | --------- | ---- |
| √ | √ | √ | √ | √ | √ | √ |
## 安装
- 第一步:在市场导入 [百度图表](https://ext.dcloud.net.cn/plugin?id=4899)
- 第二步:选择插件依赖:<br>
1、可以选插件内的`echarts`包或自定义包,自定义包[下载地址](https://echarts.apache.org/zh/builder.html)<br>
2、或者使用`npm`安装`echarts`
**注意**
* 🔔 echarts 5.3.0及以上
* 🔔 如果是 `cli` 项目请下载插件到`src`目录下的`uni_modules`,没有这个目录就创建一个
## 代码演示
### Vue2
- 引入依赖,可以是插件内提供或自己下载的[自定义包](https://echarts.apache.org/zh/builder.html),也可以是`npm`
```html
<view style="width:750rpx; height:750rpx"><l-echart ref="chartRef" @finished="init"></l-echart></view>
```
```js
// 插件内的 三选一
import * as echarts from '@/uni_modules/lime-echart/static/echarts.min'
// 自定义的 三选一 下载后放入项目的路径
import * as echarts from 'xxx/echarts.min'
// npm包 三选一 需要在控制台 输入命令npm install echarts
import * as echarts from 'echarts'
```
```js
export default {
data() {
return {
option: {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
confine: true
},
legend: {
data: ['热度', '正面', '负面']
},
grid: {
left: 20,
right: 20,
bottom: 15,
top: 40,
containLabel: true
},
xAxis: [
{
type: 'value',
axisLine: {
lineStyle: {
color: '#999999'
}
},
axisLabel: {
color: '#666666'
}
}
],
yAxis: [
{
type: 'category',
axisTick: { show: false },
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
axisLine: {
lineStyle: {
color: '#999999'
}
},
axisLabel: {
color: '#666666'
}
}
],
series: [
{
name: '热度',
type: 'bar',
label: {
normal: {
show: true,
position: 'inside'
}
},
data: [300, 270, 340, 344, 300, 320, 310],
},
{
name: '正面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true
}
},
data: [120, 102, 141, 174, 190, 250, 220]
},
{
name: '负面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
position: 'left'
}
},
data: [-20, -32, -21, -34, -90, -130, -110]
}
]
},
};
},
// 组件能被调用必须是组件的节点已经被渲染到页面上
methods: {
async init() {
// chart 图表实例不能存在data里
const chart = await this.$refs.chartRef.init(echarts);
chart.setOption(this.option)
}
}
}
```
### Vue3
- 小程序可以使用`require`引入插件内提供或自己下载的[自定义包](https://echarts.apache.org/zh/builder.html)
- `require`仅支持相对路径,不支持路径别名
- 非小程序使用 `npm`
```html
<view style="width:750rpx; height:750rpx"><l-echart ref="chartRef"></l-echart></view>
```
```js
// 小程序 二选一
// 插件内的 二选一
const echarts = require('../../uni_modules/lime-echart/static/echarts.min');
// 自定义的 二选一 下载后放入项目的路径
const echarts = require('xxx/xxx/echarts');
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// 非小程序
// 需要在控制台 输入命令npm install echarts
import * as echarts from 'echarts'
```
```js
const chartRef = ref(null)
const option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
confine: true
},
legend: {
data: ['热度', '正面', '负面']
},
grid: {
left: 20,
right: 20,
bottom: 15,
top: 40,
containLabel: true
},
xAxis: [
{
type: 'value',
axisLine: {
lineStyle: {
color: '#999999'
}
},
axisLabel: {
color: '#666666'
}
}
],
yAxis: [
{
type: 'category',
axisTick: { show: false },
data: ['汽车之家', '今日头条', '百度贴吧', '一点资讯', '微信', '微博', '知乎'],
axisLine: {
lineStyle: {
color: '#999999'
}
},
axisLabel: {
color: '#666666'
}
}
],
series: [
{
name: '热度',
type: 'bar',
label: {
normal: {
show: true,
position: 'inside'
}
},
data: [300, 270, 340, 344, 300, 320, 310],
},
{
name: '正面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true
}
},
data: [120, 102, 141, 174, 190, 250, 220]
},
{
name: '负面',
type: 'bar',
stack: '总量',
label: {
normal: {
show: true,
position: 'left'
}
},
data: [-20, -32, -21, -34, -90, -130, -110]
}
]
};
onMounted( ()=>{
// 组件能被调用必须是组件的节点已经被渲染到页面上
setTimeout(async()=>{
if(!chartRef.value) return
const myChart = await chartRef.value.init(echarts)
myChart.setOption(option)
},300)
})
```
### Uvue
- Uvue和Nvue不需要引入`echarts`,因为它们的实现方式是`webview`
- uniapp x需要HBX 4.13以上
```html
<view style="width: 100%; height: 408px;">
<l-echart ref="chartRef" @finished="init"></l-echart>
</view>
```
```js
// @ts-nocheck
// #ifdef H5
import * as echarts from 'echarts/dist/echarts.esm.js'
// #endif
const chartRef = ref<LEchartComponentPublicInstance|null>(null);
const init = async () => {
if(chartRef.value== null) return
// #ifdef APP
const chart = await chartRef.value!.init(null)
// #endif
// #ifdef H5
const chart = await chartRef.value!.init(echarts, null)
// #endif
chart.setOption(option)
}
```
## 数据更新
- 1、使用 `ref` 可获取`setOption`设置更新
- 2、也可以拿到图表实例`chart`设置`myChart.setOption(data)`
```js
// ref
this.$refs.chart.setOption(data)
// 图表实例
myChart.setOption(data)
```
## 图表大小
- 在有些场景下,我们希望当容器大小改变时,图表的大小也相应地改变。
```js
// 默认获取容器尺寸
this.$refs.chart.resize()
// 指定尺寸
this.$refs.chart.resize({width: 375, height: 375})
```
## 自定义Tooltips
- uvue\nvue 不支持
由于除H5之外都不存在dom但又有tooltips个性化的需求代码就不贴了看示例吧
```
代码位于/uni_modules/lime-echart/component/lime-echart
```
## 插件标签
- 默认 l-echart 为 component
- 默认 lime-echart 为 demo
```html
// 在任意地方使用可查看domo, 代码位于/uni_modules/lime-echart/component/lime-echart
<lime-echart></lime-echart>
```
## 常见问题
- 钉钉小程序 由于没有`measureText`,模拟的`measureText`又无法得到当前字体的`fontWeight`,故可能存在估计不精细的问题
- 微信小程序 `2d` 只支持 真机调试2.0
- 微信开发工具会出现 `canvas` 不跟随页面的情况,真机不影响
- 微信开发工具会出现 `canvas` 层级过高的问题,真机一般不受影响,可以先测只有两个元素的页面看是否会有层级问题。
- toolbox 不支持 `saveImage`
- echarts 5.3.0 的 lines 不支持 trailLength故需设置为 `0`
- dataZoom H5不要设置 `showDetail`
- 如果微信小程序的`tooltip`文字有阴影,可能是微信的锅,临时解决方法是`tooltip.shadowBlur = 0`
- 如果钉钉小程序上传时报安全问题`Uint8Clamped`,可以向钉钉反馈是安全代码扫描把Uint8Clamped数组错误识别了也可以在 echarts 文件修改`Uint8Clamped`
```js
// 找到这段代码把代码中`Uint8Clamped`改成`Uint8_Clamped`,再把下划线去掉,不过直接去掉`Uint8Clamped`也是可行的
// ["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e+"Array]"]
// 改成如下
["Int8","Uint8","Uint8_Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(t,e){return t["[object "+e.replace('_','')+"Array]"]
```
### vue3
如果您是使用 **vite + vue3** 非微信小程序可能会遇到`echarts`文件缺少`wx`判断导致无法使用或缺少`tooltip`<br>
方式一:可以在`echarts.min.js`文件开头增加以下内容参考插件内的echart.min.js的做法
```js
let global = null
let wx = uni
```
方式二:在`vite.config.js``define`设置环境
```js
// 或者在`vite.config.js`的`define`设置环境
import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
const define = {}
if(!["mp-weixin", "h5", "web"].includes(process.env.UNI_PLATFORM)) {
define['global'] = null
define['wx'] = 'uni'
}
export default defineConfig({
plugins: [uni()],
define
});
```
## Props
| 参数 | 说明 | 类型 | 默认值 | 版本 |
| --------------- | -------- | ------- | ------------ | ----- |
| custom-style | 自定义样式 | `string` | - | - |
| type | 指定 canvas 类型 | `string` | `2d` | |
| is-disable-scroll | 触摸图表时是否禁止页面滚动 | `boolean` | `false` | |
| beforeDelay | 延迟初始化 (毫秒) | `number` | `30` | |
| enableHover | PC端使用鼠标悬浮 | `boolean` | `false` | |
## 事件
| 参数 | 说明 |
| --------------- | --------------- |
| init(echarts, chart => {}) | 初始化调用函数,第一个参数是传入`echarts`,第二个参数是回调函数,回调函数的参数是 `chart` 实例 |
| setChart(chart => {}) | 已经初始化后,请使用这个方法,是个回调函数,参数是 `chart` 实例 |
| setOption(data) | [图表配置项](https://echarts.apache.org/zh/option.html#title),用于更新 ,传递是数据 `option` |
| clear() | 清空当前实例,会移除实例中所有的组件和图表。 |
| dispose() | 销毁实例 |
| showLoading() | 显示加载 |
| hideLoading() | 隐藏加载 |
| [canvasToTempFilePath](https://uniapp.dcloud.io/api/canvas/canvasToTempFilePath.html#canvastotempfilepath)(opt) | 用于生成图片,与官方使用方法一致,但不需要传`canvasId` |
## 打赏
如果你觉得本插件,解决了你的问题,赠人玫瑰,手留余香。
![](https://testingcf.jsdelivr.net/gh/liangei/image@1.9/alipay.png)
![](https://testingcf.jsdelivr.net/gh/liangei/image@1.9/wpay.png)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,413 @@
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports', 'echarts'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('echarts'));
} else {
// Browser globals
factory({}, root.echarts);
}
}(this, function (exports, echarts) {
var log = function (msg) {
if (typeof console !== 'undefined') {
console && console.error && console.error(msg);
}
};
if (!echarts) {
log('ECharts is not Loaded');
return;
}
echarts.registerTheme('macarons', {
"color": [
"#3fb1e3",
"#6be6c1",
"#626c91",
"#a0a7e6",
"#c4ebad",
"#96dee8"
],
"backgroundColor": "rgba(252,252,252,0)",
"textStyle": {},
"title": {
"textStyle": {
"color": "#666666"
},
"subtextStyle": {
"color": "#999999"
}
},
"line": {
"itemStyle": {
"borderWidth": "2"
},
"lineStyle": {
"width": "3"
},
"symbolSize": "8",
"symbol": "emptyCircle",
"smooth": false
},
"radar": {
"itemStyle": {
"borderWidth": "2"
},
"lineStyle": {
"width": "3"
},
"symbolSize": "8",
"symbol": "emptyCircle",
"smooth": false
},
"bar": {
"itemStyle": {
"barBorderWidth": 0,
"barBorderColor": "#ccc"
}
},
"pie": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"scatter": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"boxplot": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"parallel": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"sankey": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"funnel": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"gauge": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"candlestick": {
"itemStyle": {
"color": "#e6a0d2",
"color0": "transparent",
"borderColor": "#e6a0d2",
"borderColor0": "#3fb1e3",
"borderWidth": "2"
}
},
"graph": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"lineStyle": {
"width": "1",
"color": "#cccccc"
},
"symbolSize": "8",
"symbol": "emptyCircle",
"smooth": false,
"color": [
"#3fb1e3",
"#6be6c1",
"#626c91",
"#a0a7e6",
"#c4ebad",
"#96dee8"
],
"label": {
"color": "#ffffff"
}
},
"map": {
"itemStyle": {
"areaColor": "#eeeeee",
"borderColor": "#aaaaaa",
"borderWidth": 0.5
},
"label": {
"color": "#ffffff"
},
"emphasis": {
"itemStyle": {
"areaColor": "rgba(63,177,227,0.25)",
"borderColor": "#3fb1e3",
"borderWidth": 1
},
"label": {
"color": "#3fb1e3"
}
}
},
"geo": {
"itemStyle": {
"areaColor": "#eeeeee",
"borderColor": "#aaaaaa",
"borderWidth": 0.5
},
"label": {
"color": "#ffffff"
},
"emphasis": {
"itemStyle": {
"areaColor": "rgba(63,177,227,0.25)",
"borderColor": "#3fb1e3",
"borderWidth": 1
},
"label": {
"color": "#3fb1e3"
}
}
},
"categoryAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"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)"
]
}
}
},
"valueAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"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)"
]
}
}
},
"logAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"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,
"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": {
"borderColor": "#999999"
},
"emphasis": {
"iconStyle": {
"borderColor": "#666666"
}
}
},
"legend": {
"textStyle": {
"color": "#999999"
}
},
"tooltip": {
"axisPointer": {
"lineStyle": {
"color": "#cccccc",
"width": 1
},
"crossStyle": {
"color": "#cccccc",
"width": 1
}
}
},
"timeline": {
"lineStyle": {
"color": "#626c91",
"width": 1
},
"itemStyle": {
"color": "#626c91",
"borderWidth": 1
},
"controlStyle": {
"color": "#626c91",
"borderColor": "#626c91",
"borderWidth": 0.5
},
"checkpointStyle": {
"color": "#3fb1e3",
"borderColor": "#3fb1e3"
},
"label": {
"color": "#626c91"
},
"emphasis": {
"itemStyle": {
"color": "#626c91"
},
"controlStyle": {
"color": "#626c91",
"borderColor": "#626c91",
"borderWidth": 0.5
},
"label": {
"color": "#626c91"
}
}
},
"visualMap": {
"color": [
"#2a99c9",
"#afe8ff"
]
},
"dataZoom": {
"backgroundColor": "rgba(255,255,255,0)",
"dataBackgroundColor": "rgba(222,222,222,1)",
"fillerColor": "rgba(114,230,212,0.25)",
"handleColor": "#cccccc",
"handleSize": "100%",
"textStyle": {
"color": "#999999"
}
},
"markPoint": {
"label": {
"color": "#ffffff"
},
"emphasis": {
"label": {
"color": "#ffffff"
}
}
}
});
}));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,173 @@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title></title>
<style type="text/css">
html,
body,
.canvas {
padding: 0;
margin: 0;
overflow-y: hidden;
background-color: transparent;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="canvas" id="limeChart"></div>
<script type="text/javascript" src="./uni.webview.1.5.5.js"></script>
<script type="text/javascript" src="./echarts.min.js"></script>
<script type="text/javascript" src="./ecStat.min.js"></script>
<!-- <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts-liquidfill@latest/dist/echarts-liquidfill.min.js"></script> -->
<script>
let chart = null;
let cache = [];
console.log = function() {
emit('log', {
log: arguments,
})
}
function emit(event, data) {
postMessage({
event,
data
})
cache = []
}
function postMessage(data) {
uni.webView.postMessage({
data
})
// window.__uniapp_x_.postMessage(JSON.stringify(data))
};
function stringify(key, value) {
if (typeof value === 'object' && value !== null) {
if (cache.indexOf(value) !== -1) {
return;
}
cache.push(value);
}
return value;
}
function parse(name, callback, options) {
const optionNameReg = /[\w]+\.setOption\(([\w]+\.)?([\w]+)\)/
if (optionNameReg.test(callback)) {
const optionNames = callback.match(optionNameReg)
if (optionNames[1]) {
const _this = optionNames[1].split('.')[0]
window[_this] = {}
window[_this][optionNames[2]] = options
return optionNames[2]
} else {
return null
}
}
return null
}
function init(callback, options, opts, theme) {
if (!chart) {
chart = echarts.init(document.getElementById('limeChart'), theme, opts)
if (options) {
chart.setOption(options)
}
}
}
function on(data) {
if (chart && data.length > 0) {
const [type, query] = data
const key = `${type}${JSON.stringify(query||'')}`
if (query) {
chart.on(type, query, function(options) {
var obj = {};
Object.keys(options).forEach(function(key) {
if (key != 'event') {
obj[key] = options[key];
}
});
emit(key, {
event: key,
options: obj,
});
});
} else {
chart.on(type, function(options) {
var obj = {};
Object.keys(options).forEach(function(key) {
if (key != 'event') {
obj[key] = options[key];
}
});
emit(key, {
event: key,
options: obj,
});
});
}
}
}
function setChart(callback, options) {
if (!callback) return
if (chart && callback && options) {
var r = null
const name = parse('r', callback, options)
if (name) this[name] = options
eval(`r = ${callback};`)
if (r) {
r(chart)
}
}
}
function setOption(data) {
if (chart) chart.setOption(data[0], data[1])
}
function showLoading(data) {
if (chart) chart.showLoading(data[0], data[1])
}
function hideLoading() {
if (chart) chart.hideLoading()
}
function clear() {
if (chart) chart.clear()
}
function dispose() {
if (chart) chart.dispose()
}
function resize(size) {
if (chart) chart.resize(size)
}
function canvasToTempFilePath(opt) {
if (chart) {
delete opt.success
const src = chart.getDataURL(opt)
postMessage({
// event: 'file',
file: src
})
}
}
</script>
</body>
</html>

View File

@@ -0,0 +1,391 @@
{
"color": [
"#3fb1e3",
"#6be6c1",
"#626c91",
"#a0a7e6",
"#c4ebad",
"#96dee8"
],
"backgroundColor": "rgba(252,252,252,0)",
"textStyle": {},
"title": {
"textStyle": {
"color": "#666666"
},
"subtextStyle": {
"color": "#999999"
}
},
"line": {
"itemStyle": {
"borderWidth": "2"
},
"lineStyle": {
"width": "3"
},
"symbolSize": "8",
"symbol": "emptyCircle",
"smooth": false
},
"radar": {
"itemStyle": {
"borderWidth": "2"
},
"lineStyle": {
"width": "3"
},
"symbolSize": "8",
"symbol": "emptyCircle",
"smooth": false
},
"bar": {
"itemStyle": {
"barBorderWidth": 0,
"barBorderColor": "#ccc"
}
},
"pie": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"scatter": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"boxplot": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"parallel": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"sankey": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"funnel": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"gauge": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
}
},
"candlestick": {
"itemStyle": {
"color": "#e6a0d2",
"color0": "transparent",
"borderColor": "#e6a0d2",
"borderColor0": "#3fb1e3",
"borderWidth": "2"
}
},
"graph": {
"itemStyle": {
"borderWidth": 0,
"borderColor": "#ccc"
},
"lineStyle": {
"width": "1",
"color": "#cccccc"
},
"symbolSize": "8",
"symbol": "emptyCircle",
"smooth": false,
"color": [
"#3fb1e3",
"#6be6c1",
"#626c91",
"#a0a7e6",
"#c4ebad",
"#96dee8"
],
"label": {
"color": "#ffffff"
}
},
"map": {
"itemStyle": {
"areaColor": "#eeeeee",
"borderColor": "#aaaaaa",
"borderWidth": 0.5
},
"label": {
"color": "#ffffff"
},
"emphasis": {
"itemStyle": {
"areaColor": "rgba(63,177,227,0.25)",
"borderColor": "#3fb1e3",
"borderWidth": 1
},
"label": {
"color": "#3fb1e3"
}
}
},
"geo": {
"itemStyle": {
"areaColor": "#eeeeee",
"borderColor": "#aaaaaa",
"borderWidth": 0.5
},
"label": {
"color": "#ffffff"
},
"emphasis": {
"itemStyle": {
"areaColor": "rgba(63,177,227,0.25)",
"borderColor": "#3fb1e3",
"borderWidth": 1
},
"label": {
"color": "#3fb1e3"
}
}
},
"categoryAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"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)"
]
}
}
},
"valueAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"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)"
]
}
}
},
"logAxis": {
"axisLine": {
"show": true,
"lineStyle": {
"color": "#cccccc"
}
},
"axisTick": {
"show": false,
"lineStyle": {
"color": "#333"
}
},
"axisLabel": {
"show": true,
"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,
"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": {
"borderColor": "#999999"
},
"emphasis": {
"iconStyle": {
"borderColor": "#666666"
}
}
},
"legend": {
"textStyle": {
"color": "#999999"
}
},
"tooltip": {
"axisPointer": {
"lineStyle": {
"color": "#cccccc",
"width": 1
},
"crossStyle": {
"color": "#cccccc",
"width": 1
}
}
},
"timeline": {
"lineStyle": {
"color": "#626c91",
"width": 1
},
"itemStyle": {
"color": "#626c91",
"borderWidth": 1
},
"controlStyle": {
"color": "#626c91",
"borderColor": "#626c91",
"borderWidth": 0.5
},
"checkpointStyle": {
"color": "#3fb1e3",
"borderColor": "#3fb1e3"
},
"label": {
"color": "#626c91"
},
"emphasis": {
"itemStyle": {
"color": "#626c91"
},
"controlStyle": {
"color": "#626c91",
"borderColor": "#626c91",
"borderWidth": 0.5
},
"label": {
"color": "#626c91"
}
}
},
"visualMap": {
"color": [
"#2a99c9",
"#afe8ff"
]
},
"dataZoom": {
"backgroundColor": "rgba(255,255,255,0)",
"dataBackgroundColor": "rgba(222,222,222,1)",
"fillerColor": "rgba(114,230,212,0.25)",
"handleColor": "#cccccc",
"handleSize": "100%",
"textStyle": {
"color": "#999999"
}
},
"markPoint": {
"label": {
"color": "#ffffff"
},
"emphasis": {
"label": {
"color": "#ffffff"
}
}
}
}

38
utilCa/config.js Normal file
View File

@@ -0,0 +1,38 @@
let baseUrl = ""
let baseUrl1 = ""
let baseUrl2 = ""
let baseUrl3 = ""
let baseUrl4 = ""
let baseUrl5 = ""
let baseUrl6 = ""
let baseUrl7 = ""
let baseUrl8 = ""
let filestore_site = "";
// #ifdef MP-WEIXIN
if (wx.getAccountInfoSync().miniProgram.envVersion === 'develop') {
baseUrl = 'http://dev.51xuanxiao.com:8005/api' // 开发环境
baseUrl3 = 'http://dev.51xuanxiao.com:8007/api' // 职业环境
baseUrl4 = 'http://dev.51xuanxiao.com:8009/api' // 用户环境
baseUrl5 = 'http://dev.51xuanxiao.com:8006/api' // 测评环境
filestore_site = 'http://192.168.1.168:31128' //文件地址
} else {
baseUrl = 'https://yanxueapi.51xuanxiao.com/api' // 生产环境
baseUrl3 = "https://jobapi.51xuanxiao.com/api"// 职业环境
baseUrl4 = "https://authapi.51xuanxiao.com/api"// 用户环境
baseUrl5 = "https://testapi.51xuanxiao.com/api"// 测评环境
filestore_site = 'https://filestore.plan.51xuanxiao.com' //文件地址
}
// #endif
export {
baseUrl,
baseUrl1,
baseUrl2,
baseUrl3,
baseUrl4,
baseUrl5,
baseUrl6,
baseUrl7,
baseUrl8,
filestore_site
}

19
utilCa/imageUrl.js Normal file
View File

@@ -0,0 +1,19 @@
// 公共图片基地址
const BASE_IMAGE_URL = 'https://51xuanxiao.oss-cn-hangzhou.aliyuncs.com/Resource/xcx_sygh';
/**
* 图片地址拼接方法
* @param {string} path - 图片路径(相对于基地址的路径)
* @param {string} [process] - OSS图片处理参数例如'image/resize,m_fixed,w_348/quality,q_80'
* @returns {string} 完整的图片URL
*/
export function ossImageUrl(path, process) {
// 如果有处理参数,拼接处理参数
if (process) {
return `${BASE_IMAGE_URL}/${path}?x-oss-process=${process}`;
}
// 没有处理参数时,直接返回原始路径
return `${BASE_IMAGE_URL}/${path}`;
}

114
utilCa/request.js Normal file
View File

@@ -0,0 +1,114 @@
import {
baseUrl,
baseUrl1,
baseUrl2,
baseUrl3,
baseUrl4,
baseUrl5,
baseUrl6,
baseUrl7,
baseUrl8
} from './config.js'
const request = {}
const headers = {}
request.globalRequest = (url, method, data, power, type) => {
// 权限判断 因为有的接口请求头可能需要添加的参数不一样,所以这里做了区分
// 1 == 不通过access_token校验的接口
// 2 == 文件下载接口列表
const userInfo = uni.getStorageSync('CAuserInfo')
// console.log('缓存userinfo:',userInfo);
switch (power) {
case 1:
case 3:
headers['Token'] = userInfo.token
// if(power == 3){
// const deviceInfo = wx.getDeviceInfo()
// let data = {
// model: deviceInfo.model,
// system: deviceInfo.system,
// platform: deviceInfo.platform
// }
// headers['DeviceInfo'] = JSON.stringify(data)
// }
break;
case 2:
headers['Authorization'] = userInfo.userToken
break;
default:
break;
}
let host = "";
let key = "";
if (type == 1) {
host = baseUrl1;
} else if (type == 2) {
host = baseUrl2;
} else if (type == 3) {
host = baseUrl3;
} else if (type == 4) {
host = baseUrl4;
} else if (type == 5) {
host = baseUrl5;
} else if (type == 7) {
host = baseUrl7;
key = `?PartnerKey=51xuanxiao&PartnerSecret=mC6XRjDWUzGAdxcCqRBWGb88uR`;
} else if (type == 8) {
host = baseUrl8;
//key = `?AppKey=51xuanxiao&AppSecret=mC6XRjDWUzGAdxcCqRBWGb88uR`;
} else {
host = baseUrl;
}
return uni.request({
timeout: 60000,
url: host + url + key,
method,
data: data,
dataType: 'json',
header: headers
}).then(res => {
//console.log("ressss===="+JSON.stringify(res.data));
// console.log("type===="+type);
if (type == 7) {
if (res[1].data.code == 0) {
return res[1].data
} else {
throw res[1].data
}
} else if (type == 8) {
if (res[1].data.Code == 0) {
return res[1].data
} else {
throw res[1].data
}
} else {
if (res.data.Result) {
return res.data
} else {
throw res.data
}
}
}).catch(parmas => {
switch (parmas.status) {
case 401:
uni.showToast({
title: parmas.msg,
icon: 'none',
duration: 3500
})
uni.removeStorageSync("CAuserInfo");
setTimeout(() => {
uni.reLaunch({
url: "/pages/index/index"
})
}, 2800)
break
default:
console.error(parmas);
return Promise.reject()
break
}
})
}
export default request