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