mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 21:36:44 +08:00
--fix bug
This commit is contained in:
@@ -3,7 +3,8 @@
|
|||||||
<div class="projectAdd">
|
<div class="projectAdd">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<span class="title"
|
<span class="title"
|
||||||
>{{ projectInfo.projectId ? "编辑" : "创建"
|
>{{
|
||||||
|
projectInfo.projectId ? "编辑" : "创建"
|
||||||
}}{{ ptojectType == "3" ? "班级" : "项目" }}</span
|
}}{{ ptojectType == "3" ? "班级" : "项目" }}</span
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
@@ -266,20 +267,15 @@
|
|||||||
<div class="inname" style="width: 50px">模版</div>
|
<div class="inname" style="width: 50px">模版</div>
|
||||||
<div class="in select" style="margin-left: 2px">
|
<div class="in select" style="margin-left: 2px">
|
||||||
<a-select
|
<a-select
|
||||||
:getPopupContainer="
|
:getPopupContainer="triggerNode => (triggerNode.parentNode || document.body)"
|
||||||
(triggerNode) => {
|
|
||||||
return triggerNode.parentNode || document.body;
|
|
||||||
}
|
|
||||||
"
|
|
||||||
placeholder="请选择模版"
|
placeholder="请选择模版"
|
||||||
:size="size"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:options="classifyList5"
|
:options="classifyList5"
|
||||||
@change="classificationChange5"
|
@change="classificationChange5"
|
||||||
@popupScroll="templateScroll"
|
@popupScroll="templateScroll"
|
||||||
:fieldNames="{
|
:fieldNames="{
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'projectTemplateId',
|
value: 'id',
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -437,14 +433,15 @@ export default {
|
|||||||
|
|
||||||
//选择分类
|
//选择分类
|
||||||
const classificationChange = (value) => {
|
const classificationChange = (value) => {
|
||||||
console.log(`selected ${value}`);
|
|
||||||
state.projectType = value; //分类选择的id
|
state.projectType = value; //分类选择的id
|
||||||
};
|
};
|
||||||
|
|
||||||
const classificationChange5 = (key, option) => {
|
const classificationChange5 = (key, option) => {
|
||||||
state.projectInfo = option;
|
state.projectInfo = option;
|
||||||
|
state.projectInfo.projectTemplateId = option.id
|
||||||
|
state.projectInfo.id = ''
|
||||||
state.projectInfo.type = 3;
|
state.projectInfo.type = 3;
|
||||||
state.projectInfo.rangeTime = [option.beginTime, option.endTime];
|
state.projectInfo.rangeTime = [dayjs(option.beginTime, "YYYY-MM-DD HH:mm"), dayjs(option.endTime, "YYYY-MM-DD HH:mm")];
|
||||||
state.projectInfo.parentName = routers.query.parentName;
|
state.projectInfo.parentName = routers.query.parentName;
|
||||||
state.projectInfo.parentId = routers.query.parentId;
|
state.projectInfo.parentId = routers.query.parentId;
|
||||||
};
|
};
|
||||||
@@ -508,6 +505,7 @@ export default {
|
|||||||
state.loading = true;
|
state.loading = true;
|
||||||
console.log("保存", state.projectInfo);
|
console.log("保存", state.projectInfo);
|
||||||
if (!validate(state.projectInfo, errorMsgs)) {
|
if (!validate(state.projectInfo, errorMsgs)) {
|
||||||
|
state.loading = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -525,6 +523,7 @@ export default {
|
|||||||
});
|
});
|
||||||
if (offName) {
|
if (offName) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
|
state.loading = false;
|
||||||
return message.warning("项目名称重复,请重新填写");
|
return message.warning("项目名称重复,请重新填写");
|
||||||
}
|
}
|
||||||
state.projectInfo.type = 3;
|
state.projectInfo.type = 3;
|
||||||
@@ -535,7 +534,7 @@ export default {
|
|||||||
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
message.success(state.projectInfo.projectId ? "编辑成功" : "创建成功");
|
||||||
router.push({
|
router.push({
|
||||||
path: "/taskpage",
|
path: "/taskpage",
|
||||||
query: { projectId: res.data.data },
|
query: {projectId: res.data.data},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
@@ -549,10 +548,10 @@ export default {
|
|||||||
|
|
||||||
const clickOk = (e) => {
|
const clickOk = (e) => {
|
||||||
state.clickNum = state.clickNum + 1
|
state.clickNum = state.clickNum + 1
|
||||||
if(state.clickNum==2) {
|
if (state.clickNum == 2) {
|
||||||
state.clickNum = 0
|
state.clickNum = 0
|
||||||
state.changeCondition = false;
|
state.changeCondition = false;
|
||||||
}else{
|
} else {
|
||||||
state.changeCondition = true;
|
state.changeCondition = true;
|
||||||
}
|
}
|
||||||
console.log(e)
|
console.log(e)
|
||||||
@@ -560,18 +559,16 @@ export default {
|
|||||||
|
|
||||||
const panelOpen = (e) => {
|
const panelOpen = (e) => {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
if(!e){
|
if (!e) {
|
||||||
state.clickNum = 0
|
state.clickNum = 0
|
||||||
state.changeCondition = false;
|
state.changeCondition = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const disabledDate1 = (current) => {
|
const disabledDate1 = (current) => {
|
||||||
// return current && current < dayjs().startOf("day");
|
if (state.changeCondition) {
|
||||||
console.log(state.projectInfo.rangeTime1)
|
|
||||||
if(state.changeCondition){
|
|
||||||
return current && current < moment(state.projectInfo.rangeTime[0]).endOf("YYYY-MM-DD HH:mm:ss");
|
return current && current < moment(state.projectInfo.rangeTime[0]).endOf("YYYY-MM-DD HH:mm:ss");
|
||||||
}else{
|
} else {
|
||||||
return current && current > moment(state.projectInfo.rangeTime1[0]).endOf("YYYY-MM-DD HH:mm:ss")
|
return current && current > moment(state.projectInfo.rangeTime1[0]).endOf("YYYY-MM-DD HH:mm:ss")
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -603,6 +600,7 @@ export default {
|
|||||||
.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner::after {
|
.ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner::after {
|
||||||
border-color: #fff !important;
|
border-color: #fff !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-checkbox-disabled .ant-checkbox-inner {
|
.ant-checkbox-disabled .ant-checkbox-inner {
|
||||||
background-color: #1890ff !important;
|
background-color: #1890ff !important;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user