提交 a2c97af8 authored 作者: zyx's avatar zyx

update

...@@ -18,12 +18,16 @@ export default class OtherAction extends BaseACTION { ...@@ -18,12 +18,16 @@ export default class OtherAction extends BaseACTION {
}) })
} }
/**
* 当前登录用户,检测是否该系统有权限
*/
getInfo () { return Other.getInfo().then(res => res) }
/** /**
* 文件上传 * 文件上传
*/ */
uploadFile (obj) { return Other.uploadFile(obj).then(res => res) } uploadFile (obj) { return Other.uploadFile(obj).then(res => res) }
/** /**
* 当前登录用户,检测是否该系统有权限 * 调用个人信心 - 修改密码
*/ */
getInfo () { return Other.getInfo().then(res => res) } updatePwd (obj) { return Other.updatePwd(obj).then(res => res) }
} }
...@@ -38,6 +38,7 @@ const cAction = { ...@@ -38,6 +38,7 @@ const cAction = {
* @param {[function]} obj.finallyCallback 最终finally回调,必传 * @param {[function]} obj.finallyCallback 最终finally回调,必传
*/ */
export const request = (obj) => { export const request = (obj) => {
console.log(obj, '===========')
cAction[obj.actionName][obj.functionName](obj.data).then(res => { cAction[obj.actionName][obj.functionName](obj.data).then(res => {
obj.thenCallback(res) obj.thenCallback(res)
}).catch(e => { }).catch(e => {
......
import BaseAPI from './base_api' import BaseAPI from './base_api'
import _ from 'lodash'
export default class OtherAPI extends BaseAPI { export default class OtherAPI extends BaseAPI {
/**
* 当前登录用户,检测是否该系统有权限
*/
getInfo = () => this.post('/user_center/get_user_info', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
/** /**
* 获取我的消息信息 * 获取我的消息信息
*/ */
...@@ -11,7 +16,10 @@ export default class OtherAPI extends BaseAPI { ...@@ -11,7 +16,10 @@ export default class OtherAPI extends BaseAPI {
*/ */
uploadFile = (obj = {}) => this.post('/util/upload-file', obj, { headers: { 'Content-Type': 'multipart/form-data' } }) uploadFile = (obj = {}) => this.post('/util/upload-file', obj, { headers: { 'Content-Type': 'multipart/form-data' } })
/** /**
* 当前登录用户,检测是否该系统有权限 * 个人信息 - 修改密码
* @param {[string]} obj.old_password 验证码
* @param {[string]} obj.new_password 新的密码
* @param {[string]} obj.service 这里 一直是定值 h5.ezijing.com
*/ */
getInfo = () => this.post('/user_center/get_user_info', {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }) updatePwd = (obj = {}) => this.post('/user_center/change_password', _.assignIn(obj, { service: 'h5.ezijing.com' }), { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
} }
...@@ -75,6 +75,155 @@ ...@@ -75,6 +75,155 @@
"changeCourse": "选课广场", "changeCourse": "选课广场",
"showCourse": "查看课程", "showCourse": "查看课程",
"progress": "视频观看进度" "progress": "视频观看进度"
},
"discussion": {
"title": "Course discussion",
"tap1": "My Question",
"tap2": "My Participation",
"answers": "Answers",
"votes": "Votes"
},
"discussDetail": {
"title": "Problem details",
"like": "Like",
"discuss": "Discuss",
"reply": "Reply",
"delete": "Delete",
"send": "Send",
"noAnswer": "No answer",
"deleteSuccess": "Delete success",
"answering": "Answer"
},
"reportActiveList": {
"title": "Academic Report",
"newEvent": "Apply for a new activity",
"serialNumber": "NO",
"activityName": "Activity name",
"activitytime": "Activity time",
"lecturer": "Lecturer",
"approvalStatus": "Approval",
"approvalTime": "Approval Time",
"operate": "Operate",
"viewReport": "View report",
"uploadReport": "Upload report",
"edit": "Edit",
"delete": "Delete",
"unreviewed": "Unreviewed",
"passed": "Pass",
"failed": "Fail",
"deleteSuccessTips": "Successfully deleted"
},
"reportListAll": {
"title": "List of activities where the academic report is located",
"index": "No",
"reportName": "Report Name",
"reportDescription": "Report Summary",
"submitTime": "Submit Time",
"approveStatus": "Approval Status",
"file": "Download Attachment",
"operate": "Operating",
"backButtonText": "Back to activities list",
"edit": "Edit",
"delete": "Delete",
"unreviewed": "Unreviewed",
"passed": "Pass",
"failed": "Fail",
"deleteSuccessTips": "Successfully deleted"
},
"reportAdd": {
"title": "Apply for academic activity",
"backActivity": "Back to activity list",
"activityName": "Academic activity Name",
"ActivityTime": "Academic activity time",
"lecturer": "Lecturer",
"address": "Academic activity address",
"activityContent": "Academic activity content",
"saveSubmit": "Save and submit",
"formCheckTips": "Please check the entry and confirm it, then resubmit",
"enterActivity": "Enter activity name",
"selectTime": "Select date and time",
"enterLecturer": "Enter lecturer",
"enteraddress": "Enter the event address",
"entActCon": "Enter activity content",
"activityNameTips": "Activity name cannot be empty",
"ActivityTimeTips": "Activity time cannot be empty",
"lecturerTips": "Lecturer cannot be empty",
"addressTips": "Academic activity address cannot be empty",
"activityContentTips": "Activity content cannot be empty",
"submitSuccess": "Submitted successfully"
},
"reportSubmit": {
"title": "Academic Report Submission",
"backText": "Back to activities list",
"submitSuccessTips": "Submitted Successfully",
"formCheckTips": "Please check the entry and confirm it, then resubmit",
"theme": "Theme",
"abstract": "Abstract",
"file": "Attachment",
"uploadButtonText": "Click to upload",
"uploadTips": "(You can upload resources such as word and ppt. The system provides templates to download)",
"downloadTemplateText": "Template download",
"downloadButtonText": "Download uploaded attachments",
"submitButtonText": "Save and submit",
"themeHint": "Please enter report subject",
"abstractHint": "Please enter a summary of the report",
"themeTips": "Report subject cannot be empty",
"submitSuccess": "Submitted successfully"
}
},
"feedback": {
"feedbackList": {
"technology": "Technology",
"administration": "Administration",
"all": "All",
"title": "Feedback",
"btnQuestion": "Question",
"tapType": "Type",
"pending": "Pending",
"processing": "Processing",
"processed": "Processed",
"probDesc": "Problem Description:",
"downloadAtta": "Download attachments:",
"publishTime": "Publish time:",
"questionReply": "Question reply:",
"no": "No time"
},
"feedbackCreate": {
"title": "Feedback",
"probDesc": "Problem Description:",
"enterDesc": "Please enter a question description",
"problemDetails": "Details of the problem:",
"uploadAtta": "Upload attachments",
"limit": "(resources such as word, PPT, PNG, JPG, zip, rar can be uploaded. For multiple files, please compress and package them into one file before uploading.)",
"submitTo": "Submit to",
"technology": "Technology",
"administration": "Administration",
"all": "All",
"btnUpload": "Click upload",
"downloadButtonText": "Download uploaded attachments",
"subBtn": "Submit"
}
},
"grade": {
"credit": {
"title": "Credits",
"unpublished": "Unpublished",
"myCredits": "Credits",
"totalCredits": "Total",
"compCredits": "Required",
"eleCredits": "Elective",
"allCredits": "Total",
"serialNumber": "NO",
"semester": "Term",
"class": "Class",
"course": "Course",
"courseCredits": "Course credits",
"status": "Status",
"credit": "Credit",
"grade": "Grade",
"operate": "Operate",
"passed": "Pass",
"failed": "Fail"
} }
} }
} }
......
...@@ -75,6 +75,155 @@ ...@@ -75,6 +75,155 @@
"changeCourse": "选课广场", "changeCourse": "选课广场",
"showCourse": "查看课程", "showCourse": "查看课程",
"progress": "视频观看进度" "progress": "视频观看进度"
},
"discussion": {
"title": "课程讨论",
"tap1": "我提出的问题",
"tap2": "我参与的问题",
"answers": "回答",
"votes": "投票"
},
"discussDetail": {
"title": "问题详情",
"like": "点赞",
"discuss": "讨论",
"reply": "回复",
"delete": "删除",
"send": "发送",
"noAnswer": "暂无回答",
"deleteSuccess": "删除成功",
"answering": "回答问题"
},
"reportActiveList": {
"title": "学术活动列表",
"newEvent": "申请新的活动",
"serialNumber": "序号",
"activityName": "活动名称",
"activitytime": "活动时间",
"lecturer": "主讲人",
"approvalStatus": "审核状态",
"approvalTime": "审核时间",
"operate": "操作",
"viewReport": "查看报告",
"uploadReport": "上传报告",
"edit": "编辑",
"delete": "删除",
"unreviewed": "未审核",
"passed": "通过",
"failed": "未通过",
"deleteSuccessTips": "删除成功"
},
"reportListAll": {
"title": "学术报告所在活动列表",
"index": "序号",
"reportName": "报告名称",
"reportDescription": "报告摘要",
"submitTime": "提交时间",
"approveStatus": "审核状态",
"file": "附件下载",
"operate": "操作",
"backButtonText": "返回活动列表",
"edit": "编辑",
"delete": "删除",
"unreviewed": "未审核",
"passed": "通过",
"failed": "未通过",
"deleteSuccessTips": "删除成功"
},
"reportAdd": {
"title": "学术活动申请",
"backActivity": "返回活动列表",
"activityName": "学术活动名称",
"ActivityTime": "学术活动时间",
"lecturer": "主 讲 人",
"address": "学术活动地址",
"activityContent": "学术活动内容",
"saveSubmit": "保存并提交",
"formCheckTips": "请检查输入项,确认无误后,重新提交",
"enterActivity": "请输入活动名称",
"selectTime": "选择日期时间",
"enterLecturer": "输入主讲人",
"enteraddress": "请输入活动地址",
"entActCon": "请输入活动内容",
"activityNameTips": "活动名称不能为空",
"ActivityTimeTips": "活动时间不能为空",
"lecturerTips": "主讲人不能为空",
"addressTips": "学术活动地址不能为空",
"activityContentTips": "活动内容不能为空",
"submitSuccess": "提交成功"
},
"reportSubmit": {
"title": "学术报告提交",
"backText": "返回活动列表",
"submitSuccessTips": "提交成功",
"formCheckTips": "请检查输入项,确认无误后,重新提交",
"theme": "学术报告主题",
"abstract": "学术报告摘要",
"file": "附 件",
"uploadButtonText": "点击上传",
"uploadTips": "(可以上传word、ppt等资源。系统提供模板下载)",
"downloadTemplateText": "模板下载",
"downloadButtonText": "下载已上传附件",
"submitButtonText": "保存并提交",
"themeHint": "请输入报告主题",
"abstractHint": "请输入报告摘要",
"themeTips": "报告主题不能为空",
"submitSuccess": "提交成功"
}
},
"feedback": {
"feedbackList": {
"technology": "技术",
"administration": "教务",
"all": "全部",
"title": "系统反馈",
"btnQuestion": "提出问题",
"tapType": "分类",
"pending": "待处理",
"processing": "处理中",
"processed": "已处理",
"probDesc": "问题描述:",
"downloadAtta": "下载附件:",
"publishTime": "发布时间:",
"questionReply": "问题回复:",
"no": "暂无"
},
"feedbackCreate": {
"title": "系统反馈",
"probDesc": "问题描述:",
"enterDesc": "请输入问题描述",
"problemDetails": "问题详情:",
"uploadAtta": "上传附件",
"limit": "(可以上传 word、ppt、png、jpg、zip、rar等资源,多文件请先压缩打包成一个文件后,再上传)",
"submitTo": "提交给",
"technology": "技术",
"administration": "教务",
"all": "全部",
"btnUpload": "点击上传",
"downloadButtonText": "下载已上传附件",
"subBtn": "提交"
}
},
"grade": {
"credit": {
"title": "我的学分",
"unpublished": "未发布",
"myCredits": "我的学分",
"totalCredits": "总计学分",
"compCredits": "必修学分",
"eleCredits": "选修学分",
"allCredits": "总学分",
"serialNumber": "序号",
"semester": "学期",
"class": "班级",
"course": "课程",
"courseCredits": "课程学分",
"status": "状态",
"credit": "学分",
"grade": "成绩",
"operate": "操作",
"passed": "通过",
"failed": "未通过"
} }
} }
} }
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
}, },
/* 修改头像 - 跳转方法 */ /* 修改头像 - 跳转方法 */
goUpdatePic () { goUpdatePic () {
this.$router.push({ path: '/app/account/update-pic' }) this.$router.push({ path: '/app/other/update-pic' })
}, },
/* 修改密码 - 跳转方法 */ /* 修改密码 - 跳转方法 */
goSetPwd () { goSetPwd () {
......
<template> <template>
<div> <div>
<div class="con-title">系统反馈</div> <div class="con-title">{{ $t('pages.feedback.feedbackCreate.title') }}</div>
<div class="con-box"> <div class="con-box">
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24"> <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
<el-form ref="setApplyForm" :model="setApply" :rules="applyRules"> <el-form ref="setApplyForm" :model="setApply" :rules="applyRules">
<el-form-item label="问题描述" prop="name"> <el-form-item :label="$t('pages.feedback.feedbackCreate.probDesc')" prop="name">
<el-input v-model="setApply.name" placeholder="请输入问题描述" type="text" /> <el-input v-model="setApply.name" :placeholder="$t('pages.feedback.feedbackCreate.enterDesc')" type="text" />
</el-form-item> </el-form-item>
<div style="width: 100%; height: 10px;"></div> <div style="width: 100%; height: 10px;"></div>
<div class="label" style="font-size: 14px; line-height: 2;">问题详情:</div> <div class="label" style="font-size: 14px; line-height: 2;">{{ $t('pages.feedback.feedbackCreate.problemDetails') }}</div>
<textarea id="editor"></textarea> <textarea id="editor"></textarea>
<div style="width: 100%; height: 10px;"></div> <div style="width: 100%; height: 10px;"></div>
<el-form-item label="上传附件" prop="file"> <el-form-item :label="$t('pages.feedback.feedbackCreate.uploadAtta')" prop="file">
<el-upload <el-upload
ref="upFile" ref="upFile"
class="upload-demo" class="upload-demo"
...@@ -23,18 +23,18 @@ ...@@ -23,18 +23,18 @@
:on-change="handleChange" :on-change="handleChange"
:http-request="uploadFile" :http-request="uploadFile"
:file-list="filesArr"> :file-list="filesArr">
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">{{ $t('pages.feedback.feedbackCreate.btnUpload') }}</el-button>
<div slot="tip" class="el-upload__tip">(可以上传 word、ppt、png、jpg、zip、rar等资源,多文件请先压缩打包成一个文件后,再上传)</div> <div slot="tip" class="el-upload__tip">{{ $t('pages.feedback.feedbackCreate.limit') }}</div>
<template v-if="successFileUrl"> <template v-if="successFileUrl">
{{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}} {{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}}
</template> </template>
</el-upload> </el-upload>
<template v-if="successFileUrl"> <template v-if="successFileUrl">
<a :href="successFileUrl">下载已上传附件</a> <a :href="successFileUrl">{{ $t('pages.feedback.feedbackCreate.downloadButtonText') }}</a>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item label="提交给" prop="type_id"> <el-form-item :label="$t('pages.feedback.feedbackCreate.submitTo')" prop="type_id">
<el-select v-model="value" placeholder="请选择"> <el-select v-model="value">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onApplyFrom">提交</el-button> <el-button type="primary" @click="onApplyFrom">{{$t('pages.feedback.feedbackCreate.subBtn')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -83,9 +83,9 @@ export default { ...@@ -83,9 +83,9 @@ export default {
file: '' file: ''
}, },
options: [ options: [
{ value: '0', label: '全部' }, { value: '0', label: this.$t('pages.feedback.feedbackCreate.all') },
{ value: '1', label: '教务' }, { value: '1', label: this.$t('pages.feedback.feedbackCreate.administration') },
{ value: '2', label: '技术' } { value: '2', label: this.$t('pages.feedback.feedbackCreate.technology') }
], ],
value: '2' value: '2'
} }
......
<template> <template>
<div> <div>
<div class="con-title">系统反馈<el-button style="float: right; margin: 8px;" type="primary" size="mini" round @click="goCreate">提出问题</el-button></div> <div class="con-title">{{ $t('pages.feedback.feedbackList.title') }}<el-button style="float: right; margin: 8px;" type="primary" size="mini" round @click="goCreate">{{ $t('pages.feedback.feedbackList.btnQuestion') }}</el-button></div>
<div class="con-box"> <div class="con-box">
<template v-for="(item, index) in find"> <template v-for="(item, index) in find">
<ul v-bind:key="index" class="tabs-list"> <ul v-bind:key="index" class="tabs-list">
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
<template slot="title"> <template slot="title">
{{item.feedback_title}}<div style="position: absolute; right: 70px;" v-html="item.status"></div> {{item.feedback_title}}<div style="position: absolute; right: 70px;" v-html="item.status"></div>
</template> </template>
<div style="font-size: 15px; font-weight: 700;">问题描述:(发布时间:{{item.created_time}})</div> <div style="font-size: 15px; font-weight: 700;">{{ $t('pages.feedback.feedbackList.probDesc') }}({{ $t('pages.feedback.feedbackList.publishTime') }} {{item.created_time}})</div>
<div style="text-indent: 20px;" v-html="item.feedback_contents"></div> <div style="text-indent: 20px;" v-html="item.feedback_contents"></div>
<div style="font-size: 15px; font-weight: 700;">下载附件:</div> <div style="font-size: 15px; font-weight: 700;">{{ $t('pages.feedback.feedbackList.downloadAtta') }}</div>
<div style="overflow: hidden; text-indent: 20px;"> <div style="overflow: hidden; text-indent: 20px;">
<template v-if="item.isEmpty"> <template v-if="item.isEmpty">
暂无附件内容 暂无附件内容
...@@ -31,12 +31,12 @@ ...@@ -31,12 +31,12 @@
<template v-else> <template v-else>
<template v-for="(item1, index1) in item.feedback_attachments"> <template v-for="(item1, index1) in item.feedback_attachments">
<template v-if="item1.url"> <template v-if="item1.url">
<a style="float: left; margin-right: 10px;" :href="item1.url">下载附件{{index1+1}}</a> <a style="float: left; margin-right: 10px;" :href="item1.url">{{ $t('pages.feedback.feedbackList.downloadAtta') }}{{index1+1}}</a>
</template> </template>
</template> </template>
</template> </template>
</div> </div>
<div style="font-size: 15px; font-weight: 700;">问题回复:</div> <div style="font-size: 15px; font-weight: 700;">{{ $t('pages.feedback.feedbackList.questionReply') }}</div>
<template v-if="item.replies.length"> <template v-if="item.replies.length">
<template v-for="(item1, index1) in item.replies"> <template v-for="(item1, index1) in item.replies">
<div class="discuss-feedback-scroll"> <div class="discuss-feedback-scroll">
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</div> </div>
</template> </template>
<textarea v-model="item.replyContent"></textarea> <textarea v-model="item.replyContent"></textarea>
<el-button type="primary" size="mini" round @click="replyContent" :data-index='index'>回复</el-button> <el-button type="primary" size="mini" round @click="replyContent" :data-index='index'>{{ $t('pages.learn.discussDetail.reply') }}</el-button>
</template> </template>
<template v-else> <template v-else>
<div style="text-indent: 20px;">问题已发送给相应的技术或教务人员,正在处理中,请耐心等待。</div> <div style="text-indent: 20px;">问题已发送给相应的技术或教务人员,正在处理中,请耐心等待。</div>
...@@ -88,14 +88,14 @@ export default { ...@@ -88,14 +88,14 @@ export default {
data () { data () {
return { return {
find: [{ find: [{
name: '分类', name: this.$t('pages.feedback.feedbackList.tapType'),
isShow: false, isShow: false,
selectIndex: 0, selectIndex: 0,
key: 'type_id', key: 'type_id',
arrItem: [ // 从后台请求 arrItem: [ // 从后台请求
{ val: '0', name: '全部' }, { val: '0', name: this.$t('pages.feedback.feedbackList.all') },
{ val: '1', name: '教务' }, { val: '1', name: this.$t('pages.feedback.feedbackList.administration') },
{ val: '2', name: '技术' } { val: '2', name: this.$t('pages.feedback.feedbackList.technology') }
] ]
}], }],
param: { param: {
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
} }
} }
/* 对状态 做一下单独处理 */ /* 对状态 做一下单独处理 */
temp.status = temp.status === '0' ? '<em style="color: #f34b4b">待处理</em>' : temp.status === '1' ? '<em style="color: #f3c74b">处理中</em>' : temp.status === '2' ? '<em style="color: #44a706">处理完成</em>' : '暂无' temp.status = temp.status === '0' ? `<em style="color: #f34b4b">${this.$t('pages.feedback.feedbackList.pending')}</em>` : temp.status === '1' ? `<em style="color: #f3c74b">${this.$t('pages.feedback.feedbackList.processing')}</em>` : temp.status === '2' ? `<em style="color: #44a706">${this.$t('pages.feedback.feedbackList.processed')}</em>` : this.$t('pages.feedback.feedbackList.no')
/* 对回复 做一下单独处理 */ /* 对回复 做一下单独处理 */
temp.replyContent = '' temp.replyContent = ''
} }
......
<template> <template>
<div> <div>
<div class="con-title">我的学分</div> <div class="con-title">{{ $t('pages.grade.credit.title') }}</div>
<div class="con-box"> <div class="con-box">
<div class="total-core"> <div class="total-core">
<div class="title">总计学分</div> <div class="title">{{ $t('pages.grade.credit.totalCredits') }}</div>
<div class="core">{{score.total}}</div> <div class="core">{{score.total}}</div>
<el-progress ref="credit_total" :text-inside="true" :stroke-width="30" :percentage="percent1" color="#df9d75"></el-progress> <el-progress ref="credit_total" :text-inside="true" :stroke-width="30" :percentage="percent1" color="#df9d75"></el-progress>
</div> </div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12"> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
<div class="compulsory-core"> <div class="compulsory-core">
<div class="title">必修学分</div> <div class="title">{{ $t('pages.grade.credit.compCredits') }}</div>
<div class="core">{{score.must}}</div> <div class="core">{{score.must}}</div>
<el-progress ref="credit_must" :text-inside="true" :stroke-width="30" :percentage="percent2" color="#8ca4cf"></el-progress> <el-progress ref="credit_must" :text-inside="true" :stroke-width="30" :percentage="percent2" color="#8ca4cf"></el-progress>
</div> </div>
</el-col> </el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12"> <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
<div class="elective-core"> <div class="elective-core">
<div class="title">选修学分</div> <div class="title">{{ $t('pages.grade.credit.eleCredits') }}</div>
<div class="core">{{score.unmust}}</div> <div class="core">{{score.unmust}}</div>
<el-progress ref="credit_unmust" :text-inside="true" :stroke-width="30" :percentage="percent3" color="#66c6bd"></el-progress> <el-progress ref="credit_unmust" :text-inside="true" :stroke-width="30" :percentage="percent3" color="#66c6bd"></el-progress>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<div class="color-box"> <div class="color-box">
<div class="color" style="background: #8ca4cf;"></div><div class="txt">必修学分</div> <div class="color" style="background: #8ca4cf;"></div><div class="txt">{{ $t('pages.grade.credit.compCredits') }}</div>
<div class="color" style="background: #66c6bd;"></div><div class="txt">选修学分</div> <div class="color" style="background: #66c6bd;"></div><div class="txt">{{ $t('pages.grade.credit.eleCredits') }}</div>
<div class="color" style="background: #df9d75;"></div><div class="txt">总学分</div> <div class="color" style="background: #df9d75;"></div><div class="txt">{{ $t('pages.grade.credit.allCredits') }}</div>
</div> </div>
<m-page <m-page
:tableHead="tableHead" :tableHead="tableHead"
...@@ -63,16 +63,16 @@ export default { ...@@ -63,16 +63,16 @@ export default {
}, },
tableConfig: { border: '', size: '', selection: { has: false, sels: [], width: '50px', fix: 'left', align: '' } }, // 增加选择框,has设置为true tableConfig: { border: '', size: '', selection: { has: false, sels: [], width: '50px', fix: 'left', align: '' } }, // 增加选择框,has设置为true
tableHead: [ tableHead: [
{ prop: 'index', label: '序号', minWidth: '40', fix: false }, { prop: 'index', label: this.$t('pages.grade.credit.serialNumber'), minWidth: '40', fix: false },
{ prop: 'semester_name', label: '学期', minWidth: '60', fix: false }, { prop: 'semester_name', label: this.$t('pages.grade.credit.semester'), minWidth: '60', fix: false },
{ prop: 'class_name', label: '班级', minWidth: '120', fix: false }, { prop: 'class_name', label: this.$t('pages.grade.credit.class'), minWidth: '120', fix: false },
{ prop: 'course_name', label: '课程', minWidth: '260', fix: false }, { prop: 'course_name', label: this.$t('pages.grade.credit.course'), minWidth: '260', fix: false },
{ prop: 'course_credit', label: '课程学分', minWidth: '60', fix: false }, { prop: 'course_credit', label: this.$t('pages.grade.credit.courseCredits'), minWidth: '60', fix: false },
{ prop: 'passed', label: '状态', minWidth: '60', fix: false }, { prop: 'passed', label: this.$t('pages.grade.credit.status'), minWidth: '60', fix: false },
{ prop: 'credit', label: '学分', minWidth: '40', fix: false }, { prop: 'credit', label: this.$t('pages.grade.credit.credit'), minWidth: '40', fix: false },
{ prop: 'score', label: '成绩', minWidth: '40', fix: false }, { prop: 'score', label: this.$t('pages.grade.credit.grade'), minWidth: '40', fix: false },
// { prop: '', label: '', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数 // { prop: '', label: this.$t('pages.grade.credit')'', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数
{ prop: 'operate-x', label: '操作', width: '80px', fix: false, commandArr: [{ command: 're-start', name: '重修' }, { command: 're-start', name: '已申请' }] } { prop: 'operate-x', label: this.$t('pages.grade.credit.operate'), width: '80px', fix: false, commandArr: [{ command: 're-start', name: '重修' }, { command: 're-start', name: '已申请' }] }
], ],
tableData: [], tableData: [],
params: { keywords: '', curPage: 1, pageSize: 100, total: '' }, params: { keywords: '', curPage: 1, pageSize: 100, total: '' },
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
data = data.list data = data.list
data.forEach((elem, i) => { data.forEach((elem, i) => {
elem.index = i + 1 + (_this.params.curPage - 1) * _this.params.pageSize elem.index = i + 1 + (_this.params.curPage - 1) * _this.params.pageSize
elem.passed = elem.passed !== 0 ? (elem.passed === 2 ? '未发布' : '通过') : '未通过' elem.passed = elem.passed !== 0 ? (elem.passed === 2 ? this.$t('pages.grade.credit.unpublished') : this.$t('pages.grade.credit.passed')) : this.$t('pages.grade.credit.failed')
_this.tableData.push(elem) _this.tableData.push(elem)
}) })
} }
......
<template> <template>
<div> <div>
<div class="con-title">问题详情</div> <div class="con-title">{{ $t('pages.learn.discussDetail.title') }}</div>
<div class="con-box"> <div class="con-box">
<div class='discuss-detail-scroll'> <div class='discuss-detail-scroll'>
<div class='ques'> <div class='ques'>
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
<div class='user'> <div class='user'>
<div class='name'>{{discussQues.user.name}}</div> <div class='name'>{{discussQues.user.name}}</div>
<div class='time'>{{discussQues.user.time}}</div> <div class='time'>{{discussQues.user.time}}</div>
<template v-if='discussQues.mine'><div class='right-txt' @click='deleteDiscuss'>删除</div></template> <template v-if='discussQues.mine'><div class='right-txt' @click='deleteDiscuss'>{{ $t('pages.learn.discussDetail.delete') }}</div></template>
<div class='right-txt' @click='callbackComment' :data-sid='discussQues.sid' :data-qid='discussQues.qid' :data-quesid='discussQues.qid'>回复</div> <div class='right-txt' @click='callbackComment' :data-sid='discussQues.sid' :data-qid='discussQues.qid' :data-quesid='discussQues.qid'>{{ $t('pages.learn.discussDetail.reply') }}</div>
<div class='right-txt' @click='openOrcloseDis' data-key='disQus'>讨论({{discussQues.comCnt}})</div> <div class='right-txt' @click='openOrcloseDis' data-key='disQus'>{{ $t('pages.learn.discussDetail.discuss') }}({{discussQues.comCnt}})</div>
<div class='right-txt' @click='btnlike' :data-quesid='discussQues.qid' :data-sid='discussQues.sid' :data-tagid='discussQues.tag_id'> <div class='right-txt' @click='btnlike' :data-quesid='discussQues.qid' :data-sid='discussQues.sid' :data-tagid='discussQues.tag_id'>
<!-- <image class='img' src='{{discussQues.has_tag ? "./icons/like-on.png" : "./icons/like.png"}}'></image> --> <!-- <image class='img' src='{{discussQues.has_tag ? "./icons/like-on.png" : "./icons/like.png"}}'></image> -->
点赞({{discussQues.likeCnt}})</div> {{ $t('pages.learn.discussDetail.like') }}({{discussQues.likeCnt}})</div>
</div> </div>
<template v-if='disQus.isShowComment'> <template v-if='disQus.isShowComment'>
<div class='ask'> <div class='ask'>
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
<div class='user'> <div class='user'>
<div class='name'>{{item.user.name}}</div> <div class='name'>{{item.user.name}}</div>
<div class='time'>{{item.user.time}}</div> <div class='time'>{{item.user.time}}</div>
<template v-if='item.mine'><div class='right-txt' @click='deleteComment' :data-cid='item.cid'>删除</div></template> <template v-if='item.mine'><div class='right-txt' @click='deleteComment' :data-cid='item.cid'>{{ $t('pages.learn.discussDetail.delete') }}</div></template>
<div class='right-txt' @click='callbackComment' :data-sid='discussQues.sid' :data-qid='discussQues.qid' :data-quesid='discussQues.qid' :data-to='item.user.name'>回复</div> <div class='right-txt' @click='callbackComment' :data-sid='discussQues.sid' :data-qid='discussQues.qid' :data-quesid='discussQues.qid' :data-to='item.user.name'>{{ $t('pages.learn.discussDetail.reply') }}</div>
</div> </div>
<div class='text'>{{item.text}}</div> <div class='text'>{{item.text}}</div>
</div> </div>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> </div>
</template> </template>
</div> </div>
<div class='result'>{{discussQues.askCnt}} 回答<div style='display: inline-block; width: 0.2rem;'></div>{{discussQues.TouCnt}} 投票</div> <div class='result'>{{discussQues.askCnt}} {{ $t('pages.learn.discussion.answers') }}<div style='display: inline-block; width: 0.2rem;'></div>{{discussQues.TouCnt}} {{ $t('pages.learn.discussion.votes') }}</div>
<template v-for='(item, index) in answersList'> <template v-for='(item, index) in answersList'>
<div v-bind:key="index" class='ask'> <div v-bind:key="index" class='ask'>
<div class='user-1'> <div class='user-1'>
...@@ -49,9 +49,9 @@ ...@@ -49,9 +49,9 @@
</div> </div>
<div class='text' v-html="item.text"></div> <div class='text' v-html="item.text"></div>
<div class='user'> <div class='user'>
<template v-if='item.mine'><div class='right-txt' @click='deleteAnswer' :data-aid='item.aid'>删除</div></template> <template v-if='item.mine'><div class='right-txt' @click='deleteAnswer' :data-aid='item.aid'>{{ $t('pages.learn.discussDetail.delete') }}</div></template>
<div class='right-txt' @click='callbackComment' :data-sid='discussQues.sid' :data-qid='discussQues.qid' :data-ansid='item.aid'>回复</div> <div class='right-txt' @click='callbackComment' :data-sid='discussQues.sid' :data-qid='discussQues.qid' :data-ansid='item.aid'>{{ $t('pages.learn.discussDetail.reply') }}</div>
<div class='right-txt' @click='openOrcloseDis' :data-key='answers' :data-index='index'>讨论({{item.comCnt}})</div> <div class='right-txt' @click='openOrcloseDis' :data-key='answers' :data-index='index'>{{ $t('pages.learn.discussDetail.discuss') }}({{item.comCnt}})</div>
<div class='right-txt' @click='btnlike' :data-sid='discussQues.sid' :data-quesid='discussQues.qid' :data-ansid='item.aid' :data-tagid='item.tag_id'> <div class='right-txt' @click='btnlike' :data-sid='discussQues.sid' :data-quesid='discussQues.qid' :data-ansid='item.aid' :data-tagid='item.tag_id'>
<!-- <image class='img' src='{{item.has_tag ? "./icons/like-on.png" : "./icons/like.png"}}'></image> --> <!-- <image class='img' src='{{item.has_tag ? "./icons/like-on.png" : "./icons/like.png"}}'></image> -->
点赞({{item.likeCnt}})</div> 点赞({{item.likeCnt}})</div>
...@@ -62,8 +62,8 @@ ...@@ -62,8 +62,8 @@
<div class='user'> <div class='user'>
<div class='name'>{{item1.user.name}}</div> <div class='name'>{{item1.user.name}}</div>
<div class='time'>{{item1.user.time}}</div> <div class='time'>{{item1.user.time}}</div>
<template v-if='item1.mine'><div class='right-txt' @click='deleteComment' :data-cid='item1.cid'>删除</div></template> <template v-if='item1.mine'><div class='right-txt' @click='deleteComment' :data-cid='item1.cid'>{{ $t('pages.learn.discussDetail.delete') }}</div></template>
<div class='right-txt' @click='callbackComment' :data-sid='discussQues.sid' :data-qid='discussQues.qid' :data-ansid='item.aid' :data-to='item.user.name'>回复</div> <div class='right-txt' @click='callbackComment' :data-sid='discussQues.sid' :data-qid='discussQues.qid' :data-ansid='item.aid' :data-to='item.user.name'>{{ $t('pages.learn.discussDetail.reply') }}</div>
</div> </div>
<div class='text' v-html="item1.text"></div> <div class='text' v-html="item1.text"></div>
</div> </div>
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
</div> </div>
</template> </template>
<template v-if='!answersList.length'> <template v-if='!answersList.length'>
<div class='no-data'>暂无回答</div> <div class='no-data'>{{ $t('pages.learn.discussDetail.noAnswer') }}</div>
</template> </template>
<div style='width: 750rpx; height: 200rpx;'></div> <div style='width: 750rpx; height: 200rpx;'></div>
</div> </div>
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<!-- <image class='img' src='./icons/ask.png' mode='aspectFill'></image> --> <!-- <image class='img' src='./icons/ask.png' mode='aspectFill'></image> -->
<!-- <input type='text' class="txt" placeholder='{{inputStatus.placeholder}}' focus='{{inputStatus.canFocus}}' bindblur='blurInput' confirm-type='send' bindconfirm='publishContent' value='{{inputStatus.input}}' cursor-spacing='20'/> --> <!-- <input type='text' class="txt" placeholder='{{inputStatus.placeholder}}' focus='{{inputStatus.canFocus}}' bindblur='blurInput' confirm-type='send' bindconfirm='publishContent' value='{{inputStatus.input}}' cursor-spacing='20'/> -->
<!-- </div> --> <!-- </div> -->
<el-button type="primary" @click="publishContent">发送</el-button><em class="send">({{inputStatus.placeholder}})</em> <el-button type="primary" @click="publishContent">{{ $t('pages.learn.discussDetail.send') }}</el-button><em class="send">({{inputStatus.placeholder}})</em>
</div> </div>
</div> </div>
</template> </template>
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
], ],
inputStatus: { inputStatus: {
canFocus: false, canFocus: false,
placeholder: '回答问题 ...', placeholder: `${this.$t('pages.learn.discussDetail.answering')} ...`,
input: '' input: ''
}, },
qid: '6447416971762860032', qid: '6447416971762860032',
...@@ -191,7 +191,7 @@ export default { ...@@ -191,7 +191,7 @@ export default {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Discuss.deleteComment(cid).then(json => { cAction.Discuss.deleteComment(cid).then(json => {
this.updateList() this.updateList()
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: this.$t('pages.learn.discussDetail.deleteSuccess') })
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}, },
/** /**
...@@ -202,7 +202,7 @@ export default { ...@@ -202,7 +202,7 @@ export default {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Discuss.deleteAnswer(aid).then(json => { cAction.Discuss.deleteAnswer(aid).then(json => {
this.updateList() this.updateList()
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: this.$t('pages.learn.discussDetail.deleteSuccess') })
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}, },
/** /**
...@@ -238,7 +238,7 @@ export default { ...@@ -238,7 +238,7 @@ export default {
deleteDiscuss () { deleteDiscuss () {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Discuss.deleteDiscuss(this.id).then(json => { cAction.Discuss.deleteDiscuss(this.id).then(json => {
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: this.$t('pages.learn.discussDetail.deleteSuccess') })
/* 返回上一级 菜单 */ /* 返回上一级 菜单 */
setTimeout(() => { setTimeout(() => {
// wx.navigateBack({ delta: 1 }) // wx.navigateBack({ delta: 1 })
...@@ -267,9 +267,9 @@ export default { ...@@ -267,9 +267,9 @@ export default {
if (sid) { json.semester_id = sid } if (sid) { json.semester_id = sid }
this.call = json this.call = json
if (to) { if (to) {
this.inputStatus.placeholder = '回复' + to + '' this.inputStatus.placeholder = this.$t('pages.learn.discussDetail.reply') + to + ''
} else { } else {
this.inputStatus.placeholder = '回复:' this.inputStatus.placeholder = `${this.$t('pages.learn.discussDetail.reply')}:`
} }
this.inputStatus.canFocus = true this.inputStatus.canFocus = true
$('#editor').focus() $('#editor').focus()
...@@ -282,7 +282,7 @@ export default { ...@@ -282,7 +282,7 @@ export default {
if ($('#editor').val()) { if ($('#editor').val()) {
// 输入框中存在内容则不做处理 - 这里不能做任何处理,否则会产生 输入框中内容遗留问题 // 输入框中存在内容则不做处理 - 这里不能做任何处理,否则会产生 输入框中内容遗留问题
} else { } else {
this.inputStatus.placeholder = '回答问题 ...' this.inputStatus.placeholder = `${this.$t('pages.learn.discussDetail.answering')} ...`
this.inputStatus.input = '' this.inputStatus.input = ''
// 回答问题 方式 // 回答问题 方式
this.call = { this.call = {
...@@ -300,7 +300,7 @@ export default { ...@@ -300,7 +300,7 @@ export default {
publishContent (e) { publishContent (e) {
const val = $('#editor').val() const val = $('#editor').val()
if (this.call.to) { if (this.call.to) {
this.call.comments = '回复' + this.call.to + '' + val this.call.comments = this.$t('pages.learn.discussDetail.reply') + this.call.to + '' + val
} else { } else {
this.call.comments = val this.call.comments = val
} }
......
<template> <template>
<div> <div>
<div class="con-title">课程讨论</div> <div class="con-title">{{ $t('pages.learn.discussion.title') }}</div>
<div class="con-box"> <div class="con-box">
<div class='tab-select'> <div class='tab-select'>
<template v-for='(item, index) in tabs'> <template v-for='(item, index) in tabs'>
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
<div class='title'>{{item.title}}</div> <div class='title'>{{item.title}}</div>
<div :class='["text"]' v-html="item.text"></div><div :class='["ellipsis", (item.isShow ? "on" : "")]'>....</div> <div :class='["text"]' v-html="item.text"></div><div :class='["ellipsis", (item.isShow ? "on" : "")]'>....</div>
<div class='result'>{{item.askCnt}} 回答<div style='display: inline-block; width: 20px;'></div>{{item.TouCnt}} 投票</div> <div class='result'>{{item.askCnt}} {{ $t('pages.learn.discussion.answers') }}<div style='display: inline-block; width: 20px;'></div>{{item.TouCnt}} {{ $t('pages.learn.discussion.votes') }}</div>
<!-- <div class='course-name'>{{item.courseName}}</div> --> <!-- <div class='course-name'>{{item.courseName}}</div> -->
</div> </div>
</template> </template>
...@@ -44,11 +44,11 @@ export default { ...@@ -44,11 +44,11 @@ export default {
data () { data () {
return { return {
tabs: [{ tabs: [{
title: '我提出的问题', title: this.$t('pages.learn.discussion.tap1'),
isShow: true, isShow: true,
path: '/my' path: '/my'
}, { }, {
title: '我参与的问题', title: this.$t('pages.learn.discussion.tap2'),
isShow: false, isShow: false,
path: '/involved' path: '/involved'
}], }],
......
<template> <template>
<div> <div>
<div class="con-title">学术活动列表</div> <div class="con-title">{{ $t('pages.learn.reportActiveList.title') }}</div>
<div class="con-box"> <div class="con-box">
<el-button type="primary" @click="goReportAdd">申请新的活动</el-button> <el-button type="primary" @click="goReportAdd">{{ $t('pages.learn.reportActiveList.newEvent') }}</el-button>
<!-- <el-button style="float:right;" type="text" @click='gobackReportList'>返回报告列表</el-button> --> <!-- <el-button style="float:right;" type="text" @click='gobackReportList'>返回报告列表</el-button> -->
<div style="width: 100%; height: 0.2rem;"></div> <div style="width: 100%; height: 0.2rem;"></div>
<m-page <m-page
...@@ -26,14 +26,14 @@ export default { ...@@ -26,14 +26,14 @@ export default {
return { return {
tableConfig: { border: '', size: '', selection: { has: false, sels: [], width: '50px', fix: 'left', align: '' } }, // 增加选择框,has设置为true tableConfig: { border: '', size: '', selection: { has: false, sels: [], width: '50px', fix: 'left', align: '' } }, // 增加选择框,has设置为true
tableHead: [ tableHead: [
{ prop: 'index', label: '序号', minWidth: '80', fix: false }, { prop: 'index', label: this.$t('pages.learn.reportActiveList.serialNumber'), minWidth: '80', fix: false },
{ prop: 'symposium_name', label: '活动名称', minWidth: '150', fix: false }, { prop: 'symposium_name', label: this.$t('pages.learn.reportActiveList.activityName'), minWidth: '150', fix: false },
{ prop: 'symposium_time', label: '活动时间', minWidth: '120', fix: false }, { prop: 'symposium_time', label: this.$t('pages.learn.reportActiveList.activitytime'), minWidth: '120', fix: false },
{ prop: 'symposium_lecturer', label: '主讲人', minWidth: '120', fix: false }, { prop: 'symposium_lecturer', label: this.$t('pages.learn.reportActiveList.lecturer'), minWidth: '120', fix: false },
{ prop: 'approve_status', label: '审核状态', minWidth: '80', fix: false }, { prop: 'approve_status', label: this.$t('pages.learn.reportActiveList.approvalStatus'), minWidth: '80', fix: false },
{ prop: 'approve_time', label: '审核时间', minWidth: '120', fix: false }, { prop: 'approve_time', label: this.$t('pages.learn.reportActiveList.approvalTime'), minWidth: '120', fix: false },
// { prop: '', label: '', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数 // { prop: '', label: '', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数
{ prop: 'operate-x', label: '操作', width: '240px', fix: false, commandArr: [{ command: 'activelist-show', name: '查看报告' }, { command: 'activereport-add', name: '上传报告' }, { command: 'activelist-edit', name: '编辑' }, { command: 'activelist-delete', name: '删除' }] } { prop: 'operate-x', label: this.$t('pages.learn.reportActiveList.operate'), width: '240px', fix: false, commandArr: [{ command: 'activelist-show', name: this.$t('pages.learn.reportActiveList.viewReport') }, { command: 'activereport-add', name: this.$t('pages.learn.reportActiveList.uploadReport') }, { command: 'activelist-edit', name: this.$t('pages.learn.reportActiveList.edit') }, { command: 'activelist-delete', name: this.$t('pages.learn.reportActiveList.delete') }] }
], ],
tableData: [], tableData: [],
params: { keywords: '', curPage: 1, pageSize: 100, total: '' }, params: { keywords: '', curPage: 1, pageSize: 100, total: '' },
...@@ -46,7 +46,7 @@ export default { ...@@ -46,7 +46,7 @@ export default {
callback: (_this, data) => { callback: (_this, data) => {
_this.params.total = 100 _this.params.total = 100
data.forEach((elem, i) => { data.forEach((elem, i) => {
elem.approve_status = elem.approve_status === 1 ? '通过' : (elem.approve_status === 0 ? '未通过' : '未审核') // 0 未通过;1 通过;2 未审核 elem.approve_status = elem.approve_status === 1 ? this.$t('pages.learn.reportActiveList.passed') : (elem.approve_status === 0 ? this.$t('pages.learn.reportActiveList.failed') : this.$t('pages.learn.reportActiveList.unreviewed')) // 0 未通过;1 通过;2 未审核
elem.index = i + 1 + (_this.params.curPage - 1) * _this.params.pageSize elem.index = i + 1 + (_this.params.curPage - 1) * _this.params.pageSize
elem.reportscount = Number(elem.reportscount || '0') elem.reportscount = Number(elem.reportscount || '0')
_this.tableData.push(elem) _this.tableData.push(elem)
...@@ -75,7 +75,7 @@ export default { ...@@ -75,7 +75,7 @@ export default {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Report.deleteReportActive(rid).then(data => { cAction.Report.deleteReportActive(rid).then(data => {
if (data.flag) { if (data.flag) {
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: this.$t('pages.learn.reportActiveList.deleteSuccessTips') })
} }
this.params.pageSize += 1 this.params.pageSize += 1
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
......
<template> <template>
<div> <div>
<div class="con-title">学术活动申请</div> <div class="con-title">{{ $t('pages.learn.reportAdd.title') }}</div>
<div class="con-box"> <div class="con-box">
<el-button type="text" @click='gobackActiveList'>返回活动列表</el-button> <el-button type="text" @click='gobackActiveList'>{{ $t('pages.learn.reportAdd.backActivity') }}</el-button>
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8"> <el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8">
<el-form ref="setApplyForm" :label-width="labelWidth" :model="setApply" :rules="applyRules"> <el-form ref="setApplyForm" label-width="200px" :model="setApply" :rules="applyRules">
<el-form-item label="学术活动名称" prop="name"> <el-form-item :label="$t('pages.learn.reportAdd.activityName')" prop="name">
<el-input v-model="setApply.name" placeholder="请输入活动名称" type="text" /> <el-input v-model="setApply.name" :placeholder="$t('pages.learn.reportAdd.enterActivity')" type="text" />
</el-form-item> </el-form-item>
<el-form-item label="学术活动时间" prop="time"> <el-form-item :label="$t('pages.learn.reportAdd.ActivityTime')" prop="time">
<el-date-picker v-model="setApply.time" value-format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期时间" type="datetime" /> <el-date-picker v-model="setApply.time" value-format="yyyy-MM-dd HH:mm:ss" :placeholder="$t('pages.learn.reportAdd.selectTime')" type="datetime" />
</el-form-item> </el-form-item>
<el-form-item label="主 讲 人" prop="author"> <el-form-item :label="$t('pages.learn.reportAdd.lecturer')" prop="author">
<el-input v-model="setApply.author" placeholder="请输入主讲人" type="text" /> <el-input v-model="setApply.author" :placeholder="$t('pages.learn.reportAdd.enterLecturer')" type="text" />
</el-form-item> </el-form-item>
<el-form-item label="学术活动地址" prop="address"> <el-form-item :label="$t('pages.learn.reportAdd.address')" prop="address">
<el-input v-model="setApply.address" placeholder="请输入活动地址" type="text" /> <el-input v-model="setApply.address" :placeholder="$t('pages.learn.reportAdd.enteraddress')" type="text" />
</el-form-item> </el-form-item>
<el-form-item label="学术活动内容" prop="content"> <el-form-item :label="$t('pages.learn.reportAdd.activityContent')" prop="content">
<el-input v-model="setApply.content" maxlength="50" placeholder="请输入活动内容" type="textarea" :autosize="{ minRows: 5 }" /> <el-input v-model="setApply.content" maxlength="50" :placeholder="$t('pages.learn.reportAdd.entActCon')" type="textarea" :autosize="{ minRows: 5 }" />
</el-form-item> </el-form-item>
<!-- <el-form-item label="附 件" prop="file"> <!-- <el-form-item label="附 件" prop="file">
<el-upload <el-upload
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</template> </template>
</el-form-item> --> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button type="primary" @click="onApplyFrom">保存并提交</el-button> <el-button type="primary" @click="onApplyFrom">{{$t('pages.learn.reportAdd.saveSubmit')}}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -72,19 +72,19 @@ export default { ...@@ -72,19 +72,19 @@ export default {
}, },
applyRules: { applyRules: {
name: [ name: [
{ required: true, message: '活动名称不能为空', trigger: 'blur' } { required: true, message: this.$t('pages.learn.reportAdd.activityNameTips'), trigger: 'blur' }
], ],
time: [ time: [
{ required: true, message: '活动时间不能为空', trigger: 'blur' } { required: true, message: this.$t('pages.learn.reportAdd.ActivityTimeTips'), trigger: 'blur' }
], ],
author: [ author: [
{ required: true, message: '主讲人不能为空', trigger: 'blur' } { required: true, message: this.$t('pages.learn.reportAdd.lecturerTips'), trigger: 'blur' }
], ],
address: [ address: [
{ required: true, message: '学术活动地址不能为空', trigger: 'blur' } { required: true, message: this.$t('pages.learn.reportAdd.addressTips'), trigger: 'blur' }
], ],
content: [ content: [
{ required: true, message: '活动内容不能为空', trigger: 'blur' } { required: true, message: this.$t('pages.learn.reportAdd.activityContentTips'), trigger: 'blur' }
] ]
}, },
successFileUrl: '', successFileUrl: '',
...@@ -174,14 +174,14 @@ export default { ...@@ -174,14 +174,14 @@ export default {
} }
reportActive.then(data => { reportActive.then(data => {
if (data.flag) { if (data.flag) {
this.$message({ type: 'success', message: '提交成功' }) this.$message({ type: 'success', message: this.$t('pages.learn.reportAdd.submitSuccess') })
setTimeout(() => { setTimeout(() => {
this.$router.push({ path: '/app/learn/report-active-list' }) this.$router.push({ path: '/app/learn/report-active-list' })
}, 500) }, 500)
} }
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
} else { } else {
this.$message.error('请检查输入项,确认无误后,重新提交') this.$message.error($.t('pages.learn.reportAdd.formCheckTips'))
return false return false
} }
}) })
......
<template> <template>
<div> <div>
<div class="con-title">学术报告所在活动列表</div> <div class="con-title">{{ $t('pages.learn.reportListAll.title') }}</div>
<div class="con-box"> <div class="con-box">
<!-- <el-button type="primary" @click="goReportSubmit">申请报告</el-button> --> <!-- <el-button type="primary" @click="goReportSubmit">申请报告</el-button> -->
<el-button type="text" @click='gobackReportActiveList'>返回活动列表</el-button> <el-button type="text" @click='gobackReportActiveList'>{{ $t('pages.learn.reportListAll.backButtonText') }}</el-button>
<div style="width: 100%; height: 0.2rem;"></div> <div style="width: 100%; height: 0.2rem;"></div>
<m-page <m-page
:tableHead="tableHead" :tableHead="tableHead"
...@@ -29,14 +29,14 @@ export default { ...@@ -29,14 +29,14 @@ export default {
return { return {
tableConfig: { border: '', size: '', selection: { has: false, sels: [], width: '50px', fix: 'left', align: '' } }, // 增加选择框,has设置为true tableConfig: { border: '', size: '', selection: { has: false, sels: [], width: '50px', fix: 'left', align: '' } }, // 增加选择框,has设置为true
tableHead: [ tableHead: [
{ prop: 'index', label: '序号', minWidth: '80', fix: false }, { prop: 'index', label: this.$t('pages.learn.reportListAll.index'), minWidth: '80', fix: false },
{ prop: 'report_name', label: '报告名称', minWidth: '150', fix: false }, { prop: 'report_name', label: this.$t('pages.learn.reportListAll.reportName'), minWidth: '150', fix: false },
{ prop: 'report_description', label: '报告摘要', minWidth: '120', fix: false }, { prop: 'report_description', label: this.$t('pages.learn.reportListAll.reportDescription'), minWidth: '120', fix: false },
{ prop: 'submit_time', label: '提交时间', minWidth: '120', fix: false }, { prop: 'submit_time', label: this.$t('pages.learn.reportListAll.submitTime'), minWidth: '120', fix: false },
{ prop: 'approve_status', label: '审核状态', minWidth: '120', fix: false }, { prop: 'approve_status', label: this.$t('pages.learn.reportListAll.approveStatus'), minWidth: '120', fix: false },
{ prop: 'file_url', label: '附件下载', minWidth: '120', fix: false }, { prop: 'file_url', label: this.$t('pages.learn.reportListAll.file'), minWidth: '120', fix: false },
// { prop: '', label: '', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数 // { prop: '', label: '', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数
{ prop: 'operate-x', label: '操作', width: '140px', fix: false, commandArr: [{ command: 'reportlist-', name: '' }, { command: 'reportlist-edit', name: '编辑' }, { command: 'reportlist-delete', name: '删除' }] } { prop: 'operate-x', label: this.$t('pages.learn.reportListAll.operate'), width: '140px', fix: false, commandArr: [{ command: 'reportlist-', name: '' }, { command: 'reportlist-edit', name: this.$t('pages.learn.reportListAll.edit') }, { command: 'reportlist-delete', name: this.$t('pages.learn.reportListAll.delete') }] }
], ],
tableData: [], tableData: [],
params: { keywords: '', curPage: 1, pageSize: 100, total: '' }, params: { keywords: '', curPage: 1, pageSize: 100, total: '' },
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
callback: (_this, data) => { callback: (_this, data) => {
_this.params.total = 100 _this.params.total = 100
data.forEach((elem, i) => { data.forEach((elem, i) => {
elem.approve_status = elem.is_checked === 1 ? '通过' : (elem.is_checked === 0 ? '未通过' : '未审核') elem.approve_status = elem.is_checked === 1 ? this.$t('pages.learn.reportActiveList.passed') : (elem.is_checked === 0 ? this.$t('pages.learn.reportActiveList.failed') : this.$t('pages.learn.reportActiveList.unreviewed'))
elem.file_url = JSON.parse(elem.file_url)[0].url elem.file_url = JSON.parse(elem.file_url)[0].url
elem.index = i + 1 + (_this.params.curPage - 1) * _this.params.pageSize elem.index = i + 1 + (_this.params.curPage - 1) * _this.params.pageSize
_this.tableData.push(elem) _this.tableData.push(elem)
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' }) const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.Report.deleteSubmitReport(this.rid, reid).then(data => { cAction.Report.deleteSubmitReport(this.rid, reid).then(data => {
if (data.flag) { if (data.flag) {
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: this.$t('pages.learn.reportActiveList.deleteSuccessTips') })
} }
this.params.pageSize += 1 this.params.pageSize += 1
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
......
<template> <template>
<div> <div>
<div class="con-title">学术报告提交</div> <div class="con-title">{{ $t('pages.learn.reportSubmit.title') }}</div>
<div class="con-box"> <div class="con-box">
<el-button type="text" @click='gobackActiveList'>返回活动列表</el-button> <el-button type="text" @click='gobackActiveList'>{{ $t('pages.learn.reportSubmit.backText') }}</el-button>
<el-row type="flex" justify="center"> <el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8"> <el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8">
<el-form ref="setSubmitForm" :label-width="labelWidth" :model="setSubmit" :rules="submitRules"> <el-form ref="setSubmitForm" :label-width="labelWidth" :model="setSubmit" :rules="submitRules">
<el-form-item label="学术报告主题" prop="name"> <el-form-item :label="$t('pages.learn.reportSubmit.theme')" prop="name">
<el-input v-model="setSubmit.name" placeholder="请输入报告主题" type="text" /> <el-input v-model="setSubmit.name" :placeholder="$t('pages.learn.reportSubmit.themeHint')" type="text" />
</el-form-item> </el-form-item>
<el-form-item label="学术报告摘要" prop="title"> <el-form-item :label="$t('pages.learn.reportSubmit.abstract')" prop="title">
<el-input v-model="setSubmit.title" placeholder="请输入报告摘要" type="text" /> <el-input v-model="setSubmit.title" :placeholder="$t('pages.learn.reportSubmit.abstractHint')" type="text" />
</el-form-item> </el-form-item>
<el-form-item label="附 件" prop="file"> <el-form-item :label="$t('pages.learn.reportSubmit.abstract')" prop="file">
<el-upload <el-upload
ref="upFile" ref="upFile"
class="upload-demo" class="upload-demo"
...@@ -23,18 +23,18 @@ ...@@ -23,18 +23,18 @@
:on-change="handleChange" :on-change="handleChange"
:http-request="uploadFile" :http-request="uploadFile"
:file-list="filesArr"> :file-list="filesArr">
<el-button size="small" type="primary">点击上传</el-button> <el-button size="small" type="primary">{{ $t('pages.learn.reportSubmit.uploadButtonText') }}</el-button>
<div slot="tip" class="el-upload__tip">(可以上传word、ppt等资源。系统提供模板下载)<a href="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/build/learn-mba/%E3%80%8AMBA%E5%AD%A6%E7%94%9F%E5%AD%A6%E6%9C%AF%E6%B4%BB%E5%8A%A8%E8%AE%B0%E5%BD%95%E6%8A%A5%E5%91%8A%E3%80%8B%E6%A8%A1%E6%9D%BFXXX%E5%AD%A6%E7%94%9F.docx">模板下载</a></div> <div slot="tip" class="el-upload__tip">{{ $t('pages.learn.reportSubmit.uploadTips') }}<a href="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/build/learn-mba/%E3%80%8AMBA%E5%AD%A6%E7%94%9F%E5%AD%A6%E6%9C%AF%E6%B4%BB%E5%8A%A8%E8%AE%B0%E5%BD%95%E6%8A%A5%E5%91%8A%E3%80%8B%E6%A8%A1%E6%9D%BFXXX%E5%AD%A6%E7%94%9F.docx">{{ $t('pages.learn.reportSubmit.downloadTemplateText') }}</a></div>
<template v-if="successFileUrl"> <template v-if="successFileUrl">
{{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}} {{successFileUrl.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}}
</template> </template>
</el-upload> </el-upload>
<template v-if="successFileUrl"> <template v-if="successFileUrl">
<a :href="successFileUrl">下载已上传附件</a> <a :href="successFileUrl">{{ $t('pages.learn.reportSubmit.downloadButtonText') }}</a>
</template> </template>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmitFrom">保存并提交</el-button> <el-button type="primary" @click="onSubmitFrom">{{ $t('pages.learn.reportSubmit.submitButtonText') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
...@@ -61,7 +61,7 @@ export default { ...@@ -61,7 +61,7 @@ export default {
}, },
submitRules: { submitRules: {
name: [ name: [
{ required: true, message: '报告主题不能为空', trigger: 'blur' } { required: true, message: this.$t('pages.learn.reportSubmit.themeTips'), trigger: 'blur' }
], ],
title: [] title: []
}, },
...@@ -149,14 +149,14 @@ export default { ...@@ -149,14 +149,14 @@ export default {
} }
report.then(data => { report.then(data => {
if (data.flag) { if (data.flag) {
this.$message({ type: 'success', message: '提交成功' }) this.$message({ type: 'success', message: this.$t('pages.learn.reportSubmit.submitSuccess') })
setTimeout(() => { setTimeout(() => {
this.$router.push({ path: `/app/learn/report-list-all/${this.rid}` }) this.$router.push({ path: `/app/learn/report-list-all/${this.rid}` })
}, 500) }, 500)
} }
}).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() }) }).catch(e => { this.filesArr.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
} else { } else {
this.$message.error('请检查输入项,确认无误后,重新提交') this.$message.error(this.$t('pages.learn.reportSubmit.formCheckTips'))
return false return false
} }
}) })
......
...@@ -65,10 +65,10 @@ export default { ...@@ -65,10 +65,10 @@ export default {
if (valid) { if (valid) {
request({ request({
component: this, component: this,
actionName: 'loginAction', actionName: 'Other',
functionName: 'updatePwd', functionName: 'updatePwd',
data: { data: {
old_password: this.$md5('uokoaduw' + this.accountSetPwd.oldPwd.split('').reverse().join('') + 'auhgniq'), old_password: md5('uokoaduw' + this.accountSetPwd.oldPwd.split('').reverse().join('') + 'auhgniq'),
new_password: this.accountSetPwd.newPwdAgain new_password: this.accountSetPwd.newPwdAgain
}, },
thenCallback: data => { thenCallback: data => {
......
<template>
<div>
<div class="con-title">修改头像</div>
<div class="con-box">
<el-row justify="center">
<el-col :xs="24" :sm="9" :md="8" :lg="7" :xl="6">
<div class="pic-show">
<img :src="imgUrl" alt="">
</div>
</el-col>
<el-col :xs="24" :sm="15" :md="16" :lg="17" :xl="18">
<div class="info">学员姓名:<b>{{user.student_name}}</b></div>
<div class="info">学员学号:{{user.student_no}}</div>
<div class="info" style="display: none;">学员sid:{{user.student_id}}</div>
<div class="info" style="display: none;">学员sso_id:{{user.sso_id}}</div>
<div class="info">支持jpg、gif、png或bmp格式的图片,建议文件小于5M</div>
<el-upload
ref="upFile"
class="upload-demo"
action=""
:multiple="false"
:limit="1"
:show-file-list="false"
:on-change="handleChange"
:http-request="uploadFile"
:file-list="filesArr">
<el-button type="primary">点击上传</el-button>
</el-upload>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import { request } from '@action'
export default {
components: { },
data () {
const Gu = this.$GlobalVariable.UserInfo
return {
imgUrl: Gu.avatar || '',
user: {
student_no: Gu.student_info.sno,
student_name: Gu.student_info.personal_name,
student_id: Gu.student_info.id,
sso_id: Gu.id
},
file: {
id: 'WU_FILE_0',
name: '',
type: '',
lastModifiedDate: '',
size: '',
avatar: ''
},
filesArr: []
}
},
methods: {
handleChange (file, filelist) {
this.file.name = file.raw.name
this.file.type = file.raw.type
this.file.lastModifiedDate = file.raw.lastModifiedDate
this.file.size = file.raw.size
this.file.avatar = file.raw
// try {
// /* 这个必然是IE */
// let stream = new ActiveXObject('ADODB.Stream') // eslint-disable-line
// stream.type = 1
// stream.open()
// // console.log(this.$refs.upFile.$el.children[0].children[1].files[0])
// debugger
// // stream.loadFromFile(filename)
// // text = stream.readText(adReadAll)
// // stream.close()
// } catch (e) {
// let reader = new FileReader() // eslint-disable-line
// reader.readAsBinaryString(this.$refs.upFile.$el.children[0].children[1].files[0]) // 这个读法是异步的
// reader.onloadend = () => {
// // 这个事件在读取结束后,无论成功或者失败都会触发
// if (reader.error) {
// /* 文件读取失败 */
// this.$message.error('文件读取失败,请重试')
// } else {
// this.file.avatar = reader.result
// }
// }
// }
},
uploadFile () {
if (!/\.(jpg|jpeg|gif|png|bmp)$/gi.test(this.file.name)) {
this.$message.error('文件格式不对,请重新上传')
this.filesArr.pop()
return
}
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
request({
component: this,
actionName: 'loginAction',
functionName: 'updatePic',
data: this.file,
thenCallback: data => {
this.imgUrl = data.avatar
this.$GlobalVariable.UserInfo.avatar = data.avatar
this.filesArr.pop()
},
catchCallback: () => { this.filesArr.pop() },
finallyCallback: () => { loading.close() }
})
}
}
}
</script>
<style lang="scss" scoped>
.pic-show {
position: relative;
display: block;
margin: 0 auto;
width: 2rem;
height: 2rem;
background: #ffffff url('../../assets/images/person-default.jpg') center center no-repeat;
background-size: cover;
border: 1px solid #e6e3e3;
border-radius: 50%;
overflow: hidden;
img {
position: absolute;
top: 50%;
left: 50%;
width: 100%;
height: 100%;
transform: translate(-50%, -50%);
}
}
.info {
margin-top: 0.2rem;
}
.upload-demo {
display: block;
margin: 0.2rem 0 0 0;
}
@media (max-width: 767px) {
.info {
margin-top: 0.2rem;
text-align: center;
}
.upload-demo {
text-align: center;
}
}
</style>
...@@ -34,7 +34,8 @@ export default [ ...@@ -34,7 +34,8 @@ export default [
component: () => import('@/components/learnSysLayout/container.vue'), component: () => import('@/components/learnSysLayout/container.vue'),
children: [ children: [
{ path: 'message', component: () => import('../pages/other/message.vue') }, { path: 'message', component: () => import('../pages/other/message.vue') },
{ path: 'set-pwd', component: () => import('../pages/other/setPwd.vue') } { path: 'set-pwd', component: () => import('../pages/other/setPwd.vue') },
{ path: 'update-pic', component: () => import('../pages/other/updatePic.vue') }
] ]
}, },
{ {
......
{
"requires": true,
"lockfileVersion": 1,
"dependencies": {
"js-cookie": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz",
"integrity": "sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ=="
},
"js-md5": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/js-md5/-/js-md5-0.7.3.tgz",
"integrity": "sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ=="
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论