Merge branch 'dev_product' of https://git.qcloud.com/joylink/jl-nclient into dev_product

This commit is contained in:
joylink_cuiweidong 2019-10-10 16:18:43 +08:00
commit e31bd2730f
5 changed files with 46 additions and 29 deletions

View File

@ -54,3 +54,38 @@ export function runUserPlanNotify({ planId }) {
method: 'get' method: 'get'
}); });
} }
/** 管理员获取需审核的课程列表 */
export function reviewLessonList(params) {
return request({
url: `/api/review/lesson`,
method: 'get',
params
});
}
/** 管理员发布课程接口 */
export function adminPublishLesson(data, id) {
return request({
url: `/api/review/${id}/publishLesson`,
method: 'post',
data: data
});
}
/** 管理员驳回课程发布申请 */
export function rejectedLessonRelease(data, id) {
return request({
url: `/api/review/${id}`,
method: 'post',
data: data
});
}
/** 普通用户申请发布和撤销申请 */
export function releaseOrCancel(id, status) {
return request({
url: `/api/review/releaseOrCancel/${id}/${status}`,
method: 'get'
});
}

View File

@ -24,23 +24,7 @@
</span> </span>
</el-tree> </el-tree>
</el-scrollbar> </el-scrollbar>
<!-- <div class="buttonList">
<el-button size="small" type="primary" class="eachButton uploadDemo ">
<input
ref="files"
type="file"
class="file_box"
accept=".json, application/json"
@change="importf"
> -->
<!-- {{ $t('map.importMap') }} -->
<!-- 导入地图
</el-button>
<el-button size="small" type="primary" class="eachButton" @click="createMap">新建地图</el-button> -->
<!-- {{ $t('map.newConstruction') }} -->
<!-- </div> -->
</el-card> </el-card>
<!-- <drap-Up :height-up="heightUp" :width="width" @drapHeight="drapHeight" /> -->
</div> </div>
</template> </template>
<script> <script>
@ -48,19 +32,15 @@
import { postBuildMapImport } from '@/api/jmap/mapdraft'; import { postBuildMapImport } from '@/api/jmap/mapdraft';
import { getPublishMapTree } from '@/api/management/mapprd'; import { getPublishMapTree } from '@/api/management/mapprd';
import { getMapList } from '@/api/designPlatform'; import { getMapList } from '@/api/designPlatform';
// getUserMapTree
import { UrlConfig } from '@/router/index'; import { UrlConfig } from '@/router/index';
import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth'; import { getSessionStorage, setSessionStorage, removeSessionStorage } from '@/utils/auth';
import FilterCity from '@/views/components/filterCity'; import FilterCity from '@/views/components/filterCity';
// import drapUp from '@/views/components/drapUp/index';
import localStore from 'storejs'; import localStore from 'storejs';
// import MapOperateMenu from '@/views/map/mapdraft/mapmanage/operateMenu';
export default { export default {
name: 'publicMapList', name: 'publicMapList',
components: { components: {
FilterCity, FilterCity,
// MapOperateMenu
}, },
props: { props: {
height: { height: {
@ -129,17 +109,13 @@
} }
}, },
clickEvent(obj, data, ele) { clickEvent(obj, data, ele) {
if (data.parent && data.parent.data){
// this.mapId = data.parent.data.id;
// this.skinCode = data.parent.data.skinCode;
}
switch(obj.type){ switch(obj.type){
case 'scriptDesign':{ case 'scriptDesign':{
this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}` }); this.$router.push({ path: `${UrlConfig.design.scriptHome}/${obj.mapId}` });
break; break;
} }
case 'lessonDesign': { case 'lessonDesign': {
this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}/${obj.skinCode}` }); this.$router.push({ path: `${UrlConfig.design.lessonHome}/${obj.mapId}/${obj.skinCode}`,query: {cityCode:data.parent.data.cityCode} });
break; break;
} }
case 'runPlanDesign': { case 'runPlanDesign': {

View File

@ -129,6 +129,7 @@
}, },
publish(row) { publish(row) {
row.skinCode = this.$route.params.skinCode; row.skinCode = this.$route.params.skinCode;
row.cityCode = this.$route.query.cityCode;
this.$refs.publishLesson.doShow(row); this.$refs.publishLesson.doShow(row);
}, },
deleteLesson(row) { deleteLesson(row) {

View File

@ -4,13 +4,13 @@
<el-form label-position="right" ref="form" :rules="rules" :model="editModel" label-width="140px" <el-form label-position="right" ref="form" :rules="rules" :model="editModel" label-width="140px"
@submit.native.prevent> @submit.native.prevent>
<el-form-item :label="this.$t('lesson.releaseAssociatedCity')" prop="cityCode"> <el-form-item :label="this.$t('lesson.releaseAssociatedCity')" prop="cityCode">
<el-select v-model="editModel.cityCode" @change="cityChange" :placeholder="this.$t('rules.pleaseSelect')"> <el-select v-model="editModel.cityCode" @change="cityChange" :placeholder="this.$t('rules.pleaseSelect')" :disabled="this.disabled">
<el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code"> <el-option v-for="item in cityList" :key="item.code" :label="item.name" :value="item.code">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="this.$t('lesson.releaseAssociatedMap')" prop="mapId"> <el-form-item :label="this.$t('lesson.releaseAssociatedMap')" prop="mapId">
<el-select v-model="editModel.mapId" @change="mapChange" :placeholder="this.$t('rules.pleaseSelect')"> <el-select v-model="editModel.mapId" @change="mapChange" :placeholder="this.$t('rules.pleaseSelect')" :disabled="this.disabled">
<el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id"> <el-option v-for="item in mapList" :key="item.id" :label="item.name" :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
@ -31,6 +31,7 @@
import { getPublishMapListBySkinCode } from '@/api/jmap/map'; import { getPublishMapListBySkinCode } from '@/api/jmap/map';
import { getLessonNameByMapIdAndLessonId } from '@/api/jmap/lessondraft'; import { getLessonNameByMapIdAndLessonId } from '@/api/jmap/lessondraft';
import { publishLesson } from '@/api/jmap/lessondraft'; import { publishLesson } from '@/api/jmap/lessondraft';
import { adminPublishLesson } from '@/api/designPlatform';
export default { export default {
name: 'LessonPublish', name: 'LessonPublish',
@ -38,6 +39,7 @@
return { return {
dialogShow: false, dialogShow: false,
loading: false, loading: false,
disabled: true,
mapList: [], mapList: [],
cityList: [], cityList: [],
cityMapDict: {}, cityMapDict: {},
@ -86,7 +88,7 @@
this.editModel = { this.editModel = {
id: model.id, id: model.id,
name: model.name, name: model.name,
mapId: '', mapId: this.$route.params.mapId,
prdCode: model.prdCode, prdCode: model.prdCode,
cityCode: model.cityCode, cityCode: model.cityCode,
}; };
@ -104,6 +106,7 @@
this.$Dictionary.cityType().then(list => { this.$Dictionary.cityType().then(list => {
this.cityList = list.filter(elem => { return this.cityMapDict[elem.code] }); this.cityList = list.filter(elem => { return this.cityMapDict[elem.code] });
}) })
this.mapList = this.cityMapDict[model.cityCode];
}) })
} }

View File

@ -112,7 +112,9 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.sortTree.initData(data); this.$refs.sortTree.initData(data);
}); });
} },
refresh(filterSelect) {
}
} }
}; };
</script> </script>