mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-07 18:06:46 +08:00
Merge remote-tracking branch 'origin/manage-release' into manage-release
This commit is contained in:
@@ -44,7 +44,7 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本0.9.12------------");
|
||||
console.log("版本0.9.13------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 14:32:52
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-13 09:24:16
|
||||
* @LastEditTime: 2022-12-14 17:40:35
|
||||
* @FilePath: /fe-manage/src/api/config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
||||
@@ -193,7 +193,7 @@ const setCookie = (name, value, perpetual) => {
|
||||
|
||||
//先写一个方法
|
||||
function getCookie(name) {
|
||||
return document.cookie?.split(";").find(e => e.includes(name)).replace(`${name}=`,'') || ''
|
||||
return document.cookie?.split(";").find(e => e.includes(name)).replace(`${name}=`, '') || ''
|
||||
//1.获取cookie字符串
|
||||
// const cookies = document.cookie;
|
||||
// console.log('cookies',cookies)
|
||||
@@ -219,7 +219,7 @@ function getCookie(name) {
|
||||
//滚动加载信息
|
||||
const scrollLoad = (e) => {
|
||||
// console.log("滚动", e, b);
|
||||
const {target} = e;
|
||||
const { target } = e;
|
||||
const scrllHeight = target.scrollHeight - target.scrollTop;
|
||||
const clientHeight = target.clientHeight;
|
||||
// console.log("scrllHeight", scrllHeight, clientHeight);
|
||||
@@ -276,7 +276,7 @@ const commonData = {
|
||||
const organizationalTree = []
|
||||
|
||||
//嵌套页面
|
||||
const iframeUrl = "https://u-pre.boe.com/pc/iframe"
|
||||
const iframeUrl = "https://u-pre.boe.com/pc-release/iframe"
|
||||
//二维码
|
||||
const codeUrl = "https://u-pre.boe.com"
|
||||
export {
|
||||
|
||||
@@ -76,12 +76,12 @@ export default {
|
||||
{
|
||||
id: 1,
|
||||
name: "管理员",
|
||||
go: "/manage/learningpath",
|
||||
go: "/manage-release/learningpath",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "学员",
|
||||
go: "https://u.boe.com/pc/uc/study/courses",
|
||||
go: "https://u.boe.com/pc-release/uc/study/courses",
|
||||
},
|
||||
],
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-09 09:26:26
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-21 17:42:59
|
||||
* @LastEditTime: 2022-12-14 17:38:53
|
||||
* @FilePath: /fe-manage/src/router/index.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
@@ -17,7 +17,7 @@ const routes = [
|
||||
...routesConfig
|
||||
]
|
||||
const router = createRouter({
|
||||
history: createWebHistory("/manage/"),
|
||||
history: createWebHistory("/manage-release/"),
|
||||
routes,
|
||||
|
||||
})
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div
|
||||
@click="backPage"
|
||||
style="cursor: pointer"
|
||||
to="/manage/libraryAdd"
|
||||
to="/manage-release/libraryAdd"
|
||||
class="goback"
|
||||
>
|
||||
<span class="return"></span><span class="returntext">返回</span>
|
||||
@@ -43,7 +43,7 @@
|
||||
<ProjectClass v-model:value="projectInfo.category"></ProjectClass>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name" style="align-items: flex-start;">
|
||||
<div class="name" style="align-items: flex-start">
|
||||
<div class="namebox" style="margin-top: 10px">
|
||||
<img
|
||||
class="nameimg"
|
||||
@@ -151,8 +151,7 @@
|
||||
<div class="inname">同步学习记录</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-checkbox
|
||||
v-model:checked="projectInfo.courseSyncFlag"
|
||||
<a-checkbox v-model:checked="projectInfo.courseSyncFlag"
|
||||
><span
|
||||
style="
|
||||
width: 100%;
|
||||
@@ -197,9 +196,7 @@
|
||||
<div class="inname">是否BOEU实施</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-radio-group
|
||||
v-model:value="projectInfo.boeFlag"
|
||||
>
|
||||
<a-radio-group v-model:value="projectInfo.boeFlag">
|
||||
<a-radio :value="1">是</a-radio>
|
||||
<a-radio :value="0">否</a-radio>
|
||||
</a-radio-group>
|
||||
@@ -211,19 +208,17 @@
|
||||
<div class="btn">
|
||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||
>确定
|
||||
</a-button
|
||||
>
|
||||
</a-button>
|
||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
|
||||
import {useStore} from "vuex";
|
||||
import {ref, onMounted, watch} from "vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import {useRouter, useRoute} from "vue-router";
|
||||
import { useStore } from "vuex";
|
||||
import { ref, onMounted, watch } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import * as api from "../../api/indexTemplate";
|
||||
import ProjectClass from "@/components/project/ProjectClass";
|
||||
import TrainClass from "@/components/project/TrainClass";
|
||||
@@ -234,23 +229,33 @@ import ProjectLevel from "@/components/project/ProjectLevel";
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useStore();
|
||||
const projectInfo = ref({})
|
||||
const projectPic = ref([])
|
||||
const projectInfo = ref({});
|
||||
const projectPic = ref([]);
|
||||
|
||||
onMounted(() => {
|
||||
getDetail()
|
||||
projectPic.value = store.state.projectPic.map((e) => ({value: e.dictValue, label: e.dictName}));
|
||||
})
|
||||
getDetail();
|
||||
projectPic.value = store.state.projectPic.map((e) => ({
|
||||
value: e.dictValue,
|
||||
label: e.dictName,
|
||||
}));
|
||||
});
|
||||
|
||||
watch(() => route.query.projectTemplateId, () => {
|
||||
getDetail()
|
||||
})
|
||||
watch(
|
||||
() => route.query.projectTemplateId,
|
||||
() => {
|
||||
getDetail();
|
||||
}
|
||||
);
|
||||
|
||||
const getDetail = () => route.query.projectTemplateId && api.templateDetail(route.query.projectTemplateId)
|
||||
.then((res) => {
|
||||
const getDetail = () =>
|
||||
route.query.projectTemplateId &&
|
||||
api.templateDetail(route.query.projectTemplateId).then((res) => {
|
||||
projectInfo.value = res.data.data.projectTemplateInfo;
|
||||
projectInfo.value.rangeTime = [projectInfo.value.beginTime, projectInfo.value.endTime]
|
||||
})
|
||||
projectInfo.value.rangeTime = [
|
||||
projectInfo.value.beginTime,
|
||||
projectInfo.value.endTime,
|
||||
];
|
||||
});
|
||||
|
||||
const backPage = () => {
|
||||
router.back();
|
||||
@@ -285,18 +290,22 @@ const createProject = () => {
|
||||
return;
|
||||
}
|
||||
}
|
||||
api.templateEdit({...projectInfo.value, courseSyncFlag: projectInfo.value.courseSyncFlag ? 1 : 0}).then(() => {
|
||||
api
|
||||
.templateEdit({
|
||||
...projectInfo.value,
|
||||
courseSyncFlag: projectInfo.value.courseSyncFlag ? 1 : 0,
|
||||
})
|
||||
.then(() => {
|
||||
message.destroy();
|
||||
message.success("编辑成功");
|
||||
router.back()
|
||||
})
|
||||
router.back();
|
||||
});
|
||||
};
|
||||
|
||||
function managerChange(e, l, d, t) {
|
||||
projectInfo.value.valuesourceBelongId = d
|
||||
projectInfo.value.sourceBelongName = t
|
||||
projectInfo.value.valuesourceBelongId = d;
|
||||
projectInfo.value.sourceBelongName = t;
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.active {
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 14:32:52
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-11-21 15:15:30
|
||||
* @LastEditTime: 2022-12-14 17:38:38
|
||||
* @FilePath: /fe-manage/vue.config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
const {defineConfig} = require("@vue/cli-service");
|
||||
const { defineConfig } = require("@vue/cli-service");
|
||||
|
||||
module.exports = defineConfig({
|
||||
publicPath: "/manage",
|
||||
publicPath: "/manage-release",
|
||||
// transpileDependencies: true,
|
||||
// devServer: {
|
||||
// port: 8080,
|
||||
|
||||
Reference in New Issue
Block a user