Merge remote-tracking branch 'origin/dev' into test

# Conflicts:
#	src/router/index.js
This commit is contained in:
fan 2019-10-31 16:04:57 +08:00
commit a250d54cb4
11 changed files with 1387 additions and 1427 deletions

File diff suppressed because one or more lines are too long

View File

@ -186,7 +186,6 @@ class IbpPan {
}
setDeviceStatus(list) {
const deviceList = Object.values(this.ibpDevice);
console.log(list, deviceList);
deviceList.forEach(elem =>{
(list || []).forEach(it =>{
if (elem.model.linkDevice === it.code) {

View File

@ -3,9 +3,9 @@ export function getBaseUrl() {
let BASE_API;
if (process.env.NODE_ENV === 'development') {
// BASE_API = 'https://joylink.club/jlcloud';
// BASE_API = 'https://test.joylink.club/jlcloud';
BASE_API = 'https://test.joylink.club/jlcloud';
// BASE_API = 'http://192.168.3.5:9000'; // 袁琪
BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.6:9000'; // 旭强
// BASE_API = 'http://192.168.3.41:9000'; // 王兴杰
} else {
BASE_API = process.env.VUE_APP_BASE_API;

View File

@ -60,7 +60,7 @@
import { createLesson, updateLesson, getLessonDetail } from '@/api/jmap/lessondraft';
import { getCommodityMapProduct } from '@/api/management/mapprd';
import { getSkinCodeList } from '@/api/management/mapskin';
import { UrlConfig } from '@/router/index';
// import { UrlConfig } from '@/router/index';
export default {
name: 'CourseEdit',
@ -187,7 +187,8 @@ export default {
}
},
back() {
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}/${this.$route.query.skinCode}`, query: {cityCode: this.$route.query.cityCode} });
// this.$router.push({ path: `${UrlConfig.design.lessonHome}/${this.$route.query.mapId}/${this.$route.query.skinCode}`, query: {cityCode: this.$route.query.cityCode} });
this.$router.go(-1);
}
}
};

View File

@ -2,37 +2,13 @@
<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="$t('publish.trainingType')" prop="course">
<el-select
v-model="form.course"
:placeholder="$t('publish.selectTypeScope')"
:disabled="editOk"
style="width:240px;"
@change="changeCourse(form.course)"
>
<el-option
v-for="nor in options"
:key="nor.id"
:label="nor.name"
:value="nor.code"
:disabled="nor.disabled"
/>
<el-select v-model="form.course" :placeholder="$t('publish.selectTypeScope')" :disabled="editOk" style="width:240px;" @change="changeCourse(form.course)">
<el-option v-for="nor in options" :key="nor.id" :label="nor.name" :value="nor.code" :disabled="nor.disabled" />
</el-select>
</el-form-item>
<el-form-item :label="$t('publish.operationType')">
<el-select
v-model="form.operateType"
clearable
:placeholder="$t('publish.selectScope')"
:disabled="editOk"
@change="changeOperation(form.operateType)"
>
<el-option
v-for="nor in operationTypeList"
:key="nor.id"
:label="nor.name"
:value="nor.code"
:disabled="nor.disabled"
/>
<el-select v-model="form.operateType" clearable :placeholder="$t('publish.selectScope')" :disabled="editOk" @change="changeOperation(form.operateType)">
<el-option v-for="nor in operationTypeList" :key="nor.id" :label="nor.name" :value="nor.code" :disabled="nor.disabled" />
</el-select>
</el-form-item>
<el-form-item :label="$t('publish.questionNumbers')" prop="number">

View File

@ -1,27 +1,16 @@
<template>
<div class="exam-rule">
<el-scrollbar wrap-class="scrollbar-wrapper" :style="{height: height + 'px'}">
<el-form ref="form" :model="form" :rules="rules" label-width="120px" class="demo-form">
<el-form-item :label="$t('publish.testName')" prop="name">
<el-input v-model="form.name" :placeholder="$t('publish.inputTestName')" />
</el-form-item>
<el-form-item :label="$t('publish.testScope')" prop="region">
<el-select
v-model="form.region"
:placeholder="$t('publish.selectTestScope')"
style="width: 100%;"
:disabled="isEdit || selectDisable"
>
<el-select v-model="form.region" :placeholder="$t('publish.selectTestScope')" style="width: 100%;" :disabled="isEdit || selectDisable">
<el-option v-for="nor in options" :key="nor.id" :label="nor.name" :value="nor.id" />
</el-select>
</el-form-item>
<el-form-item :label="$t('publish.testDuration')" prop="duration">
<el-input
v-model="form.duration"
placeholder="90"
style="float: left; width: calc(100% - 80px);"
:disabled="isEdit"
/>
<el-input v-model="form.duration" placeholder="90" style="float: left; width: calc(100% - 80px);" :disabled="isEdit" />
<span style="width:80px; display: block;float: left; text-align: center;">&nbsp;{{ $t('publish.durationMinutes') }}</span>
</el-form-item>
<el-form-item :label="$t('publish.testDate')">
@ -71,7 +60,6 @@
<el-button type="primary" @click="submitForm" v-else>{{ $t('error.nextStep') }}</el-button>
</el-form-item> -->
</el-form>
</el-scrollbar>
</div>
</template>
@ -81,12 +69,6 @@ import { getExamLessonDetail, updateExamRules } from '@/api/management/exam';
export default {
name: 'ExamFrom',
props: {
height: {
type: Number,
default: 800
}
},
data() {
var fullMark = (rule, value, callback) => {
if (!value) {
@ -284,7 +266,7 @@ export default {
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.exam-rule {
overflow-y: auto;
height: 100%;
}
.line {

View File

@ -1,9 +1,9 @@
<template>
<!-- <el-card> -->
<!-- <div v-if="lessonName" slot="header" style="text-align: center;">
<div class="joylink-card" :class="lessonName ? 'card-box' : ''">
<div v-if="lessonName" class="card-title">
<b>{{ $t('publish.lessonName') }} {{ lessonName }}</b>
</div> -->
<div class="exam-box">
</div>
<div class="exam-box" :style="{ 'height': lessonName ? 'calc(100% - 47px)' : '' }">
<el-steps class="steps" :active="display">
<el-step :title="$t('publish.testDefinitionMaking')" icon="el-icon-edit" />
<el-step :title="$t('publish.examRuleMaking')" icon="el-icon-setting" />
@ -26,7 +26,7 @@
</el-button-group>
</div>
</div>
<!-- </el-card> -->
</div>
</template>
<script>
@ -44,7 +44,7 @@ export default {
return {
display: 1,
course: {},
// lessonName: '',
lessonName: '',
formData: {}
};
},
@ -69,11 +69,11 @@ export default {
loadInitData() {
getPublishLessonList().then(response => {
this.OrganizationList = response.data;
// this.OrganizationList.forEach(elem => {
// if (elem.id == this.$route.params.lessonId) {
// this.lessonName = elem.name;
// }
// });
this.OrganizationList.forEach(elem => {
if (elem.id == this.$route.params.lessonId) {
this.lessonName = elem.name;
}
});
});
},
definition(data) {
@ -109,9 +109,21 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.joylink-card{
.card-title{
text-align: center;
height: 47px;
line-height: 47px;
border-bottom: 1px solid #e6e6e6;
}
}
.card-box{
overflow: hidden;
height: 100%;
}
.exam-box {
padding-top: 10px;
height: 100%;
overflow: auto;
/deep/ {
.el-step__icon.is-icon {

View File

@ -2,7 +2,7 @@
<div class="exam-rule">
<span>{{ $t('publish.fullScoreTips') }} {{ course.fullMark }} {{ $t('publish.scorePoints') }}</span>
<el-button class="addList" size="small" @click="handleAdd">{{ $t('publish.addRules') }}</el-button>
<el-table :data="ruleList" border show-summary style="width: 100%" :height="height">
<el-table :data="ruleList" border show-summary style="width: 100%; min-height: 300px;">
<el-table-column prop="name" :label="$t('publish.trainingType')" />
<el-table-column prop="num" :label="$t('publish.questionsNumber')" width="100" />
<el-table-column prop="point" :label="$t('publish.eachScore')" width="100" />
@ -14,10 +14,6 @@
</template>
</el-table-column>
</el-table>
<!-- <div class="btn-footer">
<el-button @click="regulation">上一步</el-button>
<el-button type="primary" @click="creatOk">新增</el-button>
</div> -->
<edit-rule
ref="addRule"
:course-id="courseId"
@ -43,10 +39,6 @@ export default {
course: {
type: Object,
default: null
},
height: {
type: Number,
default: 800
}
},
data() {

View File

@ -1,20 +1,14 @@
<template>
<el-card>
<div v-if="lessonName" slot="header" style="text-align: center;">
<div class="joylink-card">
<div v-if="lessonName" class="card-title">
<b>{{ $t('publish.lessonName') }} {{ lessonName }}</b>
</div>
<div :style="{ height: height +'px' }">
<el-scrollbar wrap-class="scrollbar-wrapper" style="">
<QueryListPage
ref="queryListPage"
:pager-config="pagerConfig"
:query-form="queryForm"
:query-list="queryList"
style="height: 100%;"
/>
<div :style="{ 'height': lessonName ? 'calc(100% - 47px)' : '100%' }">
<el-scrollbar wrap-class="scrollbar-wrapper">
<QueryListPage ref="queryListPage" :pager-config="pagerConfig" :query-form="queryForm" :query-list="queryList" />
</el-scrollbar>
</div>
</el-card>
</div>
</template>
<script>
@ -182,11 +176,6 @@ export default {
}
};
},
computed: {
height() {
return /\/exam\//.test(`${this.$route.path}`)? this.$store.state.app.height - 92: this.$store.state.app.height - 65;
}
},
created() {
this.loadInitData();
},
@ -324,6 +313,15 @@ export default {
};
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.joylink-card {
height: 100%;
}
.card-title{
text-align: center;
height: 47px;
line-height: 47px;
border-bottom: 1px solid #e6e6e6;
}
/deep/ {
.is-always-shadow {
box-shadow: none;