Commit e01e240b0933bc8e0d1c79e0fde2bd1291386d2c
1 parent
9652d5c0
1、添加默认打包到BI位置 因为实际环境在html/BI下面
2、添加画板左右影藏,并且尺寸会左右变化。。。
Showing
4 changed files
with
91 additions
and
65 deletions
config/index.js
| ... | ... | @@ -7,7 +7,6 @@ const path = require('path') |
| 7 | 7 | module.exports = { |
| 8 | 8 | dev: { |
| 9 | 9 | // Paths |
| 10 | - //assetsSubDirectory: 'BI/static',//正式打包 因为nginx转发原因,需要指定路径 使用这个 | |
| 11 | 10 | assetsSubDirectory: 'static', |
| 12 | 11 | assetsPublicPath: '/', |
| 13 | 12 | proxyTable: {}, |
| ... | ... | @@ -59,7 +58,7 @@ module.exports = { |
| 59 | 58 | * then assetsPublicPath should be set to "/bar/". |
| 60 | 59 | * In most cases please use '/' !!! |
| 61 | 60 | */ |
| 62 | - assetsPublicPath: '/', | |
| 61 | + assetsPublicPath: '/BI/',//正式打包 因为nginx转发原因,需要指定路径 | |
| 63 | 62 | |
| 64 | 63 | /** |
| 65 | 64 | * Source Maps | ... | ... |
src/views/bigscreenDesigner/designer/index.vue
| ... | ... | @@ -62,16 +62,13 @@ |
| 62 | 62 | </el-tab-pane> |
| 63 | 63 | </el-tabs> |
| 64 | 64 | </div> |
| 65 | - | |
| 66 | - <div | |
| 67 | - class="layout-left-fold" | |
| 65 | + <!-- 是否显示左侧组件栏--> | |
| 66 | + <div class="layout-left-fold" | |
| 68 | 67 | :style="{ width: widthLeftForToolsHideButton + 'px' }" |
| 69 | - @click="toolIsShow = !toolIsShow" | |
| 70 | - > | |
| 71 | - <i class="el-icon-arrow-left" v-if="toolIsShow" /> | |
| 72 | - <i class="el-icon-arrow-right" v-if="!toolIsShow" /> | |
| 68 | + @click="toolIsShow = !toolIsShow"> | |
| 69 | + <i :class="[toolIsShow?' el-icon-arrow-left':'el-icon-arrow-right']"/> | |
| 73 | 70 | </div> |
| 74 | - | |
| 71 | + <!-- 上面操作导入、导出--> | |
| 75 | 72 | <div |
| 76 | 73 | class="layout-middle" |
| 77 | 74 | :style="{ width: middleWidth + 'px', height: middleHeight + 'px' }" |
| ... | ... | @@ -173,6 +170,7 @@ |
| 173 | 170 | </ul> |
| 174 | 171 | </span> |
| 175 | 172 | </div> |
| 173 | + <!-- 中间设计--> | |
| 176 | 174 | <div |
| 177 | 175 | class="workbench-container" |
| 178 | 176 | :style="{ |
| ... | ... | @@ -189,6 +187,14 @@ |
| 189 | 187 | :position="'relative'" |
| 190 | 188 | :is-scale-revise="true" |
| 191 | 189 | :visible.sync="dashboard.presetLineVisible" |
| 190 | + :style="{ | |
| 191 | + //如果想尺子不变化,单独定义遍历等于工作区域 | |
| 192 | + // width: bigscreenWidthRuler + 'px', | |
| 193 | + // height: bigscreenHeightRuler + 'px', | |
| 194 | + width: bigscreenWidthInWorkbench + 'px', | |
| 195 | + //高度尺子不变换,想变化放出来 | |
| 196 | + height: bigscreenHeightInWorkbench + 'px', | |
| 197 | + }" | |
| 192 | 198 | > |
| 193 | 199 | <div |
| 194 | 200 | id="workbench" |
| ... | ... | @@ -229,19 +235,19 @@ |
| 229 | 235 | </vue-ruler-tool> |
| 230 | 236 | </div> |
| 231 | 237 | </div> |
| 238 | + <!-- 右侧是否显示--> | |
| 232 | 239 | <div |
| 233 | 240 | class="layout-left-fold" |
| 234 | - :style="{ width: widthLeftForToolsHideButton + 'px' }" | |
| 235 | - @click="setupIsShow = !setupIsShow" | |
| 236 | - > | |
| 237 | - <i class="el-icon-arrow-left" v-if="!setupIsShow" /> | |
| 238 | - <i class="el-icon-arrow-right" v-if="setupIsShow" /> | |
| 241 | + :style="{ width: widthRightForToolsHideButton + 'px' }" | |
| 242 | + @click="setupIsShow = !setupIsShow"> | |
| 243 | + <i :class="[setupIsShow?' el-icon-arrow-right':'el-icon-arrow-left']"/> | |
| 239 | 244 | </div> |
| 245 | + <!-- 右侧配置--> | |
| 240 | 246 | <div class="layout-right" :style="{ width: widthLeftForOptions + 'px' }" v-if="setupIsShow"> |
| 241 | 247 | <el-tabs v-model="activeName" type="border-card" :stretch="true"> |
| 242 | 248 | <el-tab-pane |
| 243 | 249 | v-if=" |
| 244 | - isNotNull(widgetOptions.setup) || isNotNull(widgetOptions.collapse) | |
| 250 | + this.isNotNull(widgetOptions.setup) || this.isNotNull(widgetOptions.collapse) | |
| 245 | 251 | " |
| 246 | 252 | name="first" |
| 247 | 253 | label="配置" |
| ... | ... | @@ -253,7 +259,7 @@ |
| 253 | 259 | /> |
| 254 | 260 | </el-tab-pane> |
| 255 | 261 | <el-tab-pane |
| 256 | - v-if="isNotNull(widgetOptions.data)" | |
| 262 | + v-if="this.isNotNull(widgetOptions.data)" | |
| 257 | 263 | name="second" |
| 258 | 264 | label="数据" |
| 259 | 265 | > |
| ... | ... | @@ -264,7 +270,7 @@ |
| 264 | 270 | /> |
| 265 | 271 | </el-tab-pane> |
| 266 | 272 | <el-tab-pane |
| 267 | - v-if="isNotNull(widgetOptions.position)" | |
| 273 | + v-if="this.isNotNull(widgetOptions.position)" | |
| 268 | 274 | name="third" |
| 269 | 275 | label="坐标" |
| 270 | 276 | > |
| ... | ... | @@ -306,6 +312,7 @@ import contentMenu from "./components/contentMenu"; |
| 306 | 312 | import { getToken } from "@/utils/auth"; |
| 307 | 313 | import { Revoke } from "@/utils/revoke"; |
| 308 | 314 | import { mapMutations } from 'vuex'; |
| 315 | +import process from "process"; | |
| 309 | 316 | |
| 310 | 317 | export default { |
| 311 | 318 | name: "Login", |
| ... | ... | @@ -324,8 +331,9 @@ export default { |
| 324 | 331 | widgetTools: widgetTools, // 左侧工具栏的组件图标,将js变量加入到当前作用域 |
| 325 | 332 | widthLeftForTools: 200, // 左侧工具栏宽度 |
| 326 | 333 | widthLeftForToolsHideButton: 15, // 左侧工具栏折叠按钮宽度 |
| 334 | + widthRightForToolsHideButton: 15, // 右侧工具栏折叠按钮宽度 | |
| 327 | 335 | widthLeftForOptions: 300, // 右侧属性配置区 |
| 328 | - widthPaddingTools: 18, | |
| 336 | + widthPaddingTools: 18,//vueRuler | |
| 329 | 337 | toolIsShow: true, // 左侧工具栏是否显示 |
| 330 | 338 | setupIsShow: true, // 右侧配置是否显示 |
| 331 | 339 | bigscreenWidth: 1920, // 大屏设计的大小 |
| ... | ... | @@ -397,18 +405,12 @@ export default { |
| 397 | 405 | Authorization: getToken(), // 直接从本地获取token就行 |
| 398 | 406 | }; |
| 399 | 407 | }, |
| 400 | - // 左侧折叠切换时,动态计算中间区的宽度 | |
| 408 | + // 左侧、右侧折叠切换时,动态计算中间区的宽度 | |
| 401 | 409 | middleWidth() { |
| 402 | - let widthLeftAndRight = 0; | |
| 403 | - if (this.toolIsShow) { | |
| 404 | - widthLeftAndRight += this.widthLeftForTools; // 左侧工具栏宽度 | |
| 405 | - } | |
| 406 | - widthLeftAndRight += this.widthLeftForToolsHideButton; // 左侧工具栏折叠按钮宽度 | |
| 407 | - if (this.setupIsShow) { | |
| 408 | - widthLeftAndRight += this.widthLeftForOptions; // 右侧配置栏宽度 | |
| 410 | + if(!this.setupIsShow && !this.toolIsShow){ | |
| 411 | + return document.documentElement.clientWidth-this.widthPaddingTools; | |
| 409 | 412 | } |
| 410 | - let middleWidth = this.bodyWidth - widthLeftAndRight; | |
| 411 | - return middleWidth; | |
| 413 | + return this.bodyWidth - this.widthLeftAndRight(); | |
| 412 | 414 | }, |
| 413 | 415 | middleHeight() { |
| 414 | 416 | return this.bodyHeight; |
| ... | ... | @@ -433,6 +435,13 @@ export default { |
| 433 | 435 | this.getPXUnderScale(this.bigscreenHeight) + this.widthPaddingTools |
| 434 | 436 | ); |
| 435 | 437 | }, |
| 438 | + // 尺子的宽度高度 | |
| 439 | + // bigscreenWidthRuler() { | |
| 440 | + // return this.middleWidth; | |
| 441 | + // }, | |
| 442 | + // bigscreenHeightRuler() { | |
| 443 | + // return this.middleHeight; | |
| 444 | + // }, | |
| 436 | 445 | }, |
| 437 | 446 | watch: { |
| 438 | 447 | widgets: { |
| ... | ... | @@ -731,7 +740,20 @@ export default { |
| 731 | 740 | type: "error", |
| 732 | 741 | }); |
| 733 | 742 | }, |
| 734 | - | |
| 743 | + //中间区域减去的宽度 | |
| 744 | + widthLeftAndRight(){ | |
| 745 | + let widthLeftAndRight = 0; | |
| 746 | + if (this.toolIsShow) { | |
| 747 | + widthLeftAndRight += this.widthLeftForTools; // 左侧工具栏宽度 | |
| 748 | + widthLeftAndRight += this.widthLeftForToolsHideButton; // 左侧工具栏折叠按钮宽度 | |
| 749 | + } | |
| 750 | + if (this.setupIsShow) { | |
| 751 | + widthLeftAndRight += this.widthLeftForOptions; // 右侧配置栏宽度 | |
| 752 | + widthLeftAndRight += this.widthRightForToolsHideButton; // 右侧工具栏折叠按钮宽度 | |
| 753 | + } | |
| 754 | + // console.log("中间区域增加的宽度",widthLeftAndRight,this.setupIsShow,this.toolIsShow) | |
| 755 | + return widthLeftAndRight; | |
| 756 | + }, | |
| 735 | 757 | // 在缩放模式下的大小 |
| 736 | 758 | getPXUnderScale(px) { |
| 737 | 759 | return this.bigscreenScaleInWorkbench * px; |
| ... | ... | @@ -941,7 +963,7 @@ export default { |
| 941 | 963 | }); |
| 942 | 964 | this.widgetOptions.setup = newSetup; |
| 943 | 965 | } else if (key === 'data') { |
| 944 | - // 全局数据更改 | |
| 966 | + // 全局数据更改 | |
| 945 | 967 | this.dashboard.data=val; |
| 946 | 968 | let newData = new Array(); |
| 947 | 969 | const cloneVal = this.deepClone(val); |
| ... | ... | @@ -1155,7 +1177,7 @@ export default { |
| 1155 | 1177 | } |
| 1156 | 1178 | |
| 1157 | 1179 | .layout-middle { |
| 1158 | - // display: flex; | |
| 1180 | + //display: flex; | |
| 1159 | 1181 | position: relative; |
| 1160 | 1182 | //width: calc(100% - 445px); |
| 1161 | 1183 | height: 100%; |
| ... | ... | @@ -1242,8 +1264,8 @@ export default { |
| 1242 | 1264 | background-image: linear-gradient( |
| 1243 | 1265 | hsla(0, 0%, 100%, 0.1) 1px, |
| 1244 | 1266 | transparent 0 |
| 1245 | - ), | |
| 1246 | - linear-gradient(90deg, hsla(0, 0%, 100%, 0.1) 1px, transparent 0); | |
| 1267 | + ), | |
| 1268 | + linear-gradient(90deg, hsla(0, 0%, 100%, 0.1) 1px, transparent 0); | |
| 1247 | 1269 | // z-index: 2; |
| 1248 | 1270 | } |
| 1249 | 1271 | } |
| ... | ... | @@ -1372,7 +1394,7 @@ li { |
| 1372 | 1394 | float: left; |
| 1373 | 1395 | padding: 12px 30px; |
| 1374 | 1396 | color: #999; |
| 1375 | - font: bold 12px; | |
| 1397 | + font-bold: 12px; | |
| 1376 | 1398 | text-decoration: none; |
| 1377 | 1399 | } |
| 1378 | 1400 | |
| ... | ... | @@ -1526,23 +1548,44 @@ li { |
| 1526 | 1548 | padding: 0; |
| 1527 | 1549 | } |
| 1528 | 1550 | } |
| 1529 | -/* 设置滚动条的样式 */ | |
| 1530 | -::-webkit-scrollbar { | |
| 1551 | +///* 设置滚动条的样式 */ | |
| 1552 | +//::-webkit-scrollbar { | |
| 1553 | +// width: 0; | |
| 1554 | +//} | |
| 1555 | +// | |
| 1556 | +///* 滚动槽 */ | |
| 1557 | +//::-webkit-scrollbar-track { | |
| 1558 | +// -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3); | |
| 1559 | +//} | |
| 1560 | +// | |
| 1561 | +///* 滚动条滑块 */ | |
| 1562 | +//::-webkit-scrollbar-thumb { | |
| 1563 | +// background: rgba(0, 0, 0, 0.1); | |
| 1564 | +// -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5); | |
| 1565 | +//} | |
| 1566 | +// | |
| 1567 | +//::-webkit-scrollbar-thumb:window-inactive { | |
| 1568 | +// background: rgba(255, 0, 0, 0.4); | |
| 1569 | +//} | |
| 1570 | +/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ | |
| 1571 | +::-webkit-scrollbar{ | |
| 1531 | 1572 | width: 0; |
| 1573 | + background-color: #242a30; | |
| 1532 | 1574 | } |
| 1533 | 1575 | |
| 1534 | -/* 滚动槽 */ | |
| 1576 | +/*定义滚动条轨道 内阴影+圆角*/ | |
| 1535 | 1577 | ::-webkit-scrollbar-track { |
| 1536 | - -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3); | |
| 1537 | -} | |
| 1538 | - | |
| 1539 | -/* 滚动条滑块 */ | |
| 1540 | -::-webkit-scrollbar-thumb { | |
| 1541 | - background: rgba(0, 0, 0, 0.1); | |
| 1542 | - -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5); | |
| 1578 | + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); | |
| 1579 | + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); | |
| 1580 | + border-radius: 10px; | |
| 1581 | + background-color: #F5F5F5; | |
| 1543 | 1582 | } |
| 1544 | 1583 | |
| 1545 | -::-webkit-scrollbar-thumb:window-inactive { | |
| 1546 | - background: rgba(255, 0, 0, 0.4); | |
| 1584 | +/*定义滑块 内阴影+圆角*/ | |
| 1585 | +::-webkit-scrollbar-thumb{ | |
| 1586 | + border-radius: 10px; | |
| 1587 | + box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); | |
| 1588 | + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); | |
| 1589 | + background-color: #c8c8c8; | |
| 1547 | 1590 | } |
| 1548 | 1591 | </style> | ... | ... |
src/views/bigscreenDesigner/designer/tools/index.js
| ... | ... | @@ -41,22 +41,6 @@ const screenConfig = { |
| 41 | 41 | placeholder: '', |
| 42 | 42 | value: '' |
| 43 | 43 | }, |
| 44 | - // { | |
| 45 | - // type: 'data-source-select', | |
| 46 | - // label: '主数据源', | |
| 47 | - // name: 'master', | |
| 48 | - // required: false, | |
| 49 | - // placeholder: '主数据源[List:sName、sValue] ',/**LIST sName、sValue 后台代码自动转成 sName:sValue Map形式*/ | |
| 50 | - // value: '' | |
| 51 | - // }, | |
| 52 | - // { | |
| 53 | - // type: 'el-input-number', | |
| 54 | - // label: '刷新时间(毫秒)', | |
| 55 | - // name: 'refreshMasterTime', | |
| 56 | - // value: '600000', | |
| 57 | - // required: false, | |
| 58 | - // placeholder: '毫秒', | |
| 59 | - // }, | |
| 60 | 44 | { |
| 61 | 45 | type: 'vue-color', |
| 62 | 46 | label: '背景颜色', |
| ... | ... | @@ -109,7 +93,7 @@ const screenConfig = { |
| 109 | 93 | placeholder: '', |
| 110 | 94 | relactiveDom: 'dataType', |
| 111 | 95 | relactiveDomValue: 'staticData', |
| 112 | - value: {title:'标题', name: '测试名字', address: '上海市普陀区金沙江路 1518 弄0001','dProductQty':100,'dProductRate':13}, | |
| 96 | + value: {'title':'标题', 'name': '测试名字', 'address': '上海市普陀区金沙江路 1518 弄0001','dProductQty':100,'dProductRate':13}, | |
| 113 | 97 | }, |
| 114 | 98 | { |
| 115 | 99 | type: 'dycustComponents', | ... | ... |
src/views/bigscreenDesigner/designer/widget/text/widgetTime.vue