20240205
yujialong 1 year ago
parent a823365509
commit 457a039bd4
  1. 8
      src/App.vue
  2. 1
      src/api/api.js
  3. 4
      src/components/backButton/index.vue
  4. 14
      src/components/breadcrumb/index.vue
  5. 35
      src/components/case/index.vue
  6. 3
      src/components/selectBusiness/index.vue
  7. 5
      src/layouts/header/index.vue
  8. 10
      src/pages/index/list/index.vue
  9. 28
      src/pages/report/index.vue
  10. 2
      src/store/modules/system.js

@ -15,6 +15,7 @@ import util from '@/libs/util';
import selectBusiness from '@/components/selectBusiness' import selectBusiness from '@/components/selectBusiness'
import TipDialog from '@/components/tipDialog' import TipDialog from '@/components/tipDialog'
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import Bus from '@/libs/bus'
export default { export default {
name: 'App', name: 'App',
components: { components: {
@ -62,7 +63,6 @@ export default {
if (!newVal) { if (!newVal) {
// //
if (!this.businessKey && !sessionStorage.getItem('submited')) { if (!this.businessKey && !sessionStorage.getItem('submited')) {
console.log("🚀 ~ file: App.vue:65 ~ handler ~ submited:", sessionStorage.getItem('submited'))
this.$nextTick(() => { this.setShowBusiness(true) }) this.$nextTick(() => { this.setShowBusiness(true) })
} else { } else {
// this.setTipsOperate('' + this.businessKey + ','); // this.setTipsOperate('' + this.businessKey + ',');
@ -75,11 +75,15 @@ export default {
immediate: true immediate: true
} }
}, },
mounted () {
Bus.$on('setShowIt', data => {
this.showIt = data
})
},
computed: { computed: {
...mapState({ ...mapState({
businessKey: state => state.system.businessKey, businessKey: state => state.system.businessKey,
showBusiness: state => state.system.showBusiness, showBusiness: state => state.system.showBusiness,
businessKey: state => state.system.businessKey
}) })
}, },
} }

@ -7,6 +7,7 @@ let host = `${location.origin}/`
if (dev) { if (dev) {
// 本地 // 本地
host = 'http://121.37.12.51/' // 中台测试服 host = 'http://121.37.12.51/' // 中台测试服
// host = 'https://www.occupationlab.com/' // 正式服
// host = 'http://192.168.31.151:9000/' // 榕 // host = 'http://192.168.31.151:9000/' // 榕
// host = 'http://192.168.31.116:9000/' // 赓 // host = 'http://192.168.31.116:9000/' // 赓
} }

@ -1,5 +1,7 @@
<template> <template>
<div class="sth guide" @click="toPart" alt=""> <div class="sth guide"
@click="toPart"
alt="">
返回 返回
</div> </div>
</template> </template>

@ -3,14 +3,11 @@
<div class="breadcrumb"> <div class="breadcrumb">
<el-breadcrumb separator=">"> <el-breadcrumb separator=">">
<template v-for="(item, index) in pages"> <template v-for="(item, index) in pages">
<el-breadcrumb-item <el-breadcrumb-item v-if="index != pages.length - 1"
v-if="index != pages.length - 1" :key="index">
:key="index"
>
<span @click="toPath">{{item}}</span> <span @click="toPath">{{item}}</span>
</el-breadcrumb-item> </el-breadcrumb-item>
<el-breadcrumb-item <el-breadcrumb-item v-else
v-else
:key="index"> :key="index">
{{item}} {{item}}
</el-breadcrumb-item> </el-breadcrumb-item>
@ -44,8 +41,7 @@ export default {
this.pages = data.split('/') this.pages = data.split('/')
}, },
toPath () { toPath () {
console.log(33) this.$router.push('/index')
this.$router.back()
} }
} }
}; };
@ -63,7 +59,7 @@ export default {
} }
&:last-child { &:last-child {
.is-link { .is-link {
color: #0B1D30; color: #0b1d30;
} }
} }
} }

@ -200,6 +200,7 @@ import Setting from '@/setting'
import { getProjectBySystemId, getProjectDetail, submit, getQueryCache, deleteCache, checkTest, checkTest2 } from "@/api/http.js"; import { getProjectBySystemId, getProjectDetail, submit, getQueryCache, deleteCache, checkTest, checkTest2 } from "@/api/http.js";
import { mapMutations } from 'vuex' import { mapMutations } from 'vuex'
import { async } from 'q'; import { async } from 'q';
import Bus from '@/libs/bus'
export default { export default {
props: { props: {
sendSync: { sendSync: {
@ -214,10 +215,6 @@ export default {
type: Number, type: Number,
default: null default: null
}, },
codeId: {
type: Number,
default: 0
},
showIt: { showIt: {
type: Boolean, type: Boolean,
required: true required: true
@ -235,7 +232,6 @@ export default {
grade: "00", grade: "00",
exampleData: "", exampleData: "",
codeid: "", codeid: "",
codeIds: [],
judgmentPointsIds: [], judgmentPointsIds: [],
text: "", text: "",
isStart: false, isStart: false,
@ -318,6 +314,9 @@ export default {
}) })
}, 4000) }, 4000)
} }
Bus.$on('setSubmited', data => {
this.popContainer = data
})
}, },
watch: { watch: {
countVal: { countVal: {
@ -365,11 +364,9 @@ export default {
let token = sessionStorage.getItem('token') || this.getQueryVariable('token') let token = sessionStorage.getItem('token') || this.getQueryVariable('token')
let cid = sessionStorage.getItem('cid') || this.getQueryVariable('cid') let cid = sessionStorage.getItem('cid') || this.getQueryVariable('cid')
let systemId = sessionStorage.getItem('systemId') || this.getQueryVariable('systemId') let systemId = sessionStorage.getItem('systemId') || this.getQueryVariable('systemId')
let projectId let projectId = this.getQueryVariable('projectId')
if (sessionStorage.getItem('projectId')) { if (sessionStorage.getItem('projectId')) {
projectId = sessionStorage.getItem('projectId') projectId = sessionStorage.getItem('projectId')
} else {
projectId = this.getQueryVariable('projectId')
} }
console.log('mounted', projectId) console.log('mounted', projectId)
let assessmentId = sessionStorage.getItem('assessmentId') || this.getQueryVariable('assessmentId') let assessmentId = sessionStorage.getItem('assessmentId') || this.getQueryVariable('assessmentId')
@ -378,6 +375,7 @@ export default {
let teamId = sessionStorage.getItem('teamId') || this.getQueryVariable('teamId') let teamId = sessionStorage.getItem('teamId') || this.getQueryVariable('teamId')
let classId = sessionStorage.getItem('classId') || this.getQueryVariable('classId') let classId = sessionStorage.getItem('classId') || this.getQueryVariable('classId')
let stopTime = sessionStorage.getItem('stopTime') || this.getQueryVariable('stopTime') let stopTime = sessionStorage.getItem('stopTime') || this.getQueryVariable('stopTime')
let mallId = sessionStorage.getItem('mallId') || this.getQueryVariable('mallId')
let timestamp = +stopTime; let timestamp = +stopTime;
if (timestamp != null) { if (timestamp != null) {
} else { } else {
@ -399,6 +397,7 @@ export default {
this.stageId = stageId this.stageId = stageId
this.teamId = teamId this.teamId = teamId
this.classId = classId this.classId = classId
this.mallId = mallId
} }
let tokens = sessionStorage.getItem('token') let tokens = sessionStorage.getItem('token')
if (tokens || token) { if (tokens || token) {
@ -408,7 +407,6 @@ export default {
2 : 2 :
0 0
this.assessmentId && this.projectId && this.checkVer() this.assessmentId && this.projectId && this.checkVer()
this.codeId && this.codeIds.push(this.codeId)
if (JSON.parse(assessmentId != null && assessmentId != '' && assessmentId != 'null' || this.competitionId)) { if (JSON.parse(assessmentId != null && assessmentId != '' && assessmentId != 'null' || this.competitionId)) {
this.selectProjects({ this.selectProjects({
projectId projectId
@ -417,9 +415,11 @@ export default {
this.getData() this.getData()
} }
} }
console.log(2222, this.showIt)
}, },
methods: { methods: {
...mapMutations({ ...mapMutations({
setBusinessKey: 'system/setBusinessKey',
initState: 'system/initState', initState: 'system/initState',
setShowBusiness: 'system/setShowBusiness', setShowBusiness: 'system/setShowBusiness',
}), }),
@ -440,6 +440,7 @@ export default {
sessionStorage.setItem('cid', cid) sessionStorage.setItem('cid', cid)
sessionStorage.setItem('systemId', systemId) sessionStorage.setItem('systemId', systemId)
sessionStorage.setItem('projectId', projectId) sessionStorage.setItem('projectId', projectId)
sessionStorage.setItem('firstLoad2', true)
if (assessmentId) { if (assessmentId) {
sessionStorage.setItem('assessmentId', assessmentId) sessionStorage.setItem('assessmentId', assessmentId)
} }
@ -499,6 +500,7 @@ export default {
"systemId": sessionStorage.getItem('systemId'), "systemId": sessionStorage.getItem('systemId'),
"cId": sessionStorage.getItem('cid'), "cId": sessionStorage.getItem('cid'),
"permissions": 0, "permissions": 0,
mallId: this.mallId
} }
getProjectBySystemId(params).then((data) => { getProjectBySystemId(params).then((data) => {
if (data.status == 200) { if (data.status == 200) {
@ -657,6 +659,7 @@ export default {
sessionStorage.setItem('accountPasswordAll', '') sessionStorage.setItem('accountPasswordAll', '')
sessionStorage.setItem('projectId', this.projectId) sessionStorage.setItem('projectId', this.projectId)
sessionStorage.setItem('submited', 0) sessionStorage.setItem('submited', 0)
sessionStorage.setItem('firstLoad2', true)
getProjectDetail(params).then((data) => { getProjectDetail(params).then((data) => {
if (data.status == 200) { if (data.status == 200) {
const { systemId, projectId } = data.data.projectManage const { systemId, projectId } = data.data.projectManage
@ -751,12 +754,14 @@ export default {
competitionId: this.competitionId, competitionId: this.competitionId,
stageId: this.stageId, stageId: this.stageId,
teamId: this.teamId, teamId: this.teamId,
mallId: this.mallId
} }
this.loading = true; this.loading = true;
submit(params).then((data) => { submit(params).then((data) => {
console.log(4, data) console.log(4, data)
if (data.status == 200) { if (data.status == 200) {
this.clearStore() sessionStorage.setItem('firstLoad2', true)
// this.clearStore()
const { retMap } = data.data const { retMap } = data.data
this.reportId = retMap.reportId this.reportId = retMap.reportId
let firstLoad = null let firstLoad = null
@ -906,7 +911,7 @@ export default {
sessionStorage.setItem('ruleReqs', JSON.stringify(formList)) sessionStorage.setItem('ruleReqs', JSON.stringify(formList))
sessionStorage.setItem('accountVoucher', JSON.stringify(formList)) sessionStorage.setItem('accountVoucher', JSON.stringify(formList))
sessionStorage.setItem('accountPasswordAll', '') sessionStorage.setItem('accountPasswordAll', '')
sessionStorage.setItem('submited', 0) this.setBusinessKey('')
let params = { let params = {
"projectId": projectId, "projectId": projectId,
} }
@ -947,11 +952,11 @@ export default {
}, },
toggleCase () { toggleCase () {
if (this.submitType) return if (this.submitType) return
if (!this.lockIt) { // if (!this.lockIt) {
this.$emit('update:showIt', !this.showIt) this.$emit('update:showIt', !this.showIt)
} else { // } else {
this.closePaneJudge = true // this.closePaneJudge = true
} // }
// this.caseVisible = !this.caseVisible // this.caseVisible = !this.caseVisible
}, },

@ -50,6 +50,7 @@ export default {
// default: '' // default: ''
}, },
mounted () { mounted () {
console.log('business', this.getBusinessSelectList)
if (this.businessKey) { if (this.businessKey) {
// //
this.takeCheck = this.businessKey this.takeCheck = this.businessKey
@ -164,7 +165,7 @@ export default {
// sessionStorage.setItem('systemData', systemData) // sessionStorage.setItem('systemData', systemData)
sessionStorage.setItem('businessKey', this.$store.state.system.businessKey) sessionStorage.setItem('businessKey', this.takeCheck)
}, },
}, },

@ -30,7 +30,7 @@ export default {
}; };
}, },
mounted () { mounted () {
this.$route.query.manager && Cookie.set('manager', 1) this.$route.query.manager ? Cookie.set('manager', 1) : Cookie.remove('manager')
}, },
methods: { methods: {
toIndex () { toIndex () {
@ -53,8 +53,9 @@ export default {
href += `ass/list` href += `ass/list`
} else { } else {
const cid = sessionStorage.getItem('cid') const cid = sessionStorage.getItem('cid')
href += `station/preview?courseId=${cid}&curriculumName=银行项目` href += `station/preview?courseId=${cid}&curriculumName=银行项目&mallId=${this.$route.query.mallId}`
} }
sessionStorage.clear()
location.href = href location.href = href
}, },
}, },

@ -65,6 +65,7 @@
<script> <script>
import { mapMutations, mapState } from 'vuex'; import { mapMutations, mapState } from 'vuex';
import saveSystemModule from '@/mixins/saveSystemModule' import saveSystemModule from '@/mixins/saveSystemModule'
import Bus from '@/libs/bus'
export default { export default {
name: 'index', name: 'index',
mixins: [saveSystemModule], mixins: [saveSystemModule],
@ -84,6 +85,9 @@ export default {
}, },
created () { created () {
if (!sessionStorage.getItem('firstLoad2')) { if (!sessionStorage.getItem('firstLoad2')) {
sessionStorage.removeItem('submited')
sessionStorage.removeItem('businessKey')
this.setBusinessKey('')
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
// text: 'Loading', // text: 'Loading',
@ -100,6 +104,11 @@ export default {
if (!this.businessKey) { if (!this.businessKey) {
this.setShowBusiness(true) this.setShowBusiness(true)
} }
//
if (sessionStorage.getItem('submited')) {
Bus.$emit('setShowIt', true)
Bus.$emit('setSubmited', true)
}
}, },
mounted () { mounted () {
let token = this.getQueryVariable('token') let token = this.getQueryVariable('token')
@ -122,6 +131,7 @@ export default {
}, },
methods: { methods: {
...mapMutations({ ...mapMutations({
setBusinessKey: 'system/setBusinessKey',
setShowBusiness: 'system/setShowBusiness' setShowBusiness: 'system/setShowBusiness'
}), }),
getQueryVariable (name) { getQueryVariable (name) {

@ -156,34 +156,6 @@
v-html="scope.row.referenceAnswer"></div> v-html="scope.row.referenceAnswer"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userAnswer"
width="280"
label="学生答案">
<template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords"
:key="index">
<span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}}
</span>
<span v-else>
<span>{{index+1}}. </span>未填写
</span>
</div>
</div>
<div v-else
v-html='scope.row.answer'
style='white-space: pre-wrap'></div>
<template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList"
:key="i"
width="200"
class="result-pic"
:src="img"
alt="">
</template>
</template>
</el-table-column>
<el-table-column prop="quesScore" <el-table-column prop="quesScore"
label="分值" label="分值"
width="80" width="80"

@ -2610,7 +2610,7 @@ export default {
initState(state) { initState(state) {
state.businessSelect = JSON.parse(JSON.stringify(myInitState)) state.businessSelect = JSON.parse(JSON.stringify(myInitState))
state.allDataFlow = { ...allDataFlow } state.allDataFlow = { ...allDataFlow }
state.businessKey = '' // state.businessKey = ''
}, },
// 控制选择业务列表的展示状态 // 控制选择业务列表的展示状态
setShowBusiness(state, isShow) { setShowBusiness(state, isShow) {

Loading…
Cancel
Save