mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-15 05:46:45 +08:00
feat:修改授权
This commit is contained in:
@@ -43,7 +43,7 @@ export default defineComponent({
|
||||
const store = useStore();
|
||||
const isLogin = ref(false);
|
||||
// console.log("router", router.getRoutes(), route);
|
||||
console.log("版本0.11------------");
|
||||
console.log("版本0.12------------");
|
||||
const routes = computed(() => {
|
||||
return router.getRoutes().filter((e) => e.meta?.isLink);
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* @Author: lixg lixg@dongwu-inc.com
|
||||
* @Date: 2022-11-21 14:32:52
|
||||
* @LastEditors: lixg lixg@dongwu-inc.com
|
||||
* @LastEditTime: 2022-12-02 17:13:55
|
||||
* @LastEditTime: 2022-12-03 19:52:09
|
||||
* @FilePath: /fe-manage/src/api/config.js
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
*/
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
columnWidth: 20,
|
||||
selectedRowKeys: selectedRowKeys,
|
||||
onChange: onSelectChange,
|
||||
preserveSelectedRowKeys: true,
|
||||
}"
|
||||
/>
|
||||
<div class="pa">
|
||||
@@ -316,6 +317,7 @@
|
||||
columnWidth: 30,
|
||||
selectedRowKeys: selectedRowKeys2,
|
||||
onChange: onSelectChange2,
|
||||
preserveSelectedRowKeys: true,
|
||||
}"
|
||||
/>
|
||||
<div class="pa" style="margin-top: 20px">
|
||||
@@ -598,6 +600,14 @@ export default {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
classify: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
selectProjectId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props, ctx) {
|
||||
const store = useStore();
|
||||
@@ -792,9 +802,35 @@ export default {
|
||||
deleteAll();
|
||||
// console.log("expandedKeys", state.expandedKeys);
|
||||
state.expandedKeys = [];
|
||||
state.tabledata = [];
|
||||
//快速选人
|
||||
state.currentPage = 1;
|
||||
state.tableDataTotal = 0;
|
||||
state.nameSearch = ""; //搜索名称
|
||||
|
||||
//受众
|
||||
state.currentPage2 = 1;
|
||||
state.tableDataTotal2 = 0;
|
||||
state.audienceName = "";
|
||||
|
||||
state.currentPage1 = 1;
|
||||
state.tableDataTotal1 = 0;
|
||||
|
||||
state.selectedKeys = [];
|
||||
state.selectOrgId = null; //选中的组织id
|
||||
state.selectOrgName = null; //选中的组织名称
|
||||
|
||||
state.searchOrgName = null;
|
||||
state.isSearchOrg = false;
|
||||
state.treeData2 = [];
|
||||
|
||||
getAudienceInfo();
|
||||
};
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("state", bool);
|
||||
if (bool) {
|
||||
optionAuthPerm();
|
||||
}
|
||||
};
|
||||
//获取组织树
|
||||
state.treeData = computed(() => {
|
||||
@@ -866,12 +902,13 @@ export default {
|
||||
//分页获取学员
|
||||
const changePagination = (page) => {
|
||||
state.currentPage = page;
|
||||
console.log("1111111");
|
||||
console.log("1111111", state.selectedRowKeys, state.choosepeople);
|
||||
getMember(state.selectOrgId);
|
||||
};
|
||||
//搜索学员
|
||||
const handleSearchStu = () => {
|
||||
deleteDepSelect();
|
||||
state.currentPage = 1;
|
||||
state.currentPage2 = 1;
|
||||
console.log("22222");
|
||||
getMember();
|
||||
@@ -891,10 +928,20 @@ export default {
|
||||
};
|
||||
//快速选人 选中的数组
|
||||
const onSelectChange = (selectedRowKeys, item) => {
|
||||
// console.log("selectedRowKeys changed: ", selectedRowKeys,item);
|
||||
state.selectedRowKeys.push(selectedRowKeys[selectedRowKeys.length - 1]);
|
||||
state.choosepeople.unshift(item[item.length - 1]);
|
||||
console.log("selectedRowKeys changed: ", selectedRowKeys, item);
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
state.choosepeople = item.reverse();
|
||||
selectedsHeight();
|
||||
// if (selectedRowKeys.length > 0 && item.length > 0) {
|
||||
|
||||
// state.selectedRowKeys.push(selectedRowKeys[selectedRowKeys.length - 1]);
|
||||
// state.choosepeople.unshift(item[item.length - 1]);
|
||||
// // console.log(
|
||||
// // "selectedRowKeys changed22222: ",
|
||||
// // state.selectedRowKeys,
|
||||
// // state.choosepeople
|
||||
// // );
|
||||
// }
|
||||
};
|
||||
//单个删除选中的人
|
||||
const deleteChoosePeople = (item) => {
|
||||
@@ -920,7 +967,7 @@ export default {
|
||||
resize.listenTo(
|
||||
document.getElementById("ProjCheckship").querySelector("#selecteds"),
|
||||
function (ele) {
|
||||
console.log("ele", ele.offsetHeight);
|
||||
console.log("ele", ele.clientHeight, ele.offsetHeight);
|
||||
if (ele.offsetHeight > 160 && !state.showHidden) {
|
||||
state.showMore = true;
|
||||
document
|
||||
@@ -1047,7 +1094,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
// console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
|
||||
console.log("选中的部门2", state.selectedKeys1, state.chooseorganization);
|
||||
};
|
||||
//点击确认添加-判断是否显示确定弹窗
|
||||
const addOrgModal = () => {
|
||||
@@ -1070,19 +1117,19 @@ export default {
|
||||
state.showOrgModal = false;
|
||||
};
|
||||
|
||||
//单个删除选中的人
|
||||
//单个删除选中的组织
|
||||
const deleteChoosePeople1 = (item) => {
|
||||
console.log("item", item);
|
||||
console.log("item", item, state.chooseorganization);
|
||||
let arr = state.chooseorganization;
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].key === item.key) {
|
||||
if (arr[i].id === item.id) {
|
||||
arr.splice(i, 1);
|
||||
}
|
||||
}
|
||||
state.chooseorganization = arr;
|
||||
let array = state.selectedKeys1;
|
||||
for (let i = 0; i < array.length; i++) {
|
||||
if (array[i] === item.key) {
|
||||
if (array[i] === item.id) {
|
||||
array.splice(i, 1);
|
||||
}
|
||||
}
|
||||
@@ -1193,8 +1240,10 @@ export default {
|
||||
//受众关联 选中的数组
|
||||
const onSelectChange2 = (selectedRowKeys, item) => {
|
||||
// console.log("selectedRowKeys changed: ", selectedRowKeys, item);
|
||||
state.selectedRowKeys2.push(selectedRowKeys[selectedRowKeys.length - 1]);
|
||||
state.relationpeople.unshift(item[item.length - 1]);
|
||||
state.selectedRowKeys2 = selectedRowKeys;
|
||||
state.relationpeople = item.reverse();
|
||||
// state.selectedRowKeys2.push(selectedRowKeys[selectedRowKeys.length - 1]);
|
||||
// state.relationpeople.unshift(item[item.length - 1]);
|
||||
|
||||
selectedsHeight2();
|
||||
};
|
||||
@@ -1331,6 +1380,73 @@ export default {
|
||||
ctx.emit("update:addAuthList", state.selectAllArr);
|
||||
closeDrawer();
|
||||
};
|
||||
//获取授权 坐回显
|
||||
const optionAuthPerm = () => {
|
||||
let obj = {
|
||||
keyWord: "",
|
||||
type:
|
||||
props.classify === "learnPath"
|
||||
? 1
|
||||
: props.classify === "project"
|
||||
? 2
|
||||
: props.classify === "course"
|
||||
? 3
|
||||
: null,
|
||||
tag: props.authClassify === 1 ? 3 : props.authClassify === 2 ? 4 : "",
|
||||
opt: 1,
|
||||
refId: props.selectProjectId,
|
||||
pageNo: 0,
|
||||
pageSize: 0,
|
||||
deptList: [],
|
||||
groupList: [],
|
||||
studentList: [],
|
||||
};
|
||||
console.log("获取权限名单obj", obj);
|
||||
api
|
||||
.optionAuthPerm(obj)
|
||||
.then((res) => {
|
||||
// console.log("获取权限名单成功", res);
|
||||
if (res.data.code === 200) {
|
||||
let studentArr = res.data.data.studentList;
|
||||
let selectedRowKeys = [];
|
||||
let choosepeople = [];
|
||||
for (let i = 0; i < studentArr.length; i++) {
|
||||
selectedRowKeys.push(studentArr[i].id);
|
||||
choosepeople.push(studentArr[i]);
|
||||
}
|
||||
//快速选人
|
||||
state.selectedRowKeys = selectedRowKeys;
|
||||
state.choosepeople = choosepeople;
|
||||
|
||||
let deptArr = res.data.data.deptList;
|
||||
let selectedKeys1 = [];
|
||||
let chooseorganization = [];
|
||||
for (let i = 0; i < deptArr.length; i++) {
|
||||
selectedKeys1.push(deptArr[i].id);
|
||||
chooseorganization.push(deptArr[i]);
|
||||
}
|
||||
//组织
|
||||
state.selectedKeys1 = selectedKeys1;
|
||||
state.chooseorganization = chooseorganization;
|
||||
state.chooseorganization1 = chooseorganization;
|
||||
|
||||
let groupArr = res.data.data.groupList;
|
||||
let selectedRowKeys2 = [];
|
||||
let relationpeople = [];
|
||||
for (let i = 0; i < groupArr.length; i++) {
|
||||
selectedRowKeys2.push(groupArr[i].id);
|
||||
relationpeople.push(groupArr[i]);
|
||||
}
|
||||
//受众
|
||||
state.selectedRowKeys2 = selectedRowKeys2;
|
||||
state.relationpeople = relationpeople;
|
||||
console.log("获取权限名单成功", res);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("获取权限名单失败", err);
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
@@ -1374,6 +1490,7 @@ export default {
|
||||
resetOrg,
|
||||
|
||||
submitAuth,
|
||||
optionAuthPerm,
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -1904,7 +2021,9 @@ export default {
|
||||
margin-right: 32px;
|
||||
margin-left: 32px;
|
||||
min-height: 100px;
|
||||
// height: 170px;
|
||||
// overflow: hidden;
|
||||
flex-shrink: 0;
|
||||
.chose {
|
||||
// width: 64px;
|
||||
padding-left: 10px;
|
||||
@@ -1920,6 +2039,7 @@ export default {
|
||||
color: rgba(56, 139, 225, 1);
|
||||
font-size: 12px;
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
.ch {
|
||||
position: absolute;
|
||||
width: 18px;
|
||||
|
||||
@@ -133,6 +133,7 @@
|
||||
<script>
|
||||
import { toRefs, reactive } from "vue";
|
||||
import * as api from "../../api/index1";
|
||||
import { message } from "ant-design-vue";
|
||||
export default {
|
||||
name: "ProjPowerList",
|
||||
props: {
|
||||
@@ -172,6 +173,7 @@ export default {
|
||||
// },
|
||||
],
|
||||
cancelAuthInfo: null, //取消授权id
|
||||
cancelAuthState: null, //取消授权种类
|
||||
});
|
||||
|
||||
const closeDrawer = () => {
|
||||
@@ -199,6 +201,7 @@ export default {
|
||||
name: item.name,
|
||||
};
|
||||
state.cancelAuthInfo = obj;
|
||||
state.cancelAuthState = item.state;
|
||||
};
|
||||
const closeCancelModal = () => {
|
||||
state.cancelModal = false;
|
||||
@@ -364,7 +367,14 @@ export default {
|
||||
: props.classify === "course"
|
||||
? 3
|
||||
: null,
|
||||
tag: 1,
|
||||
tag:
|
||||
state.cancelAuthState === "归属权"
|
||||
? 2
|
||||
: state.cancelAuthState === "查看权"
|
||||
? 3
|
||||
: state.cancelAuthState === "管理权"
|
||||
? 4
|
||||
: null,
|
||||
opt: 4,
|
||||
refId: props.selectProjectId,
|
||||
pageNo: 1,
|
||||
@@ -373,7 +383,7 @@ export default {
|
||||
groupList: [],
|
||||
studentList: [state.cancelAuthInfo],
|
||||
};
|
||||
console.log("取消权限名单obj", obj);
|
||||
console.log("取消权限名单obj", obj, state.cancelAuthState);
|
||||
api
|
||||
.optionAuthPerm(obj)
|
||||
.then((res) => {
|
||||
@@ -381,6 +391,7 @@ export default {
|
||||
if (res.data.code === 200) {
|
||||
// console.log("取消授权成功", res.data.data);
|
||||
optionAuthPerm();
|
||||
message.success("取消授权成功");
|
||||
closeCancelModal();
|
||||
}
|
||||
})
|
||||
|
||||
@@ -28,13 +28,13 @@
|
||||
<div class="nameinp">
|
||||
<div class="namee">姓名:</div>
|
||||
<a-input
|
||||
v-model:value="name"
|
||||
v-model:value="nameSearch"
|
||||
style="width: 270px; height: 40px; border-radius: 8px"
|
||||
placeholder="请输入姓名"
|
||||
/>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn1">
|
||||
<div class="btn1" @click="handleSearchStu">
|
||||
<div class="img1">
|
||||
<img
|
||||
src="../../assets/images/courseManage/search0.png"
|
||||
@@ -42,7 +42,7 @@
|
||||
</div>
|
||||
<div class="wz">搜索</div>
|
||||
</div>
|
||||
<div class="btn2">
|
||||
<div class="btn2" @click="resetStu">
|
||||
<div class="img2">
|
||||
<img
|
||||
src="../../assets/images/courseManage/reset1.png"
|
||||
@@ -242,7 +242,7 @@ export default {
|
||||
valueSelect: null, //树形选择
|
||||
|
||||
valueSelectboe2: null, //boe树形选择
|
||||
name: "",
|
||||
nameSearch: "",
|
||||
nameadd: "",
|
||||
nameaddd: "",
|
||||
com: "",
|
||||
@@ -317,6 +317,18 @@ export default {
|
||||
ctx.emit("update:ProjOwnervisible", false);
|
||||
state.openKeys = [];
|
||||
state.isDisabled = true;
|
||||
state.nameSearch = "";
|
||||
state.tabledata = [];
|
||||
state.currentPage = 1;
|
||||
state.selectedKeys = [];
|
||||
state.valueSelectboe = null;
|
||||
state.choosepeople = []; //选中的组织名称
|
||||
|
||||
state.selectDepartment = null; //选中部门名称
|
||||
state.showMore = false; //是否显示快速选人的查看更多
|
||||
state.showHidden = false; //是否显示收回
|
||||
state.selectedRowKeys = []; //表格选中的key
|
||||
state.selectPeopleArr = []; //表格选中的人
|
||||
};
|
||||
|
||||
const afterVisibleChange = (bool) => {
|
||||
@@ -336,16 +348,22 @@ export default {
|
||||
});
|
||||
//获取选中部门的人员信息
|
||||
const getPeoples = () => {
|
||||
if (!state.nameSearch && !state.selectedKeys[0]) {
|
||||
state.tableDataTotal = 0;
|
||||
return false;
|
||||
}
|
||||
// console.log("org", org);
|
||||
let obj = {
|
||||
org: state.selectedKeys[0],
|
||||
pageNo: state.currentPage,
|
||||
pageSize: state.pageSize,
|
||||
keyWord: state.nameSearch,
|
||||
org: state.nameSearch ? null : state.selectedKeys[0],
|
||||
};
|
||||
if (!state.selectedKeys[0]) {
|
||||
state.tableDataTotal = 0;
|
||||
return;
|
||||
}
|
||||
// console.log("obj", obj);
|
||||
// if (!state.selectedKeys[0]) {
|
||||
// state.tableDataTotal = 0;
|
||||
// return;
|
||||
// }
|
||||
console.log("obj", obj);
|
||||
api
|
||||
.getMemberInfo(obj)
|
||||
.then((res) => {
|
||||
@@ -373,7 +391,26 @@ export default {
|
||||
console.log("获取学员失败", err);
|
||||
});
|
||||
};
|
||||
|
||||
//搜索学员
|
||||
const handleSearchStu = () => {
|
||||
// deleteDepSelect();
|
||||
state.currentPage = 1;
|
||||
console.log("22222");
|
||||
getPeoples();
|
||||
};
|
||||
//重置
|
||||
const resetStu = () => {
|
||||
state.nameSearch = "";
|
||||
state.currentPage = 1;
|
||||
state.tableDataTotal = 0;
|
||||
state.tabledata = [];
|
||||
};
|
||||
// //清空选择部门信息
|
||||
// const deleteDepSelect = () => {
|
||||
// state.selectedKeys = null;
|
||||
// state.selectOrgId = null;
|
||||
// state.selectOrgName = null;
|
||||
// };
|
||||
//分页
|
||||
const changePagination = () => {
|
||||
getPeoples();
|
||||
@@ -610,6 +647,8 @@ export default {
|
||||
changeOwnership,
|
||||
addAuth,
|
||||
removeClick,
|
||||
handleSearchStu,
|
||||
resetStu,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -2553,7 +2553,7 @@
|
||||
<!-- <StuAdd v-model:Stuvisible="Stuvisible" @sure="handlePostSure" /> -->
|
||||
<!-- 添加学员抽屉 -->
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="Stuvisible"
|
||||
v-model:ProjCheckvisible="viewpowervisible"
|
||||
:selectProjectId="offcourseId"
|
||||
v-model:addAuthList="addStudentList"
|
||||
:authClassify="authClassify"
|
||||
@@ -2579,13 +2579,13 @@
|
||||
classify="course"
|
||||
/>
|
||||
<!-- 查看权抽屉 -->
|
||||
<proj-check-ship
|
||||
<!-- <proj-check-ship
|
||||
v-model:ProjCheckvisible="viewpowervisible"
|
||||
:selectProjectId="selectCourseId"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="course"
|
||||
/>
|
||||
/> -->
|
||||
<!-- 管理权抽屉 -->
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="viewpowervisible"
|
||||
@@ -3372,7 +3372,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
const showStuAdd = () => {
|
||||
state.Stuvisible = true;
|
||||
state.viewpowervisible = true;
|
||||
};
|
||||
|
||||
// 富文本 sssssssssssssss
|
||||
@@ -4836,7 +4836,7 @@ export default defineComponent({
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
if (res.data.code === 200) {
|
||||
state.Stuvisible = false;
|
||||
state.viewpowervisible = false;
|
||||
getTableDate2();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -627,20 +627,20 @@
|
||||
/>
|
||||
<!-- 查看权抽屉 -->
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="Queryvisible"
|
||||
:selectProjectId="selectPathId"
|
||||
v-model:ProjCheckvisible="showCheck"
|
||||
v-model:selectProjectId="selectPathId"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
v-model:authClassify="authClassify"
|
||||
classify="learnPath"
|
||||
/>
|
||||
<!-- 管理权抽屉 -->
|
||||
<proj-check-ship
|
||||
<!-- <proj-check-ship
|
||||
v-model:ProjCheckvisible="Managevisible"
|
||||
:selectProjectId="selectPathId"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="learnPath"
|
||||
/>
|
||||
/> -->
|
||||
<!-- 创建路径loading -->
|
||||
|
||||
<!-- 更多背景图 v-model:visible="learnBgMore" -->
|
||||
@@ -770,6 +770,7 @@ export default {
|
||||
PLvisible: false, //授权名单抽屉
|
||||
Queryvisible: false, //查看权抽屉
|
||||
Managevisible: false, //管理权抽屉
|
||||
showCheck: false,
|
||||
|
||||
value1: "",
|
||||
value2: "",
|
||||
@@ -1028,12 +1029,12 @@ export default {
|
||||
const showQuery = (id) => {
|
||||
state.authClassify = 1;
|
||||
state.selectPathId = id;
|
||||
state.Queryvisible = true;
|
||||
state.showCheck = true;
|
||||
};
|
||||
const showManage = (id) => {
|
||||
state.authClassify = 2;
|
||||
state.selectPathId = id;
|
||||
state.Managevisible = true;
|
||||
state.showCheck = true;
|
||||
};
|
||||
const getTableDate = (tableData) => {
|
||||
let data = tableData;
|
||||
@@ -1750,6 +1751,7 @@ export default {
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
<div class="taskmain">快速创建项目详情</div>
|
||||
</div>
|
||||
<div class="second">
|
||||
<router-link :to="{ path: '/leveladddetail' }">
|
||||
<div @click="totask">
|
||||
<div
|
||||
class="taskbox"
|
||||
style="background: linear-gradient(180deg, #fef3dd, #fffaf0)"
|
||||
@@ -117,10 +117,10 @@
|
||||
</div>
|
||||
<div class="centermain">快速添加任务/关卡</div>
|
||||
</div>
|
||||
</router-link>
|
||||
</div>
|
||||
<div
|
||||
class="taskbox"
|
||||
@click="showAddStu"
|
||||
@click="tostudent"
|
||||
style="background: linear-gradient(180deg, #ddeaff, #f0f8fe)"
|
||||
>
|
||||
<div class="leftt">
|
||||
@@ -771,7 +771,7 @@
|
||||
</div>
|
||||
<div class="btnbox" style="margin: 20px">
|
||||
<a-upload
|
||||
v-if="(docChecked==true)"
|
||||
v-if="docChecked == true"
|
||||
v-model:file-list="fileList"
|
||||
name="file"
|
||||
action="/manageApi/file/upload"
|
||||
@@ -788,7 +788,11 @@
|
||||
alt=""
|
||||
/>
|
||||
</a-upload>
|
||||
<div v-if="(docChecked==true)" class="btnbox" style="margin: 20px">
|
||||
<div
|
||||
v-if="docChecked == true"
|
||||
class="btnbox"
|
||||
style="margin: 20px"
|
||||
>
|
||||
<span style="color: #999999">
|
||||
支持:pdf.ppt.pptx.doc.docx.xls.xlsx.jpeg.png.gif.zip
|
||||
</span>
|
||||
@@ -2111,6 +2115,15 @@ export default {
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
const totask = () => {
|
||||
state.activeKey = "2";
|
||||
};
|
||||
const tostudent = () => {
|
||||
state.activeKey = "3";
|
||||
getStudent();
|
||||
// state.activeKey1 = "8";
|
||||
};
|
||||
return {
|
||||
...toRefs(state),
|
||||
...toRefs(levelList),
|
||||
@@ -2162,6 +2175,8 @@ export default {
|
||||
setconfig,
|
||||
deFile,
|
||||
deleteStu,
|
||||
totask,
|
||||
tostudent,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -110,13 +110,13 @@
|
||||
style="background: linear-gradient(180deg, #ddeaff, #f0f8fe)"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left2.png"/>
|
||||
<img src="../../assets/images/taskpage/left2.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/projectadd/nopro.png"/>
|
||||
<img src="../../assets/images/projectadd/nopro.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right2.png"/>
|
||||
<img src="../../assets/images/taskpage/right2.png" />
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
创建项目
|
||||
@@ -148,7 +148,7 @@
|
||||
>
|
||||
<div class="headerLeft" style="margin-left: 32px">
|
||||
<span class="headerLeftText" style="font-size: 16px"
|
||||
>{{ projectInfo.projectId ? '编辑' : '创建' }}多层项目</span
|
||||
>{{ projectInfo.projectId ? "编辑" : "创建" }}多层项目</span
|
||||
>
|
||||
</div>
|
||||
<div style="cursor: pointer; margin-right: 32px" @click="closeModal2">
|
||||
@@ -159,9 +159,14 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modalMain">
|
||||
<div style="margin-left: 40px; margin-top: 40px;width:78%" v-if="projectInfo.parentName">
|
||||
<div
|
||||
style="margin-left: 40px; margin-top: 40px; width: 78%"
|
||||
v-if="projectInfo.parentName"
|
||||
>
|
||||
<span style="color: #000000; font-size: 14px">项目归属:</span>
|
||||
<span style="color: #999999; font-size: 14px; margin-left: 10px">{{ projectInfo.parentName }}</span>
|
||||
<span style="color: #999999; font-size: 14px; margin-left: 10px">{{
|
||||
projectInfo.parentName
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="name">
|
||||
<div class="star" style="margin-top: -4px">
|
||||
@@ -202,7 +207,10 @@
|
||||
</div>
|
||||
<div class="inname">项目经理:</div>
|
||||
<div class="in">
|
||||
<ProjectManager v-model:value="projectInfo.managerId" v-model:name="projectInfo.manager"></ProjectManager>
|
||||
<ProjectManager
|
||||
v-model:value="projectInfo.managerId"
|
||||
v-model:name="projectInfo.manager"
|
||||
></ProjectManager>
|
||||
</div>
|
||||
</div>
|
||||
<div class="name">
|
||||
@@ -214,16 +222,17 @@
|
||||
</div>
|
||||
<div class="inname">资源归属:</div>
|
||||
<div class="in select">
|
||||
<OrgClass v-model:value="projectInfo.sourceBelongId"
|
||||
v-model:name="projectInfo.sourceBelongName"></OrgClass>
|
||||
<OrgClass
|
||||
v-model:value="projectInfo.sourceBelongId"
|
||||
v-model:name="projectInfo.sourceBelongName"
|
||||
></OrgClass>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pubtn">
|
||||
<a-button class="pubtn1" @click="closeModal2">取消</a-button>
|
||||
<a-button class="pubtn2" @click="createStoreyProject"
|
||||
>确定
|
||||
</a-button
|
||||
>
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
@@ -272,13 +281,13 @@
|
||||
"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left2.png"/>
|
||||
<img src="../../assets/images/taskpage/left2.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture4.png"/>
|
||||
<img src="../../assets/images/taskpage/picture4.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right2.png"/>
|
||||
<img src="../../assets/images/taskpage/right2.png" />
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
单层子项目
|
||||
@@ -292,13 +301,13 @@
|
||||
"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left1.png"/>
|
||||
<img src="../../assets/images/taskpage/left1.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture5.png"/>
|
||||
<img src="../../assets/images/taskpage/picture5.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right1.png"/>
|
||||
<img src="../../assets/images/taskpage/right1.png" />
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(255, 182, 78, 1)">
|
||||
多层子项目
|
||||
@@ -347,7 +356,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modalMain">
|
||||
<router-link :to="`/projectadd?parentId=${projectInfo.parentId || ''}&parentName=${projectInfo.parentName || ''}`">
|
||||
<router-link
|
||||
:to="`/projectadd?parentId=${
|
||||
projectInfo.parentId || ''
|
||||
}&parentName=${projectInfo.parentName || ''}`"
|
||||
>
|
||||
<div
|
||||
class="taskbox"
|
||||
style="
|
||||
@@ -355,13 +368,13 @@
|
||||
"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left2.png"/>
|
||||
<img src="../../assets/images/taskpage/left2.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture6.png"/>
|
||||
<img src="../../assets/images/taskpage/picture6.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right2.png"/>
|
||||
<img src="../../assets/images/taskpage/right2.png" />
|
||||
</div>
|
||||
<div class="centerbox" style="color: rgba(78, 166, 255, 1)">
|
||||
单层项目
|
||||
@@ -380,13 +393,13 @@
|
||||
"
|
||||
>
|
||||
<div class="leftt">
|
||||
<img src="../../assets/images/taskpage/left3.png"/>
|
||||
<img src="../../assets/images/taskpage/left3.png" />
|
||||
</div>
|
||||
<div class="photo">
|
||||
<img src="../../assets/images/taskpage/picture7.png"/>
|
||||
<img src="../../assets/images/taskpage/picture7.png" />
|
||||
</div>
|
||||
<div class="rightt">
|
||||
<img src="../../assets/images/taskpage/right3.png"/>
|
||||
<img src="../../assets/images/taskpage/right3.png" />
|
||||
</div>
|
||||
<div class="centerbox1" style="color: rgba(93, 201, 136, 1)">
|
||||
多层项目
|
||||
@@ -736,13 +749,13 @@
|
||||
classify="project"
|
||||
/>
|
||||
<!-- 查看权抽屉 -->
|
||||
<proj-check-ship
|
||||
<!-- <proj-check-ship
|
||||
v-model:ProjCheckvisible="ProjCheckvisible"
|
||||
:selectProjectId="selectProjectId"
|
||||
v-model:addAuthList="addAuthList"
|
||||
:authClassify="authClassify"
|
||||
classify="project"
|
||||
/>
|
||||
/> -->
|
||||
<!-- 管理权抽屉 -->
|
||||
<proj-check-ship
|
||||
v-model:ProjCheckvisible="ProjCheckvisible"
|
||||
@@ -754,16 +767,16 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import {reactive, toRefs, ref, watch} from "vue";
|
||||
import {message} from "ant-design-vue";
|
||||
import {useRouter} from "vue-router";
|
||||
import { reactive, toRefs, ref, watch } from "vue";
|
||||
import { message } from "ant-design-vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import ProjOwnerShip from "../../components/drawers/ProjectOwn";
|
||||
import ProjPowerList from "../../components/drawers/ProjPowerList";
|
||||
import ProjCheckShip from "../../components/drawers/ProjCheckPower";
|
||||
import * as api from "../../api/index";
|
||||
import * as api1 from "../../api/index1";
|
||||
import {toDate} from "../../api/method";
|
||||
import {storage} from "../../api/storage";
|
||||
import { toDate } from "../../api/method";
|
||||
import { storage } from "../../api/storage";
|
||||
import ProjectManager from "@/components/project/ProjectManager";
|
||||
import ProjectClass from "@/components/project/ProjectClass";
|
||||
import OrgClass from "@/components/project/OrgClass";
|
||||
@@ -776,7 +789,7 @@ export default {
|
||||
ProjCheckShip,
|
||||
ProjectManager,
|
||||
ProjectClass,
|
||||
OrgClass
|
||||
OrgClass,
|
||||
// ProjManageShip
|
||||
},
|
||||
setup() {
|
||||
@@ -853,27 +866,27 @@ export default {
|
||||
searchParam: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
},
|
||||
});
|
||||
// 数据接入 - start -
|
||||
const router = useRouter();
|
||||
|
||||
const sProjectStateList = ref([
|
||||
{value: 0, label: "草稿"},
|
||||
{value: 1, label: "审核中"},
|
||||
{value: 2, label: "审核通过"},
|
||||
{value: 3, label: "已发布"},
|
||||
{value: -2, label: "未通过"},
|
||||
{ value: 0, label: "草稿" },
|
||||
{ value: 1, label: "审核中" },
|
||||
{ value: 2, label: "审核通过" },
|
||||
{ value: 3, label: "已发布" },
|
||||
{ value: -2, label: "未通过" },
|
||||
]);
|
||||
|
||||
const searchReset = () => {
|
||||
state.searchParam = {pageNo: 1, pageSize: 10}
|
||||
getTableDate()
|
||||
state.searchParam = { pageNo: 1, pageSize: 10 };
|
||||
getTableDate();
|
||||
};
|
||||
|
||||
const searchSubmit = () => {
|
||||
state.searchParam.pageNo = 1
|
||||
getTableDate()
|
||||
state.searchParam.pageNo = 1;
|
||||
getTableDate();
|
||||
};
|
||||
|
||||
function validate(obj, errorMsgs) {
|
||||
@@ -905,11 +918,11 @@ export default {
|
||||
message.success("创建成功");
|
||||
state.currentPage = 1;
|
||||
getTableDate();
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
// 取消按钮 清空输入的数据
|
||||
const closeModal2 = () => {
|
||||
state.projectInfo = {}
|
||||
state.projectInfo = {};
|
||||
// value1.value = "";
|
||||
// type = "";
|
||||
// manager = "";
|
||||
@@ -938,7 +951,6 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 取消按钮 清空数据
|
||||
const closeModal3 = () => {
|
||||
state.doublesonpro = false;
|
||||
@@ -1114,7 +1126,7 @@ export default {
|
||||
message.success("模版保存成功");
|
||||
state.startModal = false;
|
||||
getTableDate();
|
||||
})
|
||||
});
|
||||
};
|
||||
//关闭存为模版弹窗
|
||||
const closeStartModal = () => {
|
||||
@@ -1135,7 +1147,9 @@ export default {
|
||||
projectId: state.copyProjectId,
|
||||
type: 2,
|
||||
};
|
||||
api.handleProject(obj).then((res) => {
|
||||
api
|
||||
.handleProject(obj)
|
||||
.then((res) => {
|
||||
console.log("复制成功", res);
|
||||
message.destroy();
|
||||
message.success("复制成功");
|
||||
@@ -1319,21 +1333,24 @@ export default {
|
||||
fixed: "right",
|
||||
customRender: (value) => {
|
||||
// console.log("value", value.record.type, value.record.status);
|
||||
return <div className="operation">
|
||||
{value.record.status === 0 || value.record.status === -2 ? <span
|
||||
return (
|
||||
<div className="operation">
|
||||
{value.record.status === 0 || value.record.status === -2 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
if (value.record.type === 1 || value.record.type === 2) {
|
||||
state.doublepro = true;
|
||||
state.projectInfo = value.record
|
||||
state.projectInfo = value.record;
|
||||
} else {
|
||||
console.log(value.record)
|
||||
console.log(value.record);
|
||||
router.push({
|
||||
path: '/projectadd', query: {
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
projectId: value.record.projectId,
|
||||
parentId: value.record.parentId,
|
||||
parentName: value.record.parentName
|
||||
}
|
||||
})
|
||||
parentName: value.record.parentName,
|
||||
},
|
||||
});
|
||||
}
|
||||
}}
|
||||
style="cursor:pointer;"
|
||||
@@ -1341,8 +1358,11 @@ export default {
|
||||
>
|
||||
编辑
|
||||
</span>
|
||||
: ''}
|
||||
{(value.record.status === 0 || value.record.status === -2) && value.record.type === 3 ?
|
||||
) : (
|
||||
<div className="operation1"></div>
|
||||
)}
|
||||
{(value.record.status === 0 || value.record.status === -2) &&
|
||||
value.record.type === 3 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
showReviewModal(value.record.projectId);
|
||||
@@ -1352,8 +1372,10 @@ export default {
|
||||
>
|
||||
提交审核
|
||||
</span>
|
||||
: ''}
|
||||
{value.record.status === 1 && value.record.type !== 1 ?
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status === 1 && value.record.type !== 1 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
showRecallReviewModal(value.record.projectId);
|
||||
@@ -1362,8 +1384,11 @@ export default {
|
||||
class="operation3"
|
||||
>
|
||||
撤回审核
|
||||
</span> : ''}
|
||||
{value.record.status === 2 ?
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.status === 2 ? (
|
||||
<span
|
||||
onClick={() => {
|
||||
console.log("value.record", value.record);
|
||||
@@ -1387,7 +1412,9 @@ export default {
|
||||
>
|
||||
发布
|
||||
</span>
|
||||
: ''}
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
<div className="tableSelect">
|
||||
<a-select
|
||||
style="width: 50px"
|
||||
@@ -1435,30 +1462,43 @@ export default {
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</div>
|
||||
{value.record.type === 1 ? <span
|
||||
{value.record.type === 1 ? (
|
||||
<span
|
||||
className="operation3"
|
||||
style="cursor: pointer"
|
||||
onClick={() => {
|
||||
state.projectInfo = {parentName: value.record.name, parentId: value.record.projectId,type:2};
|
||||
state.projectInfo = {
|
||||
parentName: value.record.name,
|
||||
parentId: value.record.projectId,
|
||||
type: 2,
|
||||
};
|
||||
state.reminderModal = true;
|
||||
}}
|
||||
>
|
||||
创建子项目
|
||||
</span> : ''}
|
||||
{value.record.type === 2 ? <span
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.type === 2 ? (
|
||||
<span
|
||||
className="operation3"
|
||||
style="cursor: pointer"
|
||||
onClick={() => {
|
||||
router.push({
|
||||
path: '/projectadd', query: {
|
||||
path: "/projectadd",
|
||||
query: {
|
||||
parentId: value.record.projectId,
|
||||
parentName: value.record.name
|
||||
}
|
||||
})
|
||||
parentName: value.record.name,
|
||||
},
|
||||
});
|
||||
}}
|
||||
>
|
||||
创建班级
|
||||
</span> : ''}
|
||||
</span>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
<div className="tableSelect">
|
||||
<a-select
|
||||
style="width: 50px"
|
||||
@@ -1484,7 +1524,7 @@ export default {
|
||||
删除
|
||||
</div>
|
||||
</a-select-option>
|
||||
{value.record.type === 3 ?
|
||||
{value.record.type === 3 ? (
|
||||
<a-select-option value="存为模版" label="存为模版">
|
||||
<div
|
||||
onClick={() => {
|
||||
@@ -1493,8 +1533,11 @@ export default {
|
||||
>
|
||||
存为模版
|
||||
</div>
|
||||
</a-select-option> : ''}
|
||||
{value.record.type === 3 ?
|
||||
</a-select-option>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
{value.record.type === 3 ? (
|
||||
<a-select-option value="基础信息" label="基础信息">
|
||||
<div
|
||||
onClick={() => {
|
||||
@@ -1506,32 +1549,37 @@ export default {
|
||||
>
|
||||
基础信息
|
||||
</div>
|
||||
</a-select-option> : ''}
|
||||
</a-select-option>
|
||||
) : (
|
||||
""
|
||||
)}
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
const getTableDate = () => api.getProjectList(state.searchParam).then((res) => {
|
||||
const getTableDate = () =>
|
||||
api.getProjectList(state.searchParam).then((res) => {
|
||||
console.log(res);
|
||||
state.tableDataTotal = Number(res.data.data.total);
|
||||
const data = res.data.data.rows;
|
||||
initDataSublist('', data)
|
||||
console.log(data)
|
||||
initDataSublist("", data);
|
||||
console.log(data);
|
||||
tableData.value = data;
|
||||
console.log("tableData", tableData);
|
||||
});
|
||||
|
||||
function initDataSublist(parentName, data) {
|
||||
if (data && data.length) {
|
||||
data.forEach(e => {
|
||||
e.parentName = parentName
|
||||
e.key = e.projectId
|
||||
initDataSublist(e.name, e.subList)
|
||||
e.subList && e.subList.length && (e.children = e.subList)
|
||||
})
|
||||
data.forEach((e) => {
|
||||
e.parentName = parentName;
|
||||
e.key = e.projectId;
|
||||
initDataSublist(e.name, e.subList);
|
||||
e.subList && e.subList.length && (e.children = e.subList);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1539,8 +1587,8 @@ export default {
|
||||
|
||||
// 翻页
|
||||
const changePagination = (page) => {
|
||||
state.searchParam.pageNo = page
|
||||
getTableDate()
|
||||
state.searchParam.pageNo = page;
|
||||
getTableDate();
|
||||
};
|
||||
|
||||
const showModal = () => {
|
||||
@@ -1551,7 +1599,7 @@ export default {
|
||||
};
|
||||
|
||||
const showModal1 = () => {
|
||||
state.projectInfo = {}
|
||||
state.projectInfo = {};
|
||||
state.reminderModal = true;
|
||||
};
|
||||
const closeModal1 = () => {
|
||||
@@ -1597,7 +1645,9 @@ export default {
|
||||
};
|
||||
|
||||
//添加权限
|
||||
watch(() => state.addAuthList, (res) => {
|
||||
watch(
|
||||
() => state.addAuthList,
|
||||
(res) => {
|
||||
console.log("res", res, state.addAuthList);
|
||||
let obj = {
|
||||
type: 2,
|
||||
@@ -1623,7 +1673,7 @@ export default {
|
||||
console.log("添加授权失败", err);
|
||||
});
|
||||
}
|
||||
)
|
||||
);
|
||||
return {
|
||||
...toRefs(state),
|
||||
expandTable,
|
||||
@@ -1679,13 +1729,12 @@ export default {
|
||||
okReminderModal,
|
||||
};
|
||||
},
|
||||
}
|
||||
;
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.projectManage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user