diff --git a/src/api/index.js b/src/api/index.js
index 49ade8be..f1afd2ed 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -37,11 +37,8 @@ import http from "./config";
// 接口-请求
-// 创建编辑单层项目
+// 创建编辑单层项目(type=3)/ 多层项目(type=1)/ 多层子项目(type=2)
export const createProject = (obj) => http.post('/admin/project/edit', obj)
-// 创建多层项目
-export const createStoreyProject = (obj) => http.post('/admin/project/edit', obj)
-
// 获取项目列表
export const getProjectList = (obj) => http.post('/admin/project/list', obj)
\ No newline at end of file
diff --git a/src/views/projectcenter/ProjectAdd.vue b/src/views/projectcenter/ProjectAdd.vue
index 42af2981..f8c46024 100644
--- a/src/views/projectcenter/ProjectAdd.vue
+++ b/src/views/projectcenter/ProjectAdd.vue
@@ -81,12 +81,12 @@
@@ -340,13 +360,66 @@ export default {
let manager = "";
let managerId = "";
const classificationChange1 = (key) => {
- console.log(`selected ${key}`);
- console.log(classifyList1.value[key - 1].label)
- manager = String(classifyList1.value[key - 1].label)
- managerId = String(key)
+ console.log(`selected ${key}`, classifyList1);
+ let mstr = '';
+ let midstr = '';
+ for (let i = 0; i < key.length; i++) {
+ if (key.length - 1 !== i) {
+ midstr += key[i] + ',';
+ mstr += classifyList1.value[i].label + ',';
+ } else {
+ midstr += key[i];
+ mstr += classifyList1.value[i].label;
+ }
+ }
+ console.log(mstr, midstr)
+ manager = mstr;
+ managerId = midstr;
};
// 资源归属 sourceBelongId 后续给接口
+ const classifyList2 = ref([
+ { value: 1, label: '项目一' },
+ { value: 2, label: '项目二' },
+ { value: 3, label: '项目三' },
+ ]);
+
+ const classificationChange2 = (key) => {
+ console.log(`selected ${key}`, classifyList2);
+ }
+
+ // 项目级别
+ const classifyList3 = ref([
+ { value: 1, label: '集团级' },
+ { value: 2, label: '组织级' },
+ { value: 3, label: '现地级' },
+ { value: 4, label: '部门级' },
+ ]);
+ const classificationChange3 = (key) => {
+ console.log(`selected ${key}`, classifyList3);
+ }
+
+ // 培训体系
+ const classifyList4 = ref([
+ { value: 1, label: '集团级' },
+ { value: 2, label: '组织级' },
+ { value: 3, label: '现地级' },
+ { value: 4, label: '部门级' },
+ ]);
+ const classificationChange4 = (key) => {
+ console.log(`selected ${key}`, classifyList4);
+ }
+
+ // 模版
+ const classifyList5 = ref([
+ { value: 1, label: '模版一' },
+ { value: 2, label: '模版二' },
+ { value: 3, label: '模版三' },
+ { value: 4, label: '模版四' },
+ ]);
+ const classificationChange5 = (key) => {
+ console.log(`selected ${key}`, classifyList5);
+ }
// 项目说明
const remark = ref('');
@@ -438,10 +511,14 @@ export default {
api.createProject(obj).then(res => {
console.log(res)
if (res.status == 200 && res.data.code == 200) {
- router.push({
- path: '/taskpage',
- query: { id: res.data.data.projectId }
- });
+ message.destroy();
+ message.success("创建成功")
+ setTimeout(() => {
+ router.push({
+ path: '/taskpage',
+ query: { id: res.data.data.projectId }
+ });
+ }, 1000);
} else {
message.destroy();
message.error("创建失败,请检查当前网络状态。")
@@ -459,6 +536,10 @@ export default {
classifyList,
classificationChange,
classificationChange1,
+ classificationChange2,
+ classificationChange3,
+ classificationChange4,
+ classificationChange5,
fileList,
fileList1,
loading,
@@ -469,6 +550,10 @@ export default {
beforeUpload1,
onRangeChange,
classifyList1,
+ classifyList2,
+ classifyList3,
+ classifyList4,
+ classifyList5,
remark,
changeChecked,
changeChecked1,
diff --git a/src/views/projectcenter/ProjectManage.vue b/src/views/projectcenter/ProjectManage.vue
index cca9c989..7e334aed 100644
--- a/src/views/projectcenter/ProjectManage.vue
+++ b/src/views/projectcenter/ProjectManage.vue
@@ -477,6 +477,7 @@