w-ui-v1 1.0.61 → 1.0.63

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "w-ui-v1",
3
- "version": "1.0.61",
3
+ "version": "1.0.63",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
@@ -20,7 +20,7 @@ export function addPageConfig(sourceId: string) {
20
20
  }
21
21
 
22
22
  //新增页面提交保存
23
- export function addPageDataSave(sourceId: string,mainCode: string, data: any) {
23
+ export function addPageDataSave(sourceId: string,mainCode: string="", data: any) {
24
24
  return request({
25
25
  url: `/v3/dtmpl/data`,
26
26
  method: 'POST',
package/utils/index.ts ADDED
@@ -0,0 +1,18 @@
1
+ import {
2
+ getEnum
3
+ } from './apis/pageConfig'
4
+ export const getEnumer=async(pageData:any)=>{
5
+ let params = []
6
+ pageData.columns.forEach((item: any) => {
7
+ if (item.controlType === 'select') {
8
+ params.push(`mstrucIds=${item.mstrucId}`)
9
+ }
10
+ if (item.controlType === 'multiselect') {
11
+ params.push(`mstrucIds=${item.mstrucId}`)
12
+ }
13
+
14
+ });
15
+ if (!params.length) return
16
+ const res = await getEnum(params.join("&"))
17
+ return res.data?.enumMap || {}
18
+ }
package/w-add/w-add.vue CHANGED
@@ -216,7 +216,7 @@ async function handleSubmit() {
216
216
  })
217
217
  }
218
218
  })
219
-
219
+ console.log(data,'jjj')
220
220
  try {
221
221
  const res = await addPageDataSave(sourceId.value,mainCode.value, data)
222
222
  if (res.data.status === 'success') {
package/w-card/w-card.vue CHANGED
@@ -1,11 +1,4 @@
1
- <script lang="ts">
2
- //在自定义组件中使用 Wot Design Uni 组件时,需开启styleIsolation: 'shared'选项覆盖样式
3
- export default {
4
- options: {
5
- styleIsolation: 'shared'//使css :deep()生效
6
- }
7
- }
8
- </script>
1
+
9
2
  <script setup lang="ts">
10
3
  import WFormMessageBox from '../w-form-message-box/w-form-message-box.vue'
11
4
  import {
@@ -242,7 +235,10 @@ const getTitleValue = (value: any, title: string) => {
242
235
  <wd-card >
243
236
  <template #title>
244
237
  <view class="card-title-class">
245
- {{getTitleValue(visibleItems.find((item) => item.id === page.primaryColumn?.id), page.primaryColumn?.title) || ' '}}
238
+ <view class="title-icon"></view>
239
+ <view style="flex: 1; word-break:break-all">
240
+ {{getTitleValue(visibleItems.find((item) => item.id === page.primaryColumn?.id), page.primaryColumn?.title) || ' '}}
241
+ </view>
246
242
  </view>
247
243
  </template>
248
244
 
@@ -251,7 +247,7 @@ const getTitleValue = (value: any, title: string) => {
251
247
 
252
248
  <!-- // 标题 -->
253
249
  <view class="lable">
254
- <text>{{ item.title }}:</text>
250
+ <text class="lable">{{ item.title }}:</text>
255
251
  </view>
256
252
 
257
253
  <!-- // 图片 -->
@@ -349,7 +345,7 @@ const getTitleValue = (value: any, title: string) => {
349
345
  padding: 8rpx 10rpx;
350
346
 
351
347
  .lable {
352
- white-space: nowrap;
348
+ white-space: nowrap !important;
353
349
  // font-weight: 600;
354
350
  text-align: left;
355
351
  margin-right: 20rpx;
@@ -397,8 +393,17 @@ const getTitleValue = (value: any, title: string) => {
397
393
 
398
394
 
399
395
  }
400
- :deep(.card-title-class){
401
- font-weight: 700 !important;
396
+ .card-title-class{
397
+ display: flex;
398
+ align-items: center;
399
+ font-weight: 700 ;
400
+ gap: 4px;
401
+ }
402
+ .title-icon{
403
+ width: 8px;
404
+ height: 8px;
405
+ border-radius: 100%;
406
+ background-color: #4d80f0;
402
407
  }
403
408
  .btn {
404
409
  margin-left: 10rpx;
package/w-edit/w-edit.vue CHANGED
@@ -252,7 +252,7 @@
252
252
  })
253
253
  data['唯一编码'] = model.value['唯一编码']
254
254
  try {
255
- const res = await addPageDataSave(sourceId.value, data)
255
+ const res = await addPageDataSave(sourceId.value, null,data)
256
256
  if (res.data.status === 'success') {
257
257
  toast.success("保存成功")
258
258
  uni.navigateBack({
@@ -305,7 +305,7 @@
305
305
  })
306
306
  data['唯一编码'] = model.value['唯一编码']
307
307
  try {
308
- const res = await addPageDataSave(sourceId.value, data)
308
+ const res = await addPageDataSave(sourceId.value, null,data)
309
309
  if (res.data.status === 'success') {
310
310
  toast.success("保存成功")
311
311
  uni.navigateBack({
@@ -352,7 +352,7 @@
352
352
  })
353
353
  data['唯一编码'] = model.value['唯一编码']
354
354
  try {
355
- const res = await addPageDataSave(sourceId.value, data)
355
+ const res = await addPageDataSave(sourceId.value, null,data)
356
356
  if (res.data.status === 'success') {
357
357
  toast.success("保存成功")
358
358
  uni.navigateBack({
@@ -1,50 +1,115 @@
1
1
  <template>
2
2
  <view v-if="!subItem.hidden" style="border-bottom: 1px solid rgb(243 242 242);">
3
- <wd-input v-if="subItem.extControlType === 'text'" :readonly="subItem.disabled" :label="subItem.title"
4
- label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
5
- :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
6
- :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" @input="(e) => { change(e) }"
7
- @clear="clear" />
8
- <wd-picker v-else-if="subItem.extControlType === 'select'" :readonly="subItem.disabled" :label="subItem.title"
3
+
4
+ <wd-picker v-if="subItem.controlType === 'select'&&subItem.extControlType === 'yes-no-switch'" :readonly="subItem.disabled" :label="subItem.title"
9
5
  label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
10
6
  :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
11
7
  :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :columns="Enumcolumn[subItem.mstrucId]"
12
8
  @confirm="(e) => { change(e) }" @clear="clear" />
13
- <wd-textarea auto-height v-else-if="subItem.extControlType === 'textarea'" :readonly="subItem.disabled"
14
- :label="subItem.title" label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
15
- :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
16
- :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" @input="(e) => { change(e) }"
17
- @clear="clear" />
18
- <wd-input v-else-if="subItem.extControlType === 'decimal' || subItem.extControlType === 'int'"
19
- :readonly="subItem.disabled" :label="subItem.title" label-width="100px" :prop="subItem.id" clearable
20
- :modelValue="modelValue" type="number" :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
21
- :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" @input="(e) => { change(e) }"
22
- @clear="clear" />
23
- <wd-calendar v-else-if="subItem.extControlType === 'datetime'" :readonly="subItem.disabled" :label="subItem.title"
9
+
10
+ <wd-picker v-else-if="subItem.controlType === 'radio'&&subItem.extControlType === 'yes-no-switch'" :readonly="subItem.disabled" :label="subItem.title"
11
+ label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
12
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
13
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :columns="['是','否']"
14
+ @confirm="(e) => { change(e) }" @clear="clear" />
15
+
16
+ <wd-picker v-else-if="subItem.extControlType === 'yes-no-radio'" :readonly="subItem.disabled" :label="subItem.title"
17
+ label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
18
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
19
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :columns="['是','否']"
20
+ @confirm="(e) => { change(e) }" @clear="clear" />
21
+
22
+ <wd-select-picker v-else-if="subItem.controlType === 'select'&&subItem.extControlType === 'multiselect'" :readonly="subItem.disabled" :label="subItem.title"
23
+ label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
24
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
25
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :columns="Enumcolumn[subItem.mstrucId]?.map((item:any)=>({...item,label:item.title}))"
26
+ @confirm="(e) => { change(e) }" @clear="clear" />
27
+
28
+
29
+ <wd-calendar :display-format="displayFormat1" v-else-if="props.subItem.controlType==='datetime'&&props.subItem.extControlType==='datetimerange'" :readonly="subItem.disabled" :label="subItem.title"
30
+ label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue" type="datetimerange"
31
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
32
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" @confirm="(e) => { change(e) }"
33
+ @clear="clear" />
34
+
35
+
36
+ <wd-calendar v-else-if="subItem.controlType === 'datetime'" :readonly="subItem.disabled" :label="subItem.title"
24
37
  label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue" type="datetime"
25
38
  :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
26
39
  :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" @confirm="(e) => { change(e) }"
27
40
  @clear="clear" />
41
+
42
+ <wd-calendar v-else-if="subItem.extControlType === 'datetime'" :readonly="subItem.disabled" :label="subItem.title"
43
+ label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue" type="datetime"
44
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
45
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" @confirm="(e) => { change(e) }"
46
+ @clear="clear" />
47
+
48
+ <wd-calendar v-else-if="subItem.controlType === 'daterange'&&subItem.extControlType === 'daterange'" :readonly="subItem.disabled" :label="subItem.title"
49
+ label-width="100px" :display-format="displayFormat2" :prop="subItem.id" clearable :modelValue="modelValue" type="daterange"
50
+ :placeholder="subItem.disabled ? '无需输入' : `请选择${subItem.title}`"
51
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" @confirm="(e) => { change(e) }"
52
+ @clear="clear" />
28
53
 
29
- <wd-cell v-else-if="subItem.extControlType === 'relselect'||subItem.extControlType === 'table-entity-select'" title-width="100px" :prop="subItem.id"
54
+ <wd-cell v-else-if="(subItem.controlType === 'textarea'&&subItem.extControlType==='relselectvalue')||subItem.extControlType === 'entity-select'" title-width="100px" :prop="subItem.id"
30
55
  :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :title="subItem.title">
31
56
  <view style="text-align: left">
32
57
  <wSelectPicker @confirm="wSelectPickerconfirm" :modelValue="modelValue" :readonly="subItem.disabled"
33
- :type="subItem.max === 1 ? 'radio' : 'checkbox'"
58
+ :type="'checkbox'"
34
59
  :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`" :source-id="subItem.sourceId" filterable
35
60
  @clear="clear" clearable />
36
61
  </view>
37
62
  </wd-cell>
63
+ <wd-cell v-else-if="subItem.controlType === 'text'&&subItem.extControlType==='relselectvalue'" title-width="100px" :prop="subItem.id"
64
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :title="subItem.title">
65
+ <view style="text-align: left">
66
+ <wSelectPicker @confirm="wSelectPickerconfirm" :modelValue="modelValue" :readonly="subItem.disabled"
67
+ :type="'checkbox'"
68
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`" :source-id="subItem.sourceId" filterable
69
+ @clear="clear" clearable />
70
+ </view>
71
+ </wd-cell>
72
+ <wd-cell v-else-if="subItem.extControlType === 'relselect'" title-width="100px" :prop="subItem.id"
73
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}` }]" :title="subItem.title">
74
+ <view style="text-align: left">
75
+ <wSelectPicker @confirm="wSelectPickerconfirm" :modelValue="modelValue" :readonly="subItem.disabled"
76
+ :max="subItem.max==='1'?1:0"
77
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`" :source-id="subItem.sourceId" filterable
78
+ @clear="clear" clearable />
79
+ </view>
80
+ </wd-cell>
81
+
82
+ <wd-cell v-else-if="subItem.extControlType === 'file'||subItem.extControlType === 'picture'"
83
+ :rules="[{ required: subItem.required, message: `请选择${subItem.title}文件` }]" :title="subItem.title"
84
+ title-width="100px" :prop="subItem.id">
85
+ <wd-upload :limit="1" :accept="subItem.controlType"
86
+ :header="{ 'hydrocarbon-program-token': hydrocarbonProgramToken, 'hydrocarbon-token': token }"
87
+ :file-list="modelValue" :disabled="subItem.disabled" :action="`${baseUrl}/v3/upload`"
88
+ @success="success"></wd-upload>
89
+ </wd-cell>
90
+ <wd-input v-else-if="subItem.controlType === 'text'" :readonly="subItem.disabled" :label="subItem.title"
91
+ label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
92
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
93
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" @input="(e) => { change(e) }"
94
+ @clear="clear" />
95
+ <wd-input v-else-if="subItem.controlType === 'decimal' || subItem.controlType === 'int'"
96
+ :readonly="subItem.disabled" :label="subItem.title" label-width="100px" :prop="subItem.id" clearable
97
+ :modelValue="modelValue" type="number" :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
98
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" @input="(e) => { change(e) }"
99
+ @clear="clear" />
100
+
101
+
102
+
103
+
104
+
105
+ <wd-textarea auto-height v-else-if="subItem.controlType === 'textarea'" :readonly="subItem.disabled"
106
+ :label="subItem.title" label-width="100px" :prop="subItem.id" clearable :modelValue="modelValue"
107
+ :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
108
+ :rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" @input="(e) => { change(e) }"
109
+ @clear="clear" />
38
110
 
39
- <wd-cell v-else-if="subItem.extControlType === 'file'||subItem.extControlType === 'picture'"
40
- :rules="[{ required: subItem.required, message: `请选择${subItem.title}文件` }]" :title="subItem.title"
41
- title-width="100px" :prop="subItem.id">
42
- <wd-upload :limit="1" :accept="subItem.extControlType"
43
- :header="{ 'hydrocarbon-program-token': hydrocarbonProgramToken, 'hydrocarbon-token': token }"
44
- :file-list="modelValue" :disabled="subItem.disabled" :action="`${baseUrl}/v3/upload`"
45
- @success="success"></wd-upload>
46
- </wd-cell>
47
- <wd-cell v-else-if="subItem.extControlType === 'html'"
111
+
112
+ <wd-cell v-else-if="subItem.controlType === 'html'"
48
113
  :rules="[{ required: subItem.required, message: `请输入${subItem.title}` }]" :title="subItem.title"
49
114
  title-width="100px" :prop="subItem.id">
50
115
  <editor id="editor" class="ql-container" :placeholder="`请输入${subItem.title}`" show-img-size show-img-toolbar
@@ -60,7 +125,7 @@
60
125
 
61
126
  <script setup lang="ts">
62
127
  import wSelectPicker from '../w-select-picker/w-select-picker.vue'
63
- import dayjs from 'dayjs/esm/index'
128
+ import dayjs from 'dayjs/esm/index'
64
129
  import { defineProps, ref, defineEmits, computed } from 'vue'
65
130
  const props = defineProps({
66
131
  subItem: {
@@ -86,66 +151,152 @@ const baseUrl = uni.getStorageSync('baseUrl') || '/'
86
151
  const hydrocarbonProgramToken = uni.getStorageSync('hydrocarbonProgramToken') || ''
87
152
  const token = uni.getStorageSync('token') || ''
88
153
  const modelValue = computed(() => {
89
- switch (props.subItem.extControlType) {
90
- case 'datetime':
91
- return props.model[props.subItem.id] ? dayjs(props.model[props.subItem.id]).valueOf() : null
92
-
93
- case 'table-entity-select':
94
- case 'relselect':
95
- if (props.subItem.max === 1) {
96
- return props.model[props.subItem.id] ? props.model[props.subItem.id].split('@R@')[0] : ''
97
- } else {
98
- if (!props.model[props.subItem.id]) return []
99
-
100
- let selectArr = props.model[props.subItem.id].split('@,@')
154
+ console.log(props.model[props.subItem.id],'入')
155
+ // 入值
156
+ if((props.subItem.controlType === 'textarea'&&props.subItem.extControlType==='relselectvalue')||props.subItem.extControlType === 'entity-select'){
157
+ if(props.model[props.subItem.id]){
158
+ let dataArr1=props.model[props.subItem.id].split('@,@')
159
+ let dataArr2=dataArr1.map((item:any)=>{
160
+ return item.split("@R@")[0]
161
+ })
162
+ return dataArr2
163
+ }else{
164
+ return[]
165
+ }
166
+
167
+ }
168
+
169
+ if((props.subItem.controlType === 'text'&&props.subItem.extControlType==='relselectvalue')){
170
+ if(props.model[props.subItem.id]){
171
+ let dataArr1=props.model[props.subItem.id].split('@,@')
172
+ let dataArr2=dataArr1.map((item:any)=>{
173
+ return item.split("@R@")[0]
174
+ })
175
+ return dataArr2
176
+ }else{
177
+ return[]
178
+ }
179
+
180
+ }
181
+
182
+ if(props.subItem.controlType==='datetime'&&props.subItem.extControlType==='datetimerange'){
183
+
184
+ return props.model[props.subItem.id]?props.model[props.subItem.id].split("~").map((item:any)=>{
185
+ return dayjs(item).valueOf()
186
+ }):[]
187
+
188
+
189
+ }
190
+
191
+ if(props.subItem.controlType==='daterange'&&props.subItem.extControlType==='daterange'){
192
+ return props.model[props.subItem.id]?props.model[props.subItem.id].split("~").map((item:any)=>{
193
+ return dayjs(item).valueOf()
194
+ }):[]
195
+ }
196
+
197
+ if(props.subItem.extControlType === 'relselect'){
198
+ if(props.model[props.subItem.id]){
199
+ let dataArr1=props.model[props.subItem.id].split('@,@')
200
+ let dataArr2=dataArr1.map((item:any)=>{
201
+ return item.split("@R@")[0]
202
+ })
203
+ return dataArr2
204
+ }else{
205
+ return[]
206
+ }
207
+
208
+ }
209
+
210
+ if(props.subItem.extControlType === 'file'){
211
+ return props.model[props.subItem.id]?[JSON.parse(props.model[props.subItem.id])['base']]:[]
212
+ }
213
+
214
+ if(props.subItem.extControlType === 'datetime'){
215
+ return props.model[props.subItem.id]?dayjs(props.model[props.subItem.id]).valueOf():''
216
+ }
217
+
218
+
219
+ return props.model[props.subItem.id] || null
220
+ // switch (props.subItem.controlType) {
221
+ // case 'datetime':
222
+ // return props.model[props.subItem.id] ? dayjs(props.model[props.subItem.id]).valueOf() : null
223
+ // case 'picture':
224
+ // case 'file':
225
+ // return props.model[props.subItem.id] ? JSON.parse(props.model[props.subItem.id]).valid === 'new' ? [{ url: JSON.parse(props.model[props.subItem.id]).base.path }] : [{ url: baseUrl + "/v3/files" + JSON.parse(props.model[props.subItem.id]).base.path }] : []
101
226
 
102
- let selectArr2 = selectArr.map((item: any) => {
103
- return item.split('@R@')[0]
104
- })
105
-
106
- return selectArr2
107
- }
108
- case 'picture':
109
- case 'file':
110
- return props.model[props.subItem.id] ? JSON.parse(props.model[props.subItem.id]).valid === 'new' ? [{ url: JSON.parse(props.model[props.subItem.id]).base.path }] : [{ url: baseUrl + "/v3/files" + JSON.parse(props.model[props.subItem.id]).base.path }] : []
111
-
112
- default:
113
- return props.model[props.subItem.id] || ""
114
- }
227
+ // default:
228
+ // return props.model[props.subItem.id] || ""
229
+ // }
115
230
 
116
231
  })
117
232
 
118
233
  const emit = defineEmits(['update:modelValue'])
119
234
 
120
- //上传
235
+ //上传文件成功回调
121
236
  const success = (e: any) => {
122
237
  console.log(e)
123
- emit('update:modelValue', JSON.stringify({ valid: "new", fileKey: JSON.parse(e.file.response).fileKey, fileName: e.file.name, base: { path: e.file.url } }))
238
+ emit('update:modelValue', JSON.stringify({ valid: "new", fileKey: JSON.parse(e.file.response).fileKey, fileName: e.file.name, base: {...e.file } }))
239
+ }
240
+
241
+ const displayFormat1 = (value:any) => {
242
+ return dayjs(value[0]).format('YYYY-MM-DD HH:mm:ss') + ' ~ ' + dayjs(value[1]).format('YYYY-MM-DD HH:mm:ss')
243
+ }
244
+
245
+ const displayFormat2=(value:any) => {
246
+ return dayjs(value[0]).format('YYYY-MM-DD') + ' ~ ' + dayjs(value[1]).format('YYYY-MM-DD')
124
247
  }
125
248
 
126
249
  //wSelectPicker组件确定事件
127
- const wSelectPickerconfirm = (e) => {
128
- console.log(e)
250
+ const wSelectPickerconfirm = (e:any) => {
251
+ console.log(e,'出')
129
252
  if (Array.isArray(e.selectedItems)) {
130
253
  let selectArr1 = e.selectedItems.map((item: any) => {
131
254
  return `${item.value}@R@${item.label}`
132
255
  })
133
- let selectArr = selectArr1.join('@,@')
134
- emit('update:modelValue', selectArr)
256
+ let selectArr = selectArr1
257
+ emit('update:modelValue', selectArr.join('@,@'))
135
258
  } else {
136
259
  emit('update:modelValue', `${e.selectedItems.value}@R@${e.selectedItems.label}`)
137
260
  }
138
261
  }
139
262
 
140
263
  //输入框事件
141
- const change = (e) => {
142
- switch (props.subItem.extControlType) {
143
- case 'datetime':
144
- emit('update:modelValue', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'))
145
- break
146
- default:
147
- emit('update:modelValue', e.value)
148
- }
264
+ const change = (e:any) => {
265
+ console.log(e,'出')
266
+ if(props.subItem.controlType==='datetime'&&props.subItem.extControlType==='datetimerange'){
267
+
268
+ let data=e.value.map((item:any)=>{
269
+ return dayjs(item).format('YYYY-MM-DD HH:mm:ss')
270
+ })
271
+ emit('update:modelValue', data.join('~'))
272
+ return
273
+ }
274
+
275
+ if(props.subItem.controlType==='daterange'&&props.subItem.extControlType==='daterange'){
276
+
277
+ let data=e.value.map((item:any)=>{
278
+ return dayjs(item).format('YYYY-MM-DD')
279
+ })
280
+ emit('update:modelValue', data.join('~'))
281
+ return
282
+ }
283
+
284
+ if(props.subItem.controlType==='datetime'||props.subItem.extControlType==='datetime'){
285
+
286
+ let data=dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')
287
+ emit('update:modelValue', data)
288
+ return
289
+ }
290
+
291
+ emit('update:modelValue', e.value)
292
+
293
+ // switch (props.subItem.controlType) {
294
+ // case 'datetime':
295
+ // emit('update:modelValue', dayjs(e.value).format('YYYY-MM-DD HH:mm:ss'))
296
+ // break
297
+ // default:
298
+ // emit('update:modelValue', e.value)
299
+ // }
149
300
 
150
301
 
151
302
  }
@@ -94,6 +94,7 @@
94
94
 
95
95
  <template>
96
96
  <view class="login">
97
+ <image class="footer-img" src="./footerImg.png"></image>
97
98
  <view class="form-box">
98
99
  <WSwitchLang v-if="props.langSwitch" />
99
100
  <view v-if="props.loginImge" class="avatar">
@@ -108,9 +109,9 @@
108
109
 
109
110
  <wd-form ref="form" :model="model">
110
111
  <wd-cell-group border>
111
- <wd-input v-model="model.username" label="用户名" label-width="100px" prop="username" clearable
112
+ <wd-input v-model="model.username" label="用户名" label-width="100px" prop="username" clearable
112
113
  placeholder="请输入用户名" :rules="[{ required: true, message: '请填写用户名' }]" />
113
- <wd-input v-model="model.password" label="密码" label-width="100px" prop="password" show-password
114
+ <wd-input v-model="model.password" label="密码" label-width="100px" prop="password" show-password
114
115
  clearable placeholder="请输入密码" :rules="[{ required: true, message: '请填写密码' }]" />
115
116
  <view style="padding-left: 15px;">
116
117
  <wd-checkbox v-model="model.remember" shape="square">记住密码</wd-checkbox>
@@ -123,7 +124,6 @@
123
124
  </view>
124
125
  </wd-form>
125
126
  </view>
126
- <image class="footer-img" src="./footerImg.png"></image>
127
127
  <wd-toast />
128
128
  </view>
129
129
  </template>
@@ -134,20 +134,27 @@
134
134
  /* #ifdef H5 */
135
135
  height: calc(100vh - 44px);
136
136
  /* #endif */
137
- position: relative;
137
+ // position: relative;
138
138
  //设置背景颜色#4d80f0 由上到下逐渐变浅
139
- background: linear-gradient(to bottom, #4d80f0 30%, #2c5def 70%);
139
+ // background: linear-gradient(to bottom, #4d80f0 30%, #2c5def 70%);
140
+ background-color: #487FFE;
141
+ display: flex;
142
+ flex-direction: column;
143
+ align-items: center;
144
+ justify-content: space-between;
140
145
 
141
146
  .form-box {
147
+ box-sizing: border-box;
142
148
  padding: 20rpx;
143
149
  background-color: #fff;
144
- border-radius: 8px;
150
+ border-radius: 12px 12px 0 0;
145
151
  z-index: 1;
146
- position: absolute;
147
- left: 50%;
148
- top: 30%;
149
- transform: translate(-50%, -50%);
150
- width: 650rpx;
152
+ // position: absolute;
153
+ // left: 50%;
154
+ // top: 30%;
155
+ // transform: translate(-50%, -50%);
156
+ width: 100%;
157
+ height: 70%;
151
158
 
152
159
  .lang {
153
160
  display: flex;
@@ -166,10 +173,12 @@
166
173
 
167
174
 
168
175
  .footer-img {
169
- position: absolute;
170
- bottom: 0;
171
- left: 50%;
172
- transform: translateX(-50%);
176
+ width: 200px;
177
+ height: 200px;
178
+ // position: absolute;
179
+ // bottom: 0;
180
+ // left: 50%;
181
+ // transform: translateX(-50%);
173
182
  }
174
183
  }
175
184
  </style>
package/w-menu/w-menu.vue CHANGED
@@ -145,18 +145,21 @@ function queryList() {
145
145
  <view>
146
146
  <view v-if="filtermenu.length > 0" class="menu-list">
147
147
  <slot name="topImg"></slot>
148
- <wd-card v-for="(item, index) in filtermenu" :key="index" :title="item.title"
149
- custom-title-class="menu-title-class">
148
+ <wd-card v-for="(item, index) in filtermenu" :key="index"
149
+ >
150
+ <template #title>
151
+ <view class="menu-title-class">
152
+ <view class="title-icon"></view> {{item.title}}
153
+ </view>
154
+ </template>
150
155
  <template #default>
151
156
  <wd-grid :column="4" :clickable="true">
152
157
  <wd-grid-item use-slot v-for="(subItem, subIndex) in item.items" :key="subIndex"
153
158
  @itemclick="gotoPage(subItem)" use-text-slot>
154
159
  <template #default>
155
160
  <view class="grid-item">
156
- <!-- <wd-icon name="list" size="22px" color="#0083ff"></wd-icon> -->
157
161
  <text class="grid-item-icon">{{ subItem.title }}</text>
158
- <wd-text type="primary" :text="subItem.title"></wd-text>
159
- <!-- <wd-text type="primary" text="我的订单我的订单我的订单我的订单"></wd-text> -->
162
+ <view class="grid-item-title">{{subItem.title}}</view>
160
163
  </view>
161
164
 
162
165
  </template>
@@ -213,11 +216,28 @@ function queryList() {
213
216
  letter-spacing: 20px;
214
217
  // margin-right: 15px;
215
218
  }
219
+ .grid-item-title{
220
+ color: #4D81F1;
221
+ width: 55px;
222
+ overflow: hidden;
223
+ text-overflow: ellipsis;
224
+ white-space: nowrap;
225
+ // white-space: pre-wrap;
226
+ // text-align: left;
227
+ }
216
228
 
217
229
  }
218
230
 
219
- :deep(.menu-title-class) {
220
- font-weight: 700 !important;
231
+ .menu-title-class {
232
+ display: flex;
233
+ align-items: center;
234
+ gap: 4px;
235
+ font-weight: 700;
236
+ }
237
+ .title-icon{
238
+ width: 3px;
239
+ height: 15px;
240
+ background-color: #4D81F1;
221
241
  }
222
242
 
223
243
  .menu-list {