mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
feat:增加单层项目、单层子项目、班级的编辑。
This commit is contained in:
12
package-lock.json
generated
12
package-lock.json
generated
@@ -4693,9 +4693,9 @@
|
|||||||
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
|
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
|
||||||
},
|
},
|
||||||
"node_modules/dayjs": {
|
"node_modules/dayjs": {
|
||||||
"version": "1.11.5",
|
"version": "1.11.6",
|
||||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.5.tgz",
|
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.6.tgz",
|
||||||
"integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA=="
|
"integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ=="
|
||||||
},
|
},
|
||||||
"node_modules/debug": {
|
"node_modules/debug": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.4",
|
||||||
@@ -14972,9 +14972,9 @@
|
|||||||
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
|
"integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
|
||||||
},
|
},
|
||||||
"dayjs": {
|
"dayjs": {
|
||||||
"version": "1.11.5",
|
"version": "1.11.6",
|
||||||
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.5.tgz",
|
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.6.tgz",
|
||||||
"integrity": "sha512-CAdX5Q3YW3Gclyo5Vpqkgpj8fSdLQcRuzfX6mC6Phy0nfJ0eGYOeS7m4mt2plDWLAtA4TqTakvbboHvUxfe4iA=="
|
"integrity": "sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ=="
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "4.3.4",
|
"version": "4.3.4",
|
||||||
|
|||||||
@@ -1,40 +1,25 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="openPages">
|
<div class="openPages">
|
||||||
<draggable
|
<draggable v-model="openList" chosenClass="chosen" forceFallback="true" ghostClass="ghost" group="openPage"
|
||||||
v-model="openList"
|
animation="500" @start="onStart" @end="onEnd" style="display: flex">
|
||||||
chosenClass="chosen"
|
<template #item="{ element }">
|
||||||
forceFallback="true"
|
<div style="position: relative">
|
||||||
ghostClass="ghost"
|
<router-link :to="element.href" class="openItems" :style="{ background: element.active ? '#f5f7fa' : '' }">
|
||||||
group="openPage"
|
<div :style="{
|
||||||
animation="500"
|
color: element.active
|
||||||
@start="onStart"
|
? 'rgba(64, 158, 255, 1)'
|
||||||
@end="onEnd"
|
: 'rgba(135, 139, 146, 1)',
|
||||||
style="display: flex"
|
}">
|
||||||
>
|
{{ element.pagename }}
|
||||||
<template #item="{ element }">
|
</div>
|
||||||
<div style="position: relative">
|
</router-link>
|
||||||
<router-link
|
<div class="close" @click.stop="closePage(element)">
|
||||||
:to="element.href"
|
<img src="../assets/images/openPages/close.png" />
|
||||||
class="openItems"
|
</div>
|
||||||
:style="{ background: element.active ? '#f5f7fa' : '' }"
|
</div>
|
||||||
>
|
</template>
|
||||||
<div
|
</draggable>
|
||||||
:style="{
|
</div>
|
||||||
color: element.active
|
|
||||||
? 'rgba(64, 158, 255, 1)'
|
|
||||||
: 'rgba(135, 139, 146, 1)',
|
|
||||||
}"
|
|
||||||
>
|
|
||||||
{{ element.pagename }}
|
|
||||||
</div>
|
|
||||||
</router-link>
|
|
||||||
<div class="close" @click.stop="closePage(element)">
|
|
||||||
<img src="../assets/images/openPages/close.png" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</draggable>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs } from "vue";
|
import { reactive, toRefs } from "vue";
|
||||||
@@ -42,92 +27,96 @@ import { useStore } from "vuex";
|
|||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import draggable from "vuedraggable";
|
import draggable from "vuedraggable";
|
||||||
export default {
|
export default {
|
||||||
name: "OpenPages",
|
name: "OpenPages",
|
||||||
components: {
|
components: {
|
||||||
draggable,
|
draggable,
|
||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const $router = useRouter();
|
const $router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
openList: store.state.openpages,
|
openList: store.state.openpages,
|
||||||
});
|
});
|
||||||
|
|
||||||
const closePage = (value) => {
|
const closePage = (value) => {
|
||||||
console.log("点击关闭页面", value, state.openList);
|
console.log("点击关闭页面", value, state.openList);
|
||||||
state.openList.map((item, key) => {
|
state.openList.map((item, key) => {
|
||||||
if (item.href === value.href) {
|
if (item.href === value.href) {
|
||||||
if (state.openList.length === 1) {
|
if (state.openList.length === 1) {
|
||||||
if (state.openList[0].href !== "/learningpath") {
|
if (state.openList[0].href !== "/learningpath") {
|
||||||
state.openList.splice(key, 1);
|
state.openList.splice(key, 1);
|
||||||
}
|
}
|
||||||
$router.push({ path: "/learningpath" });
|
$router.push({ path: "/learningpath" });
|
||||||
} else {
|
} else {
|
||||||
if (value.active) {
|
if (value.active) {
|
||||||
if (key === state.openList.length - 1) {
|
if (key === state.openList.length - 1) {
|
||||||
$router.push({ path: state.openList[key - 1].href });
|
$router.push({ path: state.openList[key - 1].href });
|
||||||
} else {
|
} else {
|
||||||
$router.push({ path: state.openList[key + 1].href });
|
$router.push({ path: state.openList[key + 1].href });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
state.openList.splice(key, 1);
|
state.openList.splice(key, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
store.commit("chengeOpenpages", state.openList);
|
store.commit("chengeOpenpages", state.openList);
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
closePage,
|
closePage,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.openPages {
|
.openPages {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
// height: 50px;
|
// height: 50px;
|
||||||
display: flex;
|
display: flex;
|
||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
box-shadow: 0px 8px 8px 0px rgba(118, 136, 166, 0.1);
|
box-shadow: 0px 8px 8px 0px rgba(118, 136, 166, 0.1);
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
.openItems {
|
|
||||||
width: 272px;
|
|
||||||
// min-width: 250px;
|
|
||||||
height: 50px;
|
|
||||||
border: 1px solid #edf2fa;
|
|
||||||
border-left: 0px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
font-size: 16px;
|
|
||||||
font-weight: 400;
|
|
||||||
line-height: 36px;
|
|
||||||
cursor: pointer;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
.close {
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
border-radius: 8px;
|
|
||||||
|
|
||||||
position: absolute;
|
.openItems {
|
||||||
display: flex;
|
width: 272px;
|
||||||
align-items: center;
|
// min-width: 250px;
|
||||||
justify-content: center;
|
height: 50px;
|
||||||
top: 17px;
|
border: 1px solid #edf2fa;
|
||||||
right: 27px;
|
border-left: 0px;
|
||||||
}
|
display: flex;
|
||||||
.close:hover {
|
align-items: center;
|
||||||
background: rgba(220, 220, 220, 1);
|
justify-content: center;
|
||||||
}
|
font-size: 16px;
|
||||||
|
font-weight: 400;
|
||||||
|
line-height: 36px;
|
||||||
|
cursor: pointer;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.chosen {
|
.close {
|
||||||
// background-color: pink;
|
width: 16px;
|
||||||
}
|
height: 16px;
|
||||||
.ghost {
|
border-radius: 8px;
|
||||||
// background-color: red;
|
|
||||||
opacity: 0;
|
position: absolute;
|
||||||
}
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
top: 17px;
|
||||||
|
right: 27px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.close:hover {
|
||||||
|
background: rgba(220, 220, 220, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chosen {
|
||||||
|
// background-color: pink;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ghost {
|
||||||
|
// background-color: red;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -3,9 +3,9 @@
|
|||||||
<div class="projectAdd">
|
<div class="projectAdd">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title">创建/编辑单层项目</span>
|
<span class="title">创建/编辑单层项目</span>
|
||||||
<router-link to="/projectmanage" class="goback">
|
<div @click="backPage" style="cursor: pointer;" to="/projectmanage" class="goback">
|
||||||
<span class="return"></span><span class="returntext">返回</span>
|
<span class="return"></span><span class="returntext">返回</span>
|
||||||
</router-link>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
@@ -72,8 +72,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']"
|
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']" v-model:value="rangevalue"
|
||||||
style="width: 100%; height: 40px; border-radius: 5px" show-time @change="onRangeChange" />
|
style="width: 100%; height: 40px; border-radius: 5px" @change="onRangeChange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
">BOEU实施</span></a-radio>
|
">BOEU实施</span></a-radio>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<!-- <div class="name name2">
|
||||||
<div class="namebox" style="margin-top: 8px">
|
<div class="namebox" style="margin-top: 8px">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
<div class="inname">附件</div>
|
<div class="inname">附件</div>
|
||||||
@@ -177,24 +177,28 @@
|
|||||||
<img v-if="fileList1.length < 6" class="fileimg" src="../../assets/images/projectadd/enclosure.png" />
|
<img v-if="fileList1.length < 6" class="fileimg" src="../../assets/images/projectadd/enclosure.png" />
|
||||||
<a-upload :disabled="fileList1.length > 5" :before-upload="beforeUpload1" v-model:file-list="fileList1"
|
<a-upload :disabled="fileList1.length > 5" :before-upload="beforeUpload1" v-model:file-list="fileList1"
|
||||||
@remove="removeFile" name="file" action="/api/file/upload" :headers="headers" @change="handleChange1">
|
@remove="removeFile" name="file" action="/api/file/upload" :headers="headers" @change="handleChange1">
|
||||||
<!-- <a-button> -->
|
|
||||||
<!-- <upload-outlined></upload-outlined> -->
|
|
||||||
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
||||||
<span v-else class="filetext">上传附件</span>
|
<span v-else class="filetext">上传附件</span>
|
||||||
<!-- </a-button> -->
|
|
||||||
</a-upload>
|
</a-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="support">
|
<div class="support">
|
||||||
支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip
|
支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="template">
|
<div class="template">
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<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 :getPopupContainer="
|
<a-select v-if="isEdit" disabled="true" :getPopupContainer="
|
||||||
|
(triggerNode) => {
|
||||||
|
return triggerNode.parentNode || document.body;
|
||||||
|
}
|
||||||
|
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
||||||
|
@change="classificationChange5">
|
||||||
|
</a-select>
|
||||||
|
<a-select v-else :getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
@@ -208,7 +212,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>
|
<a-button v-on:click="createProject" type="primary" class="btn1">确定</a-button>
|
||||||
<a-button class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -216,13 +220,138 @@
|
|||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref } from "vue";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter, useRoute } from "vue-router";
|
||||||
|
import dayjs from 'dayjs';
|
||||||
import * as api from "../../api/index";
|
import * as api from "../../api/index";
|
||||||
|
import { storage } from '../../api/storage';
|
||||||
|
import { toDate } from '../../api/method'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
setup() {
|
setup() {
|
||||||
api.getProjectDetail({ projectId: 3 }).then(res => { console.log(res) }).catch(err => { console.log(err) })
|
// 编辑页面跳转过来时候,自动填充表格
|
||||||
|
const routers = useRoute();
|
||||||
|
const isEdit = ref(false);
|
||||||
|
let peojectID = "";
|
||||||
|
|
||||||
|
if (routers.query.projectId) {
|
||||||
|
storage.set("projectAddId", routers.query.projectId);
|
||||||
|
isEdit.value = true;
|
||||||
|
peojectID = routers.query.projectId;
|
||||||
|
// 需要编辑
|
||||||
|
api.getProjectDetail({ projectId: routers.query.projectId }).then(res => {
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
let info = res.data.data.projectInfo;
|
||||||
|
console.log(info)
|
||||||
|
// projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 *
|
||||||
|
projectName.value = info.name;
|
||||||
|
state.classifySelect = classifyList.value[1]; // info.category
|
||||||
|
imageUrl.value = info.picUrl;
|
||||||
|
|
||||||
|
let start = toDate(info.beginTime/1000,'YYYY/MM/DD');
|
||||||
|
let end = toDate(info.endTime/1000,'YYYY/MM/DD');
|
||||||
|
state.rangevalue = [
|
||||||
|
dayjs(start, 'YYYY/MM/DD'),
|
||||||
|
dayjs(end, 'YYYY/MM/DD'),
|
||||||
|
];
|
||||||
|
|
||||||
|
let manageName = info.manager.split(",");
|
||||||
|
let manageValue = info.managerId.split(",");
|
||||||
|
let optionsManage = []
|
||||||
|
for (let i = 0; i < manageName.length; i++) {
|
||||||
|
let obj = {
|
||||||
|
label: manageName[i],
|
||||||
|
value: manageValue[i]
|
||||||
|
}
|
||||||
|
optionsManage.push(obj)
|
||||||
|
}
|
||||||
|
console.log(optionsManage)
|
||||||
|
state.classifySelect1 = optionsManage;
|
||||||
|
state.classifySelect2 = classifyList2.value[info.sourceBelongId - 1];
|
||||||
|
remark.value = info.remark;
|
||||||
|
state.checked = info.boeFlag ? info.boeFlag : false;
|
||||||
|
state.classifySelect3 = classifyList3.value[info.level];
|
||||||
|
state.classifySelect4 = classifyList4.value[info.systemId - 1];
|
||||||
|
state.checked1 = info.boeFlag ? info.boeFlag : false;
|
||||||
|
// fileList1.value = info.attach.split(",");
|
||||||
|
|
||||||
|
projectType = 1;
|
||||||
|
picUrl = info.picUrl;
|
||||||
|
beginTime = Number(info.beginTime/1000);
|
||||||
|
endTime = Number(info.endTime/1000);
|
||||||
|
manager = info.manager;
|
||||||
|
managerId = info.managerId;
|
||||||
|
sourceBelongIdC = Number(info.sourceBelongId);
|
||||||
|
courseSyncFlag = info.courseSyncFlag;
|
||||||
|
levels = info.level;
|
||||||
|
systemid = info.systemId;
|
||||||
|
boeFlag = info.boeFlag;
|
||||||
|
}
|
||||||
|
}).catch(err => { console.log(err) })
|
||||||
|
} else {
|
||||||
|
if (storage.get("projectAddId")) {
|
||||||
|
isEdit.value = true;
|
||||||
|
peojectID = storage.get("projectAddId");
|
||||||
|
// 需要编辑
|
||||||
|
api.getProjectDetail({ projectId: storage.get("projectAddId") }).then(res => {
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
let info = res.data.data.projectInfo;
|
||||||
|
console.log("我是从本地存储获取的id", info)
|
||||||
|
projectName.value = info.name;
|
||||||
|
state.classifySelect = classifyList.value[1]; // info.category
|
||||||
|
imageUrl.value = info.picUrl;
|
||||||
|
|
||||||
|
let start = toDate(info.beginTime/1000,'YYYY/MM/DD');
|
||||||
|
let end = toDate(info.endTime/1000,'YYYY/MM/DD');
|
||||||
|
state.rangevalue = [
|
||||||
|
dayjs(start, 'YYYY/MM/DD'),
|
||||||
|
dayjs(end, 'YYYY/MM/DD'),
|
||||||
|
];
|
||||||
|
|
||||||
|
let manageName = info.manager.split(",");
|
||||||
|
let manageValue = info.managerId.split(",");
|
||||||
|
let optionsManage = []
|
||||||
|
for (let i = 0; i < manageName.length; i++) {
|
||||||
|
let obj = {
|
||||||
|
label: manageName[i],
|
||||||
|
value: manageValue[i]
|
||||||
|
}
|
||||||
|
optionsManage.push(obj)
|
||||||
|
}
|
||||||
|
console.log(optionsManage)
|
||||||
|
state.classifySelect1 = optionsManage;
|
||||||
|
state.classifySelect2 = classifyList2.value[info.sourceBelongId - 1];
|
||||||
|
remark.value = info.remark;
|
||||||
|
state.checked = info.boeFlag ? info.boeFlag : false;
|
||||||
|
state.classifySelect3 = classifyList3.value[info.level];
|
||||||
|
state.classifySelect4 = classifyList4.value[info.systemId - 1];
|
||||||
|
state.checked1 = info.boeFlag ? info.boeFlag : false;
|
||||||
|
|
||||||
|
projectType = 1;
|
||||||
|
picUrl = info.picUrl;
|
||||||
|
beginTime = Number(info.beginTime/1000);
|
||||||
|
endTime = Number(info.endTime/1000);
|
||||||
|
manager = info.manager;
|
||||||
|
managerId = info.managerId;
|
||||||
|
sourceBelongIdC = Number(info.sourceBelongId);
|
||||||
|
courseSyncFlag = info.courseSyncFlag;
|
||||||
|
levels = info.level;
|
||||||
|
systemid = info.systemId;
|
||||||
|
boeFlag = info.boeFlag;
|
||||||
|
}
|
||||||
|
}).catch(err => { console.log(err) })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const backPage = () => {
|
||||||
|
storage.remove("projectAddId");
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
path: "/projectmanage"
|
||||||
|
});
|
||||||
|
}, 400);
|
||||||
|
}
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
classifySelect: null,
|
classifySelect: null,
|
||||||
@@ -232,6 +361,11 @@ export default {
|
|||||||
valueE: null,
|
valueE: null,
|
||||||
valueE1: null,
|
valueE1: null,
|
||||||
valueE2: null,
|
valueE2: null,
|
||||||
|
classifySelect1: [],
|
||||||
|
classifySelect2: [],
|
||||||
|
classifySelect3: [],
|
||||||
|
classifySelect4: [],
|
||||||
|
rangevalue: []
|
||||||
});
|
});
|
||||||
|
|
||||||
const projectName = ref("");
|
const projectName = ref("");
|
||||||
@@ -347,6 +481,8 @@ export default {
|
|||||||
|
|
||||||
let beginTime = "";
|
let beginTime = "";
|
||||||
let endTime = "";
|
let endTime = "";
|
||||||
|
const dateFormatList = ['YYYY/MM/DD'];
|
||||||
|
|
||||||
const onRangeChange = (value, dateString) => {
|
const onRangeChange = (value, dateString) => {
|
||||||
console.log("Selected Time: ", value);
|
console.log("Selected Time: ", value);
|
||||||
// 项目时间选择函数
|
// 项目时间选择函数
|
||||||
@@ -368,8 +504,8 @@ export default {
|
|||||||
|
|
||||||
let manager = "";
|
let manager = "";
|
||||||
let managerId = "";
|
let managerId = "";
|
||||||
const classificationChange1 = (key) => {
|
const classificationChange1 = (key, options) => {
|
||||||
console.log(`selected ${key}`, classifyList1);
|
console.log(`selected ${key}`, options);
|
||||||
let mstr = "";
|
let mstr = "";
|
||||||
let midstr = "";
|
let midstr = "";
|
||||||
for (let i = 0; i < key.length; i++) {
|
for (let i = 0; i < key.length; i++) {
|
||||||
@@ -382,6 +518,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(mstr, midstr);
|
console.log(mstr, midstr);
|
||||||
|
state.classifySelect1 = options;
|
||||||
|
let newoptions = [];
|
||||||
|
for (let i = 0; i < state.classifySelect1.length; i++) {
|
||||||
|
if (state.classifySelect1[i].value) {
|
||||||
|
newoptions.push(state.classifySelect1[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
state.classifySelect1 = newoptions;
|
||||||
manager = mstr;
|
manager = mstr;
|
||||||
managerId = midstr;
|
managerId = midstr;
|
||||||
};
|
};
|
||||||
@@ -393,8 +537,10 @@ export default {
|
|||||||
{ value: 3, label: "项目三" },
|
{ value: 3, label: "项目三" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
let sourceBelongIdC = '';
|
||||||
const classificationChange2 = (key) => {
|
const classificationChange2 = (key) => {
|
||||||
console.log(`selected ${key}`, classifyList2);
|
console.log(`selected ${key}`, classifyList2);
|
||||||
|
sourceBelongIdC = key;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 项目级别
|
// 项目级别
|
||||||
@@ -404,8 +550,11 @@ export default {
|
|||||||
{ value: 3, label: "现地级" },
|
{ value: 3, label: "现地级" },
|
||||||
{ value: 4, label: "部门级" },
|
{ value: 4, label: "部门级" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
let levels = "";
|
||||||
const classificationChange3 = (key) => {
|
const classificationChange3 = (key) => {
|
||||||
console.log(`selected ${key}`, classifyList3);
|
console.log(`selected ${key}`, classifyList3);
|
||||||
|
levels = key;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 培训体系
|
// 培训体系
|
||||||
@@ -415,8 +564,11 @@ export default {
|
|||||||
{ value: 3, label: "现地级" },
|
{ value: 3, label: "现地级" },
|
||||||
{ value: 4, label: "部门级" },
|
{ value: 4, label: "部门级" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
let systemid = "";
|
||||||
const classificationChange4 = (key) => {
|
const classificationChange4 = (key) => {
|
||||||
console.log(`selected ${key}`, classifyList4);
|
console.log(`selected ${key}`, classifyList4);
|
||||||
|
systemid = key;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 模版
|
// 模版
|
||||||
@@ -479,66 +631,128 @@ export default {
|
|||||||
sourceBelongId: "请选择资源归属",
|
sourceBelongId: "请选择资源归属",
|
||||||
level: "请填写项目级别",
|
level: "请填写项目级别",
|
||||||
systemId: "请填写项目培训体系",
|
systemId: "请填写项目培训体系",
|
||||||
boeFlag: "请选择是否BOE实施",
|
boeFlag: "请选择是否BOE实施"
|
||||||
attach: "请上传附件",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const createProject = () => {
|
const createProject = () => {
|
||||||
let obj = {
|
console.log('我是否要编辑项目', isEdit.value)
|
||||||
name: projectName["value"],
|
if (isEdit.value) {
|
||||||
category: projectType,
|
console.log('我要编辑项目', peojectID)
|
||||||
picUrl: picUrl,
|
let obj = {
|
||||||
beginTime: beginTime,
|
projectId: Number(peojectID),
|
||||||
endTime: endTime,
|
name: projectName["value"],
|
||||||
manager: manager,
|
category: projectType,
|
||||||
managerId: managerId,
|
picUrl: picUrl,
|
||||||
sourceBelongId: 11,
|
beginTime: beginTime,
|
||||||
remark: remark["value"],
|
endTime: endTime,
|
||||||
courseSyncFlag: courseSyncFlag,
|
manager: manager,
|
||||||
level: 3,
|
managerId: managerId,
|
||||||
systemId: 4,
|
sourceBelongId: sourceBelongIdC,
|
||||||
boeFlag: boeFlag,
|
remark: remark["value"],
|
||||||
attach: attach,
|
courseSyncFlag: courseSyncFlag,
|
||||||
type: 3,
|
level: levels,
|
||||||
templateId: 10,
|
systemId: systemid,
|
||||||
parentId: 0,
|
boeFlag: boeFlag,
|
||||||
notice: "",
|
attach: attach,
|
||||||
noticeFlag: 0,
|
type: 3,
|
||||||
status: 0,
|
templateId: 0,
|
||||||
};
|
parentId: 0,
|
||||||
console.log("提交的数据格式 %o", obj);
|
notice: "",
|
||||||
for (let i in errorMsgs) {
|
noticeFlag: 0,
|
||||||
console.log(obj[i]);
|
status: 0,
|
||||||
if (obj[i] === "" || obj[i] === undefined) {
|
};
|
||||||
message.destroy();
|
|
||||||
message.warning(errorMsgs[i]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
api
|
console.log(obj);
|
||||||
.createProject(obj)
|
|
||||||
.then((res) => {
|
for (let i in errorMsgs) {
|
||||||
console.log(res);
|
console.log(obj[i]);
|
||||||
if (res.status == 200 && res.data.code == 200) {
|
if (obj[i] === "" || obj[i] === undefined) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("创建成功");
|
message.warning(errorMsgs[i]);
|
||||||
setTimeout(() => {
|
return;
|
||||||
router.push({
|
}
|
||||||
path: "/taskpage",
|
}
|
||||||
query: { id: res.data.data.projectId },
|
|
||||||
});
|
api
|
||||||
}, 1000);
|
.createProject(obj)
|
||||||
} else {
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
message.destroy();
|
||||||
|
message.success("编辑成功");
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
path: "/projectmanage"
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
message.destroy();
|
||||||
|
message.error("编辑失败,请检查当前网络状态。");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
message.destroy();
|
||||||
|
message.error("编辑失败,请检查当前网络状态。");
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
let obj = {
|
||||||
|
name: projectName["value"],
|
||||||
|
category: projectType,
|
||||||
|
picUrl: picUrl,
|
||||||
|
beginTime: beginTime,
|
||||||
|
endTime: endTime,
|
||||||
|
manager: manager,
|
||||||
|
managerId: managerId,
|
||||||
|
sourceBelongId: sourceBelongIdC,
|
||||||
|
remark: remark["value"],
|
||||||
|
courseSyncFlag: courseSyncFlag,
|
||||||
|
level: levels,
|
||||||
|
systemId: systemid,
|
||||||
|
boeFlag: boeFlag,
|
||||||
|
attach: attach,
|
||||||
|
type: 3,
|
||||||
|
templateId: 10,
|
||||||
|
parentId: 0,
|
||||||
|
notice: "",
|
||||||
|
noticeFlag: 0,
|
||||||
|
status: 0,
|
||||||
|
};
|
||||||
|
console.log("提交的数据格式 %o", obj);
|
||||||
|
for (let i in errorMsgs) {
|
||||||
|
console.log(obj[i]);
|
||||||
|
if (obj[i] === "" || obj[i] === undefined) {
|
||||||
|
message.destroy();
|
||||||
|
message.warning(errorMsgs[i]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
api
|
||||||
|
.createProject(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
message.destroy();
|
||||||
|
message.success("创建成功");
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
path: "/taskpage",
|
||||||
|
query: { id: res.data.data.projectId },
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
message.destroy();
|
||||||
|
message.error("创建失败,请检查当前网络状态。");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("创建失败,请检查当前网络状态。");
|
message.error("创建失败,请检查当前网络状态。");
|
||||||
}
|
});
|
||||||
})
|
}
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
message.destroy();
|
|
||||||
message.error("创建失败,请检查当前网络状态。");
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -571,6 +785,10 @@ export default {
|
|||||||
uplodaFileCount,
|
uplodaFileCount,
|
||||||
createProject,
|
createProject,
|
||||||
removeFile,
|
removeFile,
|
||||||
|
|
||||||
|
isEdit,
|
||||||
|
backPage,
|
||||||
|
dateFormatList,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -669,6 +669,7 @@ export default {
|
|||||||
currentEdProjectName: '',
|
currentEdProjectName: '',
|
||||||
|
|
||||||
currentEditChildrensProjectId: '',
|
currentEditChildrensProjectId: '',
|
||||||
|
dcProjectID: ''
|
||||||
|
|
||||||
});
|
});
|
||||||
// 数据接入 - start -
|
// 数据接入 - start -
|
||||||
@@ -796,7 +797,7 @@ export default {
|
|||||||
let edname = '';
|
let edname = '';
|
||||||
const edclassificationChangeName = (key) => {
|
const edclassificationChangeName = (key) => {
|
||||||
console.log(key)
|
console.log(key)
|
||||||
edname = key;
|
edname = key.target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
let edcategory = '';
|
let edcategory = '';
|
||||||
@@ -944,17 +945,32 @@ export default {
|
|||||||
// 编辑多层项目
|
// 编辑多层项目
|
||||||
const editStoreyProject = () => {
|
const editStoreyProject = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
projectId: 1,
|
projectId: Number(state.dcProjectID),
|
||||||
name: edname,
|
name: edname,
|
||||||
category: edcategory,
|
category: edcategory,
|
||||||
manager: edmanage,
|
manager: edmanage.toString(","),
|
||||||
managerId: edmanageid,
|
managerId: edmanageid.toString(","),
|
||||||
sourceBelongId: edsource
|
sourceBelongId: edsource,
|
||||||
|
type: 1,
|
||||||
|
picUrl: 0
|
||||||
}
|
}
|
||||||
if (obj.name !== "" || obj.category !== "" || obj.manager !== "" || obj.sourceBelongId !== "") {
|
if (obj.name !== "" || obj.category !== "" || obj.manager !== "" || obj.sourceBelongId !== "") {
|
||||||
alert("我需要编辑")
|
console.log("我需要编辑")
|
||||||
console.log(obj)
|
console.log(obj)
|
||||||
state.eddoublepro = false;
|
api.createProject(obj).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
state.eddoublepro = false;
|
||||||
|
message.destroy();
|
||||||
|
message.success("编辑成功");
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
state.eddoublepro = false;
|
||||||
|
message.destroy();
|
||||||
|
message.error("编辑失败,请检查当前网络状态。");
|
||||||
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
state.eddoublepro = false;
|
state.eddoublepro = false;
|
||||||
}
|
}
|
||||||
@@ -1236,7 +1252,7 @@ export default {
|
|||||||
"草稿" :
|
"草稿" :
|
||||||
value.record.status == 1 && Number(value.record.beginTime) < Math.ceil(new Date().getTime / 1000) ?
|
value.record.status == 1 && Number(value.record.beginTime) < Math.ceil(new Date().getTime / 1000) ?
|
||||||
"进行中" :
|
"进行中" :
|
||||||
value.record.status == 1 && Number(value.record.beginTime) > Math.ceil(new Date().getTime / 1000) ?
|
value.record.status == 1 && Number(value.record.beginTime) > Math.ceil(new Date().getTime / 1000) && value.record.type !== 1 && value.record.type !== 2 ?
|
||||||
"未开始" :
|
"未开始" :
|
||||||
value.record.status == 2 ?
|
value.record.status == 2 ?
|
||||||
"未开始" : "已结束"
|
"未开始" : "已结束"
|
||||||
@@ -1281,6 +1297,7 @@ export default {
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
state.eddoublepro = true;
|
state.eddoublepro = true;
|
||||||
console.log("多层项目编辑")
|
console.log("多层项目编辑")
|
||||||
|
state.dcProjectID = value.record.projectId;
|
||||||
edvalue1.value = value.record.name;
|
edvalue1.value = value.record.name;
|
||||||
{/* edvalue2.value = classifyList[value.record.category] */ }
|
{/* edvalue2.value = classifyList[value.record.category] */ }
|
||||||
edvalue2.value = classifyList.value[0];
|
edvalue2.value = classifyList.value[0];
|
||||||
@@ -1355,8 +1372,8 @@ export default {
|
|||||||
// options={state.projectNameList}
|
// options={state.projectNameList}
|
||||||
dropdownClassName="tabledropdown"
|
dropdownClassName="tabledropdown"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
{/*
|
{/*
|
||||||
<a-select-option value="基础信息" label="基础信息">
|
<a-select-option value="基础信息" label="基础信息">
|
||||||
<router-link to="/taskpage">基础信息</router-link>
|
<router-link to="/taskpage">基础信息</router-link>
|
||||||
@@ -1370,7 +1387,7 @@ export default {
|
|||||||
存为模版
|
存为模版
|
||||||
</div>
|
</div>
|
||||||
</a-select-option> */}
|
</a-select-option> */}
|
||||||
<a-select-option value="复制" label="复制">
|
<a-select-option value="复制" label="复制">
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
showCopyModal();
|
showCopyModal();
|
||||||
@@ -1443,21 +1460,21 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
class="operation3"
|
class="operation3"
|
||||||
// onClick={() => {
|
// onClick={() => {
|
||||||
// showCopyModal();
|
// showCopyModal();
|
||||||
// }}
|
// }}
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<div class="tableSelect">
|
<div class="tableSelect">
|
||||||
<a-select
|
<a-select
|
||||||
style="width: 50px"
|
style="width: 50px"
|
||||||
value="更多"
|
value="更多"
|
||||||
// options={state.projectNameList}
|
// options={state.projectNameList}
|
||||||
dropdownClassName="tabledropdown"
|
dropdownClassName="tabledropdown"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
{/*
|
{/*
|
||||||
<a-select-option value="基础信息" label="基础信息">
|
<a-select-option value="基础信息" label="基础信息">
|
||||||
<router-link to="/taskpage">基础信息</router-link>
|
<router-link to="/taskpage">基础信息</router-link>
|
||||||
@@ -1471,7 +1488,7 @@ export default {
|
|||||||
存为模版
|
存为模版
|
||||||
</div>
|
</div>
|
||||||
</a-select-option> */}
|
</a-select-option> */}
|
||||||
<a-select-option value="复制" label="复制">
|
<a-select-option value="复制" label="复制">
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
showCopyModal();
|
showCopyModal();
|
||||||
@@ -1480,7 +1497,7 @@ export default {
|
|||||||
复制
|
复制
|
||||||
</div>
|
</div>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -1536,9 +1553,9 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
class="operation3"
|
class="operation3"
|
||||||
// onClick={() => {
|
// onClick={() => {
|
||||||
// showCopyModal();
|
// showCopyModal();
|
||||||
// }}
|
// }}
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
<div class="tableSelect">
|
<div class="tableSelect">
|
||||||
@@ -1548,8 +1565,8 @@ export default {
|
|||||||
// options={state.projectNameList}
|
// options={state.projectNameList}
|
||||||
dropdownClassName="tabledropdown"
|
dropdownClassName="tabledropdown"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
{/*
|
{/*
|
||||||
<a-select-option value="基础信息" label="基础信息">
|
<a-select-option value="基础信息" label="基础信息">
|
||||||
<router-link to="/taskpage">基础信息</router-link>
|
<router-link to="/taskpage">基础信息</router-link>
|
||||||
@@ -1563,7 +1580,7 @@ export default {
|
|||||||
存为模版
|
存为模版
|
||||||
</div>
|
</div>
|
||||||
</a-select-option> */}
|
</a-select-option> */}
|
||||||
<a-select-option value="复制" label="复制">
|
<a-select-option value="复制" label="复制">
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
showCopyModal();
|
showCopyModal();
|
||||||
@@ -1582,7 +1599,7 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div></div>
|
<div></div>
|
||||||
@@ -1690,7 +1707,7 @@ export default {
|
|||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : value.record.status === 1 ? (
|
) : value.record.status === 1 ? (
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
<span class="operation1">查看</span>
|
<span class="operation1">查看</span>
|
||||||
<div class="tableSelect">
|
<div class="tableSelect">
|
||||||
@@ -1760,10 +1777,10 @@ export default {
|
|||||||
复制
|
复制
|
||||||
</div>
|
</div>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
) : value.record.status === -1 ? (
|
) : value.record.status === -1 ? (
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
@@ -1817,10 +1834,10 @@ export default {
|
|||||||
</div>
|
</div>
|
||||||
<span
|
<span
|
||||||
class="operation3"
|
class="operation3"
|
||||||
|
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
<div class="tableSelect">
|
<div class="tableSelect">
|
||||||
<a-select
|
<a-select
|
||||||
style="width: 50px"
|
style="width: 50px"
|
||||||
value="更多"
|
value="更多"
|
||||||
@@ -1847,7 +1864,7 @@ export default {
|
|||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
@@ -1871,12 +1888,12 @@ export default {
|
|||||||
if (value.record.isbj) {
|
if (value.record.isbj) {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/classadd',
|
path: '/classadd',
|
||||||
query: { projectId: value.record.projectId, name: value.record.paraentName }
|
query: { projectId: value.record.projectId, name: value.record.paraentName, edit: 0 }
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
router.push({
|
router.push({
|
||||||
path: '/sonproject',
|
path: '/sonproject',
|
||||||
query: { projectId: value.record.projectId, name: value.record.name }
|
query: { projectId: value.record.projectId, name: value.record.paraentName, edit: 0 }
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1944,7 +1961,7 @@ export default {
|
|||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
class="operation3"
|
class="operation3"
|
||||||
|
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
@@ -1993,7 +2010,7 @@ export default {
|
|||||||
|
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
) : value.record.status ===1|| value.record.status == 1 && Number(value.record.beginTime) > Math.ceil(new Date().getTime / 1000) ? (
|
) : value.record.status === 1 || value.record.status == 1 && Number(value.record.beginTime) > Math.ceil(new Date().getTime / 1000) ? (
|
||||||
<a-select
|
<a-select
|
||||||
style="width: 50px"
|
style="width: 50px"
|
||||||
value="更多"
|
value="更多"
|
||||||
@@ -2002,14 +2019,14 @@ export default {
|
|||||||
>
|
>
|
||||||
<a-select-option value="存为模版" label="存为模版">
|
<a-select-option value="存为模版" label="存为模版">
|
||||||
<a-select-option value="复制" label="复制">
|
<a-select-option value="复制" label="复制">
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
showCopyModal();
|
showCopyModal();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
复制
|
复制
|
||||||
</div>
|
</div>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
showStartModal();
|
showStartModal();
|
||||||
@@ -2132,6 +2149,8 @@ export default {
|
|||||||
data2.isbj = "class";
|
data2.isbj = "class";
|
||||||
})
|
})
|
||||||
console.log('lalallalaa', data)
|
console.log('lalallalaa', data)
|
||||||
|
} else {
|
||||||
|
data.paraentName = value.name;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<div class="projectAdd">
|
<div class="projectAdd">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title">创建/编辑单层子项目</span>
|
<span class="title">创建/编辑单层子项目</span>
|
||||||
<router-link to="/projectmanage" class="goback">
|
<div @click="backPage" style="cursor: pointer;" to="/projectmanage" class="goback">
|
||||||
<span class="return"></span><span class="returntext">返回</span>
|
<span class="return"></span><span class="returntext">返回</span>
|
||||||
</router-link>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="main">
|
<div class="main">
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
<div class="inname">子项目名称</div>
|
<div class="inname">子项目名称</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-input v-model:value="projectName" placeholder="请输入子项目名称" show-count :maxlength="30" />
|
<a-input v-model:value="projectName" placeholder="请输入项目名称" show-count :maxlength="30" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -83,8 +83,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']"
|
<a-range-picker separator="至" :placeholder="[' 开始时间', ' 结束时间']" v-model:value="rangevalue"
|
||||||
style="width: 100%; height: 40px; border-radius: 5px" show-time @change="onRangeChange" />
|
style="width: 100%; height: 40px; border-radius: 5px" @change="onRangeChange" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
" :value="classifySelect1" mode="multiple" placeholder="请选择子项目经理" style="width: 100%" :options="classifyList1"
|
" :value="classifySelect1" mode="multiple" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
|
||||||
@change="classificationChange1" allowClear showSearch>
|
@change="classificationChange1" allowClear showSearch>
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
">BOEU实施</span></a-radio>
|
">BOEU实施</span></a-radio>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<!-- <div class="name name2">
|
||||||
<div class="namebox" style="margin-top: 8px">
|
<div class="namebox" style="margin-top: 8px">
|
||||||
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
<div class="inname">附件</div>
|
<div class="inname">附件</div>
|
||||||
@@ -188,24 +188,28 @@
|
|||||||
<img v-if="fileList1.length < 6" class="fileimg" src="../../assets/images/projectadd/enclosure.png" />
|
<img v-if="fileList1.length < 6" class="fileimg" src="../../assets/images/projectadd/enclosure.png" />
|
||||||
<a-upload :disabled="fileList1.length > 5" :before-upload="beforeUpload1" v-model:file-list="fileList1"
|
<a-upload :disabled="fileList1.length > 5" :before-upload="beforeUpload1" v-model:file-list="fileList1"
|
||||||
@remove="removeFile" name="file" action="/api/file/upload" :headers="headers" @change="handleChange1">
|
@remove="removeFile" name="file" action="/api/file/upload" :headers="headers" @change="handleChange1">
|
||||||
<!-- <a-button> -->
|
|
||||||
<!-- <upload-outlined></upload-outlined> -->
|
|
||||||
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
||||||
<span v-else class="filetext">上传附件</span>
|
<span v-else class="filetext">上传附件</span>
|
||||||
<!-- </a-button> -->
|
|
||||||
</a-upload>
|
</a-upload>
|
||||||
</div>
|
</div>
|
||||||
<div class="support">
|
<div class="support">
|
||||||
支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip
|
支持.pdf,.ppt,.pptx,.doc,.docx,.xls,.xlsx,.jpg,.jpeg,.png,.gif,.zip
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="template">
|
<div class="template">
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<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 :getPopupContainer="
|
<a-select v-if="isEdit" disabled="true" :getPopupContainer="
|
||||||
|
(triggerNode) => {
|
||||||
|
return triggerNode.parentNode || document.body;
|
||||||
|
}
|
||||||
|
" v-model:value="classifySelect5" placeholder="请选择模版" :size="size" style="width: 100%" :options="classifyList5"
|
||||||
|
@change="classificationChange5">
|
||||||
|
</a-select>
|
||||||
|
<a-select v-else :getPopupContainer="
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
@@ -219,7 +223,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>
|
<a-button v-on:click="createProject" type="primary" class="btn1">确定</a-button>
|
||||||
<a-button class="btn2">取消</a-button>
|
<a-button @click="backPage" class="btn2">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -228,14 +232,20 @@
|
|||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref } 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 dayjs from 'dayjs';
|
||||||
import * as api from "../../api/index";
|
import * as api from "../../api/index";
|
||||||
import { storage } from '../../api/storage';
|
import { toDate } from '../../api/method'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "sonProject",
|
name: "projectAdd",
|
||||||
setup() {
|
setup() {
|
||||||
const router = useRouter();
|
// 编辑页面跳转过来时候,自动填充表格
|
||||||
const routers = useRoute();
|
const routers = useRoute();
|
||||||
|
const router = useRouter();
|
||||||
|
const isEdit = ref(false);
|
||||||
|
let peojectID = "";
|
||||||
|
let paraentID = "";
|
||||||
|
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
classifySelect: null,
|
classifySelect: null,
|
||||||
classifySelectId: null,
|
classifySelectId: null,
|
||||||
@@ -244,18 +254,93 @@ export default {
|
|||||||
valueE: null,
|
valueE: null,
|
||||||
valueE1: null,
|
valueE1: null,
|
||||||
valueE2: null,
|
valueE2: null,
|
||||||
|
classifySelect1: [],
|
||||||
|
classifySelect2: [],
|
||||||
|
classifySelect3: [],
|
||||||
|
classifySelect4: [],
|
||||||
|
rangevalue: [],
|
||||||
projectAscription: "",
|
projectAscription: "",
|
||||||
});
|
});
|
||||||
|
|
||||||
const projectName = ref("");
|
if (routers.query.name == undefined) {
|
||||||
|
router.push({
|
||||||
|
path: "/projectmanage"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
peojectID = routers.query.projectId;
|
||||||
state.projectAscription = routers.query.name;
|
state.projectAscription = routers.query.name;
|
||||||
|
|
||||||
if (routers.query.name) {
|
if (routers.query.edit !== undefined) {
|
||||||
storage.set("editproject", routers.query)
|
isEdit.value = true;
|
||||||
|
// 需要编辑
|
||||||
|
api.getProjectDetail({ projectId: routers.query.projectId }).then(res => {
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
let info = res.data.data.projectInfo;
|
||||||
|
console.log(info)
|
||||||
|
// projectName classifySelect imageUrl * classifySelect1 * remark checked classifySelect3 classifySelect4 changeChecked1 *
|
||||||
|
projectName.value = info.name;
|
||||||
|
state.classifySelect = classifyList.value[1]; // info.category
|
||||||
|
imageUrl.value = info.picUrl;
|
||||||
|
|
||||||
|
let start = toDate(info.beginTime / 1000, 'YYYY/MM/DD');
|
||||||
|
let end = toDate(info.endTime / 1000, 'YYYY/MM/DD');
|
||||||
|
state.rangevalue = [
|
||||||
|
dayjs(start, 'YYYY/MM/DD'),
|
||||||
|
dayjs(end, 'YYYY/MM/DD'),
|
||||||
|
];
|
||||||
|
|
||||||
|
let manageName = info.manager.split(",");
|
||||||
|
let manageValue = info.managerId.split(",");
|
||||||
|
let optionsManage = []
|
||||||
|
for (let i = 0; i < manageName.length; i++) {
|
||||||
|
let obj = {
|
||||||
|
label: manageName[i],
|
||||||
|
value: manageValue[i]
|
||||||
|
}
|
||||||
|
optionsManage.push(obj)
|
||||||
|
}
|
||||||
|
console.log(optionsManage)
|
||||||
|
state.classifySelect1 = optionsManage;
|
||||||
|
state.classifySelect2 = classifyList2.value[info.sourceBelongId - 1];
|
||||||
|
remark.value = info.remark;
|
||||||
|
state.checked = info.boeFlag ? info.boeFlag : false;
|
||||||
|
state.classifySelect3 = classifyList3.value[info.level];
|
||||||
|
state.classifySelect4 = classifyList4.value[info.systemId - 1];
|
||||||
|
state.checked1 = info.boeFlag ? info.boeFlag : false;
|
||||||
|
// fileList1.value = info.attach.split(",");
|
||||||
|
|
||||||
|
projectType = 1;
|
||||||
|
picUrl = info.picUrl;
|
||||||
|
beginTime = Number(info.beginTime / 1000);
|
||||||
|
endTime = Number(info.endTime / 1000);
|
||||||
|
manager = info.manager;
|
||||||
|
managerId = info.managerId;
|
||||||
|
sourceBelongIdC = Number(info.sourceBelongId);
|
||||||
|
courseSyncFlag = info.courseSyncFlag;
|
||||||
|
levels = info.level;
|
||||||
|
systemid = info.systemId;
|
||||||
|
boeFlag = info.boeFlag;
|
||||||
|
paraentID = Number(info.parentId);
|
||||||
|
}
|
||||||
|
}).catch(err => { console.log(err) })
|
||||||
|
} else {
|
||||||
|
paraentID = Number(routers.query.projectId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const backPage = () => {
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
path: "/projectmanage"
|
||||||
|
});
|
||||||
|
}, 400);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const projectName = ref("");
|
||||||
|
|
||||||
const classifyList = ref([
|
const classifyList = ref([
|
||||||
{ value: 1, label: "管理者" },
|
{ value: 1, label: "管理者" },
|
||||||
{ value: 2, label: "领军者" },
|
{ value: 2, label: "领军者" },
|
||||||
@@ -367,6 +452,8 @@ export default {
|
|||||||
|
|
||||||
let beginTime = "";
|
let beginTime = "";
|
||||||
let endTime = "";
|
let endTime = "";
|
||||||
|
const dateFormatList = ['YYYY/MM/DD'];
|
||||||
|
|
||||||
const onRangeChange = (value, dateString) => {
|
const onRangeChange = (value, dateString) => {
|
||||||
console.log("Selected Time: ", value);
|
console.log("Selected Time: ", value);
|
||||||
// 项目时间选择函数
|
// 项目时间选择函数
|
||||||
@@ -388,8 +475,8 @@ export default {
|
|||||||
|
|
||||||
let manager = "";
|
let manager = "";
|
||||||
let managerId = "";
|
let managerId = "";
|
||||||
const classificationChange1 = (key) => {
|
const classificationChange1 = (key, options) => {
|
||||||
console.log(`selected ${key}`, classifyList1);
|
console.log(`selected ${key}`, options);
|
||||||
let mstr = "";
|
let mstr = "";
|
||||||
let midstr = "";
|
let midstr = "";
|
||||||
for (let i = 0; i < key.length; i++) {
|
for (let i = 0; i < key.length; i++) {
|
||||||
@@ -402,6 +489,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(mstr, midstr);
|
console.log(mstr, midstr);
|
||||||
|
state.classifySelect1 = options;
|
||||||
|
let newoptions = [];
|
||||||
|
for (let i = 0; i < state.classifySelect1.length; i++) {
|
||||||
|
if (state.classifySelect1[i].value) {
|
||||||
|
newoptions.push(state.classifySelect1[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
state.classifySelect1 = newoptions;
|
||||||
manager = mstr;
|
manager = mstr;
|
||||||
managerId = midstr;
|
managerId = midstr;
|
||||||
};
|
};
|
||||||
@@ -413,8 +508,10 @@ export default {
|
|||||||
{ value: 3, label: "项目三" },
|
{ value: 3, label: "项目三" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
let sourceBelongIdC = '';
|
||||||
const classificationChange2 = (key) => {
|
const classificationChange2 = (key) => {
|
||||||
console.log(`selected ${key}`, classifyList2);
|
console.log(`selected ${key}`, classifyList2);
|
||||||
|
sourceBelongIdC = key;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 项目级别
|
// 项目级别
|
||||||
@@ -424,8 +521,11 @@ export default {
|
|||||||
{ value: 3, label: "现地级" },
|
{ value: 3, label: "现地级" },
|
||||||
{ value: 4, label: "部门级" },
|
{ value: 4, label: "部门级" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
let levels = "";
|
||||||
const classificationChange3 = (key) => {
|
const classificationChange3 = (key) => {
|
||||||
console.log(`selected ${key}`, classifyList3);
|
console.log(`selected ${key}`, classifyList3);
|
||||||
|
levels = key;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 培训体系
|
// 培训体系
|
||||||
@@ -435,8 +535,11 @@ export default {
|
|||||||
{ value: 3, label: "现地级" },
|
{ value: 3, label: "现地级" },
|
||||||
{ value: 4, label: "部门级" },
|
{ value: 4, label: "部门级" },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
let systemid = "";
|
||||||
const classificationChange4 = (key) => {
|
const classificationChange4 = (key) => {
|
||||||
console.log(`selected ${key}`, classifyList4);
|
console.log(`selected ${key}`, classifyList4);
|
||||||
|
systemid = key;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 模版
|
// 模版
|
||||||
@@ -499,66 +602,128 @@ export default {
|
|||||||
sourceBelongId: "请选择资源归属",
|
sourceBelongId: "请选择资源归属",
|
||||||
level: "请填写项目级别",
|
level: "请填写项目级别",
|
||||||
systemId: "请填写项目培训体系",
|
systemId: "请填写项目培训体系",
|
||||||
boeFlag: "请选择是否BOE实施",
|
boeFlag: "请选择是否BOE实施"
|
||||||
attach: "请上传附件",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const createProject = () => {
|
const createProject = () => {
|
||||||
let obj = {
|
console.log('我是否要编辑项目', isEdit.value)
|
||||||
name: projectName["value"],
|
if (isEdit.value) {
|
||||||
category: projectType,
|
console.log('我要编辑项目', peojectID)
|
||||||
picUrl: picUrl,
|
let obj = {
|
||||||
beginTime: beginTime,
|
projectId: Number(peojectID),
|
||||||
endTime: endTime,
|
name: projectName["value"],
|
||||||
manager: manager,
|
category: projectType,
|
||||||
managerId: managerId,
|
picUrl: picUrl,
|
||||||
sourceBelongId: 11,
|
beginTime: beginTime,
|
||||||
remark: remark["value"],
|
endTime: endTime,
|
||||||
courseSyncFlag: courseSyncFlag,
|
manager: manager,
|
||||||
level: 3,
|
managerId: managerId,
|
||||||
systemId: 4,
|
sourceBelongId: sourceBelongIdC,
|
||||||
boeFlag: boeFlag,
|
remark: remark["value"],
|
||||||
attach: attach,
|
courseSyncFlag: courseSyncFlag,
|
||||||
type: 3,
|
level: levels,
|
||||||
templateId: 10,
|
systemId: systemid,
|
||||||
parentId: routers.query.projectId,
|
boeFlag: boeFlag,
|
||||||
notice: "",
|
attach: attach,
|
||||||
noticeFlag: 0,
|
type: 3,
|
||||||
status: 0,
|
templateId: 0,
|
||||||
};
|
parentId: paraentID,
|
||||||
console.log("提交的数据格式 %o", obj);
|
notice: "",
|
||||||
for (let i in errorMsgs) {
|
noticeFlag: 0,
|
||||||
console.log(obj[i]);
|
status: 0,
|
||||||
if (obj[i] === "" || obj[i] === undefined) {
|
};
|
||||||
message.destroy();
|
|
||||||
message.warning(errorMsgs[i]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
api
|
console.log(obj);
|
||||||
.createProject(obj)
|
|
||||||
.then((res) => {
|
for (let i in errorMsgs) {
|
||||||
console.log(res);
|
console.log(obj[i]);
|
||||||
if (res.status == 200 && res.data.code == 200) {
|
if (obj[i] === "" || obj[i] === undefined) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("创建成功");
|
message.warning(errorMsgs[i]);
|
||||||
setTimeout(() => {
|
return;
|
||||||
router.push({
|
}
|
||||||
path: "/taskpage",
|
}
|
||||||
query: { id: res.data.data.projectId },
|
|
||||||
});
|
api
|
||||||
}, 1000);
|
.createProject(obj)
|
||||||
} else {
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
message.destroy();
|
||||||
|
message.success("编辑成功");
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
path: "/projectmanage"
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
message.destroy();
|
||||||
|
message.error("编辑失败,请检查当前网络状态。");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
message.destroy();
|
||||||
|
message.error("编辑失败,请检查当前网络状态。");
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
let obj = {
|
||||||
|
name: projectName["value"],
|
||||||
|
category: projectType,
|
||||||
|
picUrl: picUrl,
|
||||||
|
beginTime: beginTime,
|
||||||
|
endTime: endTime,
|
||||||
|
manager: manager,
|
||||||
|
managerId: managerId,
|
||||||
|
sourceBelongId: sourceBelongIdC,
|
||||||
|
remark: remark["value"],
|
||||||
|
courseSyncFlag: courseSyncFlag,
|
||||||
|
level: levels,
|
||||||
|
systemId: systemid,
|
||||||
|
boeFlag: boeFlag,
|
||||||
|
attach: attach,
|
||||||
|
type: 3,
|
||||||
|
templateId: 10,
|
||||||
|
parentId: paraentID,
|
||||||
|
notice: "",
|
||||||
|
noticeFlag: 0,
|
||||||
|
status: 0,
|
||||||
|
};
|
||||||
|
console.log("提交的数据格式 %o", obj);
|
||||||
|
for (let i in errorMsgs) {
|
||||||
|
console.log(obj[i]);
|
||||||
|
if (obj[i] === "" || obj[i] === undefined) {
|
||||||
|
message.destroy();
|
||||||
|
message.warning(errorMsgs[i]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
api
|
||||||
|
.createProject(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
message.destroy();
|
||||||
|
message.success("创建成功");
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push({
|
||||||
|
path: "/taskpage",
|
||||||
|
query: { id: res.data.data.projectId },
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
|
} else {
|
||||||
|
message.destroy();
|
||||||
|
message.error("创建失败,请检查当前网络状态。");
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("创建失败,请检查当前网络状态。");
|
message.error("创建失败,请检查当前网络状态。");
|
||||||
}
|
});
|
||||||
})
|
}
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
message.destroy();
|
|
||||||
message.error("创建失败,请检查当前网络状态。");
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -591,6 +756,10 @@ export default {
|
|||||||
uplodaFileCount,
|
uplodaFileCount,
|
||||||
createProject,
|
createProject,
|
||||||
removeFile,
|
removeFile,
|
||||||
|
|
||||||
|
isEdit,
|
||||||
|
backPage,
|
||||||
|
dateFormatList,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -889,3 +1058,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user