mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 23:06:47 +08:00
合并
This commit is contained in:
11384
package-lock.json
generated
11384
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -38,34 +38,10 @@ import http from "./config";
|
|||||||
// 接口-请求
|
// 接口-请求
|
||||||
|
|
||||||
// 创建编辑单层项目
|
// 创建编辑单层项目
|
||||||
export const createProject = (obj) => http.post('/admin/project/edit', {
|
export const createProject = (obj) => http.post('/admin/project/edit', obj)
|
||||||
"attach": obj.attach,
|
|
||||||
"beginTime": obj.beginTime,
|
|
||||||
"boeFlag": obj.boeFlag,
|
|
||||||
"category": obj.category,
|
|
||||||
"courseSyncFlag": obj.courseSyncFlag,
|
|
||||||
"endTime": obj.endTime,
|
|
||||||
"level": obj.level,
|
|
||||||
"manager": obj.manager,
|
|
||||||
"managerId": obj.managerId,
|
|
||||||
"name": obj.name,
|
|
||||||
"notice": obj.notice,
|
|
||||||
"noticeFlag": obj.noticeFlag,
|
|
||||||
"picUrl": obj.picUrl,
|
|
||||||
"remark": obj.remark,
|
|
||||||
"sourceBelongId": obj.sourceBelongId,
|
|
||||||
"status": obj.status,
|
|
||||||
"systemId": obj.systemId,
|
|
||||||
"templateId": obj.templateId,
|
|
||||||
"type": obj.type
|
|
||||||
})
|
|
||||||
|
|
||||||
// 创建多层项目
|
// 创建多层项目
|
||||||
export const createStoreyProject = () => http.post('/admin/project/edit', {
|
export const createStoreyProject = (obj) => http.post('/admin/project/edit', obj)
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
// 获取项目列表
|
// 获取项目列表
|
||||||
export const getProjectList = () => http.post('/admin/project/list', {
|
export const getProjectList = (obj) => http.post('/admin/project/list', obj)
|
||||||
|
|
||||||
})
|
|
||||||
@@ -40,19 +40,11 @@ export const uploadFile = (obj) => http.post('/test/testRequest', qs.stringify({
|
|||||||
// 接口-请求
|
// 接口-请求
|
||||||
|
|
||||||
//创建学习路径
|
//创建学习路径
|
||||||
export const createLearnPath = (obj) => http.post('/admin/router/edit', obj, {
|
export const createLearnPath = (obj) => http.post('/admin/router/edit', obj);
|
||||||
headers: {
|
|
||||||
'token': '123'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// 获取学习路径图列表
|
// 获取学习路径图列表
|
||||||
export const getLearnPath = (obj) => http.post('/admin/router/list', obj);
|
export const getLearnPath = (obj) => http.post('/admin/router/list', obj);
|
||||||
//删除学习路径图
|
//删除学习路径图
|
||||||
export const deleteLearnPath = (obj) => http.post('/admin/router/handle', obj, {
|
export const deleteLearnPath = (obj) => http.post('/admin/router/handle', obj);
|
||||||
headers: {
|
|
||||||
'token': '123'
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
//获取关卡
|
//获取关卡
|
||||||
export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj });
|
export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj });
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs, ref } from "vue";
|
import { reactive, toRefs, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import * as api from "../../api/indexEval";
|
import * as api from "../../api/indexEval";
|
||||||
@@ -142,7 +142,6 @@ export default {
|
|||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
console.log("state", bool);
|
console.log("state", bool);
|
||||||
};
|
};
|
||||||
|
|
||||||
//上传组件
|
//上传组件
|
||||||
function getBase64(img, callback) {
|
function getBase64(img, callback) {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
@@ -152,7 +151,7 @@ export default {
|
|||||||
|
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const imageUrl = ref('');
|
const imageUrl = ref("");
|
||||||
|
|
||||||
const handleChange = (info) => {
|
const handleChange = (info) => {
|
||||||
if (info.file.status === 'uploading') {
|
if (info.file.status === 'uploading') {
|
||||||
@@ -363,7 +362,7 @@ export default {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
@@ -502,4 +501,3 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -4,25 +4,21 @@
|
|||||||
<!-- 搜索框及按钮 -->
|
<!-- 搜索框及按钮 -->
|
||||||
<div class="filter">
|
<div class="filter">
|
||||||
<div class="filterItems">
|
<div class="filterItems">
|
||||||
<div class="select">
|
<div class="pathnameInp">
|
||||||
<a-select
|
<a-input
|
||||||
v-model:value="projectName"
|
v-model:value="pathnameSearch"
|
||||||
style="width: 270px"
|
style="width: 270px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入路径名称"
|
placeholder="请输入路径名称"
|
||||||
:options="projectNameList"
|
/>
|
||||||
@change="selectProjectName"
|
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
></a-select>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="select">
|
<div class="select">
|
||||||
<a-select
|
<a-select
|
||||||
v-model:value="projectName"
|
v-model:value="statusValue"
|
||||||
style="width: 270px"
|
style="width: 270px"
|
||||||
placeholder="请选择状态"
|
placeholder="请选择状态"
|
||||||
:options="projectNameList"
|
:options="statusList"
|
||||||
@change="selectProjectName"
|
@change="selectStatusClassify"
|
||||||
allowClear
|
allowClear
|
||||||
showSearch
|
showSearch
|
||||||
></a-select>
|
></a-select>
|
||||||
@@ -35,19 +31,20 @@
|
|||||||
style="width: 270px"
|
style="width: 270px"
|
||||||
/> -->
|
/> -->
|
||||||
<a-range-picker
|
<a-range-picker
|
||||||
v-model:value="value2"
|
v-model:value="searchdate"
|
||||||
separator="至"
|
separator="至"
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
:placeholder="[' 开始时间', ' 结束时间']"
|
||||||
|
@change="searchTimeChange"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div style="display: flex; margin-bottom: 20px">
|
<div style="display: flex; margin-bottom: 20px">
|
||||||
<div class="btn btn1">
|
<div class="btn btn1">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">搜索</div>
|
<div class="btnText" @click="searchLearnPath">搜索</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnn btn2">
|
<div class="btnn btn2">
|
||||||
<div class="search"></div>
|
<div class="search"></div>
|
||||||
<div class="btnText">重置</div>
|
<div class="btnText" @click="resetLearnPath">重置</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -613,28 +610,6 @@ export default {
|
|||||||
setup() {
|
setup() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
projectNameList: [
|
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
value: "项目一",
|
|
||||||
label: "项目一",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
value: "项目二",
|
|
||||||
label: "项目二",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 3,
|
|
||||||
value: "项目三",
|
|
||||||
label: "项目三",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 4,
|
|
||||||
value: "项目四",
|
|
||||||
label: "项目四",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
out: false,
|
out: false,
|
||||||
out1: false,
|
out1: false,
|
||||||
number: null,
|
number: null,
|
||||||
@@ -692,6 +667,8 @@ export default {
|
|||||||
|
|
||||||
value1: "",
|
value1: "",
|
||||||
value2: "",
|
value2: "",
|
||||||
|
//
|
||||||
|
//创建、编辑-------------------------
|
||||||
pathName: "", //创建/编辑路径图名称
|
pathName: "", //创建/编辑路径图名称
|
||||||
organizationList: [
|
organizationList: [
|
||||||
{
|
{
|
||||||
@@ -722,6 +699,33 @@ export default {
|
|||||||
createLoading: false, //创建路径loading
|
createLoading: false, //创建路径loading
|
||||||
deletePathId: null, //删除路径id
|
deletePathId: null, //删除路径id
|
||||||
editPathId: null, //修改路径id
|
editPathId: null, //修改路径id
|
||||||
|
//搜索------------------------------
|
||||||
|
pathnameSearch: null, //搜索路径名称
|
||||||
|
statusList: [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
value: "草稿",
|
||||||
|
label: "草稿",
|
||||||
|
classify: 0,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
value: "已发布",
|
||||||
|
label: "已发布",
|
||||||
|
classify: 1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 3,
|
||||||
|
value: "已停用",
|
||||||
|
label: "已停用",
|
||||||
|
classify: -1,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
statusValue: null, //状态
|
||||||
|
statusClassify: null, //选择状态类型
|
||||||
|
searchdate: null, //选择时间
|
||||||
|
startTime: null, //开始时间
|
||||||
|
endTime: null, //结束时间
|
||||||
});
|
});
|
||||||
|
|
||||||
const selectProjectName = (value, index) => {
|
const selectProjectName = (value, index) => {
|
||||||
@@ -976,7 +980,6 @@ export default {
|
|||||||
<a-select
|
<a-select
|
||||||
style="width: 50px;margin-top:2px;margin-left:25px"
|
style="width: 50px;margin-top:2px;margin-left:25px"
|
||||||
value="授权"
|
value="授权"
|
||||||
// options={state.projectNameList}
|
|
||||||
dropdownClassName="tabledropdown"
|
dropdownClassName="tabledropdown"
|
||||||
>
|
>
|
||||||
<a-select-option value="权限名单" label="权限名单">
|
<a-select-option value="权限名单" label="权限名单">
|
||||||
@@ -1022,7 +1025,6 @@ export default {
|
|||||||
<a-select
|
<a-select
|
||||||
style="width: 50px;margin-top:2px;margin-right:20px;"
|
style="width: 50px;margin-top:2px;margin-right:20px;"
|
||||||
value="更多"
|
value="更多"
|
||||||
// options={state.projectNameList}
|
|
||||||
dropdownClassName="tabledropdown"
|
dropdownClassName="tabledropdown"
|
||||||
>
|
>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
@@ -1075,7 +1077,6 @@ export default {
|
|||||||
<a-select
|
<a-select
|
||||||
style="width: 50px;margin-top:2px;margin-right:20px;"
|
style="width: 50px;margin-top:2px;margin-right:20px;"
|
||||||
value="更多"
|
value="更多"
|
||||||
// options={state.projectNameList}
|
|
||||||
dropdownClassName="tabledropdown"
|
dropdownClassName="tabledropdown"
|
||||||
>
|
>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
@@ -1115,7 +1116,6 @@ export default {
|
|||||||
<a-select
|
<a-select
|
||||||
style="width: 50px;margin-top:2px;margin-right:20px;"
|
style="width: 50px;margin-top:2px;margin-right:20px;"
|
||||||
value="更多"
|
value="更多"
|
||||||
// options={state.projectNameList}
|
|
||||||
dropdownClassName="tabledropdown"
|
dropdownClassName="tabledropdown"
|
||||||
>
|
>
|
||||||
<a-select-option
|
<a-select-option
|
||||||
@@ -1166,8 +1166,8 @@ export default {
|
|||||||
};
|
};
|
||||||
//创建学习路径图
|
//创建学习路径图
|
||||||
const createLearnPath = () => {
|
const createLearnPath = () => {
|
||||||
if (!state.pathName) return message.info("请输入路径图名称");
|
if (!state.pathName) return message.warning("请输入路径图名称");
|
||||||
// if (!state.organizationSelectName) return message.info("请选择归属组织");
|
// if (!state.organizationSelectName) return message.warning("请选择归属组织");
|
||||||
// state.createLoading = true;
|
// state.createLoading = true;
|
||||||
let obj = {
|
let obj = {
|
||||||
name: state.pathName,
|
name: state.pathName,
|
||||||
@@ -1197,6 +1197,10 @@ export default {
|
|||||||
let obj = {
|
let obj = {
|
||||||
pageNo: state.currentPage,
|
pageNo: state.currentPage,
|
||||||
pageSize: state.pageSize,
|
pageSize: state.pageSize,
|
||||||
|
name: state.pathnameSearch,
|
||||||
|
status: state.statusClassify,
|
||||||
|
beginTime: state.startTime,
|
||||||
|
endTime: state.endTime,
|
||||||
};
|
};
|
||||||
api
|
api
|
||||||
.getLearnPath(obj)
|
.getLearnPath(obj)
|
||||||
@@ -1219,31 +1223,6 @@ export default {
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log("获取学习路径失败", err);
|
console.log("获取学习路径失败", err);
|
||||||
});
|
});
|
||||||
// let getChapterObj = {
|
|
||||||
// routerId: 0,
|
|
||||||
// };
|
|
||||||
// api
|
|
||||||
// .getChapter(getChapterObj)
|
|
||||||
// .then((res) => {
|
|
||||||
// console.log("获取关卡数据", res);
|
|
||||||
// })
|
|
||||||
// .catch((err) => {
|
|
||||||
// console.log("获取关卡数据失败", err);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// let editChapterObj = {
|
|
||||||
// name: "测试关卡",
|
|
||||||
// remark: "这是测试关卡说明",
|
|
||||||
// routerId: 0,
|
|
||||||
// };
|
|
||||||
// api
|
|
||||||
// .editChapter(editChapterObj)
|
|
||||||
// .then((res) => {
|
|
||||||
// console.log("添加测试关卡数据", res);
|
|
||||||
// })
|
|
||||||
// .catch((err) => {
|
|
||||||
// console.log("添加测试关卡数据失败", err);
|
|
||||||
// });
|
|
||||||
};
|
};
|
||||||
//翻页
|
//翻页
|
||||||
const changePagination = (page) => {
|
const changePagination = (page) => {
|
||||||
@@ -1271,8 +1250,8 @@ export default {
|
|||||||
};
|
};
|
||||||
//编辑学习路径图
|
//编辑学习路径图
|
||||||
const editLearnPath = () => {
|
const editLearnPath = () => {
|
||||||
if (!state.pathName) return message.info("请输入路径图名称");
|
if (!state.pathName) return message.warning("请输入路径图名称");
|
||||||
// if (!state.organizationSelectName) return message.info("请选择归属组织");
|
// if (!state.organizationSelectName) return message.warning("请选择归属组织");
|
||||||
// state.createLoading = true;
|
// state.createLoading = true;
|
||||||
let obj = {
|
let obj = {
|
||||||
routerId: state.editPathId,
|
routerId: state.editPathId,
|
||||||
@@ -1299,6 +1278,43 @@ export default {
|
|||||||
// state.createLoading = false;
|
// state.createLoading = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//选择状态
|
||||||
|
const selectStatusClassify = (e, v) => {
|
||||||
|
// console.log("eee", e, v);
|
||||||
|
state.statusValue = e;
|
||||||
|
state.statusClassify = v.classify;
|
||||||
|
};
|
||||||
|
//修改时间
|
||||||
|
const searchTimeChange = (e, date) => {
|
||||||
|
let startTime = date[0] + " 00:00:00";
|
||||||
|
let endTime = date[1] + " 23:59:59";
|
||||||
|
state.startTime = new Date(startTime).getTime() / 1000;
|
||||||
|
state.endTime = new Date(endTime).getTime() / 1000;
|
||||||
|
console.log("e", state.startTime, state.endTime);
|
||||||
|
};
|
||||||
|
//搜索学习路径
|
||||||
|
const searchLearnPath = () => {
|
||||||
|
state.currentPage = 1;
|
||||||
|
console.log(
|
||||||
|
"pathnameSearch",
|
||||||
|
state.pathnameSearch,
|
||||||
|
state.statusClassify,
|
||||||
|
state.startTime,
|
||||||
|
state.endTime
|
||||||
|
);
|
||||||
|
getLearnPath();
|
||||||
|
};
|
||||||
|
//重置学习路径
|
||||||
|
const resetLearnPath = () => {
|
||||||
|
state.currentPage = 1;
|
||||||
|
state.pathnameSearch = null;
|
||||||
|
state.statusValue = null;
|
||||||
|
state.statusClassify = null;
|
||||||
|
state.searchdate = null;
|
||||||
|
state.startTime = null;
|
||||||
|
state.endTime = null;
|
||||||
|
getLearnPath();
|
||||||
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// console.log("执行");
|
// console.log("执行");
|
||||||
getLearnPath();
|
getLearnPath();
|
||||||
@@ -1333,6 +1349,10 @@ export default {
|
|||||||
changePagination,
|
changePagination,
|
||||||
deleteLearnPath,
|
deleteLearnPath,
|
||||||
editLearnPath,
|
editLearnPath,
|
||||||
|
selectStatusClassify,
|
||||||
|
searchTimeChange,
|
||||||
|
searchLearnPath,
|
||||||
|
resetLearnPath,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -1837,6 +1857,10 @@ export default {
|
|||||||
.filterItems {
|
.filterItems {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
.pathnameInp {
|
||||||
|
margin-right: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
.select {
|
.select {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|||||||
@@ -11,58 +11,34 @@
|
|||||||
<div class="main">
|
<div class="main">
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
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="projectName" placeholder="请输入项目名称" show-count :maxlength="30" />
|
||||||
v-model:value="projectName"
|
|
||||||
placeholder="请输入项目名称"
|
|
||||||
show-count
|
|
||||||
:maxlength="30"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
|
||||||
/>
|
|
||||||
<div class="inname">分类</div>
|
<div class="inname">分类</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select
|
<a-select :getPopupContainer="
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
"
|
" v-model:value="classifySelect" placeholder="四个养成" style="width: 100%" :options="classifyList"
|
||||||
v-model:value="classifySelect"
|
@change="classificationChange" allowClear showSearch>
|
||||||
placeholder="四个养成"
|
|
||||||
style="width: 100%"
|
|
||||||
:options="classifyList"
|
|
||||||
@change="classificationChange"
|
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
|
||||||
/>
|
|
||||||
<div class="inname">封面图</div>
|
<div class="inname">封面图</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div class="box" style="
|
||||||
class="box"
|
|
||||||
style="
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
border: 1px solid rgba(78, 166, 255, 1);
|
border: 1px solid rgba(78, 166, 255, 1);
|
||||||
@@ -70,29 +46,15 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
"
|
">
|
||||||
>
|
<a-upload v-model:file-list="fileList" name="file" list-type="picture-card" class="avatar-uploader"
|
||||||
<a-upload
|
:show-upload-list="false" action="/api/file/upload" :before-upload="beforeUpload" @change="handleChange">
|
||||||
v-model:file-list="fileList"
|
<img style="
|
||||||
name="file"
|
|
||||||
list-type="picture-card"
|
|
||||||
class="avatar-uploader"
|
|
||||||
:show-upload-list="false"
|
|
||||||
action="/api/file/upload"
|
|
||||||
:before-upload="beforeUpload"
|
|
||||||
@change="handleChange"
|
|
||||||
>
|
|
||||||
<img
|
|
||||||
style="
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
"
|
" v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||||
v-if="imageUrl"
|
|
||||||
:src="imageUrl"
|
|
||||||
alt="avatar"
|
|
||||||
/>
|
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
<!-- <loading-outlined v-if="loading"></loading-outlined> -->
|
||||||
<!-- <plus-outlined v-else></plus-outlined> -->
|
<!-- <plus-outlined v-else></plus-outlined> -->
|
||||||
@@ -105,55 +67,33 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
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="至" :placeholder="[' 开始时间', ' 结束时间']"
|
||||||
separator="至"
|
style="width: 100%; height: 40px; border-radius: 5px" show-time @change="onRangeChange" />
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
|
||||||
style="width: 100%; height: 40px; border-radius: 5px"
|
|
||||||
show-time
|
|
||||||
@change="onRangeChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
|
||||||
/>
|
|
||||||
<div class="inname">项目经理</div>
|
<div class="inname">项目经理</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in select">
|
<div class="in select">
|
||||||
<a-select
|
<a-select :getPopupContainer="
|
||||||
:getPopupContainer="
|
|
||||||
(triggerNode) => {
|
(triggerNode) => {
|
||||||
return triggerNode.parentNode || document.body;
|
return triggerNode.parentNode || document.body;
|
||||||
}
|
}
|
||||||
"
|
" :value="classifySelect1" placeholder="请选择项目经理" style="width: 100%" :options="classifyList1"
|
||||||
:value="classifySelect1"
|
@change="classificationChange1" allowClear showSearch>
|
||||||
placeholder="请选择项目经理"
|
|
||||||
style="width: 100%"
|
|
||||||
:options="classifyList1"
|
|
||||||
@change="classificationChange1"
|
|
||||||
allowClear
|
|
||||||
showSearch
|
|
||||||
>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
|
||||||
/>
|
|
||||||
<div class="inname">资源归属</div>
|
<div class="inname">资源归属</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -166,13 +106,7 @@
|
|||||||
<div class="inname" style="margin-top: 13px">项目说明</div>
|
<div class="inname" style="margin-top: 13px">项目说明</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-textarea
|
<a-textarea v-model:value="remark" style="height: 80px" placeholder="请输入说明" show-count :maxlength="200" />
|
||||||
v-model:value="remark"
|
|
||||||
style="height: 80px"
|
|
||||||
placeholder="请输入说明"
|
|
||||||
show-count
|
|
||||||
:maxlength="200"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name name2">
|
<div class="name name2">
|
||||||
@@ -180,99 +114,57 @@
|
|||||||
<div class="inname">同步学习记录</div>
|
<div class="inname">同步学习记录</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-radio @click="changeChecked" v-model:checked="checked"
|
<a-radio @click="changeChecked" v-model:checked="checked"><span style="
|
||||||
><span
|
|
||||||
style="
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: rgba(109, 117, 132, 1);
|
color: rgba(109, 117, 132, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
"
|
">同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span></a-radio>
|
||||||
>同步课程学习记录(如学员在课程库中拥有课程的学习记录,自动免修该课程)</span
|
|
||||||
></a-radio
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
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="valueE1" placeholder="集团级/组织级/现地级/部门级" />
|
||||||
v-model:value="valueE1"
|
|
||||||
placeholder="集团级/组织级/现地级/部门级"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
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="valueE2" placeholder="集团级/组织级/现地级/部门级" />
|
||||||
v-model:value="valueE2"
|
|
||||||
placeholder="集团级/组织级/现地级/部门级"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
|
||||||
/>
|
|
||||||
<div class="inname">是否BOEU实施</div>
|
<div class="inname">是否BOEU实施</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="in">
|
<div class="in">
|
||||||
<a-radio @click="changeChecked1" v-model:checked="checked1"
|
<a-radio @click="changeChecked1" v-model:checked="checked1"><span style="
|
||||||
><span
|
|
||||||
style="
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
color: rgba(109, 117, 132, 1);
|
color: rgba(109, 117, 132, 1);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
"
|
">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
|
<img class="nameimg" src="../../assets/images/basicinfo/asterisk.png" />
|
||||||
class="nameimg"
|
|
||||||
src="../../assets/images/basicinfo/asterisk.png"
|
|
||||||
/>
|
|
||||||
<div class="inname">附件</div>
|
<div class="inname">附件</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="filebox">
|
<div class="filebox">
|
||||||
<div>
|
<div>
|
||||||
<img
|
<img v-if="fileList1.length < 6" class="fileimg" src="../../assets/images/projectadd/enclosure.png" />
|
||||||
v-if="fileList1.length < 6"
|
<a-upload :disabled="fileList1.length > 5" :before-upload="beforeUpload1" v-model:file-list="fileList1"
|
||||||
class="fileimg"
|
@remove="removeFile" name="file" action="/api/file/upload" :headers="headers" @change="handleChange1">
|
||||||
src="../../assets/images/projectadd/enclosure.png"
|
|
||||||
/>
|
|
||||||
<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"
|
|
||||||
>
|
|
||||||
<!-- <a-button> -->
|
<!-- <a-button> -->
|
||||||
<!-- <upload-outlined></upload-outlined> -->
|
<!-- <upload-outlined></upload-outlined> -->
|
||||||
<span v-if="fileList1.length > 5" class="filetext"
|
<span v-if="fileList1.length > 5" class="filetext">上传数量已经达到最大值</span>
|
||||||
>上传数量已经达到最大值</span
|
|
||||||
>
|
|
||||||
<span v-else class="filetext">上传附件</span>
|
<span v-else class="filetext">上传附件</span>
|
||||||
<!-- </a-button> -->
|
<!-- </a-button> -->
|
||||||
</a-upload>
|
</a-upload>
|
||||||
@@ -287,13 +179,7 @@
|
|||||||
<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
|
<a-select v-model:value="value1" placeholder="请选择模板" :size="size" style="width: 100%" :options="options">
|
||||||
v-model:value="value1"
|
|
||||||
placeholder="请选择模板"
|
|
||||||
:size="size"
|
|
||||||
style="width: 100%"
|
|
||||||
:options="options"
|
|
||||||
>
|
|
||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -301,9 +187,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<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 class="btn2">取消</a-button>
|
<a-button class="btn2">取消</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -311,12 +195,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<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 * as api from "../../api/index";
|
import * as api from "../../api/index";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectAdd",
|
name: "projectAdd",
|
||||||
setup() {
|
setup() {
|
||||||
|
const router = useRouter();
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
classifySelect: null,
|
classifySelect: null,
|
||||||
classifySelectId: null,
|
classifySelectId: null,
|
||||||
@@ -324,15 +210,15 @@ export default {
|
|||||||
checked1: false,
|
checked1: false,
|
||||||
valueE: null,
|
valueE: null,
|
||||||
valueE1: null,
|
valueE1: null,
|
||||||
valueE2: null,
|
valueE2: null
|
||||||
});
|
});
|
||||||
|
|
||||||
const projectName = ref("");
|
const projectName = ref('');
|
||||||
|
|
||||||
const classifyList = ref([
|
const classifyList = ref([
|
||||||
{ value: 1, label: "管理者" },
|
{ value: 1, label: '管理者' },
|
||||||
{ value: 2, label: "领军者" },
|
{ value: 2, label: '领军者' },
|
||||||
{ value: 3, label: "产业人" },
|
{ value: 3, label: '产业人' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let projectType = "";
|
let projectType = "";
|
||||||
@@ -344,23 +230,23 @@ export default {
|
|||||||
|
|
||||||
function getBase64(img, callback) {
|
function getBase64(img, callback) {
|
||||||
const reader = new FileReader();
|
const reader = new FileReader();
|
||||||
reader.addEventListener("load", () => callback(reader.result));
|
reader.addEventListener('load', () => callback(reader.result));
|
||||||
reader.readAsDataURL(img);
|
reader.readAsDataURL(img);
|
||||||
}
|
}
|
||||||
|
|
||||||
const fileList = ref([]);
|
const fileList = ref([]);
|
||||||
const fileList1 = ref([]);
|
const fileList1 = ref([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
const imageUrl = ref("");
|
const imageUrl = ref('');
|
||||||
let picUrl = "";
|
let picUrl = '';
|
||||||
|
|
||||||
const handleChange = (info) => {
|
const handleChange = (info) => {
|
||||||
if (info.file.status === "uploading") {
|
if (info.file.status === 'uploading') {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (info.file.status === "done") {
|
if (info.file.status === 'done') {
|
||||||
console.log("上传图片返回的信息 %o", info);
|
console.log('上传图片返回的信息 %o', info)
|
||||||
picUrl = info.file.response.data;
|
picUrl = info.file.response.data;
|
||||||
// Get this url from response in real world.
|
// Get this url from response in real world.
|
||||||
getBase64(info.file.originFileObj, (base64Url) => {
|
getBase64(info.file.originFileObj, (base64Url) => {
|
||||||
@@ -368,9 +254,9 @@ export default {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (info.file.status === "error") {
|
if (info.file.status === 'error') {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
message.error("upload error");
|
message.error('upload error');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -379,17 +265,12 @@ export default {
|
|||||||
let attach = "";
|
let attach = "";
|
||||||
let attachData = "";
|
let attachData = "";
|
||||||
const handleChange1 = (info) => {
|
const handleChange1 = (info) => {
|
||||||
if (info.file.status === "uploading") {
|
if (info.file.status === 'uploading') {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (info.file.status === "done") {
|
if (info.file.status === 'done') {
|
||||||
console.log(
|
console.log('上传附件返回的信息 %o', info, info.fileList.length, uplodaFileCount)
|
||||||
"上传附件返回的信息 %o",
|
|
||||||
info,
|
|
||||||
info.fileList.length,
|
|
||||||
uplodaFileCount
|
|
||||||
);
|
|
||||||
|
|
||||||
let attachStr = "";
|
let attachStr = "";
|
||||||
attachData = info.fileList;
|
attachData = info.fileList;
|
||||||
@@ -397,10 +278,10 @@ export default {
|
|||||||
if (attachData.length - 1 == i) {
|
if (attachData.length - 1 == i) {
|
||||||
attachStr += attachData[i].response.data;
|
attachStr += attachData[i].response.data;
|
||||||
} else {
|
} else {
|
||||||
attachStr += attachData[i].response.data + ",";
|
attachStr += attachData[i].response.data + ',';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(attachStr);
|
console.log(attachStr)
|
||||||
attach = attachStr;
|
attach = attachStr;
|
||||||
|
|
||||||
if (info.fileList.length > 5) {
|
if (info.fileList.length > 5) {
|
||||||
@@ -409,21 +290,20 @@ export default {
|
|||||||
uplodaFileCount = false;
|
uplodaFileCount = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (info.file.status === "error") {
|
if (info.file.status === 'error') {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
message.error("upload error");
|
message.error('upload error');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const beforeUpload = (file) => {
|
const beforeUpload = (file) => {
|
||||||
const isJpgOrPng =
|
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||||
file.type === "image/jpeg" || file.type === "image/png";
|
|
||||||
if (!isJpgOrPng) {
|
if (!isJpgOrPng) {
|
||||||
message.error("You can only upload JPG file!");
|
message.error('You can only upload JPG file!');
|
||||||
}
|
}
|
||||||
const isLt2M = file.size / 1024 / 1024 < 1;
|
const isLt2M = file.size / 1024 / 1024 < 1;
|
||||||
if (!isLt2M) {
|
if (!isLt2M) {
|
||||||
message.error("Image must smaller than 1MB!");
|
message.error('Image must smaller than 1MB!');
|
||||||
}
|
}
|
||||||
return isJpgOrPng && isLt2M;
|
return isJpgOrPng && isLt2M;
|
||||||
};
|
};
|
||||||
@@ -431,61 +311,59 @@ export default {
|
|||||||
const beforeUpload1 = () => {
|
const beforeUpload1 = () => {
|
||||||
return new Promise((resovle, reject) => {
|
return new Promise((resovle, reject) => {
|
||||||
if (uplodaFileCount) {
|
if (uplodaFileCount) {
|
||||||
message.info("上传文件数量已达最大数量");
|
message.info("上传文件数量已达最大数量")
|
||||||
return reject(false);
|
return reject(false);
|
||||||
}
|
}
|
||||||
return resovle(true);
|
return resovle(true);
|
||||||
});
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
let beginTime = "";
|
let beginTime = "";
|
||||||
let endTime = "";
|
let endTime = "";
|
||||||
const onRangeChange = (value, dateString) => {
|
const onRangeChange = (value, dateString) => {
|
||||||
console.log("Selected Time: ", value);
|
console.log('Selected Time: ', value);
|
||||||
// 项目时间选择函数
|
// 项目时间选择函数
|
||||||
console.log("Formatted Selected Time: ", dateString);
|
console.log('Formatted Selected Time: ', dateString);
|
||||||
console.log(
|
console.log('Formatted Selected TimeStamp', new Date(dateString[0]).getTime())
|
||||||
"Formatted Selected TimeStamp",
|
beginTime = new Date(dateString[0]).getTime() / 1000;
|
||||||
new Date(dateString[0]).getTime()
|
endTime = new Date(dateString[1]).getTime() / 1000;
|
||||||
);
|
|
||||||
beginTime = new Date(dateString[0]).getTime();
|
|
||||||
endTime = new Date(dateString[1]).getTime();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 项目经理 后续接口调用
|
// 项目经理 后续接口调用
|
||||||
const classifyList1 = ref([
|
const classifyList1 = ref([
|
||||||
{ value: 1, label: "李俊国" },
|
{ value: 1, label: '李俊国' },
|
||||||
{ value: 2, label: "将小米" },
|
{ value: 2, label: '将小米' },
|
||||||
{ value: 3, label: "刘孟君" },
|
{ value: 3, label: '刘孟君' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
let manager = "";
|
let manager = "";
|
||||||
let managerId = "";
|
let managerId = "";
|
||||||
const classificationChange1 = (key) => {
|
const classificationChange1 = (key) => {
|
||||||
console.log(`selected ${key}`);
|
console.log(`selected ${key}`);
|
||||||
console.log(classifyList1.value[key - 1].label);
|
console.log(classifyList1.value[key - 1].label)
|
||||||
manager = String(classifyList1.value[key - 1].label);
|
manager = String(classifyList1.value[key - 1].label)
|
||||||
managerId = String(key);
|
managerId = String(key)
|
||||||
};
|
};
|
||||||
|
|
||||||
// 资源归属 sourceBelongId 后续给接口
|
// 资源归属 sourceBelongId 后续给接口
|
||||||
|
|
||||||
// 项目说明
|
// 项目说明
|
||||||
const remark = ref("");
|
const remark = ref('');
|
||||||
|
|
||||||
let courseSyncFlag = 0;
|
let courseSyncFlag = 0;
|
||||||
const changeChecked = () => {
|
const changeChecked = () => {
|
||||||
console.log(state.checked);
|
console.log(state.checked)
|
||||||
state.checked ? (state.checked = false) : (state.checked = true);
|
state.checked ? state.checked = false : state.checked = true;
|
||||||
courseSyncFlag = state.checked ? 1 : 0;
|
courseSyncFlag = state.checked ? 1 : 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
let boeFlag = 0;
|
let boeFlag = 0;
|
||||||
const changeChecked1 = () => {
|
const changeChecked1 = () => {
|
||||||
console.log(state.checked1);
|
console.log(state.checked1)
|
||||||
state.checked1 ? (state.checked1 = false) : (state.checked1 = true);
|
state.checked1 ? state.checked1 = false : state.checked1 = true;
|
||||||
boeFlag = state.checked1 ? 1 : 0;
|
boeFlag = state.checked1 ? 1 : 0;
|
||||||
};
|
}
|
||||||
|
|
||||||
const removeFile = (file) => {
|
const removeFile = (file) => {
|
||||||
const index = fileList1.value.indexOf(file);
|
const index = fileList1.value.indexOf(file);
|
||||||
@@ -498,72 +376,81 @@ export default {
|
|||||||
attachStr = "";
|
attachStr = "";
|
||||||
}
|
}
|
||||||
for (let i = 0; i < fileList1["value"].length; i++) {
|
for (let i = 0; i < fileList1["value"].length; i++) {
|
||||||
console.log(fileList1["value"][i].response.data);
|
console.log(fileList1["value"][i].response.data)
|
||||||
if (fileList1["value"].length - 1 == i) {
|
if (fileList1["value"].length - 1 == i) {
|
||||||
attachStr += fileList1["value"][i].response.data;
|
attachStr += fileList1["value"][i].response.data;
|
||||||
} else {
|
} else {
|
||||||
attachStr += fileList1["value"][i].response.data + ",";
|
attachStr += fileList1["value"][i].response.data + ',';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
attach = attachStr;
|
attach = attachStr;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
|
||||||
const errorMsgs = {
|
const errorMsgs = {
|
||||||
name: "请输入项目名称",
|
"name": "请输入项目名称",
|
||||||
type: "请选择项目分类",
|
"type": "请选择项目分类",
|
||||||
picUrl: "请上传项目封面图",
|
"picUrl": "请上传项目封面图",
|
||||||
beginTime: "请选择项目开始时间",
|
"beginTime": "请选择项目开始时间",
|
||||||
endTime: "请选择项目结束时间",
|
"endTime": "请选择项目结束时间",
|
||||||
manager: "请选择项目经理",
|
"manager": "请选择项目经理",
|
||||||
managerId: "请选择项目经理",
|
"managerId": "请选择项目经理",
|
||||||
sourceBelongId: "请选择资源归属",
|
"sourceBelongId": "请选择资源归属",
|
||||||
level: "请填写项目级别",
|
"level": "请填写项目级别",
|
||||||
systemId: "请填写项目培训体系",
|
"systemId": "请填写项目培训体系",
|
||||||
boeFlag: "请选择是否BOE实施",
|
"boeFlag": "请选择是否BOE实施",
|
||||||
attach: "请上传附件",
|
"attach": "请上传附件"
|
||||||
};
|
}
|
||||||
|
|
||||||
const createProject = () => {
|
const createProject = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
name: projectName["value"],
|
"name": projectName["value"],
|
||||||
type: projectType,
|
"type": projectType,
|
||||||
picUrl: picUrl,
|
"picUrl": picUrl,
|
||||||
beginTime: beginTime,
|
"beginTime": beginTime,
|
||||||
endTime: endTime,
|
"endTime": endTime,
|
||||||
manager: manager,
|
"manager": manager,
|
||||||
managerId: managerId,
|
"managerId": managerId,
|
||||||
sourceBelongId: 11,
|
"sourceBelongId": 11,
|
||||||
remark: remark["value"],
|
"remark": remark["value"],
|
||||||
courseSyncFlag: courseSyncFlag,
|
"courseSyncFlag": courseSyncFlag,
|
||||||
level: 3,
|
"level": 3,
|
||||||
systemId: 4,
|
"systemId": 4,
|
||||||
boeFlag: boeFlag,
|
"boeFlag": boeFlag,
|
||||||
attach: attach,
|
"attach": attach,
|
||||||
templateId: 10,
|
"templateId": 10,
|
||||||
|
"parentId": 0,
|
||||||
category: 0,
|
"category": 0,
|
||||||
notice: "",
|
"notice": "",
|
||||||
noticeFlag: 0,
|
"noticeFlag": 0,
|
||||||
status: 0,
|
"status": 0
|
||||||
};
|
}
|
||||||
console.log("提交的数据格式 %o", obj);
|
console.log('提交的数据格式 %o', obj)
|
||||||
for (let i in errorMsgs) {
|
for (let i in errorMsgs) {
|
||||||
console.log(obj[i]);
|
console.log(obj[i])
|
||||||
if (obj[i] === "") {
|
if (obj[i] === "") {
|
||||||
message.destroy();
|
message.destroy()
|
||||||
message.warning(errorMsgs[i]);
|
message.warning(errorMsgs[i])
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
api
|
api.createProject(obj).then(res => {
|
||||||
.createProject(obj)
|
console.log(res)
|
||||||
.then((res) => {
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
console.log(res);
|
router.push({
|
||||||
})
|
path: '/taskpage',
|
||||||
.catch((err) => {
|
query: { id: res.data.data.projectId }
|
||||||
console.log(err);
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
message.destroy();
|
||||||
|
message.error("创建失败,请检查当前网络状态。")
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
message.destroy();
|
||||||
|
message.error("创建失败,请检查当前网络状态。")
|
||||||
|
})
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -587,9 +474,9 @@ export default {
|
|||||||
changeChecked1,
|
changeChecked1,
|
||||||
uplodaFileCount,
|
uplodaFileCount,
|
||||||
createProject,
|
createProject,
|
||||||
removeFile,
|
removeFile
|
||||||
};
|
};
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -486,59 +486,7 @@ import ProjOwnerShip from "../../components/drawers/ProjectOwn";
|
|||||||
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
||||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||||
import ProjManageShip from "../../components/drawers/ProjManagePower";
|
import ProjManageShip from "../../components/drawers/ProjManagePower";
|
||||||
const columns = [
|
import * as api from '../../api/index'
|
||||||
{
|
|
||||||
title: "项目名称",
|
|
||||||
dataIndex: "projectName",
|
|
||||||
key: "projectName",
|
|
||||||
width: 280,
|
|
||||||
// align: "center",
|
|
||||||
ellipsis: true,
|
|
||||||
// scopedSlots: { customRender: "action" }, //引入的插槽
|
|
||||||
// customRender: (text, record) => {
|
|
||||||
// console.log(text, record);
|
|
||||||
// return <span>{text.text}</span>;
|
|
||||||
// },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "项目经理",
|
|
||||||
dataIndex: "manager",
|
|
||||||
key: "manager",
|
|
||||||
width: 100,
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "状态",
|
|
||||||
dataIndex: "state",
|
|
||||||
// width: "30%",
|
|
||||||
key: "state",
|
|
||||||
width: 100,
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "创建人",
|
|
||||||
dataIndex: "creater",
|
|
||||||
// width: "30%",
|
|
||||||
key: "creater",
|
|
||||||
width: 100,
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "创建时间",
|
|
||||||
dataIndex: "time",
|
|
||||||
key: "time",
|
|
||||||
width: 180,
|
|
||||||
align: "center",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "操作",
|
|
||||||
dataIndex: "operation",
|
|
||||||
key: "operation",
|
|
||||||
width: 300,
|
|
||||||
align: "center",
|
|
||||||
fixed: "right",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "projectManage",
|
name: "projectManage",
|
||||||
@@ -572,256 +520,6 @@ export default {
|
|||||||
],
|
],
|
||||||
projectName: null,
|
projectName: null,
|
||||||
selectTime: null,
|
selectTime: null,
|
||||||
|
|
||||||
tableData: [
|
|
||||||
{
|
|
||||||
key: 1,
|
|
||||||
projectName:
|
|
||||||
"管理者进阶1管理者进阶1管理者进阶1管理者进阶1管理者进阶1管理者进阶1管理者进阶1",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
key: "1-1",
|
|
||||||
projectName: "管理者进阶5",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
key: "1-1-1",
|
|
||||||
projectName:
|
|
||||||
"管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 2,
|
|
||||||
projectName: "管理者进阶2",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
hasChildren: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 3,
|
|
||||||
projectName: "管理者进阶3",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "进行中",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
hasChildren: true,
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
key: "3-1",
|
|
||||||
projectName: "管理者进阶35",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "已结束",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: "3-2",
|
|
||||||
projectName: "管理者进阶36",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶4",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶5",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "已结束",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
key: "4-1",
|
|
||||||
projectName: "管理者进阶5",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "进行中",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
key: "4-1-1",
|
|
||||||
projectName:
|
|
||||||
"管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 5,
|
|
||||||
projectName: "管理者进阶5",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "已结束",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
key: "5-1",
|
|
||||||
projectName: "管理者进阶5",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "已结束",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
key: "5-1-1",
|
|
||||||
projectName:
|
|
||||||
"管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7管理者进阶7",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "进行中",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
projectName: "管理者进阶",
|
|
||||||
manager: "黄华 刘俊",
|
|
||||||
state: "草稿",
|
|
||||||
creater: "毛继禹",
|
|
||||||
time: "2022-07-20 14:00:03",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
currentPage: 1,
|
|
||||||
tableDataTotal: 20,
|
|
||||||
pageSize: 10,
|
|
||||||
sonproject: false,
|
sonproject: false,
|
||||||
estabish: false,
|
estabish: false,
|
||||||
doublepro: false,
|
doublepro: false,
|
||||||
@@ -842,6 +540,7 @@ export default {
|
|||||||
ProjManagevisible: false,
|
ProjManagevisible: false,
|
||||||
});
|
});
|
||||||
// 数据接入 - start -
|
// 数据接入 - start -
|
||||||
|
|
||||||
// 项目分类
|
// 项目分类
|
||||||
const classifyList = ref([
|
const classifyList = ref([
|
||||||
{ value: 1, label: '管理者' },
|
{ value: 1, label: '管理者' },
|
||||||
@@ -910,13 +609,93 @@ export default {
|
|||||||
console.log("e", e, a);
|
console.log("e", e, a);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 获取项目列表信息
|
||||||
|
let tableData = ref([]);
|
||||||
|
let currentPage = ref(1);
|
||||||
|
let tableDataTotal = ref(1);
|
||||||
|
let pageSize = ref(10);
|
||||||
|
|
||||||
|
const columns = ref([
|
||||||
|
{
|
||||||
|
title: "项目名称",
|
||||||
|
dataIndex: "name",
|
||||||
|
key: "name",
|
||||||
|
width: 280,
|
||||||
|
// align: "center",
|
||||||
|
ellipsis: true,
|
||||||
|
// scopedSlots: { customRender: "action" }, //引入的插槽
|
||||||
|
// customRender: (text, record) => {
|
||||||
|
// console.log(text, record);
|
||||||
|
// return <span>{text.text}</span>;
|
||||||
|
// },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "项目经理",
|
||||||
|
dataIndex: "manager",
|
||||||
|
key: "manager",
|
||||||
|
width: 100,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "状态",
|
||||||
|
dataIndex: "status",
|
||||||
|
// width: "30%",
|
||||||
|
key: "status",
|
||||||
|
width: 100,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "创建人",
|
||||||
|
dataIndex: "createName",
|
||||||
|
// width: "30%",
|
||||||
|
key: "createName",
|
||||||
|
width: 100,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "创建时间",
|
||||||
|
dataIndex: "createTime",
|
||||||
|
key: "createTime",
|
||||||
|
width: 180,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
dataIndex: "operation",
|
||||||
|
key: "operation",
|
||||||
|
width: 300,
|
||||||
|
align: "center",
|
||||||
|
fixed: "right",
|
||||||
|
customRender: () => {
|
||||||
|
return (
|
||||||
|
<div class="operation">
|
||||||
|
<div class="nSelect">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
const getTableDate = () => {
|
const getTableDate = () => {
|
||||||
let data = state.tableData;
|
let obj = {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10
|
||||||
|
}
|
||||||
|
api.getProjectList(obj).then(res => {
|
||||||
|
console.log(res)
|
||||||
|
if (res.status == 200 && res.data.code == 200) {
|
||||||
|
tableDataTotal = Math.ceil(Number(res.data.data.total) / 10)
|
||||||
|
let data = res.data.data.rows;
|
||||||
|
console.log('1266',data)
|
||||||
data.map((value) => {
|
data.map((value) => {
|
||||||
if (value.children) {
|
console.log('map-value',value)
|
||||||
|
if (value.subList.length!==0) {
|
||||||
//多层项目
|
//多层项目
|
||||||
value.operation =
|
value.operation =
|
||||||
value.state === "草稿" ? (
|
value.status === "草稿" ? (
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
<span class="operation1">编辑</span>
|
<span class="operation1">编辑</span>
|
||||||
<div class="tableSelect">
|
<div class="tableSelect">
|
||||||
@@ -997,7 +776,7 @@ export default {
|
|||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : value.state === "进行中" ? (
|
) : value.status === "进行中" ? (
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
<span class="operation1">查看</span>
|
<span class="operation1">查看</span>
|
||||||
<div class="tableSelect">
|
<div class="tableSelect">
|
||||||
@@ -1057,7 +836,7 @@ export default {
|
|||||||
</span>
|
</span>
|
||||||
<span class="more"></span>
|
<span class="more"></span>
|
||||||
</div>
|
</div>
|
||||||
) : value.state === "已结束" ? (
|
) : value.status === "已结束" ? (
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
<span class="operation1">查看</span>
|
<span class="operation1">查看</span>
|
||||||
<div class="tableSelect">
|
<div class="tableSelect">
|
||||||
@@ -1127,8 +906,7 @@ export default {
|
|||||||
) : (
|
) : (
|
||||||
<div></div>
|
<div></div>
|
||||||
);
|
);
|
||||||
|
value.subList.map((item) => {
|
||||||
value.children.map((item) => {
|
|
||||||
if (item.children) {
|
if (item.children) {
|
||||||
//多层子项目
|
//多层子项目
|
||||||
item.operation =
|
item.operation =
|
||||||
@@ -2135,7 +1913,7 @@ export default {
|
|||||||
//单层项目
|
//单层项目
|
||||||
value.operation = (
|
value.operation = (
|
||||||
<div class="operation">
|
<div class="operation">
|
||||||
{value.state === "草稿" ? (
|
{value.status === "草稿" ? (
|
||||||
<span class="operation1">编辑</span>
|
<span class="operation1">编辑</span>
|
||||||
) : (
|
) : (
|
||||||
<span class="operation1"></span>
|
<span class="operation1"></span>
|
||||||
@@ -2188,7 +1966,7 @@ export default {
|
|||||||
</a-select>
|
</a-select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{value.state === "草稿" ? (
|
{value.status === "草稿" ? (
|
||||||
<span class="operation3">发布</span>
|
<span class="operation3">发布</span>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
@@ -2201,7 +1979,7 @@ export default {
|
|||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
<div class="tableSelect">
|
<div class="tableSelect">
|
||||||
{value.state === "草稿" ? (
|
{value.status === "草稿" ? (
|
||||||
<a-select
|
<a-select
|
||||||
style="width: 50px"
|
style="width: 50px"
|
||||||
value="更多"
|
value="更多"
|
||||||
@@ -2239,7 +2017,7 @@ export default {
|
|||||||
<router-link to="/taskpage">基础信息</router-link>
|
<router-link to="/taskpage">基础信息</router-link>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
) : value.state === "进行中" ? (
|
) : value.status === "进行中" ? (
|
||||||
<a-select
|
<a-select
|
||||||
style="width: 50px"
|
style="width: 50px"
|
||||||
value="更多"
|
value="更多"
|
||||||
@@ -2277,7 +2055,7 @@ export default {
|
|||||||
<router-link to="/taskpage">基础信息</router-link>
|
<router-link to="/taskpage">基础信息</router-link>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
) : value.state === "已结束" || value.state === "未开始" ? (
|
) : value.status === "已结束" || value.status === "未开始" ? (
|
||||||
<a-select
|
<a-select
|
||||||
style="width: 50px"
|
style="width: 50px"
|
||||||
value="更多"
|
value="更多"
|
||||||
@@ -2314,8 +2092,13 @@ export default {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
state.tableData = data;
|
tableData.value = data;
|
||||||
console.log("tableData", state.tableData);
|
console.log("tableData", tableData);
|
||||||
|
}
|
||||||
|
}).catch(err => {
|
||||||
|
console.log(err)
|
||||||
|
})
|
||||||
|
|
||||||
};
|
};
|
||||||
getTableDate();
|
getTableDate();
|
||||||
|
|
||||||
@@ -2392,7 +2175,6 @@ export default {
|
|||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
columns,
|
|
||||||
selectProjectName,
|
selectProjectName,
|
||||||
expandTable,
|
expandTable,
|
||||||
showModal,
|
showModal,
|
||||||
@@ -2419,6 +2201,11 @@ export default {
|
|||||||
showProjCheck,
|
showProjCheck,
|
||||||
showProjManage,
|
showProjManage,
|
||||||
|
|
||||||
|
tableData,
|
||||||
|
currentPage,
|
||||||
|
tableDataTotal,
|
||||||
|
pageSize,
|
||||||
|
columns,
|
||||||
createStoreyProject,
|
createStoreyProject,
|
||||||
classifyList,
|
classifyList,
|
||||||
classifyList1,
|
classifyList1,
|
||||||
@@ -2429,6 +2216,8 @@ export default {
|
|||||||
value3,
|
value3,
|
||||||
value4,
|
value4,
|
||||||
value5,
|
value5,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -539,6 +539,7 @@ import AddVote from "../../components/drawers/AddVote.vue";
|
|||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import * as api from "../../api/indexTaskadd";
|
import * as api from "../../api/indexTaskadd";
|
||||||
import * as apilive from "../../api/indexLiveBroadcast";
|
import * as apilive from "../../api/indexLiveBroadcast";
|
||||||
|
import * as apidiscuss from "../../api/indexDiscuss";
|
||||||
import * as apieval from "../../api/indexEval";
|
import * as apieval from "../../api/indexEval";
|
||||||
import * as apiinvist from "../../api/indexInvist";
|
import * as apiinvist from "../../api/indexInvist";
|
||||||
const drawercolumns = [
|
const drawercolumns = [
|
||||||
@@ -858,6 +859,7 @@ export default {
|
|||||||
deleteLiveID: null, //删除直播id
|
deleteLiveID: null, //删除直播id
|
||||||
deleteEvalID: null, //测评
|
deleteEvalID: null, //测评
|
||||||
deleteInvistID: null, //评估
|
deleteInvistID: null, //评估
|
||||||
|
deleteDiscussID: null, //删除讨论id
|
||||||
});
|
});
|
||||||
const selectProjectName = (value, index) => {
|
const selectProjectName = (value, index) => {
|
||||||
console.log("value", value, index);
|
console.log("value", value, index);
|
||||||
@@ -1030,7 +1032,24 @@ export default {
|
|||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
//删除讨论
|
||||||
|
const deleteDiscuss = () => {
|
||||||
|
let obj = {
|
||||||
|
discussId: state.deleteDiscussID,
|
||||||
|
};
|
||||||
|
apidiscuss
|
||||||
|
.deleteDiscuss(obj)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("删除成功", res);
|
||||||
|
message.success("删除成功");
|
||||||
|
state.deleteModal = false;
|
||||||
|
//重新获取列表
|
||||||
|
getTask();
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log("删除失败", err);
|
||||||
|
});
|
||||||
|
};
|
||||||
//删除测评测试
|
//删除测评测试
|
||||||
const deleteEvalText = () => {
|
const deleteEvalText = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
@@ -1194,6 +1213,7 @@ export default {
|
|||||||
changebgc,
|
changebgc,
|
||||||
getTask,
|
getTask,
|
||||||
deleteLiveBroadcast,
|
deleteLiveBroadcast,
|
||||||
|
deleteDiscuss,
|
||||||
deleteEvalText,
|
deleteEvalText,
|
||||||
deleteInvistText,
|
deleteInvistText,
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -27,10 +27,12 @@
|
|||||||
<a-upload
|
<a-upload
|
||||||
v-model:file-list="fileList"
|
v-model:file-list="fileList"
|
||||||
name="avatar"
|
name="avatar"
|
||||||
|
action="/api/file/upload"
|
||||||
list-type="picture-card"
|
list-type="picture-card"
|
||||||
class="avatar-uploader"
|
class="avatar-uploader"
|
||||||
:show-upload-list="false"
|
:show-upload-list="false"
|
||||||
:before-upload="beforeUpload"
|
:before-upload="beforeUpload"
|
||||||
|
@change="handleChange"
|
||||||
>
|
>
|
||||||
<!-- <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
<!-- <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
|
||||||
<div v-else>
|
<div v-else>
|
||||||
@@ -39,6 +41,27 @@
|
|||||||
<div class="ant-upload-text">Upload</div>
|
<div class="ant-upload-text">Upload</div>
|
||||||
</div> -->
|
</div> -->
|
||||||
</a-upload>
|
</a-upload>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style="
|
||||||
|
width: 130px;
|
||||||
|
height: 40px;
|
||||||
|
background: #388be1;
|
||||||
|
border-radius: 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: PingFangSC-Regular, PingFang SC;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #ffffff;
|
||||||
|
line-height: 20px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
"
|
||||||
|
@click="golearningpath"
|
||||||
|
>
|
||||||
|
跳转
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
@@ -52,6 +75,7 @@ import * as api from "../../api/index1";
|
|||||||
// reader.addEventListener("load", () => callback(reader.result));
|
// reader.addEventListener("load", () => callback(reader.result));
|
||||||
// reader.readAsDataURL(img);
|
// reader.readAsDataURL(img);
|
||||||
// }
|
// }
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
export default {
|
export default {
|
||||||
name: "SystemManage",
|
name: "SystemManage",
|
||||||
components: {
|
components: {
|
||||||
@@ -141,13 +165,17 @@ export default {
|
|||||||
}
|
}
|
||||||
// return isJpgOrPng && isLt2M;
|
// return isJpgOrPng && isLt2M;
|
||||||
};
|
};
|
||||||
|
const router = useRouter();
|
||||||
|
const golearningpath = () => {
|
||||||
|
router.push({ path: "/learningpath", params: { id: 1 } });
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
showDrawer,
|
showDrawer,
|
||||||
changeRadio,
|
changeRadio,
|
||||||
handleChange,
|
handleChange,
|
||||||
beforeUpload,
|
beforeUpload,
|
||||||
|
golearningpath,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user