diff --git a/ruoyi-ui/src/components/BoardTopNav/index.vue b/ruoyi-ui/src/components/BoardTopNav/index.vue index d95da41..db6e49c 100644 --- a/ruoyi-ui/src/components/BoardTopNav/index.vue +++ b/ruoyi-ui/src/components/BoardTopNav/index.vue @@ -17,7 +17,7 @@
+ :command="{router:i.router,name:i.sceneName,sceneId:i.sceneId,sceneModeId:i.sceneModeId,sceneField:i.sceneField}"> {{ i.sceneName @@ -178,9 +178,14 @@ export default { }, async dropdownLink(e,) { this.nowMenu = '2' - await this.$store.dispatch('app/setSceneId', e.sceneId) - this.name = e.name - await this.$router.replace({path: "/board/" + (e.router || 'smartScene'), query: {name: e.name}}); + console.log(e) + if(e.sceneModeId === 100){ + await this.$router.replace({path: "/board/sceneView" , query: {id: e.sceneField}}); + }else{ + await this.$store.dispatch('app/setSceneId', e.sceneId) + this.name = e.name + await this.$router.replace({path: "/board/" + (e.router || 'smartScene'), query: {name: e.name}}); + } }, toIndex() { this.$router.replace({path: "/index"}); diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index 8994fe2..528ebf0 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -32,6 +32,7 @@ import BoardIndex from '@/layout/boardIndex1.vue' // 公共路由 export const constantRoutes = [ + {path: '/sceneView', component: () => import('@/views/sceneView/index.vue')}, { path: '/map', component: BoardIndex, diff --git a/ruoyi-ui/src/views/sceneView/index.vue b/ruoyi-ui/src/views/sceneView/index.vue index da65745..dbe5180 100644 --- a/ruoyi-ui/src/views/sceneView/index.vue +++ b/ruoyi-ui/src/views/sceneView/index.vue @@ -3,7 +3,7 @@
-
@@ -65,7 +65,12 @@ export default { } } } - console.log(this.pageData) + if (pageCfg.sizeType === 3) { + this.pageData = { + width: null, + height: null, + } + } }) }, methods: {} diff --git a/ruoyi-ui/src/views/system/layoutEdit.vue b/ruoyi-ui/src/views/system/layoutEdit.vue index 64754f4..7b98220 100644 --- a/ruoyi-ui/src/views/system/layoutEdit.vue +++ b/ruoyi-ui/src/views/system/layoutEdit.vue @@ -14,17 +14,17 @@ 新增 + v-if="false" + prop="achieveId"> + prop="achieveName" + label="名称"> @@ -40,19 +40,19 @@ + fixed="right" + label="操作" + width="260"> @@ -60,22 +60,22 @@
+ style="display: flex;justify-content: flex-end;" + @size-change="getList" + @current-change="getList" + :current-page.sync="queryForm.pageNum" + :page-sizes="[10,20,50,100]" + :page-size="queryForm.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="total">
+ :title="sceneDialogTitle" + :visible.sync="addSceneDialogVisible" + width="30%"> @@ -85,7 +85,8 @@
-
+
@@ -100,12 +101,13 @@ + title="选择模版" + :visible.sync="selectModelDialogVisible" + width="700px">
-
+
@@ -122,15 +124,15 @@
+ hide-on-single-page + style="display: flex;justify-content: center;" + @size-change="getModelList" + @current-change="getModelList" + :current-page.sync="modelPagination.pageNum" + :page-sizes="[10,20,50,100]" + :page-size="modelPagination.pageSize" + layout="total, sizes, prev, pager, next, jumper" + :total="total"> 取 消 @@ -139,10 +141,10 @@ + title="绑定组件" + :visible.sync="bindComponentsDialogVisible" + fullscreen + width="600px">
绑定组件 @@ -169,6 +171,7 @@ 固定宽高 固定比例 + 撑满容器 @@ -183,13 +186,13 @@ + :show-file-list="false" + :on-success="getImg"> @@ -207,39 +210,41 @@ - + :key="tag" + v-for="(tag,k) in (pageCfg.styleData||{}).colors" + closable + :disable-transitions="false" + @close="colorsClose(tag)"> + + class="input-new-tag" + v-if="inputVisible" + v-model="inputValue" + ref="saveTagInput" + size="small" + @change="colorsInputConfirm"> 添加颜色 - + :key="tag" + v-for="(tag,k) in (pageCfg.styleData||{}).colors1" + closable + :disable-transitions="false" + @close="colorsClose1(tag)"> + + class="input-new-tag" + v-if="inputVisible1" + v-model="inputValue1" + ref="saveTagInput1" + size="small" + @change="colorsInputConfirm1"> 添加颜色 @@ -296,9 +301,9 @@ export default { pageCfgDialogVisible: false, pageCfg: { styleData: { - colors:[], - colors1:[], - region:'' + colors: [], + colors1: [], + region: '' } }, colors: [], @@ -332,7 +337,7 @@ export default { colorsInputConfirm() { let inputValue = this.inputValue; if (inputValue) { - this.$detectingNullValues(this.pageCfg, ['styleData', 'colors',0]) + this.$detectingNullValues(this.pageCfg, ['styleData', 'colors', 0]) this.pageCfg.styleData.colors.push(inputValue); this.colors.push(inputValue); } @@ -342,7 +347,7 @@ export default { colorsInputConfirm1() { let inputValue = this.inputValue1; if (inputValue) { - this.$detectingNullValues(this.pageCfg, ['styleData', 'colors1',0]) + this.$detectingNullValues(this.pageCfg, ['styleData', 'colors1', 0]) this.pageCfg.styleData.colors1.push(inputValue); this.colors1.push(inputValue); } @@ -453,17 +458,18 @@ export default { ...e, sceneData: JSON.parse(e.achieveContent) } - this.pageCfg = this.bindComponentsData.sceneData.pageCfg || {} - if (!this.pageCfg.styleData?.colors) { - this.$set(this.pageCfg.styleData, 'colors', []) - } - if (!this.pageCfg.styleData?.colors1) { - this.$set(this.pageCfg.styleData, 'colors1', []) - } - if (!this.pageCfg.styleData?.region) { - this.$set(this.pageCfg.styleData, 'region', '') - } + console.log('csssss', JSON.parse(e.achieveContent)) this.$nextTick(() => { + this.pageCfg = this.bindComponentsData.sceneData.pageCfg || {} + if (!this.pageCfg.styleData?.colors) { + this.$set(this.pageCfg.styleData, 'colors', []) + } + if (!this.pageCfg.styleData?.colors1) { + this.$set(this.pageCfg.styleData, 'colors1', []) + } + if (!this.pageCfg.styleData?.region) { + this.$set(this.pageCfg.styleData, 'region', '') + } this.colors = JSON.parse(JSON.stringify(this.pageCfg.styleData.colors || '[]')) this.colors1 = JSON.parse(JSON.stringify(this.pageCfg.styleData.colors1 || '[]')) @@ -490,6 +496,12 @@ export default { } } } + if (this.pageCfg.sizeType === 3) { + this.pageData = { + width: null, + height: null, + } + } }) }, bindComponentsOk() { @@ -533,6 +545,12 @@ export default { } } } + if (this.pageCfg.sizeType === 3) { + this.pageData = { + width: null, + height: null, + } + } this.bindComponentsData.sceneData.pageCfg = this.pageCfg this.pageCfgDialogVisible = false }, @@ -540,7 +558,7 @@ export default { this.$set(this.pageCfg, 'bg', file.data.url.replaceAll('127.0.0.1', '10.11.40.122')) }, viewDetails(e) { - this.$router.push({path: '/board/sceneView', query: {achieveId: e.achieveId}}) + this.$router.push({path: '/sceneView', query: {achieveId: e.achieveId}}) } } } @@ -580,6 +598,8 @@ export default { .layout { height: 500px; border: 1px solid #0003; + background-repeat: no-repeat; + background-size: 100% 100%; } .miniLayout { @@ -617,6 +637,8 @@ export default { height: 200px; border: 1px solid #0003; vertical-align: top; + background-repeat: no-repeat; + background-size: 100% 100%; } .modelListItemName { @@ -638,12 +660,15 @@ export default { width: 100%; height: calc(100vh - 70px - 70px - 60px - 6px); position: relative; + overflow: auto; .scene { position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); + left: 0%; + top: 0%; + //left: 50%; + //top: 50%; + //transform: translate(-50%, -50%); border: 1px solid #0003; background-repeat: no-repeat; background-size: 100% 100%; diff --git a/ruoyi-ui/src/views/system/layoutModel.vue b/ruoyi-ui/src/views/system/layoutModel.vue index 8d9574e..3c4a120 100644 --- a/ruoyi-ui/src/views/system/layoutModel.vue +++ b/ruoyi-ui/src/views/system/layoutModel.vue @@ -14,20 +14,20 @@ 新增 + v-if="false" + prop="templateId"> + prop="templateName" + label="名称"> + label="缩略图">