matrix_components 2.0.375 → 2.0.377

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.
@@ -1,207 +0,0 @@
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>
@@ -1,277 +0,0 @@
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
- "sectionTableList": [
13
- {
14
- "id": 209,
15
- "damCode": "dam_1996484649555202048",
16
- "sectionId": 41,
17
- "x": "-14.24",
18
- "y": "46",
19
- "isTop": false,
20
- "createBy": 1,
21
- "createTime": "2025-12-04 16:50:00",
22
- "updateBy": 1,
23
- "updateTime": "2025-12-04 16:55:54",
24
- "isDelete": 0,
25
- "tmpId": 44958,
26
- "xPoint": "-14.24",
27
- "yPoint": "46"
28
- },
29
- {
30
- "id": 210,
31
- "damCode": "dam_1996484649555202048",
32
- "sectionId": 41,
33
- "x": "-7.12",
34
- "y": "48",
35
- "isTop": false,
36
- "createBy": 1,
37
- "createTime": "2025-12-04 16:50:00",
38
- "updateBy": 1,
39
- "updateTime": "2025-12-04 16:56:46",
40
- "isDelete": 0,
41
- "tmpId": 39368,
42
- "xPoint": "-7.12",
43
- "yPoint": "48"
44
- },
45
- {
46
- "id": 211,
47
- "damCode": "dam_1996484649555202048",
48
- "sectionId": 41,
49
- "x": "-2.5",
50
- "y": "52.8",
51
- "isTop": true,
52
- "createBy": 1,
53
- "createTime": "2025-12-04 16:50:00",
54
- "updateBy": 1,
55
- "updateTime": "2025-12-04 16:56:47",
56
- "isDelete": 0,
57
- "tmpId": 56071,
58
- "xPoint": "-2.5",
59
- "yPoint": "52.8"
60
- },
61
- {
62
- "id": 212,
63
- "damCode": "dam_1996484649555202048",
64
- "sectionId": 41,
65
- "x": "2.5",
66
- "y": "52.8",
67
- "isTop": true,
68
- "createBy": 1,
69
- "createTime": "2025-12-04 16:50:00",
70
- "updateBy": 1,
71
- "updateTime": "2025-12-04 16:57:18",
72
- "isDelete": 0,
73
- "tmpId": 85724,
74
- "xPoint": "2.5",
75
- "yPoint": "52.8"
76
- },
77
- {
78
- "id": 213,
79
- "damCode": "dam_1996484649555202048",
80
- "sectionId": 41,
81
- "x": "19",
82
- "y": "44",
83
- "isTop": false,
84
- "createBy": 1,
85
- "createTime": "2025-12-04 16:50:00",
86
- "updateBy": 1,
87
- "updateTime": "2025-12-04 16:57:53",
88
- "isDelete": 0,
89
- "tmpId": 9252,
90
- "xPoint": "19",
91
- "yPoint": "44"
92
- },
93
- {
94
- "id": 214,
95
- "damCode": "dam_1996484649555202048",
96
- "sectionId": 41,
97
- "x": "22",
98
- "y": "44",
99
- "isTop": false,
100
- "createBy": 1,
101
- "createTime": "2025-12-04 17:16:46",
102
- "updateBy": 1,
103
- "updateTime": "2025-12-04 16:57:51",
104
- "isDelete": 0,
105
- "tmpId": 17973,
106
- "xPoint": "22",
107
- "yPoint": "44"
108
- },
109
- {
110
- "id": 215,
111
- "damCode": "dam_1996484649555202048",
112
- "sectionId": 41,
113
- "x": "42.85",
114
- "y": "36",
115
- "isTop": false,
116
- "createBy": 1,
117
- "createTime": "2025-12-04 16:50:00",
118
- "updateBy": 1,
119
- "updateTime": "2025-12-04 16:55:54",
120
- "isDelete": 0,
121
- "tmpId": 37114,
122
- "xPoint": "42.85",
123
- "yPoint": "36"
124
- },
125
- {
126
- "id": 216,
127
- "damCode": "dam_1996484649555202048",
128
- "sectionId": 41,
129
- "x": "51.45",
130
- "y": "36",
131
- "isTop": false,
132
- "createBy": 1,
133
- "createTime": "2025-12-04 16:50:00",
134
- "updateBy": 1,
135
- "updateTime": "2025-12-04 16:55:54",
136
- "isDelete": 0,
137
- "tmpId": 84334,
138
- "xPoint": "51.45",
139
- "yPoint": "36"
140
- },
141
- {
142
- "id": 217,
143
- "damCode": "dam_1996484649555202048",
144
- "sectionId": 41,
145
- "x": "71.2",
146
- "y": "30",
147
- "isTop": false,
148
- "createBy": 1,
149
- "createTime": "2025-12-04 16:50:00",
150
- "updateBy": 1,
151
- "updateTime": "2025-12-04 16:55:54",
152
- "isDelete": 0,
153
- "tmpId": 45304,
154
- "xPoint": "71.2",
155
- "yPoint": "30"
156
- },
157
- {
158
- "id": 218,
159
- "damCode": "dam_1996484649555202048",
160
- "sectionId": 41,
161
- "x": "78.67",
162
- "y": "30",
163
- "isTop": false,
164
- "createBy": 1,
165
- "createTime": "2025-12-04 16:50:00",
166
- "updateBy": 1,
167
- "updateTime": "2025-12-04 16:55:54",
168
- "isDelete": 0,
169
- "tmpId": 69492,
170
- "xPoint": "78.67",
171
- "yPoint": "30"
172
- }
173
- ],
174
- "pipelineTableList": [
175
- {
176
- "id": 77,
177
- "damCode": "dam_1996484649555202048",
178
- "sectionId": 41,
179
- "pointCode": "xiangshanup1",
180
- "x": "-2.5",
181
- "y": "52.8",
182
- "height": "25",
183
- "createBy": 1,
184
- "createTime": "2025-12-04 16:16:41",
185
- "updateBy": 1,
186
- "updateTime": "2025-12-04 17:19:29",
187
- "isDelete": 0,
188
- "pointName": "UP1",
189
- "value": 40,
190
- "time": "2025-12-04 20:07:32",
191
- "xPoint": "-2.5",
192
- "yPoint": "52.8"
193
- },
194
- {
195
- "id": 78,
196
- "damCode": "dam_1996484649555202048",
197
- "sectionId": 41,
198
- "pointCode": "xsUP2",
199
- "x": "2.5",
200
- "y": "52.8",
201
- "height": "25",
202
- "createBy": 1,
203
- "createTime": "2025-12-04 16:16:41",
204
- "updateBy": 1,
205
- "updateTime": "2025-12-04 17:19:29",
206
- "isDelete": 0,
207
- "pointName": "UP2",
208
- "value": 45,
209
- "time": "2025-12-04 20:07:32",
210
- "xPoint": "2.5",
211
- "yPoint": "52.8"
212
- },
213
- {
214
- "id": 79,
215
- "damCode": "dam_1996484649555202048",
216
- "sectionId": 41,
217
- "pointCode": "xsup3",
218
- "x": "8",
219
- "y": "49.5",
220
- "height": "22",
221
- "createBy": 1,
222
- "createTime": "2025-12-04 16:16:41",
223
- "updateBy": 1,
224
- "updateTime": "2025-12-04 17:19:29",
225
- "isDelete": 0,
226
- "pointName": "UP3",
227
- "value": 50,
228
- "time": "2025-12-04 20:07:32",
229
- "xPoint": "8",
230
- "yPoint": "49.5"
231
- }
232
- ],
233
- "isWall": "0",
234
- "yStart": "20",
235
- "wallXpoint": "0"
236
- },
237
- waterLevel: {
238
- "map": [
239
- {
240
- "id": 77,
241
- "pointCode": "xiangshanup1",
242
- "waterLevel": 40,
243
- "date": "2025-12-04 20:07:32"
244
- },
245
- {
246
- "id": 78,
247
- "pointCode": "xsUP2",
248
- "waterLevel": 45,
249
- "date": "2025-12-04 20:07:32"
250
- },
251
- {
252
- "id": 79,
253
- "pointCode": "xsup3",
254
- "waterLevel": 50,
255
- "date": "2025-12-04 20:07:32"
256
- }
257
- ],
258
- "kssw": 50,
259
- "xxsw": "0",
260
- "sjsw": "0",
261
- "jhsw": "0"
262
- },
263
- });
264
- </script>
265
- <style lang="scss" scoped>
266
- .saturation-line-view {
267
- width: calc(100% - 40px);
268
- height: calc(100% - 20px);
269
- padding: 20px;
270
- display: flex;
271
- flex-direction: column;
272
- .saturationline-canvas {
273
- flex: 1;
274
- height: 100%;
275
- }
276
- }
277
- </style>
@@ -1,97 +0,0 @@
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
- }