diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js index 6b3c53cf8..c955a87b6 100644 --- a/ruoyi-ui/src/main.js +++ b/ruoyi-ui/src/main.js @@ -18,7 +18,7 @@ import './assets/icons' // icon import './permission' // permission control import { getDicts } from "@/api/system/dict/data"; import { getConfigKey } from "@/api/system/config"; -import { parseTime, resetForm, addDateRange, selectDictLabel, download, handleTree } from "@/utils/ruoyi"; +import { parseTime, resetForm, addDateRange, selectDictLabel,selectMoeDictLabel, download, handleTree } from "@/utils/ruoyi"; import Pagination from "@/components/Pagination"; import Video from 'video.js' @@ -32,6 +32,7 @@ Vue.prototype.parseTime = parseTime Vue.prototype.resetForm = resetForm Vue.prototype.addDateRange = addDateRange Vue.prototype.selectDictLabel = selectDictLabel +Vue.prototype.selectMoeDictLabel = selectMoeDictLabel Vue.prototype.download = download Vue.prototype.handleTree = handleTree diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index dc18b9122..bbf4fb2ed 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -77,6 +77,18 @@ export function selectDictLabel(datas, value) { return actions.join(''); } +// 回显数据字典 +export function selectMoeDictLabel(datas, value) { + var actions = []; + Object.keys(datas).map((key) => { + if (datas[key].id == ('' + value)) { + actions.push(datas[key].name); + return false; + } + }) + return actions.join(''); +} + // 通用下载方法 export function download(fileName) { window.location.href = baseURL + "/common/download?fileName=" + encodeURI(fileName) + "&delete=" + true; diff --git a/ruoyi-ui/src/views/benyi_train/video/index.vue b/ruoyi-ui/src/views/benyi_train/video/index.vue index f5410f2cf..edfc3ff38 100644 --- a/ruoyi-ui/src/views/benyi_train/video/index.vue +++ b/ruoyi-ui/src/views/benyi_train/video/index.vue @@ -1,6 +1,15 @@