|
@@ -242,604 +242,604 @@ import examPop from './examPop.vue'
|
|
|
import examDetail from './examDetail.vue'
|
|
import examDetail from './examDetail.vue'
|
|
|
|
|
|
|
|
export default {
|
|
export default {
|
|
|
- components: {
|
|
|
|
|
- IbpsMoreSearch,
|
|
|
|
|
- IbpsTypeTree,
|
|
|
|
|
- IbpsAvatar,
|
|
|
|
|
- IbpsToolbar,
|
|
|
|
|
- IbpsListResultPage,
|
|
|
|
|
- IbpsBpmnFormrenderDialog,
|
|
|
|
|
- examPop,
|
|
|
|
|
- examDetail
|
|
|
|
|
- },
|
|
|
|
|
- mixins: [random, bpmnStatus],
|
|
|
|
|
- data() {
|
|
|
|
|
- const { userId, userList = [], deptList = [], menus, userInfo } = this.$store.getters
|
|
|
|
|
- return {
|
|
|
|
|
- tabActive: 0,
|
|
|
|
|
- tabDatas: [{
|
|
|
|
|
- name: 0,
|
|
|
|
|
- title: '待考'
|
|
|
|
|
- }, {
|
|
|
|
|
- name: 1,
|
|
|
|
|
- title: '已考'
|
|
|
|
|
- }],
|
|
|
|
|
- id: '',
|
|
|
|
|
- listExam: [],
|
|
|
|
|
- dataList: [],
|
|
|
|
|
- paperList: [],
|
|
|
|
|
- detailData: '',
|
|
|
|
|
- paperData: [],
|
|
|
|
|
- showPaperId: '',
|
|
|
|
|
- userId: userId,
|
|
|
|
|
- footText: false,
|
|
|
|
|
- showPop: false,
|
|
|
|
|
- examDetail: false,
|
|
|
|
|
- noData: false,
|
|
|
|
|
- showConfirmationBoxList: true,
|
|
|
|
|
- countTotal: {},
|
|
|
|
|
- examPopup: '',
|
|
|
|
|
- ReachBottomShow: false,
|
|
|
|
|
- moreSearchPopup: false,
|
|
|
|
|
- id1: '',
|
|
|
|
|
- searchForms: {
|
|
|
|
|
- forms: [
|
|
|
|
|
- // { prop: 'Q^examName_^SL', label: '考试名称', fieldType: 'text' },
|
|
|
|
|
- // { prop: 'Q^bankName^SL', label: '题库名称', fieldType: 'text' },
|
|
|
|
|
- { prop: 'examName', label: '考试名称', fieldType: 'text' },
|
|
|
|
|
- { prop: 'bankName', label: '题库名称', fieldType: 'text' },
|
|
|
|
|
- {
|
|
|
|
|
- prop: 'examType', label: '考试类型', fieldType: 'checker', cols: 2, valueKey: 'value', options: [
|
|
|
|
|
- { value: 'trainingExam', label: '培训考试' },
|
|
|
|
|
- { value: 'POCTtraining', label: 'POCT培训' },
|
|
|
|
|
- { value: 'selfAssessment', label: '自主考核' },
|
|
|
|
|
- { value: 'routine', label: '常规' }
|
|
|
|
|
- ]
|
|
|
|
|
- },
|
|
|
|
|
- { prop: ['startDateDL', 'startDateDG'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
|
|
|
|
|
- { prop: ['limitDateDL', 'limitDateDG'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
|
|
|
|
|
- // { prop: ['Q^startDate^DL^yyyy-MM-dd', 'Q^startDate^DG^yyyy-MM-dd'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
|
|
|
|
|
- // { prop: ['Q^limitDate^DL^yyyy-MM-dd', 'Q^limitDate^DG^yyyy-MM-dd'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
|
|
|
|
|
- ]
|
|
|
|
|
- },
|
|
|
|
|
- // './views/platform/bpmn/communication/communicationList
|
|
|
|
|
- mainActions: [{
|
|
|
|
|
- 'name': this.$t('common.button.remove'),
|
|
|
|
|
- 'type': 'danger',
|
|
|
|
|
- 'callback': this.onRemove
|
|
|
|
|
- }],
|
|
|
|
|
- stateActive: false,
|
|
|
|
|
- subject: '',
|
|
|
|
|
- moreSubject: '',
|
|
|
|
|
- subjectTitle: '',
|
|
|
|
|
- typeId: '',
|
|
|
|
|
- moreParams: {},
|
|
|
|
|
- listData: [],
|
|
|
|
|
- pagination: {},
|
|
|
|
|
- sorts: {},
|
|
|
|
|
|
|
+ components: {
|
|
|
|
|
+ IbpsMoreSearch,
|
|
|
|
|
+ IbpsTypeTree,
|
|
|
|
|
+ IbpsAvatar,
|
|
|
|
|
+ IbpsToolbar,
|
|
|
|
|
+ IbpsListResultPage,
|
|
|
|
|
+ IbpsBpmnFormrenderDialog,
|
|
|
|
|
+ examPop,
|
|
|
|
|
+ examDetail
|
|
|
|
|
+ },
|
|
|
|
|
+ mixins: [random, bpmnStatus],
|
|
|
|
|
+ data() {
|
|
|
|
|
+ const { userId, userList = [], deptList = [], menus, userInfo } = this.$store.getters
|
|
|
|
|
+ return {
|
|
|
|
|
+ tabActive: 0,
|
|
|
|
|
+ tabDatas: [{
|
|
|
|
|
+ name: 0,
|
|
|
|
|
+ title: '待考'
|
|
|
|
|
+ }, {
|
|
|
|
|
+ name: 1,
|
|
|
|
|
+ title: '已考'
|
|
|
|
|
+ }],
|
|
|
|
|
+ id: '',
|
|
|
|
|
+ listExam: [],
|
|
|
|
|
+ dataList: [],
|
|
|
|
|
+ paperList: [],
|
|
|
|
|
+ detailData: '',
|
|
|
|
|
+ paperData: [],
|
|
|
|
|
+ showPaperId: '',
|
|
|
|
|
+ userId: userId,
|
|
|
|
|
+ footText: false,
|
|
|
|
|
+ showPop: false,
|
|
|
|
|
+ examDetail: false,
|
|
|
|
|
+ noData: false,
|
|
|
|
|
+ showConfirmationBoxList: true,
|
|
|
|
|
+ countTotal: {},
|
|
|
|
|
+ examPopup: '',
|
|
|
|
|
+ ReachBottomShow: false,
|
|
|
|
|
+ moreSearchPopup: false,
|
|
|
|
|
+ id1: '',
|
|
|
|
|
+ searchForms: {
|
|
|
|
|
+ forms: [
|
|
|
|
|
+ // { prop: 'Q^examName_^SL', label: '考试名称', fieldType: 'text' },
|
|
|
|
|
+ // { prop: 'Q^bankName^SL', label: '题库名称', fieldType: 'text' },
|
|
|
|
|
+ { prop: 'examName', label: '考试名称', fieldType: 'text' },
|
|
|
|
|
+ { prop: 'bankName', label: '题库名称', fieldType: 'text' },
|
|
|
|
|
+ {
|
|
|
|
|
+ prop: 'examType', label: '考试类型', fieldType: 'checker', cols: 2, valueKey: 'value', options: [
|
|
|
|
|
+ { value: 'trainingExam', label: '培训考试' },
|
|
|
|
|
+ { value: 'POCTtraining', label: 'POCT培训' },
|
|
|
|
|
+ { value: 'selfAssessment', label: '自主考核' },
|
|
|
|
|
+ { value: 'routine', label: '常规' }
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ { prop: ['startDateDL', 'startDateDG'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
|
|
|
|
|
+ { prop: ['limitDateDL', 'limitDateDG'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
|
|
|
|
|
+ // { prop: ['Q^startDate^DL^yyyy-MM-dd', 'Q^startDate^DG^yyyy-MM-dd'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
|
|
|
|
|
+ // { prop: ['Q^limitDate^DL^yyyy-MM-dd', 'Q^limitDate^DG^yyyy-MM-dd'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
|
|
|
|
|
+ ]
|
|
|
|
|
+ },
|
|
|
|
|
+ // './views/platform/bpmn/communication/communicationList
|
|
|
|
|
+ mainActions: [{
|
|
|
|
|
+ 'name': this.$t('common.button.remove'),
|
|
|
|
|
+ 'type': 'danger',
|
|
|
|
|
+ 'callback': this.onRemove
|
|
|
|
|
+ }],
|
|
|
|
|
+ stateActive: false,
|
|
|
|
|
+ subject: '',
|
|
|
|
|
+ moreSubject: '',
|
|
|
|
|
+ subjectTitle: '',
|
|
|
|
|
+ typeId: '',
|
|
|
|
|
+ moreParams: {},
|
|
|
|
|
+ listData: [],
|
|
|
|
|
+ pagination: {},
|
|
|
|
|
+ sorts: {},
|
|
|
|
|
|
|
|
- loading: false,
|
|
|
|
|
- finished: false,
|
|
|
|
|
- refreshing: false,
|
|
|
|
|
- resultType: 'init',
|
|
|
|
|
- errorType: null,
|
|
|
|
|
- resultMessage: null,
|
|
|
|
|
-
|
|
|
|
|
- checkMode: false,
|
|
|
|
|
- checkedIds: [],
|
|
|
|
|
- proInstId: '',
|
|
|
|
|
- defId: '',
|
|
|
|
|
- formrenderVisible: false,
|
|
|
|
|
- formrenderTitle: '',
|
|
|
|
|
- typeTreePopup: false,
|
|
|
|
|
- keyword: '',
|
|
|
|
|
- name: '全部',
|
|
|
|
|
- current: 0,
|
|
|
|
|
- startTime: [],
|
|
|
|
|
- endTime: []
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- computed: {
|
|
|
|
|
- ...mapState('ibps/user', [
|
|
|
|
|
- 'info'
|
|
|
|
|
- ]),
|
|
|
|
|
- rightText() {
|
|
|
|
|
- return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
|
|
|
|
|
- },
|
|
|
|
|
- selectedIds() {
|
|
|
|
|
- return this.checkedIds.join(',')
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ loading: false,
|
|
|
|
|
+ finished: false,
|
|
|
|
|
+ refreshing: false,
|
|
|
|
|
+ resultType: 'init',
|
|
|
|
|
+ errorType: null,
|
|
|
|
|
+ resultMessage: null,
|
|
|
|
|
|
|
|
- beforeRouteLeave(to, from, next) {
|
|
|
|
|
- if (this.showPop === true) {
|
|
|
|
|
- // this.showConfirmationBoxList = true
|
|
|
|
|
- this.$refs.childPop.parentSubmit()
|
|
|
|
|
- this.showPop = false
|
|
|
|
|
- next(false)
|
|
|
|
|
- } else {
|
|
|
|
|
- next()
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ checkMode: false,
|
|
|
|
|
+ checkedIds: [],
|
|
|
|
|
+ proInstId: '',
|
|
|
|
|
+ defId: '',
|
|
|
|
|
+ formrenderVisible: false,
|
|
|
|
|
+ formrenderTitle: '',
|
|
|
|
|
+ typeTreePopup: false,
|
|
|
|
|
+ keyword: '',
|
|
|
|
|
+ name: '全部',
|
|
|
|
|
+ current: 0,
|
|
|
|
|
+ startTime: [],
|
|
|
|
|
+ endTime: []
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ computed: {
|
|
|
|
|
+ ...mapState('ibps/user', [
|
|
|
|
|
+ 'info'
|
|
|
|
|
+ ]),
|
|
|
|
|
+ rightText() {
|
|
|
|
|
+ return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
|
|
|
},
|
|
},
|
|
|
- methods: {
|
|
|
|
|
- onClickTab(index) {
|
|
|
|
|
- // this.loadData()
|
|
|
|
|
- // 清空查询条件
|
|
|
|
|
- this.subject = ''
|
|
|
|
|
- // this.typeId = ''
|
|
|
|
|
- // this.moreParams = {}
|
|
|
|
|
-
|
|
|
|
|
- this.onSearch()
|
|
|
|
|
- },
|
|
|
|
|
- async onDialogShow(item) {
|
|
|
|
|
- if (this.tabActive === 1) {
|
|
|
|
|
- this.detailData = item
|
|
|
|
|
- const examId = item.examId
|
|
|
|
|
- const examineeId = item.examinee
|
|
|
|
|
- const bankId = item.bankId
|
|
|
|
|
- const param = examId ? `and e.exam_id_ = '${examId}'` : 'and e.exam_id_ is null'
|
|
|
|
|
- const sql = `select e.id_ as dataId, e.exam_id_ as examId, e.kao_shi_ren_ as examinee, e.bu_men_ as dept, e.zhuang_tai_ as status, e.bao_ming_shi_jian as applyTime, e.kai_shi_shi_jian_ as startTime, e.jie_shu_shi_jian_ as endTime, e.ti_ku_zong_fen_ as totalScore, e.de_fen_ as resultScore, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fen_zhi_ as questionScore, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionsType, ed.xuan_xiang_ as options, ed.can_kao_da_an_ as rightKey, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.ping_yue_shi_jian as rateTime, ed.de_fen_ as score, ed.jie_xi_ as analysis, q.ti_ku_ming_cheng_ as paperName, case when e.exam_id_ is not null then ex.da_biao_zhan_bi_ else q.da_biao_zhan_bi_ end as qualifiedRadio, case when e.exam_id_ is not null then ex.ji_fen_fang_shi_ else q.ji_fen_fang_shi_ end as scoringType, case when e.exam_id_ is not null then ex.kao_shi_ming_chen else '自主考核' end as examName, case when e.exam_id_ is not null then ex.xian_kao_shi_jian else '不限' end as limitDate from t_examination e left join t_examination_detail ed on e.id_ = ed.parent_id_ left join t_question_bank q on e.ti_ku_id_ = q.id_ left join t_exams ex on e.exam_id_ = ex.id_ where e.ti_ku_id_ = '${bankId}' ${param} and e.kao_shi_ren_ = '${examineeId}' and (e.zhuang_tai_ = '已完成' or e.zhuang_tai_ = '已交卷') order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题'),applyTime DESC`
|
|
|
|
|
- // return new Promise((resolve, reject) => {
|
|
|
|
|
- this.$common.request('sql', sql).then(res => {
|
|
|
|
|
- const { data = [] } = res.variables || {}
|
|
|
|
|
- if (!data.length) {
|
|
|
|
|
- // this.$message.error('未查询到已提交的考试记录,请先完成考试!')
|
|
|
|
|
- Notify({ type: 'primary', message: '未查询到已提交的考试记录,请先完成考试!' })
|
|
|
|
|
- this.closeDialog()
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- const result = []
|
|
|
|
|
- data.map(item => {
|
|
|
|
|
- // 数据转换
|
|
|
|
|
- if (['单选题', '多选题'].includes(item.questionType)) {
|
|
|
|
|
- item.options = JSON.parse(item.options)
|
|
|
|
|
- item.rightKey = item.questionType === '多选题' ? item.rightKey.split(',') : item.rightKey
|
|
|
|
|
- item.answer = item.questionType === '多选题' ? JSON.parse(item.answer) : item.answer
|
|
|
|
|
- } else if (item.questionType === '填空题') {
|
|
|
|
|
- item.rightKey = item.rightKey ? JSON.parse(item.rightKey) : []
|
|
|
|
|
- item.answer = item.answer ? JSON.parse(item.answer) : Array(item.rightKey.length).fill('')
|
|
|
|
|
- } else if (item.questionType === '简答题') {
|
|
|
|
|
- item.rightKey = [item.rightKey]
|
|
|
|
|
- item.answer = [item.answer]
|
|
|
|
|
- }
|
|
|
|
|
- item.img = item.img ? JSON.parse(item.img) : ''
|
|
|
|
|
|
|
+ selectedIds() {
|
|
|
|
|
+ return this.checkedIds.join(',')
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- // 数据分组
|
|
|
|
|
- const index = result.findIndex(i => i.dataId === item.dataId)
|
|
|
|
|
- if (index === -1) {
|
|
|
|
|
- const { dataId, examinee, dept, status, applyTime, startTime, endTime, qualifiedRadio, paperName, totalScore, resultScore, scoringType } = item || {}
|
|
|
|
|
- result.push({
|
|
|
|
|
- dataId,
|
|
|
|
|
- examinee,
|
|
|
|
|
- dept,
|
|
|
|
|
- status,
|
|
|
|
|
- applyTime,
|
|
|
|
|
- startTime,
|
|
|
|
|
- endTime,
|
|
|
|
|
- qualifiedRadio,
|
|
|
|
|
- isQualified: status === '已完成' ? parseFloat(resultScore) >= (parseFloat(qualifiedRadio) / 100 * parseFloat(totalScore)) : '',
|
|
|
|
|
- paperName,
|
|
|
|
|
- totalScore: parseFloat(totalScore),
|
|
|
|
|
- resultScore: parseFloat(resultScore),
|
|
|
|
|
- // totalCount: data.length,
|
|
|
|
|
- scoringType,
|
|
|
|
|
- list: [{
|
|
|
|
|
- type: item.questionType,
|
|
|
|
|
- questions: [item]
|
|
|
|
|
- }]
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- const qIndex = result[index].list.findIndex(i => i.type === item.questionType)
|
|
|
|
|
- if (qIndex === -1) {
|
|
|
|
|
- result[index].list.push({
|
|
|
|
|
- type: item.questionType,
|
|
|
|
|
- questions: [item]
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- result[index].list[qIndex].questions.push(item)
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- result.forEach(item => {
|
|
|
|
|
- let count = 0
|
|
|
|
|
- item.list.forEach(i => {
|
|
|
|
|
- count += i.questions.length
|
|
|
|
|
- i.totalScore = i.questions.reduce((a, b) => a + parseFloat(b.questionScore), 0)
|
|
|
|
|
- })
|
|
|
|
|
- item.totalCount = count
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
|
|
+ if (this.showPop === true) {
|
|
|
|
|
+ // this.showConfirmationBoxList = true
|
|
|
|
|
+ this.$refs.childPop.parentSubmit()
|
|
|
|
|
+ this.showPop = false
|
|
|
|
|
+ next(false)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ next()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ methods: {
|
|
|
|
|
+ onClickTab(index) {
|
|
|
|
|
+ // this.loadData()
|
|
|
|
|
+ // 清空查询条件
|
|
|
|
|
+ this.subject = ''
|
|
|
|
|
+ // this.typeId = ''
|
|
|
|
|
+ // this.moreParams = {}
|
|
|
|
|
|
|
|
- // 获取最高分最低分
|
|
|
|
|
- const { maxScore, minScore } = result.filter(i => i.status === '已完成').reduce((acc, curr) => {
|
|
|
|
|
- if (curr.resultScore > acc.maxScore) {
|
|
|
|
|
- acc.maxScore = curr.resultScore
|
|
|
|
|
- }
|
|
|
|
|
- if (curr.resultScore < acc.minScore) {
|
|
|
|
|
- acc.minScore = curr.resultScore
|
|
|
|
|
- }
|
|
|
|
|
- return acc
|
|
|
|
|
- }, { maxScore: -Infinity, minScore: Infinity })
|
|
|
|
|
- this.maxScore = maxScore
|
|
|
|
|
- this.minScore = minScore
|
|
|
|
|
- this.listExam = result
|
|
|
|
|
- if (!bankId) {
|
|
|
|
|
- Notify({ type: 'danger', message: '获取题目信息失败,请重试!' })
|
|
|
|
|
- this.closeDetail(false)
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- this.paperList = result
|
|
|
|
|
- this.paperData = this.paperList.find(i => i.dataId === item.paperId) || this.paperList[0]
|
|
|
|
|
- this.showPaperId = this.paperData.dataId
|
|
|
|
|
- const isAllNotFinish = this.paperList.every(item => item.status !== '已完成')
|
|
|
|
|
- if (isAllNotFinish) {
|
|
|
|
|
- Notify({ type: 'warning', message: '考试未完成或未评分,请稍后再试!' })
|
|
|
|
|
- // this.$message.error('考试未完成或未评分,请稍后再试!')
|
|
|
|
|
- this.closeDetail(false)
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- // this.detailData = result.find(item => item.status === '已完成')
|
|
|
|
|
- this.examDetail = true
|
|
|
|
|
- // resolve(result)
|
|
|
|
|
- // }).catch(error => {
|
|
|
|
|
- // reject(error)
|
|
|
|
|
- // })
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- closeDetail(val) {
|
|
|
|
|
- this.examDetail = val
|
|
|
|
|
- if (val) {
|
|
|
|
|
- this.onSearch()
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- // 点击开始考试
|
|
|
|
|
- async onClick(item, index) {
|
|
|
|
|
- this.id1 = item.id_
|
|
|
|
|
- this.examPopup = item
|
|
|
|
|
- this.countTotal = await this.getExamCount(item.examId) || 0
|
|
|
|
|
- if (this.countTotal.count >= parseInt(item.limitCount) && !this.countTotal.notStart) {
|
|
|
|
|
- return Notify({ type: 'primary', message: '本次考试次数已达到上限!' })
|
|
|
|
|
- }
|
|
|
|
|
- this.ReachBottomShow = true
|
|
|
|
|
- },
|
|
|
|
|
- // 考试达标状态
|
|
|
|
|
- examAttainment(data) {
|
|
|
|
|
- const { paperState, submittedCount, totalScore, qualifiedRadio, averageScore, maxScore, recentScore, scoringType } = data
|
|
|
|
|
- // 只要有一次已完成,就是完成
|
|
|
|
|
- if (paperState === '已完成') {
|
|
|
|
|
- // 计算是否达标
|
|
|
|
|
- const passScore = +totalScore * +qualifiedRadio / 100
|
|
|
|
|
- let curScore = null
|
|
|
|
|
- if (scoringType === '平均分') {
|
|
|
|
|
- curScore = +averageScore
|
|
|
|
|
- }
|
|
|
|
|
- if (scoringType === '最高分') {
|
|
|
|
|
- curScore = +maxScore
|
|
|
|
|
- }
|
|
|
|
|
- if (scoringType === '最近得分') {
|
|
|
|
|
- curScore = +recentScore
|
|
|
|
|
- }
|
|
|
|
|
- return curScore >= passScore ? 'passed' : 'failed'
|
|
|
|
|
- // if (curScore >= passScore) {
|
|
|
|
|
- // return `已达标`
|
|
|
|
|
- // }
|
|
|
|
|
- // return `未达标`
|
|
|
|
|
- } else {
|
|
|
|
|
- // 未完成分两种:未开始和待批阅
|
|
|
|
|
- return submittedCount > 0 ? 'pending-review' : ''
|
|
|
|
|
- // if (submittedCount > 0) {
|
|
|
|
|
- // return `待批阅`
|
|
|
|
|
- // }
|
|
|
|
|
- // return '/'
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- examAttainmentText(data) {
|
|
|
|
|
- const { paperState, submittedCount, totalScore, qualifiedRadio, averageScore, maxScore, recentScore, scoringType } = data
|
|
|
|
|
- // 只要有一次已完成,就是完成
|
|
|
|
|
- if (paperState === '已完成') {
|
|
|
|
|
- // 计算是否达标
|
|
|
|
|
- const passScore = +totalScore * +qualifiedRadio / 100
|
|
|
|
|
- let curScore = null
|
|
|
|
|
- if (scoringType === '平均分') {
|
|
|
|
|
- curScore = +averageScore
|
|
|
|
|
- }
|
|
|
|
|
- if (scoringType === '最高分') {
|
|
|
|
|
- curScore = +maxScore
|
|
|
|
|
- }
|
|
|
|
|
- if (scoringType === '最近得分') {
|
|
|
|
|
- curScore = +recentScore
|
|
|
|
|
- }
|
|
|
|
|
- if (curScore >= passScore) {
|
|
|
|
|
- return `已达标`
|
|
|
|
|
- }
|
|
|
|
|
- return `未达标`
|
|
|
|
|
- } else {
|
|
|
|
|
- // 未完成分两种:未开始和待批阅
|
|
|
|
|
- if (submittedCount > 0) {
|
|
|
|
|
- return `待批阅`
|
|
|
|
|
- }
|
|
|
|
|
- return '/'
|
|
|
|
|
|
|
+ this.onSearch()
|
|
|
|
|
+ },
|
|
|
|
|
+ async onDialogShow(item) {
|
|
|
|
|
+ if (this.tabActive === 1) {
|
|
|
|
|
+ this.detailData = item
|
|
|
|
|
+ const examId = item.examId
|
|
|
|
|
+ const examineeId = item.examinee
|
|
|
|
|
+ const bankId = item.bankId
|
|
|
|
|
+ const param = examId ? `and e.exam_id_ = '${examId}'` : 'and e.exam_id_ is null'
|
|
|
|
|
+ const sql = `select e.id_ as dataId, e.exam_id_ as examId, e.kao_shi_ren_ as examinee,ed.nan_du_+0 as rate,ed.da_an_jie_xi_ as resolution, e.bu_men_ as dept, e.zhuang_tai_ as status, e.bao_ming_shi_jian as applyTime, e.kai_shi_shi_jian_ as startTime, e.jie_shu_shi_jian_ as endTime, e.ti_ku_zong_fen_ as totalScore, e.de_fen_ as resultScore, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fen_zhi_ as questionScore, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionsType, ed.xuan_xiang_ as options, ed.can_kao_da_an_ as rightKey, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.ping_yue_shi_jian as rateTime, ed.de_fen_ as score, ed.jie_xi_ as analysis, q.ti_ku_ming_cheng_ as paperName, case when e.exam_id_ is not null then ex.da_biao_zhan_bi_ else q.da_biao_zhan_bi_ end as qualifiedRadio, case when e.exam_id_ is not null then ex.ji_fen_fang_shi_ else q.ji_fen_fang_shi_ end as scoringType, case when e.exam_id_ is not null then ex.kao_shi_ming_chen else '自主考核' end as examName, case when e.exam_id_ is not null then ex.xian_kao_shi_jian else '不限' end as limitDate from t_examination e left join t_examination_detail ed on e.id_ = ed.parent_id_ left join t_question_bank q on e.ti_ku_id_ = q.id_ left join t_exams ex on e.exam_id_ = ex.id_ where e.ti_ku_id_ = '${bankId}' ${param} and e.kao_shi_ren_ = '${examineeId}' and (e.zhuang_tai_ = '已完成' or e.zhuang_tai_ = '已交卷') order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题'),applyTime DESC`
|
|
|
|
|
+ // return new Promise((resolve, reject) => {
|
|
|
|
|
+ this.$common.request('sql', sql).then(res => {
|
|
|
|
|
+ const { data = [] } = res.variables || {}
|
|
|
|
|
+ if (!data.length) {
|
|
|
|
|
+ // this.$message.error('未查询到已提交的考试记录,请先完成考试!')
|
|
|
|
|
+ Notify({ type: 'primary', message: '未查询到已提交的考试记录,请先完成考试!' })
|
|
|
|
|
+ this.closeDialog()
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ const result = []
|
|
|
|
|
+ data.map(item => {
|
|
|
|
|
+ // 数据转换
|
|
|
|
|
+ if (['单选题', '多选题'].includes(item.questionType)) {
|
|
|
|
|
+ item.options = JSON.parse(item.options)
|
|
|
|
|
+ item.rightKey = item.questionType === '多选题' ? item.rightKey.split(',') : item.rightKey
|
|
|
|
|
+ item.answer = item.questionType === '多选题' ? JSON.parse(item.answer) : item.answer
|
|
|
|
|
+ } else if (item.questionType === '填空题') {
|
|
|
|
|
+ item.rightKey = item.rightKey ? JSON.parse(item.rightKey) : []
|
|
|
|
|
+ item.answer = item.answer ? JSON.parse(item.answer) : Array(item.rightKey.length).fill('')
|
|
|
|
|
+ } else if (item.questionType === '简答题') {
|
|
|
|
|
+ item.rightKey = [item.rightKey]
|
|
|
|
|
+ item.answer = [item.answer]
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
|
|
+ item.img = item.img ? JSON.parse(item.img) : ''
|
|
|
|
|
|
|
|
- showPopup() {
|
|
|
|
|
- this.ReachBottomShow = true
|
|
|
|
|
- },
|
|
|
|
|
- onClose() {
|
|
|
|
|
- this.ReachBottomShow = false
|
|
|
|
|
- },
|
|
|
|
|
- // 点击确定进入考试界面
|
|
|
|
|
- async changeShowPop(item) {
|
|
|
|
|
- this.countTotal = await this.getExamCount(item.examId) || 0
|
|
|
|
|
- if (this.countTotal.count >= parseInt(item.limitCount) && !this.countTotal.notStart) {
|
|
|
|
|
- return Notify({ type: 'primary', message: '本次考试次数已达到上限!' })
|
|
|
|
|
- }
|
|
|
|
|
- this.ReachBottomShow = false
|
|
|
|
|
- if (this.countTotal.notStart && this.examPopup.bankId !== '') {
|
|
|
|
|
- // 已有未开始的试卷 更新开始时间
|
|
|
|
|
- const updataParams = {
|
|
|
|
|
- tableName: 't_examination',
|
|
|
|
|
- updList: [{
|
|
|
|
|
- where: {
|
|
|
|
|
- id_: this.countTotal.notStart
|
|
|
|
|
- },
|
|
|
|
|
- param: {
|
|
|
|
|
- zhuang_tai_: '进行中',
|
|
|
|
|
- kai_shi_shi_jian_: this.$common.getDateNow(19)
|
|
|
|
|
- }
|
|
|
|
|
- }]
|
|
|
|
|
- }
|
|
|
|
|
- this.$common.request('update', updataParams).then(() => {
|
|
|
|
|
- // 2024-9-26
|
|
|
|
|
- this.id = this.countTotal.notStart
|
|
|
|
|
- this.showPop = true
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ // 数据分组
|
|
|
|
|
+ const index = result.findIndex(i => i.dataId === item.dataId)
|
|
|
|
|
+ if (index === -1) {
|
|
|
|
|
+ const { dataId, examinee, dept, status, applyTime, startTime, endTime, qualifiedRadio, paperName, totalScore, resultScore, scoringType } = item || {}
|
|
|
|
|
+ result.push({
|
|
|
|
|
+ dataId,
|
|
|
|
|
+ examinee,
|
|
|
|
|
+ dept,
|
|
|
|
|
+ status,
|
|
|
|
|
+ applyTime,
|
|
|
|
|
+ startTime,
|
|
|
|
|
+ endTime,
|
|
|
|
|
+ qualifiedRadio,
|
|
|
|
|
+ isQualified: status === '已完成' ? parseFloat(resultScore) >= (parseFloat(qualifiedRadio) / 100 * parseFloat(totalScore)) : '',
|
|
|
|
|
+ paperName,
|
|
|
|
|
+ totalScore: parseFloat(totalScore),
|
|
|
|
|
+ resultScore: parseFloat(resultScore),
|
|
|
|
|
+ // totalCount: data.length,
|
|
|
|
|
+ scoringType,
|
|
|
|
|
+ list: [{
|
|
|
|
|
+ type: item.questionType,
|
|
|
|
|
+ questions: [item]
|
|
|
|
|
+ }]
|
|
|
|
|
+ })
|
|
|
} else {
|
|
} else {
|
|
|
- // 无未开始试卷
|
|
|
|
|
- const mid = this.examPopup
|
|
|
|
|
- this.createPaper({ ...mid }, this.info)
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
-
|
|
|
|
|
- async getExamCount(id) {
|
|
|
|
|
- const param = id ? `exam_id_ = '${id}'` : 'exam_id_ is null'
|
|
|
|
|
- const sql = `select id_, zhuang_tai_ from t_examination where ${param} and kao_shi_ren_ = '${this.userId}' and zhuang_tai_ != '已取消' order by bao_ming_shi_jian asc`
|
|
|
|
|
- return new Promise((resolve, reject) => {
|
|
|
|
|
- this.$common.request('sql', sql).then(res => {
|
|
|
|
|
- const { data = [] } = res.variables || {}
|
|
|
|
|
- const temp = data.find(item => item.zhuang_tai_ === '未开始')
|
|
|
|
|
- resolve({
|
|
|
|
|
- count: data.length,
|
|
|
|
|
- notStart: temp ? temp.id_ : ''
|
|
|
|
|
- })
|
|
|
|
|
- }).catch(error => {
|
|
|
|
|
- reject(error)
|
|
|
|
|
|
|
+ const qIndex = result[index].list.findIndex(i => i.type === item.questionType)
|
|
|
|
|
+ if (qIndex === -1) {
|
|
|
|
|
+ result[index].list.push({
|
|
|
|
|
+ type: item.questionType,
|
|
|
|
|
+ questions: [item]
|
|
|
})
|
|
})
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 当没有未开始的时候创建一条未开始数据
|
|
|
|
|
- createPaper(data, examinees) {
|
|
|
|
|
- const that = this
|
|
|
|
|
- // const { first, second } = uni.getStorageSync('level') || {}
|
|
|
|
|
- const { first = '', second = '' } = this.$store.getters.level
|
|
|
|
|
- const { examId, bankId, examName, questionCount, totalScore, duration, qualifiedRadio, limitDate, limitCount } = data || {}
|
|
|
|
|
- const examineeList = examinees.user.id.split(',')
|
|
|
|
|
- const time = this.$common.getDateNow(19)
|
|
|
|
|
- const paramWhere = examineeList.map(i => ({
|
|
|
|
|
- exam_id_: examId,
|
|
|
|
|
- ti_ku_id_: bankId,
|
|
|
|
|
- di_dian_: second || first,
|
|
|
|
|
- kao_shi_ren_: i,
|
|
|
|
|
- bu_men_: '',
|
|
|
|
|
- bao_ming_shi_jian: time,
|
|
|
|
|
- kai_shi_shi_jian_: time,
|
|
|
|
|
- ti_ku_zong_fen_: totalScore,
|
|
|
|
|
- zhuang_tai_: '未开始',
|
|
|
|
|
- sheng_yu_shi_chan: duration,
|
|
|
|
|
- da_biao_zhan_bi_: qualifiedRadio
|
|
|
|
|
- }))
|
|
|
|
|
- const addParams = {
|
|
|
|
|
- tableName: 't_examination',
|
|
|
|
|
- paramWhere
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ result[index].list[qIndex].questions.push(item)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ })
|
|
|
|
|
+ result.forEach(item => {
|
|
|
|
|
+ let count = 0
|
|
|
|
|
+ item.list.forEach(i => {
|
|
|
|
|
+ count += i.questions.length
|
|
|
|
|
+ i.totalScore = i.questions.reduce((a, b) => a + parseFloat(b.questionScore), 0)
|
|
|
|
|
+ })
|
|
|
|
|
+ item.totalCount = count
|
|
|
|
|
+ })
|
|
|
|
|
|
|
|
- if (that.examPopup.bankId !== '') {
|
|
|
|
|
- that.$common.request('add', addParams).then(res => {
|
|
|
|
|
- const { cont } = res.variables || {}
|
|
|
|
|
- if (cont.length) {
|
|
|
|
|
- // 2024-9-26
|
|
|
|
|
- this.id = cont[0].id_
|
|
|
|
|
- that.showPop = true
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- updataSet(v) {
|
|
|
|
|
- this.showPop = v
|
|
|
|
|
- this.onRefresh()
|
|
|
|
|
- },
|
|
|
|
|
- generateTitle(name, title) { // generateTitle by vue-i18n
|
|
|
|
|
- return i18n.generateTitle(name, title)
|
|
|
|
|
- },
|
|
|
|
|
- toCheckMode() {
|
|
|
|
|
- if (this.$utils.isEmpty(this.listData)) {
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
- if (this.checkMode) {
|
|
|
|
|
- // this.show = true
|
|
|
|
|
- this.checkedIds = []
|
|
|
|
|
|
|
+ // 获取最高分最低分
|
|
|
|
|
+ const { maxScore, minScore } = result.filter(i => i.status === '已完成').reduce((acc, curr) => {
|
|
|
|
|
+ if (curr.resultScore > acc.maxScore) {
|
|
|
|
|
+ acc.maxScore = curr.resultScore
|
|
|
}
|
|
}
|
|
|
- this.checkMode = !this.checkMode
|
|
|
|
|
- },
|
|
|
|
|
- clickType() {
|
|
|
|
|
- this.typeTreePopup = true
|
|
|
|
|
- },
|
|
|
|
|
- onSearch() {
|
|
|
|
|
- this.stateActive = false
|
|
|
|
|
- ActionUtils.initListData(this)
|
|
|
|
|
- this.current = 0
|
|
|
|
|
- this.listData = []
|
|
|
|
|
- this.loadData()
|
|
|
|
|
- },
|
|
|
|
|
- clickMoreSearch() {
|
|
|
|
|
- this.moreSearchPopup = true
|
|
|
|
|
- this.stateActive = false
|
|
|
|
|
- },
|
|
|
|
|
- clickTypeNode(data) {
|
|
|
|
|
- this.typeId = data.id
|
|
|
|
|
- this.onMoreSearch({})
|
|
|
|
|
- },
|
|
|
|
|
- // 高级查询
|
|
|
|
|
- onMoreSearch(params) {
|
|
|
|
|
- if (this.$utils.isNotEmpty(this.typeId)) {
|
|
|
|
|
- params['Q^type_id_^SL'] = this.typeId
|
|
|
|
|
|
|
+ if (curr.resultScore < acc.minScore) {
|
|
|
|
|
+ acc.minScore = curr.resultScore
|
|
|
}
|
|
}
|
|
|
- this.moreParams = params
|
|
|
|
|
- this.onSearch()
|
|
|
|
|
- if (this.$utils.isNotEmpty(params)) {
|
|
|
|
|
- this.stateActive = true
|
|
|
|
|
|
|
+ return acc
|
|
|
|
|
+ }, { maxScore: -Infinity, minScore: Infinity })
|
|
|
|
|
+ this.maxScore = maxScore
|
|
|
|
|
+ this.minScore = minScore
|
|
|
|
|
+ this.listExam = result
|
|
|
|
|
+ if (!bankId) {
|
|
|
|
|
+ Notify({ type: 'danger', message: '获取题目信息失败,请重试!' })
|
|
|
|
|
+ this.closeDetail(false)
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.paperList = result
|
|
|
|
|
+ this.paperData = this.paperList.find(i => i.dataId === item.paperId) || this.paperList[0]
|
|
|
|
|
+ this.showPaperId = this.paperData.dataId
|
|
|
|
|
+ const isAllNotFinish = this.paperList.every(item => item.status !== '已完成')
|
|
|
|
|
+ if (isAllNotFinish) {
|
|
|
|
|
+ Notify({ type: 'warning', message: '考试未完成或未评分,请稍后再试!' })
|
|
|
|
|
+ // this.$message.error('考试未完成或未评分,请稍后再试!')
|
|
|
|
|
+ this.closeDetail(false)
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ // this.detailData = result.find(item => item.status === '已完成')
|
|
|
|
|
+ this.examDetail = true
|
|
|
|
|
+ // resolve(result)
|
|
|
|
|
+ // }).catch(error => {
|
|
|
|
|
+ // reject(error)
|
|
|
|
|
+ // })
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ closeDetail(val) {
|
|
|
|
|
+ this.examDetail = val
|
|
|
|
|
+ if (val) {
|
|
|
|
|
+ this.onSearch()
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 点击开始考试
|
|
|
|
|
+ async onClick(item, index) {
|
|
|
|
|
+ this.id1 = item.id_
|
|
|
|
|
+ this.examPopup = item
|
|
|
|
|
+ this.countTotal = await this.getExamCount(item.examId) || 0
|
|
|
|
|
+ if (this.countTotal.count >= parseInt(item.limitCount) && !this.countTotal.notStart) {
|
|
|
|
|
+ return Notify({ type: 'primary', message: '本次考试次数已达到上限!' })
|
|
|
|
|
+ }
|
|
|
|
|
+ this.ReachBottomShow = true
|
|
|
|
|
+ },
|
|
|
|
|
+ // 考试达标状态
|
|
|
|
|
+ examAttainment(data) {
|
|
|
|
|
+ const { paperState, submittedCount, totalScore, qualifiedRadio, averageScore, maxScore, recentScore, scoringType } = data
|
|
|
|
|
+ // 只要有一次已完成,就是完成
|
|
|
|
|
+ if (paperState === '已完成') {
|
|
|
|
|
+ // 计算是否达标
|
|
|
|
|
+ const passScore = +totalScore * +qualifiedRadio / 100
|
|
|
|
|
+ let curScore = null
|
|
|
|
|
+ if (scoringType === '平均分') {
|
|
|
|
|
+ curScore = +averageScore
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoringType === '最高分') {
|
|
|
|
|
+ curScore = +maxScore
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoringType === '最近得分') {
|
|
|
|
|
+ curScore = +recentScore
|
|
|
|
|
+ }
|
|
|
|
|
+ return curScore >= passScore ? 'passed' : 'failed'
|
|
|
|
|
+ // if (curScore >= passScore) {
|
|
|
|
|
+ // return `已达标`
|
|
|
|
|
+ // }
|
|
|
|
|
+ // return `未达标`
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 未完成分两种:未开始和待批阅
|
|
|
|
|
+ return submittedCount > 0 ? 'pending-review' : ''
|
|
|
|
|
+ // if (submittedCount > 0) {
|
|
|
|
|
+ // return `待批阅`
|
|
|
|
|
+ // }
|
|
|
|
|
+ // return '/'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ examAttainmentText(data) {
|
|
|
|
|
+ const { paperState, submittedCount, totalScore, qualifiedRadio, averageScore, maxScore, recentScore, scoringType } = data
|
|
|
|
|
+ // 只要有一次已完成,就是完成
|
|
|
|
|
+ if (paperState === '已完成') {
|
|
|
|
|
+ // 计算是否达标
|
|
|
|
|
+ const passScore = +totalScore * +qualifiedRadio / 100
|
|
|
|
|
+ let curScore = null
|
|
|
|
|
+ if (scoringType === '平均分') {
|
|
|
|
|
+ curScore = +averageScore
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoringType === '最高分') {
|
|
|
|
|
+ curScore = +maxScore
|
|
|
|
|
+ }
|
|
|
|
|
+ if (scoringType === '最近得分') {
|
|
|
|
|
+ curScore = +recentScore
|
|
|
|
|
+ }
|
|
|
|
|
+ if (curScore >= passScore) {
|
|
|
|
|
+ return `已达标`
|
|
|
|
|
+ }
|
|
|
|
|
+ return `未达标`
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 未完成分两种:未开始和待批阅
|
|
|
|
|
+ if (submittedCount > 0) {
|
|
|
|
|
+ return `待批阅`
|
|
|
|
|
+ }
|
|
|
|
|
+ return '/'
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ showPopup() {
|
|
|
|
|
+ this.ReachBottomShow = true
|
|
|
|
|
+ },
|
|
|
|
|
+ onClose() {
|
|
|
|
|
+ this.ReachBottomShow = false
|
|
|
|
|
+ },
|
|
|
|
|
+ // 点击确定进入考试界面
|
|
|
|
|
+ async changeShowPop(item) {
|
|
|
|
|
+ this.countTotal = await this.getExamCount(item.examId) || 0
|
|
|
|
|
+ if (this.countTotal.count >= parseInt(item.limitCount) && !this.countTotal.notStart) {
|
|
|
|
|
+ return Notify({ type: 'primary', message: '本次考试次数已达到上限!' })
|
|
|
|
|
+ }
|
|
|
|
|
+ this.ReachBottomShow = false
|
|
|
|
|
+ if (this.countTotal.notStart && this.examPopup.bankId !== '') {
|
|
|
|
|
+ // 已有未开始的试卷 更新开始时间
|
|
|
|
|
+ const updataParams = {
|
|
|
|
|
+ tableName: 't_examination',
|
|
|
|
|
+ updList: [{
|
|
|
|
|
+ where: {
|
|
|
|
|
+ id_: this.countTotal.notStart
|
|
|
|
|
+ },
|
|
|
|
|
+ param: {
|
|
|
|
|
+ zhuang_tai_: '进行中',
|
|
|
|
|
+ kai_shi_shi_jian_: this.$common.getDateNow(19)
|
|
|
}
|
|
}
|
|
|
- },
|
|
|
|
|
- resetForm() {
|
|
|
|
|
- this.typeId = ''
|
|
|
|
|
- this.name = ''
|
|
|
|
|
- this.moreSubject = ''
|
|
|
|
|
- this.moreParams = {}
|
|
|
|
|
- },
|
|
|
|
|
- // 下拉刷新
|
|
|
|
|
- onRefresh() {
|
|
|
|
|
- this.footText = false
|
|
|
|
|
- this.noData = false
|
|
|
|
|
- this.refreshing = true
|
|
|
|
|
- this.finished = false
|
|
|
|
|
- this.loading = true
|
|
|
|
|
- this.onSearch()
|
|
|
|
|
- },
|
|
|
|
|
- onRefreshPage() {
|
|
|
|
|
- this.checkedIds = []
|
|
|
|
|
- this.checkMode = false
|
|
|
|
|
- this.onRefresh()
|
|
|
|
|
- },
|
|
|
|
|
- searchGao() {
|
|
|
|
|
|
|
+ }]
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$common.request('update', updataParams).then(() => {
|
|
|
|
|
+ // 2024-9-26
|
|
|
|
|
+ this.id = this.countTotal.notStart
|
|
|
|
|
+ this.showPop = true
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 无未开始试卷
|
|
|
|
|
+ const mid = this.examPopup
|
|
|
|
|
+ this.createPaper({ ...mid }, this.info)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+ async getExamCount(id) {
|
|
|
|
|
+ const param = id ? `exam_id_ = '${id}'` : 'exam_id_ is null'
|
|
|
|
|
+ const sql = `select id_, zhuang_tai_ from t_examination where ${param} and kao_shi_ren_ = '${this.userId}' and zhuang_tai_ != '已取消' order by bao_ming_shi_jian asc`
|
|
|
|
|
+ return new Promise((resolve, reject) => {
|
|
|
|
|
+ this.$common.request('sql', sql).then(res => {
|
|
|
|
|
+ const { data = [] } = res.variables || {}
|
|
|
|
|
+ const temp = data.find(item => item.zhuang_tai_ === '未开始')
|
|
|
|
|
+ resolve({
|
|
|
|
|
+ count: data.length,
|
|
|
|
|
+ notStart: temp ? temp.id_ : ''
|
|
|
|
|
+ })
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ reject(error)
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 当没有未开始的时候创建一条未开始数据
|
|
|
|
|
+ createPaper(data, examinees) {
|
|
|
|
|
+ const that = this
|
|
|
|
|
+ // const { first, second } = uni.getStorageSync('level') || {}
|
|
|
|
|
+ const { first = '', second = '' } = this.$store.getters.level
|
|
|
|
|
+ const { examId, bankId, examName, questionCount, totalScore, duration, qualifiedRadio, limitDate, limitCount } = data || {}
|
|
|
|
|
+ const examineeList = examinees.user.id.split(',')
|
|
|
|
|
+ const time = this.$common.getDateNow(19)
|
|
|
|
|
+ const paramWhere = examineeList.map(i => ({
|
|
|
|
|
+ exam_id_: examId,
|
|
|
|
|
+ ti_ku_id_: bankId,
|
|
|
|
|
+ di_dian_: second || first,
|
|
|
|
|
+ kao_shi_ren_: i,
|
|
|
|
|
+ bu_men_: '',
|
|
|
|
|
+ bao_ming_shi_jian: time,
|
|
|
|
|
+ kai_shi_shi_jian_: time,
|
|
|
|
|
+ ti_ku_zong_fen_: totalScore,
|
|
|
|
|
+ zhuang_tai_: '未开始',
|
|
|
|
|
+ sheng_yu_shi_chan: duration,
|
|
|
|
|
+ da_biao_zhan_bi_: qualifiedRadio
|
|
|
|
|
+ }))
|
|
|
|
|
+ const addParams = {
|
|
|
|
|
+ tableName: 't_examination',
|
|
|
|
|
+ paramWhere
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (that.examPopup.bankId !== '') {
|
|
|
|
|
+ that.$common.request('add', addParams).then(res => {
|
|
|
|
|
+ const { cont } = res.variables || {}
|
|
|
|
|
+ if (cont.length) {
|
|
|
|
|
+ // 2024-9-26
|
|
|
|
|
+ this.id = cont[0].id_
|
|
|
|
|
+ that.showPop = true
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ updataSet(v) {
|
|
|
|
|
+ this.showPop = v
|
|
|
|
|
+ this.onRefresh()
|
|
|
|
|
+ },
|
|
|
|
|
+ generateTitle(name, title) { // generateTitle by vue-i18n
|
|
|
|
|
+ return i18n.generateTitle(name, title)
|
|
|
|
|
+ },
|
|
|
|
|
+ toCheckMode() {
|
|
|
|
|
+ if (this.$utils.isEmpty(this.listData)) {
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.checkMode) {
|
|
|
|
|
+ // this.show = true
|
|
|
|
|
+ this.checkedIds = []
|
|
|
|
|
+ }
|
|
|
|
|
+ this.checkMode = !this.checkMode
|
|
|
|
|
+ },
|
|
|
|
|
+ clickType() {
|
|
|
|
|
+ this.typeTreePopup = true
|
|
|
|
|
+ },
|
|
|
|
|
+ onSearch() {
|
|
|
|
|
+ this.stateActive = false
|
|
|
|
|
+ ActionUtils.initListData(this)
|
|
|
|
|
+ this.current = 0
|
|
|
|
|
+ this.listData = []
|
|
|
|
|
+ this.loadData()
|
|
|
|
|
+ },
|
|
|
|
|
+ clickMoreSearch() {
|
|
|
|
|
+ this.moreSearchPopup = true
|
|
|
|
|
+ this.stateActive = false
|
|
|
|
|
+ },
|
|
|
|
|
+ clickTypeNode(data) {
|
|
|
|
|
+ this.typeId = data.id
|
|
|
|
|
+ this.onMoreSearch({})
|
|
|
|
|
+ },
|
|
|
|
|
+ // 高级查询
|
|
|
|
|
+ onMoreSearch(params) {
|
|
|
|
|
+ if (this.$utils.isNotEmpty(this.typeId)) {
|
|
|
|
|
+ params['Q^type_id_^SL'] = this.typeId
|
|
|
|
|
+ }
|
|
|
|
|
+ this.moreParams = params
|
|
|
|
|
+ this.onSearch()
|
|
|
|
|
+ if (this.$utils.isNotEmpty(params)) {
|
|
|
|
|
+ this.stateActive = true
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ resetForm() {
|
|
|
|
|
+ this.typeId = ''
|
|
|
|
|
+ this.name = ''
|
|
|
|
|
+ this.moreSubject = ''
|
|
|
|
|
+ this.moreParams = {}
|
|
|
|
|
+ },
|
|
|
|
|
+ // 下拉刷新
|
|
|
|
|
+ onRefresh() {
|
|
|
|
|
+ this.footText = false
|
|
|
|
|
+ this.noData = false
|
|
|
|
|
+ this.refreshing = true
|
|
|
|
|
+ this.finished = false
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ this.onSearch()
|
|
|
|
|
+ },
|
|
|
|
|
+ onRefreshPage() {
|
|
|
|
|
+ this.checkedIds = []
|
|
|
|
|
+ this.checkMode = false
|
|
|
|
|
+ this.onRefresh()
|
|
|
|
|
+ },
|
|
|
|
|
+ searchGao() {
|
|
|
|
|
|
|
|
- },
|
|
|
|
|
- /**
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
* 加载数据
|
|
* 加载数据
|
|
|
*/
|
|
*/
|
|
|
- loadData() {
|
|
|
|
|
- this.loading = true
|
|
|
|
|
- this.noData = false
|
|
|
|
|
- this.footText = false
|
|
|
|
|
- let page = 0
|
|
|
|
|
- if (this.current === 0) {
|
|
|
|
|
- page = 0
|
|
|
|
|
- } else {
|
|
|
|
|
- page = this.current * 10
|
|
|
|
|
- }
|
|
|
|
|
- const aa = JSON.parse(JSON.stringify(this.moreParams))
|
|
|
|
|
- let canshu3 = ''
|
|
|
|
|
- let canshu4 = ''
|
|
|
|
|
- if ((aa !== '' && aa !== null && aa !== undefined && (typeof aa !== 'object' || Object.keys(aa).length > 0)) ||
|
|
|
|
|
|
|
+ loadData() {
|
|
|
|
|
+ this.loading = true
|
|
|
|
|
+ this.noData = false
|
|
|
|
|
+ this.footText = false
|
|
|
|
|
+ let page = 0
|
|
|
|
|
+ if (this.current === 0) {
|
|
|
|
|
+ page = 0
|
|
|
|
|
+ } else {
|
|
|
|
|
+ page = this.current * 10
|
|
|
|
|
+ }
|
|
|
|
|
+ const aa = JSON.parse(JSON.stringify(this.moreParams))
|
|
|
|
|
+ let canshu3 = ''
|
|
|
|
|
+ let canshu4 = ''
|
|
|
|
|
+ if ((aa !== '' && aa !== null && aa !== undefined && (typeof aa !== 'object' || Object.keys(aa).length > 0)) ||
|
|
|
(aa instanceof Array && aa.length > 0)) {
|
|
(aa instanceof Array && aa.length > 0)) {
|
|
|
- if (aa.examName !== '' && aa.examName !== undefined && aa.examName !== null) {
|
|
|
|
|
- this.moreSubject = aa.examName
|
|
|
|
|
- }
|
|
|
|
|
- if (aa.bankName !== '' && aa.bankName !== undefined && aa.bankName !== null) {
|
|
|
|
|
- this.subjectTitle = aa.bankName
|
|
|
|
|
- }
|
|
|
|
|
- if (aa.examType !== '' && aa.examType !== undefined && aa.examType !== null) {
|
|
|
|
|
- this.name = aa.examType === 'trainingExam' ? '培训考试' : aa.examType === 'POCTtraining' ? 'POCT培训' : aa.examType === 'selfAssessment' ? '自主考核' : aa.examType === 'routine' ? '常规' : '全部'
|
|
|
|
|
- }
|
|
|
|
|
- this.startTime = []
|
|
|
|
|
- if (aa.limitDateDL || aa.limitDateDG) {
|
|
|
|
|
- if (aa.limitDateDL && aa.limitDateDG) {
|
|
|
|
|
- canshu4 = `AND limitDate BETWEEN '${aa.limitDateDL}' AND '${aa.limitDateDG}'`
|
|
|
|
|
- } else if (aa.limitDateDL) {
|
|
|
|
|
- canshu4 = `AND limitDate>= '${aa.limitDateDL}'`
|
|
|
|
|
- } else if (aa.limitDateDG) {
|
|
|
|
|
- canshu4 = `AND limitDate<='${aa.limitDateDG}'`
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- if (aa.startDateDL || aa.startDateDG) {
|
|
|
|
|
- if (aa.startDateDL && aa.startDateDG) {
|
|
|
|
|
- canshu3 = `AND startDate BETWEEN '${aa.startDateDL}' AND '${aa.startDateDG}'`
|
|
|
|
|
- } else if (aa.startDateDL) {
|
|
|
|
|
- canshu3 = `AND startDate>= '${aa.startDateDL}'`
|
|
|
|
|
- } else if (aa.startDateDG) {
|
|
|
|
|
- canshu3 = `AND startDate<='${aa.startDateDG}'`
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- } else {
|
|
|
|
|
- this.moreSubject = ''
|
|
|
|
|
- this.subjectTitle = ''
|
|
|
|
|
- }
|
|
|
|
|
- const key = this.subject
|
|
|
|
|
- const key1 = this.moreSubject
|
|
|
|
|
- const key2 = this.subjectTitle
|
|
|
|
|
- const canshu1 = key1 !== '' ? `and examName like '%${key1}%'` : ''
|
|
|
|
|
- const canshu2 = key2 !== '' ? `and bankName like '%${key2}%'` : ''
|
|
|
|
|
- const canshu = (key1 !== '' || key2 !== '') ? `${canshu1} ${canshu2}`.trim() : key !== '' ? `and (examName like '%${key}%' or bankName like '%${key}%')` : ''
|
|
|
|
|
- // let canshu = key != '' ? `and (examName like '%${key}%' or bankName like '%${key}%')` : ''
|
|
|
|
|
- // const sql = `select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu} ORDER BY startDate DESC LIMIT ${page},10`
|
|
|
|
|
- // 已考待考(已0为区分点)
|
|
|
|
|
- // const sql1 = `select * from (select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu}${canshu3}${canshu4} ORDER BY startDate DESC LIMIT ${page},10) a LEFT JOIN (select exam_id_,id_,COUNT(id_) as num from t_examination where kao_shi_ren_ = '${this.info.employee.id}' and zhuang_tai_ != '已取消' GROUP BY exam_id_) b on a.examId = b.exam_id_ where num = 1 AND paperState='未开始' AND examState='已发布' `
|
|
|
|
|
- // const sql2 = `select * from (select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu}${canshu3}${canshu4} ) a INNER JOIN (select exam_id_,id_,COUNT(id_) as num from t_examination where kao_shi_ren_ = '${this.info.employee.id}' and (zhuang_tai_ ='已完成' OR zhuang_tai_ ='已交卷' ) GROUP BY exam_id_) b on a.examId = b.exam_id_ where num>=1 AND paperState='已完成' ORDER BY startDate DESC LIMIT ${page},10`
|
|
|
|
|
- // 和pc端保持一致
|
|
|
|
|
- const sql1 = `select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu}${canshu3}${canshu4} AND paperState='未开始' AND examState='已发布' ORDER BY startDate DESC LIMIT ${page},10 `
|
|
|
|
|
- const sql2 = `select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu}${canshu3}${canshu4} AND paperState!='未开始' AND examState='已发布' ORDER BY startDate DESC LIMIT ${page},10 `
|
|
|
|
|
- const sql = this.tabActive === 0 ? sql1 : sql2
|
|
|
|
|
- // let sql2 = `select * from (select * from t-exams ) a LEFT JOIN () B ON a.examId=b.exam_id_`
|
|
|
|
|
- // const { variables: { data }} = await this.$common.request('sql', sql)
|
|
|
|
|
- this.$common.request('sql', sql).then(res => {
|
|
|
|
|
- if (res.variables.data.length === 0) {
|
|
|
|
|
- if (this.current === 0) {
|
|
|
|
|
- this.noData = true
|
|
|
|
|
- } else {
|
|
|
|
|
- this.footText = true
|
|
|
|
|
- }
|
|
|
|
|
- this.finished = true
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- this.refreshing = false
|
|
|
|
|
- return
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (aa.examName !== '' && aa.examName !== undefined && aa.examName !== null) {
|
|
|
|
|
+ this.moreSubject = aa.examName
|
|
|
|
|
+ }
|
|
|
|
|
+ if (aa.bankName !== '' && aa.bankName !== undefined && aa.bankName !== null) {
|
|
|
|
|
+ this.subjectTitle = aa.bankName
|
|
|
|
|
+ }
|
|
|
|
|
+ if (aa.examType !== '' && aa.examType !== undefined && aa.examType !== null) {
|
|
|
|
|
+ this.name = aa.examType === 'trainingExam' ? '培训考试' : aa.examType === 'POCTtraining' ? 'POCT培训' : aa.examType === 'selfAssessment' ? '自主考核' : aa.examType === 'routine' ? '常规' : '全部'
|
|
|
|
|
+ }
|
|
|
|
|
+ this.startTime = []
|
|
|
|
|
+ if (aa.limitDateDL || aa.limitDateDG) {
|
|
|
|
|
+ if (aa.limitDateDL && aa.limitDateDG) {
|
|
|
|
|
+ canshu4 = `AND limitDate BETWEEN '${aa.limitDateDL}' AND '${aa.limitDateDG}'`
|
|
|
|
|
+ } else if (aa.limitDateDL) {
|
|
|
|
|
+ canshu4 = `AND limitDate>= '${aa.limitDateDL}'`
|
|
|
|
|
+ } else if (aa.limitDateDG) {
|
|
|
|
|
+ canshu4 = `AND limitDate<='${aa.limitDateDG}'`
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (aa.startDateDL || aa.startDateDG) {
|
|
|
|
|
+ if (aa.startDateDL && aa.startDateDG) {
|
|
|
|
|
+ canshu3 = `AND startDate BETWEEN '${aa.startDateDL}' AND '${aa.startDateDG}'`
|
|
|
|
|
+ } else if (aa.startDateDL) {
|
|
|
|
|
+ canshu3 = `AND startDate>= '${aa.startDateDL}'`
|
|
|
|
|
+ } else if (aa.startDateDG) {
|
|
|
|
|
+ canshu3 = `AND startDate<='${aa.startDateDG}'`
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.moreSubject = ''
|
|
|
|
|
+ this.subjectTitle = ''
|
|
|
|
|
+ }
|
|
|
|
|
+ const key = this.subject
|
|
|
|
|
+ const key1 = this.moreSubject
|
|
|
|
|
+ const key2 = this.subjectTitle
|
|
|
|
|
+ const canshu1 = key1 !== '' ? `and examName like '%${key1}%'` : ''
|
|
|
|
|
+ const canshu2 = key2 !== '' ? `and bankName like '%${key2}%'` : ''
|
|
|
|
|
+ const canshu = (key1 !== '' || key2 !== '') ? `${canshu1} ${canshu2}`.trim() : key !== '' ? `and (examName like '%${key}%' or bankName like '%${key}%')` : ''
|
|
|
|
|
+ // let canshu = key != '' ? `and (examName like '%${key}%' or bankName like '%${key}%')` : ''
|
|
|
|
|
+ // const sql = `select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu} ORDER BY startDate DESC LIMIT ${page},10`
|
|
|
|
|
+ // 已考待考(已0为区分点)
|
|
|
|
|
+ // const sql1 = `select * from (select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu}${canshu3}${canshu4} ORDER BY startDate DESC LIMIT ${page},10) a LEFT JOIN (select exam_id_,id_,COUNT(id_) as num from t_examination where kao_shi_ren_ = '${this.info.employee.id}' and zhuang_tai_ != '已取消' GROUP BY exam_id_) b on a.examId = b.exam_id_ where num = 1 AND paperState='未开始' AND examState='已发布' `
|
|
|
|
|
+ // const sql2 = `select * from (select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu}${canshu3}${canshu4} ) a INNER JOIN (select exam_id_,id_,COUNT(id_) as num from t_examination where kao_shi_ren_ = '${this.info.employee.id}' and (zhuang_tai_ ='已完成' OR zhuang_tai_ ='已交卷' ) GROUP BY exam_id_) b on a.examId = b.exam_id_ where num>=1 AND paperState='已完成' ORDER BY startDate DESC LIMIT ${page},10`
|
|
|
|
|
+ // 和pc端保持一致
|
|
|
|
|
+ const sql1 = `select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu}${canshu3}${canshu4} AND paperState='未开始' AND examState='已发布' ORDER BY startDate DESC LIMIT ${page},10 `
|
|
|
|
|
+ const sql2 = `select * from v_examination where examinee = '${this.info.employee.id}' and examType like '%${this.name === '全部' ? '' : this.name}%' ${canshu}${canshu3}${canshu4} AND paperState!='未开始' AND examState='已发布' ORDER BY startDate DESC LIMIT ${page},10 `
|
|
|
|
|
+ const sql = this.tabActive === 0 ? sql1 : sql2
|
|
|
|
|
+ // let sql2 = `select * from (select * from t-exams ) a LEFT JOIN () B ON a.examId=b.exam_id_`
|
|
|
|
|
+ // const { variables: { data }} = await this.$common.request('sql', sql)
|
|
|
|
|
+ this.$common.request('sql', sql).then(res => {
|
|
|
|
|
+ if (res.variables.data.length === 0) {
|
|
|
|
|
+ if (this.current === 0) {
|
|
|
|
|
+ this.noData = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.footText = true
|
|
|
|
|
+ }
|
|
|
|
|
+ this.finished = true
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ this.refreshing = false
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- this.listData.push(...res.variables.data)
|
|
|
|
|
|
|
+ this.listData.push(...res.variables.data)
|
|
|
|
|
|
|
|
- // 判断是否还有更多数据
|
|
|
|
|
- if ((this.listData.length) % 10 !== 0) {
|
|
|
|
|
- this.footText = true
|
|
|
|
|
- this.finished = true
|
|
|
|
|
- } else {
|
|
|
|
|
- this.current++
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // 判断是否还有更多数据
|
|
|
|
|
+ if ((this.listData.length) % 10 !== 0) {
|
|
|
|
|
+ this.footText = true
|
|
|
|
|
+ this.finished = true
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.current++
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- this.loading = false
|
|
|
|
|
- this.refreshing = false
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- console.log(err)
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
- // 获取格式化参数
|
|
|
|
|
- getSearcFormData() {
|
|
|
|
|
- let params = {}
|
|
|
|
|
- if (this.$utils.isNotEmpty(this.subject)) {
|
|
|
|
|
- params['Q^subject_^SL'] = this.subject
|
|
|
|
|
- }
|
|
|
|
|
- if (this.$utils.isNotEmpty(this.moreParams)) {
|
|
|
|
|
- params = Object.assign(params, this.moreParams)
|
|
|
|
|
- }
|
|
|
|
|
- return ActionUtils.formatParams(
|
|
|
|
|
- params,
|
|
|
|
|
- this.pagination,
|
|
|
|
|
- this.sorts)
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ this.loading = false
|
|
|
|
|
+ this.refreshing = false
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ console.log(err)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ // 获取格式化参数
|
|
|
|
|
+ getSearcFormData() {
|
|
|
|
|
+ let params = {}
|
|
|
|
|
+ if (this.$utils.isNotEmpty(this.subject)) {
|
|
|
|
|
+ params['Q^subject_^SL'] = this.subject
|
|
|
|
|
+ }
|
|
|
|
|
+ if (this.$utils.isNotEmpty(this.moreParams)) {
|
|
|
|
|
+ params = Object.assign(params, this.moreParams)
|
|
|
|
|
+ }
|
|
|
|
|
+ return ActionUtils.formatParams(
|
|
|
|
|
+ params,
|
|
|
|
|
+ this.pagination,
|
|
|
|
|
+ this.sorts)
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
- transformTime(timeStamp) {
|
|
|
|
|
- const hours = Math.floor(parseInt(timeStamp) / 3600000)
|
|
|
|
|
- const minutes = Math.floor((parseInt(timeStamp) % 3600000) / 60000)
|
|
|
|
|
- return hours + '小时' + minutes + '分钟'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ transformTime(timeStamp) {
|
|
|
|
|
+ const hours = Math.floor(parseInt(timeStamp) / 3600000)
|
|
|
|
|
+ const minutes = Math.floor((parseInt(timeStamp) % 3600000) / 60000)
|
|
|
|
|
+ return hours + '小时' + minutes + '分钟'
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|