|
@@ -41,14 +41,7 @@
|
|
|
>
|
|
|
修改
|
|
|
</a-button>
|
|
|
- <a-button
|
|
|
- class="ml-2"
|
|
|
- type="primary"
|
|
|
- :disabled="state.overWorkloadNumberStatus === 1"
|
|
|
- @click="handelStatus"
|
|
|
- >
|
|
|
- 锁定
|
|
|
- </a-button>
|
|
|
+ <a-button class="ml-2" type="primary" @click="handelStatus"> 锁定 </a-button>
|
|
|
</div>
|
|
|
</Descriptions.Item>
|
|
|
</Descriptions>
|
|
@@ -190,8 +183,11 @@
|
|
|
const handelStatus = async () => {
|
|
|
try {
|
|
|
setModalProps({ loading: true, confirmLoading: true });
|
|
|
- await postClassTimeStatisticsOverWorkloadNumberStatus({ id: unref(modelRef).id, status: 1 });
|
|
|
- state.overWorkloadNumberStatus = 1;
|
|
|
+ await postClassTimeStatisticsOverWorkloadNumberStatus({
|
|
|
+ id: unref(modelRef).id,
|
|
|
+ status: state.overWorkloadNumberStatus !== 1 ? 1 : 0,
|
|
|
+ });
|
|
|
+ state.overWorkloadNumberStatus = state.overWorkloadNumberStatus !== 1 ? 1 : 0;
|
|
|
createMessage.success('锁定成功');
|
|
|
} catch {
|
|
|
createMessage.error('锁定失败');
|