调整本地项目

This commit is contained in:
fan 2020-03-31 15:11:20 +08:00
parent 2093dea56d
commit e35149248d
6 changed files with 26 additions and 15 deletions

View File

@ -1,5 +1,6 @@
# just a flag
NODE_ENV = 'development'
#VUE_APP_PRO = 'local'
# base api
# VUE_APP_BASE_API = 'https://joylink.club/jlcloud'

View File

@ -1,5 +1,6 @@
# just a flag
NODE_ENV = 'Local'
VUE_APP_PRO = 'local'
# base api
VUE_APP_BASE_API = 'https://joylink.club/jlcloud'

View File

@ -8,7 +8,7 @@
"dev": "vue-cli-service serve --open",
"build": "vue-cli-service build",
"test": "vue-cli-service build --mode staging",
"local": "vue-cli-service build --mode local",
"local": "vue-cli-service build --mode native",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",

View File

@ -14,8 +14,8 @@
<limit-list :ref="`limit`" :course-model="courseModel" @initLoadPage="refresh" />
</div>
<div class="btn-buy">
<el-button type="success" :disabled="disabled" @click="buy">{{ $t('global.buy') }}</el-button>
<el-button v-if="hasPermssion && !isComprehensive" type="primary" :disabled="disabled" @click="distribute">{{ $t('global.distributePermission') }}</el-button>
<el-button v-if="!isLocal" type="success" :disabled="disabled" @click="buy">{{ $t('global.buy') }}</el-button>
<el-button v-if="hasPermssion && !isComprehensive && !isLocal" type="primary" :disabled="disabled" @click="distribute">{{ $t('global.distributePermission') }}</el-button>
<el-button v-show="isStartDemon" :disabled="disabled" type="primary" @click="start">{{ $t('demonstration.startSimulation') }}</el-button>
<el-button v-show="isCreateRoom" :disabled="disabled" type="primary" @click="start">{{ $t('demonstration.createRoom') }}</el-button>
<el-button v-show="isInRoom" :disabled="disabled" type="primary" @click="joinRoom">{{ $t('demonstration.enterRoom') }}</el-button>
@ -80,6 +80,9 @@ export default {
}
return isShow;
},
isLocal() { //
return process.env.VUE_APP_PRO === 'local';
},
isComprehensive() {
return this.courseModel.prdType === '03';
},

View File

@ -166,16 +166,19 @@ export default {
cityCode: elem.cityCode
}
);
elem.children.push(
{
id: '5',
name: 'IBP盘设计',
type: 'ibpDesign',
mapId: elem.id,
lineCode: elem.lineCode,
cityCode: elem.cityCode
}
);
if (process.env.VUE_APP_PRO !== 'local') {
elem.children.push(
{
id: '5',
name: 'IBP盘设计',
type: 'ibpDesign',
mapId: elem.id,
lineCode: elem.lineCode,
cityCode: elem.cityCode
}
);
}
});
this.treeData = res.data;
this.treeList = this.filterText

View File

@ -43,8 +43,8 @@
</el-tabs>
</div>
<div class="btn-buy">
<el-button :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button>
<el-button v-if="hasPermssion" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
<el-button v-if="!isLocal" :disabled="disabled" type="success" @click="buy">{{ $t('exam.buy') }}</el-button>
<el-button v-if="hasPermssion && !isLocal" :disabled="disabled" type="primary" @click="distribute">{{ $t('exam.distributePermission') }}</el-button>
<el-button v-if="hasPermssion" :disabled="disabled" type="primary" @click="checkCourse">{{ $t('exam.viewCoursePapers') }}</el-button>
<el-button type="primary" :disabled="disabled" @click="backLessonList">{{ $t('exam.returnCourseList') }}</el-button>
</div>
@ -99,6 +99,9 @@ export default {
}
return isShow;
},
isLocal() { //
return process.env.VUE_APP_PRO === 'local';
},
isAddRule() {
let sumRemains = 0;
if (this.courseModel.pmsList) {