| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- <script>
- import mqtt from "@/unit/mqtt.js"
- import router from "@/router/router.js"
- export default {
- onLaunch: function() {
- // #ifdef APP-PLUS
- plus.screen.lockOrientation('portrait-primary');
- const dom = weex.requireModule('dom');
- dom.addRule('fontFace', {
- 'fontFamily': "iconfont",
- 'src': "url('/static/iconfont/fontIcons.ttf')"
- });
- // dom.addRule('fontFace', {
- // 'fontFamily': "graceIconfont",
- // 'src': "url('/Grace6/font/grace.ttf')"
- // });
- // #endif
- },
- onShow: async function() {
- // 如果ip为空,则重新登录
- if (uni.$baseUrl == "") {
- uni.reLaunch({
- url: "/pages/login/loginPage"
- })
- return;
- }
- },
- onHide: function() {},
- }
- </script>
- <style lang="scss">
- /* 加载框架核心样式 */
- @import "./Grace6/css/grace.scss";
- /* 加载深色模式适配样式 */
- // @import "./Grace6/css/graceDark.scss";
- /* 加载自定义样式 */
- @import "./custom/custom.scss";
- /* iconfont */
- @import '/static/iconfont/iconfont.css';
- /* 引入字体 */
- @font-face {
- font-family: "得意黑 斜体";
- font-weight: 400;
- src: url("https://at.alicdn.com/wf/webfont/ki9sYvEuu3UO/0Fqxi2lkCsOf.woff2") format("woff2"),
- url("https://at.alicdn.com/wf/webfont/ki9sYvEuu3UO/DTlsylq2Pu7o.woff") format("woff");
- font-display: swap;
- }
- /* 加载图标字体 - 条件编译模式 */
- /* #ifdef APP-PLUS-NVUE */
- // .gui-icons {
- // font-family: graceIconfont;
- // }
- .font-icons {
- font-family: fonticon;
- }
- /* #endif */
- /* #ifndef APP-NVUE */
- page {
- background: #fbfbfb;
- }
- .gui-button-text-mini {
- color: #F8F8F8 !important;
- }
- // 主题背景色
- .gui-theme-background-color {
- background-color: rgba(0, 160, 233, 1);
- }
- /* #endif */
- // 弹框
- .uni-popup-dialog {
- width: 90vw !important;
- .uni-dialog-title {
- padding: 6px 0 12px 0 !important;
- }
- .uni-dialog-content {
- padding: 0 20px !important;
- }
- }
- .button {
- height: 45px;
- width: 100%;
- font-size: 18px;
- background-color: #afafaf;
- display: flex;
- justify-content: center;
- align-items: center;
- border-radius: 8px;
- margin: 4px 0;
- }
- .button[size='primary'] {
- background-color: #49a5e0;
- }
- /* 自定义图标加载 */
- /* #ifndef APP-NVUE */
- // 使用unicode本地编码
- @font-face {
- font-family: "wms";
- src: url('@/static/iconfont/iconfont.ttf') format('truetype');
- }
- .font-icons {
- font-family: "wms";
- font-style: normal;
- fill: gray;
- }
- /* #endif */
- // 全局输入框样式
- .gui-form-input {
- font-size: 14px;
- margin: 0 !important;
- }
- // 下拉框全局样式
- .custom-select {
- height: 40px;
- width: 65%;
- min-width: 200px;
- line-height: 40px;
- padding: 5px 0;
- display: flex;
- justify-content: center;
- align-items: center;
- background-color: transparent;
- .select-options {
- width: 180px;
- }
- }
- // 悬浮菜单全局样式
- .menu-items {
- width: 100rpx;
- height: 100rpx;
- margin: 20rpx 0;
- border-radius: 100rpx;
- display: flex;
- align-items: center;
- }
- .menu-icon {
- width: 100rpx;
- line-height: 40rpx;
- font-size: 36rpx;
- }
- .menu-text {
- width: 78rpx;
- line-height: 30rpx;
- font-size: 22rpx;
- }
- .bg-image {
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- height: calc(100vh - 75px);
- background-color: white !important;
- uni-image {
- width: 240px;
- height: 180px;
- }
- text {
- font-size: 36rpx;
- font-family: "得意黑 斜体";
- color: #c0c7d2;
- }
- }
- text {
- font-size: 12px;
- }
- // popup
- ::v-deep .uni-popup {
- view {
- view[name] {
- border-top-left-radius: 15px !important;
- border-top-right-radius: 15px !important;
- }
- }
- }
- ::v-deep .uni-popup__wrapper {
- border-top-left-radius: 15px !important;
- border-top-right-radius: 15px !important;
- }
- .popup-content {
- position: relative;
- border-top-left-radius: 15px !important;
- border-top-right-radius: 15px !important;
- }
- .uni-collapse {
- border-radius: 4px;
- }
- // 卡片列表样式
- .list-panel {
- // height: calc(100vh - 190px);
- // min-height: 230px;
- margin: 5px 0;
- padding: 5px 8px;
- position: relative;
- overflow-y: scroll;
- .panel {
- position: relative;
- margin: 16px 0;
- border-radius: 4px;
- box-shadow: 0 0 6px 0 rgba(121, 118, 118, 0.34);
- background-color: white;
- .panel-row {
- // height: 32px;
- line-height: 28px;
- padding: 0 12px;
- display: flex;
- justify-content: space-between;
- font-size: 12px;
- background-color: #fbfbfb;
- span:nth-of-type(1) {
- min-width: 30%;
- }
- }
- .panel-row:nth-of-type(1) {
- position: relative;
- font-weight: bold;
- border-top-left-radius: 4px;
- border-top-right-radius: 4px;
- border-bottom: 1px dashed rgba(237, 238, 238, 1);
- background-color: white;
- span {
- color: rgba(0, 160, 233, 1);
- }
- }
- .panel-row:nth-of-type(1)::before {
- content: '';
- position: absolute;
- top: 30px;
- left: 0;
- bottom: 0;
- transform: translate(-50%, -50%);
- width: 15px;
- height: 15px;
- border-radius: 50%;
- background-color: rgba(237, 238, 238, 1);
- }
- .panel-row:nth-of-type(1)::after {
- content: '';
- position: absolute;
- top: 30px;
- right: 0;
- bottom: 0;
- transform: translate(50%, -50%);
- width: 15px;
- height: 15px;
- border-radius: 50%;
- background-color: rgba(237, 238, 238, 1);
- }
- .panel-row-operation {
- line-height: 28px;
- display: flex;
- justify-content: end;
- }
- }
- .panel::before {
- content: '';
- position: absolute;
- left: 16px;
- bottom: -16px;
- width: 2px;
- height: 16px;
- transform: translate(-50%, 0);
- background-image: linear-gradient(#b3b4b4 50%, rgba(255, 255, 255, 0) 0%);
- /* 35%设置虚线点x轴上的长度 */
- background-position: left;
- /* top配置上边框位置的虚线 */
- background-size: 2px 12px;
- /* 第一个参数设置虚线点的间距;第二个参数设置虚线点y轴上的长度 */
- background-repeat: repeat-y;
- z-index: 1;
- }
- .panel::after {
- content: '';
- position: absolute;
- right: 16px;
- bottom: -16px;
- width: 2px;
- height: 16px;
- transform: translate(-50%, 0);
- background-image: linear-gradient(#b3b4b4 50%, rgba(255, 255, 255, 0) 0%);
- /* 35%设置虚线点x轴上的长度 */
- background-position: left;
- /* top配置上边框位置的虚线 */
- background-size: 2px 12px;
- /* 第一个参数设置虚线点的间距;第二个参数设置虚线点y轴上的长度 */
- background-repeat: repeat-y;
- z-index: 1;
- }
- }
- // 手风琴级联菜单
- .panel {
- box-shadow: 0 0 6px 0 rgba(121, 118, 118, 0.34);
- .uni-collapse-item__wrap-content {
- }
- }
- // uni-row
- .uni-row {
- display: flex;
- align-items: center;
- }
- </style>
|