Browse Source

新增表格设计器 标题

余思翰 1 year ago
parent
commit
b1d5cdf300

+ 2
- 2
oa-ui/package.json View File

39
     "@riophae/vue-treeselect": "0.4.0",
39
     "@riophae/vue-treeselect": "0.4.0",
40
     "axios": "0.24.0",
40
     "axios": "0.24.0",
41
     "bpmn-js": "^11.1.0",
41
     "bpmn-js": "^11.1.0",
42
-    "bpmnlint": "^6.4.0",
43
     "bpmn-js-bpmnlint": "^0.15.0",
42
     "bpmn-js-bpmnlint": "^0.15.0",
43
+    "bpmnlint": "^6.4.0",
44
     "bpmnlint-loader": "^0.1.4",
44
     "bpmnlint-loader": "^0.1.4",
45
-    "file-drops": "^0.4.0",
46
     "clipboard": "2.0.8",
45
     "clipboard": "2.0.8",
47
     "core-js": "3.25.3",
46
     "core-js": "3.25.3",
48
     "diagram-js": "^11.4.1",
47
     "diagram-js": "^11.4.1",
49
     "echarts": "5.4.0",
48
     "echarts": "5.4.0",
50
     "element-ui": "2.15.14",
49
     "element-ui": "2.15.14",
50
+    "file-drops": "^0.4.0",
51
     "file-saver": "2.0.5",
51
     "file-saver": "2.0.5",
52
     "fuse.js": "6.4.3",
52
     "fuse.js": "6.4.3",
53
     "highlight.js": "9.18.5",
53
     "highlight.js": "9.18.5",

+ 7
- 1
oa-ui/src/assets/styles/element-ui.scss View File

89
   > .el-submenu__title
89
   > .el-submenu__title
90
   .el-submenu__icon-arrow {
90
   .el-submenu__icon-arrow {
91
   display: none;
91
   display: none;
92
-}
92
+}
93
+// .el-form-item{
94
+//   margin-bottom: 10px;
95
+// }
96
+// .el-form-item--small.el-form-item{
97
+//   margin-bottom: 10px;
98
+// }

+ 44
- 0
oa-ui/src/components/RowTitle/index.vue View File

1
+<!--
2
+ * @Author: ysh
3
+ * @Date: 2024-01-10 17:10:54
4
+ * @LastEditors: 
5
+ * @LastEditTime: 2024-01-10 17:11:15
6
+-->
7
+<template>
8
+  <div ref="rowTitle" v-text="rowTitleText" :style="setStyle()"></div>
9
+</template>
10
+
11
+<script>
12
+export default {
13
+  name: "",
14
+  data() {
15
+    return {};
16
+  },
17
+  computed: {
18
+    rowTitleText() {
19
+      return this.$attrs.titleText
20
+    },
21
+  },
22
+  watch: {
23
+    $attrs: {
24
+      deep: true,
25
+      handler(val) {
26
+        this.setStyle()
27
+      }
28
+    },
29
+  },
30
+  methods: {
31
+    setStyle() {
32
+      let obj = {
33
+        color: this.$attrs.fontColor,
34
+        fontSize: this.$attrs.fontSize + 'px',
35
+        fontWeight: this.$attrs.fontWeight ? 600 : 400,
36
+        textAlign: this.$attrs.textAlign,
37
+      }
38
+      return obj
39
+    }
40
+  },
41
+};
42
+</script>
43
+
44
+<style lang="scss" scoped></style>

+ 32
- 4
oa-ui/src/components/parser/Parser.vue View File

34
     let child = renderChildren.apply(this, arguments)
34
     let child = renderChildren.apply(this, arguments)
35
     if (scheme.type === 'flex') {
35
     if (scheme.type === 'flex') {
36
       child = <el-row type={scheme.type} justify={scheme.justify} align={scheme.align}>
36
       child = <el-row type={scheme.type} justify={scheme.justify} align={scheme.align}>
37
-              {child}
38
-            </el-row>
37
+        {child}
38
+      </el-row>
39
     }
39
     }
40
+    console.log(child);
40
     return (
41
     return (
41
       <el-col span={scheme.span}>
42
       <el-col span={scheme.span}>
42
         <el-row gutter={scheme.gutter}>
43
         <el-row gutter={scheme.gutter}>
44
         </el-row>
45
         </el-row>
45
       </el-col>
46
       </el-col>
46
     )
47
     )
48
+  },
49
+  showFormItem(h, scheme) {
50
+    const { activeItem } = this.$listeners
51
+    const config = scheme.__config__
52
+    const className = this.activeId === config.formId
53
+      ? 'drawing-row-item active-from-item'
54
+      : 'drawing-row-item'
55
+    const spanText = 'row' + config.formId
56
+    return (
57
+      <el-col span={config.span}>
58
+        <el-row>
59
+          <h1>
60
+            <render key={config.renderKey} conf={scheme} onInput={event => { this.$set(config, 'defaultValue', event) }}></render>
61
+          </h1>
62
+        </el-row>
63
+      </el-col>
64
+    )
47
   }
65
   }
48
 }
66
 }
49
 
67
 
64
       >
82
       >
65
         {renderFormItem.call(this, h, formConfCopy.fields)}
83
         {renderFormItem.call(this, h, formConfCopy.fields)}
66
         {formConfCopy.formBtns && formBtns.call(this, h)}
84
         {formConfCopy.formBtns && formBtns.call(this, h)}
85
+
67
       </el-form>
86
       </el-form>
68
     </el-row>
87
     </el-row>
69
   )
88
   )
83
     return elementList.map(scheme => {
102
     return elementList.map(scheme => {
84
       const config = scheme.__config__
103
       const config = scheme.__config__
85
       const layout = layouts[config.layout]
104
       const layout = layouts[config.layout]
86
-
105
+      debugger
87
       if (layout) {
106
       if (layout) {
88
         return layout.call(this, h, scheme)
107
         return layout.call(this, h, scheme)
89
       }
108
       }
245
       })
264
       })
246
     },
265
     },
247
     // 传值给父组件
266
     // 传值给父组件
248
-    getData(){
267
+    getData() {
249
       this.$emit('getData', this[this.formConf.formModel])
268
       this.$emit('getData', this[this.formConf.formModel])
250
       // this.$emit('getData',this.formConfCopy)
269
       // this.$emit('getData',this.formConfCopy)
251
     }
270
     }
255
   }
274
   }
256
 }
275
 }
257
 </script>
276
 </script>
277
+<style scoped>
278
+::v-deep.el-form-item {
279
+  margin-bottom: 10px;
280
+}
281
+
282
+::v-deep.el-form-item--small.el-form-item {
283
+  margin-bottom: 10px;
284
+}
285
+</style>

+ 2
- 2
oa-ui/src/components/parser/example/Index.vue View File

318
 <style lang="scss" scoped>
318
 <style lang="scss" scoped>
319
 .test-form {
319
 .test-form {
320
   margin: 15px auto;
320
   margin: 15px auto;
321
-  width: 800px;
322
-  padding: 15px;
321
+  // width: 800px;
322
+  padding: 20px;
323
 }
323
 }
324
 </style>
324
 </style>

+ 10
- 1
oa-ui/src/main.js View File

1
+/*
2
+ * @Author: ysh
3
+ * @Date: 2024-01-03 09:23:11
4
+ * @LastEditors: Please set LastEditors
5
+ * @LastEditTime: 2024-01-10 17:11:57
6
+ */
1
 import Vue from 'vue'
7
 import Vue from 'vue'
2
 
8
 
3
 import Cookies from 'js-cookie'
9
 import Cookies from 'js-cookie'
19
 import { getDicts } from "@/api/system/dict/data";
25
 import { getDicts } from "@/api/system/dict/data";
20
 import { getConfigKey } from "@/api/system/config";
26
 import { getConfigKey } from "@/api/system/config";
21
 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
27
 import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi";
28
+// 标题组件
29
+import RowTitle from '@/components/RowTitle'
30
+
22
 // 分页组件
31
 // 分页组件
23
 import Pagination from "@/components/Pagination";
32
 import Pagination from "@/components/Pagination";
24
 // 自定义表格工具组件
33
 // 自定义表格工具组件
63
 Vue.component('ImageUpload', ImageUpload)
72
 Vue.component('ImageUpload', ImageUpload)
64
 Vue.component('ImagePreview', ImagePreview)
73
 Vue.component('ImagePreview', ImagePreview)
65
 Vue.component('tinymce', Tinymce)
74
 Vue.component('tinymce', Tinymce)
75
+Vue.component('RowTitle', RowTitle)
66
 
76
 
67
 Vue.use(directive)
77
 Vue.use(directive)
68
 Vue.use(plugins)
78
 Vue.use(plugins)
81
 Vue.use(Element, {
91
 Vue.use(Element, {
82
   size: Cookies.get('size') || 'medium' // set element-ui default size
92
   size: Cookies.get('size') || 'medium' // set element-ui default size
83
 })
93
 })
84
-
85
 Vue.config.productionTip = false
94
 Vue.config.productionTip = false
86
 
95
 
87
 new Vue({
96
 new Vue({

+ 100
- 80
oa-ui/src/utils/generator/config.js View File

546
     circle: false,
546
     circle: false,
547
     disabled: false
547
     disabled: false
548
   },
548
   },
549
-  // {
550
-  //   __config__: {
551
-  //     layout: 'colFormItem',
552
-  //     tagIcon: 'table',
553
-  //     tag: 'el-table',
554
-  //     document: 'https://element.eleme.cn/#/zh-CN/component/table',
555
-  //     span: 24,
556
-  //     formId: 101,
557
-  //     renderKey: 1595761764203,
558
-  //     componentName: 'row101',
559
-  //     showLabel: true,
560
-  //     changeTag: true,
561
-  //     labelWidth: null,
562
-  //     label: '表格[开发中]',
563
-  //     dataType: 'dynamic',
564
-  //     method: 'get',
565
-  //     dataPath: 'list',
566
-  //     dataConsumer: 'data',
567
-  //     url: 'https://www.fastmock.site/mock/f8d7a54fb1e60561e2f720d5a810009d/fg/tableData',
568
-  //     children: [{
569
-  //       __config__: {
570
-  //         layout: 'raw',
571
-  //         tag: 'el-table-column',
572
-  //         renderKey: 15957617660153
573
-  //       },
574
-  //       prop: 'date',
575
-  //       label: '日期'
576
-  //     }, {
577
-  //       __config__: {
578
-  //         layout: 'raw',
579
-  //         tag: 'el-table-column',
580
-  //         renderKey: 15957617660152
581
-  //       },
582
-  //       prop: 'address',
583
-  //       label: '地址'
584
-  //     }, {
585
-  //       __config__: {
586
-  //         layout: 'raw',
587
-  //         tag: 'el-table-column',
588
-  //         renderKey: 15957617660151
589
-  //       },
590
-  //       prop: 'name',
591
-  //       label: '名称'
592
-  //     }, {
593
-  //       __config__: {
594
-  //         layout: 'raw',
595
-  //         tag: 'el-table-column',
596
-  //         renderKey: 1595774496335,
597
-  //         children: [
598
-  //           {
599
-  //             __config__: {
600
-  //               label: '按钮',
601
-  //               tag: 'el-button',
602
-  //               tagIcon: 'button',
603
-  //               layout: 'raw',
604
-  //               renderKey: 1595779809901
605
-  //             },
606
-  //             __slot__: {
607
-  //               default: '主要按钮'
608
-  //             },
609
-  //             type: 'primary',
610
-  //             icon: 'el-icon-search',
611
-  //             round: false,
612
-  //             size: 'medium'
613
-  //           }
614
-  //         ]
615
-  //       },
616
-  //       label: '操作'
617
-  //     }]
618
-  //   },
619
-  //   data: [],
620
-  //   directives: [{
621
-  //     name: 'loading',
622
-  //     value: true
623
-  //   }],
624
-  //   border: true,
625
-  //   type: 'default',
626
-  //   justify: 'start',
627
-  //   align: 'top'
628
-  // }
549
+  {
550
+    __config__: {
551
+      layout: 'colFormItem',
552
+      tagIcon: 'table',
553
+      tag: 'el-table',
554
+      document: 'https://element.eleme.cn/#/zh-CN/component/table',
555
+      span: 24,
556
+      formId: 101,
557
+      renderKey: 1595761764203,
558
+      componentName: 'row101',
559
+      showLabel: true,
560
+      changeTag: true,
561
+      labelWidth: null,
562
+      label: '表格[开发中]',
563
+      dataType: 'dynamic',
564
+      method: 'get',
565
+      dataPath: 'list',
566
+      dataConsumer: 'data',
567
+      // url: 'https://www.fastmock.site/mock/f8d7a54fb1e60561e2f720d5a810009d/fg/tableData',
568
+      children: [{
569
+        __config__: {
570
+          layout: 'raw',
571
+          tag: 'el-table-column',
572
+          renderKey: 15957617660153
573
+        },
574
+        prop: 'date',
575
+        label: '日期'
576
+      }, {
577
+        __config__: {
578
+          layout: 'raw',
579
+          tag: 'el-table-column',
580
+          renderKey: 15957617660152
581
+        },
582
+        prop: 'address',
583
+        label: '地址'
584
+      }, {
585
+        __config__: {
586
+          layout: 'raw',
587
+          tag: 'el-table-column',
588
+          renderKey: 15957617660151
589
+        },
590
+        prop: 'name',
591
+        label: '名称'
592
+      }, 
593
+      // {
594
+      //   __config__: {
595
+      //     layout: 'raw',
596
+      //     tag: 'el-table-column',
597
+      //     renderKey: 1595774496335,
598
+      //     children: [
599
+      //       {
600
+      //         __config__: {
601
+      //           label: '按钮',
602
+      //           tag: 'el-button',
603
+      //           tagIcon: 'button',
604
+      //           layout: 'raw',
605
+      //           renderKey: 1595779809901
606
+      //         },
607
+      //         __slot__: {
608
+      //           default: '主要按钮'
609
+      //         },
610
+      //         type: 'primary',
611
+      //         icon: 'el-icon-search',
612
+      //         round: false,
613
+      //         size: 'medium'
614
+      //       }
615
+      //     ]
616
+      //   },
617
+      //   label: '操作'
618
+      // }
619
+    ]
620
+    },
621
+    data: [],
622
+    directives: [{
623
+      name: 'loading',
624
+      value: false
625
+    }],
626
+    border: true,
627
+    type: 'default',
628
+    justify: 'start',
629
+    align: 'top'
630
+  }
629
 ]
631
 ]
632
+
633
+// 展示组件
634
+export const showComponents = [
635
+  {
636
+    __config__: {
637
+      layout: 'showFormItem',
638
+      tag: 'row-title',
639
+      tagIcon: 'row',
640
+      label: '标题容器',
641
+      document: 'https://element.eleme.cn/#/zh-CN/component/layout#row-attributes'
642
+    },
643
+    titleText: '标题',
644
+    fontSize: 20,
645
+    fontColor: '#606266',
646
+    fontWeight: false,
647
+    textAlign: 'left',
648
+  },
649
+]

+ 12
- 0
oa-ui/src/utils/generator/html.js View File

110
     </el-row>`
110
     </el-row>`
111
     str = colWrapper(scheme, str)
111
     str = colWrapper(scheme, str)
112
     return str
112
     return str
113
+  },
114
+  showFormItem(scheme) {
115
+    const config = scheme.__config__
116
+    const tagDom = tags[config.tag] ? tags[config.tag](scheme) : null
117
+    let str = `<el-row>
118
+      ${tagDom}
119
+    </el-row>`
120
+    str = colWrapper(scheme, str)
121
+    return str
113
   }
122
   }
114
 }
123
 }
115
 
124
 
290
     const height = el.height ? `:height="${el.height}"` : ''
299
     const height = el.height ? `:height="${el.height}"` : ''
291
     const branding = el.branding ? `:branding="${el.branding}"` : ''
300
     const branding = el.branding ? `:branding="${el.branding}"` : ''
292
     return `<${tag} ${vModel} ${placeholder} ${height} ${branding}></${tag}>`
301
     return `<${tag} ${vModel} ${placeholder} ${height} ${branding}></${tag}>`
302
+  },
303
+  'row-title': el => {
304
+    return `<h1 style="font-size: ${el.fontSize}px;color: ${el.fontColor};font-weight: ${el.fontWeight ? 600 : 400};text-align: ${el.textAlign};">${el.titleText}</h1>`
293
   }
305
   }
294
 }
306
 }
295
 
307
 

+ 2
- 2
oa-ui/src/views/flowable/task/finished/detail/index.vue View File

183
 <style lang="scss" scoped>
183
 <style lang="scss" scoped>
184
 .test-form {
184
 .test-form {
185
   margin: 15px auto;
185
   margin: 15px auto;
186
-  width: 800px;
187
-  padding: 15px;
186
+  // width: 800px;
187
+  padding: 20px;
188
 }
188
 }
189
 
189
 
190
 .clearfix:before,
190
 .clearfix:before,

+ 3
- 2
oa-ui/src/views/flowable/task/form/index.vue View File

227
     /** 表单配置信息 */
227
     /** 表单配置信息 */
228
     handleDetail(row){
228
     handleDetail(row){
229
       this.formConfOpen = true;
229
       this.formConfOpen = true;
230
+      console.log(JSON.parse(row.formContent));
230
       this.formTitle = "流程表单配置详细";
231
       this.formTitle = "流程表单配置详细";
231
       this.formConf = JSON.parse(row.formContent)
232
       this.formConf = JSON.parse(row.formContent)
232
     },
233
     },
302
 <style lang="scss" scoped>
303
 <style lang="scss" scoped>
303
 .test-form {
304
 .test-form {
304
   margin: 15px auto;
305
   margin: 15px auto;
305
-  width: 800px;
306
-  padding: 15px;
306
+  // width: 800px;
307
+  padding: 20px;
307
 }
308
 }
308
 </style>
309
 </style>

+ 2
- 2
oa-ui/src/views/flowable/task/myProcess/detail/index.vue View File

193
 <style lang="scss" scoped>
193
 <style lang="scss" scoped>
194
 .test-form {
194
 .test-form {
195
   margin: 15px auto;
195
   margin: 15px auto;
196
-  width: 800px;
197
-  padding: 15px;
196
+  // width: 800px;
197
+  padding: 20px;
198
 }
198
 }
199
 
199
 
200
 .clearfix:before,
200
 .clearfix:before,

+ 2
- 2
oa-ui/src/views/flowable/task/myProcess/send/index.vue View File

261
 <style lang="scss" scoped>
261
 <style lang="scss" scoped>
262
 .test-form {
262
 .test-form {
263
   margin: 15px auto;
263
   margin: 15px auto;
264
-  width: 800px;
265
-  padding: 15px;
264
+  // width: 800px;
265
+  padding: 20px;
266
 }
266
 }
267
 
267
 
268
 .clearfix:before,
268
 .clearfix:before,

+ 2
- 2
oa-ui/src/views/flowable/task/record/index.vue View File

579
 <style lang="scss" scoped>
579
 <style lang="scss" scoped>
580
 .test-form {
580
 .test-form {
581
   margin: 15px auto;
581
   margin: 15px auto;
582
-  width: 800px;
583
-  padding: 15px;
582
+  // width: 800px;
583
+  padding: 20px;
584
 }
584
 }
585
 
585
 
586
 .clearfix:before,
586
 .clearfix:before,

+ 6
- 2
oa-ui/src/views/flowable/task/todo/detail/index.vue View File

87
             <flow-user v-if="checkSendUser" :checkType="checkType" @handleUserSelect="handleUserSelect"></flow-user>
87
             <flow-user v-if="checkSendUser" :checkType="checkType" @handleUserSelect="handleUserSelect"></flow-user>
88
             <flow-role v-if="checkSendRole" @handleRoleSelect="handleRoleSelect"></flow-role>
88
             <flow-role v-if="checkSendRole" @handleRoleSelect="handleRoleSelect"></flow-role>
89
           </el-form-item>
89
           </el-form-item>
90
+          <el-form-item label="熟练程度" label-width="80px" prop="comment">
91
+            <el-checkbox v-model="taskForm.check">备选项</el-checkbox>
92
+          </el-form-item>
90
           <el-form-item label="处理意见" label-width="80px" prop="comment"
93
           <el-form-item label="处理意见" label-width="80px" prop="comment"
91
                         :rules="[{ required: true, message: '请输入处理意见', trigger: 'blur' }]">
94
                         :rules="[{ required: true, message: '请输入处理意见', trigger: 'blur' }]">
92
             <el-input type="textarea" v-model="taskForm.comment" placeholder="请输入处理意见"/>
95
             <el-input type="textarea" v-model="taskForm.comment" placeholder="请输入处理意见"/>
205
         variables: {
208
         variables: {
206
           variables: {}
209
           variables: {}
207
         },
210
         },
211
+        check:true
208
       },
212
       },
209
       assignee: null,
213
       assignee: null,
210
       formConf: {}, // 默认表单数据
214
       formConf: {}, // 默认表单数据
477
 <style lang="scss" scoped>
481
 <style lang="scss" scoped>
478
 .test-form {
482
 .test-form {
479
   margin: 15px auto;
483
   margin: 15px auto;
480
-  width: 800px;
481
-  padding: 15px;
484
+  // width: 800px;
485
+  padding: 20px;
482
 }
486
 }
483
 
487
 
484
 .clearfix:before,
488
 .clearfix:before,

+ 3
- 3
oa-ui/src/views/login.vue View File

23
           <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
23
           <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
24
         </el-input>
24
         </el-input>
25
       </el-form-item>
25
       </el-form-item>
26
-      <el-form-item prop="code" v-if="captchaEnabled">
26
+      <!-- <el-form-item prop="code" v-if="captchaEnabled">
27
         <el-input
27
         <el-input
28
           v-model="loginForm.code"
28
           v-model="loginForm.code"
29
           auto-complete="off"
29
           auto-complete="off"
36
         <div class="login-code">
36
         <div class="login-code">
37
           <img :src="codeUrl" @click="getCode" class="login-code-img"/>
37
           <img :src="codeUrl" @click="getCode" class="login-code-img"/>
38
         </div>
38
         </div>
39
-      </el-form-item>
39
+      </el-form-item> -->
40
       <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
40
       <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
41
       <el-form-item style="width:100%;">
41
       <el-form-item style="width:100%;">
42
         <el-button
42
         <el-button
104
     }
104
     }
105
   },
105
   },
106
   created() {
106
   created() {
107
-    this.getCode();
107
+    // this.getCode();
108
     this.getCookie();
108
     this.getCookie();
109
   },
109
   },
110
   methods: {
110
   methods: {

+ 20
- 0
oa-ui/src/views/tool/build/DraggableItem.vue View File

69
       </el-col>
69
       </el-col>
70
     )
70
     )
71
   },
71
   },
72
+  showFormItem(h, currentItem, index, list) {
73
+    const { activeItem } = this.$listeners
74
+    const config = currentItem.__config__
75
+    const className = this.activeId === config.formId
76
+      ? 'drawing-row-item active-from-item'
77
+      : 'drawing-row-item'
78
+    const spanText = 'row'+config.formId
79
+    return (
80
+      <el-col span={config.span}>
81
+        <el-row gutter={config.gutter} class={className}
82
+          nativeOnClick={event => { activeItem(currentItem); event.stopPropagation() }}>
83
+          <span class="component-name">{spanText}</span>
84
+          <h1>
85
+            <render key={config.renderKey} conf={currentItem} onInput={ event => { this.$set(config, 'defaultValue', event) }}></render>
86
+          </h1>
87
+          {components.itemBtns.apply(this, arguments)}
88
+        </el-row>
89
+      </el-col>
90
+    )
91
+  },
72
   raw(h, currentItem, index, list) {
92
   raw(h, currentItem, index, list) {
73
     const config = currentItem.__config__
93
     const config = currentItem.__config__
74
     const child = renderChildren.apply(this, arguments)
94
     const child = renderChildren.apply(this, arguments)

+ 27
- 0
oa-ui/src/views/tool/build/RightPanel.vue View File

302
               @input="setTimeValue($event)"
302
               @input="setTimeValue($event)"
303
             />
303
             />
304
           </el-form-item>
304
           </el-form-item>
305
+          <!-- 标题文字 -->
306
+          <el-form-item v-if="activeData.__config__.tag === 'row-title'" label="标题文字">
307
+            <el-input v-model="activeData.titleText" placeholder="请输入标题文字" />
308
+          </el-form-item>
309
+          <el-form-item v-if="activeData.__config__.tag === 'row-title'" label="标题大小">
310
+            <el-input v-model.number="activeData.fontSize" type="number" placeholder="请输入标题文字大小" />
311
+          </el-form-item>
312
+          <el-form-item v-if="activeData.__config__.tag === 'row-title'" label="标题颜色">
313
+            <el-color-picker v-model="activeData.fontColor" />
314
+          </el-form-item>
315
+          <el-form-item v-if="activeData.__config__.tag === 'row-title'" label="是否加粗">
316
+            <el-switch v-model="activeData.fontWeight" />
317
+          </el-form-item>
318
+          <el-form-item v-if="activeData.__config__.tag === 'row-title'" label="对齐方式">
319
+            <el-radio-group v-model="activeData.textAlign">
320
+              <el-radio-button label="left">
321
+                居左
322
+              </el-radio-button>
323
+              <el-radio-button label="center">
324
+                居中
325
+              </el-radio-button>
326
+              <el-radio-button label="right">
327
+                居右
328
+              </el-radio-button>
329
+            </el-radio-group>
330
+          </el-form-item>
331
+
305
           <template v-if="['el-checkbox-group', 'el-radio-group', 'el-select'].indexOf(activeData.__config__.tag) > -1">
332
           <template v-if="['el-checkbox-group', 'el-radio-group', 'el-select'].indexOf(activeData.__config__.tag) > -1">
306
             <el-divider>选项</el-divider>
333
             <el-divider>选项</el-divider>
307
             <draggable
334
             <draggable

+ 7
- 2
oa-ui/src/views/tool/build/index.vue View File

145
 import JsonDrawer from './JsonDrawer'
145
 import JsonDrawer from './JsonDrawer'
146
 import RightPanel from './RightPanel'
146
 import RightPanel from './RightPanel'
147
 import {
147
 import {
148
-  inputComponents, selectComponents, layoutComponents, formConf
148
+  inputComponents, selectComponents, layoutComponents, formConf, showComponents
149
 } from '@/utils/generator/config'
149
 } from '@/utils/generator/config'
150
 import {
150
 import {
151
   exportDefault, beautifierConf, isNumberStr, titleCase, deepClone, isObjectObject
151
   exportDefault, beautifierConf, isNumberStr, titleCase, deepClone, isObjectObject
191
       inputComponents,
191
       inputComponents,
192
       selectComponents,
192
       selectComponents,
193
       layoutComponents,
193
       layoutComponents,
194
+      showComponents, 
194
       labelWidth: 100,
195
       labelWidth: 100,
195
       drawingList: drawingDefault,
196
       drawingList: drawingDefault,
196
       drawingData: {},
197
       drawingData: {},
216
         {
217
         {
217
           title: '布局型组件',
218
           title: '布局型组件',
218
           list: layoutComponents
219
           list: layoutComponents
219
-        }
220
+        },{
221
+          title: "展示型组件",						// 这里也要新增
222
+          list: showComponents,
223
+        },
220
       ],
224
       ],
221
       formOpen: false,
225
       formOpen: false,
222
       formTitle: "",
226
       formTitle: "",
333
       if (i > -1) this.$set(this.drawingList, i, component)
337
       if (i > -1) this.$set(this.drawingList, i, component)
334
     },
338
     },
335
     fetchData(component) {
339
     fetchData(component) {
340
+      debugger
336
       const { dataType, method, url } = component.__config__
341
       const { dataType, method, url } = component.__config__
337
       if (dataType === 'dynamic' && method && url) {
342
       if (dataType === 'dynamic' && method && url) {
338
         this.setLoading(component, true)
343
         this.setLoading(component, true)

Loading…
Cancel
Save