cloud-web-corejs 1.0.54-dev.200 → 1.0.54-dev.202
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -2
- package/src/components/jsonImport/index.js +171 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +59 -47
- package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +630 -478
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -1
- package/src/components/xform/lang/zh-CN.js +1 -1
- package/src/components/xform/utils/format.js +21 -30
- package/src/components/xform/utils/formula-util.js +649 -0
- package/src/components/xform/utils/util.js +1 -1
- package/src/layout/components/watermark/index.vue +7 -1
- package/src/views/bd/setting/bd_attach_setting/edit.vue +2 -2
- package/src/views/bd/setting/bd_attach_setting/mixins/list.js +2 -2
- package/src/views/bd/setting/form_import_log/edit.vue +2 -2
- package/src/views/bd/setting/form_script/edit.vue +2 -2
- package/src/views/bd/setting/form_script/edit1.vue +2 -2
- package/src/views/bd/setting/form_script/mixins/form_list.js +2 -2
- package/src/views/bd/setting/form_script/mixins/list.js +3 -2
- package/src/views/bd/setting/form_script/mixins/list1.js +3 -2
- package/src/views/bd/setting/form_template/edit.vue +2 -2
- package/src/views/bd/setting/form_template/mixins/list.js +3 -2
- package/src/views/bd/setting/menu_kind/mixins/list.js +201 -1
- package/src/views/bd/setting/table_model/mixins/list.js +3 -2
@@ -1,28 +1,35 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<el-form-item
|
4
|
-
|
3
|
+
<el-form-item
|
4
|
+
:label="i18nt('designer.setting.formula')"
|
5
|
+
v-if="optionModel.formulaEnabled">
|
6
|
+
</el-form-item>
|
7
|
+
<el-form-item label-width="0" v-if="optionModel.formulaEnabled">
|
8
|
+
<el-tooltip
|
9
|
+
:content="formulaForView"
|
10
|
+
effect="light"
|
11
|
+
placement="top">
|
5
12
|
<el-input v-model="formulaForView" readonly>
|
6
|
-
<template
|
7
|
-
<el-button
|
13
|
+
<template #append>
|
14
|
+
<el-button
|
15
|
+
@click="editFormula"
|
16
|
+
icon="el-icon-edit"></el-button>
|
8
17
|
</template>
|
9
18
|
</el-input>
|
10
19
|
</el-tooltip>
|
11
20
|
</el-form-item>
|
12
21
|
<el-dialog
|
22
|
+
v-if="formulaDialogVisible"
|
13
23
|
:visible.sync="formulaDialogVisible"
|
14
24
|
:title="i18nt('designer.hint.formulaSetting')"
|
25
|
+
custom-class="dialog-style list-dialog"
|
15
26
|
:close-on-click-modal="false"
|
16
27
|
:close-on-press-escape="false"
|
17
28
|
:destroy-on-close="true"
|
18
29
|
:append-to-body="true"
|
19
|
-
top="0px"
|
20
30
|
width="70%"
|
21
|
-
|
22
|
-
|
23
|
-
v-el-drag-dialog
|
24
|
-
v-el-dialog-center
|
25
|
-
>
|
31
|
+
top="0px"
|
32
|
+
ref="colFormulaDialog">
|
26
33
|
<div class="cont">
|
27
34
|
<el-row>
|
28
35
|
<el-col :span="24">
|
@@ -30,98 +37,64 @@
|
|
30
37
|
<div class="editor-top">
|
31
38
|
<el-row>
|
32
39
|
<el-col :span="22">
|
33
|
-
<div style="font-weight: bold
|
40
|
+
<div style="font-weight: bold">
|
41
|
+
{{ this.optionModel.label }} =
|
42
|
+
</div>
|
34
43
|
</el-col>
|
44
|
+
<!-- el-tag 模式 按钮 end -->
|
35
45
|
<el-col :span="2">
|
36
|
-
<el-button
|
37
|
-
|
46
|
+
<el-button
|
47
|
+
size="small"
|
48
|
+
@click="clearFormula"
|
49
|
+
type="danger"
|
50
|
+
plain>
|
51
|
+
{{ i18nt("designer.hint.formulaClear") }}
|
38
52
|
</el-button>
|
39
53
|
</el-col>
|
40
54
|
</el-row>
|
41
|
-
|
42
|
-
<div class="el-col el-col-22">
|
43
|
-
<div style="font-weight: bold;"> 年龄 =</div>
|
44
|
-
</div>
|
45
|
-
<div class="el-col el-col-2">
|
46
|
-
<button type="button"
|
47
|
-
class="el-button el-button--danger el-button--small is-plain"><!––><!––><span> 清除 </span>
|
48
|
-
</button>
|
49
|
-
</div>
|
50
|
-
</div>-->
|
51
|
-
<div ref="cmRef" style="height: 110px; width: 100%;">
|
52
|
-
<editor-content :editor="codeMirror" />
|
53
|
-
</div>
|
54
|
-
<!-- <div style="height: 110px; width: 100%;">
|
55
|
-
<codemirror
|
56
|
-
ref="codeEditor"
|
57
|
-
v-model="formulaStr"
|
58
|
-
:options="cmOptions"
|
59
|
-
@input="codeMirrorChange"
|
60
|
-
></codemirror>
|
61
|
-
</div>-->
|
55
|
+
<div ref="cmRef" style="height:83px;width:100%"></div>
|
62
56
|
</div>
|
57
|
+
<!-- -->
|
63
58
|
<div class="editor-bottom">
|
64
|
-
<
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
72
|
-
<!––><span> * </span></button>
|
73
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
74
|
-
<!––><span> / </span></button>
|
75
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
76
|
-
<!––><span> != </span></button>
|
77
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
78
|
-
<!––><span> == </span></button>
|
79
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
80
|
-
<!––><span> < </span></button>
|
81
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
82
|
-
<!––><span> > </span></button>
|
83
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
84
|
-
<!––><span> <= </span></button>
|
85
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
86
|
-
<!––><span> >= </span></button>
|
87
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
88
|
-
<!––><span> ( </span></button>
|
89
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
90
|
-
<!––><span> ) </span></button>
|
91
|
-
<button type="button" class="el-button el-button--default el-button--default"><!––>
|
92
|
-
<!––><span> , </span></button>-->
|
59
|
+
<el-button
|
60
|
+
v-on:click="insertSymbol(item)"
|
61
|
+
size="default"
|
62
|
+
v-for="(item, idx) in operate"
|
63
|
+
:key="idx">
|
64
|
+
{{ item }}
|
65
|
+
</el-button>
|
93
66
|
</div>
|
67
|
+
<!-- -->
|
94
68
|
</div>
|
95
69
|
</el-col>
|
96
70
|
</el-row>
|
97
|
-
<el-row style="margin: 10px
|
71
|
+
<el-row style="margin: 10px">
|
98
72
|
<el-col :span="6">
|
99
73
|
<div class="group-item-left">
|
100
|
-
<div class="item-header">
|
101
|
-
|
74
|
+
<div class="item-header">
|
75
|
+
{{ i18nt("designer.hint.formulaWidgetList") }}
|
76
|
+
</div>
|
77
|
+
<el-input
|
78
|
+
:placeholder="i18nt('designer.hint.formulaSearch')"
|
79
|
+
v-model="filterText"
|
80
|
+
clearable></el-input>
|
102
81
|
<div class="item-body-left">
|
103
82
|
<el-tree
|
104
83
|
ref="fieldTree"
|
105
84
|
:data="fieldTreeData"
|
106
85
|
:filter-node-method="filterNode"
|
107
|
-
@node-click="insertField"
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
86
|
+
@node-click="insertField">
|
87
|
+
<template #default="{ node, data }">
|
88
|
+
<span class="custom-tree-node">
|
89
|
+
<el-tooltip
|
90
|
+
effect="dark"
|
91
|
+
:content="node.label"
|
92
|
+
placement="right">
|
93
|
+
<span>{{ node.label }}</span>
|
94
|
+
</el-tooltip>
|
95
|
+
</span>
|
96
|
+
</template>
|
114
97
|
</el-tree>
|
115
|
-
<!-- <div role="tree" class="el-tree">
|
116
|
-
<div role="treeitem" tabindex="0" draggable="false" class="el-tree-node is-focusable">
|
117
|
-
<div class="el-tree-node__content" style="padding-left: 0px;"><span
|
118
|
-
class="is-leaf el-tree-node__expand-icon el-icon-caret-right"></span><!––><!––>
|
119
|
-
<span
|
120
|
-
class="custom-tree-node"><span class="el-tooltip"
|
121
|
-
aria-describedby="el-tooltip-4169" tabindex="0">number</span></span>
|
122
|
-
</div><!––></div><!––>
|
123
|
-
<div class="el-tree__drop-indicator" style="display: none;"></div>
|
124
|
-
</div>-->
|
125
98
|
</div>
|
126
99
|
</div>
|
127
100
|
</el-col>
|
@@ -129,77 +102,36 @@
|
|
129
102
|
<el-row>
|
130
103
|
<el-col :span="24">
|
131
104
|
<div class="group-item-right-top">
|
132
|
-
<div class="item-header">
|
105
|
+
<div class="item-header">
|
106
|
+
{{
|
107
|
+
i18nt(
|
108
|
+
"designer.hint.formulaFunctionList"
|
109
|
+
)
|
110
|
+
}}
|
111
|
+
</div>
|
133
112
|
<div class="function-list">
|
134
113
|
<el-collapse v-model="funcActiveCollapseNames">
|
135
|
-
<el-collapse-item
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
class="el-tag el-tag--light">数字 </span></div>
|
155
|
-
<div class="field-item"><span>CEILING</span><span
|
156
|
-
class="el-tag el-tag--light">数字 </span></div>
|
157
|
-
<div class="field-item"><span>LOG</span><span
|
158
|
-
class="el-tag el-tag--light">数字 </span></div>
|
159
|
-
<div class="field-item"><span>MOD</span><span
|
160
|
-
class="el-tag el-tag--light">数字 </span></div>
|
161
|
-
<div class="field-item"><span>POWER</span><span
|
162
|
-
class="el-tag el-tag--light">数字 </span></div>-->
|
114
|
+
<el-collapse-item
|
115
|
+
v-for="(item, index) in funcList"
|
116
|
+
:key="index"
|
117
|
+
:title="i18nt(item.fClass)"
|
118
|
+
:name="index">
|
119
|
+
<div
|
120
|
+
v-for="(info, i) in item.flist"
|
121
|
+
:key="i"
|
122
|
+
class="field-item"
|
123
|
+
@click="insertFunction(info.fName + '(')"
|
124
|
+
@mouseenter="showIntro(i18nt(info.fName), i18nt(item.fClass), i18nt(info.fIntro))"
|
125
|
+
v-on:mouseleave="resetIntro">
|
126
|
+
<span>{{ info.fName }}</span>
|
127
|
+
<el-tag
|
128
|
+
:type="getClass(info.fType)"
|
129
|
+
>{{ i18nt(info.fType) }}
|
130
|
+
</el-tag
|
131
|
+
>
|
132
|
+
</div>
|
163
133
|
</el-collapse-item>
|
164
134
|
</el-collapse>
|
165
|
-
<!-- <div role="tablist" aria-multiselectable="true" class="el-collapse">
|
166
|
-
<div class="el-collapse-item is-active">
|
167
|
-
<div role="tab" aria-expanded="true" aria-controls="el-collapse-content-7683"
|
168
|
-
aria-describedby="el-collapse-content-7683">
|
169
|
-
<div role="button" id="el-collapse-head-7683" tabindex="0"
|
170
|
-
class="el-collapse-item__header is-active">数学函数<i
|
171
|
-
class="el-collapse-item__arrow el-icon-arrow-right is-active"></i></div>
|
172
|
-
</div>
|
173
|
-
<div role="tabpanel" aria-labelledby="el-collapse-head-7683" id="el-collapse-content-7683"
|
174
|
-
class="el-collapse-item__wrap">
|
175
|
-
<div class="el-collapse-item__content">
|
176
|
-
<div class="field-item"><span>INT</span><span
|
177
|
-
class="el-tag el-tag--light">数字 </span></div>
|
178
|
-
<div class="field-item"><span>SUM</span><span
|
179
|
-
class="el-tag el-tag--light">数字 </span></div>
|
180
|
-
<div class="field-item"><span>AVERAGE</span><span
|
181
|
-
class="el-tag el-tag--light">数字 </span></div>
|
182
|
-
<div class="field-item"><span>MAX</span><span
|
183
|
-
class="el-tag el-tag--light">数字 </span></div>
|
184
|
-
<div class="field-item"><span>MIN</span><span
|
185
|
-
class="el-tag el-tag--light">数字 </span></div>
|
186
|
-
<div class="field-item"><span>ABS</span><span
|
187
|
-
class="el-tag el-tag--light">数字 </span></div>
|
188
|
-
<div class="field-item"><span>ROUND</span><span
|
189
|
-
class="el-tag el-tag--light">数字 </span></div>
|
190
|
-
<div class="field-item"><span>CEILING</span><span
|
191
|
-
class="el-tag el-tag--light">数字 </span></div>
|
192
|
-
<div class="field-item"><span>LOG</span><span
|
193
|
-
class="el-tag el-tag--light">数字 </span></div>
|
194
|
-
<div class="field-item"><span>MOD</span><span
|
195
|
-
class="el-tag el-tag--light">数字 </span></div>
|
196
|
-
<div class="field-item"><span>POWER</span><span
|
197
|
-
class="el-tag el-tag--light">数字 </span></div>
|
198
|
-
</div>
|
199
|
-
</div>
|
200
|
-
</div>
|
201
|
-
</div>-->
|
202
|
-
|
203
135
|
</div>
|
204
136
|
</div>
|
205
137
|
</el-col>
|
@@ -210,12 +142,15 @@
|
|
210
142
|
<div class="item-header">{{ introTitle }}</div>
|
211
143
|
<div class="item-body-right-bottom">
|
212
144
|
<ul>
|
213
|
-
<li
|
214
|
-
|
215
|
-
|
145
|
+
<li
|
146
|
+
v-if="introduction.title !== ''"
|
147
|
+
style="font-size: 16px; color: #0a5d7c">
|
148
|
+
{{ introduction.title }}
|
216
149
|
</li>
|
217
150
|
<li>
|
218
|
-
<div
|
151
|
+
<div
|
152
|
+
class="intro-content"
|
153
|
+
v-html="introduction.content"></div>
|
219
154
|
</li>
|
220
155
|
</ul>
|
221
156
|
</div>
|
@@ -223,37 +158,41 @@
|
|
223
158
|
</el-col>
|
224
159
|
</el-row>
|
225
160
|
</div>
|
226
|
-
<
|
227
|
-
<el-button @click="formulaDialogVisible = false"
|
228
|
-
|
229
|
-
|
161
|
+
<div class="dialog-footer" slot="footer">
|
162
|
+
<el-button @click="formulaDialogVisible = false" class="button-sty" icon="el-icon-close">
|
163
|
+
{{ i18nt("designer.hint.cancel") }}
|
164
|
+
</el-button>
|
165
|
+
<el-button
|
166
|
+
type="primary"
|
167
|
+
@click="saveFormula"
|
168
|
+
class="button-sty"
|
169
|
+
icon="el-icon-check"
|
170
|
+
>
|
171
|
+
{{ i18nt("designer.hint.confirm") }}
|
172
|
+
</el-button>
|
173
|
+
</div>
|
230
174
|
</el-dialog>
|
231
175
|
</div>
|
232
176
|
</template>
|
233
177
|
|
234
178
|
<script>
|
235
|
-
import
|
236
|
-
|
237
|
-
|
238
|
-
import
|
239
|
-
import {Schema, DOMParser} from "prosemirror-model"*/
|
240
|
-
|
241
|
-
import {
|
242
|
-
formulas,
|
243
|
-
FORMULA_REG_EXP,
|
244
|
-
} from "../../../../../components/xform/utils/formula";
|
179
|
+
import {basicSetup, EditorView} from "codemirror"
|
180
|
+
import {javascript} from "@codemirror/lang-javascript"
|
181
|
+
import {EditorState} from "@codemirror/state";
|
182
|
+
import i18n from "@base/components/xform/utils/i18n";
|
245
183
|
import {
|
246
184
|
deepClone,
|
247
|
-
getAllFieldWidgets,
|
248
185
|
getAllContainerWidgets,
|
249
|
-
|
250
|
-
|
251
|
-
|
186
|
+
getAllFieldWidgets,
|
187
|
+
getFieldWidgetById,
|
188
|
+
traverseFieldWidgetsOfContainer
|
189
|
+
} from "@base/components/xform/utils/util";
|
190
|
+
import {placeholders, baseTheme, formulas, FORMULA_REG_EXP} from "@base/components/xform/utils/formula-util";
|
252
191
|
|
253
192
|
export default {
|
254
193
|
name: "formula-editor",
|
255
194
|
mixins: [i18n],
|
256
|
-
components: {
|
195
|
+
components: {},
|
257
196
|
props: {
|
258
197
|
designer: Object,
|
259
198
|
selectedWidget: Object,
|
@@ -261,46 +200,33 @@ export default {
|
|
261
200
|
},
|
262
201
|
computed: {
|
263
202
|
formulaForView() {
|
264
|
-
const
|
265
|
-
if (!
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
)
|
203
|
+
const matchResult = this.optionModel.formula.match(FORMULA_REG_EXP)
|
204
|
+
if (!matchResult) {
|
205
|
+
return this.optionModel.formula
|
206
|
+
}
|
207
|
+
|
208
|
+
let resultFormula = this.optionModel.formula
|
209
|
+
matchResult.forEach(mi => {
|
210
|
+
const secondPart = mi.split('.')[1]
|
211
|
+
resultFormula = resultFormula.replaceAll(mi, secondPart)
|
212
|
+
})
|
213
|
+
|
214
|
+
return resultFormula
|
274
215
|
},
|
275
216
|
},
|
276
217
|
watch: {
|
277
|
-
filterText(
|
278
|
-
this.$refs.fieldTree.filter(
|
218
|
+
filterText(val) {
|
219
|
+
this.$refs.fieldTree.filter(val);
|
279
220
|
},
|
280
221
|
},
|
281
222
|
data() {
|
282
223
|
return {
|
283
|
-
cmOptions: {
|
284
|
-
// 语言及语法模式
|
285
|
-
mode: 'text/javascript',
|
286
|
-
// 主题
|
287
|
-
theme: "idea",
|
288
|
-
// 显示函数
|
289
|
-
line: true,
|
290
|
-
lineNumbers: false,
|
291
|
-
// 软换行
|
292
|
-
lineWrapping: true,
|
293
|
-
// tab宽度
|
294
|
-
tabSize: 4,
|
295
|
-
},
|
296
|
-
formulaStr:"",
|
297
|
-
|
298
224
|
codeMirror: null,
|
299
225
|
formula: "",
|
300
|
-
tags: [],
|
301
|
-
fieldTreeData: [],
|
226
|
+
tags: [], // 公式页签集合
|
227
|
+
fieldTreeData: [], // 设计器字段树
|
302
228
|
filterText: "",
|
303
|
-
formulaDialogVisible:
|
229
|
+
formulaDialogVisible: false,
|
304
230
|
operate: [
|
305
231
|
"+",
|
306
232
|
"-",
|
@@ -325,9 +251,7 @@ export default {
|
|
325
251
|
value: "large",
|
326
252
|
},
|
327
253
|
{
|
328
|
-
label: this.i18nt(
|
329
|
-
"designer.hint.formulaSizeMedium"
|
330
|
-
),
|
254
|
+
label: this.i18nt("designer.hint.formulaSizeMedium"),
|
331
255
|
value: "default",
|
332
256
|
},
|
333
257
|
{
|
@@ -339,19 +263,17 @@ export default {
|
|
339
263
|
value: "small",
|
340
264
|
},
|
341
265
|
],
|
342
|
-
introTitle: this.i18nt(
|
343
|
-
"designer.hint.formulaFunctionExplain"
|
344
|
-
),
|
266
|
+
introTitle: this.i18nt("designer.hint.formulaFunctionExplain"),
|
345
267
|
introduction: {
|
346
268
|
title: this.i18nt("designer.hint.formulaPleaseSelect"),
|
347
269
|
content:
|
348
|
-
'<span class="cg">'
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
270
|
+
'<span class="cg">' +
|
271
|
+
this.i18nt("designer.hint.formulaSample") +
|
272
|
+
':</span><span class="fname">SUM</span><span class="cg">(</span><span class="cs">' +
|
273
|
+
this.i18nt("designer.hint.formulaPara") +
|
274
|
+
'1</span><span class="cg">,</span><span class="cs">' +
|
275
|
+
this.i18nt("designer.hint.formulaPara") +
|
276
|
+
'2</span><span class="cg">)</span>',
|
355
277
|
},
|
356
278
|
funcList: formulas,
|
357
279
|
funcActiveCollapseNames: [0],
|
@@ -360,332 +282,476 @@ export default {
|
|
360
282
|
mounted() {
|
361
283
|
},
|
362
284
|
methods: {
|
363
|
-
clearFormula(
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
changes: {
|
368
|
-
from: 0,
|
369
|
-
to: this.codeMirror.view.state.doc.length,
|
370
|
-
insert: "",
|
371
|
-
},
|
372
|
-
});
|
285
|
+
clearFormula(event) {
|
286
|
+
this.formula = ""; //CodeMirror 模式
|
287
|
+
this.tags = []; //el-tag模式
|
288
|
+
this.codeMirror.dispatch({changes: {from: 0, to: this.codeMirror.state.doc.length, insert: ""}})
|
373
289
|
},
|
374
|
-
|
375
|
-
|
376
|
-
|
290
|
+
|
291
|
+
/** 删除字符串str中的第n个subStr
|
292
|
+
* @param {Object} str
|
293
|
+
* @param {Object} subStr
|
294
|
+
* @param {Object} n
|
295
|
+
*/
|
296
|
+
deleteChar(str, subStr, n) {
|
297
|
+
let num = -1;
|
298
|
+
return str.replace(/a/g, (item) => {
|
299
|
+
num++;
|
300
|
+
return num === n ? "" : item;
|
301
|
+
});
|
377
302
|
},
|
378
|
-
|
379
|
-
|
303
|
+
|
304
|
+
filterNode(value, data) {
|
305
|
+
if (!value) return true;
|
306
|
+
return data.label.indexOf(value) !== -1;
|
380
307
|
},
|
308
|
+
|
381
309
|
loadFieldListToTree() {
|
382
|
-
this.fieldTreeData.length = 0
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
const
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
310
|
+
this.fieldTreeData.length = 0 //先清空
|
311
|
+
|
312
|
+
const allFields = getAllFieldWidgets(this.designer.widgetList);
|
313
|
+
const allContainers = getAllContainerWidgets(this.designer.widgetList)
|
314
|
+
|
315
|
+
const subFormArray = []
|
316
|
+
let sfFieldArray = []
|
317
|
+
const subFormFieldMap = {}
|
318
|
+
|
319
|
+
//获取子表单容器内部的字段
|
320
|
+
allContainers.forEach(con => {
|
321
|
+
if ((con.type === 'sub-form') || (con.type === 'grid-sub-form')) {
|
322
|
+
subFormArray.push(con.container)
|
323
|
+
|
324
|
+
const tmpFieldArray = []
|
325
|
+
const fwHandler = (fw) => {
|
326
|
+
if (!!fw.formItemFlag && (fw.type === 'number')) {
|
327
|
+
tmpFieldArray.push(fw)
|
328
|
+
}
|
329
|
+
}
|
330
|
+
traverseFieldWidgetsOfContainer(con.container, fwHandler)
|
331
|
+
subFormFieldMap[con.container.options.name] = tmpFieldArray
|
332
|
+
sfFieldArray = sfFieldArray.concat(tmpFieldArray)
|
403
333
|
}
|
404
|
-
})
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
&& u.type === "number"
|
416
|
-
&& this.fieldTreeData.push(u);
|
334
|
+
})
|
335
|
+
|
336
|
+
//加载到树形组件数据对象
|
337
|
+
allFields.forEach(fld => {
|
338
|
+
if (!sfFieldArray.find(item => item.id === fld.field.id)) { //排除子表单字段
|
339
|
+
const fieldNode = {
|
340
|
+
id: fld.field.id,
|
341
|
+
name: fld.field.options.name,
|
342
|
+
label: fld.field.options.label,
|
343
|
+
type: fld.field.type,
|
344
|
+
formItemFlag: true
|
417
345
|
}
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
346
|
+
|
347
|
+
if ((fieldNode.name !== this.optionModel.name) && (fieldNode.type === 'number')) { //排除当前设置公式字段
|
348
|
+
this.fieldTreeData.push(fieldNode)
|
349
|
+
}
|
350
|
+
}
|
351
|
+
})
|
352
|
+
|
353
|
+
subFormArray.forEach(sf => {
|
354
|
+
const subFormNode = {
|
355
|
+
id: sf.id,
|
356
|
+
name: sf.options.name,
|
357
|
+
label: sf.options.label || sf.options.name,
|
358
|
+
type: sf.type,
|
359
|
+
formItemFlag: false,
|
360
|
+
children: []
|
361
|
+
}
|
362
|
+
|
363
|
+
subFormFieldMap[sf.options.name].forEach(fld => {
|
364
|
+
const fieldNode = {
|
365
|
+
id: fld.id,
|
366
|
+
name: fld.options.name,
|
367
|
+
label: fld.options.label,
|
368
|
+
type: fld.type,
|
369
|
+
formItemFlag: true
|
370
|
+
}
|
371
|
+
|
372
|
+
if (fieldNode.name !== this.optionModel.name) { //排除当前设置公式字段
|
373
|
+
subFormNode.children.push(fieldNode)
|
374
|
+
}
|
375
|
+
})
|
376
|
+
|
377
|
+
this.fieldTreeData.push(subFormNode)
|
378
|
+
})
|
441
379
|
},
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
380
|
+
|
381
|
+
// 插入字段
|
382
|
+
insertField(obj, node, self) {
|
383
|
+
if (!!obj.formItemFlag) {
|
384
|
+
let fieldId = obj.id
|
385
|
+
let fieldLabel = '[' + obj.label + ']'
|
386
|
+
this.updateCodeMirror(fieldId, fieldLabel, "field");
|
447
387
|
}
|
448
388
|
},
|
449
|
-
|
450
|
-
|
389
|
+
|
390
|
+
// 插入符号
|
391
|
+
insertSymbol(opt) {
|
392
|
+
this.updateCodeMirror(opt, opt, null);
|
451
393
|
},
|
452
|
-
|
453
|
-
|
454
|
-
|
394
|
+
|
395
|
+
// 插入函数
|
396
|
+
insertFunction(opt) {
|
397
|
+
const val = opt.substring(0, opt.length - 1);
|
398
|
+
this.updateCodeMirror(val, val, "func");
|
455
399
|
},
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
400
|
+
|
401
|
+
updateCodeMirror(field, text, type = null) {
|
402
|
+
if (type) {
|
403
|
+
let obj = {
|
404
|
+
field: field,
|
405
|
+
text: text,
|
406
|
+
type: type
|
407
|
+
}
|
408
|
+
let selectionLet = obj.field.length + obj.text.length + obj.type.length;//光标位置;
|
409
|
+
let code = `{{${obj.field}.${obj.text}.${obj.type}}}`;
|
410
|
+
if (type === "func") {
|
411
|
+
code += "()";
|
412
|
+
selectionLet = selectionLet + 7
|
413
|
+
} else {
|
414
|
+
selectionLet = selectionLet + 6;
|
415
|
+
}
|
416
|
+
|
417
|
+
if (code) {
|
418
|
+
this.codeMirror.dispatch({
|
419
|
+
changes: {
|
420
|
+
from: this.codeMirror.state.selection.main.head,
|
421
|
+
to: this.codeMirror.state.selection.main.head,
|
422
|
+
insert: code
|
423
|
+
},
|
424
|
+
selection: {anchor: this.codeMirror.state.selection.main.head + selectionLet},
|
425
|
+
});
|
426
|
+
}
|
427
|
+
} else {
|
428
|
+
this.codeMirror.dispatch({
|
478
429
|
changes: {
|
479
|
-
from: this.codeMirror.
|
480
|
-
to: this.codeMirror.view.state.selection.head,
|
481
|
-
insert: e,
|
482
|
-
},
|
483
|
-
selection: {
|
484
|
-
anchor:
|
485
|
-
this.codeMirror.view.state.selection.head
|
486
|
-
+ e.length,
|
430
|
+
from: this.codeMirror.state.selection.main.head, to: this.codeMirror.state.selection.main.head, insert: text
|
487
431
|
},
|
432
|
+
selection: {anchor: this.codeMirror.state.selection.main.head + text.length}
|
488
433
|
});
|
434
|
+
|
435
|
+
}
|
489
436
|
},
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
let
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
437
|
+
|
438
|
+
// 在字符串中查找[开始]结尾的字符串,并删除
|
439
|
+
removeStr(str) {
|
440
|
+
let a = str.indexOf("[");
|
441
|
+
if (a === -1) {
|
442
|
+
return str;
|
443
|
+
}
|
444
|
+
let b = str.indexOf("]", a) + 1;
|
445
|
+
let c = str.substring(a, b);
|
446
|
+
let strArr = str.split(c);
|
447
|
+
let newStr = "";
|
448
|
+
for (let i = 0; i < strArr.length; i++) {
|
449
|
+
newStr += strArr[i];
|
450
|
+
}
|
451
|
+
return this.removeStr(newStr);
|
499
452
|
},
|
453
|
+
|
454
|
+
/**
|
455
|
+
* 字段label可能在公式保存后再次被修改,当编辑公式时需要再次刷新公式中的字段label(不刷新也不会影响公式计算结果)
|
456
|
+
*/
|
500
457
|
refreshFormula() {
|
501
|
-
const
|
502
|
-
if (!
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
const
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
458
|
+
const matchResult = this.optionModel.formula.match(FORMULA_REG_EXP)
|
459
|
+
if (!matchResult) {
|
460
|
+
return this.optionModel.formula
|
461
|
+
}
|
462
|
+
|
463
|
+
matchResult.forEach(mi => {
|
464
|
+
const firstPart = mi.split('.')[0]
|
465
|
+
const secondPart = mi.split('.')[1]
|
466
|
+
const thirdPart = mi.split('.')[2]
|
467
|
+
const nodeType = thirdPart.substring(0, thirdPart.length - 2)
|
468
|
+
if (nodeType === 'func') {
|
469
|
+
return
|
470
|
+
}
|
471
|
+
|
472
|
+
const fieldId = firstPart.substring(2, firstPart.length)
|
473
|
+
const fieldSchema = getFieldWidgetById(this.designer.widgetList, fieldId, false)
|
474
|
+
if (!!fieldSchema) {
|
475
|
+
const newLabel = fieldSchema.options.label || fieldSchema.options.name
|
476
|
+
this.optionModel.formula = this.optionModel.formula.replace(mi,
|
477
|
+
firstPart + '.[' + newLabel + '].' + thirdPart)
|
478
|
+
} else {
|
479
|
+
this.$message.error(this.i18nt("designer.hint.deletedFieldInFormula") + secondPart)
|
480
|
+
}
|
481
|
+
})
|
520
482
|
},
|
483
|
+
|
484
|
+
// 打开编辑公式弹窗
|
521
485
|
editFormula() {
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
],*!/
|
552
|
-
}),
|
553
|
-
parent: this.$refs.cmRef,
|
554
|
-
})),
|
555
|
-
console.log(
|
556
|
-
"编辑器实例==>",
|
557
|
-
this.codeMirror
|
558
|
-
);*/
|
486
|
+
this.fieldTreeData.length = 0
|
487
|
+
// 初始化字段树
|
488
|
+
this.designer.widgetList.forEach((wItem) => {
|
489
|
+
if (this.optionModel.name !== wItem.id) {
|
490
|
+
//this.buildTreeNodeOfWidget(wItem, this.fieldTreeData);
|
491
|
+
this.loadFieldListToTree()
|
492
|
+
}
|
493
|
+
})
|
494
|
+
|
495
|
+
console.log("设计器字段===>", this.fieldTreeData)
|
496
|
+
|
497
|
+
// 加载当前字段计算公式tags
|
498
|
+
this.tags = deepClone(this.optionModel.formulaTags)
|
499
|
+
// this.formula = deepClone(this.optionModel.formula);
|
500
|
+
|
501
|
+
//const code = this.optionModel.formulaShow;
|
502
|
+
this.refreshFormula()
|
503
|
+
const code = this.optionModel.formula
|
504
|
+
this.formulaDialogVisible = true
|
505
|
+
|
506
|
+
//==== codeMirror 挂载视图 ====
|
507
|
+
this.$nextTick(() => {
|
508
|
+
this.codeMirror = new EditorView({
|
509
|
+
state: EditorState.create({
|
510
|
+
doc: code,
|
511
|
+
extensions: [basicSetup, javascript(),
|
512
|
+
[baseTheme, [], placeholders]],
|
513
|
+
}),
|
514
|
+
parent: this.$refs.cmRef
|
559
515
|
});
|
516
|
+
console.log("编辑器实例==>", this.codeMirror)
|
517
|
+
})
|
560
518
|
},
|
519
|
+
|
520
|
+
// 保存计算公式
|
561
521
|
saveFormula() {
|
562
|
-
|
563
|
-
|
564
|
-
(this.formulaDialogVisible = !1);
|
522
|
+
this.optionModel.formula = this.codeMirror.state.doc.text.join('')
|
523
|
+
this.formulaDialogVisible = false;
|
565
524
|
},
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
let
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
)
|
578
|
-
|
525
|
+
|
526
|
+
// 解析计算公式 STEP1:将公式中的字段转换为【英文表名.英文字段名】
|
527
|
+
analysisFormula(formula) {
|
528
|
+
let a = formula.indexOf("[");
|
529
|
+
if (a === -1) {
|
530
|
+
return formula;
|
531
|
+
}
|
532
|
+
let b = formula.indexOf("]", a) + 1;
|
533
|
+
let cnField = formula.substring(a, b);
|
534
|
+
let enFieldName = this.findTreeNodeByCnName(cnField);
|
535
|
+
if (!!enFieldName) {
|
536
|
+
formula = formula.replace(cnField, "{" + enFieldName + "}");
|
537
|
+
return this.analysisFormula(formula);
|
538
|
+
} else {
|
539
|
+
this.$message.error(cnField + " 字段无法识别");
|
540
|
+
return false;
|
541
|
+
}
|
579
542
|
},
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
543
|
+
|
544
|
+
// 根据树节点中文名查找树节点
|
545
|
+
findTreeNodeByCnName(nodeCnName) {
|
546
|
+
let enTableName = "",
|
547
|
+
enFieldName = "";
|
548
|
+
let tableFieldName = nodeCnName.split("[")[1].split("]")[0];
|
549
|
+
let tableName = tableFieldName.split("-")[0];
|
550
|
+
let fieldName = tableFieldName.split("-")[1];
|
551
|
+
let moduleList = this.fieldTreeData;
|
552
|
+
for (let i = 0; i < moduleList.length; i++) {
|
553
|
+
let tableList = moduleList[i].children;
|
554
|
+
for (let j = 0; j < tableList.length; j++) {
|
555
|
+
if (tableList[j].cnTitle === tableName) {
|
556
|
+
enTableName = tableList[j].enTitle;
|
557
|
+
let fieldList = tableList[j].children;
|
558
|
+
for (let k = 0; k < fieldList.length; k++) {
|
559
|
+
if (fieldList[k].cnTitle === fieldName) {
|
560
|
+
enFieldName = fieldList[k].enTitle;
|
561
|
+
return enTableName + "-" + enFieldName;
|
562
|
+
}
|
563
|
+
}
|
596
564
|
}
|
565
|
+
}
|
597
566
|
}
|
567
|
+
// 没找到节点返回NULL
|
598
568
|
return null;
|
599
569
|
},
|
600
|
-
|
601
|
-
|
570
|
+
|
571
|
+
getClass(type) {
|
572
|
+
if (type === this.i18nt("designer.hint.formulaNumber")) {
|
602
573
|
return "warning";
|
603
|
-
|
574
|
+
}
|
575
|
+
if (type === this.i18nt("designer.hint.formulaChar")) {
|
604
576
|
return "";
|
605
|
-
|
577
|
+
}
|
578
|
+
if (type === this.i18nt("designer.hint.formulaObject")) {
|
606
579
|
return "danger";
|
580
|
+
}
|
607
581
|
},
|
582
|
+
|
608
583
|
resetIntro() {
|
609
|
-
|
584
|
+
this.introTitle = this.i18nt(
|
610
585
|
"designer.hint.formulaFunctionExplain"
|
611
|
-
)
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
+ ':</span><span class="fname">SUM</span><span class="cg">(</span><span class="cs">参数1</span><span class="cg">,</span><span class="cs">参数2</span><span class="cg">)</span>',
|
620
|
-
});
|
586
|
+
);
|
587
|
+
this.introduction = {
|
588
|
+
title: this.i18nt("designer.hint.formulaPleaseSelect"),
|
589
|
+
content:
|
590
|
+
'<span class="cg">' +
|
591
|
+
this.i18nt("designer.hint.formulaSample") +
|
592
|
+
':</span><span class="fname">SUM</span><span class="cg">(</span><span class="cs">参数1</span><span class="cg">,</span><span class="cs">参数2</span><span class="cg">)</span>',
|
593
|
+
};
|
621
594
|
},
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
595
|
+
|
596
|
+
showIntro(name, title, content) {
|
597
|
+
content = '<span class="cg">' + content + "</span>";
|
598
|
+
this.introduction = {
|
599
|
+
title: title,
|
600
|
+
content: content,
|
601
|
+
};
|
602
|
+
this.introTitle = name;
|
626
603
|
},
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
604
|
+
|
605
|
+
/**
|
606
|
+
* 校验计算公式是否正确
|
607
|
+
* @param s
|
608
|
+
* @returns {boolean}
|
609
|
+
*/
|
610
|
+
isValid(s) {
|
611
|
+
let a = []; //存储左括号出现的地方
|
612
|
+
let l = s.length;
|
613
|
+
let k = 0;
|
614
|
+
let flag = 1;
|
615
|
+
let j;
|
616
|
+
for (let i = 0; i < l && flag; i++) {
|
617
|
+
switch (s[i]) {
|
635
618
|
case "(":
|
636
|
-
|
619
|
+
a[k] = i;
|
620
|
+
k++;
|
637
621
|
break;
|
638
622
|
case ")":
|
639
|
-
|
640
|
-
|
623
|
+
j = a[k - 1];
|
624
|
+
if (s[j] === "(") {
|
625
|
+
a[k] = 0;
|
626
|
+
k--;
|
627
|
+
} else {
|
628
|
+
flag = 0;
|
629
|
+
}
|
641
630
|
break;
|
642
631
|
case "{":
|
643
|
-
|
632
|
+
a[k] = i;
|
633
|
+
k++;
|
644
634
|
break;
|
645
635
|
case "}":
|
646
|
-
|
647
|
-
|
636
|
+
j = a[k - 1];
|
637
|
+
if (s[j] === "{") {
|
638
|
+
a[k] = 0;
|
639
|
+
k--;
|
640
|
+
} else {
|
641
|
+
flag = 0;
|
642
|
+
}
|
648
643
|
break;
|
649
644
|
case "[":
|
650
|
-
|
645
|
+
a[k] = i;
|
646
|
+
k++;
|
651
647
|
break;
|
652
648
|
case "]":
|
653
|
-
|
654
|
-
|
649
|
+
j = a[k - 1];
|
650
|
+
if (s[j] === "[") {
|
651
|
+
a[k] = 0;
|
652
|
+
k--;
|
653
|
+
} else {
|
654
|
+
flag = 0;
|
655
|
+
}
|
655
656
|
break;
|
656
657
|
}
|
657
|
-
|
658
|
+
}
|
659
|
+
if (k !== 0) {
|
660
|
+
flag = 0;
|
661
|
+
}
|
662
|
+
return flag !== 0;
|
658
663
|
},
|
659
664
|
},
|
660
|
-
}
|
665
|
+
};
|
661
666
|
</script>
|
662
667
|
|
663
|
-
<style scoped>
|
668
|
+
<style lang="scss" scoped>
|
669
|
+
:deep(.cm-editor) {
|
670
|
+
height: 100%;
|
671
|
+
}
|
672
|
+
|
673
|
+
li {
|
674
|
+
list-style: none;
|
675
|
+
}
|
676
|
+
|
677
|
+
/*去掉li前面的点*/
|
678
|
+
.el-input-group {
|
679
|
+
cursor: pointer;
|
680
|
+
}
|
681
|
+
|
682
|
+
.header {
|
683
|
+
width: 97%;
|
684
|
+
border: 1px solid #ccc;
|
685
|
+
border-top-left-radius: 10px;
|
686
|
+
border-top-right-radius: 10px;
|
687
|
+
height: 31px;
|
688
|
+
line-height: 31px;
|
689
|
+
padding-left: 15px;
|
690
|
+
}
|
691
|
+
|
692
|
+
.editor {
|
693
|
+
margin-left: 10px;
|
694
|
+
margin-right: 10px;
|
695
|
+
height: 200px;
|
696
|
+
border: 1px solid #ccc;
|
697
|
+
border-radius: 6px;
|
698
|
+
}
|
699
|
+
|
700
|
+
.editor-top {
|
701
|
+
//margin-left: 10px;
|
702
|
+
height: 130px;
|
703
|
+
width: 100%;
|
704
|
+
padding: 8px;
|
705
|
+
position: relative;
|
706
|
+
overflow-x: hidden;
|
707
|
+
overflow-y: scroll;
|
708
|
+
}
|
709
|
+
|
710
|
+
.editor-bottom {
|
711
|
+
border-left: 1px solid #ccc;
|
712
|
+
display: flex;
|
713
|
+
flex-wrap: wrap;
|
714
|
+
padding: 5px;
|
715
|
+
align-content: flex-start;
|
716
|
+
}
|
717
|
+
|
718
|
+
.body-right-button {
|
719
|
+
width: 60px;
|
720
|
+
height: 40px;
|
721
|
+
}
|
722
|
+
|
723
|
+
.group-form {
|
724
|
+
margin-top: 15px;
|
725
|
+
display: flex;
|
726
|
+
justify-content: space-between;
|
727
|
+
height: 350px;
|
728
|
+
}
|
729
|
+
|
664
730
|
.group-item-left {
|
665
|
-
height:
|
731
|
+
height: 350px;
|
666
732
|
border: 1px solid #ccc;
|
667
733
|
border-top-left-radius: 6px;
|
668
734
|
border-bottom-left-radius: 6px;
|
669
735
|
margin-bottom: 5px;
|
670
736
|
padding: 0;
|
671
|
-
width: 100
|
737
|
+
width: 100%;
|
672
738
|
}
|
673
739
|
|
674
740
|
.group-item-right-top {
|
675
|
-
height:
|
741
|
+
height: 350px;
|
676
742
|
border: 1px solid #ccc;
|
677
743
|
border-radius: 0;
|
678
744
|
margin-bottom: 5px;
|
679
|
-
width: 100
|
745
|
+
width: 100%;
|
680
746
|
}
|
681
747
|
|
682
748
|
.group-item-right-bottom {
|
683
|
-
height:
|
749
|
+
height: 350px;
|
684
750
|
border: 1px solid #ccc;
|
685
751
|
border-top-right-radius: 6px;
|
686
752
|
border-bottom-right-radius: 6px;
|
687
753
|
margin-bottom: 5px;
|
688
|
-
width: 100
|
754
|
+
width: 100%;
|
689
755
|
}
|
690
756
|
|
691
757
|
.item-header {
|
@@ -693,25 +759,111 @@ export default {
|
|
693
759
|
height: 29px;
|
694
760
|
line-height: 29px;
|
695
761
|
padding-left: 15px;
|
696
|
-
font-weight:
|
762
|
+
font-weight: bold;
|
697
763
|
}
|
698
764
|
|
699
765
|
.item-body-left {
|
700
766
|
height: 320px;
|
701
|
-
overflow-y: auto
|
767
|
+
overflow-y: auto;
|
702
768
|
}
|
703
769
|
|
704
770
|
.function-list {
|
705
|
-
height:
|
706
|
-
overflow-y: auto
|
707
|
-
}
|
771
|
+
height: 320px;
|
772
|
+
overflow-y: auto;
|
708
773
|
|
709
|
-
.
|
710
|
-
|
774
|
+
:deep(.el-collapse-item__header) {
|
775
|
+
font-weight: normal !important;
|
776
|
+
}
|
711
777
|
}
|
712
778
|
|
713
779
|
.item-body-right-bottom {
|
714
780
|
height: 152px;
|
715
|
-
overflow-y: auto
|
781
|
+
overflow-y: auto;
|
782
|
+
}
|
783
|
+
|
784
|
+
.el-collapse {
|
785
|
+
border: none;
|
786
|
+
}
|
787
|
+
|
788
|
+
:deep(.el-dialog) {
|
789
|
+
margin-top: 10px !important;
|
790
|
+
}
|
791
|
+
|
792
|
+
:deep(.el-collapse-item__header) {
|
793
|
+
padding-left: 10px;
|
794
|
+
border: none;
|
795
|
+
}
|
796
|
+
|
797
|
+
:deep(.el-collapse-item__wrap) {
|
798
|
+
border: none;
|
799
|
+
}
|
800
|
+
|
801
|
+
:deep(.el-collapse-item__arrow) {
|
802
|
+
margin-left: 8px;
|
803
|
+
}
|
804
|
+
|
805
|
+
.field-item {
|
806
|
+
display: flex;
|
807
|
+
justify-content: space-between;
|
808
|
+
align-items: center;
|
809
|
+
height: 32px;
|
810
|
+
padding-left: 30px;
|
811
|
+
padding-right: 15px;
|
812
|
+
cursor: pointer;
|
813
|
+
}
|
814
|
+
|
815
|
+
.field-item:hover {
|
816
|
+
background-color: #f8f8f8;
|
817
|
+
}
|
818
|
+
|
819
|
+
p::before {
|
820
|
+
content: "● ";
|
821
|
+
color: #0a5d7c;
|
822
|
+
}
|
823
|
+
|
824
|
+
p {
|
825
|
+
height: 24px;
|
826
|
+
line-height: 24px;
|
827
|
+
padding: 0 15px;
|
828
|
+
font-size: 16px;
|
829
|
+
color: #0a5d7c;
|
830
|
+
}
|
831
|
+
|
832
|
+
.intro-content {
|
833
|
+
padding-left: 30px;
|
834
|
+
}
|
835
|
+
|
836
|
+
.cg {
|
837
|
+
color: #0a5d7c;
|
838
|
+
}
|
839
|
+
|
840
|
+
.fname {
|
841
|
+
display: inline-block;
|
842
|
+
border-radius: 2px;
|
843
|
+
padding: 0 5px;
|
844
|
+
margin: 1px;
|
845
|
+
font-size: 12px;
|
846
|
+
line-height: 20px;
|
847
|
+
color: #708;
|
848
|
+
background: #fff;
|
849
|
+
}
|
850
|
+
|
851
|
+
.cs {
|
852
|
+
display: inline-block;
|
853
|
+
border-radius: 2px;
|
854
|
+
padding: 0 5px;
|
855
|
+
margin: 1px;
|
856
|
+
color: #fff;
|
857
|
+
font-size: 12px;
|
858
|
+
line-height: 20px;
|
859
|
+
background: #178cdf;
|
860
|
+
}
|
861
|
+
|
862
|
+
:deep(.el-dialog__body) {
|
863
|
+
padding: 0;
|
864
|
+
}
|
865
|
+
|
866
|
+
.small-padding-dialog {
|
867
|
+
/* margin-top: 0px; */
|
716
868
|
}
|
717
869
|
</style>
|