mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-18 23:36:46 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
11
.env
Normal file
11
.env
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
VITE_BASE=/manage
|
||||||
|
VITE_BASE_API=/
|
||||||
|
VITE_PROXY_URL=http://111.231.196.214:30001/
|
||||||
|
VITE_LOGIN_URL=https://u-pre.boe.com/web
|
||||||
|
|
||||||
|
|
||||||
|
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||||
|
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
|
||||||
|
VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
|
||||||
|
|
||||||
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
9
.env.boe
Normal file
9
.env.boe
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
VITE_BASE=/manage
|
||||||
|
VITE_BASE_API=/manageApi
|
||||||
|
|
||||||
|
|
||||||
|
VITE_BOE_ONLINE_CLASS_URL=https://u-pre.boe.com/pc/course/studyindex?id=
|
||||||
|
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
|
||||||
|
VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
|
||||||
|
|
||||||
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
8
.env.prod
Normal file
8
.env.prod
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
VITE_BASE=/fe-student-release
|
||||||
|
VITE_BASE_API=/manageApi-release
|
||||||
|
|
||||||
|
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id=
|
||||||
|
VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id=
|
||||||
|
VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId=
|
||||||
|
|
||||||
|
VITE_BOE_API_URL=https://u.boe.com
|
||||||
10
.env.release
Normal file
10
.env.release
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
VITE_BASE=/fe-student-release
|
||||||
|
VITE_BASE_API=/manageApi-release
|
||||||
|
VITE_LOGIN_URL=https://u.boe.com/web
|
||||||
|
|
||||||
|
|
||||||
|
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id=
|
||||||
|
VITE_BOE_CASS_DETAIL_URL=https://u.boe.com/pc-release/case/detail?id=
|
||||||
|
VITE_BOE_TEST_DETAIL_URL=https://u.boe.com/web/quizsummary?detailId=
|
||||||
|
|
||||||
|
VITE_BOE_API_URL=https://u.boe.com
|
||||||
9
.env.test
Normal file
9
.env.test
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
VITE_BASE=/fe-student
|
||||||
|
VITE_BASE_API=/manageApi
|
||||||
|
|
||||||
|
|
||||||
|
VITE_BOE_ONLINE_CLASS_URL=https://u.boe.com/pc-release/course/studyindex?id=
|
||||||
|
VITE_BOE_CASS_DETAIL_URL=https://u-pre.boe.com/pc/case/detail?id=
|
||||||
|
VITE_BOE_TEST_DETAIL_URL=https://u-pre.boe.com/web/quizsummary?detailId=
|
||||||
|
|
||||||
|
VITE_BOE_API_URL=https://u-pre.boe.com
|
||||||
135
package.json
135
package.json
@@ -1,68 +1,71 @@
|
|||||||
{
|
{
|
||||||
"name": "fe_manage",
|
"name": "fe_manage",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"lint": "vue-cli-service lint"
|
"build:boe": "vue-cli-service build --mode boe",
|
||||||
},
|
"build:release": "vue-cli-service build --mode release",
|
||||||
"dependencies": {
|
"build:prod": "vue-cli-service build --mode prod",
|
||||||
"@wangeditor/editor": "^5.1.23",
|
"build:test": "vue-cli-service build --mode test"
|
||||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
},
|
||||||
"ant-design-vue": "^3.2.12",
|
"dependencies": {
|
||||||
"axios": "^1.1.3",
|
"@wangeditor/editor": "^5.1.23",
|
||||||
"core-js": "^3.8.3",
|
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||||
"dayjs": "^1.11.6",
|
"ant-design-vue": "^3.2.12",
|
||||||
"element-plus": "^2.2.17",
|
"axios": "^1.1.3",
|
||||||
"element-resize-detector": "^1.2.4",
|
"core-js": "^3.8.3",
|
||||||
"html2canvas": "^1.4.1",
|
"dayjs": "^1.11.6",
|
||||||
"jquery": "^3.6.1",
|
"element-plus": "^2.2.17",
|
||||||
"mitt": "^3.0.0",
|
"element-resize-detector": "^1.2.4",
|
||||||
"moment": "^2.29.4",
|
"html2canvas": "^1.4.1",
|
||||||
"qrcode.vue": "^3.3.3",
|
"jquery": "^3.6.1",
|
||||||
"qs": "^6.11.0",
|
"mitt": "^3.0.0",
|
||||||
"sortablejs": "^1.15.0",
|
"moment": "^2.29.4",
|
||||||
"vue": "^3.2.13",
|
"qrcode.vue": "^3.3.3",
|
||||||
"vue-router": "^4.0.3",
|
"qs": "^6.11.0",
|
||||||
"vuedraggable": "^4.1.0",
|
"sortablejs": "^1.15.0",
|
||||||
"vuex": "^4.0.0"
|
"vue": "^3.2.13",
|
||||||
},
|
"vue-router": "^4.0.3",
|
||||||
"devDependencies": {
|
"vuedraggable": "^4.1.0",
|
||||||
"@babel/core": "^7.12.16",
|
"vuex": "^4.0.0"
|
||||||
"@babel/eslint-parser": "^7.12.16",
|
},
|
||||||
"@vue/cli-plugin-babel": "~5.0.0",
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
"@babel/core": "^7.12.16",
|
||||||
"@vue/cli-plugin-router": "~5.0.0",
|
"@babel/eslint-parser": "^7.12.16",
|
||||||
"@vue/cli-plugin-vuex": "~5.0.0",
|
"@vue/cli-plugin-babel": "~5.0.0",
|
||||||
"@vue/cli-service": "~5.0.0",
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
"eslint": "^7.32.0",
|
"@vue/cli-plugin-router": "~5.0.0",
|
||||||
"eslint-plugin-vue": "^8.0.3",
|
"@vue/cli-plugin-vuex": "~5.0.0",
|
||||||
"sass": "^1.32.7",
|
"@vue/cli-service": "~5.0.0",
|
||||||
"sass-loader": "^12.0.0"
|
"eslint": "^7.32.0",
|
||||||
},
|
"eslint-plugin-vue": "^8.0.3",
|
||||||
"eslintConfig": {
|
"sass": "^1.32.7",
|
||||||
"root": true,
|
"sass-loader": "^12.0.0"
|
||||||
"env": {
|
},
|
||||||
"node": true
|
"eslintConfig": {
|
||||||
},
|
"root": true,
|
||||||
"extends": [
|
"env": {
|
||||||
"plugin:vue/vue3-essential",
|
"node": true
|
||||||
"eslint:recommended"
|
},
|
||||||
],
|
"extends": [
|
||||||
"parserOptions": {
|
"plugin:vue/vue3-essential",
|
||||||
"parser": "@babel/eslint-parser"
|
"eslint:recommended"
|
||||||
},
|
],
|
||||||
"rules": {
|
"parserOptions": {
|
||||||
"no-console": "off",
|
"parser": "@babel/eslint-parser"
|
||||||
"no-debugger": "off",
|
},
|
||||||
"no-mixed-spaces-and-tabs": "off"
|
"rules": {
|
||||||
}
|
"no-console": "off",
|
||||||
},
|
"no-debugger": "off",
|
||||||
"browserslist": [
|
"no-mixed-spaces-and-tabs": "off"
|
||||||
"> 1%",
|
}
|
||||||
"last 2 versions",
|
},
|
||||||
"not dead",
|
"browserslist": [
|
||||||
"not ie 11"
|
"> 1%",
|
||||||
]
|
"last 2 versions",
|
||||||
|
"not dead",
|
||||||
|
"not ie 11"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ 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.9.13------------");
|
console.log("版本0.9.14------------");
|
||||||
const routes = computed(() => {
|
const routes = computed(() => {
|
||||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,12 +2,13 @@
|
|||||||
* @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-14 09:04:31
|
* @LastEditTime: 2022-12-14 20:56:10
|
||||||
* @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
|
||||||
*/
|
*/
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import router from "@/router";
|
||||||
// import { getCookie } from '../api/method'
|
// import { getCookie } from '../api/method'
|
||||||
// const Qs = require("qs");
|
// const Qs = require("qs");
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ import axios from "axios";
|
|||||||
|
|
||||||
axios.defaults.withCredentials = true;
|
axios.defaults.withCredentials = true;
|
||||||
const http = axios.create({
|
const http = axios.create({
|
||||||
baseURL: "/manageApi",
|
baseURL: process.env.VITE_BASE_API,
|
||||||
timeout: 1000 * 15,
|
timeout: 1000 * 15,
|
||||||
// headers: { "Content-Type": "multipart/form-data" },
|
// headers: { "Content-Type": "multipart/form-data" },
|
||||||
headers: { "Content-Type": "application/json" },
|
headers: { "Content-Type": "application/json" },
|
||||||
@@ -56,8 +57,7 @@ http.interceptors.response.use(
|
|||||||
return response;
|
return response;
|
||||||
} else {
|
} else {
|
||||||
if (code === 1000) {
|
if (code === 1000) {
|
||||||
// window.open("https://u-pre.boe.com/web/", '_self');
|
process.env.NODE_ENV === 'development' ? router.push({ path: 'login' }) : (window.location.href = process.env.VITE_LOGIN_URL)
|
||||||
// window.open("http://111.231.196.214:12013/manage/login", '_self');
|
|
||||||
}
|
}
|
||||||
console.log("api %o", msg);
|
console.log("api %o", msg);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ const setCookie = (name, value, perpetual) => {
|
|||||||
|
|
||||||
//先写一个方法
|
//先写一个方法
|
||||||
function getCookie(name) {
|
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字符串
|
//1.获取cookie字符串
|
||||||
// const cookies = document.cookie;
|
// const cookies = document.cookie;
|
||||||
// console.log('cookies',cookies)
|
// console.log('cookies',cookies)
|
||||||
@@ -219,7 +219,7 @@ function getCookie(name) {
|
|||||||
//滚动加载信息
|
//滚动加载信息
|
||||||
const scrollLoad = (e) => {
|
const scrollLoad = (e) => {
|
||||||
// console.log("滚动", e, b);
|
// console.log("滚动", e, b);
|
||||||
const {target} = e;
|
const { target } = e;
|
||||||
const scrllHeight = target.scrollHeight - target.scrollTop;
|
const scrllHeight = target.scrollHeight - target.scrollTop;
|
||||||
const clientHeight = target.clientHeight;
|
const clientHeight = target.clientHeight;
|
||||||
// console.log("scrllHeight", scrllHeight, clientHeight);
|
// console.log("scrllHeight", scrllHeight, clientHeight);
|
||||||
@@ -277,6 +277,9 @@ const organizationalTree = []
|
|||||||
|
|
||||||
//嵌套页面
|
//嵌套页面
|
||||||
const iframeUrl = "https://u-pre.boe.com/pc/iframe"
|
const iframeUrl = "https://u-pre.boe.com/pc/iframe"
|
||||||
|
//学员端路由
|
||||||
|
const studentUrl = 'https://u-pre.boe.com/pc/loading'
|
||||||
|
|
||||||
//二维码
|
//二维码
|
||||||
const codeUrl = "https://u-pre.boe.com"
|
const codeUrl = "https://u-pre.boe.com"
|
||||||
export {
|
export {
|
||||||
@@ -292,5 +295,6 @@ export {
|
|||||||
commonData,
|
commonData,
|
||||||
organizationalTree,
|
organizationalTree,
|
||||||
iframeUrl,
|
iframeUrl,
|
||||||
|
studentUrl,
|
||||||
codeUrl,
|
codeUrl,
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
import { reactive, toRefs } from "vue";
|
import { reactive, toRefs } from "vue";
|
||||||
import DownLoad from "../components/drawers/DownLoad";
|
import DownLoad from "../components/drawers/DownLoad";
|
||||||
import * as api from "../api/index1";
|
import * as api from "../api/index1";
|
||||||
|
import { studentUrl } from "../api/method";
|
||||||
export default {
|
export default {
|
||||||
name: "NavTop",
|
name: "NavTop",
|
||||||
components: {
|
components: {
|
||||||
@@ -81,7 +81,7 @@ export default {
|
|||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "学员",
|
name: "学员",
|
||||||
go: "https://u.boe.com/pc/uc/study/courses",
|
go: studentUrl,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mi_btns" style="margin-left:0px;">
|
<div class="mi_btns" style="margin-left: 0px">
|
||||||
<div class="btn btn1">
|
<div class="btn btn1">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText" @click="searchProjectList()">搜索</div>
|
<div class="btnText" @click="searchProjectList()">搜索</div>
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
<div class="pa">
|
<div class="pa">
|
||||||
<a-pagination
|
<a-pagination
|
||||||
v-if="tableDataTotal > 10"
|
v-if="tableDataTotal > 10"
|
||||||
:showSizeChanger="false"
|
:showSizeChanger="false"
|
||||||
showQuickJumper="true"
|
showQuickJumper="true"
|
||||||
hideOnSinglePage="true"
|
hideOnSinglePage="true"
|
||||||
:pageSize="pageSize"
|
:pageSize="pageSize"
|
||||||
@@ -225,8 +225,9 @@
|
|||||||
import { reactive, toRefs } from "vue";
|
import { reactive, toRefs } from "vue";
|
||||||
import { RouterEditTask } from "@/api/indexTask";
|
import { RouterEditTask } from "@/api/indexTask";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import * as apiProj from "../../api/index.js";
|
// import * as apiProj from "../../api/index.js";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
import * as indexAudit from "../../api/indexAudit";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddProject",
|
name: "AddProject",
|
||||||
@@ -309,28 +310,28 @@ export default {
|
|||||||
title: "项目名称",
|
title: "项目名称",
|
||||||
dataIndex: "name",
|
dataIndex: "name",
|
||||||
key: "projectName",
|
key: "projectName",
|
||||||
width:"40%",
|
width: "40%",
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "项目经理",
|
title: "项目经理",
|
||||||
dataIndex: "manager",
|
dataIndex: "manager",
|
||||||
key: "manager",
|
key: "manager",
|
||||||
width:"20%",
|
width: "20%",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建人",
|
title: "创建人",
|
||||||
dataIndex: "creater",
|
dataIndex: "creater",
|
||||||
key: "creater",
|
key: "creater",
|
||||||
width:"20%",
|
width: "20%",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
dataIndex: "time",
|
dataIndex: "time",
|
||||||
key: "time",
|
key: "time",
|
||||||
width:"20%",
|
width: "20%",
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@@ -400,8 +401,8 @@ export default {
|
|||||||
// TODO 这里后续需要给接口或者改动
|
// TODO 这里后续需要给接口或者改动
|
||||||
// 获取所有,确定分页位置
|
// 获取所有,确定分页位置
|
||||||
const getCurrentPage = () => {
|
const getCurrentPage = () => {
|
||||||
apiProj
|
indexAudit
|
||||||
.getProjectList({
|
.auditlist({
|
||||||
createName: state.inputV1,
|
createName: state.inputV1,
|
||||||
manager: state.inputV2,
|
manager: state.inputV2,
|
||||||
name: state.inputV3,
|
name: state.inputV3,
|
||||||
@@ -450,8 +451,8 @@ export default {
|
|||||||
status: 3,
|
status: 3,
|
||||||
});
|
});
|
||||||
|
|
||||||
apiProj
|
indexAudit
|
||||||
.getProjectList({
|
.auditlist({
|
||||||
createName: state.inputV3,
|
createName: state.inputV3,
|
||||||
manager: state.inputV2,
|
manager: state.inputV2,
|
||||||
name: state.inputV1,
|
name: state.inputV1,
|
||||||
@@ -551,7 +552,7 @@ export default {
|
|||||||
|
|
||||||
const updateTask = async (res) => {
|
const updateTask = async (res) => {
|
||||||
if (props.isLevel == 1) {
|
if (props.isLevel == 1) {
|
||||||
if(!props.isactive){
|
if (!props.isactive) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
return message.warning("请先选中关卡");
|
return message.warning("请先选中关卡");
|
||||||
}
|
}
|
||||||
@@ -930,36 +931,36 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.main_table {
|
.main_table {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding-bottom: 80px;
|
padding-bottom: 80px;
|
||||||
.ant-checkbox-wrapper {
|
.ant-checkbox-wrapper {
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
}
|
|
||||||
.ant-table-selection-column {
|
|
||||||
padding: 0px !important;
|
|
||||||
padding-left: 5px !important;
|
|
||||||
}
|
|
||||||
.ant-table-thead > tr > th {
|
|
||||||
background-color: rgba(239, 244, 252, 1);
|
|
||||||
}
|
|
||||||
th.h {
|
|
||||||
background-color: #eff4fc !important;
|
|
||||||
}
|
|
||||||
.ant-table-tbody
|
|
||||||
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
|
||||||
> td {
|
|
||||||
background: #f6f9fd;
|
|
||||||
}
|
|
||||||
.pa {
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
position: absolute;
|
|
||||||
bottom: 20px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
.ant-table-selection-column {
|
||||||
|
padding: 0px !important;
|
||||||
|
padding-left: 5px !important;
|
||||||
|
}
|
||||||
|
.ant-table-thead > tr > th {
|
||||||
|
background-color: rgba(239, 244, 252, 1);
|
||||||
|
}
|
||||||
|
th.h {
|
||||||
|
background-color: #eff4fc !important;
|
||||||
|
}
|
||||||
|
.ant-table-tbody
|
||||||
|
> tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
|
||||||
|
> td {
|
||||||
|
background: #f6f9fd;
|
||||||
|
}
|
||||||
|
.pa {
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
.main_btns {
|
.main_btns {
|
||||||
height: 72px;
|
height: 72px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -991,7 +992,6 @@ export default {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
|
import {computed, defineEmits, defineProps} from "vue";
|
||||||
import {useStore} from "vuex";
|
import {useStore} from "vuex";
|
||||||
|
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
@@ -33,16 +33,12 @@ const props = defineProps({
|
|||||||
})
|
})
|
||||||
const emit = defineEmits({})
|
const emit = defineEmits({})
|
||||||
|
|
||||||
const options = ref([])
|
const options = computed(() => store.state.orgtreeList)
|
||||||
|
|
||||||
const id = computed(() => {
|
const id = computed(() => {
|
||||||
return props.value
|
return props.value
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
options.value = [...store.state.orgtreeList]
|
|
||||||
})
|
|
||||||
|
|
||||||
function change(key, obj) {
|
function change(key, obj) {
|
||||||
emit('update:name', obj[0])
|
emit('update:name', obj[0])
|
||||||
emit('update:value', key)
|
emit('update:value', key)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ const routes = [
|
|||||||
...routesConfig
|
...routesConfig
|
||||||
]
|
]
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHistory("/manage/"),
|
history: createWebHistory(process.env.VITE_BASE),
|
||||||
routes,
|
routes,
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<div class="projectAdd">
|
<div class="projectAdd">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title"
|
<span class="title"
|
||||||
>{{ projectInfo.parentId ? "编辑" : "创建" }}项目</span
|
>{{ projectInfo.parentId ? "编辑" : "创建" }}项目</span
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@click="backPage"
|
@click="backPage"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
to="/projectmanage"
|
to="/projectmanage"
|
||||||
class="goback"
|
class="goback"
|
||||||
>
|
>
|
||||||
<span class="return"></span><span class="returntext">返回</span>
|
<span class="return"></span><span class="returntext">返回</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
<div class="name" v-if="projectInfo.parentName">
|
<div class="name" v-if="projectInfo.parentName">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目归属</div>
|
<div class="inname">项目归属</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -33,29 +33,36 @@
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目名称</div>
|
<div class="inname">
|
||||||
|
{{ ptojectType == 3 ? "班级名称" : "项目名称" }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<NameInput placeholder="请输入项目名称" v-model:value="projectInfo.name"
|
<NameInput
|
||||||
v-model:validate="projectInfo.validate" :maxlength="30" show-count
|
placeholder="请输入项目名称"
|
||||||
:id="projectInfo.projectId"></NameInput>
|
v-model:value="projectInfo.name"
|
||||||
|
v-model:validate="projectInfo.validate"
|
||||||
|
:maxlength="30"
|
||||||
|
show-count
|
||||||
|
:id="projectInfo.projectId"
|
||||||
|
></NameInput>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name flex-top">
|
<div class="name flex-top">
|
||||||
<div class="namebox" style="margin-top: 10px">
|
<div class="namebox" style="margin-top: 10px">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select" style="flex: 1; display: flex">
|
<div class="in select" style="flex: 1; display: flex">
|
||||||
<div
|
<div
|
||||||
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
|
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
|
||||||
style="
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@@ -63,19 +70,19 @@
|
|||||||
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="() => (projectInfo.picUrl = src.value)"
|
@click="() => (projectInfo.picUrl = src.value)"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
style="
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
"
|
"
|
||||||
:src="src.value"
|
:src="src.value"
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -83,63 +90,63 @@
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目时间</div>
|
<div class="inname">项目时间</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
show-time
|
show-time
|
||||||
separator="至"
|
separator="至"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
v-model:value="projectInfo.rangeTime"
|
v-model:value="projectInfo.rangeTime"
|
||||||
style="width: 100%; height: 40px; border-radius: 5px"
|
style="width: 100%; height: 40px; border-radius: 5px"
|
||||||
valueFormat="YYYY-MM-DD HH:mm:ss"
|
valueFormat="YYYY-MM-DD HH:mm:ss"
|
||||||
@change="timeChange"
|
@change="timeChange"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目经理</div>
|
<div class="inname">项目经理</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<ProjectManager
|
<ProjectManager
|
||||||
v-model:value="projectInfo.managerId"
|
v-model:value="projectInfo.managerId"
|
||||||
v-model:name="projectInfo.manager"
|
v-model:name="projectInfo.manager"
|
||||||
@onChange="managerChange"
|
@onChange="managerChange"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
></ProjectManager>
|
></ProjectManager>
|
||||||
</div>
|
</div>
|
||||||
</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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">资源归属</div>
|
<div class="inname">资源归属</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<OrgClass
|
<OrgClass
|
||||||
v-model:value="projectInfo.sourceBelongId"
|
v-model:value="projectInfo.sourceBelongId"
|
||||||
v-model:name="projectInfo.sourceBelongName"
|
v-model:name="projectInfo.sourceBelongName"
|
||||||
></OrgClass>
|
></OrgClass>
|
||||||
</div>
|
</div>
|
||||||
</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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目级别</div>
|
<div class="inname">项目级别</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -150,8 +157,8 @@
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">培训分类</div>
|
<div class="inname">培训分类</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -162,15 +169,15 @@
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">是否BOEU实施</div>
|
<div class="inname">是否BOEU实施</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-radio-group
|
<a-radio-group
|
||||||
v-model:value="projectInfo.boeFlag"
|
v-model:value="projectInfo.boeFlag"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
>
|
>
|
||||||
<a-radio :style="radioStyle" :value="1">是</a-radio>
|
<a-radio :style="radioStyle" :value="1">是</a-radio>
|
||||||
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
<a-radio :style="radioStyle" :value="0">否</a-radio>
|
||||||
@@ -183,16 +190,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-checkbox
|
<a-checkbox
|
||||||
v-model:checked="courseSyncFlag"
|
v-model:checked="courseSyncFlag"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
><span
|
><span
|
||||||
style="
|
style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: rgba(109, 117, 132, 1);
|
color: rgba(109, 117, 132, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
"
|
"
|
||||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||||
></a-checkbox
|
></a-checkbox
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -202,12 +209,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="projectInfo.remark"
|
v-model:value="projectInfo.remark"
|
||||||
style="height: 80px"
|
style="height: 80px"
|
||||||
placeholder="请输入说明"
|
placeholder="请输入说明"
|
||||||
show-count
|
show-count
|
||||||
:maxlength="200"
|
:maxlength="200"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -217,7 +224,7 @@
|
|||||||
<div class="inname" style="margin-top: 13px">审核意见</div>
|
<div class="inname" style="margin-top: 13px">审核意见</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="description">
|
<div class="description">
|
||||||
{{auditDescription}}
|
{{ auditDescription }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -226,18 +233,18 @@
|
|||||||
<div class="inname" style="width: 50px">模版</div>
|
<div class="inname" style="width: 50px">模版</div>
|
||||||
<div class="in select" style="margin-left: 2px">
|
<div class="in select" style="margin-left: 2px">
|
||||||
<a-select
|
<a-select
|
||||||
:getPopupContainer="
|
:getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
placeholder="请选择模版"
|
placeholder="请选择模版"
|
||||||
:size="size"
|
:size="size"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:options="classifyList5"
|
:options="classifyList5"
|
||||||
@change="classificationChange5"
|
@change="classificationChange5"
|
||||||
@popupScroll="templateScroll"
|
@popupScroll="templateScroll"
|
||||||
:fieldNames="{
|
:fieldNames="{
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'projectTemplateId',
|
value: 'projectTemplateId',
|
||||||
}"
|
}"
|
||||||
@@ -251,33 +258,32 @@
|
|||||||
<div class="btn">
|
<div class="btn">
|
||||||
<a-button @click="backPage" class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||||
<a-button
|
<a-button
|
||||||
v-on:click="createProject"
|
v-on:click="createProject"
|
||||||
type="primary"
|
type="primary"
|
||||||
class="btn1"
|
class="btn1"
|
||||||
style="margin-left: 20px"
|
style="margin-left: 20px"
|
||||||
>确定
|
>确定
|
||||||
</a-button
|
</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/ProjectManagerNew";
|
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||||
import NameInput from "@/components/project/NameInput";
|
import NameInput from "@/components/project/NameInput";
|
||||||
import ProjectLevel from "@/components/project/ProjectLevel";
|
import ProjectLevel from "@/components/project/ProjectLevel";
|
||||||
import {changeOwnership, scrollLoad} from "@/api/method";
|
import { changeOwnership, scrollLoad } from "@/api/method";
|
||||||
import {storage} from "../../api/storage";
|
import { storage } from "../../api/storage";
|
||||||
import * as api2 from "../../api/indexAudit";
|
import * as api2 from "../../api/indexAudit";
|
||||||
import {validateName} from "@/api/index1";
|
import { validateName } from "@/api/index1";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
@@ -308,7 +314,7 @@ export default {
|
|||||||
},
|
},
|
||||||
classifyList5: [],
|
classifyList5: [],
|
||||||
courseSyncFlag: false,
|
courseSyncFlag: false,
|
||||||
auditDescription:"",
|
auditDescription: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
// 封面图选择
|
// 封面图选择
|
||||||
@@ -324,6 +330,8 @@ export default {
|
|||||||
state.viewDetail = routers.query.viewDetail;
|
state.viewDetail = routers.query.viewDetail;
|
||||||
getProjectInfo();
|
getProjectInfo();
|
||||||
getTemplate();
|
getTemplate();
|
||||||
|
state.ptojectType = routers.query.ptojectType;
|
||||||
|
// console.log("routers.query.ptojectType", routers.query.ptojectType);
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(routers.query, () => {
|
watch(routers.query, () => {
|
||||||
@@ -337,10 +345,10 @@ export default {
|
|||||||
state.projectInfo.parentId = routers.query.parentId;
|
state.projectInfo.parentId = routers.query.parentId;
|
||||||
state.projectInfo.projectId = routers.query.projectId;
|
state.projectInfo.projectId = routers.query.projectId;
|
||||||
(state.projectInfo.projectId || state.projectInfo.parentId) &&
|
(state.projectInfo.projectId || state.projectInfo.parentId) &&
|
||||||
api
|
api
|
||||||
.getProjectDetail({
|
.getProjectDetail({
|
||||||
projectId:
|
projectId:
|
||||||
state.projectInfo.projectId || state.projectInfo.parentId,
|
state.projectInfo.projectId || state.projectInfo.parentId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
state.projectInfo = {
|
state.projectInfo = {
|
||||||
@@ -353,23 +361,24 @@ export default {
|
|||||||
];
|
];
|
||||||
state.courseSyncFlag = !!state.projectInfo.courseSyncFlag;
|
state.courseSyncFlag = !!state.projectInfo.courseSyncFlag;
|
||||||
if (Number(state.projectInfo.status) === -5) {
|
if (Number(state.projectInfo.status) === -5) {
|
||||||
let obj = {
|
let obj = {
|
||||||
project_id: state.projectInfo.projectId,
|
project_id: state.projectInfo.projectId,
|
||||||
type: 1,
|
type: 1,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 1,
|
pageSize: 1,
|
||||||
};
|
};
|
||||||
api2.auditList(obj).then((d) => {
|
api2.auditList(obj).then((d) => {
|
||||||
if (d.data.code === 200) {
|
if (d.data.code === 200) {
|
||||||
let res =d.data.data;
|
let res = d.data.data;
|
||||||
if (res.rows && res.rows.length > 0) {
|
if (res.rows && res.rows.length > 0) {
|
||||||
let i = res.rows.length;
|
let i = res.rows.length;
|
||||||
state.auditDescription = res.rows[i - 1].description ? res.rows[i - 1].description : "-";
|
state.auditDescription = res.rows[i - 1].description
|
||||||
|
? res.rows[i - 1].description
|
||||||
|
: "-";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -446,7 +455,7 @@ export default {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const createProject = async() => {
|
const createProject = async () => {
|
||||||
console.log("保存", state.projectInfo);
|
console.log("保存", state.projectInfo);
|
||||||
if (!validate(state.projectInfo, errorMsgs)) {
|
if (!validate(state.projectInfo, errorMsgs)) {
|
||||||
return;
|
return;
|
||||||
@@ -457,26 +466,30 @@ export default {
|
|||||||
message.warning('项目名称重复,请修改名称!');
|
message.warning('项目名称重复,请修改名称!');
|
||||||
return;
|
return;
|
||||||
}*/
|
}*/
|
||||||
const offName = await validateName({name:state.projectInfo.name, type:1, id:state.projectInfo.projectId}).then(res => {
|
const offName = await validateName({
|
||||||
return res.data.data == 1;
|
name: state.projectInfo.name,
|
||||||
});
|
type: 1,
|
||||||
if(offName){
|
id: state.projectInfo.projectId,
|
||||||
message.destroy();
|
}).then((res) => {
|
||||||
return message.warning("项目名称重复,请重新填写");
|
return res.data.data == 1;
|
||||||
}
|
});
|
||||||
|
if (offName) {
|
||||||
|
message.destroy();
|
||||||
|
return message.warning("项目名称重复,请重新填写");
|
||||||
|
}
|
||||||
state.projectInfo.type = 3;
|
state.projectInfo.type = 3;
|
||||||
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
state.projectInfo.courseSyncFlag = state.courseSyncFlag ? 1 : 0;
|
||||||
api.createProject(state.projectInfo).then((res) => {
|
api.createProject(state.projectInfo).then((res) => {
|
||||||
state.projectInfo.projectId ||
|
state.projectInfo.projectId ||
|
||||||
changeOwnership("project", res.data.data.projectId, [
|
changeOwnership("project", res.data.data.projectId, [
|
||||||
{id: res.data.data.createId, name: res.data.data.createName},
|
{ id: res.data.data.createId, name: res.data.data.createName },
|
||||||
]);
|
]);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
||||||
// router.back();
|
// router.back();
|
||||||
router.push({
|
router.push({
|
||||||
path: "/taskpage",
|
path: "/taskpage",
|
||||||
query: {projectId: res.data.data.projectId},
|
query: { projectId: res.data.data.projectId },
|
||||||
});
|
});
|
||||||
storage.set("projectId", res.data.data.projectId);
|
storage.set("projectId", res.data.data.projectId);
|
||||||
});
|
});
|
||||||
@@ -484,9 +497,9 @@ export default {
|
|||||||
|
|
||||||
function managerChange(e, l, d, t) {
|
function managerChange(e, l, d, t) {
|
||||||
!state.projectInfo.sourceBelongId &&
|
!state.projectInfo.sourceBelongId &&
|
||||||
(state.projectInfo.sourceBelongId = d);
|
(state.projectInfo.sourceBelongId = d);
|
||||||
!state.projectInfo.sourceBelongName &&
|
!state.projectInfo.sourceBelongName &&
|
||||||
(state.projectInfo.sourceBelongName = t);
|
(state.projectInfo.sourceBelongName = t);
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -701,7 +714,7 @@ export default {
|
|||||||
.name2 {
|
.name2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
.description{
|
.description {
|
||||||
margin-top: 14px;
|
margin-top: 14px;
|
||||||
margin-left: 11px;
|
margin-left: 11px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1591,6 +1591,7 @@ export default {
|
|||||||
parentId: value.record.projectId,
|
parentId: value.record.projectId,
|
||||||
parentName:
|
parentName:
|
||||||
value.record.parentName + "——" + value.record.name,
|
value.record.parentName + "——" + value.record.name,
|
||||||
|
ptojectType: 3,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,10 +4,10 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title">创建/编辑单层模板</span>
|
<span class="title">创建/编辑单层模板</span>
|
||||||
<div
|
<div
|
||||||
@click="backPage"
|
@click="backPage"
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
to="/libraryAdd"
|
to="/libraryAdd"
|
||||||
class="goback"
|
class="goback"
|
||||||
>
|
>
|
||||||
<span class="return"></span><span class="returntext">返回</span>
|
<span class="return"></span><span class="returntext">返回</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -17,32 +17,32 @@
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">模板名称</div>
|
<div class="inname">模板名称</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-input
|
<a-input
|
||||||
v-model:value="projectInfo.name"
|
v-model:value="projectInfo.name"
|
||||||
placeholder="请输入模板名称"
|
placeholder="请输入模板名称"
|
||||||
show-count
|
show-count
|
||||||
:maxlength="30"
|
:maxlength="30"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</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">
|
<div class="namebox" style="margin-top: 10px">
|
||||||
<img
|
<img
|
||||||
class="nameimg"
|
class="nameimg"
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
src="../../assets/images/basicinfo/asterisk.png"
|
||||||
/>
|
/>
|
||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select" style="display: flex">
|
<div class="in select" style="display: flex">
|
||||||
<div
|
<div
|
||||||
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
|
:class="`box ${projectInfo.picUrl === src.value ? 'active' : ''}`"
|
||||||
style="
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
@@ -50,19 +50,19 @@
|
|||||||
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="() => (projectInfo.picUrl = src.value)"
|
@click="() => (projectInfo.picUrl = src.value)"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
style="
|
style="
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
"
|
"
|
||||||
:src="src.value"
|
:src="src.value"
|
||||||
alt="avatar"
|
alt="avatar"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,61 +70,61 @@
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目时间</div>
|
<div class="inname">项目时间</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
separator="至"
|
separator="至"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
v-model:value="projectInfo.rangeTime"
|
v-model:value="projectInfo.rangeTime"
|
||||||
style="width: 100%; height: 40px; border-radius: 5px"
|
style="width: 100%; height: 40px; border-radius: 5px"
|
||||||
valueFormat="YYYY-MM-DD HH:mm:ss"
|
valueFormat="YYYY-MM-DD HH:mm:ss"
|
||||||
@change="timeChange"
|
@change="timeChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目经理</div>
|
<div class="inname">项目经理</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<ProjectManager
|
<ProjectManager
|
||||||
v-model:value="projectInfo.managerId"
|
v-model:value="projectInfo.managerId"
|
||||||
v-model:name="projectInfo.manager"
|
v-model:name="projectInfo.manager"
|
||||||
@onChange="managerChange"
|
@onChange="managerChange"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
></ProjectManager>
|
></ProjectManager>
|
||||||
</div>
|
</div>
|
||||||
</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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">资源归属</div>
|
<div class="inname">资源归属</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<OrgClass
|
<OrgClass
|
||||||
v-model:value="projectInfo.sourceBelongId"
|
v-model:value="projectInfo.sourceBelongId"
|
||||||
v-model:name="projectInfo.sourceBelongName"
|
v-model:name="projectInfo.sourceBelongName"
|
||||||
></OrgClass>
|
></OrgClass>
|
||||||
</div>
|
</div>
|
||||||
</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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">项目级别</div>
|
<div class="inname">项目级别</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -135,8 +135,8 @@
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">培训体系</div>
|
<div class="inname">培训体系</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -147,8 +147,8 @@
|
|||||||
<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"
|
||||||
/>
|
/>
|
||||||
<div class="inname">是否BOEU实施</div>
|
<div class="inname">是否BOEU实施</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -165,16 +165,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-checkbox
|
<a-checkbox
|
||||||
v-model:checked="courseSyncFlag"
|
v-model:checked="courseSyncFlag"
|
||||||
:disabled="viewDetail ? true : false"
|
:disabled="viewDetail ? true : false"
|
||||||
><span
|
><span
|
||||||
style="
|
style="
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: rgba(109, 117, 132, 1);
|
color: rgba(109, 117, 132, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
"
|
"
|
||||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
||||||
></a-checkbox
|
></a-checkbox
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -184,11 +184,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="projectInfo.remark"
|
v-model:value="projectInfo.remark"
|
||||||
style="height: 80px"
|
style="height: 80px"
|
||||||
placeholder="请输入说明"
|
placeholder="请输入说明"
|
||||||
show-count
|
show-count
|
||||||
:maxlength="200"
|
:maxlength="200"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -197,7 +197,7 @@
|
|||||||
<div class="footer">
|
<div class="footer">
|
||||||
<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>
|
||||||
@@ -205,12 +205,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { useStore } from "vuex";
|
import {useStore} from "vuex";
|
||||||
import { ref, onMounted, watch } from "vue";
|
import {ref, onMounted, watch} from "vue";
|
||||||
import { message } from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import { useRouter, useRoute } from "vue-router";
|
import {useRouter, useRoute} from "vue-router";
|
||||||
import * as api from "../../api/indexTemplate";
|
import * as api from "../../api/indexTemplate";
|
||||||
// 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/ProjectManagerNew";
|
import ProjectManager from "@/components/project/ProjectManagerNew";
|
||||||
@@ -221,7 +220,7 @@ const router = useRouter();
|
|||||||
const store = useStore();
|
const store = useStore();
|
||||||
const projectInfo = ref({});
|
const projectInfo = ref({});
|
||||||
const projectPic = ref([]);
|
const projectPic = ref([]);
|
||||||
const courseSyncFlag = ref(false);
|
const courseSyncFlag = ref(false)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getDetail();
|
getDetail();
|
||||||
projectPic.value = store.state.projectPic.map((e) => ({
|
projectPic.value = store.state.projectPic.map((e) => ({
|
||||||
@@ -231,22 +230,22 @@ onMounted(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => route.query.projectTemplateId,
|
() => route.query.projectTemplateId,
|
||||||
() => {
|
() => {
|
||||||
getDetail();
|
getDetail();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const getDetail = () =>
|
const getDetail = () =>
|
||||||
route.query.projectTemplateId &&
|
route.query.projectTemplateId &&
|
||||||
api.templateDetail(route.query.projectTemplateId).then((res) => {
|
api.templateDetail(route.query.projectTemplateId).then((res) => {
|
||||||
projectInfo.value = res.data.data.projectTemplateInfo;
|
projectInfo.value = res.data.data.projectTemplateInfo;
|
||||||
projectInfo.value.rangeTime = [
|
projectInfo.value.rangeTime = [
|
||||||
projectInfo.value.beginTime,
|
projectInfo.value.beginTime,
|
||||||
projectInfo.value.endTime,
|
projectInfo.value.endTime,
|
||||||
];
|
];
|
||||||
projectInfo.value.courseSyncFlag = !!projectInfo.value.courseSyncFlag;
|
projectInfo.value.courseSyncFlag = !!projectInfo.value.courseSyncFlag
|
||||||
});
|
});
|
||||||
|
|
||||||
const backPage = () => {
|
const backPage = () => {
|
||||||
router.back();
|
router.back();
|
||||||
@@ -283,15 +282,15 @@ const createProject = () => {
|
|||||||
}
|
}
|
||||||
projectInfo.value.courseSyncFlag = courseSyncFlag.value ? 1 : 0;
|
projectInfo.value.courseSyncFlag = courseSyncFlag.value ? 1 : 0;
|
||||||
api
|
api
|
||||||
.templateEdit({
|
.templateEdit({
|
||||||
...projectInfo.value,
|
...projectInfo.value,
|
||||||
courseSyncFlag: projectInfo.value.courseSyncFlag ? 1 : 0,
|
courseSyncFlag: projectInfo.value.courseSyncFlag ? 1 : 0,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
router.back();
|
router.back();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
function managerChange(e, l, d, t) {
|
function managerChange(e, l, d, t) {
|
||||||
|
|||||||
@@ -6,22 +6,23 @@
|
|||||||
* @FilePath: /fe-manage/vue.config.js
|
* @FilePath: /fe-manage/vue.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
|
||||||
*/
|
*/
|
||||||
const { defineConfig } = require("@vue/cli-service");
|
const {defineConfig} = require("@vue/cli-service");
|
||||||
|
|
||||||
module.exports = defineConfig({
|
module.exports = defineConfig({
|
||||||
publicPath: "/manage",
|
publicPath: "/manage",
|
||||||
// transpileDependencies: true,
|
// transpileDependencies: true,
|
||||||
devServer: {
|
devServer: {
|
||||||
port: 8080,
|
port: 8080,
|
||||||
proxy: {
|
proxy: {
|
||||||
"/manageApi": {
|
"/manageApi": {
|
||||||
target:"http://111.231.196.214:30001/",
|
target: process.env.VITE_PROXY_URL,
|
||||||
changeOrigin: true, //表示是否改变原域名
|
changeOrigin: true, //表示是否改变原域名
|
||||||
// secure: false,
|
// secure: false,
|
||||||
// ws: false, //表示WebSocket协议
|
// ws: false, //表示WebSocket协议
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
"^/manageApi": "",
|
"^/manageApi": "",
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user