myDialog组件重写

This commit is contained in:
jakcic 2021-12-21 11:59:37 +08:00
parent 1407e7f782
commit 1f2b7958a5
25 changed files with 867 additions and 713 deletions

4
ruoyi-ui/.babelrc Normal file
View File

@ -0,0 +1,4 @@
{
"presets":["@babel/preset-env"],
"plugins":["transform-vue-jsx"]
}

View File

@ -6,10 +6,10 @@ ENV = 'production'
# 若依管理系统/生产环境
# VUE_APP_BASE_API = 'prod-api'
VUE_APP_BASE_API = 'http://192.168.1.183:8080'
VUE_APP_BASE_API = 'http://172.17.172.240:8080'
# 图片上传接口
VUE_APP_IMAGE_API = 'http://192.168.1.183:8080/system/visualImage/upload'
VUE_APP_IMAGE_API = 'http://172.17.172.240:8080/system/visualImage/upload'
# 图片上传文件夹
VUE_APP_IMAGE_PATH ='http://192.168.1.183:8080/profile/images/'
VUE_APP_IMAGE_PATH ='http://172.17.172.240:8080/profile/images/'

View File

@ -7,4 +7,6 @@ public
# 忽略当前目录下为js的文件的语法检查
*.js
# 忽略当前目录下为vue的文件的语法检查
*.vue
*.vue
*.babelrc

View File

@ -1,7 +1,8 @@
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
'@vue/cli-plugin-babel/preset'
'@vue/cli-plugin-babel/preset',
// '@vue/babel-preset-jsx'
],
'env': {
'development': {
@ -9,5 +10,5 @@ module.exports = {
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
'plugins': ['dynamic-import-node']
}
}
},
}

View File

@ -36,7 +36,10 @@
"url": "https://gitee.com/y_project/RuoYi-Vue.git"
},
"dependencies": {
"@babel/preset-env": "^7.16.5",
"@riophae/vue-treeselect": "0.4.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.2.1",
"@vue/babel-preset-jsx": "^1.2.4",
"axios": "0.21.0",
"clipboard": "2.0.6",
"codemirror": "^5.63.3",
@ -49,6 +52,7 @@
"js-beautify": "1.13.0",
"js-cookie": "2.2.1",
"jsencrypt": "3.0.0-rc.1",
"lodash": "^4.17.21",
"mockjs": "^1.1.0",
"nprogress": "0.2.0",
"quill": "1.3.7",
@ -68,6 +72,11 @@
"@vue/cli-plugin-eslint": "4.4.6",
"@vue/cli-service": "4.4.6",
"babel-eslint": "10.1.0",
"babel-helper-vue-jsx-merge-props": "^2.0.3",
"babel-plugin-jsx-v-model": "^2.0.3",
"babel-plugin-syntax-jsx": "^6.18.0",
"babel-plugin-transform-vue-jsx": "^3.7.0",
"babel-preset-env": "^1.7.0",
"chalk": "4.1.0",
"connect": "3.6.6",
"echarts": "^4.9.0",

View File

@ -13,4 +13,4 @@ export default {
}
// export const url = 'https://data.bladex.vip/blade-visual'
// export const url = 'http://localhost:8080/avue/api'
export const url = 'http://192.168.1.183:8080/avue/api'
export const url = 'http://172.17.172.240:8080/avue/api'

View File

@ -1,9 +1,9 @@
<script>
export default {
data() {
data () {
return {};
},
render() {
render (h) {
const { $route: { meta: { link } }, } = this;
if ({ link }.link === "") {
return "404";

View File

@ -6,6 +6,7 @@ import './assets/styles/element-variables.scss'
import '@/assets/styles/index.scss' // global css
import '@/assets/styles/ruoyi.scss' // ruoyi css
import '@/styles/style.scss'
import App from './App'
import store from './store'
import router from './router'
@ -15,9 +16,20 @@ import plugins from './plugins' // plugins
import '@/mock/'
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 {
getDicts
} from "@/api/system/dict/data";
import {
getConfigKey
} from "@/api/system/config";
import {
parseTime,
resetForm,
addDateRange,
selectDictLabel,
selectDictLabels,
handleTree
} from "@/utils/ruoyi";
// 分页组件
import Pagination from "@/components/Pagination";
// 自定义表格工具组件
@ -81,14 +93,16 @@ Vue.config.productionTip = false
//注册自定义组件
import '@/components/'
import { url } from '@/config'
import {
url
} from '@/config'
import 'element-ui/lib/theme-chalk/index.css';
Vue.prototype.url = url;
// import '@/theme/index.js'
// import './styles/common.scss'
// Vue.prototype.$echarts = echarts
import panoramaProcess from "@/utils/panoramaProcess"
import panoramaProcess from "@/utils/panoramaProcess"
Vue.prototype.panoramaProcess = panoramaProcess;
import echarts from 'echarts'

View File

@ -1,20 +1,24 @@
// 查看页面和编辑页面公用的参数和方法
import common from '@/config'
import { config } from '@/option/config'
import {
config
} from '@/option/config'
import container from '@/page/group/container'
import { getList } from '@/api/map'
import {
getList
} from '@/api/map'
export default {
components: {
container
},
props:['id','panoramaId'],
provide () {
props: ['id', 'panoramaId'],
provide() {
return {
main: this,
contain: this
};
},
data () {
data() {
return {
DIC: {
MAP: []
@ -31,7 +35,7 @@ export default {
}
},
computed: {
list () {
list() {
let result = [];
//循环处理数据
const detail = (item) => {
@ -53,7 +57,7 @@ export default {
return result
}
},
created () {
created() {
this.initDic();
this.handleCheckExpire()
},
@ -62,7 +66,7 @@ export default {
},
methods: {
//初始化字典
initDic () {
initDic() {
getList({
pageNum: 1,
pageSize: 100,
@ -76,7 +80,7 @@ export default {
});
})
},
findnav (id, type) {
findnav(id, type) {
//循环处理数据
let obj = undefined;
let count = 0;
@ -110,26 +114,26 @@ export default {
parent
}
},
findlist (index) {
findlist(index) {
return this.list.find(ele => ele.index == index) || {}
},
handleInitActive () {
handleInitActive() {
this.active = []
},
handleMouseDown () {
handleMouseDown() {
this.handleInitActive();
},
handleCheckExpire(){
handleCheckExpire() {
this.timer = setInterval(() => {
setTimeout(() => {
checkExpire(this.id,this.panoramaId).then(res=>{
checkExpire(this.id, this.panoramaId).then(res => {
console.log('权限正常')
}).catch(err=>{
}).catch(err => {
alert('您的权限已过期')
window.close()
})
}, 0)
}, 1000*60*60)
}, 10000 * 60 * 60)
}
}
}

View File

@ -75,7 +75,8 @@
:data="main.activeOption.column"
@row-save="rowSave"
@row-del="rowDel"
@row-update="rowUpdate">
@row-update="rowUpdate"
class="test">
<template slot="menu"
slot-scope="{row,index,size,type}">
<el-button @click="trigger(index)"
@ -207,18 +208,6 @@ export default {
this.allTriggerVisible = true;
},
// rowSaveTrigger (row, done) {
// console.log(this.main.activeOption.triggerColumn);
// this.main.activeOption.triggerColumn.push(row);
// done()
// },
// rowDelTrigger (row, index) {
// this.main.activeOption.triggerColumn.splice(index, 1);
// },
// rowUpdateTrigger (row, index, done) {
// this.main.activeOption.triggerColumn.splice(index, 1, row);
// done()
// },
rowSave (row, done) {
console.log(this.main.activeOption.column);
this.main.activeOption.column.push(row);
@ -234,37 +223,4 @@ export default {
}
}
</script>
<style scoped>
el-dialog__body {
background: #141d4d;
}
.el-table__cell {
background-color: #1d1f26 !important;
color: #bcc8d4 !important;
}
.el-dialog__body {
background-color: #1d1f26;
color: #bcc8d4;
}
.el-dialog__header {
background-color: #1d1f26;
color: #bcc8d4;
}
.avue-dialog .el-dialog__title,
.avue-dialog .el-drawer__header {
color: #bcc8d4;
}
.avue-form__group--flex {
background-color: #1d1f26;
color: #bcc8d4;
}
.avue-dialog__footer {
margin-top: 10px;
}
.test {
background-color: #1d1f26;
color: #bcc8d4;
}
</style>
<style>

View File

@ -12,19 +12,22 @@
:style="styleName"
id="container"
ref="container">
<showPanoramaInScreen v-if="handleShowPanorama()" ref="showThumbs">
<showPanoramaInScreen v-if="handleShowPanorama()"
ref="showThumbs">
</showPanoramaInScreen>
<myDialog></myDialog>
<div id="snece-container" v-if="show()">
<div id="snece-container"
v-if="show()">
<div style="text-align:center">
<div style="display:inline-block;width: 100px; height: 100px;margin-right: 20px;" v-for="(thumb,index) in thumbs" :key="index">
<div style="display:inline-block;width: 100px; height: 100px;margin-right: 20px;"
v-for="(thumb,index) in thumbs"
:key="index">
<!-- 这里index为什么不报错 -->
<el-image
@click="handleChangePanorama(thumb.index)"
style="cursor: pointer;"
:src="thumb.thumb"
:fit="fits[0]">
<el-image @click="handleChangePanorama(thumb.index)"
style="cursor: pointer;"
:src="thumb.thumb"
:fit="fits[0]">
</el-image>
</div>
</div>
@ -48,7 +51,7 @@ import common from '@/config'
import { getObj } from '@/api/visual'
import jq from 'jquery';
import showPanoramaInScreen from "@/page/group/showPanoramaInScreen";
import {getPanorama} from "@/api/system/panorama";
import { getPanorama } from "@/api/system/panorama";
import myDialog from "@/page/group/myDialog";
export default {
name: 'contents',
@ -70,11 +73,11 @@ export default {
selectCount: {},
scale: 1,
gradeFlag: false,
dialog_visible:false,
panorama_visible:false,
thumbs:[],
dialog_visible: false,
panorama_visible: false,
thumbs: [],
fits: ['fill', 'contain', 'cover', 'none', 'scale-down'],
ans:0,
ans: 0,
}
},
computed: {
@ -90,16 +93,8 @@ export default {
width: this.setPx(this.contain.config.width),
height: this.setPx(this.contain.config.height),
backgroundColor: this.contain.config.backgroundColor,
'transform-origin': '0 0',
},
// (() => {
// if (this.contain.config.backgroundImage) {
// return {
// background: `url(${this.contain.config.backgroundImage}) 0% 0% / 100% 100% rgb(3, 12, 59)`,
// }
// }
// return
// })()
'transform-origin': '0 0',
},
)
},
gradeLenStyle () {
@ -112,35 +107,36 @@ export default {
this.showThumbs();
this.initData();
this.initFun();
console.log(this.contain, 'contain')
// this.hidePanorama();
},
methods: {
handleChangePanorama(index){
handleChangePanorama (index) {
// console.log(index);
this.$refs.showThumbs.changePanorama(index);
},
show(){
show () {
const id = this.$route.params.panoramaId;
if(id==="null") return false;
if (id === "null") return false;
return true;
},
async showThumbs(){
async showThumbs () {
const id = this.$route.params.panoramaId;
if(id==="null") return false;
if (id === "null") return false;
// console.log(id);
await getPanorama(id).then(response => {
// console.log(response);
this.formDB=response.data;
this.formDB = response.data;
});
this.message=JSON.parse(this.formDB.component) || [];
var objects=JSON.parse(this.formDB.component) || [];
this.message = JSON.parse(this.formDB.component) || [];
var objects = JSON.parse(this.formDB.component) || [];
// console.log("json");
// console.log(objects);
//
for(var obj of objects) {
for (var obj of objects) {
if (obj.type === "scene") {
// console.log("");
obj["index"] = this.ans;
@ -157,12 +153,12 @@ export default {
this[ele] = this.$refs.subgroup[ele]
});
},
hidePanorama(){
// block
let canvas = jq('canvas');
// console.log(canvas);
canvas.css({"display":"none"});
},
hidePanorama () {
// block
let canvas = jq('canvas');
// console.log(canvas);
canvas.css({ "display": "none" });
},
//
initData () {
@ -318,11 +314,11 @@ export default {
}
})
},
handleShowPanorama(){
const id=this.$route.params.panoramaId;
handleShowPanorama () {
const id = this.$route.params.panoramaId;
// console.log(id);
// console.log("");
if(id==="null") return false;
if (id === "null") return false;
else return true;
}
@ -331,7 +327,7 @@ export default {
</script>
<style scoped>
#snece-container{
#snece-container {
position: absolute;
bottom: 4rem;
border-radius: 0px;
@ -339,8 +335,7 @@ export default {
background: rgba(39, 39, 39, 0.25);
box-shadow: 0 3px 14px rgb(128 128 128 / 50%);
width: 100%;
height:130px;
height: 130px;
background-repeat: repeat-x;
}
</style>

File diff suppressed because one or more lines are too long

View File

@ -41,18 +41,18 @@
</template>
<script>
import { ref } from 'vue'
import { ref } from 'vue'
import { addUrlParam } from '@/utils/utils'
import myDialog from '@/page/group/myDialog'
import common from '@/config'
import showPanoramaInScreen from "@/page/group/showPanoramaInScreen";
import {globalBus} from "./globalBus.js"
import { globalBus } from "./globalBus.js"
export default {
name: 'subgroup',
inject: ["contain", 'container'],
components: {
myDialog:myDialog
myDialog: myDialog
},
provide () {
return {
@ -74,18 +74,16 @@ export default {
}
},
methods: {
showDialog(url){
globalBus.$emit("show",url);
showDialog (url) {
globalBus.$emit("show", url);
},
rotation(){
rotation () {
globalBus.$emit("rotation");
},
music(){
music () {
globalBus.$emit("music");
},
fullscreen()
{
fullscreen () {
globalBus.$emit("fullscreen");
},
@ -105,7 +103,7 @@ export default {
if (typeof str == "string") {
try {
return JSON.parse(str);
} catch {
} catch {
return {}
}
}

View File

@ -1,6 +1,8 @@
import Vue from 'vue'
import Router from 'vue-router'
import {checkExpire} from '@/api/system/repo'
import {
checkExpire
} from '@/api/system/repo'
Vue.use(Router)
@ -28,17 +30,14 @@ import Layout from '@/layout'
*/
// 公共路由
export const constantRoutes = [
{
export const constantRoutes = [{
path: '/redirect',
component: Layout,
hidden: true,
children: [
{
path: '/redirect/:path(.*)',
component: (resolve) => require(['@/views/redirect'], resolve)
}
]
children: [{
path: '/redirect/:path(.*)',
component: (resolve) => require(['@/views/redirect'], resolve)
}]
},
{
path: '/login',
@ -64,95 +63,103 @@ export const constantRoutes = [
path: '',
component: Layout,
redirect: 'index',
children: [
{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: 'Index',
meta: { title: '首页', icon: 'dashboard', affix: true }
children: [{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: 'Index',
meta: {
title: '首页',
icon: 'dashboard',
affix: true
}
]
}]
},
{
path: '/user',
component: Layout,
hidden: true,
redirect: 'noredirect',
children: [
{
path: 'profile',
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
name: 'Profile',
meta: { title: '个人中心', icon: 'user' }
children: [{
path: 'profile',
component: (resolve) => require(['@/views/system/user/profile/index'], resolve),
name: 'Profile',
meta: {
title: '个人中心',
icon: 'user'
}
]
}]
},
{
path: '/system/user-auth',
component: Layout,
hidden: true,
children: [
{
path: 'role/:userId(\\d+)',
component: (resolve) => require(['@/views/system/user/authRole'], resolve),
name: 'AuthRole',
meta: { title: '分配角色', activeMenu: '/system/user'}
children: [{
path: 'role/:userId(\\d+)',
component: (resolve) => require(['@/views/system/user/authRole'], resolve),
name: 'AuthRole',
meta: {
title: '分配角色',
activeMenu: '/system/user'
}
]
}]
},
{
path: '/system/role-auth',
component: Layout,
hidden: true,
children: [
{
path: 'user/:roleId(\\d+)',
component: (resolve) => require(['@/views/system/role/authUser'], resolve),
name: 'AuthUser',
meta: { title: '分配用户', activeMenu: '/system/role'}
children: [{
path: 'user/:roleId(\\d+)',
component: (resolve) => require(['@/views/system/role/authUser'], resolve),
name: 'AuthUser',
meta: {
title: '分配用户',
activeMenu: '/system/role'
}
]
}]
},
{
path: '/system/dict-data',
component: Layout,
hidden: true,
children: [
{
path: 'index/:dictId(\\d+)',
component: (resolve) => require(['@/views/system/dict/data'], resolve),
name: 'Data',
meta: { title: '字典数据', activeMenu: '/system/dict'}
children: [{
path: 'index/:dictId(\\d+)',
component: (resolve) => require(['@/views/system/dict/data'], resolve),
name: 'Data',
meta: {
title: '字典数据',
activeMenu: '/system/dict'
}
]
}]
},
{
path: '/monitor/job-log',
component: Layout,
hidden: true,
children: [
{
path: 'index',
component: (resolve) => require(['@/views/monitor/job/log'], resolve),
name: 'JobLog',
meta: { title: '调度日志', activeMenu: '/monitor/job'}
children: [{
path: 'index',
component: (resolve) => require(['@/views/monitor/job/log'], resolve),
name: 'JobLog',
meta: {
title: '调度日志',
activeMenu: '/monitor/job'
}
]
}]
},
{
path: '/tool/gen-edit',
component: Layout,
hidden: true,
children: [
{
path: 'index',
component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
name: 'GenEdit',
meta: { title: '修改生成配置', activeMenu: '/tool/gen'}
children: [{
path: 'index',
component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
name: 'GenEdit',
meta: {
title: '修改生成配置',
activeMenu: '/tool/gen'
}
]
}]
},
{
{
path: '/',
name: '列表页',
component: () =>
@ -165,9 +172,8 @@ export const constantRoutes = [
}, {
path: '/view/:id/:panoramaId',
name: 'view',
component: () =>
import( /* webpackChunkName: "page" */ '@/views/screen/page/view'),
props:true
component: () => import( /* webpackChunkName: "page" */ '@/views/screen/page/view'),
props: true
},
{
path: '/editpanorama/:id',
@ -185,6 +191,8 @@ export const constantRoutes = [
export default new Router({
// mode: 'history', // 去掉url中的#
scrollBehavior: () => ({ y: 0 }),
scrollBehavior: () => ({
y: 0
}),
routes: constantRoutes
})

View File

@ -312,4 +312,4 @@
.middle{
overflow: inherit;
}
}
}

View File

@ -0,0 +1,10 @@
export function formatDate(timeStamp) {
let date = new Date(timeStamp);
let YY = date.getFullYear() + '-';
let MM = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let DD = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
let hh = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
let mm = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
let ss = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
return YY + MM + DD + " " + hh + mm + ss;
}

View File

@ -574,349 +574,24 @@ export default {
}
}
</script>
<style lang="scss">
.build {
position: relative;
width: 100%;
height: 100%;
.app {
width: 100%;
height: calc(100% - 45px);
display: flex;
box-sizing: border-box;
}
.selectall {
position: absolute;
border: 1px dotted #409eff;
z-index: 10000;
}
.icon {
font-size: 20px;
margin-right: 10px;
}
.selectbg {
width: 100%;
height: 100%;
position: absolute;
z-index: 9999;
}
.selectflag {
width: 100%;
height: 100%;
position: absolute;
z-index: 9999;
cursor: move;
}
.el-menu--horizontal .el-menu .el-menu-item,
.el-menu--horizontal .el-menu .el-submenu__title {
font-size: 12px;
}
.menu {
width: 180px;
height: 100%;
overflow: hidden;
overflow-y: auto;
color: #bcc8d4;
background: #1d1f26;
}
.menu__list {
padding-left: 10px;
box-sizing: border-box;
}
.menu__item--folder {
display: flex;
align-items: center;
padding: 6px 6px;
color: #bcc9d4;
font-size: 12px;
input {
border: none;
outline: none;
}
.icon-folder {
font-size: 16px;
margin-right: 5px;
}
.icon-fold {
font-size: 12px;
margin-right: 10px;
transform: rotate(90deg);
display: inline-block;
font-weight: bold;
&.is-active {
transform: rotate(180deg);
}
}
&.is-active {
color: #fff;
background: rgba(143, 225, 255, 0.1);
}
&:hover {
color: #fff;
background: rgba(143, 225, 255, 0.1);
cursor: pointer;
}
}
.menu__folder {
&.ghost {
opacity: 0.6;
color: #fff;
background: #409eff !important;
cursor: move;
}
}
.menu__item {
margin-bottom: 1px;
width: 100%;
box-sizing: border-box;
display: flex;
align-items: center;
height: 48px;
padding: 0 6px;
position: relative;
background: #1b1f25;
cursor: pointer;
flex: none;
font-size: 12px;
&.is-over,
&:hover {
color: #fff;
background: rgba(143, 225, 255, 0.1);
cursor: pointer;
}
&.ghost {
opacity: 0.6;
color: #fff;
background: #409eff !important;
cursor: move;
}
&.is-active {
background: #409eff !important;
color: #373d41 !important;
}
}
.menu__icon {
color: #409eff;
margin-right: 10px;
width: 53px;
height: 30px;
line-height: 30px;
text-align: center;
display: block;
border: 1px solid #3a4659;
background: #282a30;
}
.top {
padding: 10px 20px;
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 9999;
background-color: rgba(255, 255, 255, 0.4);
}
.middle {
background-color: #2a2d32;
flex: 1;
position: relative;
height: 100%;
overflow: auto;
}
.wrapper {
position: relative;
padding: 60px 0 0 0;
box-sizing: border-box;
width: 100%;
position: relative;
box-sizing: border-box;
}
.content {
transform-origin: 0 0;
background-color: #333;
position: relative;
box-sizing: border-box;
}
.footer__menu {
padding-top: 8px;
margin-right: 370px;
float: right;
width: 300px;
}
.app--none {
padding: 0;
height: 100%;
}
.app--none .wrapper {
position: relative;
padding: 0;
width: 100%;
}
.app--none .content {
width: 100%;
height: 100%;
border: none;
}
.container {
user-select: none;
transform-origin: 0 0;
position: relative;
}
.grade {
width: 100%;
height: 100%;
background-size: 30px 30px, 30px 30px;
background-image: linear-gradient(
rgba(255, 255, 255, 0.1) 1px,
transparent 0px
),
linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 0px);
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.wrapper__grade {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
background: url(https://img.alicdn.com/tfs/TB184VLcPfguuRjSspkXXXchpXa-14-14.png)
repeat;
}
.title {
padding: 0 20px;
box-sizing: border-box;
margin-bottom: 10px;
line-height: 35px;
height: 35px;
text-align: center;
font-size: 13px;
letter-spacing: 2px;
text-indent: 2px;
background-color: #2d343c;
color: #fff;
&--left {
text-align: left;
}
}
.params {
width: 350px;
}
.tabs {
margin-top: -10px;
box-sizing: border-box;
}
.tabs .el-input-number {
width: 100%;
}
.tabs .el-tabs__header {
background: #27343e;
margin: 0 0 2px;
}
.tabs i {
color: #bcc9d4;
font-size: 14px;
}
.tabs .is-active i {
color: #409eff;
}
.tabs .el-tabs__nav-wrap::after {
background: #27343e;
}
.tabs .el-tabs__item {
padding: 0;
box-sizing: border-box;
}
.tabs .el-tabs__active-bar {
top: 0;
}
.el-collapse-item__header {
padding-left: 30px;
}
.el-switch__core {
width: 35px;
height: 16px;
}
.el-switch {
height: 10px;
line-height: 10px;
}
.el-switch__core:after {
top: -1px;
width: 16px;
height: 16px;
}
.el-slider__button-wrapper {
top: -17px;
}
.el-slider__button {
border-radius: 0;
width: 8px;
height: 8px;
border-width: 1px;
}
.el-slider__bar,
.el-slider__runway {
height: 2px;
}
.imgList {
height: 350px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
.imgList img {
width: 100px;
height: 100px;
margin: 20px 10px;
}
.el-input-number__decrease,
.el-input-number__increase {
background: transparent;
}
<style lang="css" scoped>
>>> .el-table__cell {
background-color: #1d1f26 !important;
color: #bcc8d4 !important;
}
.views {
.wrapper {
padding: 0;
}
.middle {
overflow: inherit;
}
>>> .el-dialog__body {
background-color: #1d1f26;
color: #bcc8d4;
}
>>> .el-dialog__header {
background-color: #1d1f26;
color: #bcc8d4;
}
>>> .avue-form__group--flex {
background-color: #1d1f26;
color: #bcc8d4;
}
>>> .avue-dialog__footer {
margin-top: 10px;
}
// .el-table__cell {
// background-color: #1d1f26 !important;
// color: #bcc8d4 !important;
// }
// .el-dialog__body {
// background-color: #1d1f26;
// color: #bcc8d4;
// }
// .el-dialog__header {
// background-color: #1d1f26;
// color: #bcc8d4;
// }
// .avue-dialog .el-dialog__title,
// .avue-dialog .el-drawer__header {
// color: #bcc8d4;
// }
// .avue-form__group--flex {
// background-color: #1d1f26;
// color: #bcc8d4;
// }
// .avue-dialog__footer {
// margin-top: 10px;
// }
// .test {
// background-color: #1d1f26;
// color: #bcc8d4;
// }
</style>

View File

@ -33,6 +33,7 @@
</template>
<script>
import _ from 'lodash'
import { uuid } from '@/utils/utils'
export default {
name: 'contentmenu',
@ -137,7 +138,7 @@ export default {
const params = this.contain.findnav(this.contain.active[0], true);
this.contain.active.forEach(ele => {
const item = this.contain.findnav(ele, true);
const obj = this.deepClone(item.obj);
const obj = _.cloneDeep(item.obj);
obj.index = uuid();
params.parent.push(obj)
});

View File

@ -22,7 +22,7 @@ module.exports = {
// 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)
assetsDir: 'static',
// 是否开启eslint保存检测有效值ture | false | 'error'
lintOnSave: process.env.NODE_ENV === 'development',
lintOnSave: false,
// 如果你不需要生产环境的 source map可以将其设置为 false 以加速生产环境构建。
productionSourceMap: false,
// webpack-dev-server 相关配置
@ -78,7 +78,7 @@ module.exports = {
.plugin('ScriptExtHtmlWebpackPlugin')
.after('html')
.use('script-ext-html-webpack-plugin', [{
// `runtime` must same as runtimeChunk name. default is `runtime`
// `runtime` must same as runtimeChunk name. default is `runtime`
inline: /runtime\..*\.js$/
}])
.end()
@ -106,10 +106,9 @@ module.exports = {
}
}
})
config.optimization.runtimeChunk('single'),
{
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: './' //到根目录下
config.optimization.runtimeChunk('single'), {
from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
to: './' //到根目录下
}
}
)

View File

@ -0,0 +1,103 @@
package com.ruoyi.system.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.system.domain.FactorIcon;
import com.ruoyi.system.service.IFactorIconService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 因子图标Controller
*
* @author ruoyi
* @date 2021-12-17
*/
@RestController
@RequestMapping("/system/icon")
public class FactorIconController extends BaseController
{
@Autowired
private IFactorIconService factorIconService;
/**
* 查询因子图标列表
*/
@PreAuthorize("@ss.hasPermi('system:icon:list')")
@GetMapping("/list")
public TableDataInfo list(FactorIcon factorIcon)
{
startPage();
List<FactorIcon> list = factorIconService.selectFactorIconList(factorIcon);
return getDataTable(list);
}
/**
* 导出因子图标列表
*/
@PreAuthorize("@ss.hasPermi('system:icon:export')")
@Log(title = "因子图标", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(FactorIcon factorIcon)
{
List<FactorIcon> list = factorIconService.selectFactorIconList(factorIcon);
ExcelUtil<FactorIcon> util = new ExcelUtil<FactorIcon>(FactorIcon.class);
return util.exportExcel(list, "因子图标数据");
}
/**
* 获取因子图标详细信息
*/
@PreAuthorize("@ss.hasPermi('system:icon:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(factorIconService.selectFactorIconById(id));
}
/**
* 新增因子图标
*/
@PreAuthorize("@ss.hasPermi('system:icon:add')")
@Log(title = "因子图标", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody FactorIcon factorIcon)
{
return toAjax(factorIconService.insertFactorIcon(factorIcon));
}
/**
* 修改因子图标
*/
@PreAuthorize("@ss.hasPermi('system:icon:edit')")
@Log(title = "因子图标", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody FactorIcon factorIcon)
{
return toAjax(factorIconService.updateFactorIcon(factorIcon));
}
/**
* 删除因子图标
*/
@PreAuthorize("@ss.hasPermi('system:icon:remove')")
@Log(title = "因子图标", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(factorIconService.deleteFactorIconByIds(ids));
}
}

View File

@ -0,0 +1,79 @@
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 因子图标对象 factor_icon
*
* @author ruoyi
* @date 2021-12-17
*/
public class FactorIcon extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 名称 */
@Excel(name = "名称")
private String name;
/** 类型 */
@Excel(name = "类型")
private Long type;
/** 图片 */
@Excel(name = "图片")
private String icon;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setName(String name)
{
this.name = name;
}
public String getName()
{
return name;
}
public void setType(Long type)
{
this.type = type;
}
public Long getType()
{
return type;
}
public void setIcon(String icon)
{
this.icon = icon;
}
public String getIcon()
{
return icon;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("type", getType())
.append("icon", getIcon())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.FactorIcon;
/**
* 因子图标Mapper接口
*
* @author ruoyi
* @date 2021-12-17
*/
public interface FactorIconMapper
{
/**
* 查询因子图标
*
* @param id 因子图标主键
* @return 因子图标
*/
public FactorIcon selectFactorIconById(Long id);
/**
* 查询因子图标列表
*
* @param factorIcon 因子图标
* @return 因子图标集合
*/
public List<FactorIcon> selectFactorIconList(FactorIcon factorIcon);
/**
* 新增因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
public int insertFactorIcon(FactorIcon factorIcon);
/**
* 修改因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
public int updateFactorIcon(FactorIcon factorIcon);
/**
* 删除因子图标
*
* @param id 因子图标主键
* @return 结果
*/
public int deleteFactorIconById(Long id);
/**
* 批量删除因子图标
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteFactorIconByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.FactorIcon;
/**
* 因子图标Service接口
*
* @author ruoyi
* @date 2021-12-17
*/
public interface IFactorIconService
{
/**
* 查询因子图标
*
* @param id 因子图标主键
* @return 因子图标
*/
public FactorIcon selectFactorIconById(Long id);
/**
* 查询因子图标列表
*
* @param factorIcon 因子图标
* @return 因子图标集合
*/
public List<FactorIcon> selectFactorIconList(FactorIcon factorIcon);
/**
* 新增因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
public int insertFactorIcon(FactorIcon factorIcon);
/**
* 修改因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
public int updateFactorIcon(FactorIcon factorIcon);
/**
* 批量删除因子图标
*
* @param ids 需要删除的因子图标主键集合
* @return 结果
*/
public int deleteFactorIconByIds(Long[] ids);
/**
* 删除因子图标信息
*
* @param id 因子图标主键
* @return 结果
*/
public int deleteFactorIconById(Long id);
}

View File

@ -0,0 +1,93 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.FactorIconMapper;
import com.ruoyi.system.domain.FactorIcon;
import com.ruoyi.system.service.IFactorIconService;
/**
* 因子图标Service业务层处理
*
* @author ruoyi
* @date 2021-12-17
*/
@Service
public class FactorIconServiceImpl implements IFactorIconService
{
@Autowired
private FactorIconMapper factorIconMapper;
/**
* 查询因子图标
*
* @param id 因子图标主键
* @return 因子图标
*/
@Override
public FactorIcon selectFactorIconById(Long id)
{
return factorIconMapper.selectFactorIconById(id);
}
/**
* 查询因子图标列表
*
* @param factorIcon 因子图标
* @return 因子图标
*/
@Override
public List<FactorIcon> selectFactorIconList(FactorIcon factorIcon)
{
return factorIconMapper.selectFactorIconList(factorIcon);
}
/**
* 新增因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
@Override
public int insertFactorIcon(FactorIcon factorIcon)
{
return factorIconMapper.insertFactorIcon(factorIcon);
}
/**
* 修改因子图标
*
* @param factorIcon 因子图标
* @return 结果
*/
@Override
public int updateFactorIcon(FactorIcon factorIcon)
{
return factorIconMapper.updateFactorIcon(factorIcon);
}
/**
* 批量删除因子图标
*
* @param ids 需要删除的因子图标主键
* @return 结果
*/
@Override
public int deleteFactorIconByIds(Long[] ids)
{
return factorIconMapper.deleteFactorIconByIds(ids);
}
/**
* 删除因子图标信息
*
* @param id 因子图标主键
* @return 结果
*/
@Override
public int deleteFactorIconById(Long id)
{
return factorIconMapper.deleteFactorIconById(id);
}
}

View File

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.FactorIconMapper">
<resultMap type="FactorIcon" id="FactorIconResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="type" column="type" />
<result property="icon" column="icon" />
</resultMap>
<sql id="selectFactorIconVo">
select id, name, type, icon from factor_icon
</sql>
<select id="selectFactorIconList" parameterType="FactorIcon" resultMap="FactorIconResult">
<include refid="selectFactorIconVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="type != null "> and type = #{type}</if>
<if test="icon != null and icon != ''"> and icon = #{icon}</if>
</where>
</select>
<select id="selectFactorIconById" parameterType="Long" resultMap="FactorIconResult">
<include refid="selectFactorIconVo"/>
where id = #{id}
</select>
<insert id="insertFactorIcon" parameterType="FactorIcon" useGeneratedKeys="true" keyProperty="id">
insert into factor_icon
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">name,</if>
<if test="type != null">type,</if>
<if test="icon != null">icon,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">#{name},</if>
<if test="type != null">#{type},</if>
<if test="icon != null">#{icon},</if>
</trim>
</insert>
<update id="updateFactorIcon" parameterType="FactorIcon">
update factor_icon
<trim prefix="SET" suffixOverrides=",">
<if test="name != null">name = #{name},</if>
<if test="type != null">type = #{type},</if>
<if test="icon != null">icon = #{icon},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteFactorIconById" parameterType="Long">
delete from factor_icon where id = #{id}
</delete>
<delete id="deleteFactorIconByIds" parameterType="String">
delete from factor_icon where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>