mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 21:36:44 +08:00
feat:修改面授等
This commit is contained in:
@@ -96,11 +96,42 @@
|
||||
</a-drawer>
|
||||
<a-button @click="openDrawer" type="link"><slot></slot></a-button>
|
||||
</div>
|
||||
|
||||
<!-- 删除弹窗 -->
|
||||
<a-modal
|
||||
v-model:visible="deleteModalVisible"
|
||||
:footer="null"
|
||||
wrapClassName="deleteModal1"
|
||||
centered="true"
|
||||
>
|
||||
<div class="delete">
|
||||
<div class="del_header"></div>
|
||||
<div class="del_main">
|
||||
<div class="header">
|
||||
<div class="icon"></div>
|
||||
<span>提示</span>
|
||||
<div class="close_exit" @click="closeSameModal"></div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span>确定删除?</span>
|
||||
<span style="margin-top: 20px">数据删除后不可恢复!</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1" @click="closeSameModal">
|
||||
<div class="btnText">取消</div>
|
||||
</div>
|
||||
<div class="del_btn btn2" @click="sureSameModal">
|
||||
<div class="btnText">确定</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
</template>
|
||||
<script setup>
|
||||
import {
|
||||
computed,
|
||||
createVNode,
|
||||
// createVNode,
|
||||
defineProps,
|
||||
defineExpose,
|
||||
ref,
|
||||
@@ -109,8 +140,8 @@ import {
|
||||
import { usePage } from "@/api/request";
|
||||
import { STUDENT_LIST } from "@/api/apis";
|
||||
import { delStudentList } from "@/api/index1";
|
||||
import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||
import { Modal } from "ant-design-vue";
|
||||
// import { ExclamationCircleOutlined } from "@ant-design/icons-vue";
|
||||
// import { Modal } from "ant-design-vue";
|
||||
|
||||
const props = defineProps({
|
||||
type: Number,
|
||||
@@ -220,23 +251,42 @@ function search() {
|
||||
searchParams.value.studentName = searchName.value;
|
||||
searchParams.value.pageNo = 1;
|
||||
}
|
||||
|
||||
const deleteModalVisible = ref(false);
|
||||
const deleteId = ref(null);
|
||||
function del(id) {
|
||||
Modal.confirm({
|
||||
title: () => "确定删除?",
|
||||
icon: () => createVNode(ExclamationCircleOutlined),
|
||||
content: () => "数据删除后不可恢复!",
|
||||
okText: () => "确定",
|
||||
okType: "danger",
|
||||
cancelText: () => "取消",
|
||||
onOk() {
|
||||
if (id) {
|
||||
loading.value = true;
|
||||
delStudentList({ ids: [id] }).then(() => searchStu());
|
||||
}
|
||||
},
|
||||
});
|
||||
deleteModalVisible.value = true;
|
||||
deleteId.value = id;
|
||||
// Modal.confirm({
|
||||
// title: () => "确定删除?",
|
||||
// icon: () => createVNode(ExclamationCircleOutlined),
|
||||
// content: () => "数据删除后不可恢复!",
|
||||
// okText: () => "确定",
|
||||
// okType: "danger",
|
||||
// cancelText: () => "取消",
|
||||
// onOk() {
|
||||
// if (id) {
|
||||
// loading.value = true;
|
||||
// delStudentList({ ids: [id] }).then(() => searchStu());
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
}
|
||||
|
||||
//确定删除
|
||||
const sureSameModal = () => {
|
||||
if (deleteId.value) {
|
||||
loading.value = true;
|
||||
delStudentList({ ids: [deleteId.value] }).then(() => searchStu());
|
||||
deleteModalVisible.value = false;
|
||||
}
|
||||
};
|
||||
//取消
|
||||
const closeSameModal = () => {
|
||||
deleteModalVisible.value = false;
|
||||
deleteId.value = null;
|
||||
};
|
||||
|
||||
const closeDrawer = () => {
|
||||
visiable.value = false;
|
||||
};
|
||||
@@ -511,4 +561,133 @@ defineExpose({
|
||||
}
|
||||
}
|
||||
}
|
||||
.deleteModal1 {
|
||||
.ant-modal {
|
||||
width: 424px !important;
|
||||
height: 258px !important;
|
||||
|
||||
.ant-modal-content {
|
||||
width: 424px !important;
|
||||
height: 258px !important;
|
||||
|
||||
.ant-modal-body {
|
||||
width: 424px !important;
|
||||
height: 258px !important;
|
||||
padding: 0 !important;
|
||||
|
||||
.delete {
|
||||
z-index: 999;
|
||||
width: 424px;
|
||||
height: 258px;
|
||||
background: #ffffff;
|
||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
|
||||
border-radius: 4px;
|
||||
|
||||
// position: absolute;
|
||||
// left: 50%;
|
||||
// top: 10%;
|
||||
// transform: translate(-50%, -50%);
|
||||
.del_header {
|
||||
position: absolute;
|
||||
width: calc(100%);
|
||||
height: 68px;
|
||||
background: linear-gradient(
|
||||
rgba(78, 166, 255, 0.2) 0%,
|
||||
rgba(78, 166, 255, 0) 100%
|
||||
);
|
||||
}
|
||||
|
||||
.del_main {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-top: 20px;
|
||||
padding-left: 26px;
|
||||
font-size: 16px;
|
||||
|
||||
.icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 10px;
|
||||
background-image: url(@/assets/images/taskpage/gan.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
|
||||
.close_exit {
|
||||
position: absolute;
|
||||
right: 42px;
|
||||
cursor: pointer;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-image: url(@/assets/images/coursewareManage/close.png);
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.body {
|
||||
width: 100%;
|
||||
margin: 34px auto 56px auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
// background-color: red;
|
||||
position: relative;
|
||||
|
||||
.back {
|
||||
position: absolute;
|
||||
top: 30px;
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
|
||||
.del_btnbox {
|
||||
display: flex;
|
||||
margin: 30px auto;
|
||||
justify-content: center;
|
||||
|
||||
.del_btn {
|
||||
width: 100px;
|
||||
height: 40px;
|
||||
background: rgba(64, 158, 255, 0);
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
|
||||
.btnText {
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.btn1 {
|
||||
border: 1px solid rgba(64, 158, 255, 1);
|
||||
color: #4ea6ff;
|
||||
margin-right: 14px;
|
||||
}
|
||||
|
||||
.btn2 {
|
||||
background-color: #4ea6ff;
|
||||
color: #ffffff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-modal-close-x {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user