mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-16 14:26:45 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
49
src/App.vue
49
src/App.vue
@@ -1,27 +1,27 @@
|
|||||||
<template>
|
<template>
|
||||||
<div id="container" v-if="!isLogin">
|
<div id="container" v-if="!isLogin">
|
||||||
<nav-top/>
|
<nav-top />
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<nav-left/>
|
<nav-left />
|
||||||
<div style="flex: 1; display: flex; flex-direction: column; width: 0">
|
<div style="flex: 1; display: flex; flex-direction: column; width: 0">
|
||||||
<open-pages/>
|
<open-pages />
|
||||||
<bread-crumb/>
|
<bread-crumb />
|
||||||
<main>
|
<main>
|
||||||
<a-config-provider :locale="zhCN">
|
<a-config-provider :locale="zhCN">
|
||||||
<router-view/>
|
<router-view />
|
||||||
</a-config-provider>
|
</a-config-provider>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="container" v-if="isLogin">
|
<div id="container" v-if="isLogin">
|
||||||
<router-view/>
|
<router-view />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {computed, defineComponent, ref, watch} from "vue";
|
import { computed, defineComponent, ref, watch } from "vue";
|
||||||
import {useRouter, useRoute} from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
import {useStore} from "vuex";
|
import { useStore } from "vuex";
|
||||||
import NavLeft from "@/components/NavLeft";
|
import NavLeft from "@/components/NavLeft";
|
||||||
import NavTop from "@/components/NavTop";
|
import NavTop from "@/components/NavTop";
|
||||||
import OpenPages from "@/components/OpenPages";
|
import OpenPages from "@/components/OpenPages";
|
||||||
@@ -30,7 +30,6 @@ import zhCN from "ant-design-vue/es/locale/zh_CN";
|
|||||||
import * as api from "./api/index1";
|
import * as api from "./api/index1";
|
||||||
import * as api1 from "@/api/index1";
|
import * as api1 from "@/api/index1";
|
||||||
import * as api2 from "@/api/index";
|
import * as api2 from "@/api/index";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
NavLeft,
|
NavLeft,
|
||||||
@@ -44,20 +43,17 @@ export default defineComponent({
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const isLogin = ref(false);
|
const isLogin = ref(false);
|
||||||
// console.log("router", router.getRoutes(), route);
|
// console.log("router", router.getRoutes(), route);
|
||||||
console.log("版本0.12------------");
|
console.log("版本0.13------------");
|
||||||
const routes = computed(() => {
|
const routes = computed(() => {
|
||||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.path,
|
() => route.path,
|
||||||
() => {
|
() => {
|
||||||
route.path === "/login" && (isLogin.value = true);
|
route.path === "/login" && (isLogin.value = true);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const currentRouteName = computed(() => route.name);
|
const currentRouteName = computed(() => route.name);
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
console.log(store);
|
console.log(store);
|
||||||
getUserInfo();
|
getUserInfo();
|
||||||
@@ -72,34 +68,32 @@ export default defineComponent({
|
|||||||
getMemberInfo();
|
getMemberInfo();
|
||||||
getOrgTree();
|
getOrgTree();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getMemberInfo() {
|
async function getMemberInfo() {
|
||||||
const list = localStorage.getItem('memberInitInfo');
|
const list = localStorage.getItem("memberInitInfo");
|
||||||
if (list) {
|
if (list) {
|
||||||
store.commit("SET_MEMBER_INFO", JSON.parse(list));
|
store.commit("SET_MEMBER_INFO", JSON.parse(list));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const memberInitInfo = await api1.getMemberInfo({keyWord: '', pageNo: 1, pageSize: 10}).then(res=>res.data.data.rows);
|
const memberInitInfo = await api1
|
||||||
|
.getMemberInfo({ keyWord: "", pageNo: 1, pageSize: 10 })
|
||||||
|
.then((res) => res.data.data.rows);
|
||||||
store.commit("SET_MEMBER_INFO", memberInitInfo);
|
store.commit("SET_MEMBER_INFO", memberInitInfo);
|
||||||
localStorage.setItem('memberInitInfo', JSON.stringify(memberInitInfo));
|
localStorage.setItem("memberInitInfo", JSON.stringify(memberInitInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getUserInfo() {
|
async function getUserInfo() {
|
||||||
const userInfo = await api2.userInfo()
|
const userInfo = await api2.userInfo();
|
||||||
store.commit("SET_USER", userInfo);
|
store.commit("SET_USER", userInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function initDict(key) {
|
async function initDict(key) {
|
||||||
let list = localStorage.getItem(key);
|
let list = localStorage.getItem(key);
|
||||||
if (list) {
|
if (list) {
|
||||||
store.commit("SET_DICT", {key, data: JSON.parse(list)});
|
store.commit("SET_DICT", { key, data: JSON.parse(list) });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
list = await getDictList(key);
|
list = await getDictList(key);
|
||||||
localStorage.setItem(key, JSON.stringify(list));
|
localStorage.setItem(key, JSON.stringify(list));
|
||||||
store.commit("SET_DICT", {key, data: list});
|
store.commit("SET_DICT", { key, data: list });
|
||||||
}
|
}
|
||||||
|
|
||||||
const getDictList = (param) =>
|
const getDictList = (param) =>
|
||||||
api1
|
api1
|
||||||
.getDict({
|
.getDict({
|
||||||
@@ -108,7 +102,6 @@ export default defineComponent({
|
|||||||
setCode: param,
|
setCode: param,
|
||||||
})
|
})
|
||||||
.then((res) => res.data.data.rows);
|
.then((res) => res.data.data.rows);
|
||||||
|
|
||||||
//获取组织树
|
//获取组织树
|
||||||
const getOrgTree = () => {
|
const getOrgTree = () => {
|
||||||
const orgtreeList = localStorage.getItem("orgtreeList");
|
const orgtreeList = localStorage.getItem("orgtreeList");
|
||||||
@@ -136,9 +129,7 @@ export default defineComponent({
|
|||||||
console.log("组织树获取失败", err);
|
console.log("组织树获取失败", err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isLogin,
|
isLogin,
|
||||||
routes,
|
routes,
|
||||||
@@ -159,17 +150,14 @@ export default defineComponent({
|
|||||||
color: #2c3e50;
|
color: #2c3e50;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#container {
|
#container {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-width: 1000px;
|
min-width: 1000px;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
background-color: rgba(245, 247, 250, 1);
|
background-color: rgba(245, 247, 250, 1);
|
||||||
|
|
||||||
main {
|
main {
|
||||||
height: 0;
|
height: 0;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
@@ -185,7 +173,6 @@ export default defineComponent({
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.07);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @media screen and (max-width: 1366px) {
|
// @media screen and (max-width: 1366px) {
|
||||||
// .cmMain {
|
// .cmMain {
|
||||||
// width: 750px;
|
// width: 750px;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: lixg lixg@dongwu-inc.com
|
* @Author: lixg lixg@dongwu-inc.com
|
||||||
* @Date: 2022-11-21 14:32:52
|
* @Date: 2022-11-21 14:32:52
|
||||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||||
* @LastEditTime: 2022-12-03 19:52:09
|
* @LastEditTime: 2022-12-04 11:13:37
|
||||||
* @FilePath: /fe-manage/src/api/config.js
|
* @FilePath: /fe-manage/src/api/config.js
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
*/
|
*/
|
||||||
@@ -54,6 +54,7 @@ http.interceptors.response.use(
|
|||||||
} else {
|
} else {
|
||||||
if (code === 1000) {
|
if (code === 1000) {
|
||||||
// window.open("https://u-pre.boe.com/web/", '_self');
|
// window.open("https://u-pre.boe.com/web/", '_self');
|
||||||
|
// window.open("http://111.231.196.214:12013/manage/login", '_self');
|
||||||
}
|
}
|
||||||
console.log("api %o", msg);
|
console.log("api %o", msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2517,13 +2517,13 @@
|
|||||||
<!-- 学员管理-添加学员抽屉 -->
|
<!-- 学员管理-添加学员抽屉 -->
|
||||||
<!-- <StuAdd v-model:Stuvisible="Stuvisible" @sure="handlePostSure" /> -->
|
<!-- <StuAdd v-model:Stuvisible="Stuvisible" @sure="handlePostSure" /> -->
|
||||||
<!-- 添加学员抽屉 -->
|
<!-- 添加学员抽屉 -->
|
||||||
<proj-check-ship
|
<!-- <proj-check-ship
|
||||||
v-model:ProjCheckvisible="viewpowervisible"
|
v-model:ProjCheckvisible="viewpowervisible"
|
||||||
:selectProjectId="offcourseId"
|
:selectProjectId="offcourseId"
|
||||||
v-model:addAuthList="addStudentList"
|
v-model:addStudentList="addStudentList"
|
||||||
:authClassify="authClassify"
|
:authClassify="authClassify"
|
||||||
classify="addstudent"
|
classify="addstudent"
|
||||||
/>
|
/> -->
|
||||||
<!-- 新建在线课弹窗 -->
|
<!-- 新建在线课弹窗 -->
|
||||||
<addOnlineCourse
|
<addOnlineCourse
|
||||||
v-model:addOnlineCoursevisible="addOnlineCoursevisible"
|
v-model:addOnlineCoursevisible="addOnlineCoursevisible"
|
||||||
@@ -2551,7 +2551,7 @@
|
|||||||
:authClassify="authClassify"
|
:authClassify="authClassify"
|
||||||
classify="course"
|
classify="course"
|
||||||
/> -->
|
/> -->
|
||||||
<!-- 管理权抽屉 -->
|
<!--查看权抽屉 管理权抽屉 添加学员抽屉 -->
|
||||||
<proj-check-ship
|
<proj-check-ship
|
||||||
v-model:ProjCheckvisible="viewpowervisible"
|
v-model:ProjCheckvisible="viewpowervisible"
|
||||||
:selectProjectId="selectCourseId"
|
:selectProjectId="selectCourseId"
|
||||||
@@ -3329,7 +3329,7 @@ export default defineComponent({
|
|||||||
selectCourseId: null, //授权选择的id
|
selectCourseId: null, //授权选择的id
|
||||||
|
|
||||||
viewpowervisible: false, //查看权抽屉
|
viewpowervisible: false, //查看权抽屉
|
||||||
authClassify: null, //1:查看权 2:管理权
|
authClassify: null, //1:查看权 2:管理权 3:学员
|
||||||
addAuthList: null,
|
addAuthList: null,
|
||||||
|
|
||||||
addStudentList: null, //选中列表
|
addStudentList: null, //选中列表
|
||||||
@@ -3339,6 +3339,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
const showStuAdd = () => {
|
const showStuAdd = () => {
|
||||||
state.viewpowervisible = true;
|
state.viewpowervisible = true;
|
||||||
|
state.authClassify = 3;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 富文本 sssssssssssssss
|
// 富文本 sssssssssssssss
|
||||||
@@ -4864,10 +4865,15 @@ export default defineComponent({
|
|||||||
() => state.addAuthList,
|
() => state.addAuthList,
|
||||||
(res) => {
|
(res) => {
|
||||||
console.log("res", res, state.addAuthList);
|
console.log("res", res, state.addAuthList);
|
||||||
|
if (state.authClassify === 1 || state.authClassify === 2) {
|
||||||
let obj = {
|
let obj = {
|
||||||
type: 3,
|
type: 3,
|
||||||
tag:
|
tag:
|
||||||
state.authClassify === 1 ? 3 : state.authClassify === 2 ? 4 : null,
|
state.authClassify === 1
|
||||||
|
? 3
|
||||||
|
: state.authClassify === 2
|
||||||
|
? 4
|
||||||
|
: null,
|
||||||
opt: 3,
|
opt: 3,
|
||||||
deptList: res[1],
|
deptList: res[1],
|
||||||
groupList: res[2],
|
groupList: res[2],
|
||||||
@@ -4888,13 +4894,15 @@ export default defineComponent({
|
|||||||
console.log("添加授权失败", err);
|
console.log("添加授权失败", err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
//添加学员
|
//添加学员
|
||||||
watch(
|
watch(
|
||||||
() => state.addStudentList,
|
() => state.addAuthList,
|
||||||
(res) => {
|
(res) => {
|
||||||
console.log("res", res, state.addStudentList);
|
console.log("res", res, state.addStudentList);
|
||||||
|
if (state.authClassify === 3) {
|
||||||
let obj = {
|
let obj = {
|
||||||
deptList: res[1],
|
deptList: res[1],
|
||||||
groupList: res[2],
|
groupList: res[2],
|
||||||
@@ -4914,6 +4922,7 @@ export default defineComponent({
|
|||||||
console.log("添加学员失败", err);
|
console.log("添加学员失败", err);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const closeOnlineCoursevisible = () => {
|
const closeOnlineCoursevisible = () => {
|
||||||
|
|||||||
@@ -2,7 +2,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="projectAdd">
|
<div class="projectAdd">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title">{{ projectInfo.parentId ? '编辑' : '创建' }}项目</span>
|
<span class="title"
|
||||||
|
>{{ projectInfo.parentId ? "编辑" : "创建" }}项目</span
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
@click="backPage"
|
@click="backPage"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
@@ -67,7 +69,7 @@
|
|||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
:class="`box ${projectInfo.picUrl == src?'active':''}`"
|
:class="`box ${projectInfo.picUrl == src ? 'active' : ''}`"
|
||||||
style="
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
@@ -76,11 +78,13 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
"
|
||||||
v-for="(src,index) in projectPic"
|
v-for="(src, index) in projectPic"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="()=>{
|
@click="
|
||||||
projectInfo.picUrl = src
|
() => {
|
||||||
}"
|
projectInfo.picUrl = src;
|
||||||
|
}
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
style="
|
style="
|
||||||
@@ -124,8 +128,11 @@
|
|||||||
<div class="inname">项目经理</div>
|
<div class="inname">项目经理</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<ProjectManager v-model:value="projectInfo.managerId" v-model:name="projectInfo.manager"
|
<ProjectManager
|
||||||
mode="multiple"></ProjectManager>
|
v-model:value="projectInfo.managerId"
|
||||||
|
v-model:name="projectInfo.manager"
|
||||||
|
mode="multiple"
|
||||||
|
></ProjectManager>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -138,7 +145,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<OrgClass v-model:value="projectInfo.sourceBelongId" v-model:name="projectInfo.sourceBelongName"></OrgClass>
|
<OrgClass
|
||||||
|
v-model:value="projectInfo.sourceBelongId"
|
||||||
|
v-model:name="projectInfo.sourceBelongName"
|
||||||
|
></OrgClass>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<div class="name name2">
|
||||||
@@ -173,7 +183,8 @@
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
"
|
"
|
||||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||||
></a-switch>
|
></a-switch
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -202,19 +213,30 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<!-- <img-->
|
<!-- <img-->
|
||||||
<!-- class="nameimg"-->
|
<!-- class="nameimg"-->
|
||||||
<!-- src="../../assets/images/basicinfo/asterisk.png"-->
|
<!-- src="../../assets/images/basicinfo/asterisk.png"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
|
<img
|
||||||
|
class="nameimg"
|
||||||
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
|
/>
|
||||||
<div class="inname">是否BOEU实施</div>
|
<div class="inname">是否BOEU实施</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-switch
|
<!-- <a-switch
|
||||||
v-model:checked="projectInfo.boeFlag"
|
v-model:checked="projectInfo.boeFlag"
|
||||||
:checkedValue="1"
|
:checkedValue="1"
|
||||||
:unCheckedValue="0"
|
:unCheckedValue="0"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
></a-switch>
|
></a-switch> -->
|
||||||
|
<a-radio-group
|
||||||
|
v-model:value="projectInfo.boeFlag"
|
||||||
|
:disabled="viewDetail ? true : false"
|
||||||
|
>
|
||||||
|
<a-radio :style="radioStyle" :value="1">是</a-radio>
|
||||||
|
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
||||||
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,25 +271,24 @@
|
|||||||
<div class="btn">
|
<div class="btn">
|
||||||
<a-button v-on:click="createProject" type="primary" class="btn1"
|
<a-button v-on:click="createProject" type="primary" class="btn1"
|
||||||
>确定
|
>确定
|
||||||
</a-button
|
</a-button>
|
||||||
>
|
|
||||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {onMounted, reactive, toRefs, watch} from "vue";
|
import { onMounted, reactive, toRefs, watch } from "vue";
|
||||||
import {message} from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import {useRoute, useRouter} from "vue-router";
|
import { useRoute, useRouter } from "vue-router";
|
||||||
import * as api from "../../api/index";
|
import * as api from "../../api/index";
|
||||||
import {useStore} from "vuex";
|
import { useStore } from "vuex";
|
||||||
import ProjectClass from "@/components/project/ProjectClass";
|
import ProjectClass from "@/components/project/ProjectClass";
|
||||||
import TrainClass from "@/components/project/TrainClass";
|
import TrainClass from "@/components/project/TrainClass";
|
||||||
import OrgClass from "@/components/project/OrgClass";
|
import OrgClass from "@/components/project/OrgClass";
|
||||||
import ProjectManager from "@/components/project/ProjectManager";
|
import ProjectManager from "@/components/project/ProjectManager";
|
||||||
import ProjectLevel from "@/components/project/ProjectLevel";
|
import ProjectLevel from "@/components/project/ProjectLevel";
|
||||||
import {scrollLoad} from "@/api/method";
|
import { scrollLoad } from "@/api/method";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
@@ -276,7 +297,7 @@ export default {
|
|||||||
ProjectLevel,
|
ProjectLevel,
|
||||||
ProjectClass,
|
ProjectClass,
|
||||||
TrainClass,
|
TrainClass,
|
||||||
OrgClass
|
OrgClass,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@@ -295,37 +316,44 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
keyWord: "",
|
keyWord: "",
|
||||||
},
|
},
|
||||||
classifyList5: []
|
classifyList5: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
state.projectPic = store.state.projectPic.map(e => e.dictValue)
|
state.projectPic = store.state.projectPic.map((e) => e.dictValue);
|
||||||
state.viewDetail = routers.query.viewDetail
|
state.viewDetail = routers.query.viewDetail;
|
||||||
getProjectInfo()
|
getProjectInfo();
|
||||||
getTemplate()
|
getTemplate();
|
||||||
})
|
});
|
||||||
|
|
||||||
watch(routers.query, () => {
|
watch(routers.query, () => {
|
||||||
state.projectInfo.projectId = routers.query.projectId
|
state.projectInfo.projectId = routers.query.projectId;
|
||||||
state.projectInfo.parentName = routers.query.parentName
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
state.projectInfo.parentId = routers.query.parentId
|
state.projectInfo.parentId = routers.query.parentId;
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
function getProjectInfo() {
|
function getProjectInfo() {
|
||||||
if (!routers.query.projectId) {
|
if (!routers.query.projectId) {
|
||||||
state.projectInfo = {parentName: routers.query.parentName, parentId: routers.query.parentId}
|
state.projectInfo = {
|
||||||
return
|
parentName: routers.query.parentName,
|
||||||
|
parentId: routers.query.parentId,
|
||||||
|
};
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
api.getProjectDetail({projectId: routers.query.projectId}).then(res => {
|
api
|
||||||
state.projectInfo = res.data.data.projectInfo
|
.getProjectDetail({ projectId: routers.query.projectId })
|
||||||
state.projectInfo.rangeTime = [state.projectInfo.beginTime, state.projectInfo.endTime]
|
.then((res) => {
|
||||||
state.projectInfo.parentName = routers.query.parentName
|
state.projectInfo = res.data.data.projectInfo;
|
||||||
})
|
state.projectInfo.rangeTime = [
|
||||||
|
state.projectInfo.beginTime,
|
||||||
|
state.projectInfo.endTime,
|
||||||
|
];
|
||||||
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const backPage = () => {
|
const backPage = () => {
|
||||||
router.back()
|
router.back();
|
||||||
};
|
};
|
||||||
|
|
||||||
//选择分类
|
//选择分类
|
||||||
@@ -334,25 +362,24 @@ export default {
|
|||||||
state.projectType = value; //分类选择的id
|
state.projectType = value; //分类选择的id
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const classificationChange5 = (key, option) => {
|
const classificationChange5 = (key, option) => {
|
||||||
state.projectInfo = option
|
state.projectInfo = option;
|
||||||
state.projectInfo.type = 3
|
state.projectInfo.type = 3;
|
||||||
state.projectInfo.rangeTime = [option.beginTime, option.endTime]
|
state.projectInfo.rangeTime = [option.beginTime, option.endTime];
|
||||||
state.projectInfo.parentName = routers.query.parentName
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
state.projectInfo.parentId = routers.query.parentId
|
state.projectInfo.parentId = routers.query.parentId;
|
||||||
};
|
};
|
||||||
//获取模版列表
|
//获取模版列表
|
||||||
const getTemplate = () => {
|
const getTemplate = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
pageNo: state.currentPage,
|
pageNo: state.currentPage,
|
||||||
pageSize: state.pageSize,
|
pageSize: state.pageSize,
|
||||||
status: 1
|
status: 1,
|
||||||
};
|
};
|
||||||
api.getTemplate(obj).then((res) => {
|
api.getTemplate(obj).then((res) => {
|
||||||
state.totalPages = Number(res.data.data.pages);
|
state.totalPages = Number(res.data.data.pages);
|
||||||
state.classifyList5 = res.data.data.rows
|
state.classifyList5 = res.data.data.rows;
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//模版滚动加载模板信息
|
//模版滚动加载模板信息
|
||||||
@@ -378,18 +405,19 @@ export default {
|
|||||||
sourceBelongId: "请选择资源归属",
|
sourceBelongId: "请选择资源归属",
|
||||||
level: "请填写项目级别",
|
level: "请填写项目级别",
|
||||||
systemId: "请填写项目培训体系",
|
systemId: "请填写项目培训体系",
|
||||||
|
boeFlag: "请选择是否BOEU实施",
|
||||||
};
|
};
|
||||||
|
|
||||||
function timeChange(e) {
|
function timeChange(e) {
|
||||||
if (e && e.length === 2) {
|
if (e && e.length === 2) {
|
||||||
state.projectInfo.beginTime = e[0]
|
state.projectInfo.beginTime = e[0];
|
||||||
state.projectInfo.endTime = e[1]
|
state.projectInfo.endTime = e[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validate(obj, errorMsgs) {
|
function validate(obj, errorMsgs) {
|
||||||
for (let i in errorMsgs) {
|
for (let i in errorMsgs) {
|
||||||
if (!obj[i]) {
|
if (!obj[i] && obj[i] !== 0) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.warning(errorMsgs[i]);
|
message.warning(errorMsgs[i]);
|
||||||
return false;
|
return false;
|
||||||
@@ -403,13 +431,12 @@ export default {
|
|||||||
if (!validate(state.projectInfo, errorMsgs)) {
|
if (!validate(state.projectInfo, errorMsgs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
state.projectInfo.type = 3
|
state.projectInfo.type = 3;
|
||||||
api.createProject(state.projectInfo).then(() => {
|
api.createProject(state.projectInfo).then(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
router.back()
|
router.back();
|
||||||
}
|
});
|
||||||
)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -419,7 +446,7 @@ export default {
|
|||||||
classificationChange5,
|
classificationChange5,
|
||||||
createProject,
|
createProject,
|
||||||
backPage,
|
backPage,
|
||||||
templateScroll
|
templateScroll,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -523,7 +550,6 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
margin-left: 14px;
|
margin-left: 14px;
|
||||||
|
|
||||||
|
|
||||||
.box1 {
|
.box1 {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
|
|||||||
@@ -590,7 +590,6 @@
|
|||||||
style="
|
style="
|
||||||
width: 120px;
|
width: 120px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
|||||||
Reference in New Issue
Block a user