mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-06 17:36:44 +08:00
feat: 增加错误置顶提示
This commit is contained in:
@@ -160,30 +160,17 @@
|
||||
</template>
|
||||
|
||||
<script lang="jsx">
|
||||
import {
|
||||
reactive,
|
||||
toRefs,
|
||||
defineComponent,
|
||||
computed,
|
||||
ref,
|
||||
onMounted
|
||||
} from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import { message } from "ant-design-vue";
|
||||
import {computed, defineComponent, onMounted, reactive, toRefs} from "vue";
|
||||
import {useStore} from "vuex";
|
||||
import {message} from "ant-design-vue";
|
||||
import dialog from "@/utils/dialog";
|
||||
import "@wangeditor/editor/dist/css/style.css";
|
||||
import {
|
||||
getExquisiteCoursePage,
|
||||
getExquisiteYearList,
|
||||
getMark,
|
||||
getToTop,
|
||||
getToTopSort,
|
||||
getExport
|
||||
} from "@/api/indexCourse";
|
||||
import {getExquisiteCoursePage, getExquisiteYearList, getMark, getToTop, getToTopSort} from "@/api/indexCourse";
|
||||
import * as moment from "moment";
|
||||
import downLoad from "../../utils/downLoad";
|
||||
import Cookies from "vue-cookies";
|
||||
import axios from "axios";
|
||||
import {ElNotification} from 'element-plus'
|
||||
|
||||
export default defineComponent({
|
||||
components: {},
|
||||
@@ -345,19 +332,33 @@ export default defineComponent({
|
||||
return (
|
||||
<a-input
|
||||
value={text || ''}
|
||||
style={{ width: '60px' }}
|
||||
onBlur={() => {
|
||||
style={{width: '60px'}}
|
||||
onBlur={async () => {
|
||||
// 失去焦点时取消编辑状态
|
||||
record.editingTopOrder = false;
|
||||
try {
|
||||
// 这里应该调用实际的API接口
|
||||
let res = getToTopSort({ courseId: record.courseId, qualityTopSort: record.qualityTopSort });
|
||||
if (res.data.data.status == 200) {
|
||||
let res = await getToTopSort({
|
||||
courseId: record.courseId,
|
||||
qualityTopSort: record.qualityTopSort
|
||||
});
|
||||
const {status, message} = res.data.data
|
||||
if (status === 200) {
|
||||
message.success(res.data.data.message);
|
||||
// 重新加载数据
|
||||
// getTableDate();
|
||||
} else if (status === 500) {
|
||||
ElNotification({
|
||||
title: "更改置顶顺序错误",
|
||||
message,
|
||||
type: "error"
|
||||
})
|
||||
} else {
|
||||
message.error(res.data.data.message);
|
||||
ElNotification({
|
||||
title: "错误",
|
||||
message,
|
||||
type: "error"
|
||||
})
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user