Browse Source

组件配置未完成

wangzihao 1 year ago
parent
commit
028348a6be

+ 1 - 1
ruoyi-ui/.env.development

@@ -5,7 +5,7 @@ VUE_APP_TITLE = 遥控器后台管理系统
 ENV = 'development'
 
 # 黑龙江移动线上渠道管理系统/开发环境
-VUE_APP_BASE_API = 'http://192.168.31.50:8080'
+VUE_APP_BASE_API = 'http://admin.info666.com/api'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 25 - 0
ruoyi-ui/src/assets/icons/fonts/iconfont.css

@@ -0,0 +1,25 @@
+@font-face {
+  font-family: "iconfont"; /* Project id  */
+  src: url('iconfont.ttf?t=1689846212096') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-tupian:before {
+  content: "\e889";
+}
+
+.icon-wenben:before {
+  content: "\e61c";
+}
+
+.icon-m-anniu:before {
+  content: "\e7cf";
+}
+

BIN
ruoyi-ui/src/assets/icons/fonts/iconfont.ttf


+ 1 - 0
ruoyi-ui/src/assets/styles/index.scss

@@ -4,6 +4,7 @@
 @import './element-ui.scss';
 @import './sidebar.scss';
 @import './btn.scss';
+@import '../icons/fonts/iconfont.css';
 
 body {
   height: 100%;

+ 18 - 0
ruoyi-ui/src/mock/cpnsList.js

@@ -0,0 +1,18 @@
+// 组件相关配置文件
+export const cpnsList = [
+  {
+    classType: 'icon-m-anniu',
+    type: 'button',
+    text: '按钮',
+  },
+  {
+    classType: 'icon-wenben',
+    type: 'text',
+    text: '文字',
+  },
+  {
+    classType: 'icon-tupian',
+    type: 'image',
+    text: '图片',
+  }
+]

+ 47 - 6
ruoyi-ui/src/views/template/addTemplate/blocks/detailDialog.vue

@@ -2,17 +2,33 @@
   <!-- 列表选择弹窗 -->
   <f-dialog
     ref="dialog"
-    title="模版配置信息"
+    title="遥控器设计器布局配置"
     :initData="handleInitData"
     :isDetermine="dialogType!=='detail'"
     :beforeClose="handleBeforeClose"
     width="1350px"
   >
     <template #contain>
+      <h3>遥控器基础配置</h3>
+      <f-form
+        ref="ruleForm"
+        :form="fromData"
+        :disabled="dialogType==='detail'"
+        :config="fromDataConfig"
+        :rules="fromRules"
+        label-position="left"
+        :key="fromKey"
+      />
       <div class="box">
         <div class="box-btns">
-          <h4>组件库</h4>
-          <grid-layout 
+          <h3>组件库</h3>
+          <div class="box-btns-cpns">
+            <div v-for="(item, index) in cpnsList" :key="index"  class="box-btns-cpns-cpn">
+              <span class="iconfont" :class="item.classType"></span>
+              <p>{{ item.text }}</p>
+            </div>
+          </div>
+          <!-- <grid-layout 
             :layout.sync="cpnArray" 
             :col-num="6" 
             :row-height="30" 
@@ -38,7 +54,7 @@
             >
               {{ item.text }}
             </grid-item>
-          </grid-layout>
+          </grid-layout> -->
         </div>
         <div class="box-canvs">
           <div class="box-canvs-main">
@@ -72,7 +88,7 @@
         </div>
         <div class="box-set">
           <div class="box-set-form">
-            <h3>模版基础配置</h3>
+            <h3>遥控器基础配置</h3>
             <f-form
               ref="ruleForm"
               :form="fromData"
@@ -105,6 +121,7 @@
 <script>
 import { addTemplateApi } from '@/api/template/addTemplate'
 import { formConfig, btnFormConfig } from './config'
+import { cpnsList } from '../../../../mock/cpnsList'
 export default {
   name: "DetailDialog",
   props: {
@@ -133,6 +150,7 @@ export default {
   },
   data() {
     return {
+      cpnsList,
       // 数据对象
       fromData:{
       },
@@ -283,9 +301,32 @@ export default {
   &-btns {
     display: flex;
     flex-direction: column;
-    >h4 {
+    >h4, >h3 {
       text-align: center;
     }
+    &-cpns {
+      flex: 1;
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      .box-btns-cpns-cpn {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        justify-content: space-evenly;
+        width: 80px;
+        height: 80px;
+        background: #f5f5f5;
+        margin-bottom: 15px;
+        span {
+          font-size: 28px;
+        }
+        p {
+          margin: 0;
+          padding: 0;
+        }
+      }
+    }
     &-items {
       overflow-y: scroll;
       &::-webkit-scrollbar {