From b0cb6631bced0411468b6fa289c362b3973e3fb7 Mon Sep 17 00:00:00 2001 From: blak-kong <546598185@qq.com> Date: Wed, 10 Jan 2024 12:19:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BB=AA=E5=99=A8=EF=BC=9A?= =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E5=9B=BE=E7=89=87=E6=88=96=E8=A7=86=E9=A2=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flossom-ui/package.json | 2 + flossom-ui/src/api/upload.js | 11 + .../src/components/ImagePreview/index.vue | 4 +- .../src/components/VideoPreview/index.vue | 129 + flossom-ui/src/main.js | 112 +- .../src/views/system/instrument/index.vue | 2125 ++++++++++------- flossom-ui/vue.config.js | 7 +- 7 files changed, 1496 insertions(+), 894 deletions(-) create mode 100644 flossom-ui/src/api/upload.js create mode 100644 flossom-ui/src/components/VideoPreview/index.vue diff --git a/flossom-ui/package.json b/flossom-ui/package.json index 5324c46..9a1075e 100644 --- a/flossom-ui/package.json +++ b/flossom-ui/package.json @@ -61,6 +61,7 @@ "vue-cropper": "0.5.5", "vue-meta": "2.4.0", "vue-router": "3.4.9", + "vue-video-player": "^4.0.6", "vuedraggable": "2.24.3", "vuex": "3.6.0" }, @@ -75,6 +76,7 @@ "connect": "3.6.6", "eslint": "7.15.0", "eslint-plugin-vue": "7.2.0", + "less-loader": "^5.0.0", "lint-staged": "10.5.3", "runjs": "4.4.2", "sass": "1.32.13", diff --git a/flossom-ui/src/api/upload.js b/flossom-ui/src/api/upload.js new file mode 100644 index 0000000..22003e2 --- /dev/null +++ b/flossom-ui/src/api/upload.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + + +// 文件上传 +export function upload(data) { + return request({ + url: "/file/upload", + method: 'post', + data: data + }) +} \ No newline at end of file diff --git a/flossom-ui/src/components/ImagePreview/index.vue b/flossom-ui/src/components/ImagePreview/index.vue index 2fa02d7..c3b5bae 100644 --- a/flossom-ui/src/components/ImagePreview/index.vue +++ b/flossom-ui/src/components/ImagePreview/index.vue @@ -21,11 +21,11 @@ export default { }, width: { type: [Number, String], - default: "" + default: "80px" }, height: { type: [Number, String], - default: "" + default: "80px" } }, computed: { diff --git a/flossom-ui/src/components/VideoPreview/index.vue b/flossom-ui/src/components/VideoPreview/index.vue new file mode 100644 index 0000000..5dca5bb --- /dev/null +++ b/flossom-ui/src/components/VideoPreview/index.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/flossom-ui/src/main.js b/flossom-ui/src/main.js index 13c6cf2..205ab09 100644 --- a/flossom-ui/src/main.js +++ b/flossom-ui/src/main.js @@ -1,67 +1,81 @@ -import Vue from 'vue' +import Vue from "vue"; -import Cookies from 'js-cookie' +import Cookies from "js-cookie"; -import Element from 'element-ui' -import './assets/styles/element-variables.scss' +import Element from "element-ui"; +import "./assets/styles/element-variables.scss"; -import '@/assets/styles/index.scss' // global css -import '@/assets/styles/ruoyi.scss' // ruoyi css -import App from './App' -import store from './store' -import router from './router' -import directive from './directive' // directive -import plugins from './plugins' // plugins -import { download } from '@/utils/request' +import "@/assets/styles/index.scss"; // global css +import "@/assets/styles/ruoyi.scss"; // ruoyi css +import App from "./App"; +import store from "./store"; +import router from "./router"; +import directive from "./directive"; // directive +import plugins from "./plugins"; // plugins +import { download } from "@/utils/request"; -import './assets/icons' // icon -import './permission' // permission control +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, selectDictLabels, handleTree } from "@/utils/ruoyi"; +import { + parseTime, + resetForm, + addDateRange, + selectDictLabel, + selectDictLabels, + handleTree, +} from "@/utils/ruoyi"; // 分页组件 import Pagination from "@/components/Pagination"; // 自定义表格工具组件 -import RightToolbar from "@/components/RightToolbar" +import RightToolbar from "@/components/RightToolbar"; // 富文本组件 -import Editor from "@/components/Editor" +import Editor from "@/components/Editor"; // 文件上传组件 -import FileUpload from "@/components/FileUpload" +import FileUpload from "@/components/FileUpload"; // 图片上传组件 -import ImageUpload from "@/components/ImageUpload" +import ImageUpload from "@/components/ImageUpload"; // 图片预览组件 -import ImagePreview from "@/components/ImagePreview" +import ImagePreview from "@/components/ImagePreview"; // 字典标签组件 -import DictTag from '@/components/DictTag' +import DictTag from "@/components/DictTag"; // 头部标签组件 -import VueMeta from 'vue-meta' +import VueMeta from "vue-meta"; // 字典数据组件 -import DictData from '@/components/DictData' +import DictData from "@/components/DictData"; +// 视频播放器 +import VideoPlayer from "vue-video-player"; + +// 视频组件 +import VideoPreview from "@/components/VideoPreview"; // 全局方法挂载 -Vue.prototype.getDicts = getDicts -Vue.prototype.getConfigKey = getConfigKey -Vue.prototype.parseTime = parseTime -Vue.prototype.resetForm = resetForm -Vue.prototype.addDateRange = addDateRange -Vue.prototype.selectDictLabel = selectDictLabel -Vue.prototype.selectDictLabels = selectDictLabels -Vue.prototype.download = download -Vue.prototype.handleTree = handleTree +Vue.prototype.getDicts = getDicts; +Vue.prototype.getConfigKey = getConfigKey; +Vue.prototype.parseTime = parseTime; +Vue.prototype.resetForm = resetForm; +Vue.prototype.addDateRange = addDateRange; +Vue.prototype.selectDictLabel = selectDictLabel; +Vue.prototype.selectDictLabels = selectDictLabels; +Vue.prototype.download = download; +Vue.prototype.handleTree = handleTree; // 全局组件挂载 -Vue.component('DictTag', DictTag) -Vue.component('Pagination', Pagination) -Vue.component('RightToolbar', RightToolbar) -Vue.component('Editor', Editor) -Vue.component('FileUpload', FileUpload) -Vue.component('ImageUpload', ImageUpload) -Vue.component('ImagePreview', ImagePreview) +Vue.component("DictTag", DictTag); +Vue.component("Pagination", Pagination); +Vue.component("RightToolbar", RightToolbar); +Vue.component("Editor", Editor); +Vue.component("FileUpload", FileUpload); +Vue.component("ImageUpload", ImageUpload); +Vue.component("ImagePreview", ImagePreview); +Vue.component("VideoPreview", VideoPreview); -Vue.use(directive) -Vue.use(plugins) -Vue.use(VueMeta) -DictData.install() +Vue.use(directive); +Vue.use(plugins); +Vue.use(VueMeta); +Vue.use(VideoPlayer); +DictData.install(); /** * If you don't want to use mock-server @@ -73,14 +87,14 @@ DictData.install() */ Vue.use(Element, { - size: Cookies.get('size') || 'medium' // set element-ui default size -}) + size: Cookies.get("size") || "medium", // set element-ui default size +}); -Vue.config.productionTip = false +Vue.config.productionTip = false; new Vue({ - el: '#app', + el: "#app", router, store, - render: h => h(App) -}) + render: (h) => h(App), +}); diff --git a/flossom-ui/src/views/system/instrument/index.vue b/flossom-ui/src/views/system/instrument/index.vue index e51e292..8aa30e3 100644 --- a/flossom-ui/src/views/system/instrument/index.vue +++ b/flossom-ui/src/views/system/instrument/index.vue @@ -1,859 +1,1306 @@ diff --git a/flossom-ui/vue.config.js b/flossom-ui/vue.config.js index f86123f..c89e41a 100644 --- a/flossom-ui/vue.config.js +++ b/flossom-ui/vue.config.js @@ -13,7 +13,7 @@ const port = process.env.port || process.env.npm_config_port || 80; // 端口 function getTargetUrl() { if (process.env.NODE_ENV === "local") { - return "http://110.41.134.131:8080"; + return "http://110.41.134.131:8080"; // 纯前端代理地址 } else { return `http://localhost:8080`; } @@ -43,9 +43,8 @@ module.exports = { proxy: { // detail: https://cli.vuejs.org/config/#devserver-proxy [process.env.VUE_APP_BASE_API]: { - // target: `http://110.41.134.131:8080`, - target: `http://192.168.10.147:8080`, - + target: `http://110.41.134.131:8080`, + // target: `http://192.168.10.147:8080`, changeOrigin: true, pathRewrite: { ["^" + process.env.VUE_APP_BASE_API]: "",