去掉添加任务的多次提示,只提示一次,再次创建投票题干id没清空

This commit is contained in:
zhangyc
2022-11-30 12:09:04 +08:00
parent 99996ffa88
commit 599c695091
12 changed files with 608 additions and 100 deletions

View File

@@ -573,12 +573,12 @@
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="共享文档">
<a-tab-pane key="13" tab="共享文档">
<div class="sametab">
<div class="Gcon">
<div class="pad"></div>
<div class="Gin">
<div class="headone" style="transform: translateX(30px)">
<div class="headone">
<div class="box"></div>
<div class="onetitle">上传共享文档</div>
<div class="oneedi">
@@ -589,8 +589,8 @@
<a-upload
v-model:file-list="fileList"
name="file"
action="/api/file/upload"
@change="handleChange"
action="/manageApi/file/upload"
@change="handleChange2"
>
<span
class="xkbtn"
@@ -609,8 +609,8 @@
</span>
</div>
<div
v-for="item in docList"
:key="item.src"
v-for="item in fileList"
:key="item.uid"
class="docListStyle"
>
<img
@@ -623,10 +623,14 @@
"
alt=""
/>
<span style="font: oblique 16px Sans-serif">{{
<span style="font: oblique bold 16px Sans-serif">{{
item.name
}}</span>
<span style="color: #4ea6ff; float: right">删除</span>
<span
style="color: #4ea6ff; float: right; cursor: pointer"
@click="deFile(item.uid)"
>删除</span
>
</div>
</div>
</div>
@@ -940,13 +944,14 @@ export default defineComponent({
res.data.data.projectTemplateInfo.courseSyncFlag;
state.projectInfo.level = res.data.data.projectTemplateInfo.level;
state.projectInfo.systemId =
res.data.data.projectTemplateInfo.systemId;
res.data.data.projectTemplateInfo.systemId;
state.projectInfo.boeFlag = res.data.data.projectTemplateInfo.boeFlag;
state.projectInfo.noticeFlag =
res.data.data.projectTemplateInfo.noticeFlag;
state.projectInfo.remark = res.data.data.projectTemplateInfo.remark;
state.projectInfo.status = res.data.data.projectTemplateInfo.status;
state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl;
state.projectInfo.attach =res.res.data.data.projectTemplateInfo.attach;
let data = res.data.data.stageList;
console.log("data=====", data);
for (let i in data) {
@@ -972,6 +977,7 @@ export default defineComponent({
// 发布公告
const addNotice = () => {
console.log("ok====s");
let obj = {
name: state.projectInfo.name,
category: state.projectInfo.category,
@@ -986,11 +992,13 @@ export default defineComponent({
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
notice: state.projectInfo.notice,
noticeFlag: 0,
noticeFlag: state.projectInfo.noticeFlag,
projectTemplateId: localStorage.getItem("projectTemplateId"),
remark: state.projectInfo.remark,
status: state.projectInfo.status,
attach:state.projectInfo.attach,
};
console.log("obj======",obj);
api
.templateEdit(obj)
.then((res) => {
@@ -1108,6 +1116,51 @@ export default defineComponent({
console.log("获取项目积分规则失败了", err);
});
};
const handleChange2 = ({ file, fileList }) => {
let list = [];
if (file.status !== "uploading") {
console.log("上传的list", fileList);
console.log(file);
list = state.fileList;
console.log("list", list);
let str = JSON.stringify(list);
console.log("str", str);
//要编辑项目
api
.templateEdit({
name: state.projectInfo.name,
category: state.projectInfo.category,
picUrl: state.projectInfo.picUrl,
beginTime: new Date(state.projectInfo.beginTime).getTime(),
endTime: new Date(state.projectInfo.endTime).getTime(),
manager: state.projectInfo.manager,
managerId: state.projectInfo.managerId || 0,
sourceBelongId: state.projectInfo.sourceBelongId,
level: state.projectInfo.level,
systemId: state.projectInfo.systemId,
boeFlag: state.projectInfo.boeFlag ? 1 : 0,
courseSyncFlag: state.projectInfo.courseSyncFlag ? 1 : 0,
notice: state.projectInfo.notice,
noticeFlag: state.projectInfo.noticeFlag,
projectTemplateId: localStorage.getItem("projectTemplateId"),
remark: state.projectInfo.remark,
status: state.projectInfo.status,
attach:str,
})
.then((res) => {
console.log("上传成功", res);
})
.catch((err) => {
console.log("上传失败了", err);
});
}
if (file.status === "done") {
message.success(`${file.name} 文件上传成功`);
} else if (file.status === "error") {
message.error(`${file.name} 文件上传失败.`);
}
};
//设置积分规则
const editRule = () => {
let obj = {
@@ -1186,6 +1239,7 @@ export default defineComponent({
toEdit,
getScoreRule,
editRule,
handleChange2,
scoresum,
};
},
@@ -1258,6 +1312,427 @@ export default defineComponent({
}
}
}
.sametab {
// margin-left: 30px;
// margin-right: 30px;
margin-top: 30px;
width: 100%;
// background-color: green;
.Gcon {
display: flex;
.pad {
height: 100%;
width: 40px;
}
.Gin {
// background-color: #bfa;
margin-top: 30px;
.headone {
// background-color: red;
display: flex;
text-align: center;
.box {
width: 4px;
height: 20px;
background-color: #409eff;
border-radius: 2px;
}
.onetitle {
margin-left: 15px;
color: #333333;
font-size: 14px;
}
.oneedi {
margin-left: 15px;
color: #4ea6ff;
cursor: pointer;
}
.twobtn {
display: flex;
.btnone {
width: 42px;
height: 24px;
border: 1px solid rgba(64, 158, 255, 1);
border-radius: 4px;
color: rgba(64, 158, 255, 1);
margin-left: 20px;
cursor: pointer;
}
.btntwo {
width: 42px;
height: 24px;
border: 1px solid rgba(64, 158, 255, 1);
border-radius: 4px;
color: #ffffff;
margin-left: 20px;
background: #409eff;
cursor: pointer;
}
}
}
.btnbox {
.ant-upload-list {
display: none !important;
}
}
.onemain {
margin-top: 20px;
margin-left: 55px;
color: #6f6f6f;
font-size: 14px;
.checkcon {
position: relative;
.in {
position: absolute;
// margin-top: 10px;
left: 0;
top: 3px;
}
.yulan {
// color: yellow;
margin-left: 22px;
// display: inline-block;
}
.yulan2 {
margin-left: 22px;
}
.ant-input-number {
height: 24px;
width: 24px;
margin: 10px;
border-radius: 4px;
border: 1px solid #6d7584;
.ant-input-number-input {
width: 100%;
height: 100%;
font-size: 14px;
padding: 0;
color: #409eff;
text-align: center;
}
}
}
}
.twomain {
margin-left: 20px;
margin-top: 20px;
.ant-switch-checked {
background-color: #5dc988;
}
.info {
margin-left: 10px;
color: #6f6f6f;
font-size: 14px;
// margin-top: 10px;
}
.infor {
margin-left: 38px;
margin-top: 10px;
color: #c7cbd2;
font-size: 14px;
}
.chooseshow {
// background-color: red;
margin-left: 38px;
margin-top: 12px;
.fane {
color: #6f6f6f;
font-size: 14px;
}
}
.choo {
display: none;
}
.btm {
margin-left: 38px;
margin-top: 20px;
.bmo {
color: #6f6f6f;
font-size: 14px;
}
.bmt {
color: #c7cbd2;
font-size: 14px;
margin-top: 3px;
}
.chosecon {
display: flex;
margin-top: 6px;
margin-bottom: 20px;
.chose {
position: relative;
.inl {
position: absolute;
top: 2px;
}
.sh {
margin-left: 23px;
color: #6f6f6f;
}
}
}
}
}
}
}
.Lhead {
display: flex;
.btns {
display: flex;
margin-left: 20px;
// flex-wrap: wrap;
.btn {
padding: 0px 26px 0px 26px;
height: 38px;
background: rgba(64, 158, 255, 0);
border-radius: 8px;
border: 1px solid rgba(64, 158, 255, 1);
display: flex;
align-items: center;
justify-content: center;
margin-right: 14px;
flex-shrink: 0;
cursor: pointer;
.search {
background-size: 100%;
}
.btnText {
font-size: 14px;
font-weight: 400;
color: rgba(64, 158, 255, 1);
line-height: 36px;
margin-left: 5px;
}
}
.btn1 {
.search {
width: 15px;
height: 17px;
background-image: url("../../assets/images/courseManage/search1.png");
}
}
.btn2 {
.search {
width: 16px;
height: 18px;
background-image: url("../../assets/images/courseManage/reset1.png");
}
}
.btn3 {
margin-right: 0px;
.search {
width: 17px;
height: 18px;
background-image: url("../../assets/images/courseManage/add1.png");
}
}
.btn1:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/search0.png");
}
.btnText {
color: #ffffff;
}
}
.btn2:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/reset0.png");
}
.btnText {
color: #ffffff;
}
}
.btn3:hover {
background: rgba(64, 158, 255, 1);
.search {
background-image: url("../../assets/images/courseManage/add0.png");
}
.btnText {
color: #ffffff;
}
}
}
}
.Lbom {
position: relative;
margin-bottom: 20px;
.item {
width: 100%;
height: 200px;
// background-color: green;
margin-top: 40px;
border-radius: 8px;
border: 1px solid #f0f4fe;
.itemhead {
height: 50px;
width: 100%;
background-color: #f0f4fe;
display: flex;
align-items: center;
position: relative;
.lev {
margin-left: 27px;
margin-right: 16px;
line-height: 100%;
color: #409eff;
font-size: 16px;
}
.lin {
width: 1px;
height: 35%;
background-color: #c7cbd2;
}
.nam {
margin-left: 16px;
color: #4f5156;
line-height: 100%;
font-size: 16px;
}
.count {
position: absolute;
line-height: 100%;
color: #4f5156;
font-size: 14px;
right: 40px;
span:nth-child(2) {
color: #63ca8c;
}
}
}
.itembomm {
display: flex;
align-items: center;
height: 150px;
.it {
// margin-left: 110px;
// margin-right: 110px;
width: 13%;
text-align: center;
.on {
font-size: 30px;
}
.ittext {
color: #4f5156;
margin-top: 16px;
margin-left: -5px;
}
}
.linee {
background-color: #ecf2fb;
width: 1px;
height: 55%;
}
.itright {
position: absolute;
right: 45px;
display: flex;
.te {
color: #4ea6ff;
font-size: 14px;
cursor: pointer;
}
.more {
position: relative;
height: 30px;
display: flex;
.moreArrow {
width: 13px;
height: 7px;
display: inline-block;
background-image: url("../../assets/images/navtop/down.png");
background-size: 100%;
margin: 2px;
margin-left: 7px;
margin-top: 6px;
}
.moreItems {
width: 80px;
height: 70px;
display: none;
background: #ffffff;
box-shadow: 2px 3px 9px 3px rgba(0, 0, 0, 0.05);
border-radius: 3px;
border: 0px solid #dcdcdc;
position: absolute;
left: 0px;
top: 20px;
z-index: 100;
.roleItem {
font-size: 14px;
font-weight: 400;
color: rgba(79, 81, 86, 1);
line-height: 36px;
display: flex;
justify-content: center;
cursor: pointer;
}
.roleItem:hover {
color: #4ea6ff;
}
}
}
.more:hover .moreArrow {
background-image: url("../../assets/images/navtop/up.png");
}
.more:hover .moreItems {
display: block;
}
}
}
.show {
color: blue;
}
.noshow {
display: none;
}
}
.create {
margin-top: 40px;
.taskbox {
width: 412px;
height: 160px;
border-radius: 10px;
position: relative;
// margin-left: 68px;
margin-bottom: 40px;
cursor: pointer;
.leftt {
position: absolute;
top: 18px;
left: 0;
}
.photo {
position: absolute;
top: 42px;
left: 37px;
}
.rightt {
position: absolute;
top: 69px;
right: 26px;
}
.centerbox {
position: absolute;
top: 52px;
left: 145px;
font-size: 20px;
font-weight: 700;
//line-height: 36px;
}
.centermain {
color: rgba(135, 139, 146, 1);
font-size: 14px;
position: absolute;
left: 144px;
bottom: 49px;
}
}
}
}
}
.editBtn {
float: right;
margin-right: 150px;