mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
@@ -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-13 15:30:27
|
||||
* @FilePath: /fe-manage/src/api/config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
||||
@@ -76,7 +76,7 @@ export default {
|
||||
{
|
||||
id: 1,
|
||||
name: "管理员",
|
||||
go: "/manage/learningpath",
|
||||
go: "/learningpath",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div
|
||||
@click="backPage"
|
||||
style="cursor: pointer"
|
||||
to="/manage/libraryAdd"
|
||||
to="/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 {
|
||||
|
||||
Reference in New Issue
Block a user