mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 03:16:44 +08:00
修改逻辑
This commit is contained in:
@@ -191,7 +191,7 @@
|
|||||||
v-model:name="item.teacherName"
|
v-model:name="item.teacherName"
|
||||||
:disabled="editBeginClass"
|
:disabled="editBeginClass"
|
||||||
></ProjectManager>
|
></ProjectManager>
|
||||||
<a-input-number :min="0" :max="100" @change="inputWeightChange(index)" v-model:value="item.weight" placeholder="%"/>
|
<a-input-number :min="0" @change="inputWeightChange(index)" v-model:value="item.weight" placeholder="%"/>
|
||||||
<span style="margin-top: 10px;width: 34px;">权重</span>
|
<span style="margin-top: 10px;width: 34px;">权重</span>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<a-button shape="circle" class="btn-circle btn-add" @click="inputAdd">+</a-button>
|
<a-button shape="circle" class="btn-circle btn-add" @click="inputAdd">+</a-button>
|
||||||
@@ -640,6 +640,7 @@ function inputWeightChange(index) {
|
|||||||
totalWeight += Number(item.weight);
|
totalWeight += Number(item.weight);
|
||||||
});
|
});
|
||||||
if (totalWeight > 100) {
|
if (totalWeight > 100) {
|
||||||
|
message.info('权重值最大为100%')
|
||||||
formData.value.offteachers[index].weight -= totalWeight - 100;
|
formData.value.offteachers[index].weight -= totalWeight - 100;
|
||||||
totalWeight = 100;
|
totalWeight = 100;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1037,7 +1037,7 @@
|
|||||||
v-model:name="item.teacherName"
|
v-model:name="item.teacherName"
|
||||||
:disabled="editBeginClass"
|
:disabled="editBeginClass"
|
||||||
></ProjectManager>
|
></ProjectManager>
|
||||||
<a-input-number :min="0" :max="100" @change="inputWeightChange(index)" v-model:value="item.weight" placeholder="%"/>
|
<a-input-number :min="0" @change="inputWeightChange(index)" v-model:value="item.weight" placeholder="%"/>
|
||||||
<span style="margin-top: 10px;width: 34px;">权重</span>
|
<span style="margin-top: 10px;width: 34px;">权重</span>
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<a-button shape="circle" class="btn-circle btn-add" @click="inputAdd">+</a-button>
|
<a-button shape="circle" class="btn-circle btn-add" @click="inputAdd">+</a-button>
|
||||||
@@ -2958,6 +2958,7 @@ function onFocusEnd(){
|
|||||||
totalWeight += Number(item.weight);
|
totalWeight += Number(item.weight);
|
||||||
});
|
});
|
||||||
if (totalWeight > 100) {
|
if (totalWeight > 100) {
|
||||||
|
message.info("权重值最大为100%");
|
||||||
state.offteachers[index].weight -= totalWeight - 100;
|
state.offteachers[index].weight -= totalWeight - 100;
|
||||||
totalWeight = 100;
|
totalWeight = 100;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -631,6 +631,7 @@ const submitStorage = async () => {
|
|||||||
content: '该项目已经发布,修改后如未点击暂存当前操作未保存数据将丢失,确认保存?',
|
content: '该项目已经发布,修改后如未点击暂存当前操作未保存数据将丢失,确认保存?',
|
||||||
ok: async () => {
|
ok: async () => {
|
||||||
confirmLoading.value = true
|
confirmLoading.value = true
|
||||||
|
request(PROJECT_DETAIL_MODIFY, projectInfo.value)
|
||||||
await request(PROJECT_RELEASE, {projectId: route.query.projectId})
|
await request(PROJECT_RELEASE, {projectId: route.query.projectId})
|
||||||
message.success("保存成功");
|
message.success("保存成功");
|
||||||
confirmLoading.value = false;
|
confirmLoading.value = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user