Merge remote-tracking branch 'origin/test'
This commit is contained in:
commit
204995be22
@ -7,7 +7,7 @@ NODE_ENV = 'development'
|
|||||||
# VUE_APP_BASE_API = 'http://192.168.3.4:9000'
|
# VUE_APP_BASE_API = 'http://192.168.3.4:9000'
|
||||||
VUE_APP_BASE_API = 'http://192.168.3.6:9000'
|
VUE_APP_BASE_API = 'http://192.168.3.6:9000'
|
||||||
VUE_APP_VOICE_API = 'http://119.3.163.89/oss/joylink'
|
VUE_APP_VOICE_API = 'http://119.3.163.89/oss/joylink'
|
||||||
VUE_APP_UPLOAD_API = 'http://119.3.163.89/upload'
|
VUE_APP_UPLOAD_API = 'http://joylink.club/jlfile'
|
||||||
VUE_APP_BASE_SITE='https://test.joylink.club/cbtc'
|
VUE_APP_BASE_SITE='https://test.joylink.club/cbtc'
|
||||||
# VUE_APP_VOICE_API = 'http://192.168.8.110:9008'
|
# VUE_APP_VOICE_API = 'http://192.168.8.110:9008'
|
||||||
|
|
||||||
|
@ -90,3 +90,25 @@ export function getExamListByMapIdAndPrdType(mapId, prdType) {
|
|||||||
params: { prdType: prdType }
|
params: { prdType: prdType }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
/** 更新试卷规则 */
|
||||||
|
export function updateExamRule(data) {
|
||||||
|
return request({
|
||||||
|
url: `/api/exam/update/rules`,
|
||||||
|
method: 'put',
|
||||||
|
data:data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 检查并更新【规则数据异常】状态 */
|
||||||
|
export function checkAndUpdateAbnormal(mapId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/exam/checkAndUpdateAbnormal/${mapId}`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 重新生成考试规则 */
|
||||||
|
export function regenerateRule (mapId) {
|
||||||
|
return request({
|
||||||
|
url: `/api/exam/regenerateRules/${mapId}`,
|
||||||
|
method: 'put'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
@ -257,6 +257,29 @@ export function JobPaneData() {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name:"信号楼值班员",
|
||||||
|
value:"xhlzby",
|
||||||
|
text:"",
|
||||||
|
picurl:"",
|
||||||
|
controlList:[
|
||||||
|
//联控
|
||||||
|
{
|
||||||
|
name:"联控",
|
||||||
|
data:[],
|
||||||
|
},
|
||||||
|
//动作
|
||||||
|
{
|
||||||
|
name:"动作",
|
||||||
|
data:[],
|
||||||
|
},
|
||||||
|
//口呼
|
||||||
|
{
|
||||||
|
name:"口呼",
|
||||||
|
data:[],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name:"通号调度",
|
name:"通号调度",
|
||||||
value:"scdd",
|
value:"scdd",
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
>确定</el-button>
|
>确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div style="width:100%; padding-top: 20px">
|
<div style="width:100%; padding-top: 20px">
|
||||||
<span> 版权所有(C)2010-2011 北京玖琏科技有限公司</span>
|
<span v-if="!thirdLogin"> 版权所有(C)2010-2011 北京玖琏科技有限公司</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -40,7 +40,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
|
import { NoCopyrightList } from '@/scripts/ProjectConfig';
|
||||||
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
export default {
|
export default {
|
||||||
name: 'ManageUser',
|
name: 'ManageUser',
|
||||||
data() {
|
data() {
|
||||||
@ -71,6 +72,9 @@ export default {
|
|||||||
},
|
},
|
||||||
title() {
|
title() {
|
||||||
return '关于ControlMonitor';
|
return '关于ControlMonitor';
|
||||||
|
},
|
||||||
|
thirdLogin() {
|
||||||
|
return NoCopyrightList.includes(getSessionStorage('project'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
|
import { NoCopyrightList } from '@/scripts/ProjectConfig';
|
||||||
export default {
|
export default {
|
||||||
name: 'ManageUser',
|
name: 'ManageUser',
|
||||||
data() {
|
data() {
|
||||||
@ -73,7 +74,7 @@ export default {
|
|||||||
return this.$t('menu.menuDialog.about');
|
return this.$t('menu.menuDialog.about');
|
||||||
},
|
},
|
||||||
thirdLogin() {
|
thirdLogin() {
|
||||||
return getSessionStorage('project') == 'richor';
|
return NoCopyrightList.includes(getSessionStorage('project'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -761,6 +761,10 @@ export const NoQrcodeList = ['heb', 'designheb', 'cgy', 'designcgy', 'ntyl', 'de
|
|||||||
/** 综合演练 无二维码 */
|
/** 综合演练 无二维码 */
|
||||||
export const NoSimulationQrCodeList = ['heb', 'bjd'];
|
export const NoSimulationQrCodeList = ['heb', 'bjd'];
|
||||||
export const RegisterCodeList = ['cgy', 'designcgy'];
|
export const RegisterCodeList = ['cgy', 'designcgy'];
|
||||||
|
/** 展示中航锐创联系我们 */
|
||||||
|
export const RichorContectUsList = ['richor', 'richorygy'];
|
||||||
|
/** 帮助中不展示版权(福州 佛山) */
|
||||||
|
export const NoCopyrightList = ['richor', 'richorygy'];
|
||||||
/** 导航栏快速切换平台 */
|
/** 导航栏快速切换平台 */
|
||||||
export const goOtherPlatformMenu = {
|
export const goOtherPlatformMenu = {
|
||||||
login: '/design/login',
|
login: '/design/login',
|
||||||
|
@ -3,14 +3,14 @@ export function getBaseUrl() {
|
|||||||
if (process.env.NODE_ENV === 'development') {
|
if (process.env.NODE_ENV === 'development') {
|
||||||
// BASE_API = 'https://joylink.club/jlcloud';
|
// BASE_API = 'https://joylink.club/jlcloud';
|
||||||
// BASE_API = 'https://test.joylink.club/jlcloud';
|
// BASE_API = 'https://test.joylink.club/jlcloud';
|
||||||
BASE_API = 'http://114.116.51.125/jlcloud';
|
// BASE_API = 'http://114.116.51.125/jlcloud';
|
||||||
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
// BASE_API = 'http://192.168.8.152:9000'; // 袁琪
|
||||||
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
|
// BASE_API = 'http://192.168.8.172:9200'; // 旭强
|
||||||
// BASE_API = 'http://192.168.8.109:9000'; // 张赛
|
// BASE_API = 'http://192.168.8.109:9000'; // 张赛
|
||||||
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
// BASE_API = 'http://192.168.8.140:9000'; // 杜康
|
||||||
// BASE_API = 'http://b29z135112.zicp.vip';
|
// BASE_API = 'http://b29z135112.zicp.vip';
|
||||||
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
// BASE_API = 'http://2925963m2a.zicp.vip'; // 杜康
|
||||||
// BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
BASE_API = 'http://2i38984j47.qicp.vip'; // 张赛
|
||||||
} else {
|
} else {
|
||||||
BASE_API = process.env.VUE_APP_BASE_API;
|
BASE_API = process.env.VUE_APP_BASE_API;
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import wchat from '@/assets/wchat.png';
|
import wchat from '@/assets/wchat.png';
|
||||||
import { getSessionStorage } from '@/utils/auth';
|
import { getSessionStorage } from '@/utils/auth';
|
||||||
|
import { RichorContectUsList } from '@/scripts/ProjectConfig';
|
||||||
export default {
|
export default {
|
||||||
name:'',
|
name:'',
|
||||||
data() {
|
data() {
|
||||||
@ -45,7 +46,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
thirdLogin() {
|
thirdLogin() {
|
||||||
return getSessionStorage('project') == 'richor';
|
return RichorContectUsList.includes(getSessionStorage('project'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
@ -86,6 +86,16 @@ export default {
|
|||||||
},
|
},
|
||||||
tagType: (row) => { return ''; }
|
tagType: (row) => { return ''; }
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '试卷规则状态',
|
||||||
|
prop: 'abnormal',
|
||||||
|
type: 'tag',
|
||||||
|
width: '80',
|
||||||
|
columnValue: (row) => {
|
||||||
|
return row.abnormal ? '异常' : '正常';
|
||||||
|
},
|
||||||
|
tagType: (row) => { return row.abnormal ? 'danger' : 'success'; }
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '开始时间',
|
title: '开始时间',
|
||||||
prop: 'startTime'
|
prop: 'startTime'
|
||||||
|
109
src/views/publish/examRule/checkOrRegenerate.vue
Normal file
109
src/views/publish/examRule/checkOrRegenerate.vue
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" :before-close="handleCancel" :close-on-click-modal="false">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
|
||||||
|
<el-form-item label="试卷地图" prop="trainingType">
|
||||||
|
<el-select v-model="form.mapId" placeholder="地图" style="width:240px;">
|
||||||
|
<el-option v-for="nor in mapIdList" :key="nor.id" :label="nor.name" :value="nor.id"/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button @click="handleCancel">{{ $t('global.cancel') }}</el-button>
|
||||||
|
<el-button v-if="type === 'check'" type="primary" @click="handleCheck">校验</el-button>
|
||||||
|
<el-button v-if="type === 'regenerate'" type="primary" @click="handleRegenerate">重新生成</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { checkAndUpdateAbnormal, regenerateRule } from '@/api/management/exam';
|
||||||
|
export default {
|
||||||
|
name: 'EditRule',
|
||||||
|
props: {
|
||||||
|
mapIdList: {
|
||||||
|
type: Array,
|
||||||
|
required:true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
form: {
|
||||||
|
mapId: ''
|
||||||
|
},
|
||||||
|
dialogShow: false,
|
||||||
|
type: '',
|
||||||
|
rules: {
|
||||||
|
mapId: [
|
||||||
|
{ required: true, message: '请选择地图数据', trigger: 'change' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
typeList: [],
|
||||||
|
operationTypeList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted() {},
|
||||||
|
methods: {
|
||||||
|
doShow(type) {
|
||||||
|
this.type = type;
|
||||||
|
this.dialogShow = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.form.resetFields();
|
||||||
|
if (type === 'check') {
|
||||||
|
this.title = '校验试卷规则';
|
||||||
|
} else if (type === 'regenerate') {
|
||||||
|
this.title = '重新生成试卷规则';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.type = '';
|
||||||
|
this.title = '';
|
||||||
|
this.form.mapId = '';
|
||||||
|
this.dialogShow = false;
|
||||||
|
},
|
||||||
|
handleCheck() {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
checkAndUpdateAbnormal(this.form.mapId).then(resp => {
|
||||||
|
this.$message.success('校验试卷规则成功!');
|
||||||
|
this.$emit('reload');
|
||||||
|
this.handleCancel();
|
||||||
|
}).catch(e => {
|
||||||
|
this.$message.error('校验试卷规则失败!');
|
||||||
|
this.handleCancel();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handleRegenerate() {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
regenerateRule(this.form.mapId).then(resp => {
|
||||||
|
this.$message.success('重新生成试卷规则成功!');
|
||||||
|
this.handleCancel();
|
||||||
|
}).catch(e => {
|
||||||
|
this.$message.error('重新生成试卷规则失败!');
|
||||||
|
this.handleCancel();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
/deep/ {
|
||||||
|
.el-dialog {
|
||||||
|
width: 600px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__content {
|
||||||
|
width: calc(100% - 80px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-cascader {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -2,12 +2,12 @@
|
|||||||
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" :before-close="handleCancel" :close-on-click-modal="false">
|
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogShow" :before-close="handleCancel" :close-on-click-modal="false">
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
|
||||||
<el-form-item :label="$t('publish.trainingType')" prop="trainingType">
|
<el-form-item :label="$t('publish.trainingType')" prop="trainingType">
|
||||||
<el-select v-model="form.trainingType" :placeholder="$t('publish.selectTypeScope')" :disabled="editOk" style="width:240px;" @change="changeCourse">
|
<el-select v-model="form.trainingType" :placeholder="$t('publish.selectTypeScope')" style="width:240px;" @change="changeCourse">
|
||||||
<el-option v-for="nor in trainingTypeList" :key="nor.value" :label="nor.label" :value="nor.value" :disabled="nor.disabled" />
|
<el-option v-for="nor in trainingTypeList" :key="nor.value" :label="nor.label" :value="nor.value" :disabled="nor.disabled" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('publish.operationType')" prop="operateType">
|
<el-form-item :label="$t('publish.operationType')" prop="operateType">
|
||||||
<el-select v-model="form.operateType" clearable :placeholder="$t('publish.selectScope')" :disabled="editOk" @change="changeOperation">
|
<el-select v-model="form.operateType" clearable :placeholder="$t('publish.selectScope')" @change="changeOperation">
|
||||||
<el-option v-for="nor in operationTypeList" :key="nor.value" :label="nor.label" :value="nor.value" :disabled="nor.disabled" />
|
<el-option v-for="nor in operationTypeList" :key="nor.value" :label="nor.label" :value="nor.value" :disabled="nor.disabled" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -146,6 +146,7 @@ export default {
|
|||||||
changeCourse(val) {
|
changeCourse(val) {
|
||||||
this.operationTypeList = this.operationTypeMap[val];
|
this.operationTypeList = this.operationTypeMap[val];
|
||||||
this.topicNum = this.trainingTypeNums[val];
|
this.topicNum = this.trainingTypeNums[val];
|
||||||
|
this.form.operateType = '';
|
||||||
},
|
},
|
||||||
changeOperation(val) {
|
changeOperation(val) {
|
||||||
if (val) {
|
if (val) {
|
||||||
|
@ -62,13 +62,13 @@ export default {
|
|||||||
return this.display == 2;
|
return this.display == 2;
|
||||||
},
|
},
|
||||||
isNextStep() {
|
isNextStep() {
|
||||||
return this.display == 1 && this.$route.params.mode != 'edit';
|
return this.display == 1;
|
||||||
},
|
},
|
||||||
isUpdate() {
|
isUpdate() {
|
||||||
return this.display == 1 && this.$route.params.mode == 'edit';
|
return this.$route.params.mode == 'edit';
|
||||||
},
|
},
|
||||||
isCreate() {
|
isCreate() {
|
||||||
return this.display == 2;
|
return this.display == 2 && this.$route.params.mode !== 'edit';
|
||||||
},
|
},
|
||||||
isFastCreate() {
|
isFastCreate() {
|
||||||
return this.display == 1 && this.$route.params.mode != 'edit' && Number(this.$route.params.ruleId);
|
return this.display == 1 && this.$route.params.mode != 'edit' && Number(this.$route.params.ruleId);
|
||||||
@ -149,7 +149,11 @@ export default {
|
|||||||
this.$refs.exam.checkedForm('goNextStep');
|
this.$refs.exam.checkedForm('goNextStep');
|
||||||
},
|
},
|
||||||
update() {
|
update() {
|
||||||
this.$refs.exam.updateForm();
|
if(this.display === 1) {
|
||||||
|
this.$refs.exam.updateForm();
|
||||||
|
} else if (this.display === 2) {
|
||||||
|
this.$refs.rule.updateOk();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
this.$refs.rule.creatOk();
|
this.$refs.rule.creatOk();
|
||||||
|
@ -8,13 +8,25 @@
|
|||||||
<span>{{ getOperateName(scope.row) }}</span>
|
<span>{{ getOperateName(scope.row) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="num" :label="$t('publish.questionsNumber')" width="100" />
|
<el-table-column prop="num" :label="$t('publish.questionsNumber')" width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ scope.row.num }}</span>
|
||||||
|
<el-tooltip v-if="checkNum(scope.row)" effect="dark" content="题库数量不足" placement="top">
|
||||||
|
<i class="el-icon-warning-outline"></i>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="point" :label="$t('publish.eachScore')" width="100" />
|
<el-table-column prop="point" :label="$t('publish.eachScore')" width="100" />
|
||||||
<el-table-column :label="$t('publish.totalScore')" width="100">
|
<el-table-column :label="$t('publish.totalScore')" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ Number(scope.row.num) * Number(scope.row.point) }}</span>
|
<span>{{ Number(scope.row.num) * Number(scope.row.point) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column label="题库题数">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ getTopicNum(scope.row) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column :label="$t('global.operate')" width="100">
|
<el-table-column :label="$t('global.operate')" width="100">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" size="small" @click="handleForm(scope)">{{ $t('global.edit') }}</el-button>
|
<el-button type="text" size="small" @click="handleForm(scope)">{{ $t('global.edit') }}</el-button>
|
||||||
@ -38,7 +50,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createExam } from '@/api/management/exam';
|
import { createExam, updateExamRule } from '@/api/management/exam';
|
||||||
import { UrlConfig, getOperateTypeMap } from '@/scripts/ConstDic';
|
import { UrlConfig, getOperateTypeMap } from '@/scripts/ConstDic';
|
||||||
import editRule from './editRule';
|
import editRule from './editRule';
|
||||||
import ConstConfig from '@/scripts/ConstConfig';
|
import ConstConfig from '@/scripts/ConstConfig';
|
||||||
@ -135,6 +147,36 @@ export default {
|
|||||||
this.$messageBox(this.$t('publish.addExamRules'));
|
this.$messageBox(this.$t('publish.addExamRules'));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async updateOk() {
|
||||||
|
if (this.ruleList.length) {
|
||||||
|
let flag = 0;
|
||||||
|
this.ruleList.forEach(rule => {
|
||||||
|
flag = flag + (Number(rule.num) * Number(rule.point));
|
||||||
|
});
|
||||||
|
if (flag == this.examData.fullMark) {
|
||||||
|
const result = {
|
||||||
|
id: this.$route.params.ruleId,
|
||||||
|
duration: Number(this.examData.duration) * 60, // 时长
|
||||||
|
examDefinitionRulesVOList: this.ruleList, // 规则
|
||||||
|
fullPoint: Number(this.examData.fullMark), // 满分
|
||||||
|
mapId: this.examData.mapId,
|
||||||
|
prdType: this.examData.prdType,
|
||||||
|
name: this.examData.name, // 名称
|
||||||
|
passingPoint: Number(this.examData.passMark), // 及格分
|
||||||
|
remarks: this.examData.desc, // 考试说明
|
||||||
|
endTime: this.examData.endDate,
|
||||||
|
startTime: this.examData.startDate,
|
||||||
|
type: this.examData.type, // 类型
|
||||||
|
trial: this.examData.trial == 2 // 权限判断
|
||||||
|
};
|
||||||
|
await this.update(result);
|
||||||
|
} else {
|
||||||
|
this.$messageBox(this.$t('publish.addExamRluesError'));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this.$messageBox(this.$t('publish.addExamRules'));
|
||||||
|
}
|
||||||
|
},
|
||||||
async save(data) {
|
async save(data) {
|
||||||
try {
|
try {
|
||||||
const res = await createExam(data);
|
const res = await createExam(data);
|
||||||
@ -150,6 +192,21 @@ export default {
|
|||||||
this.$messageBox(`${this.$t('publish.saveRuleFailed')} ${error.message}`);
|
this.$messageBox(`${this.$t('publish.saveRuleFailed')} ${error.message}`);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async update(data) {
|
||||||
|
try {
|
||||||
|
const res = await updateExamRule(data);
|
||||||
|
this.$message.success({ message: res.message });
|
||||||
|
this.$store.dispatch('exam/setRuleList', []); // 清空规则列表数据
|
||||||
|
const path = `${this.$route.path.match(/(\/.*)\/examRule/)[1]}${UrlConfig.examRuleManage}`;
|
||||||
|
if (this.$route.query.source === 'org') {
|
||||||
|
this.$router.go(-1);
|
||||||
|
} else {
|
||||||
|
this.$router.replace({ path: `${path}`, query: { mapId: this.$route.query.mapId, noPreLogout: this.$route.query.noPreLogout} });
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
this.$messageBox(`${this.$t('publish.saveRuleFailed')} ${error.message}`);
|
||||||
|
}
|
||||||
|
},
|
||||||
addRuleList(data) {
|
addRuleList(data) {
|
||||||
const element = {
|
const element = {
|
||||||
trainingType: data.trainingType,
|
trainingType: data.trainingType,
|
||||||
@ -200,7 +257,24 @@ export default {
|
|||||||
return trainingName;
|
return trainingName;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getTopicNum(row) {
|
||||||
|
//this.operationTypeNums
|
||||||
|
//console.log(row, this.operationTypeNums);
|
||||||
|
return this.operationTypeNums[row.trainingType] ? (this.operationTypeNums[row.trainingType][row.operateType]||0): 0;
|
||||||
|
},
|
||||||
|
checkNum(row) {
|
||||||
|
if(!this.operationTypeNums[row.trainingType]) {
|
||||||
|
return true;
|
||||||
|
} else if(!this.operationTypeNums[row.trainingType][row.operateType]){
|
||||||
|
return true;
|
||||||
|
} else if(row.num > this.operationTypeNums[row.trainingType][row.operateType]) {
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
},
|
||||||
handleForm(data) {
|
handleForm(data) {
|
||||||
|
this.changeCourseDisable();
|
||||||
this.indexCourse = data.$index;
|
this.indexCourse = data.$index;
|
||||||
const list = JSON.stringify(data.row);
|
const list = JSON.stringify(data.row);
|
||||||
const detail = JSON.parse(list);
|
const detail = JSON.parse(list);
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
|
||||||
</el-scrollbar>
|
</el-scrollbar>
|
||||||
</div>
|
</div>
|
||||||
|
<check-or-regenerate ref="checkOrRegenerate" :map-id-list="mapIdList" @reload="reload" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -15,9 +16,13 @@
|
|||||||
import { getExamList, deleteExam, setExamEfficacy, setExamEffectivey } from '@/api/management/exam';
|
import { getExamList, deleteExam, setExamEfficacy, setExamEffectivey } from '@/api/management/exam';
|
||||||
import { UrlConfig } from '@/scripts/ConstDic';
|
import { UrlConfig } from '@/scripts/ConstDic';
|
||||||
import { getPublishMapListOnline } from '@/api/jmap/map';
|
import { getPublishMapListOnline } from '@/api/jmap/map';
|
||||||
|
import CheckOrRegenerate from './checkOrRegenerate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'List',
|
name: 'List',
|
||||||
|
components: {
|
||||||
|
CheckOrRegenerate
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
BizTypeList: [],
|
BizTypeList: [],
|
||||||
@ -104,6 +109,15 @@ export default {
|
|||||||
default: return 'danger';
|
default: return 'danger';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '试卷规则状态',
|
||||||
|
prop: 'abnormal',
|
||||||
|
type: 'tag',
|
||||||
|
columnValue: (row) => {
|
||||||
|
return row.abnormal ? '异常' : '正常';
|
||||||
|
},
|
||||||
|
tagType: (row) => { return row.abnormal ? 'danger' : 'success'; }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -150,6 +164,8 @@ export default {
|
|||||||
actions: [
|
actions: [
|
||||||
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleNormalAdd },
|
{ text: this.$t('global.add'), btnCode: 'employee_insert', handler: this.handleNormalAdd },
|
||||||
{ text: this.$t('global.back'), show: !this.$route.path.includes('device'), btnCode: 'employee_back', handler: this.handlerBack },
|
{ text: this.$t('global.back'), show: !this.$route.path.includes('device'), btnCode: 'employee_back', handler: this.handlerBack },
|
||||||
|
{ text: '检查', show: !this.$route.path.includes('device'), btnCode: 'employee_back', handler: this.handleCheck },
|
||||||
|
{ text: '重新生成', show: !this.$route.path.includes('device'), btnCode: 'employee_back', handler: this.handleRegenerate },
|
||||||
{ text: '退出', show: this.$route.path.includes('device'), btnCode: 'employee_back', handler: this.handelQuit}
|
{ text: '退出', show: this.$route.path.includes('device'), btnCode: 'employee_back', handler: this.handelQuit}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -168,6 +184,7 @@ export default {
|
|||||||
reset: true
|
reset: true
|
||||||
} : {
|
} : {
|
||||||
labelWidth: '160px',
|
labelWidth: '160px',
|
||||||
|
leftSpan: 17,
|
||||||
queryObject: {
|
queryObject: {
|
||||||
'name': {
|
'name': {
|
||||||
type: 'text',
|
type: 'text',
|
||||||
@ -289,6 +306,15 @@ export default {
|
|||||||
},
|
},
|
||||||
handelQuit() {
|
handelQuit() {
|
||||||
window.close();
|
window.close();
|
||||||
|
},
|
||||||
|
reload() {
|
||||||
|
this.queryList.reload();
|
||||||
|
},
|
||||||
|
handleCheck() {
|
||||||
|
this.$refs.checkOrRegenerate.doShow('check');
|
||||||
|
},
|
||||||
|
handleRegenerate() {
|
||||||
|
this.$refs.checkOrRegenerate.doShow('regenerate');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -24,7 +24,8 @@ export default {
|
|||||||
formModel: {
|
formModel: {
|
||||||
id: '',
|
id: '',
|
||||||
domainName: '',
|
domainName: '',
|
||||||
project: ''
|
project: '',
|
||||||
|
resourcesDomainName: ''
|
||||||
},
|
},
|
||||||
loading: false
|
loading: false
|
||||||
};
|
};
|
||||||
@ -34,7 +35,8 @@ export default {
|
|||||||
const form = {
|
const form = {
|
||||||
labelWidth: '120px',
|
labelWidth: '120px',
|
||||||
items: [
|
items: [
|
||||||
{ prop: 'domainName', label: '域名', type: 'text', required: true, placeholder: '请输入域名' },
|
{ prop: 'domainName', label: '接口域名', type: 'text', required: true, placeholder: '请输入域名' },
|
||||||
|
{ prop: 'resourcesDomainName', label: '资源域名', type: 'text', required: true, placeholder: '请输入域名' },
|
||||||
{ prop: 'project', label: '项目', type: 'select', required: true, options: this.projectList, placeholder: '请选择项目' }
|
{ prop: 'project', label: '项目', type: 'select', required: true, options: this.projectList, placeholder: '请选择项目' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@ -43,7 +45,10 @@ export default {
|
|||||||
rules() {
|
rules() {
|
||||||
const crules = {
|
const crules = {
|
||||||
domainName: [
|
domainName: [
|
||||||
{ required: true, message: '请输入域名', trigger: 'blur' }
|
{ required: true, message: '请输入接口域名', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
resourcesDomainName: [
|
||||||
|
{ required: true, message: '请输入资源域名', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
project: [
|
project: [
|
||||||
{ required: true, message: '请选择项目', trigger: 'change' }
|
{ required: true, message: '请选择项目', trigger: 'change' }
|
||||||
@ -63,6 +68,7 @@ export default {
|
|||||||
this.formModel.id = data.id;
|
this.formModel.id = data.id;
|
||||||
this.formModel.domainName = data.domainName;
|
this.formModel.domainName = data.domainName;
|
||||||
this.formModel.project = data.project;
|
this.formModel.project = data.project;
|
||||||
|
this.formModel.resourcesDomainName = data.resourcesDomainName;
|
||||||
}
|
}
|
||||||
this.dialogVisible = true;
|
this.dialogVisible = true;
|
||||||
},
|
},
|
||||||
@ -72,7 +78,8 @@ export default {
|
|||||||
const data = {
|
const data = {
|
||||||
id: this.formModel.id,
|
id: this.formModel.id,
|
||||||
domainName: this.formModel.domainName,
|
domainName: this.formModel.domainName,
|
||||||
project: this.formModel.project.toUpperCase()
|
project: this.formModel.project.toUpperCase(),
|
||||||
|
resourcesDomainName: this.formModel.resourcesDomainName
|
||||||
};
|
};
|
||||||
if (data.id) {
|
if (data.id) {
|
||||||
updateProjectServer(data.id, data).then(resp => {
|
updateProjectServer(data.id, data).then(resp => {
|
||||||
@ -99,7 +106,8 @@ export default {
|
|||||||
this.formModel = {
|
this.formModel = {
|
||||||
id: '',
|
id: '',
|
||||||
domainName: '',
|
domainName: '',
|
||||||
project: ''
|
project: '',
|
||||||
|
resourcesDomainName: ''
|
||||||
};
|
};
|
||||||
this.$refs.dataform.resetForm();
|
this.$refs.dataform.resetForm();
|
||||||
this.dialogVisible = false;
|
this.dialogVisible = false;
|
||||||
|
@ -44,9 +44,13 @@ export default {
|
|||||||
indexShow: true,
|
indexShow: true,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
title: '域名',
|
title: '接口域名',
|
||||||
prop: 'domainName'
|
prop: 'domainName'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: '资源域名',
|
||||||
|
prop: 'resourcesDomainName'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '项目名称',
|
title: '项目名称',
|
||||||
prop: 'projectCode',
|
prop: 'projectCode',
|
||||||
|
Loading…
Reference in New Issue
Block a user