w-ui-v1 1.0.86 → 1.0.88

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.86",
3
+ "version": "1.0.88",
4
4
  "description": "w-ui",
5
5
  "author": "wgxshh",
6
6
  "license": "ISC",
@@ -204,6 +204,7 @@ export const downloadFile = (url : any) => {
204
204
 
205
205
  //获取枚举颜色 content: 406795063630012418@R@轴2
206
206
  export const getEnumColor = (enumMap : any[] = [], content : string) => {
207
+ console.log(enumMap,content)
207
208
  if(typeof content!=='string') return null
208
209
  let css=enumMap.find((item : any) => {
209
210
 
package/w-card/w-card.vue CHANGED
@@ -44,7 +44,7 @@ const props = defineProps({
44
44
  default:{}
45
45
  }
46
46
  })
47
-
47
+ console.log(props.enumMap)
48
48
  //更多按钮
49
49
  const moreBtns = computed(() => {
50
50
  let data = []
@@ -230,17 +230,33 @@ const getTitleValue = (value: any, title: string) => {
230
230
  }
231
231
  return data
232
232
  }
233
+
234
+
233
235
  </script>
234
236
 
235
237
  <template>
236
238
  <wd-card >
237
239
  <template #title>
238
- <view class="card-title-class">
239
- <view class="title-icon"></view>
240
- <view style="flex: 1; word-break:break-all">
241
- {{getTitleValue(visibleItems.find((item) => item.id === page.primaryColumn?.id), page.primaryColumn?.title) || ' '}}
242
- </view>
243
- </view>
240
+ <view >
241
+ <view class="card-title-class">
242
+ <view class="title-icon"></view>
243
+ <view style="flex: 1; word-break:break-all">
244
+ {{getTitleValue(visibleItems.find((item) => item.id === page.primaryColumn?.id), page.primaryColumn?.title) || ' '}}
245
+ </view>
246
+ <!-- <view class="status-icon">
247
+ 已完成成成
248
+ </view> -->
249
+ <wd-tag style="font-size: 15px;padding:0 4px;" :bg-color="getEnumColor(enumMap[page.labelColumn.mstrucId],itemData.fieldMap[page.labelColumn.id]).color" v-if="page.labelColumn?.id">
250
+ {{
251
+ itemData.fieldMap[page.labelColumn.id]
252
+ }}
253
+ </wd-tag>
254
+ </view>
255
+ <view style="font-size: 12px;margin-top: 4px;color: #FC9546;">
256
+ {{getTitleValue(visibleItems.find((item) => item.id === page.secondColumn?.id), page.secondColumn?.title)}}
257
+ </view>
258
+ </view>
259
+
244
260
  </template>
245
261
 
246
262
  <view class="table_collapse">
@@ -399,6 +415,7 @@ const getTitleValue = (value: any, title: string) => {
399
415
  align-items: center;
400
416
  font-weight: 700 ;
401
417
  gap: 4px;
418
+
402
419
  }
403
420
  .title-icon{
404
421
  width: 8px;
@@ -406,6 +423,18 @@ const getTitleValue = (value: any, title: string) => {
406
423
  border-radius: 100%;
407
424
  background-color: #4d80f0;
408
425
  }
426
+ .status-icon{
427
+ box-sizing: border-box;
428
+ padding: 4px 15px;
429
+ transform: rotate(45deg) translate(15px,-15px);
430
+ text-align: center;
431
+ color: #fff;
432
+ font-size: 12px;
433
+ // width: 85px;
434
+ // height: 15px;
435
+ background-color: #4d80f0;
436
+ clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
437
+ }
409
438
  .btn {
410
439
  margin-left: 10rpx;
411
440
  }
@@ -9,7 +9,7 @@
9
9
  </template>
10
10
 
11
11
  <script setup lang="ts">
12
- import { ref ,computed} from 'vue'
12
+ import { ref ,computed,watch} from 'vue'
13
13
  import { onShow, onLoad, onHide } from '@dcloudio/uni-app'
14
14
  defineOptions({
15
15
  name: 'WScanBindingSensor',
@@ -19,6 +19,9 @@ const code =ref("")
19
19
  onShow(()=>{
20
20
  code.value=uni.getStorageSync('sensorCode')
21
21
  })
22
+ watch(code,(value)=>{
23
+ uni.setStorageSync('sensorCode',value)
24
+ })
22
25
  // 扫码
23
26
  const scan = () => {
24
27
  uni.scanCode({
@@ -65,11 +65,11 @@ watch(() => props.sourceId, (value) => {
65
65
  immediate: false
66
66
  })
67
67
  // 获取页面配置
68
- function getPageConfig() {
69
- pageConfig(sourceId.value).then((res: any) => {
68
+ function getPageConfig() {
69
+ pageConfig(sourceId.value).then(async(res: any) => {
70
70
  pageData.value = res.data.ltmplConfig
71
71
  //获取枚举
72
- Enumcolumn.value=getEnumer(pageData.value)
72
+ Enumcolumn.value=await getEnumer(pageData.value)
73
73
  })
74
74
  }
75
75