matrix_components 2.0.366 → 2.0.367
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/dist/ComponentDemo/DialogDemo.vue +210 -0
- package/dist/ComponentDemo/ExampleFormConfig.js +270 -0
- package/dist/ComponentDemo/ExcelDemo.vue +263 -0
- package/dist/ComponentDemo/FormDemo copy 2.vue +557 -0
- package/dist/ComponentDemo/FormDemo copy.vue +454 -0
- package/dist/ComponentDemo/FormDemo.vue +560 -0
- package/dist/ComponentDemo/ImageDemo.vue +27 -0
- package/dist/ComponentDemo/MDDemo.vue +20 -0
- package/dist/ComponentDemo/OfficeDemo.vue +189 -0
- package/dist/ComponentDemo/PdfDemo.vue +207 -0
- package/dist/ComponentDemo/SaturationLineDemo.vue +158 -0
- package/dist/ComponentDemo/SimpleFormConfig.json +97 -0
- package/dist/ComponentDemo/Test.vue +437 -0
- package/dist/ComponentDemo/TestFormConfig.js +129 -0
- package/dist/ComponentDemo/VideoDemo.vue +301 -0
- package/dist/ComponentDemo/WordDemo.vue +191 -0
- package/dist/matrix_components.css +1 -1
- package/dist/matrix_components.js +10 -10
- package/dist/matrix_components.umd.cjs +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="office-demo">
|
|
3
|
+
<h2>NsOffice 组件演示</h2>
|
|
4
|
+
|
|
5
|
+
<div class="demo-controls">
|
|
6
|
+
<!-- 文件上传方式 -->
|
|
7
|
+
<div class="upload-section">
|
|
8
|
+
<h3>方式一:文件上传</h3>
|
|
9
|
+
<input
|
|
10
|
+
type="file"
|
|
11
|
+
@change="importFile(($event.target as any)?.files?.[0])"
|
|
12
|
+
accept=".docx,.xlsx,.xls,.pdf"
|
|
13
|
+
/>
|
|
14
|
+
<el-button @click="clearFile" :disabled="!file">清除文件</el-button>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- URL方式 -->
|
|
18
|
+
<el-form :model="form" label-width="120px" inline>
|
|
19
|
+
<el-form-item label="文件URL:">
|
|
20
|
+
<el-input v-model="form.url" placeholder="请输入文件URL" style="width: 400px" />
|
|
21
|
+
</el-form-item>
|
|
22
|
+
|
|
23
|
+
<el-form-item label="Excel编辑模式:">
|
|
24
|
+
<el-switch v-model="form.isEdit" />
|
|
25
|
+
</el-form-item>
|
|
26
|
+
|
|
27
|
+
<el-form-item>
|
|
28
|
+
<el-button type="primary" @click="loadFile">加载文件</el-button>
|
|
29
|
+
<el-button @click="clearUrl">清空</el-button>
|
|
30
|
+
</el-form-item>
|
|
31
|
+
</el-form>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<div class="demo-content">
|
|
35
|
+
<el-card v-if="currentUrl">
|
|
36
|
+
<template #header>
|
|
37
|
+
<div class="card-header">
|
|
38
|
+
<span>当前文件: {{ getFileName(currentUrl) }}</span>
|
|
39
|
+
<span class="file-type">类型: {{ getFileTypeDisplay() }}</span>
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<div class="office-container">
|
|
44
|
+
<NsOffice v-bind="form" ref="officeRef" />
|
|
45
|
+
</div>
|
|
46
|
+
</el-card>
|
|
47
|
+
|
|
48
|
+
<el-empty v-else description="请输入文件URL或选择预设文件" />
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<script setup lang="ts">
|
|
54
|
+
import { ref, reactive } from 'vue'
|
|
55
|
+
const form = reactive({
|
|
56
|
+
url: '',
|
|
57
|
+
isEdit: false,
|
|
58
|
+
isShowDialog: false,
|
|
59
|
+
dialogWidth: '1200px',
|
|
60
|
+
dialogHeight: '700px',
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const currentUrl = ref('')
|
|
64
|
+
const officeRef = ref()
|
|
65
|
+
const file = ref()
|
|
66
|
+
|
|
67
|
+
// 文件上传处理
|
|
68
|
+
function importFile(f: any) {
|
|
69
|
+
// 清除URL,使用文件上传
|
|
70
|
+
form.url = ''
|
|
71
|
+
file.value = f
|
|
72
|
+
|
|
73
|
+
if (f && (f.name.endsWith('.docx') || f.name.endsWith('.xlsx') || f.name.endsWith('.xls') || f.name.endsWith('.pdf'))) {
|
|
74
|
+
// 创建文件URL
|
|
75
|
+
const fileUrl = URL.createObjectURL(f)
|
|
76
|
+
currentUrl.value = fileUrl
|
|
77
|
+
form.url = fileUrl
|
|
78
|
+
} else if (f) {
|
|
79
|
+
alert('请选择支持的文件格式(.docx, .xlsx, .xls, .pdf)')
|
|
80
|
+
clearFile()
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const loadFile = () => {
|
|
85
|
+
if (form.url.trim()) {
|
|
86
|
+
currentUrl.value = form.url.trim()
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const clearFile = () => {
|
|
91
|
+
file.value = null
|
|
92
|
+
if (currentUrl.value.startsWith('blob:')) {
|
|
93
|
+
URL.revokeObjectURL(currentUrl.value)
|
|
94
|
+
}
|
|
95
|
+
currentUrl.value = ''
|
|
96
|
+
form.url = ''
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const clearUrl = () => {
|
|
100
|
+
form.url = ''
|
|
101
|
+
currentUrl.value = ''
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const getFileName = (url: string) => {
|
|
105
|
+
if (!url) return ''
|
|
106
|
+
const parts = url.split('/')
|
|
107
|
+
return parts[parts.length - 1]
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const getFileTypeDisplay = () => {
|
|
111
|
+
if (officeRef.value) {
|
|
112
|
+
const fileType = officeRef.value.getFileType()
|
|
113
|
+
switch (fileType) {
|
|
114
|
+
case 'excel':
|
|
115
|
+
return 'Excel文档'
|
|
116
|
+
case 'pdf':
|
|
117
|
+
return 'PDF文档'
|
|
118
|
+
case 'word':
|
|
119
|
+
return 'Word文档'
|
|
120
|
+
case 'unsupported':
|
|
121
|
+
return '不支持的格式'
|
|
122
|
+
default:
|
|
123
|
+
return '未知'
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return '未知'
|
|
127
|
+
}
|
|
128
|
+
</script>
|
|
129
|
+
|
|
130
|
+
<style scoped>
|
|
131
|
+
.office-demo {
|
|
132
|
+
padding: 20px;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.demo-controls {
|
|
136
|
+
margin-bottom: 20px;
|
|
137
|
+
padding: 20px;
|
|
138
|
+
background: #f5f5f5;
|
|
139
|
+
border-radius: 8px;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.upload-section {
|
|
143
|
+
margin-bottom: 20px;
|
|
144
|
+
padding: 15px;
|
|
145
|
+
background: white;
|
|
146
|
+
border-radius: 6px;
|
|
147
|
+
border: 1px solid #e0e0e0;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.upload-section h3 {
|
|
151
|
+
margin: 0 0 10px 0;
|
|
152
|
+
color: #666;
|
|
153
|
+
font-size: 14px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.upload-section input[type='file'] {
|
|
157
|
+
margin-right: 10px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.preset-files {
|
|
161
|
+
margin-top: 20px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.preset-files h3 {
|
|
165
|
+
margin-bottom: 10px;
|
|
166
|
+
color: #666;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.demo-content {
|
|
170
|
+
min-height: 700px;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.card-header {
|
|
174
|
+
display: flex;
|
|
175
|
+
justify-content: space-between;
|
|
176
|
+
align-items: center;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.file-type {
|
|
180
|
+
color: #409eff;
|
|
181
|
+
font-size: 14px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.office-container {
|
|
185
|
+
height: 600px;
|
|
186
|
+
border: 1px solid #e4e7ed;
|
|
187
|
+
border-radius: 4px;
|
|
188
|
+
}
|
|
189
|
+
</style>
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="demo-container">
|
|
3
|
+
<div class="control-panel">
|
|
4
|
+
<h3>PDF 文档预览演示</h3>
|
|
5
|
+
|
|
6
|
+
<!-- 文件上传方式 -->
|
|
7
|
+
<div class="upload-section">
|
|
8
|
+
<h4>方式一:文件上传</h4>
|
|
9
|
+
<input
|
|
10
|
+
type="file"
|
|
11
|
+
@change="importPdf(($event.target as any)?.files?.[0])"
|
|
12
|
+
accept=".pdf"
|
|
13
|
+
/>
|
|
14
|
+
<button @click="clearFile" :disabled="!file">清除文件</button>
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
<!-- URL方式 -->
|
|
18
|
+
<div class="url-section">
|
|
19
|
+
<h4>方式二:URL地址</h4>
|
|
20
|
+
<input
|
|
21
|
+
v-model="pdfUrl"
|
|
22
|
+
type="text"
|
|
23
|
+
placeholder="请输入PDF文档的URL地址"
|
|
24
|
+
class="url-input"
|
|
25
|
+
/>
|
|
26
|
+
<button @click="loadFromUrl" :disabled="!pdfUrl.trim()">加载URL</button>
|
|
27
|
+
<button @click="clearUrl" :disabled="!pdfUrl">清除URL</button>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
<!-- 搜索功能 -->
|
|
31
|
+
<div class="search-section">
|
|
32
|
+
<h4>文档搜索</h4>
|
|
33
|
+
<input
|
|
34
|
+
v-model="searchKeyword"
|
|
35
|
+
type="text"
|
|
36
|
+
placeholder="输入要搜索的关键字"
|
|
37
|
+
class="search-input"
|
|
38
|
+
/>
|
|
39
|
+
<button @click="clickPdf" :disabled="!searchKeyword.trim()">搜索</button>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- PDF组件 -->
|
|
44
|
+
<div class="pdf-container">
|
|
45
|
+
<NsPdf
|
|
46
|
+
v-if="counts"
|
|
47
|
+
ref="pdfRef"
|
|
48
|
+
:url="currentUrl"
|
|
49
|
+
:hasTool="true">
|
|
50
|
+
</NsPdf>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<script setup lang="ts">
|
|
56
|
+
import { ref, nextTick } from 'vue'
|
|
57
|
+
|
|
58
|
+
const counts = ref(true)
|
|
59
|
+
const file = ref()
|
|
60
|
+
const pdfRef = ref()
|
|
61
|
+
const pdfUrl = ref(
|
|
62
|
+
'https://501351981.github.io/vue-office/examples/dist/static/test-files/test.pdf',
|
|
63
|
+
)
|
|
64
|
+
const currentUrl = ref(pdfUrl.value)
|
|
65
|
+
const searchKeyword = ref('')
|
|
66
|
+
|
|
67
|
+
function importPdf(f: any) {
|
|
68
|
+
// 清除URL,使用文件上传
|
|
69
|
+
pdfUrl.value = ''
|
|
70
|
+
file.value = f
|
|
71
|
+
|
|
72
|
+
if (f && f.name.endsWith('.pdf')) {
|
|
73
|
+
// 创建文件URL
|
|
74
|
+
const fileUrl = URL.createObjectURL(f)
|
|
75
|
+
currentUrl.value = fileUrl
|
|
76
|
+
} else if (f) {
|
|
77
|
+
alert('请选择PDF文件')
|
|
78
|
+
clearFile()
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function loadFromUrl() {
|
|
83
|
+
if (pdfUrl.value.trim()) {
|
|
84
|
+
// 清除文件,使用URL
|
|
85
|
+
clearFile()
|
|
86
|
+
currentUrl.value = pdfUrl.value.trim()
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function clearFile() {
|
|
91
|
+
file.value = null
|
|
92
|
+
if (currentUrl.value.startsWith('blob:')) {
|
|
93
|
+
URL.revokeObjectURL(currentUrl.value)
|
|
94
|
+
}
|
|
95
|
+
currentUrl.value = ''
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function clearUrl() {
|
|
99
|
+
pdfUrl.value = ''
|
|
100
|
+
currentUrl.value = ''
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function clickPdf() {
|
|
104
|
+
if (searchKeyword.value.trim() && pdfRef.value) {
|
|
105
|
+
pdfRef.value.search(searchKeyword.value.trim())
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// 重新加载组件
|
|
110
|
+
function reloadComponent() {
|
|
111
|
+
counts.value = false
|
|
112
|
+
nextTick(() => {
|
|
113
|
+
counts.value = true
|
|
114
|
+
})
|
|
115
|
+
}
|
|
116
|
+
</script>
|
|
117
|
+
|
|
118
|
+
<style scoped lang="scss">
|
|
119
|
+
.demo-container {
|
|
120
|
+
padding: 20px;
|
|
121
|
+
max-width: 1400px;
|
|
122
|
+
margin: 0 auto;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.control-panel {
|
|
126
|
+
background: #f5f5f5;
|
|
127
|
+
padding: 20px;
|
|
128
|
+
border-radius: 8px;
|
|
129
|
+
margin-bottom: 20px;
|
|
130
|
+
|
|
131
|
+
h3 {
|
|
132
|
+
margin: 0 0 20px 0;
|
|
133
|
+
color: #333;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
h4 {
|
|
137
|
+
margin: 15px 0 10px 0;
|
|
138
|
+
color: #666;
|
|
139
|
+
font-size: 14px;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.upload-section,
|
|
144
|
+
.url-section,
|
|
145
|
+
.search-section {
|
|
146
|
+
margin-bottom: 20px;
|
|
147
|
+
padding: 15px;
|
|
148
|
+
background: white;
|
|
149
|
+
border-radius: 6px;
|
|
150
|
+
border: 1px solid #e0e0e0;
|
|
151
|
+
|
|
152
|
+
input[type='file'] {
|
|
153
|
+
margin-right: 10px;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.url-input,
|
|
157
|
+
.search-input {
|
|
158
|
+
width: 300px;
|
|
159
|
+
padding: 8px 12px;
|
|
160
|
+
border: 1px solid #ddd;
|
|
161
|
+
border-radius: 4px;
|
|
162
|
+
margin-right: 10px;
|
|
163
|
+
font-size: 14px;
|
|
164
|
+
|
|
165
|
+
&:focus {
|
|
166
|
+
outline: none;
|
|
167
|
+
border-color: #409eff;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
button {
|
|
172
|
+
padding: 8px 16px;
|
|
173
|
+
background: #409eff;
|
|
174
|
+
color: white;
|
|
175
|
+
border: none;
|
|
176
|
+
border-radius: 4px;
|
|
177
|
+
cursor: pointer;
|
|
178
|
+
margin-right: 10px;
|
|
179
|
+
font-size: 14px;
|
|
180
|
+
|
|
181
|
+
&:hover:not(:disabled) {
|
|
182
|
+
background: #337ecc;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:disabled {
|
|
186
|
+
background: #c0c4cc;
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.pdf-container {
|
|
193
|
+
height: 600px;
|
|
194
|
+
border: 1px solid #e0e0e0;
|
|
195
|
+
border-radius: 8px;
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
margin-bottom: 20px;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@media (max-width: 768px) {
|
|
201
|
+
.url-input,
|
|
202
|
+
.search-input {
|
|
203
|
+
width: 100% !important;
|
|
204
|
+
margin-bottom: 10px;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
</style>
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="saturation-line-view">
|
|
3
|
+
<span>浸润线</span>
|
|
4
|
+
<NsSaturationline ref="canvasRef" class="saturationline-canvas" :data="state.damData" :waterLevel="state.waterLevel"></NsSaturationline>
|
|
5
|
+
</div>
|
|
6
|
+
</template>
|
|
7
|
+
<script setup lang="ts" name="">
|
|
8
|
+
import { reactive } from 'vue';
|
|
9
|
+
|
|
10
|
+
const state = reactive({
|
|
11
|
+
damData: {
|
|
12
|
+
// 坝体
|
|
13
|
+
sectionTableList: [
|
|
14
|
+
{
|
|
15
|
+
xPoint: "-44",
|
|
16
|
+
yPoint: "17",
|
|
17
|
+
isTop: false,
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
xPoint: "-26",
|
|
21
|
+
yPoint: "24",
|
|
22
|
+
isTop: false,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
xPoint: "-16",
|
|
26
|
+
yPoint: "24",
|
|
27
|
+
isTop: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
xPoint: "-8",
|
|
31
|
+
yPoint: "29",
|
|
32
|
+
isTop: true,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
xPoint: "8",
|
|
36
|
+
yPoint: "29",
|
|
37
|
+
isTop: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
xPoint: "22",
|
|
41
|
+
yPoint: "25",
|
|
42
|
+
isTop: false,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
xPoint: "40",
|
|
46
|
+
yPoint: "22",
|
|
47
|
+
isTop: false,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
xPoint: "47",
|
|
51
|
+
yPoint: "22",
|
|
52
|
+
isTop: false,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
xPoint: "62",
|
|
56
|
+
yPoint: "17",
|
|
57
|
+
isTop: false,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
xPoint: "70",
|
|
61
|
+
yPoint: "17",
|
|
62
|
+
isTop: false,
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
// 测压管
|
|
66
|
+
pipelineTableList: [
|
|
67
|
+
{
|
|
68
|
+
xPoint: "-8",
|
|
69
|
+
yPoint: "29",
|
|
70
|
+
height: "15",
|
|
71
|
+
pointCode: "UP1-1",
|
|
72
|
+
pointName: "测试名字很长很长很长很长测试名字很长很长很长很长",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
xPoint: "8",
|
|
76
|
+
yPoint: "29",
|
|
77
|
+
height: "17",
|
|
78
|
+
pointCode: "UP1-2",
|
|
79
|
+
pointName: "-1-1-1--1-1----1",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
xPoint: "17",
|
|
83
|
+
yPoint: "26.3",
|
|
84
|
+
height: "15",
|
|
85
|
+
pointCode: "UP1-3",
|
|
86
|
+
pointName: "测试",
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
// y/x偏移
|
|
90
|
+
isWall: "1",
|
|
91
|
+
yStart: "10",
|
|
92
|
+
wallXpoint: "-2",
|
|
93
|
+
},
|
|
94
|
+
waterLevel: {
|
|
95
|
+
map: [
|
|
96
|
+
{
|
|
97
|
+
id: null,
|
|
98
|
+
projectCode: null,
|
|
99
|
+
transectName: "0+155",
|
|
100
|
+
pointCode: "UP1-3",
|
|
101
|
+
waterLevel: 14.8,
|
|
102
|
+
date: "2025-05-20T05:00:00",
|
|
103
|
+
createBy: null,
|
|
104
|
+
createTime: null,
|
|
105
|
+
updateBy: null,
|
|
106
|
+
updateTime: null,
|
|
107
|
+
isDelete: null,
|
|
108
|
+
code: null,
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
id: null,
|
|
112
|
+
projectCode: null,
|
|
113
|
+
transectName: "0+155",
|
|
114
|
+
pointCode: "UP1-2",
|
|
115
|
+
waterLevel: 16.0,
|
|
116
|
+
date: "2025-05-20T05:00:00",
|
|
117
|
+
createBy: null,
|
|
118
|
+
createTime: null,
|
|
119
|
+
updateBy: null,
|
|
120
|
+
updateTime: null,
|
|
121
|
+
isDelete: null,
|
|
122
|
+
code: null,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: null,
|
|
126
|
+
projectCode: null,
|
|
127
|
+
transectName: "0+155",
|
|
128
|
+
pointCode: "UP1-1",
|
|
129
|
+
waterLevel: 18.3,
|
|
130
|
+
date: "2025-05-20T00:00:00",
|
|
131
|
+
createBy: null,
|
|
132
|
+
createTime: null,
|
|
133
|
+
updateBy: null,
|
|
134
|
+
updateTime: null,
|
|
135
|
+
isDelete: null,
|
|
136
|
+
code: null,
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
kssw: 22,
|
|
140
|
+
xxsw: 15,
|
|
141
|
+
sjsw: 24,
|
|
142
|
+
jhsw: 26,
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
</script>
|
|
146
|
+
<style lang="scss" scoped>
|
|
147
|
+
.saturation-line-view {
|
|
148
|
+
width: calc(100% - 40px);
|
|
149
|
+
height: calc(100% - 20px);
|
|
150
|
+
padding: 20px;
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
.saturationline-canvas {
|
|
154
|
+
flex: 1;
|
|
155
|
+
height: 100%;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
</style>
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
{
|
|
2
|
+
"formData": {
|
|
3
|
+
"name": "xx",
|
|
4
|
+
"email": "yy@zz.com",
|
|
5
|
+
"age": null,
|
|
6
|
+
"city": "",
|
|
7
|
+
"description": ""
|
|
8
|
+
},
|
|
9
|
+
"formItems": [
|
|
10
|
+
{
|
|
11
|
+
"label": "姓名",
|
|
12
|
+
"prop": "name",
|
|
13
|
+
"component": "input",
|
|
14
|
+
"span": 24,
|
|
15
|
+
"required": true,
|
|
16
|
+
"placeholder": "请输入姓名",
|
|
17
|
+
"props": {
|
|
18
|
+
"clearable": true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"label": "邮箱",
|
|
23
|
+
"prop": "email",
|
|
24
|
+
"component": "input",
|
|
25
|
+
"span": 24,
|
|
26
|
+
"required": true,
|
|
27
|
+
"placeholder": "请输入邮箱",
|
|
28
|
+
"props": {
|
|
29
|
+
"clearable": true
|
|
30
|
+
},
|
|
31
|
+
"rules": [
|
|
32
|
+
{
|
|
33
|
+
"type": "email",
|
|
34
|
+
"message": "请输入正确的邮箱地址",
|
|
35
|
+
"trigger": "blur"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"label": "年龄",
|
|
41
|
+
"prop": "age",
|
|
42
|
+
"component": "number",
|
|
43
|
+
"span": 24,
|
|
44
|
+
"placeholder": "请输入年龄",
|
|
45
|
+
"props": {
|
|
46
|
+
"min": 1,
|
|
47
|
+
"max": 120,
|
|
48
|
+
"controlsPosition": "right"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"label": "城市",
|
|
53
|
+
"prop": "city",
|
|
54
|
+
"component": "select",
|
|
55
|
+
"span": 24,
|
|
56
|
+
"placeholder": "请选择城市",
|
|
57
|
+
"options": [
|
|
58
|
+
{ "label": "北京", "value": "beijing" },
|
|
59
|
+
{ "label": "上海", "value": "shanghai" },
|
|
60
|
+
{ "label": "广州", "value": "guangzhou" },
|
|
61
|
+
{ "label": "深圳", "value": "shenzhen" }
|
|
62
|
+
],
|
|
63
|
+
"props": {
|
|
64
|
+
"clearable": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"label": "描述",
|
|
69
|
+
"prop": "description",
|
|
70
|
+
"component": "textarea",
|
|
71
|
+
"span": 24,
|
|
72
|
+
"placeholder": "请输入描述",
|
|
73
|
+
"props": {
|
|
74
|
+
"rows": 3,
|
|
75
|
+
"maxlength": 200,
|
|
76
|
+
"showWordLimit": true
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
"formRules": {
|
|
81
|
+
"name": [
|
|
82
|
+
{
|
|
83
|
+
"required": true,
|
|
84
|
+
"message": "请输入姓名",
|
|
85
|
+
"trigger": "blur"
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"email": [
|
|
89
|
+
{
|
|
90
|
+
"required": true,
|
|
91
|
+
"message": "请输入邮箱地址",
|
|
92
|
+
"trigger": "blur"
|
|
93
|
+
}
|
|
94
|
+
]
|
|
95
|
+
},
|
|
96
|
+
"optionsData": {}
|
|
97
|
+
}
|