no message
Showing
2 changed files
with
29 additions
and
1 deletions
| ... | @@ -9,6 +9,14 @@ export function getCourseList(data) { | ... | @@ -9,6 +9,14 @@ export function getCourseList(data) { |
| 9 | }) | 9 | }) |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | // 同步数据至阿里云vod | ||
| 13 | export function sync() { | ||
| 14 | return request({ | ||
| 15 | url: '/system/oss/sync/', | ||
| 16 | method: 'get' | ||
| 17 | }) | ||
| 18 | } | ||
| 19 | |||
| 12 | // 新增 | 20 | // 新增 |
| 13 | export function addCourse(data) { | 21 | export function addCourse(data) { |
| 14 | return request({ | 22 | return request({ | ... | ... |
| ... | @@ -23,6 +23,9 @@ | ... | @@ -23,6 +23,9 @@ |
| 23 | <el-form-item label=""> | 23 | <el-form-item label=""> |
| 24 | <el-button type="primary" icon="Search" @click="btn_search">查询</el-button> | 24 | <el-button type="primary" icon="Search" @click="btn_search">查询</el-button> |
| 25 | </el-form-item> | 25 | </el-form-item> |
| 26 | <el-form-item label=""> | ||
| 27 | <el-button type="primary" icon="Search" @click="btn_sync">同步</el-button> | ||
| 28 | </el-form-item> | ||
| 26 | </el-form> | 29 | </el-form> |
| 27 | <!-- 列表操作 --> | 30 | <!-- 列表操作 --> |
| 28 | <el-col :span="1.5"> | 31 | <el-col :span="1.5"> |
| ... | @@ -199,7 +202,7 @@ | ... | @@ -199,7 +202,7 @@ |
| 199 | <script setup name="ruleManager"> | 202 | <script setup name="ruleManager"> |
| 200 | import { useTableHeight } from '@/hooks/useTableHeight' | 203 | import { useTableHeight } from '@/hooks/useTableHeight' |
| 201 | // 导入api接口 | 204 | // 导入api接口 |
| 202 | import { getCourseList, addCourse, editCourse, delCourse, displayCourse, batchDisplayCourse, hideCourse, batchHideCourse } from '@/api/legao/course' | 205 | import { getCourseList, addCourse, editCourse, delCourse, displayCourse, batchDisplayCourse, hideCourse, batchHideCourse, sync } from '@/api/legao/course' |
| 203 | import { getEntiretyists } from '@/api/legao/kit' | 206 | import { getEntiretyists } from '@/api/legao/kit' |
| 204 | import { reactive, toRefs } from 'vue'; | 207 | import { reactive, toRefs } from 'vue'; |
| 205 | const { windowSize } = useTableHeight('max-height') | 208 | const { windowSize } = useTableHeight('max-height') |
| ... | @@ -274,6 +277,18 @@ function getList () { | ... | @@ -274,6 +277,18 @@ function getList () { |
| 274 | }) | 277 | }) |
| 275 | } | 278 | } |
| 276 | 279 | ||
| 280 | // 同步数据至阿里云vod | ||
| 281 | function syncFile () { | ||
| 282 | status.loading = true | ||
| 283 | |||
| 284 | sync() | ||
| 285 | .then((res) => { | ||
| 286 | }) | ||
| 287 | .finally(() => { | ||
| 288 | status.loading = false | ||
| 289 | }) | ||
| 290 | } | ||
| 291 | |||
| 277 | // 系列 | 292 | // 系列 |
| 278 | function getBlockLists () { | 293 | function getBlockLists () { |
| 279 | getEntiretyists().then((res) => { | 294 | getEntiretyists().then((res) => { |
| ... | @@ -287,6 +302,11 @@ function btn_search () { | ... | @@ -287,6 +302,11 @@ function btn_search () { |
| 287 | getList() | 302 | getList() |
| 288 | } | 303 | } |
| 289 | 304 | ||
| 305 | // 同步 | ||
| 306 | function btn_sync () { | ||
| 307 | syncFile() | ||
| 308 | } | ||
| 309 | |||
| 290 | // 单条编辑 | 310 | // 单条编辑 |
| 291 | function handleEdit (row) { | 311 | function handleEdit (row) { |
| 292 | getBlockLists() | 312 | getBlockLists() | ... | ... |
-
Please register or sign in to post a comment