Browse Source

Signed-off-by: zhaobao <528046418@qq.com>

zhaobao 3 years ago
parent
commit
8d2efcf593
100 changed files with 2725 additions and 1814 deletions
  1. 3 0
      androidPrivacy.json
  2. 12 0
      api/system/groupApi.js
  3. 17 0
      libs/index.js
  4. 14 0
      libs/tool.js
  5. 55 12
      manifest.json
  6. 6 6
      pages.json
  7. 18 1
      pages/index/index.vue
  8. 6 2
      pages/mine/mine.vue
  9. 45 250
      pages/risk/check/check.vue
  10. 255 0
      pages/risk/check/check_accept.vue
  11. 40 15
      pages/risk/check/form/form.vue
  12. 89 0
      pages/risk/check/history/index.vue
  13. 80 17
      pages/risk/rectify/form/form.vue
  14. 89 0
      pages/risk/rectify/history/index.vue
  15. 47 171
      pages/risk/rectify/rectify.vue
  16. 86 16
      pages/risk/review/form/form.vue
  17. 89 0
      pages/risk/review/history/index.vue
  18. 44 117
      pages/risk/review/review.vue
  19. 19 2
      pages/risk/risk.vue
  20. 41 0
      pages/task/form/form.vue
  21. 109 28
      pages/task/submit/submit.vue
  22. 4 2
      pages/task/task.vue
  23. 2 0
      uni_modules/uni-badge/changelog.md
  24. 3 3
      uni_modules/uni-badge/components/uni-badge/uni-badge.vue
  25. 1 1
      uni_modules/uni-badge/package.json
  26. 13 7
      uni_modules/uni-calendar/changelog.md
  27. 4 5
      uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue
  28. 24 20
      uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue
  29. 12 2
      uni_modules/uni-calendar/components/uni-calendar/util.js
  30. 1 1
      uni_modules/uni-calendar/package.json
  31. 3 3
      uni_modules/uni-calendar/readme.md
  32. 1 1
      uni_modules/uni-combox/components/uni-combox/uni-combox.vue
  33. 9 0
      uni_modules/uni-data-picker/changelog.md
  34. 10 6
      uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue
  35. 17 15
      uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue
  36. 1 1
      uni_modules/uni-data-picker/package.json
  37. 13 0
      uni_modules/uni-data-select/changelog.md
  38. 132 55
      uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue
  39. 1 1
      uni_modules/uni-data-select/package.json
  40. 67 33
      uni_modules/uni-datetime-picker/changelog.md
  41. 3 13
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue
  42. 141 127
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue
  43. 1 1
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json
  44. 16 28
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue
  45. 337 301
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue
  46. 186 193
      uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js
  47. 1 1
      uni_modules/uni-datetime-picker/package.json
  48. 1 1
      uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue
  49. 12 1
      uni_modules/uni-easyinput/changelog.md
  50. 115 137
      uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
  51. 1 1
      uni_modules/uni-easyinput/package.json
  52. 2 0
      uni_modules/uni-fab/changelog.md
  53. 3 2
      uni_modules/uni-fab/components/uni-fab/uni-fab.vue
  54. 1 1
      uni_modules/uni-fab/package.json
  55. 4 0
      uni_modules/uni-file-picker/changelog.md
  56. 2 2
      uni_modules/uni-file-picker/components/uni-file-picker/choose-and-upload-file.js
  57. 12 1
      uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue
  58. 4 7
      uni_modules/uni-file-picker/package.json
  59. 2 0
      uni_modules/uni-forms/changelog.md
  60. 2 6
      uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue
  61. 1 1
      uni_modules/uni-forms/package.json
  62. 1 1
      uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue
  63. 1 1
      uni_modules/uni-grid/components/uni-grid/uni-grid.vue
  64. 1 1
      uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list-item.vue
  65. 2 2
      uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list.vue
  66. 26 0
      uni_modules/uni-list/changelog.md
  67. 62 7
      uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue
  68. 94 14
      uni_modules/uni-list/components/uni-list-item/uni-list-item.vue
  69. 100 85
      uni_modules/uni-list/components/uni-list/uni-list.vue
  70. 4 7
      uni_modules/uni-list/package.json
  71. 4 0
      uni_modules/uni-nav-bar/changelog.md
  72. 1 1
      uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue
  73. 1 4
      uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue
  74. 1 1
      uni_modules/uni-nav-bar/package.json
  75. 4 0
      uni_modules/uni-number-box/changelog.md
  76. 2 2
      uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue
  77. 4 7
      uni_modules/uni-number-box/package.json
  78. 8 0
      uni_modules/uni-popup/changelog.md
  79. 5 1
      uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
  80. 3 9
      uni_modules/uni-popup/components/uni-popup/uni-popup.vue
  81. 5 8
      uni_modules/uni-popup/package.json
  82. 1 1
      uni_modules/uni-row/components/uni-col/uni-col.vue
  83. 1 1
      uni_modules/uni-row/components/uni-row/uni-row.vue
  84. 2 0
      uni_modules/uni-search-bar/changelog.md
  85. 1 1
      uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json
  86. 1 1
      uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json
  87. 1 1
      uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue
  88. 4 7
      uni_modules/uni-search-bar/package.json
  89. 1 1
      uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue
  90. 2 0
      uni_modules/uni-swipe-action/changelog.md
  91. 2 2
      uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js
  92. 4 2
      uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js
  93. 4 3
      uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js
  94. 4 3
      uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js
  95. 5 8
      uni_modules/uni-swipe-action/package.json
  96. 1 1
      uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue
  97. 4 0
      uni_modules/uni-table/changelog.md
  98. 3 3
      uni_modules/uni-table/components/uni-table/uni-table.vue
  99. 16 8
      uni_modules/uni-table/components/uni-th/filter-dropdown.vue
  100. 10 3
      uni_modules/uni-table/components/uni-th/uni-th.vue

+ 3 - 0
androidPrivacy.json

@@ -0,0 +1,3 @@
+{
+    "prompt" : "template"
+}

+ 12 - 0
api/system/groupApi.js

@@ -0,0 +1,12 @@
+import {request} from '@/libs/request.js'
+/**
+ * 获取部门列表
+ * @param data
+ * @returns {AxiosPromise}
+ */
+export function getGroupByList() {
+  return request({
+    url: '/group',
+    method: 'GET'
+  })
+}

+ 17 - 0
libs/index.js

@@ -391,4 +391,21 @@ export function isEmpty(value){
 		return true;
 	}
 	return false;
+}
+// 平级转树结构
+/* treeArr 基础数据
+ * id 唯一id
+ * parentId 父级id
+ * childrenList 子级数组名*/
+export function packageTreeData(params) {
+  const treeArr = params && params.data || []
+  const id = params && params.id || 'id'
+  const parentId = params && params.parentId || 'parentId'
+  const childrenList = params && params.children || 'children'
+  const cloneData = JSON.parse(JSON.stringify(treeArr))
+  return cloneData.filter(fatherItem => {
+    const warpArr = cloneData.filter(sonItem => fatherItem[id] === sonItem[parentId])
+    warpArr.length ? fatherItem[childrenList] = warpArr : null
+    return !fatherItem[parentId]
+  })
 }

+ 14 - 0
libs/tool.js

@@ -37,4 +37,18 @@ export function toTreeText(data) {
 	return val
 }
 
+// 只能转换 4000 以下的正整数阿拉伯数字
+export function NumConvertLM(num) {
+  var Roman = [['', 'I', 'Ⅱ', 'Ⅲ', 'Ⅳ', 'Ⅴ', 'Ⅵ', 'Ⅶ', 'Ⅷ', 'Ⅸ'],
+    ['', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'],
+    ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM'],
+    ['', 'M', 'MM', 'MMM', '  ', ' ', '  ', '   ', '    ', '  ']]
 
+  if (isNaN(num)) return num
+  var ReverseArr = num.toString().split('').reverse()
+  var CorrectArr = []
+  for (var i = 0; i < ReverseArr.length; i++) {
+    CorrectArr.unshift(Roman[i][ReverseArr[i]])
+  }
+  return CorrectArr.join('')
+}

+ 55 - 12
manifest.json

@@ -1,7 +1,7 @@
 {
-    "name" : "app",
+    "name" : "采空区巡检",
     "appid" : "__UNI__ED9AEA5",
-    "description" : "",
+    "description" : "采空区巡检",
     "versionName" : "1.0.0",
     "versionCode" : "100",
     "transformPx" : false,
@@ -16,27 +16,34 @@
             "autoclose" : true,
             "delay" : 0
         },
-        "modules" : {},
+        "modules" : {
+            "Barcode" : {},
+            "VideoPlayer" : {},
+            "Fingerprint" : {},
+            "Camera" : {},
+            "Bluetooth" : {}
+        },
         /* 模块配置 */
         "distribute" : {
             /* 应用发布信息 */
             "android" : {
                 /* android打包配置 */
                 "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.USE_FINGERPRINT\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ]
             },
@@ -46,6 +53,41 @@
             /* ios打包配置 */
             "sdkConfigs" : {
                 "ad" : {}
+            },
+            "splashscreen" : {
+                "useOriginalMsgbox" : true
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
             }
         }
     },
@@ -65,5 +107,6 @@
         "router" : {
             "base" : "./"
         }
-    }
+    },
+    "locale" : "auto"
 }

+ 6 - 6
pages.json

@@ -1,6 +1,12 @@
 {
 	"pages": [
 		{
+					"path": "pages/login/login",
+					"style": {
+						"navigationBarTitleText": "登录"
+					}
+		},
+		{
 			"path": "pages/index/index",
 			"style": {
 				"navigationBarTitleText": "任务",
@@ -22,12 +28,6 @@
 				"navigationStyle": "custom"
             } 
         },	   
-	   {
-			"path": "pages/login/login",
-			"style": {
-				"navigationBarTitleText": "登录"
-			}
-	   },
 		{
 			"path": "pages/mine/password/password",
 			"style": {

+ 18 - 1
pages/index/index.vue

@@ -27,6 +27,7 @@
 			<template v-if="items.length>0">
 				<div class="item" v-for="(item,index) in items" :key="item.taskId" @click="linkTo(item)">
 					<div class="task-title">{{item.taskTitle}}</div>
+					<h4 class="goafName" v-if="item.goafName">{{formateGoafName(item)}}</h4>
 					<div class="time">{{item.expectedStartDate}}-{{item.expectedEndDate}}</div>
 				</div>
 			</template>
@@ -43,6 +44,7 @@
 
 <script>
 	import {getCheckTaskByList,goaftaskstatis} from '@/api/task.js'
+	import { NumConvertLM } from '@/libs/tool'
 	export default {
 		data() {
 			return {
@@ -82,6 +84,14 @@
 			initStatusBarHeight(){
 				this.statusBarHeight=uni.getSystemInfoSync().statusBarHeight
 			},
+			formateGoafName({
+				goafOrebelt,
+				goafOrebody,
+				goafOreheight,
+				goafName
+			}){	
+				return `${NumConvertLM(goafOrebelt)}/${ goafOrebody}/${goafOreheight}/${goafName}`
+			},
 			getData(){
 				let conditions={}
 				if(this.type==='user'){
@@ -219,7 +229,14 @@
 				.task-title{
 					color: #212121;
 					font-size: 32upx;	
-					padding-bottom: 24upx;
+					padding-bottom: 24rpx;
+				}
+				.goafName{
+					color: #666;
+					font-weight: normal;
+					font-size: 28rpx;
+					word-break: break-all;
+					padding-bottom: 16rpx;
 				}
 				.time{
 					background-image: url(/static/index/time.png);

+ 6 - 2
pages/mine/mine.vue

@@ -184,14 +184,18 @@
 		font-size: 32upx;
 		line-height: 88upx;
 		text-align: center;
-		color: #999999;
-		background: #F2F2F2;
+		color: #fff;
+		background: #8DA6FF;
 		border-radius: 4px;
 		text-align: center;
 		position: absolute;
 		bottom: 150upx;
 		margin-left: 50%;
 		transform: translateX(-50%);
+		.disable{
+			background: #F2F2F2;
+			color: #999999;
+		}
 	}
 }
 </style>

+ 45 - 250
pages/risk/check/check.vue

@@ -1,273 +1,68 @@
 <template>
 	<view class="task-page">
-		<div class="title">{{item.hdangerTitle}}</div>
-		<div class="info">
-			<div class="item">
-				<view class="name">上报人</view>
-				<view class="cont">{{item.curAccountName}}</view>	
-			</div>
-			<div class="item">
-				<view class="name">所属部门</view>
-				<view class="cont">{{item.curGroupName}}</view>	
-			</div>
-			<div class="item">
-				<view class="name">发布时间</view>
-				<view class="cont">{{parseTime(item.curActivityBeginTime)}}</view>	
-			</div>
+		<div class="head">
+			<uni-segmented-control 
+			:current="current" 
+			:values="items" @clickItem="onClickItem" 
+			activeColor="#007aff">	
+			</uni-segmented-control>			
 		</div>
-		<div class="status" v-if="flowData">
-			<div class="head">整改过程</div>
-			<template>
-				<view class="flow-head">
-					<span class="flow-user">{{flowData.groupName}}-{{flowData.accountName||'***'}}</span>
-					<view class="flow-time">{{parseTime(flowData.actionTime)}}</view>
-				</view>
-				<div class="desc">{{flowData.actionRemark}}</div>
-				<div class="attach">
-					<view class="attach-item" v-for="(attach,index) in flowData.attachList" :key="'attach-'+index">
-						<image class="image" :src="attach.fileUrl" mode="widthFix"></image>
-					</view>
-				</div>
-			</template>
-		</div>
-<!-- 		<div class="check status" :class="check.status===0?'reject':(check.status===1?'pass':'')" v-if="check.status!==''"> -->
-<!-- 		<div class="check status pass">			
-			<div class="head">验收过程</div>
-			<template v-if="flowData">
-				<view class="flow-head">
-					<span class="flow-user">{flowData.groupName}}-{{flowData.accountName||'***'}}</span>
-					<view class="flow-time">{{parseTime(check.time)}}</view>
-				</view>
-				<div class="desc">{{check.actionRemark}}</div>
-				<div class="attach">
-					<view class="attach-item" v-for="(attach,index) in actionRemark.attachList" :key="'attach-'+index">
-						<image class="image" :src="attach.fileUrl" mode="widthFix"></image>
-					</view>
-				</div>
-			</template>
-		</div> -->
-		<view class="footer" @click="onSubmit">验收</view>
-<!-- 		<view class="footer" @click="onRectify" v-if="check.status===0">二次整改</view> -->
+		<view class="content">
+			<view v-show="current === 0">
+				<accept-form ref="accept-form" @success="getWorkflow"></accept-form>
+			</view>
+			<view v-show="current === 1">
+				<accept-history ref="accept-history"></accept-history>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
-	import { getWorkflowById } from '@/api/system/wfApi'
-	import {parseTime} from '@/libs/index.js'
+import acceptForm from './form/form.vue'
+import acceptHistory from './history/index.vue'
 	export default {
 		data() {
 			return {
-				item:{
-				},
-				flowData:{
-					status:"",
-					time:"",
-					desc:"",
-					attachList:[]
-				},
-				check:{
-					status:"",
-					time:"",
-					desc:"",
-					attachList:[]					
-				}
+				items: ['基本信息', '历史记录'],
+				current: 0
 			}
 		},
-		onLoad() {
-			this.getTask()
+		components:{
+			acceptForm,
+			acceptHistory
 		},
 		methods: {
-			parseTime,
-			init(){
-				// let title="待验收"
-				// this.flow={
-				// 	status:-1,
-				// 	user:"王麻子",
-				// 	time:new Date(),
-				// 	desc:"处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述",
-				// 	attachList:[
-				// 		{url:"/static/preview/1.png"},
-				// 		{url:"/static/preview/2.png"},
-				// 		{url:"/static/preview/3.png"}
-				// 	]
-				// }
-				// /*已经验收 未通过*/
-				// this.check={
-				// 	status:0,
-				// 	user:"王麻子",
-				// 	time:new Date(),
-				// 	desc:"处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述",
-				// 	attachList:[
-				// 		{url:"/static/preview/1.png"},
-				// 		{url:"/static/preview/2.png"},
-				// 		{url:"/static/preview/3.png"}
-				// 	]
-				// }
-				// // 验收完成
-				// if(this.check.status===1){
-				// 	uni.setNavigationBarTitle({
-				// 		title: '已完成'
-				// 	});			
-				// }
-				// if(this.check.status===0){
-				// 	uni.setNavigationBarTitle({
-				// 		title: '待验收'
-				// 	});			
-				// }
-			},
-			getTask(){
-				let data=uni.getStorageSync('danger-info')
-				this.item=data
-				  getWorkflowById(data.wfInsId).then((resp) => {
-					this.listLoading = false
-					const { code, data, msg } = resp
-					if (code === 0) {
-					  this.flowData = data.activityInsRecordList.filter(item=>item.formCode==='rectify')[0]
-					} else {
-					  this.$message.error(msg)
-					}
-				  })
+			onClickItem(e) {
+			  if (this.current != e.currentIndex) {
+				this.current = e.currentIndex;
+			  }
 			},
-			onSubmit(){
-				uni.navigateTo({
-					url:'/pages/risk/check/form/form'
-				})
-			},
-			onRectify(){
-				uni.navigateTo({
-					url:'/pages/risk/rectify/form/form'
-				})			
+			getWorkflow(data){
+				if(data&&data.activityInsRecordList){
+					this.$refs['accept-history'].loadData(data.activityInsRecordList)
+				}
 			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.task-page{
-		background-color: #F3F5FB;
-		padding-bottom: 120rpx;
-		height: 100vh;
-		overflow-y: auto;
-		.title{
-			font-family: 'Source Han Sans CN';
-			font-style: normal;
-			font-weight: 700;
-			font-size: 36rpx;
-			line-height: 54rpx;
-			color: #212121;
-			padding:0 32rpx;
-		}
-		.info{
-			padding: 0 32rpx;
-			margin: 40rpx 0;
-			background: #FFFFFF;
-			border-radius: 32rpx 32rpx 0px 0px;	
-			.item{
-				border-bottom: 1rpx solid #EFF1F3;	
-				padding: 40rpx 32rpx;
-				.name{
-					font-size: 28rpx;
-					color: #999999;
-					line-height: 1;
-				}
-				.cont{
-					font-size: 30rpx;
-					color: #212121;
-					line-height: 1.5;
-					padding-top: 12rpx;
-				}
-				&:last-child{
-					border-bottom:none;
-				}
-			}
-		}
-		.status{
-			background-color: #FFFFFF;
-			border-radius: 32rpx 32rpx 0px 0px;
-			padding: 48rpx 32rpx;
-			&.check{
-				margin-top: 24rpx;
-				background-repeat: no-repeat;
-				background-position: right top;
-				&.pass{
-					background-image: url('/static/icon/pass.png');
-				}
-				&.reject{
-					background-image: url('/static/icon/reject.png');
-				}					
-			}	
-			.head{
-				color: #212121;
-				font-size: 34rpx;
-				line-height:1;
-				font-weight: 700;				
-			}
-			.icon-empty{
-				display: block;
-				width: 160rpx;
-				margin: 64rpx auto 0;
-			}
-			p{
-				font-size: 24rpx;
-				line-height: 28rpx;
-				color: #D5D5D5;
-				text-align: center;
-			}
-			.flow-head{
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				font-family: 'Abhaya Libre';
-				font-style: normal;
-				font-weight: 400;
-				font-size: 24rpx;
-				line-height: 48rpx;
-				padding: 30rpx 0  24rpx 0;
-				color: #999;
-			}
-			.desc{
-				font-family: 'SF Pro Text';
-				font-style: normal;
-				font-weight: 500;
-				font-size: 30rpx;
-				line-height: 42rpx;
-				color: #434343;
-				padding-bottom: 24rpx;
-			}
-			.attach{
-				display: flex;
-				flex-wrap: wrap;
-				.attach-item{
-					width: 224rpx;
-					overflow: hidden;
-					margin-right: 7rpx;
-					margin-bottom: 20rpx;
-					&:nth-child(3n){
-						margin-right: 0;
-					}
-					.image{
-						display: block;
-						width: 224rpx;
-						border-radius: 8px;
-					}
-				}				
-			}
-		}
-		.footer{
-			width: 100%;
-			height: 136upx;
-			background: #FFFFFF;
-			border-radius: 16upx 16upx 0px 0px;
-			position: fixed;
-			left: 0;
-			bottom: 0;
-			text-align: center;
-			color: #168DEC;
-			font-size: 32upx;
-			padding-top: 20upx;
-			letter-spacing: 2px;
-			border: 1px solid #eaeaea;
-		}
+.task-page{
+	padding:20rpx;
+	position: relative;
+	.head{
+		position: fixed;
+		z-index: 999;
+		width: 710rpx;
+		left: 10px;
+		top: var(--window-top);
+		background-color: #fff;
+		box-sizing: border-box;
+		padding-top: 5px;
 	}
-
+	.content{
+		margin-top:36px;	
+	}
+}
 </style>

+ 255 - 0
pages/risk/check/check_accept.vue

@@ -0,0 +1,255 @@
+<template>
+	<view class="task-page">
+		<div class="title">{{item.hdangerTitle}}</div>
+		<div class="info">
+			<div class="item">
+				<view class="name">上报人</view>
+				<view class="cont">{{item.curAccountName}}</view>	
+			</div>
+			<div class="item">
+				<view class="name">所属部门</view>
+				<view class="cont">{{item.curGroupName}}</view>	
+			</div>
+			<div class="item">
+				<view class="name">发布时间</view>
+				<view class="cont">{{parseTime(item.curActivityBeginTime)}}</view>	
+			</div>
+		</div>
+		<div class="status" v-if="flowData">
+			<div class="head">整改过程</div>
+			<template>
+				<view class="flow-head">
+					<span class="flow-user">{{flowData.groupName}}-{{flowData.accountName||'***'}}</span>
+					<view class="flow-time">{{parseTime(flowData.actionTime)}}</view>
+				</view>
+				<div class="desc">{{flowData.actionRemark}}</div>
+				<div class="attach">
+					<view class="attach-item" v-for="(attach,index) in flowData.attachList" :key="'attach-'+index">
+						<image class="image" :src="attach.fileUrl" mode="widthFix"></image>
+					</view>
+				</div>
+			</template>
+		</div>
+		<view class="footer" @click="onSubmit">验收</view>
+</template>
+
+<script>
+	import { getWorkflowById } from '@/api/system/wfApi'
+	import {parseTime} from '@/libs/index.js'
+	export default {
+		data() {
+			return {
+				item:{
+				},
+				flowData:{
+					status:"",
+					time:"",
+					desc:"",
+					attachList:[]
+				},
+				check:{
+					status:"",
+					time:"",
+					desc:"",
+					attachList:[]					
+				}
+			}
+		},
+		onLoad() {
+			this.getTask()
+		},
+		methods: {
+			parseTime,
+			init(){
+				// let title="待验收"
+				// this.flow={
+				// 	status:-1,
+				// 	user:"王麻子",
+				// 	time:new Date(),
+				// 	desc:"处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述",
+				// 	attachList:[
+				// 		{url:"/static/preview/1.png"},
+				// 		{url:"/static/preview/2.png"},
+				// 		{url:"/static/preview/3.png"}
+				// 	]
+				// }
+				// /*已经验收 未通过*/
+				// this.check={
+				// 	status:0,
+				// 	user:"王麻子",
+				// 	time:new Date(),
+				// 	desc:"处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述",
+				// 	attachList:[
+				// 		{url:"/static/preview/1.png"},
+				// 		{url:"/static/preview/2.png"},
+				// 		{url:"/static/preview/3.png"}
+				// 	]
+				// }
+				// // 验收完成
+				// if(this.check.status===1){
+				// 	uni.setNavigationBarTitle({
+				// 		title: '已完成'
+				// 	});			
+				// }
+				// if(this.check.status===0){
+				// 	uni.setNavigationBarTitle({
+				// 		title: '待验收'
+				// 	});			
+				// }
+			},
+			getTask(){
+				let data=uni.getStorageSync('danger-info')
+				this.item=data
+				  getWorkflowById(data.wfInsId).then((resp) => {
+					this.listLoading = false
+					const { code, data, msg } = resp
+					if (code === 0) {
+					  this.flowData = data.activityInsRecordList.filter(item=>item.formCode==='rectify')[0]
+					} else {
+					  this.$message.error(msg)
+					}
+				  })
+			},
+			onSubmit(){
+				uni.navigateTo({
+					url:'/pages/risk/check/form/form'
+				})
+			},
+			onRectify(){
+				uni.navigateTo({
+					url:'/pages/risk/rectify/form/form'
+				})			
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.task-page{
+		background-color: #F3F5FB;
+		padding-bottom: 120rpx;
+		height: 100vh;
+		overflow-y: auto;
+		.title{
+			font-family: 'Source Han Sans CN';
+			font-style: normal;
+			font-weight: 700;
+			font-size: 36rpx;
+			line-height: 54rpx;
+			color: #212121;
+			padding:0 32rpx;
+		}
+		.info{
+			padding: 0 32rpx;
+			margin: 40rpx 0;
+			background: #FFFFFF;
+			border-radius: 32rpx 32rpx 0px 0px;	
+			.item{
+				border-bottom: 1rpx solid #EFF1F3;	
+				padding: 40rpx 32rpx;
+				.name{
+					font-size: 28rpx;
+					color: #999999;
+					line-height: 1;
+				}
+				.cont{
+					font-size: 30rpx;
+					color: #212121;
+					line-height: 1.5;
+					padding-top: 12rpx;
+				}
+				&:last-child{
+					border-bottom:none;
+				}
+			}
+		}
+		.status{
+			background-color: #FFFFFF;
+			border-radius: 32rpx 32rpx 0px 0px;
+			padding: 48rpx 32rpx;
+			&.check{
+				margin-top: 24rpx;
+				background-repeat: no-repeat;
+				background-position: right top;
+				&.pass{
+					background-image: url('/static/icon/pass.png');
+				}
+				&.reject{
+					background-image: url('/static/icon/reject.png');
+				}					
+			}	
+			.head{
+				color: #212121;
+				font-size: 34rpx;
+				line-height:1;
+				font-weight: 700;				
+			}
+			.icon-empty{
+				display: block;
+				width: 160rpx;
+				margin: 64rpx auto 0;
+			}
+			p{
+				font-size: 24rpx;
+				line-height: 28rpx;
+				color: #D5D5D5;
+				text-align: center;
+			}
+			.flow-head{
+				display: flex;
+				justify-content: space-between;
+				align-items: center;
+				font-family: 'Abhaya Libre';
+				font-style: normal;
+				font-weight: 400;
+				font-size: 24rpx;
+				line-height: 48rpx;
+				padding: 30rpx 0  24rpx 0;
+				color: #999;
+			}
+			.desc{
+				font-family: 'SF Pro Text';
+				font-style: normal;
+				font-weight: 500;
+				font-size: 30rpx;
+				line-height: 42rpx;
+				color: #434343;
+				padding-bottom: 24rpx;
+			}
+			.attach{
+				display: flex;
+				flex-wrap: wrap;
+				.attach-item{
+					width: 224rpx;
+					overflow: hidden;
+					margin-right: 7rpx;
+					margin-bottom: 20rpx;
+					&:nth-child(3n){
+						margin-right: 0;
+					}
+					.image{
+						display: block;
+						width: 224rpx;
+						border-radius: 8px;
+					}
+				}				
+			}
+		}
+		.footer{
+			width: 100%;
+			height: 136upx;
+			background: #FFFFFF;
+			border-radius: 16upx 16upx 0px 0px;
+			position: fixed;
+			left: 0;
+			bottom: 0;
+			text-align: center;
+			color: #168DEC;
+			font-size: 32upx;
+			padding-top: 20upx;
+			letter-spacing: 2px;
+			border: 1px solid #eaeaea;
+		}
+	}
+
+</style>

+ 40 - 15
pages/risk/check/form/form.vue

@@ -1,6 +1,9 @@
 <template>
 	<div class="body">		
 		<uni-forms ref="form" label-position="top" :model="formData">
+			<uni-forms-item label="预警描述" >
+				<p class="desc">{{formData.hdangerDesc}}</p>
+			</uni-forms-item>
 			<uni-forms-item label="处理动作" name="actionId" required>
 				<uni-data-checkbox v-model="flowData.actionId" :localdata="actionList" @change="changeCheck"/>
 			</uni-forms-item>
@@ -32,9 +35,9 @@
 				formData:{
 					'hdangerId': undefined,
 					'formCode': 'submit',
-					'hdangerTitle': '', // 预警标题
-					'dangerCatId': undefined, // 预警类别ID
-					'hdangerLevel': 1, // 预警等级
+					'hdangerTitle': '', // 隐患标题
+					'dangerCatId': undefined, // 隐患类别ID
+					'hdangerLevel': 1, // 隐患等级
 					'hdangerDesc': '', // 描述
 					'submitTime': parseTime(new Date()),
 					'dangerDeadline': '', // 截止时间
@@ -85,7 +88,7 @@
 				if(data){
 					this.formData.checklistId = data.checklistId
 					this.formData.goafId = data.goafId
-					this.formData.acceptRemark = data.checkItemNopass
+					this.formData.hdangerDesc = data.checkItemNopass
 					this.formData.hdangerTitle = data.checkItemNopass		
 				}
 			},
@@ -101,21 +104,23 @@
 				    "activityCode": this.flowData.activityCode,
 				    "actionId": this.flowData.actionId,
 				    "actionCode": this.flowData.actionCode,
-				    "actionRemark": this.formData.acceptRemark,
+				    "actionRemark": this.formData.hdangerDesc,
 					"attachList":this.formData.attachList
-				})
-				//renshengkuduan !
-				this.formData.status=4
-				this.formData.submitTime=parseTime(this.formData.submitTime)
-				this.formData.dangerDeadline=parseTime(this.formData.dangerDeadline)
-				updateDanger(this.formData).then((resp) => {
-					uni.switchTab({
-						url:'/pages/risk/risk'
-					})
+				}).then(()=>{
+					//renshengkuduan !
+					this.formData.status=4
+					this.formData.submitTime=parseTime(this.formData.submitTime)
+					this.formData.dangerDeadline=parseTime(this.formData.dangerDeadline)
+					updateDanger(this.formData).then((resp) => {
+						uni.switchTab({
+							url:'/pages/risk/risk'
+						})
+					})					
 				})
 			},
 			upload(){
 				let self=this;
+				let attachList= JSON.parse(JSON.stringify(this.formData.attachList))
 				uni.chooseImage({
 					success:(files)=>{
 						let filePath = files.tempFilePaths[0]
@@ -123,12 +128,25 @@
 							filePath
 						}).then((res)=>{
 							let result=JSON.parse(res);
-							let attachList=[result.data]
+							attachList.push(result.data)
 							self.$set(self.formData,'attachList',attachList)
+							self.$nextTick(()=>{
+								self.scrollBottom()
+							})
 						})
 					}
 				})
 			},
+			scrollBottom(duration=100){
+				 uni.createSelectorQuery().select(".footer").boundingClientRect((res)=>{
+					console.log(res)
+					  const scrollH = res.top;
+				  uni.pageScrollTo({
+				    duration,// 过渡时间
+				    scrollTop: scrollH,// 滚动的实际距离
+				  })
+				}).exec()
+			},
 			verify(){
 				let items={
 					'acceptRemark': '处理说明', // 		
@@ -158,6 +176,13 @@
 	padding:21rpx 16rpx;
 	background-color: #F3F5FB;
 	padding-bottom: 160rpx;
+	.desc{
+		padding-left: 24rpx;
+		color: #666;
+		background-color: #fff;
+		border-radius: 10rpx;
+		padding: 10rpx;
+	}
 	.status-item{
 		padding: 22rpx 32rpx;
 		background-color: #fff;

+ 89 - 0
pages/risk/check/history/index.vue

@@ -0,0 +1,89 @@
+<template>
+	<view class="reviewHistory">
+		<template v-if="items.length>0">
+			<uni-section title="历史记录" type="line" v-for="(item,index) in items" :key="index">
+				<uni-group :title="item.activityInsTitle" mode="card">
+					<uni-list >
+						<uni-list-item  title="处理时间" :right-text="item.actionTime"></uni-list-item>
+						<uni-list-item  title="人员" :right-text="item.accountName"></uni-list-item>
+						<uni-list-item  title="处理关卡" :right-text="item.activityInsTitle"></uni-list-item>
+						<uni-list-item  title="处理动作" :right-text="item.actionTitle"></uni-list-item>
+						<uni-list-item  title="处理说明" :note="item.actionRemark"></uni-list-item>
+						<uni-list-item  title="附件">
+							<view slot="body">
+								<template v-if="item.attachList.length>0">
+									<image v-for="(attach,index) in item.attachList"
+									class="attach" 
+									:key="index"
+									:src="attach.fileUrl" 
+									@click="preview(item.attachList)"
+									mode="widthFix" ></image>
+								</template>
+								<template v-else>
+									<p style="font-size: 28rpx;color: #666;">没有附件</p>
+								</template>								
+							</view>
+						</uni-list-item>
+					</uni-list>
+				</uni-group>
+			</uni-section>
+		</template>
+		<template v-else>
+			<view class="empty">
+				<image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
+				<p>暂无历史信息</p>					
+			</view>
+		</template>		
+	</view>
+
+
+</template>
+
+<script>
+	export default{
+		name:"reviewHistory",
+		data(){
+			return{
+				items:[]
+			}
+		},
+		methods:{
+			loadData(items=[]){
+				if(items.length>0){
+					this.items=items			
+				}
+			},
+			preview(attachList=[]){
+				let urls=attachList.map(item=>item.fileUrl)
+				uni.previewImage({
+					urls
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.reviewHistory{
+		.empty{
+			.icon-empty{
+				display: block;
+				width: 160rpx;
+				margin: 364rpx auto 0;
+			}	
+			p{
+				font-size: 28rpx;
+				line-height: 1.8;
+				color: #666;
+				text-align: center;
+			}			
+		}
+		::v-deep.attach{
+			display: block;
+			width: 120rpx;
+			border: 1rpx solid #eaeaea;
+			padding: 10rpx;
+			box-sizing: border-box;
+		}
+	}
+</style>

+ 80 - 17
pages/risk/rectify/form/form.vue

@@ -1,13 +1,24 @@
 <template>
 	<div class="body">		
 		<uni-forms ref="form" label-position="top" :model="formData">
+			<uni-forms-item label="预警描述" >
+				<p class="desc">{{formData.hdangerDesc}}</p>
+			</uni-forms-item>
 			<uni-forms-item label="处理动作" name="actionId" required>
 				<uni-data-checkbox v-model="flowData.actionId" :localdata="actionList" @change="changeCheck"/>
 			</uni-forms-item>
 			<uni-forms-item label="处理说明" name="rectifyRemark" required>
-				<uni-easyinput type="textarea" autoHeight v-model="formData.rectifyRemark" placeholder="请输入描述"></uni-easyinput>
+				<uni-easyinput type="textarea" autoHeight v-model="formData.acceptRemark" placeholder="请输入描述"></uni-easyinput>
 			</uni-forms-item>
 			<uni-forms-item label="验收人" name="acceptAccountId" required>
+				<view style="padding-bottom: 16rpx;">
+					<uni-data-picker :map='groupMap'
+					placeholder="请选择组织"
+					 popup-title="请选择组织" 
+					:localdata="groupList"
+					@change="onchangeGroup">  
+					</uni-data-picker> 					
+				</view> 
 				<uni-data-select
 					v-model="formData.acceptAccountId"
 					:localdata="userList"
@@ -32,7 +43,8 @@
 	import {upload} from '@/api/index.js'
     import { startWorkflow, getWorkflowById, handleWorkflow } from '@/api/system/wfApi'
 	import { updateDanger, getDangerById } from '@/api/dangerApi'
-	import {parseTime} from '@/libs'
+	import { getGroupByList } from '@/api/system/groupApi'
+	import {parseTime,packageTreeData} from '@/libs'
 	export default {
 		data() {
 			return {
@@ -42,7 +54,7 @@
 					'hdangerTitle': '', // 预警标题
 					'dangerCatId': undefined, // 预警类别ID
 					'hdangerLevel': 1, // 预警等级
-					'rectifyRemark': '', // 描述
+					'acceptRemark': '', // 描述
 					'submitTime': parseTime(new Date()),
 					'dangerDeadline': '', // 截止时间
 					'goafId': undefined,
@@ -51,6 +63,8 @@
 				},
 				flowData:{
 				},
+				groupList:[],
+				groupMap:{text:"groupName",value:"groupId"},
 				actionList:[],
 				userList:[]
 			}
@@ -65,6 +79,7 @@
 			  getWorkflowById(wfInsId).then((resp) => {
 				const { code, data, msg } = resp
 				if (code === 0) {
+				  this.$emit('success',data)
 				  this.flowData = data
 				  this.flowData.wfDefId = data.wfDefId
 				  this.flowData.wfInsId = data.wfInsId
@@ -91,10 +106,11 @@
 				this.formData={...this.formData,...danger_info}
 				this.get(danger_info.hdangerId)
 				this.getUser()
+				this.getGroup()				
 				if(data){
 					this.formData.checklistId = data.checklistId
 					this.formData.goafId = data.goafId
-					this.formData.rectifyRemark = data.checkItemNopass
+					this.formData.acceptRemark = data.checkItemNopass
 					this.formData.hdangerTitle = data.checkItemNopass		
 				}
 			},
@@ -125,29 +141,54 @@
 				    "activityCode": this.flowData.activityCode,
 				    "actionId": this.flowData.actionId,
 				    "actionCode": this.flowData.actionCode,
-				    "actionRemark": this.formData.rectifyRemark,
+				    "actionRemark": this.formData.acceptRemark,
 					"attachList":this.formData.attachList,
 					"groupIdTo": user.groupId,
 					"positionIdTo": user.positionId,
-					"accountIdTo": user.groupId,
+					"accountIdTo": user.accountId,
 					"groupNameTo": user.groupName,
 					"positionNameTo": user.positionName,
 					"accountNameTo": user.accountName,
+				}).then((res)=>{
+					let flow=res.data
+					  if (flow.curActivityCode === 'review') {
+						this.formData.status = 1
+					  }
+					  if (flow.curActivityCode === 'rectify') {
+						this.formData.status = 2
+					  }
+					  if (flow.curActivityCode === 'accept') {
+						this.formData.status = 3
+					  }
+						this.formData.submitTime=parseTime(this.formData.submitTime)
+						this.formData.dangerDeadline=parseTime(this.formData.dangerDeadline)
+						updateDanger(this.formData).then((resp) => {
+							uni.switchTab({
+								url:'/pages/risk/risk'
+							})
+						})					
 				})
-				//renshengkuduan !
-				this.formData.status=3
-				this.formData.submitTime=parseTime(this.formData.submitTime)
-				this.formData.dangerDeadline=parseTime(this.formData.dangerDeadline)
-				updateDanger(this.formData).then((resp) => {
-					uni.switchTab({
-						url:'/pages/risk/risk'
+			},
+			onchangeGroup({detail}){
+				let groupVal=detail.value
+				let groupId=groupVal[groupVal.length-1].value
+				this.formData.acceptAccountId=""
+				this.getUser(groupId)
+			},
+			getGroup(){
+				getGroupByList().then((res)=>{
+					let items=packageTreeData({
+						data:res.data,
+						id:"groupId"
 					})
+					this.groupList=items
 				})
 			},
-			getUser(){
+			getUser(groupId){
 				getUserByPage({
 					page: 1,
-					limit: 999999
+					limit: 999999,
+					groupId
 				}).then((res)=>{
 					this.userList=res.data.map(item=>{
 						return{
@@ -160,6 +201,7 @@
 			},
 			upload(){
 				let self=this;
+				let attachList= JSON.parse(JSON.stringify(this.formData.attachList))
 				uni.chooseImage({
 					success:(files)=>{
 						let filePath = files.tempFilePaths[0]
@@ -167,12 +209,24 @@
 							filePath
 						}).then((res)=>{
 							let result=JSON.parse(res);
-							let attachList=[result.data]
+							attachList.push(result.data)
 							self.$set(self.formData,'attachList',attachList)
+							self.$nextTick(()=>{
+								self.scrollBottom()
+							})
 						})
 					}
 				})
 			},
+			scrollBottom(duration=100){
+				 uni.createSelectorQuery().select(".footer").boundingClientRect((res)=>{
+					  const scrollH = res.top;
+				  uni.pageScrollTo({
+				    duration,// 过渡时间
+				    scrollTop: scrollH,// 滚动的实际距离
+				  })
+				}).exec()
+			},
 			verify(){
 				let items={
 					'rectifyRemark': '处理说明', // 		
@@ -201,7 +255,14 @@
 	box-sizing: border-box;
 	padding:21rpx 16rpx;
 	background-color: #F3F5FB;
-	padding-bottom: 160rpx;
+	padding-bottom: 160rpx;		
+	.desc{
+		padding-left: 24rpx;
+		color: #666;
+		background-color: #fff;
+		border-radius: 10rpx;
+		padding: 10rpx;
+	}
 	.status-item{
 		padding: 22rpx 32rpx;
 		background-color: #fff;
@@ -252,6 +313,8 @@
 		.preview-item{
 			width: 200rpx;
 			height: 200rpx;
+			border: 1px solid #ccc;
+			margin: 10rpx;
 		}
 	}
 }

+ 89 - 0
pages/risk/rectify/history/index.vue

@@ -0,0 +1,89 @@
+<template>
+	<view class="reviewHistory">
+		<template v-if="items.length>0">
+			<uni-section title="历史记录" type="line" v-for="(item,index) in items" :key="index">
+				<uni-group :title="item.activityInsTitle" mode="card">
+					<uni-list >
+						<uni-list-item  title="处理时间" :right-text="item.actionTime"></uni-list-item>
+						<uni-list-item  title="人员" :right-text="item.accountName"></uni-list-item>
+						<uni-list-item  title="处理关卡" :right-text="item.activityInsTitle"></uni-list-item>
+						<uni-list-item  title="处理动作" :right-text="item.actionTitle"></uni-list-item>
+						<uni-list-item  title="处理说明" :note="item.actionRemark"></uni-list-item>
+						<uni-list-item  title="附件">
+							<view slot="body">
+								<template v-if="item.attachList.length>0">
+									<image v-for="(attach,index) in item.attachList"
+									class="attach" 
+									:key="index"
+									:src="attach.fileUrl" 
+									@click="preview(item.attachList)"
+									mode="widthFix" ></image>
+								</template>
+								<template v-else>
+									<p style="font-size: 28rpx;color: #666;">没有附件</p>
+								</template>								
+							</view>
+						</uni-list-item>
+					</uni-list>
+				</uni-group>
+			</uni-section>
+		</template>
+		<template v-else>
+			<view class="empty">
+				<image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
+				<p>暂无历史信息</p>					
+			</view>
+		</template>		
+	</view>
+
+
+</template>
+
+<script>
+	export default{
+		name:"reviewHistory",
+		data(){
+			return{
+				items:[]
+			}
+		},
+		methods:{
+			loadData(items=[]){
+				if(items.length>0){
+					this.items=items			
+				}
+			},
+			preview(attachList=[]){
+				let urls=attachList.map(item=>item.fileUrl)
+				uni.previewImage({
+					urls
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.reviewHistory{
+		.empty{
+			.icon-empty{
+				display: block;
+				width: 160rpx;
+				margin: 364rpx auto 0;
+			}	
+			p{
+				font-size: 28rpx;
+				line-height: 1.8;
+				color: #666;
+				text-align: center;
+			}			
+		}
+		::v-deep.attach{
+			display: block;
+			width: 120rpx;
+			border: 1rpx solid #eaeaea;
+			padding: 10rpx;
+			box-sizing: border-box;
+		}
+	}
+</style>

+ 47 - 171
pages/risk/rectify/rectify.vue

@@ -1,195 +1,71 @@
 <template>
 	<view class="task-page">
-		<div class="title">{{item.hdangerTitle}}</div>
-		<div class="info">
-			<div class="item">
-				<view class="name">执行人</view>
-				<view class="cont">{{item.curAccountName}}</view>	
-			</div>
-			<div class="item">
-				<view class="name">执行部门</view>
-				<view class="cont">{{item.curGroupName}}</view>	
-			</div>
-			<div class="item">
-				<view class="name">上报时间</view>
-				<view class="cont">{{parseTime(item.curActivityBeginTime)}}</view>	
-			</div>
-		</div>
-		<div class="status">
-			<div class="head">整改过程</div>
-			<template >
-				<image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
-				<p>暂无处置信息</p>	
-				<view class="footer" @click="onSubmit">整改</view>
-			</template>
+		<div class="head">
+			<uni-segmented-control 
+			:current="current" 
+			:values="items" @clickItem="onClickItem" 
+			activeColor="#007aff">	
+			</uni-segmented-control>			
 		</div>
+		<view class="content">
+			<view v-show="current === 0">
+				<rectify-form ref="rectify-form" @success="getWorkflow"></rectify-form>
+			</view>
+			<view v-show="current === 1">
+				<rectify-history ref="rectify-history"></rectify-history>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
-	import {parseTime} from '@/libs/index.js'
+import rectifyForm from './form/form.vue'
+import rectifyHistory from './history/index.vue'
 	export default {
 		data() {
 			return {
-				item:{
-				},
-				flow:{
-					status:"",
-					time:"",
-					desc:"",
-					attachList:[]
-				}
+				items: ['基本信息', '历史记录'],
+				current: 0
 			}
 		},
+		components:{
+			rectifyForm,
+			rectifyHistory
+		},
 		onLoad() {
-			this.getTask()
+
 		},
 		methods: {
-			parseTime,
-			init(){
-				this.flow={
-					status:-1,
-					time:new Date(),
-					desc:"处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述处置过程描述",
-					attachList:[
-						{url:"/static/preview/1.png"},
-						{url:"/static/preview/2.png"},
-						{url:"/static/preview/3.png"},
-						{url:"/static/preview/2.png"}
-					]
-				}
-			},
-			getTask(){
-				this.item=uni.getStorageSync('danger-info')
+			onClickItem(e) {
+			  if (this.current != e.currentIndex) {
+				this.current = e.currentIndex;
+			  }
 			},
-			onSubmit(){
-				uni.navigateTo({
-					url:'/pages/risk/rectify/form/form'
-				})
+			getWorkflow(data){
+				if(data&&data.activityInsRecordList){
+					this.$refs['rectify-history'].loadData(data.activityInsRecordList)
+				}
 			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.task-page{
-		background-color: #F3F5FB;
-		.title{
-			font-family: 'Source Han Sans CN';
-			font-style: normal;
-			font-weight: 700;
-			font-size: 36rpx;
-			line-height: 54rpx;
-			color: #212121;
-			padding:0 32rpx;
-		}
-		.info{
-			padding: 0 32rpx;
-			margin: 40rpx 0;
-			background: #FFFFFF;
-			border-radius: 32rpx 32rpx 0px 0px;	
-			.item{
-				border-bottom: 1rpx solid #EFF1F3;	
-				padding: 40rpx 32rpx;
-				.name{
-					font-size: 28rpx;
-					color: #999999;
-					line-height: 1;
-				}
-				.cont{
-					font-size: 30rpx;
-					color: #212121;
-					line-height: 1.5;
-					padding-top: 12rpx;
-				}
-				&:last-child{
-					border-bottom:none;
-				}
-			}
-		}
-		.status{
-			background: #FFFFFF;
-			border-radius: 32rpx 32rpx 0px 0px;
-			padding: 48rpx 32rpx;
-			.head{
-				color: #212121;
-				font-size: 34rpx;
-				line-height:1;
-				font-weight: 700;				
-			}
-			.icon-empty{
-				display: block;
-				width: 160rpx;
-				margin: 64rpx auto 0;
-			}
-			p{
-				font-size: 24rpx;
-				line-height: 28rpx;
-				color: #D5D5D5;
-				text-align: center;
-			}
-			.flow-head{
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				font-family: 'Abhaya Libre';
-				font-style: normal;
-				font-weight: 400;
-				font-size: 24rpx;
-				line-height: 48rpx;
-				padding: 30rpx 0  24rpx 0;
-				.flow-status{
-					color: #27DFA8;
-					&.error{
-						color: #F54545;
-					}					
-				}
-				.flow-time{
-					color: #999999;
-				}
-			}
-			.desc{
-				font-family: 'SF Pro Text';
-				font-style: normal;
-				font-weight: 500;
-				font-size: 30rpx;
-				line-height: 42rpx;
-				color: #434343;
-				padding-bottom: 24rpx;
-			}
-			.attach{
-				display: flex;
-				flex-wrap: wrap;
-				.attach-item{
-					width: 224rpx;
-					overflow: hidden;
-					margin-right: 7rpx;
-					margin-bottom: 20rpx;
-					&:nth-child(3n){
-						margin-right: 0;
-					}
-					.image{
-						display: block;
-						width: 224rpx;
-						border-radius: 8px;
-					}
-				}				
-			}
-		}
-		.footer{
-			width: 100%;
-			height: 136upx;
-			background: #FFFFFF;
-			border-radius: 16upx 16upx 0px 0px;
-			position: fixed;
-			left: 0;
-			bottom: 0;
-			text-align: center;
-			color: #168DEC;
-			font-size: 32upx;
-			padding-top: 20upx;
-			letter-spacing: 2px;
-		}
+.task-page{
+	padding:20rpx;
+	position: relative;
+	.head{
+		position: fixed;
+		z-index: 999;
+		width: 710rpx;
+		left: 10px;
+		top: var(--window-top);
+		background-color: #fff;
+		box-sizing: border-box;
+		padding-top: 5px;
 	}
-
+	.content{
+		margin-top:36px;	
+	}
+}
 </style>

+ 86 - 16
pages/risk/review/form/form.vue

@@ -1,6 +1,18 @@
 <template>
 	<div class="body">		
 		<uni-forms ref="form" label-position="top" :model="formData">
+			<uni-forms-item label="预警说明">
+				<uni-easyinput type="textarea" autoHeight disabled v-model="formData.hdangerDesc" placeholder="请输入描述"></uni-easyinput>
+			</uni-forms-item>
+			<uni-forms-item label="预警等级" name="hdangerLevel" required>
+				<uni-data-checkbox v-model="formData.hdangerLevel" :localdata="hdangerLevels"></uni-data-checkbox>
+			</uni-forms-item>	
+			<uni-forms-item label="截止时间" name="dangerDeadline" required>
+				<uni-datetime-picker
+					type="datetime"
+					v-model="formData.dangerDeadline"
+				/>
+			</uni-forms-item>
 			<uni-forms-item label="处理动作" name="actionId" required v-if="actionList.length>0">
 				<uni-data-checkbox v-model="flowData.actionId" :localdata="actionList" @change="changeCheck"/>
 			</uni-forms-item>
@@ -8,6 +20,14 @@
 				<uni-easyinput type="textarea" autoHeight v-model="formData.reviewRemark" placeholder="请输入描述"></uni-easyinput>
 			</uni-forms-item>
 			<uni-forms-item label="整改人" name="rectifyAccountId" required>
+				<view style="padding-bottom: 16rpx;">
+					<uni-data-picker :map='groupMap'
+					placeholder="请选择组织"
+					 popup-title="请选择组织" 
+					:localdata="groupList"
+					@change="onchangeGroup">  
+					</uni-data-picker> 					
+				</view> 
 				<uni-data-select
 					v-model="formData.rectifyAccountId"
 					:localdata="userList"
@@ -32,8 +52,10 @@
 	import {upload} from '@/api/index.js'
     import { startWorkflow, getWorkflowById, handleWorkflow } from '@/api/system/wfApi'
 	import { updateDanger, getDangerById } from '@/api/dangerApi'
-	import {parseTime} from '@/libs'
+	import { getGroupByList } from '@/api/system/groupApi'
+	import {parseTime,packageTreeData} from '@/libs'
 	export default {
+		name:"reviewForm",
 		data() {
 			return {
 				formData:{
@@ -41,16 +63,24 @@
 					'formCode': 'submit',
 					'hdangerTitle': '', // 预警标题
 					'dangerCatId': undefined, // 预警类别ID
-					'hdangerLevel': 1, // 预警等级
+					'hdangerLevel': 0, // 预警等级
 					'reviewRemark': '', // 描述
+					'hdangerDesc':"",
 					'submitTime': parseTime(new Date()),
 					'dangerDeadline': '', // 截止时间
 					'goafId': undefined,
 					'checklistId': '',
 					"attachList":[]
 				},
-				flowData:{
-				},
+				flowData:{},
+				hdangerLevels:[
+					{"value": 0,"text": "较低"	},
+					{"value": 1,"text": "一般"},
+					{"value": 2,"text": "较大"},
+					{"value": 3,"text": "重大"},
+				],
+				groupList:[],
+				groupMap:{text:"groupName",value:"groupId"},
 				actionList:[],
 				userList:[]
 			}
@@ -75,10 +105,10 @@
 			},
 			// 获取流程
 			get(wfInsId) {
-			  // this.resetFormData()
 			  getWorkflowById(wfInsId).then((resp) => {
 				const { code, data, msg } = resp
 				if (code === 0) {
+				  this.$emit('success',data)
 				  this.flowData = data
 				  this.flowData.wfDefId = data.wfDefId
 				  this.flowData.wfInsId = data.wfInsId
@@ -105,6 +135,7 @@
 				this.formData={...this.formData,...danger_info}
 				this.get(danger_info.hdangerId)
 				this.getUser()
+				this.getGroup()				
 				if(data){
 					this.formData.checklistId = data.checklistId
 					this.formData.goafId = data.goafId
@@ -137,25 +168,51 @@
 					"attachList":this.formData.attachList,
 					"groupIdTo": user.groupId,
 					"positionIdTo": user.positionId,
-					"accountIdTo": user.groupId,
+					"accountIdTo": user.accountId,
 					"groupNameTo": user.groupName,
 					"positionNameTo": user.positionName,
 					"accountNameTo": user.accountName,
+				}).then((res)=>{
+					let flow=res.data
+					  if (flow.curActivityCode === 'review') {
+						this.formData.status = 1
+					  }
+					  if (flow.curActivityCode === 'rectify') {
+						this.formData.status = 2
+					  }
+					  if (flow.curActivityCode === 'accept') {
+						this.formData.status = 3
+					  }
+					this.formData.submitTime=parseTime(this.formData.submitTime)
+					this.formData.dangerDeadline=parseTime(this.formData.dangerDeadline)
+					updateDanger(this.formData).then((resp) => {
+						uni.switchTab({
+							url:'/pages/risk/risk'
+						})
+					})					
 				})
-				//renshengkuduan !
-				this.formData.status=2
-				this.formData.submitTime=parseTime(this.formData.submitTime)
-				this.formData.dangerDeadline=parseTime(this.formData.dangerDeadline)
-				updateDanger(this.formData).then((resp) => {
-					uni.switchTab({
-						url:'/pages/risk/risk'
+
+			},
+			onchangeGroup({detail}){
+				let groupVal=detail.value
+				let groupId=groupVal[groupVal.length-1].value
+				this.formData.rectifyAccountId=""				
+				this.getUser(groupId)
+			},
+			getGroup(){
+				getGroupByList().then((res)=>{
+					let items=packageTreeData({
+						data:res.data,
+						id:"groupId"
 					})
+					this.groupList=items
 				})
 			},
-			getUser(){
+			getUser(groupId){
 				getUserByPage({
 					page: 1,
-					limit: 999999
+					limit: 999999,
+					groupId
 				}).then((res)=>{
 					this.userList=res.data.map(item=>{
 						return{
@@ -168,6 +225,7 @@
 			},
 			upload(){
 				let self=this;
+				let attachList= JSON.parse(JSON.stringify(this.formData.attachList))
 				uni.chooseImage({
 					success:(files)=>{
 						let filePath = files.tempFilePaths[0]
@@ -175,12 +233,24 @@
 							filePath
 						}).then((res)=>{
 							let result=JSON.parse(res);
-							let attachList=[result.data]
+							attachList.push(result.data)
 							self.$set(self.formData,'attachList',attachList)
+							self.$nextTick(()=>{
+								self.scrollBottom()
+							})
 						})
 					}
 				})
 			},
+			scrollBottom(duration=100){
+				 uni.createSelectorQuery().select(".footer").boundingClientRect((res)=>{
+					  const scrollH = res.top;
+				  uni.pageScrollTo({
+				    duration,// 过渡时间
+				    scrollTop: scrollH,// 滚动的实际距离
+				  })
+				}).exec()
+			},
 			verify(){
 				let items={
 					'reviewRemark': '处理说明', // 		

+ 89 - 0
pages/risk/review/history/index.vue

@@ -0,0 +1,89 @@
+<template>
+	<view class="reviewHistory">
+		<template v-if="items.length>0">
+			<uni-section title="历史记录" type="line" v-for="(item,index) in items" :key="index">
+				<uni-group :title="item.activityInsTitle" mode="card">
+					<uni-list >
+						<uni-list-item  title="处理时间" :right-text="item.actionTime"></uni-list-item>
+						<uni-list-item  title="人员" :right-text="item.accountName"></uni-list-item>
+						<uni-list-item  title="处理关卡" :right-text="item.activityInsTitle"></uni-list-item>
+						<uni-list-item  title="处理动作" :right-text="item.actionTitle"></uni-list-item>
+						<uni-list-item  title="处理说明" :note="item.actionRemark"></uni-list-item>
+						<uni-list-item  title="附件">
+							<view slot="body">
+								<template v-if="item.attachList.length>0">
+									<image v-for="(attach,index) in item.attachList"
+									class="attach" 
+									:key="index"
+									:src="attach.fileUrl" 
+									@click="preview(item.attachList)"
+									mode="widthFix" ></image>
+								</template>
+								<template v-else>
+									<p style="font-size: 28rpx;color: #666;">没有附件</p>
+								</template>								
+							</view>
+						</uni-list-item>
+					</uni-list>
+				</uni-group>
+			</uni-section>
+		</template>
+		<template v-else>
+			<view class="empty">
+				<image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
+				<p>暂无历史信息</p>					
+			</view>
+		</template>		
+	</view>
+
+
+</template>
+
+<script>
+	export default{
+		name:"reviewHistory",
+		data(){
+			return{
+				items:[]
+			}
+		},
+		methods:{
+			loadData(items=[]){
+				if(items.length>0){
+					this.items=items			
+				}
+			},
+			preview(attachList=[]){
+				let urls=attachList.map(item=>item.fileUrl)
+				uni.previewImage({
+					urls
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.reviewHistory{
+		.empty{
+			.icon-empty{
+				display: block;
+				width: 160rpx;
+				margin: 364rpx auto 0;
+			}	
+			p{
+				font-size: 28rpx;
+				line-height: 1.8;
+				color: #666;
+				text-align: center;
+			}			
+		}
+		::v-deep.attach{
+			display: block;
+			width: 120rpx;
+			border: 1rpx solid #eaeaea;
+			padding: 10rpx;
+			box-sizing: border-box;
+		}
+	}
+</style>

+ 44 - 117
pages/risk/review/review.vue

@@ -1,144 +1,71 @@
 <template>
 	<view class="task-page">
-		<div class="title">{{item.hdangerTitle}}</div>
-		<div class="info">
-			<div class="item">
-				<view class="name">执行人</view>
-				<view class="cont">{{item.curAccountName}}</view>	
-			</div>
-			<div class="item">
-				<view class="name">执行部门</view>
-				<view class="cont">{{item.curGroupName}}</view>	
-			</div>
-			<div class="item">
-				<view class="name">上报时间</view>
-				<view class="cont">{{parseTime(item.curActivityBeginTime)}}</view>	
-			</div>
+		<div class="head">
+			<uni-segmented-control 
+			:current="current" 
+			:values="items" @clickItem="onClickItem" 
+			activeColor="#007aff">	
+			</uni-segmented-control>			
 		</div>
-		<view class="footer" @click="onSubmit">评审</view>
+		<view class="content">
+			<view v-show="current === 0">
+				<review-form ref="review-form" @success="getWorkflow"></review-form>
+			</view>
+			<view v-show="current === 1">
+				<review-history ref="review-history"></review-history>
+			</view>
+		</view>
 	</view>
 </template>
 
 <script>
-	import {parseTime} from '@/libs/index.js'
+import reviewForm from './form/form.vue'
+import reviewHistory from './history/index.vue'
 	export default {
 		data() {
 			return {
-				item:{
-
-				},
-				flow:{
-					status:"",
-					time:"",
-					desc:"",
-					attachList:[]
-				},
-				items:[],
-				checkState:[{"value": 1,"text": "是"	},{"value": 0,"text": "否"}]
+				items: ['基本信息', '历史记录'],
+				current: 0
 			}
 		},
+		components:{
+			reviewForm,
+			reviewHistory
+		},
 		onLoad() {
-			this.getTask()
+
 		},
 		methods: {
-			parseTime,
-			init(){
-				let items=[]
-				for(let i=0;i<10;i++){
-					items.push({
-						id:i,
-						title:'检查防水是否完好',
-						state:1
-					})
-				}
-				this.items=items
+			onClickItem(e) {
+			  if (this.current != e.currentIndex) {
+				this.current = e.currentIndex;
+			  }
 			},
-			getTask(){
-				this.item=uni.getStorageSync('danger-info')
-			},
-			changeCheck(item){
-				if(!item.state){
-					uni.showModal({
-						title: '提示',
-						content: `请确认${item.title}状态为否`,
-						success: function (res) {
-							if (res.confirm) {
-								console.log('用户点击确定');
-							} else if (res.cancel) {
-								console.log('用户点击取消');
-							}
-						}
-					});
+			getWorkflow(data){
+				if(data&&data.activityInsRecordList){
+					this.$refs['review-history'].loadData(data.activityInsRecordList)
 				}
-			},
-			onSubmit(){
-				uni.navigateTo({
-					url:'/pages/risk/review/form/form'
-				})
 			}
 		}
 	}
 </script>
 
 <style lang="scss" scoped>
-	.task-page{
-		background-color: #F3F5FB;
-		height: 100vh;
-		.title{
-			font-family: 'Source Han Sans CN';
-			font-style: normal;
-			font-weight: 700;
-			font-size: 36rpx;
-			line-height: 54rpx;
-			color: #212121;
-			padding:0 32rpx;
-		}
-		.info{
-			padding: 0 32rpx;
-			margin: 40rpx 0;
-			background: #FFFFFF;
-			border-radius: 32rpx 32rpx 0px 0px;	
-			.item{
-				border-bottom: 1rpx solid #EFF1F3;	
-				padding: 40rpx 32rpx;
-				.name{
-					font-size: 28rpx;
-					color: #999999;
-					line-height: 1;
-				}
-				.cont{
-					font-size: 30rpx;
-					color: #212121;
-					line-height: 1.5;
-					padding-top: 12rpx;
-				}
-				&:last-child{
-					border-bottom:none;
-				}
-			}
-		}
-		.footer{
-			width: 100%;
-			height: 136upx;
-			background: #FFFFFF;
-			border-radius: 16upx 16upx 0px 0px;
-			position: fixed;
-			left: 0;
-			bottom: 0;
-			text-align: center;
-			color: #168DEC;
-			font-size: 32upx;
-			padding-top: 20upx;
-			letter-spacing: 2px;
-		}
+.task-page{
+	padding:20rpx;
+	position: relative;
+	.head{
+		position: fixed;
+		z-index: 999;
+		width: 710rpx;
+		left: 10px;
+		top: var(--window-top);
+		background-color: #fff;
+		box-sizing: border-box;
+		padding-top: 5px;
 	}
-.item-checklist{
-	display: flex;
-	justify-content: space-between;
-	padding: 15rpx 32rpx;
-    border-bottom: 1rpx solid #EFF1F3;	
-	.name{
-		flex: 1;
+	.content{
+		margin-top:36px;	
 	}
 }
 </style>

+ 19 - 2
pages/risk/risk.vue

@@ -6,7 +6,7 @@
 			<text class="tab" :class="type==='group'?'active':''" @click="changeTab('group')">部门</text>
 		</div>
 		<div class="statistics">
-			<div class="head">任务统计</div>
+			<div class="head">预警统计</div>
 			<div class="container">
 				<div class="item" @click="changeStuas(1,'待评审')">
 					<image class="icon" src="/static/index/wait.png" alt=""></image>
@@ -35,6 +35,7 @@
 			<template v-if="items.length>0">
 				<div class="item" v-for="(item,index) in items" :key="index" @click="linkTo(item)">
 					<div class="task-title">{{item.hdangerTitle}}</div>
+					<h4 class="goafName" v-if="item.goafName">{{formateGoafName(item)}}</h4>
 					<view class="footer">
 						<view class="lf">
 							<div class="time">{{item.dangerDeadline}}</div>
@@ -57,6 +58,7 @@
 
 <script>
 	import { getDangerByList, getDangerByPage } from '@/api/dangerApi'
+	import { NumConvertLM } from '@/libs/tool'
 	export default {
 		data() {
 			return {
@@ -87,6 +89,14 @@
 			this.getData()
 		},
 		methods: {
+			formateGoafName({
+				goafOrebelt,
+				goafOrebody,
+				goafOreheight,
+				goafName
+			}){	
+				return `${NumConvertLM(goafOrebelt)}/${ goafOrebody}/${goafOreheight}/${goafName}`
+			},
 			init(){
 				let type="AccountId"
 				let tab_type=this.accountId
@@ -230,7 +240,14 @@
 				.task-title{
 					color: #212121;
 					font-size: 32upx;	
-					padding-bottom: 24upx;
+					padding-bottom: 24rpx;
+				}
+				.goafName{
+					color: #666;
+					font-weight: normal;
+					font-size: 28rpx;
+					word-break: break-all;
+					padding-bottom: 16rpx;
 				}
 				.footer{
 					display: flex;

+ 41 - 0
pages/task/form/form.vue

@@ -8,6 +8,14 @@
 				></uni-data-select>
 			</uni-forms-item>
 			<uni-forms-item label="评审人" name="user" required v-if="form.status===1">
+				<view style="padding-bottom: 16rpx;">
+					<uni-data-picker :map='groupMap'
+					placeholder="请选择组织"
+					 popup-title="请选择组织" 
+					:localdata="groupList"
+					@change="onchangeGroup">  
+					</uni-data-picker> 					
+				</view> 
 				<uni-data-select
 					v-model="form.user"
 					:localdata="users"
@@ -28,9 +36,13 @@
 </template>
 
 <script>
+	import { getGroupByList } from '@/api/system/groupApi'
+	import {parseTime,packageTreeData} from '@/libs'
 	export default {
 		data() {
 			return {
+				groupList:[],
+				groupMap:{text:"groupName",value:"groupId"},
 				status: [
 				  { value: 0, text: "否" },
 				  { value: 1, text: "是" }
@@ -93,6 +105,35 @@
 					}
 				});
 			},
+			onchangeGroup({detail}){
+				let groupVal=detail.value
+				let groupId=groupVal[groupVal.length-1].value
+				this.getUser(groupId)
+			},
+			getGroup(){
+				getGroupByList().then((res)=>{
+					let items=packageTreeData({
+						data:res.data,
+						id:"groupId"
+					})
+					this.groupList=items
+				})
+			},
+			getUser(groupId){
+				getUserByPage({
+					page: 1,
+					limit: 999999,
+					groupId
+				}).then((res)=>{
+					this.userList=res.data.map(item=>{
+						return{
+							...item,
+							value:item.accountId,
+							text:item.accountName
+						}
+					})
+				})
+			},
 			onSubmit(){
 				this.$refs.form.validate().then(res=>{
 					console.log('表单数据信息:', res);

+ 109 - 28
pages/task/submit/submit.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="body">		
+	<div class="body">	
 		<uni-forms ref="form" label-position="top" :rules="rules" :model="formData">
 			<uni-forms-item label="预警标题" name="desc" required>
 				<uni-easyinput v-model="formData.hdangerTitle" placeholder="请输入描述"></uni-easyinput>
@@ -17,6 +17,14 @@
 				></uni-data-select>
 			</uni-forms-item>
 			<uni-forms-item label="评审人" name="reviewAccountId" required>
+				<view style="padding-bottom: 16rpx;">
+					<uni-data-picker :map='groupMap'
+					placeholder="请选择组织"
+					 popup-title="请选择组织" 
+					:localdata="groupList"
+					@change="onchangeGroup">  
+					</uni-data-picker> 					
+				</view> 
 				<uni-data-select
 					v-model="formData.reviewAccountId"
 					:localdata="userList"
@@ -55,13 +63,14 @@
 </template>
 
 <script>
+	import { getGroupByList } from '@/api/system/groupApi'
 	import {getUserByPage} from '@/api/user.js'
 	import {upload} from '@/api/index.js'
 	import { getChecklist } from '@/api/check'
 	import { getGoafBaseInfo } from '@/api/goaf'
     import { startWorkflow, getWorkflowById, handleWorkflow } from '@/api/system/wfApi'
 	import { handleDanger, getDangerById } from '@/api/dangerApi'
-	import {parseTime} from '@/libs'
+	import {parseTime,packageTreeData} from '@/libs'
 	export default {
 		data() {
 			return {
@@ -70,7 +79,7 @@
 					'formCode': 'submit',
 					'hdangerTitle': '', // 预警标题
 					'dangerCatId': undefined, // 预警类别ID
-					'hdangerLevel': 1, // 预警等级
+					'hdangerLevel': 0, // 预警等级
 					'hdangerDesc': '', // 描述
 					'submitTime': parseTime(new Date()),
 					'dangerDeadline': '', // 截止时间
@@ -80,6 +89,8 @@
 				},
 				formState:undefined,
 				flowData:{},
+				groupList:[],
+				groupMap:{text:"groupName",value:"groupId"},
 				userList:[],
 				checkList:[],
 				goafList:[],
@@ -124,6 +135,7 @@
 				this.flowData.activityInsId = data.curActivityIns.activityInsId
 				this.flowData.activityCode = data.curActivityIns.activityCode
 				this.formData.hdangerId=data.wfInsId
+				this.renderAction()
 				return data.wfInsId
 			  }
 			},
@@ -145,6 +157,7 @@
 				}
 			  })
 			},
+			
 			init(){
 				let data=uni.getStorageSync('submit-data')
 				if(data){
@@ -155,15 +168,26 @@
 					this.formState = 'form_checkList'
 				}
 				this.getUser()
+				this.getGroup()
 				this.getChecklist()
 				this.getGoafBaseInfo()
 				//初始化流程
 				this.start(1)
 			},
-			getUser(){
+			getGroup(){
+				getGroupByList().then((res)=>{
+					let items=packageTreeData({
+						data:res.data,
+						id:"groupId"
+					})
+					this.groupList=items
+				})
+			},
+			getUser(groupId){
 				getUserByPage({
 					page: 1,
-					limit: 999999
+					limit: 999999,
+					groupId
 				}).then((res)=>{
 					this.userList=res.data.map(item=>{
 						return{
@@ -196,16 +220,8 @@
 					})
 				})				
 			},
-			async onSubmit(){
+			onSubmit(){
 				let user=this.userList.filter(item=>item.accountId===this.formData.reviewAccountId)[0]
-				if(user){
-					this.formData.reviewAccountName = user.accountName
-					this.formData.reviewGroupId = user.groupId
-					this.formData.reviewGroupName = user.groupName
-					this.formData.reviewPositionId = user.positionId
-					this.formData.reviewPositionName = user.positionName	
-					this.formData.ocId=user.ocId
-				}
 				if(!this.verify()){
 					return
 				}
@@ -215,43 +231,108 @@
 				    "activityDefId": this.flowData.activityDefId,
 				    "activityInsId": this.flowData.activityInsId,
 				    "activityCode": this.flowData.activityCode,
-				    "actionId": 1,
-				    "actionCode": "submit",
+				    "actionId": this.flowData.actionId,
+				    "actionCode": this.flowData.actionCode,
 				    "actionRemark": this.flowData.hdangerDesc,
 					"attachList":this.formData.attachList,
 					"groupIdTo": user.groupId,
 					"positionIdTo": user.positionId,
-					"accountIdTo": user.groupId,
+					"accountIdTo": this.formData.reviewAccountId,
 					"groupNameTo": user.groupName,
 					"positionNameTo": user.positionName,
 					"accountNameTo": user.accountName,
-				})
-				//renshengkuduan !
-				this.formData.status=1
-				this.formData.submitTime=parseTime(this.formData.submitTime)
-				this.formData.dangerDeadline=parseTime(this.formData.dangerDeadline)
-				handleDanger(this.formData).then((resp) => {
-					uni.switchTab({
-						url:'/pages/risk/risk'
-					})
+				}).then((flow_resq)=>{
+				  let flow=flow_resq.data
+				  if (flow.curActivityCode === 'review') {
+					this.formData.status = 1
+				  }
+				  if (flow.curActivityCode === 'rectify') {
+					this.formData.status = 2
+				  }
+				  if (flow.curActivityCode === 'accept') {
+					this.formData.status = 3
+				  }
+				  /**提交人*/
+					let userData=uni.getStorageSync('accountInfo');
+					this.formData.submitGroupId = userData.groupId
+					this.formData.submitGroupName = userData.groupName
+					this.formData.submitPositionId = userData.positionId
+					this.formData.submitPositionName = userData.positionName
+					this.formData.submitAccountId = userData.userId
+					this.formData.submitAccountName = userData.userName			  
+					this.formData.reviewRemark = this.flowData.hdangerDesc			
+					this.formData.reviewAccountName = user.accountName
+					this.formData.reviewGroupId = user.groupId
+					this.formData.reviewGroupName = user.groupName
+					this.formData.reviewPositionId = user.positionId
+					this.formData.reviewPositionName = user.positionName	
+					this.formData.ocId=user.ocId
+					this.formData.submitTime=parseTime(this.formData.submitTime)
+					this.formData.dangerDeadline=parseTime(this.formData.dangerDeadline)
+					handleDanger(this.formData).then((resp) => {
+						uni.switchTab({
+							url:'/pages/risk/risk'
+						})
+					})					
 				})
 			},
 			upload(){
 				let self=this;
+				let attachList= JSON.parse(JSON.stringify(this.formData.attachList))
 				uni.chooseImage({
 					success:(files)=>{
 						let filePath = files.tempFilePaths[0]
-						console.log(self.formData.attachList)
 						upload({
 							filePath
 						}).then((res)=>{
 							let result=JSON.parse(res);
-							let attachList=[result.data]
+							attachList.push(result.data)
 							self.$set(self.formData,'attachList',attachList)
+							self.$nextTick(()=>{
+								self.scrollBottom()
+							})
 						})
 					}
 				})
 			},
+			// 渲染功能操作按钮
+			renderAction() {
+			  if (this.flowData && this.flowData.curActivityIns && this.flowData.curActivityIns.actionList) {
+				const arr = this.flowData.curActivityIns.actionList
+				if (arr.length > 1) {
+				  this.actionVisible = true
+				  const item = arr[0]
+				  this.flowData.actionId = item.actionId
+				  this.flowData.actionCode = item.actionCode
+				  this.actionId = item.actionId
+				} else if (arr.length === 1) {
+				  const item = arr[0]
+				  this.flowData.actionId = item.actionId
+				  this.flowData.actionCode = item.actionCode
+				  this.actionId = item.actionId
+				} else {
+					uni.showToast({
+						icon:'none',
+						title:'数据配置有误!请联系管理员'
+					})
+				}
+			  }
+			},
+			onchangeGroup({detail}){
+				let groupVal=detail.value
+				let groupId=groupVal[groupVal.length-1].value
+				this.formData.reviewAccountId=""
+				this.getUser(groupId)
+			},
+			scrollBottom(duration=100){
+				 uni.createSelectorQuery().select(".footer").boundingClientRect((res)=>{
+					const scrollH = res.top;
+				  uni.pageScrollTo({
+				    duration,// 过渡时间
+				    scrollTop: scrollH,// 滚动的实际距离
+				  })
+				}).exec()
+			},
 			verify(){
 				let items={
 					'hdangerTitle': '预警标题', // 

+ 4 - 2
pages/task/task.vue

@@ -24,7 +24,9 @@
 			<template v-if="item.status===0">
 				<image class="icon-empty" src="/static/icon/empty.png" mode="widthFix"></image>
 				<p>暂无处置信息</p>	
-				<image class="add" @click="add" src="/static/icon/add.png" mode="widthFix"></image>
+				<!-- #ifdef H5 -->
+					<image class="add" @click="add" src="/static/icon/add.png" mode="widthFix"></image>				
+				<!-- #endif -->
 			</template>
 			<div class="head"  v-if="item.status===1">处置过程</div>
 				<h3 v-if="checkItemPass.length>0">通过项</h3>
@@ -199,7 +201,7 @@
 				font-size: 28rpx;
 				line-height: 1.8;
 				color: #666;
-				// text-align: center;
+				text-align: center;
 			}
 			.flow-head{
 				display: flex;

+ 2 - 0
uni_modules/uni-badge/changelog.md

@@ -1,3 +1,5 @@
+## 1.2.2(2023-01-28)
+- 修复 运行/打包 控制台警告问题
 ## 1.2.1(2022-09-05)
 - 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473)
 ## 1.2.0(2021-11-19)

+ 3 - 3
uni_modules/uni-badge/components/uni-badge/uni-badge.vue

@@ -21,7 +21,7 @@
 	 * 	@value error 红色
 	 * @property {String} inverted = [true|false] 是否无需背景颜色
 	 * @property {Number} maxNum 展示封顶的数字值,超过 99 显示 99+
-	 * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上		
+	 * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上
 	 * 	@value rightTop 右上
 	 * 	@value rightBottom 右下
 	 * 	@value leftTop 左上
@@ -192,11 +192,12 @@
 		display: flex;
 		overflow: hidden;
 		box-sizing: border-box;
+		font-feature-settings: "tnum";
+		min-width: 20px;
 		/* #endif */
 		justify-content: center;
 		flex-direction: row;
 		height: 20px;
-		min-width: 20px;
 		padding: 0 4px;
 		line-height: 18px;
 		color: #fff;
@@ -206,7 +207,6 @@
 		border: 1px solid #fff;
 		text-align: center;
 		font-family: 'Helvetica Neue', Helvetica, sans-serif;
-		font-feature-settings: "tnum";
 		font-size: $bage-size;
 		/* #ifdef H5 */
 		z-index: 999;

+ 1 - 1
uni_modules/uni-badge/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-badge",
   "displayName": "uni-badge 数字角标",
-  "version": "1.2.1",
+  "version": "1.2.2",
   "description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
   "keywords": [
     "",

+ 13 - 7
uni_modules/uni-calendar/changelog.md

@@ -1,20 +1,26 @@
+## 1.4.10(2023-04-10)
+- 修复 某些情况 monthSwitch 未触发的Bug
+## 1.4.9(2023-02-02)
+- 修复 某些情况切换月份错误的Bug
+## 1.4.8(2023-01-30)
+- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/161964)
 ## 1.4.7(2022-09-16)
-- 可以使用 uni-scss 控制主题色
+- 优化 支持使用 uni-scss 控制主题色
 ## 1.4.6(2022-09-08)
-- fix: 表头年月切换,导致改变当前日期为选择月1号,且未触发change事件
+- 修复 表头年月切换,导致改变当前日期为选择月1号,且未触发change事件的Bug
 ## 1.4.5(2022-02-25)
-- 修复 条件编译 nvue 不支持的 css 样式
+- 修复 条件编译 nvue 不支持的 css 样式的Bug
 ## 1.4.4(2022-02-25)
-- 修复 条件编译 nvue 不支持的 css 样式
+- 修复 条件编译 nvue 不支持的 css 样式的Bug
 ## 1.4.3(2021-09-22)
-- 修复 startDate、 endDate 属性失效的 bug
+- 修复 startDate、 endDate 属性失效的Bug
 ## 1.4.2(2021-08-24)
 - 新增 支持国际化
 ## 1.4.1(2021-08-05)
-- 修复 弹出层被 tabbar 遮盖 bug
+- 修复 弹出层被 tabbar 遮盖的Bug
 ## 1.4.0(2021-07-30)
 - 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
 ## 1.3.16(2021-05-12)
 - 新增 组件示例地址
 ## 1.3.15(2021-02-04)
-- 调整为uni_modules目录规范 
+- 调整为uni_modules目录规范

+ 4 - 5
uni_modules/uni-calendar/components/uni-calendar/uni-calendar-item.vue

@@ -51,11 +51,10 @@
 </template>
 
 <script>
-	import {
-	initVueI18n
-	} from '@dcloudio/uni-i18n'
-	import messages from './i18n/index.js'
-	const {	t	} = initVueI18n(messages)
+	import { initVueI18n } from '@dcloudio/uni-i18n'
+	import i18nMessages from './i18n/index.js'
+	const {	t	} = initVueI18n(i18nMessages)
+
 	export default {
 		emits:['change'],
 		props: {

+ 24 - 20
uni_modules/uni-calendar/components/uni-calendar/uni-calendar.vue

@@ -20,7 +20,7 @@
 				<view class="uni-calendar__header-btn-box" @click.stop="next">
 					<view class="uni-calendar__header-btn uni-calendar--right"></view>
 				</view>
-				<text class="uni-calendar__backtoday" @click="backtoday">{{todayText}}</text>
+				<text class="uni-calendar__backtoday" @click="backToday">{{todayText}}</text>
 
 			</view>
 			<view class="uni-calendar__box">
@@ -62,12 +62,12 @@
 
 <script>
 	import Calendar from './util.js';
-	import calendarItem from './uni-calendar-item.vue'
-	import {
-	initVueI18n
-	} from '@dcloudio/uni-i18n'
-	import messages from './i18n/index.js'
-	const {	t	} = initVueI18n(messages)
+	import CalendarItem from './uni-calendar-item.vue'
+
+	import { initVueI18n } from '@dcloudio/uni-i18n'
+	import i18nMessages from './i18n/index.js'
+	const {	t	} = initVueI18n(i18nMessages)
+
 	/**
 	 * Calendar 日历
 	 * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
@@ -90,7 +90,7 @@
 	 */
 	export default {
 		components: {
-			calendarItem
+			CalendarItem
 		},
 		emits:['close','confirm','change','monthSwitch'],
 		props: {
@@ -199,26 +199,26 @@
 			}
 		},
 		created() {
-			// 获取日历方法实例
 			this.cale = new Calendar({
-				// date: new Date(),
 				selected: this.selected,
 				startDate: this.startDate,
 				endDate: this.endDate,
 				range: this.range,
 			})
-			// 选中某一天
-			// this.cale.setDate(this.date)
 			this.init(this.date)
-			// this.setDay
 		},
 		methods: {
 			// 取消穿透
 			clean() {},
 			bindDateChange(e) {
 				const value = e.detail.value + '-1'
-				console.log(this.cale.getDate(value));
 				this.setDate(value)
+
+				const { year,month } = this.cale.getDate(value)
+        this.$emit('monthSwitch', {
+            year,
+            month
+        })
 			},
 			/**
 			 * 初始化日期显示
@@ -323,11 +323,16 @@
 			/**
 			 * 回到今天
 			 */
-			backtoday() {
-				console.log(this.cale.getDate(new Date()).fullDate);
-				let date = this.cale.getDate(new Date()).fullDate
-				// this.cale.setDate(date)
-				this.init(date)
+			backToday() {
+				const nowYearMonth = `${this.nowDate.year}-${this.nowDate.month}`
+				const date = this.cale.getDate(new Date())
+        const todayYearMonth = `${date.year}-${date.month}`
+
+        if(nowYearMonth !== todayYearMonth) {
+          this.monthSwitch()
+        }
+
+				this.init(date.fullDate)
 				this.change()
 			},
 			/**
@@ -446,7 +451,6 @@
 
 	.uni-calendar--fixed-width {
 		width: 50px;
-		// padding: 0 15px;
 	}
 
 	.uni-calendar__backtoday {

+ 12 - 2
uni_modules/uni-calendar/components/uni-calendar/util.js

@@ -76,10 +76,20 @@ class Calendar {
 				dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
 				break
 			case 'month':
-				if (dd.getDate() === 31) {
+				if (dd.getDate() === 31 && AddDayCount>0) {
 					dd.setDate(dd.getDate() + AddDayCount)
 				} else {
-					dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期
+					const preMonth = dd.getMonth()
+					dd.setMonth(preMonth + AddDayCount) // 获取AddDayCount天后的日期
+					const nextMonth = dd.getMonth()
+					// 处理 pre 切换月份目标月份为2月没有当前日(30 31) 切换错误问题
+					if(AddDayCount<0 && preMonth!==0 && nextMonth-preMonth>AddDayCount){
+						dd.setMonth(nextMonth+(nextMonth-preMonth+AddDayCount))
+					}
+					// 处理 next 切换月份目标月份为2月没有当前日(30 31) 切换错误问题
+					if(AddDayCount>0 && nextMonth-preMonth>AddDayCount){
+						dd.setMonth(nextMonth-(nextMonth-preMonth-AddDayCount))
+					}
 				}
 				break
 			case 'year':

+ 1 - 1
uni_modules/uni-calendar/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-calendar",
   "displayName": "uni-calendar 日历",
-  "version": "1.4.7",
+  "version": "1.4.10",
   "description": "日历组件",
   "keywords": [
     "uni-ui",

+ 3 - 3
uni_modules/uni-calendar/readme.md

@@ -77,7 +77,7 @@ export default {
 ### Calendar Props
 
 |  属性名	|    类型	| 默认值| 说明																													|
-| 		| 																													|
+| -	| -	| - | - |
 | date		| String	|-		| 自定义当前时间,默认为今天																							|
 | lunar		| Boolean	| false	| 显示农历																												|
 | startDate	| String	|-		| 日期选择范围-开始日期																									|
@@ -91,7 +91,7 @@ export default {
 ### Calendar Events
 
 |  事件名		| 说明								|返回值|
-| 								|		| 									|
+| -	|	-	| -	|
 | open	| 弹出日历组件,`insert :false` 时生效|- 	|
 
 
@@ -100,4 +100,4 @@ export default {
 
 ## 组件示例
 
-点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar](https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar)
+点击查看:[https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar](https://hellouniapp.dcloud.net.cn/pages/extUI/calendar/calendar)

+ 1 - 1
uni_modules/uni-combox/components/uni-combox/uni-combox.vue

@@ -148,7 +148,7 @@
 	}
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped>
 	.uni-combox {
 		font-size: 14px;
 		border: 1px solid #DCDFE6;

+ 9 - 0
uni_modules/uni-data-picker/changelog.md

@@ -1,3 +1,12 @@
+## 1.1.2(2023-04-11)
+- 修复 更改 modelValue 报错的 bug
+- 修复 v-for 未使用 key 值控制台 warning
+## 1.1.1(2023-02-21)
+- 修复代码合并时引发 value 属性为空时不渲染数据的问题
+## 1.1.0(2023-02-15)
+- 修复 localdata 不支持动态更新的bug
+## 1.0.9(2023-02-15)
+- 修复 localdata 不支持动态更新的bug
 ## 1.0.8(2022-09-16)
 - 可以使用 uni-scss 控制主题色
 ## 1.0.7(2022-07-06)

+ 10 - 6
uni_modules/uni-data-picker/components/uni-data-picker/uni-data-picker.vue

@@ -75,7 +75,7 @@
    */
   export default {
     name: 'UniDataPicker',
-    emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue'],
+    emits: ['popupopened', 'popupclosed', 'nodeclick', 'input', 'change', 'update:modelValue','inputclick'],
     mixins: [dataPicker],
     components: {
       DataPickerView
@@ -131,9 +131,16 @@
         this.load();
       })
     },
+    watch: {
+			localdata: {
+				handler() {
+					this.load()
+				},
+        deep: true
+			},
+    },
     methods: {
       clear() {
-        this.modelValue = null;
         this._dispatchEvent([]);
       },
       onPropsChange() {
@@ -148,10 +155,6 @@
           return;
         }
 
-        if (!this.hasValue) {
-          return;
-        }
-
         // 回显本地数据
         if (this.isLocalData) {
           this.loadData();
@@ -184,6 +187,7 @@
       },
       handleInput() {
         if (this.readonly) {
+					this.$emit('inputclick')
           return
         }
         this.show()

+ 17 - 15
uni_modules/uni-data-picker/components/uni-data-pickerview/uni-data-pickerview.vue

@@ -2,25 +2,27 @@
   <view class="uni-data-pickerview">
     <scroll-view v-if="!isCloudDataList" class="selected-area" scroll-x="true">
       <view class="selected-list">
-        <template v-for="(item,index) in selected">
-          <view class="selected-item"
-            :class="{'selected-item-active':index==selectedIndex}"
-            v-if="item.text" @click="handleSelect(index)">
-            <text>{{item.text}}</text>
+          <view 
+            class="selected-item"
+            v-for="(item,index) in selected"
+            :key="index"
+            :class="{
+              'selected-item-active':index == selectedIndex
+            }"
+            @click="handleSelect(index)"
+          >
+            <text>{{item.text || ''}}</text>
           </view>
-        </template>
       </view>
     </scroll-view>
     <view class="tab-c">
-      <template v-for="(child, i) in dataList">
-        <scroll-view class="list" :key="i" v-if="i==selectedIndex" :scroll-y="true">
-          <view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in child"
-            @click="handleNodeClick(item, i, j)">
-            <text class="item-text">{{item[map.text]}}</text>
-            <view class="check" v-if="selected.length > i && item[map.value] == selected[i].value"></view>
-          </view>
-        </scroll-view>
-      </template>
+      <scroll-view class="list" :scroll-y="true">
+        <view class="item" :class="{'is-disabled': !!item.disable}" v-for="(item, j) in dataList[selectedIndex]" :key="j"
+          @click="handleNodeClick(item, selectedIndex, j)">
+          <text class="item-text">{{item[map.text]}}</text>
+          <view class="check" v-if="selected.length > selectedIndex && item[map.value] == selected[selectedIndex].value"></view>
+        </view>
+      </scroll-view>
 
       <view class="loading-cover" v-if="loading">
         <uni-load-more class="load-more" :contentText="loadMore" status="loading"></uni-load-more>

+ 1 - 1
uni_modules/uni-data-picker/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-data-picker",
   "displayName": "uni-data-picker 数据驱动的picker选择器",
-  "version": "1.0.8",
+  "version": "1.1.2",
   "description": "单列、多列级联选择器,常用于省市区城市选择、公司部门选择、多级分类等场景",
   "keywords": [
     "uni-ui",

+ 13 - 0
uni_modules/uni-data-select/changelog.md

@@ -1,3 +1,16 @@
+## 1.0.6(2023-04-12)
+- 修复 微信小程序点击时会改变背景颜色的 bug
+## 1.0.5(2023-02-03)
+- 修复 禁用时会显示清空按钮
+## 1.0.4(2023-02-02)
+- 优化 查询条件短期内多次变更只查询最后一次变更后的结果
+- 调整 内部缓存键名调整为 uni-data-select-lastSelectedValue
+## 1.0.3(2023-01-16)
+- 修复 不关联服务空间报错的问题
+## 1.0.2(2023-01-14)
+- 新增  属性 `format` 可用于格式化显示选项内容
+## 1.0.1(2022-12-06)
+- 修复  当where变化时,数据不会自动更新的问题
 ## 0.1.9(2022-09-05)
 - 修复 微信小程序下拉框出现后选择会点击到蒙板后面的输入框
 ## 0.1.8(2022-08-29)

+ 132 - 55
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue

@@ -2,12 +2,16 @@
 	<view class="uni-stat__select">
 		<span v-if="label" class="uni-label-text hide-on-phone">{{label + ':'}}</span>
 		<view class="uni-stat-box" :class="{'uni-stat__actived': current}">
-			<view class="uni-select"  :class="{'uni-select--disabled':disabled}">
+			<view class="uni-select" :class="{'uni-select--disabled':disabled}">
 				<view class="uni-select__input-box" @click="toggleSelector">
 					<view v-if="current" class="uni-select__input-text">{{current}}</view>
 					<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
-					<uni-icons v-if="current && clear" type="clear" color="#c0c4cc" size="24" @click="clearVal" />
-					<uni-icons v-else :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
+					<view v-if="current && clear && !disabled" @click.stop="clearVal" >
+						<uni-icons type="clear" color="#c0c4cc" size="24"/>
+					</view>
+					<view v-else>
+						<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
+					</view>
 				</view>
 				<view class="uni-select--mask" v-if="showSelector" @click="toggleSelector" />
 				<view class="uni-select__selector" v-if="showSelector">
@@ -16,10 +20,9 @@
 						<view class="uni-select__selector-empty" v-if="mixinDatacomResData.length === 0">
 							<text>{{emptyTips}}</text>
 						</view>
-						<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData"
-							:key="index" @click="change(item)">
-							<text
-								:class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
+						<view v-else class="uni-select__selector-item" v-for="(item,index) in mixinDatacomResData" :key="index"
+							@click="change(item)">
+							<text :class="{'uni-select__selector__disabled': item.disable}">{{formatItemName(item)}}</text>
 						</view>
 					</scroll-view>
 				</view>
@@ -44,17 +47,8 @@
 	 */
 
 	export default {
-		name: "uni-stat-select",
+		name: "uni-data-select",
 		mixins: [uniCloud.mixinDatacom || {}],
-		data() {
-			return {
-				showSelector: false,
-				current: '',
-				mixinDatacomResData: [],
-				apps: [],
-				channels: []
-			};
-		},
 		props: {
 			localdata: {
 				type: Array,
@@ -90,15 +84,32 @@
 				type: Number,
 				default: 0
 			},
-      disabled: {
+			disabled: {
 				type: Boolean,
 				default: false
-			}
+			},
+			// 格式化输出 用法 field="_id as value, version as text, uni_platform as label" format="{label} - {text}"
+			format: {
+				type: String,
+				default: ''
+			},
+		},
+		data() {
+			return {
+				showSelector: false,
+				current: '',
+				mixinDatacomResData: [],
+				apps: [],
+				channels: [],
+				cacheKey: "uni-data-select-lastSelectedValue",
+			};
 		},
 		created() {
-			this.last = `${this.collection}_last_selected_option_value`
+			this.debounceGet = this.debounce(() => {
+				this.query();
+			}, 300);
 			if (this.collection && !this.localdata.length) {
-				this.mixinDatacomEasyGet()
+				this.debounceGet();
 			}
 		},
 		computed: {
@@ -113,6 +124,14 @@
 				return placeholder ?
 					common + placeholder :
 					common
+			},
+			valueCom(){
+				// #ifdef VUE3
+				return this.modelValue;
+				// #endif
+				// #ifndef VUE3
+				return this.value;
+				// #endif
 			}
 		},
 		watch: {
@@ -124,16 +143,9 @@
 					}
 				}
 			},
-			// #ifndef VUE3
-			value() {
-				this.initDefVal()
-			},
-			// #endif
-			// #ifdef VUE3
-			modelValue() {
+			valueCom(val, old) {
 				this.initDefVal()
 			},
-			// #endif
 			mixinDatacomResData: {
 				immediate: true,
 				handler(val) {
@@ -144,27 +156,46 @@
 			}
 		},
 		methods: {
+			debounce(fn, time = 100){
+				let timer = null
+				return function(...args) {
+					if (timer) clearTimeout(timer)
+					timer = setTimeout(() => {
+						fn.apply(this, args)
+					}, time)
+				}
+			},
+			// 执行数据库查询
+			query(){
+				this.mixinDatacomEasyGet();
+			},
+			// 监听查询条件变更事件
+			onMixinDatacomPropsChange(){
+				if (this.collection) {
+					this.debounceGet();
+				}
+			},
 			initDefVal() {
 				let defValue = ''
-				if ((this.value || this.value === 0) && !this.isDisabled(this.value)) {
-					defValue = this.value
-				} else if ((this.modelValue || this.modelValue === 0) && !this.isDisabled(this.modelValue)) {
-					defValue = this.modelValue
+				if ((this.valueCom || this.valueCom === 0) && !this.isDisabled(this.valueCom)) {
+					defValue = this.valueCom
 				} else {
 					let strogeValue
 					if (this.collection) {
-						strogeValue = uni.getStorageSync(this.last)
+						strogeValue = this.getCache()
 					}
 					if (strogeValue || strogeValue === 0) {
 						defValue = strogeValue
 					} else {
 						let defItem = ''
-						if (this.defItem > 0 && this.defItem < this.mixinDatacomResData.length) {
+						if (this.defItem > 0 && this.defItem <= this.mixinDatacomResData.length) {
 							defItem = this.mixinDatacomResData[this.defItem - 1].value
 						}
 						defValue = defItem
 					}
-					this.emit(defValue)
+          if (defValue || defValue === 0) {
+					  this.emit(defValue)
+          }
 				}
 				const def = this.mixinDatacomResData.find(item => item.value === defValue)
 				this.current = def ? this.formatItemName(def) : ''
@@ -189,7 +220,7 @@
 			clearVal() {
 				this.emit('')
 				if (this.collection) {
-					uni.removeStorageSync(this.last)
+					this.removeCache()
 				}
 			},
 			change(item) {
@@ -200,18 +231,17 @@
 				}
 			},
 			emit(val) {
-				this.$emit('change', val)
 				this.$emit('input', val)
 				this.$emit('update:modelValue', val)
+				this.$emit('change', val)
 				if (this.collection) {
-					uni.setStorageSync(this.last, val)
+					this.setCache(val);
 				}
 			},
-
 			toggleSelector() {
-        if(this.disabled){
-          return
-        }
+				if (this.disabled) {
+					return
+				}
 
 				this.showSelector = !this.showSelector
 			},
@@ -222,14 +252,50 @@
 					channel_code
 				} = item
 				channel_code = channel_code ? `(${channel_code})` : ''
-				return this.collection.indexOf('app-list') > 0 ?
-					`${text}(${value})` :
-					(
-						text ?
-						text :
-						`未命名${channel_code}`
-					)
-			}
+
+				if (this.format) {
+					// 格式化输出
+					let str = "";
+					str = this.format;
+					for (let key in item) {
+						str = str.replace(new RegExp(`{${key}}`,"g"),item[key]);
+					}
+					return str;
+				} else {
+					return this.collection.indexOf('app-list') > 0 ?
+						`${text}(${value})` :
+						(
+							text ?
+							text :
+							`未命名${channel_code}`
+						)
+				}
+			},
+			// 获取当前加载的数据
+			getLoadData(){
+				return this.mixinDatacomResData;
+			},
+			// 获取当前缓存key
+			getCurrentCacheKey(){
+				return this.collection;
+			},
+			// 获取缓存
+			getCache(name=this.getCurrentCacheKey()){
+				let cacheData = uni.getStorageSync(this.cacheKey) || {};
+				return cacheData[name];
+			},
+			// 设置缓存
+			setCache(value, name=this.getCurrentCacheKey()){
+				let cacheData = uni.getStorageSync(this.cacheKey) || {};
+				cacheData[name] = value;
+				uni.setStorageSync(this.cacheKey, cacheData);
+			},
+			// 删除缓存
+			removeCache(name=this.getCurrentCacheKey()){
+				let cacheData = uni.getStorageSync(this.cacheKey) || {};
+				delete cacheData[name];
+				uni.setStorageSync(this.cacheKey, cacheData);
+			},
 		}
 	}
 </script>
@@ -253,7 +319,9 @@
 		display: flex;
 		align-items: center;
 		// padding: 15px;
+		/* #ifdef H5 */
 		cursor: pointer;
+		/* #endif */
 		width: 100%;
 		flex: 1;
 		box-sizing: border-box;
@@ -297,10 +365,10 @@
 		flex: 1;
 		height: 35px;
 
-    &--disabled{
-      background-color: #f5f7fa;
-      cursor: not-allowed;
-    }
+		&--disabled {
+			background-color: #f5f7fa;
+			cursor: not-allowed;
+		}
 	}
 
 	.uni-select__label {
@@ -357,6 +425,14 @@
 		/* #endif */
 	}
 
+	/* #ifdef H5 */
+	@media (min-width: 768px) {
+		.uni-select__selector-scroll {
+			max-height: 600px;
+		}
+	}
+	/* #endif */
+
 	.uni-select__selector-empty,
 	.uni-select__selector-item {
 		/* #ifndef APP-NVUE */
@@ -436,5 +512,6 @@
 		bottom: 0;
 		right: 0;
 		left: 0;
+		z-index: 2;
 	}
 </style>

+ 1 - 1
uni_modules/uni-data-select/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-data-select",
   "displayName": "uni-data-select 下拉框选择器",
-  "version": "0.1.9",
+  "version": "1.0.6",
   "description": "通过数据驱动的下拉框选择器",
   "keywords": [
     "uni-ui",

+ 67 - 33
uni_modules/uni-datetime-picker/changelog.md

@@ -1,41 +1,75 @@
+## 2.2.23(2023-05-02)
+- 修复 部分情况修改时间,开始时间未更新 [详情](https://github.com/dcloudio/uni-ui/issues/737)
+- 修复 部分平台及设备第一次点击无法显示弹框
+- 修复 ios 日期格式未补零显示及使用异常 [详情](https://ask.dcloud.net.cn/question/162979)
+## 2.2.22(2023-03-30)
+- 修复 日历 picker 修改年月后,自动选中当月1日 [详情](https://ask.dcloud.net.cn/question/165937)
+- 修复 小程序端 低版本 ios NaN [详情](https://ask.dcloud.net.cn/question/162979)
+## 2.2.21(2023-02-20)
+- 修复 firefox 浏览器显示区域点击无法拉起日历弹框的Bug [详情](https://ask.dcloud.net.cn/question/163362)
+## 2.2.20(2023-02-17)
+- 优化 值为空依然选中当天问题
+- 优化 提供 default-value 属性支持配置选择器打开时默认显示的时间
+- 优化 非范围选择未选择日期时间,点击确认按钮选中当前日期时间
+- 优化 字节小程序日期时间范围选择,底部日期换行问题
+## 2.2.19(2023-02-09)
+- 修复 2.2.18 引起范围选择配置 end 选择无效的Bug [详情](https://github.com/dcloudio/uni-ui/issues/686)
+## 2.2.18(2023-02-08)
+- 修复 移动端范围选择change事件触发异常的Bug [详情](https://github.com/dcloudio/uni-ui/issues/684)
+- 优化 PC端输入日期格式错误时返回当前日期时间
+- 优化 PC端输入日期时间超出 start、end 限制的Bug
+- 优化 移动端日期时间范围用法时间展示不完整问题
+## 2.2.17(2023-02-04)
+- 修复 小程序端绑定 Date 类型报错的Bug [详情](https://github.com/dcloudio/uni-ui/issues/679)
+- 修复 vue3 time-picker 无法显示绑定时分秒的Bug
+## 2.2.16(2023-02-02)
+- 修复 字节小程序报错的Bug
+## 2.2.15(2023-02-02)
+- 修复 某些情况切换月份错误的Bug
+## 2.2.14(2023-01-30)
+- 修复 某些情况切换月份错误的Bug [详情](https://ask.dcloud.net.cn/question/162033)
+## 2.2.13(2023-01-10)
+- 修复 多次加载组件造成内存占用的Bug
+## 2.2.12(2022-12-01)
+- 修复 vue3 下 i18n 国际化初始值不正确的Bug
 ## 2.2.11(2022-09-19)
-- 修复,支付宝小程序样式错乱,[详情](https://github.com/dcloudio/uni-app/issues/3861)
+- 修复 支付宝小程序样式错乱的Bug [详情](https://github.com/dcloudio/uni-app/issues/3861)
 ## 2.2.10(2022-09-19)
-- 修复,反向选择日期范围,日期显示异常,[详情](https://ask.dcloud.net.cn/question/153401?item_id=212892&rf=false)
+- 修复 反向选择日期范围,日期显示异常的Bug [详情](https://ask.dcloud.net.cn/question/153401?item_id=212892&rf=false)
 ## 2.2.9(2022-09-16)
 - 可以使用 uni-scss 控制主题色
 ## 2.2.8(2022-09-08)
-- 修复 close事件无效的 bug
+- 修复 close事件无效的Bug
 ## 2.2.7(2022-09-05)
-- 修复 移动端 maskClick 无效的 bug,详见:[https://ask.dcloud.net.cn/question/140824?item_id=209458&rf=false](https://ask.dcloud.net.cn/question/140824?item_id=209458&rf=false)
+- 修复 移动端 maskClick 无效的Bug [详情](https://ask.dcloud.net.cn/question/140824)
 ## 2.2.6(2022-06-30)
 - 优化 组件样式,调整了组件图标大小、高度、颜色等,与uni-ui风格保持一致
 ## 2.2.5(2022-06-24)
-- 修复 日历顶部年月及底部确认未国际化 bug
+- 修复 日历顶部年月及底部确认未国际化的Bug
 ## 2.2.4(2022-03-31)
-- 修复 Vue3 下动态赋值,单选类型未响应的 bug
+- 修复 Vue3 下动态赋值,单选类型未响应的Bug
 ## 2.2.3(2022-03-28)
-- 修复 Vue3 下动态赋值未响应的 bug
+- 修复 Vue3 下动态赋值未响应的Bug
 ## 2.2.2(2021-12-10)
-- 修复 clear-icon 属性在小程序平台不生效的 bug
+- 修复 clear-icon 属性在小程序平台不生效的Bug
 ## 2.2.1(2021-12-10)
-- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的 bug
+- 修复 日期范围选在小程序平台,必须多点击一次才能取消选中状态的Bug
 ## 2.2.0(2021-11-19)
-- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
-- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
-## 2.1.5(2021-11-09) 
+- 优化 组件UI,并提供设计资源 [详情](https://uniapp.dcloud.io/component/uniui/resource)
+- 文档迁移 [https://uniapp.dcloud.io/component/uniui/uni-datetime-picker](https://uniapp.dcloud.io/component/uniui/uni-datetime-picker)
+## 2.1.5(2021-11-09)
 - 新增 提供组件设计资源,组件样式调整
 ## 2.1.4(2021-09-10)
-- 修复 hide-second 在移动端的 bug
-- 修复 单选赋默认值时,赋值日期未高亮的 bug
-- 修复 赋默认值时,移动端未正确显示时间的 bug
+- 修复 hide-second 在移动端的Bug
+- 修复 单选赋默认值时,赋值日期未高亮的Bug
+- 修复 赋默认值时,移动端未正确显示时间的Bug
 ## 2.1.3(2021-09-09)
 - 新增 hide-second 属性,支持只使用时分,隐藏秒
 ## 2.1.2(2021-09-03)
 - 优化 取消选中时(范围选)直接开始下一次选择, 避免多点一次
 - 优化 移动端支持清除按钮,同时支持通过 ref 调用组件的 clear 方法
 - 优化 调整字号大小,美化日历界面
-- 修复 因国际化导致的 placeholder 失效的 bug
+- 修复 因国际化导致的 placeholder 失效的Bug
 ## 2.1.1(2021-08-24)
 - 新增 支持国际化
 - 优化 范围选择器在 pc 端过宽的问题
@@ -43,50 +77,50 @@
 - 新增 适配 vue3
 ## 2.0.19(2021-08-09)
 - 新增 支持作为 uni-forms 子组件相关功能
-- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的 bug
+- 修复 在 uni-forms 中使用时,选择时间报 NAN 错误的Bug
 ## 2.0.18(2021-08-05)
-- 修复 type 属性动态赋值无效的 bug
+- 修复 type 属性动态赋值无效的Bug
 - 修复 ‘确认’按钮被 tabbar 遮盖 bug
-- 修复 组件未赋值时范围选左、右日历相同的 bug
+- 修复 组件未赋值时范围选左、右日历相同的Bug
 ## 2.0.17(2021-08-04)
-- 修复 范围选未正确显示当前值的 bug
-- 修复 h5 平台(移动端)报错 'cale' of undefined 的 bug
+- 修复 范围选未正确显示当前值的Bug
+- 修复 h5 平台(移动端)报错 'cale' of undefined 的Bug
 ## 2.0.16(2021-07-21)
 - 新增 return-type 属性支持返回 date 日期对象
 ## 2.0.15(2021-07-14)
-- 修复 单选日期类型,初始赋值后不在当前日历的 bug
+- 修复 单选日期类型,初始赋值后不在当前日历的Bug
 - 新增 clearIcon 属性,显示框的清空按钮可配置显示隐藏(仅 pc 有效)
 - 优化 移动端移除显示框的清空按钮,无实际用途
 ## 2.0.14(2021-07-14)
-- 修复 组件赋值为空,界面未更新的 bug
-- 修复 start 和 end 不能动态赋值的 bug
-- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的 bug
+- 修复 组件赋值为空,界面未更新的Bug
+- 修复 start 和 end 不能动态赋值的Bug
+- 修复 范围选类型,用户选择后再次选择右侧日历(结束日期)显示不正确的Bug
 ## 2.0.13(2021-07-08)
-- 修复 范围选择不能动态赋值的 bug
+- 修复 范围选择不能动态赋值的Bug
 ## 2.0.12(2021-07-08)
 - 修复 范围选择的初始时间在一个月内时,造成无法选择的bug
 ## 2.0.11(2021-07-08)
 - 优化 弹出层在超出视窗边缘定位不准确的问题
 ## 2.0.10(2021-07-08)
-- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的 bug
+- 修复 范围起始点样式的背景色与今日样式的字体前景色融合,导致日期字体看不清的Bug
 - 优化 弹出层在超出视窗边缘被遮盖的问题
 ## 2.0.9(2021-07-07)
 - 新增 maskClick 事件
-- 修复 特殊情况日历 rpx 布局错误的 bug,rpx -> px
+- 修复 特殊情况日历 rpx 布局错误的Bug,rpx -> px
 - 修复 范围选择时清空返回值不合理的bug,['', ''] -> []
 ## 2.0.8(2021-07-07)
 - 新增 日期时间显示框支持插槽
 ## 2.0.7(2021-07-01)
 - 优化 添加 uni-icons 依赖
 ## 2.0.6(2021-05-22)
-- 修复 图标在小程序上不显示的 bug
+- 修复 图标在小程序上不显示的Bug
 - 优化 重命名引用组件,避免潜在组件命名冲突
 ## 2.0.5(2021-05-20)
 - 优化 代码目录扁平化
 ## 2.0.4(2021-05-12)
 - 新增 组件示例地址
 ## 2.0.3(2021-05-10)
-- 修复 ios 下不识别 '-' 日期格式的 bug
+- 修复 ios 下不识别 '-' 日期格式的Bug
 - 优化 pc 下弹出层添加边框和阴影
 ## 2.0.2(2021-05-08)
 - 修复 在 admin 中获取弹出层定位错误的bug
@@ -97,7 +131,7 @@
  > 注意:此版本不向后兼容,不再支持单独时间选择(type=time)及相关的 hide-second 属性(时间选可使用内置组件 picker)
 ## 1.0.6(2021-03-18)
 - 新增 hide-second 属性,时间支持仅选择时、分
-- 修复 选择跟显示的日期不一样的 bug
-- 修复 chang事件触发2次的 bug
-- 修复 分、秒 end 范围错误的 bug
+- 修复 选择跟显示的日期不一样的Bug
+- 修复 chang事件触发2次的Bug
+- 修复 分、秒 end 范围错误的Bug
 - 优化 更好的 nvue 适配

+ 3 - 13
uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar-item.vue

@@ -13,10 +13,10 @@
 				'uni-calendar-item--after-checked':weeks.afterMultiple,
 				'uni-calendar-item--disable':weeks.disable,
 				}">
-			<text v-if="selected&&weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
+			<text v-if="selected && weeks.extraInfo" class="uni-calendar-item__weeks-box-circle"></text>
 			<text class="uni-calendar-item__weeks-box-text uni-calendar-item__weeks-box-text-disable uni-calendar-item--checked-text">{{weeks.date}}</text>
 		</view>
-		<view :class="{'uni-calendar-item--isDay': weeks.isDay}"></view>
+		<view :class="{'uni-calendar-item--today': weeks.isToday}"></view>
 	</view>
 </template>
 
@@ -41,10 +41,6 @@
 					return []
 				}
 			},
-			lunar: {
-				type: Boolean,
-				default: false
-			},
 			checkHover: {
 				type: Boolean,
 				default: false
@@ -83,11 +79,6 @@
 		color: darken($color: $uni-primary, $amount: 40%);
 	}
 
-	.uni-calendar-item__weeks-lunar-text {
-		font-size: 12px;
-		color: #333;
-	}
-
 	.uni-calendar-item__weeks-box-item {
 		position: relative;
 		/* #ifndef APP-NVUE */
@@ -116,7 +107,6 @@
 	}
 
 	.uni-calendar-item__weeks-box .uni-calendar-item--disable {
-		// background-color: rgba(249, 249, 249, $uni-opacity-disabled);
 		cursor: default;
 	}
 
@@ -124,7 +114,7 @@
 		color: #D1D1D1;
 	}
 
-	.uni-calendar-item--isDay {
+	.uni-calendar-item--today {
 		position: absolute;
 		top: 10px;
 		right: 17%;

+ 141 - 127
uni_modules/uni-datetime-picker/components/uni-datetime-picker/calendar.vue

@@ -1,31 +1,37 @@
 <template>
 	<view class="uni-calendar" @mouseleave="leaveCale">
-		<view v-if="!insert&&show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}"
-			@click="clean();maskClick()"></view>
+
+		<view v-if="!insert && show" class="uni-calendar__mask" :class="{'uni-calendar--mask-show':aniMaskShow}"
+			@click="maskClick"></view>
+
 		<view v-if="insert || show" class="uni-calendar__content"
 			:class="{'uni-calendar--fixed':!insert,'uni-calendar--ani-show':aniMaskShow, 'uni-calendar__content-mobile': aniMaskShow}">
 			<view class="uni-calendar__header" :class="{'uni-calendar__header-mobile' :!insert}">
-				<view v-if="left" class="uni-calendar__header-btn-box" @click.stop="pre">
+
+				<view class="uni-calendar__header-btn-box" @click.stop="changeMonth('pre')">
 					<view class="uni-calendar__header-btn uni-calendar--left"></view>
 				</view>
+
 				<picker mode="date" :value="date" fields="month" @change="bindDateChange">
 					<text
 						class="uni-calendar__header-text">{{ (nowDate.year||'') + yearText + ( nowDate.month||'') + monthText}}</text>
 				</picker>
-				<view v-if="right" class="uni-calendar__header-btn-box" @click.stop="next">
+
+				<view class="uni-calendar__header-btn-box" @click.stop="changeMonth('next')">
 					<view class="uni-calendar__header-btn uni-calendar--right"></view>
 				</view>
-				<view v-if="!insert" class="dialog-close" @click="clean">
+
+				<view v-if="!insert" class="dialog-close" @click="close">
 					<view class="dialog-close-plus" data-id="close"></view>
 					<view class="dialog-close-plus dialog-close-rotate" data-id="close"></view>
 				</view>
-
-				<!-- <text class="uni-calendar__backtoday" @click="backtoday">回到今天</text> -->
 			</view>
 			<view class="uni-calendar__box">
+
 				<view v-if="showMonth" class="uni-calendar__box-bg">
 					<text class="uni-calendar__box-bg-text">{{nowDate.month}}</text>
 				</view>
+
 				<view class="uni-calendar__weeks" style="padding-bottom: 7px;">
 					<view class="uni-calendar__weeks-day">
 						<text class="uni-calendar__weeks-day-text">{{SUNText}}</text>
@@ -49,28 +55,30 @@
 						<text class="uni-calendar__weeks-day-text">{{SATText}}</text>
 					</view>
 				</view>
+
 				<view class="uni-calendar__weeks" v-for="(item,weekIndex) in weeks" :key="weekIndex">
 					<view class="uni-calendar__weeks-item" v-for="(weeks,weeksIndex) in item" :key="weeksIndex">
 						<calendar-item class="uni-calendar-item--hook" :weeks="weeks" :calendar="calendar"
-							:selected="selected" :lunar="lunar" :checkHover="range" @change="choiceDate"
+							:selected="selected" :checkHover="range" @change="choiceDate"
 							@handleMouse="handleMouse">
 						</calendar-item>
 					</view>
 				</view>
 			</view>
-			<view v-if="!insert && !range && typeHasTime" class="uni-date-changed uni-calendar--fixed-top"
+
+			<view v-if="!insert && !range && hasTime" class="uni-date-changed uni-calendar--fixed-top"
 				style="padding: 0 80px;">
 				<view class="uni-date-changed--time-date">{{tempSingleDate ? tempSingleDate : selectDateText}}</view>
-				<time-picker type="time" :start="reactStartTime" :end="reactEndTime" v-model="time"
+				<time-picker type="time" :start="timepickerStartTime" :end="timepickerEndTime" v-model="time"
 					:disabled="!tempSingleDate" :border="false" :hide-second="hideSecond" class="time-picker-style">
 				</time-picker>
 			</view>
 
-			<view v-if="!insert && range && typeHasTime" class="uni-date-changed uni-calendar--fixed-top">
+			<view v-if="!insert && range && hasTime" class="uni-date-changed uni-calendar--fixed-top">
 				<view class="uni-date-changed--time-start">
 					<view class="uni-date-changed--time-date">{{tempRange.before ? tempRange.before : startDateText}}
 					</view>
-					<time-picker type="time" :start="reactStartTime" v-model="timeRange.startTime" :border="false"
+					<time-picker type="time" :start="timepickerStartTime" v-model="timeRange.startTime" :border="false"
 						:hide-second="hideSecond" :disabled="!tempRange.before" class="time-picker-style">
 					</time-picker>
 				</view>
@@ -79,15 +87,13 @@
 				</view>
 				<view class="uni-date-changed--time-end">
 					<view class="uni-date-changed--time-date">{{tempRange.after ? tempRange.after : endDateText}}</view>
-					<time-picker type="time" :end="reactEndTime" v-model="timeRange.endTime" :border="false"
+					<time-picker type="time" :end="timepickerEndTime" v-model="timeRange.endTime" :border="false"
 						:hide-second="hideSecond" :disabled="!tempRange.after" class="time-picker-style">
 					</time-picker>
 				</view>
 			</view>
+
 			<view v-if="!insert" class="uni-date-changed uni-date-btn--ok">
-				<!-- <view class="uni-calendar__header-btn-box">
-					<text class="uni-calendar__button-text uni-calendar--fixed-width">{{okText}}</text>
-				</view> -->
 				<view class="uni-datetime-picker--btn" @click="confirm">{{confirmText}}</view>
 			</view>
 		</view>
@@ -95,22 +101,19 @@
 </template>
 
 <script>
-	import Calendar from './util.js';
+	import { Calendar, getDate, getTime } from './util.js';
 	import calendarItem from './calendar-item.vue'
 	import timePicker from './time-picker.vue'
-	import {
-		initVueI18n
-	} from '@dcloudio/uni-i18n'
-	import messages from './i18n/index.js'
-	const {
-		t
-	} = initVueI18n(messages)
+
+	import { initVueI18n } from '@dcloudio/uni-i18n'
+	import i18nMessages from './i18n/index.js'
+	const { t } = initVueI18n(i18nMessages)
+
 	/**
 	 * Calendar 日历
 	 * @description 日历组件可以查看日期,选择任意范围内的日期,打点操作。常用场景如:酒店日期预订、火车机票选择购买日期、上下班打卡等
 	 * @tutorial https://ext.dcloud.net.cn/plugin?id=56
 	 * @property {String} date 自定义当前时间,默认为今天
-	 * @property {Boolean} lunar 显示农历
 	 * @property {String} startDate 日期选择范围-开始日期
 	 * @property {String} endDate 日期选择范围-结束日期
 	 * @property {Boolean} range 范围选择
@@ -120,10 +123,11 @@
 	 * @property {Boolean} clearDate = [true|false] 弹窗模式是否清空上次选择内容
 	 * @property {Array} selected 打点,期待格式[{date: '2019-06-27', info: '签到', data: { custom: '自定义信息', name: '自定义消息头',xxx:xxx... }}]
 	 * @property {Boolean} showMonth 是否选择月份为背景
+	 * @property {[String} defaultValue 选择器打开时默认显示的时间
 	 * @event {Function} change 日期改变,`insert :ture` 时生效
 	 * @event {Function} confirm 确认选择`insert :false` 时生效
 	 * @event {Function} monthSwitch 切换月份时触发
-	 * @example <uni-calendar :insert="true":lunar="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" />
+	 * @example <uni-calendar :insert="true" :start-date="'2019-3-2'":end-date="'2019-5-20'"@change="change" />
 	 */
 	export default {
 		components: {
@@ -151,10 +155,6 @@
 					return []
 				}
 			},
-			lunar: {
-				type: Boolean,
-				default: false
-			},
 			startDate: {
 				type: String,
 				default: ''
@@ -163,11 +163,19 @@
 				type: String,
 				default: ''
 			},
+      startPlaceholder: {
+        type: String,
+				default: ''
+			},
+			endPlaceholder: {
+				type: String,
+				default: ''
+			},
 			range: {
 				type: Boolean,
 				default: false
 			},
-			typeHasTime: {
+			hasTime: {
 				type: Boolean,
 				default: false
 			},
@@ -183,14 +191,6 @@
 				type: Boolean,
 				default: true
 			},
-			left: {
-				type: Boolean,
-				default: true
-			},
-			right: {
-				type: Boolean,
-				default: true
-			},
 			checkHover: {
 				type: Boolean,
 				default: true
@@ -209,14 +209,18 @@
 						fulldate: ''
 					}
 				}
-			}
+			},
+      defaultValue: {
+        type: [String, Object, Array],
+        default: ''
+      }
 		},
 		data() {
 			return {
 				show: false,
 				weeks: [],
 				calendar: {},
-				nowDate: '',
+				nowDate: {},
 				aniMaskShow: false,
 				firstEnter: true,
 				time: '',
@@ -228,13 +232,14 @@
 				tempRange: {
 					before: '',
 					after: ''
-				}
+				},
+        isPhone: false
 			}
 		},
 		watch: {
 			date: {
 				immediate: true,
-				handler(newVal, oldVal) {
+				handler(newVal) {
 					if (!this.range) {
 						this.tempSingleDate = newVal
 						setTimeout(() => {
@@ -245,33 +250,44 @@
 			},
 			defTime: {
 				immediate: true,
-				handler(newVal, oldVal) {
+				handler(newVal) {
 					if (!this.range) {
 						this.time = newVal
 					} else {
-						// console.log('-----', newVal);
 						this.timeRange.startTime = newVal.start
 						this.timeRange.endTime = newVal.end
 					}
 				}
 			},
 			startDate(val) {
-				this.cale.resetSatrtDate(val)
+				// 字节小程序 watch 早于 created
+				if(!this.cale){
+					return
+				}
+				this.cale.setStartDate(val)
 				this.cale.setDate(this.nowDate.fullDate)
 				this.weeks = this.cale.weeks
 			},
 			endDate(val) {
-				this.cale.resetEndDate(val)
+				// 字节小程序 watch 早于 created
+				if(!this.cale){
+					return
+				}
+				this.cale.setEndDate(val)
 				this.cale.setDate(this.nowDate.fullDate)
 				this.weeks = this.cale.weeks
 			},
 			selected(newVal) {
+				// 字节小程序 watch 早于 created
+				if(!this.cale){
+					return
+				}
 				this.cale.setSelectInfo(this.nowDate.fullDate, newVal)
 				this.weeks = this.cale.weeks
 			},
 			pleStatus: {
 				immediate: true,
-				handler(newVal, oldVal) {
+				handler(newVal) {
 					const {
 						before,
 						after,
@@ -294,11 +310,16 @@
 								this.cale.lastHover = false
 							}
 						} else {
+              // 字节小程序 watch 早于 created
+              if(!this.cale){
+                return
+              }
+
 							this.cale.setDefaultMultiple(before, after)
-							if (which === 'left') {
+							if (which === 'left' && before) {
 								this.setDate(before)
 								this.weeks = this.cale.weeks
-							} else {
+							} else if(after) {
 								this.setDate(after)
 								this.weeks = this.cale.weeks
 							}
@@ -309,15 +330,13 @@
 			}
 		},
 		computed: {
-			reactStartTime() {
+			timepickerStartTime() {
 				const activeDate = this.range ? this.tempRange.before : this.calendar.fullDate
-				const res = activeDate === this.startDate ? this.selectableTimes.start : ''
-				return res
+				return activeDate === this.startDate ? this.selectableTimes.start : ''
 			},
-			reactEndTime() {
+			timepickerEndTime() {
 				const activeDate = this.range ? this.tempRange.after : this.calendar.fullDate
-				const res = activeDate === this.endDate ? this.selectableTimes.end : ''
-				return res
+				return activeDate === this.endDate ? this.selectableTimes.end : ''
 			},
 			/**
 			 * for i18n
@@ -368,18 +387,22 @@
 		created() {
 			// 获取日历方法实例
 			this.cale = new Calendar({
-				// date: new Date(),
 				selected: this.selected,
 				startDate: this.startDate,
 				endDate: this.endDate,
 				range: this.range,
-				// multipleStatus: this.pleStatus
 			})
 			// 选中某一天
-			// this.cale.setDate(this.date)
 			this.init(this.date)
-			// this.setDay
 		},
+    mounted(){
+      if(typeof navigator !== "undefined"){
+        this.isPhone = navigator.userAgent.toLowerCase().indexOf('mobile') !== -1
+        return
+      }
+      const { windowWidth } = uni.getSystemInfoSync()
+      this.isPhone = windowWidth <= 500
+    },
 		methods: {
 			leaveCale() {
 				this.firstEnter = true
@@ -407,14 +430,9 @@
 				const [yearB, monthB] = B.split('-')
 				return yearA === yearB && monthA === monthB
 			},
-
-			// 取消穿透
-			clean() {
-				this.close()
-			},
-
 			// 蒙版点击事件
 			maskClick() {
+        this.close()
 				this.$emit('maskClose')
 			},
 
@@ -433,33 +451,49 @@
 					this.tempSingleDate = ''
 				}
 				this.calendar.fullDate = ''
-				this.setDate()
+				this.setDate(new Date())
 			},
 
 			bindDateChange(e) {
 				const value = e.detail.value + '-1'
-				this.init(value)
+				this.setDate(value)
 			},
 			/**
 			 * 初始化日期显示
 			 * @param {Object} date
 			 */
 			init(date) {
-				this.cale.setDate(date)
+        // 字节小程序 watch 早于 created
+				if(!this.cale){
+					return
+				}
+				this.cale.setDate(date || new Date())
 				this.weeks = this.cale.weeks
-				this.nowDate = this.calendar = this.cale.getInfo(date)
-			},
-			// choiceDate(weeks) {
-			// 	if (weeks.disable) return
-			// 	this.calendar = weeks
-			// 	// 设置多选
-			// 	this.cale.setMultiple(this.calendar.fullDate, true)
-			// 	this.weeks = this.cale.weeks
-			// 	this.tempSingleDate = this.calendar.fullDate
-			// 	this.tempRange.before = this.cale.multipleStatus.before
-			// 	this.tempRange.after = this.cale.multipleStatus.after
-			// 	this.change()
-			// },
+				this.nowDate = this.cale.getInfo(date)
+        this.calendar = {...this.nowDate}
+        if(!date){
+          // 优化date为空默认不选中今天
+          this.calendar.fullDate = ''
+          if(this.defaultValue && !this.range){
+            // 暂时只支持移动端非范围选择
+            const defaultDate = new Date(this.defaultValue)
+            const fullDate = getDate(defaultDate)
+            const year = defaultDate.getFullYear()
+            const month = defaultDate.getMonth()+1
+            const date = defaultDate.getDate()
+            const day = defaultDate.getDay()
+            this.calendar = {
+              fullDate,
+              year,
+              month,
+              date,
+              day
+            },
+            this.tempSingleDate = fullDate
+            this.time = getTime(defaultDate, this.hideSecond)
+          }
+        }
+			},
 			/**
 			 * 打开日历弹窗
 			 */
@@ -467,7 +501,6 @@
 				// 弹窗模式并且清理数据
 				if (this.clearDate && !this.insert) {
 					this.cale.cleanMultipleStatus()
-					// this.cale.setDate(this.date)
 					this.init(this.date)
 				}
 				this.show = true
@@ -521,12 +554,20 @@
 			 * @param {Object} name
 			 */
 			setEmit(name) {
+        if(!this.range){
+					if(!this.calendar.fullDate){
+					  this.calendar = this.cale.getInfo(new Date())
+					  this.tempSingleDate = this.calendar.fullDate
+					}
+					if(this.hasTime && !this.time) {
+					  this.time = getTime(new Date(), this.hideSecond)
+					}
+				}
 				let {
 					year,
 					month,
 					date,
 					fullDate,
-					lunar,
 					extraInfo
 				} = this.calendar
 				this.$emit(name, {
@@ -537,7 +578,6 @@
 					time: this.time,
 					timeRange: this.timeRange,
 					fulldate: fullDate,
-					lunar,
 					extraInfo: extraInfo || {}
 				})
 			},
@@ -553,10 +593,10 @@
 				this.cale.setMultiple(this.calendar.fullDate, true)
 				this.weeks = this.cale.weeks
 				this.tempSingleDate = this.calendar.fullDate
-				const beforeStatus = this.cale.multipleStatus.before
 				const beforeDate = new Date(this.cale.multipleStatus.before).getTime()
 				const afterDate = new Date(this.cale.multipleStatus.after).getTime()
-				if (beforeDate > afterDate && afterDate) {
+        // 这里返回的 before after 为什么要做替换?导致PC端如果开始结束日期都是今天,第一次选择开始日期早于今天,开始日期不更新
+				if (beforeDate > afterDate && afterDate && !this.isPhone) {
 					this.tempRange.before = this.cale.multipleStatus.after
 					this.tempRange.after = this.cale.multipleStatus.before
 				} else {
@@ -565,46 +605,17 @@
 				}
 				this.change()
 			},
-			/**
-			 * 回到今天
-			 */
-			backtoday() {
-				let date = this.cale.getDate(new Date()).fullDate
-				// this.cale.setDate(date)
-				this.init(date)
-				this.change()
-			},
-			/**
-			 * 比较时间大小
-			 */
-			dateCompare(startDate, endDate) {
-				// 计算截止时间
-				startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
-				// 计算详细项的截止时间
-				endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
-				if (startDate <= endDate) {
-					return true
-				} else {
-					return false
-				}
-			},
-			/**
-			 * 上个月
-			 */
-			pre() {
-				const preDate = this.cale.getDate(this.nowDate.fullDate, -1, 'month').fullDate
-				this.setDate(preDate)
-				this.monthSwitch()
+      changeMonth(type) {
+        let newDate
+        if(type === 'pre') {
+          newDate = this.cale.getPreMonthObj(this.nowDate.fullDate).fullDate
+        } else if(type === 'next') {
+          newDate = this.cale.getNextMonthObj(this.nowDate.fullDate).fullDate
+        }
 
-			},
-			/**
-			 * 下个月
-			 */
-			next() {
-				const nextDate = this.cale.getDate(this.nowDate.fullDate, +1, 'month').fullDate
-				this.setDate(nextDate)
+        this.setDate(newDate)
 				this.monthSwitch()
-			},
+      },
 			/**
 			 * 设置日期
 			 * @param {Object} date
@@ -854,14 +865,17 @@
 
 	.uni-date-changed--time-end {
 		/* #ifndef APP-NVUE */
-		display: flex;
+    display: flex;
 		/* #endif */
 		align-items: center;
 	}
 
 	.uni-date-changed--time-date {
-		color: #999;
+    color: #999;
 		line-height: 50px;
+    /* #ifdef MP-TOUTIAO */
+    font-size: 16px;
+    /* #endif */
 		margin-right: 5px;
 		// opacity: 0.6;
 	}

+ 1 - 1
uni_modules/uni-datetime-picker/components/uni-datetime-picker/i18n/en.json

@@ -1,7 +1,7 @@
 {
 	"uni-datetime-picker.selectDate": "select date",
 	"uni-datetime-picker.selectTime": "select time",
-	"uni-datetime-picker.selectDateTime": "select datetime",
+	"uni-datetime-picker.selectDateTime": "select date and time",
 	"uni-datetime-picker.startDate": "start date",
 	"uni-datetime-picker.endDate": "end date",
 	"uni-datetime-picker.startTime": "start time",

+ 16 - 28
uni_modules/uni-datetime-picker/components/uni-datetime-picker/time-picker.vue

@@ -77,21 +77,14 @@
 				</view>
 			</view>
 		</view>
-		<!-- #ifdef H5 -->
-		<!-- <keypress v-if="visible" @esc="tiggerTimePicker" @enter="setTime" /> -->
-		<!-- #endif -->
 	</view>
 </template>
 
 <script>
-	// #ifdef H5
-	import keypress from './keypress'
-	// #endif
-	import {
-		initVueI18n
-	} from '@dcloudio/uni-i18n'
-	import messages from './i18n/index.js'
-	const {	t	} = initVueI18n(messages)
+	import { initVueI18n } from '@dcloudio/uni-i18n'
+	import i18nMessages from './i18n/index.js'
+	const {	t	} = initVueI18n(i18nMessages)
+  import { fixIosDateFormat } from './util'
 
 	/**
 	 * DatetimePicker 时间选择器
@@ -108,11 +101,6 @@
 
 	export default {
 		name: 'UniDatetimePicker',
-		components: {
-			// #ifdef H5
-			keypress
-			// #endif
-		},
 		data() {
 			return {
 				indicatorStyle: `height: 50px;`,
@@ -187,12 +175,12 @@
 		watch: {
 			// #ifndef VUE3
 			value: {
-				handler(newVal, oldVal) {
-					if (newVal) {
-						this.parseValue(this.fixIosDateFormat(newVal)) //兼容 iOS、safari 日期格式
+				handler(newVal) {
+          if (newVal) {
+            this.parseValue(fixIosDateFormat(newVal))
 						this.initTime(false)
 					} else {
-						this.time = ''
+            this.time = ''
 						this.parseValue(Date.now())
 					}
 				},
@@ -201,9 +189,9 @@
 			// #endif
 			// #ifdef VUE3
 			modelValue: {
-				handler(newVal, oldVal) {
-					if (newVal) {
-						this.parseValue(this.fixIosDateFormat(newVal)) //兼容 iOS、safari 日期格式
+        handler(newVal) {
+          if (newVal) {
+						this.parseValue(fixIosDateFormat(newVal))
 						this.initTime(false)
 					} else {
 						this.time = ''
@@ -233,13 +221,13 @@
 			},
 			start: {
 				handler(newVal) {
-					this.parseDatetimeRange(this.fixIosDateFormat(newVal), 'start') //兼容 iOS、safari 日期格式
+					this.parseDatetimeRange(fixIosDateFormat(newVal), 'start')
 				},
 				immediate: true
 			},
 			end: {
 				handler(newVal) {
-					this.parseDatetimeRange(this.fixIosDateFormat(newVal), 'end') //兼容 iOS、safari 日期格式
+					this.parseDatetimeRange(fixIosDateFormat(newVal), 'end')
 				},
 				immediate: true
 			},
@@ -543,7 +531,7 @@
 					const day = now.getDate()
 					dateBase = year + '/' + month + '/' + day + ' '
 				}
-				if (Number(value) && typeof value !== NaN) {
+				if (Number(value)) {
 					value = parseInt(value)
 					dateBase = 0
 				}
@@ -614,7 +602,7 @@
 						pointType === 'start' ? this.startYear = this.year - 60 : this.endYear = this.year + 60
 						return
 					}
-					if (Number(point) && Number(point) !== NaN) {
+					if (Number(point)) {
 						point = parseInt(point)
 					}
 					// datetime 的 end 没有时分秒, 则不限制
@@ -752,7 +740,7 @@
 			 */
 			initTimePicker() {
 				if (this.disabled) return
-				const value = this.fixIosDateFormat(this.value)
+				const value = fixIosDateFormat(this.time)
 				this.initPickerValue(value)
 				this.visible = !this.visible
 			},

File diff suppressed because it is too large
+ 337 - 301
uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker.vue


+ 186 - 193
uni_modules/uni-datetime-picker/components/uni-datetime-picker/util.js

@@ -1,27 +1,24 @@
 class Calendar {
 	constructor({
-		date,
 		selected,
 		startDate,
 		endDate,
 		range,
-		// multipleStatus
 	} = {}) {
 		// 当前日期
-		this.date = this.getDate(new Date()) // 当前初入日期
+		this.date = this.getDateObj(new Date()) // 当前初入日期
 		// 打点信息
 		this.selected = selected || [];
-		// 范围开始
+		// 起始时间
 		this.startDate = startDate
-		// 范围结束
+		// 终止时间
 		this.endDate = endDate
+    // 是否范围选择
 		this.range = range
 		// 多选状态
 		this.cleanMultipleStatus()
 		// 每周日期
 		this.weeks = {}
-		// this._getWeek(this.date.fullDate)
-		// this.multipleStatus = multipleStatus
 		this.lastHover = false
 	}
 	/**
@@ -29,8 +26,8 @@ class Calendar {
 	 * @param {Object} date
 	 */
 	setDate(date) {
-		this.selectDate = this.getDate(date)
-		this._getWeek(this.selectDate.fullDate)
+		const selectDate = this.getDateObj(date)
+		this.getWeeks(selectDate.fullDate)
 	}
 
 	/**
@@ -44,93 +41,82 @@ class Calendar {
 		}
 	}
 
-	/**
-	 * 重置开始日期
-	 */
-	resetSatrtDate(startDate) {
-		// 范围开始
+	setStartDate(startDate) {
 		this.startDate = startDate
-
 	}
 
-	/**
-	 * 重置结束日期
-	 */
-	resetEndDate(endDate) {
-		// 范围结束
+	setEndDate(endDate) {
 		this.endDate = endDate
 	}
 
+  getPreMonthObj(date){
+    date = fixIosDateFormat(date)
+    date = new Date(date)
+
+    const oldMonth = date.getMonth()
+    date.setMonth(oldMonth - 1)
+    const newMonth = date.getMonth()
+    if(oldMonth !== 0 && newMonth - oldMonth === 0){
+      date.setMonth(newMonth - 1)
+    }
+    return this.getDateObj(date)
+  }
+  getNextMonthObj(date){
+    date = fixIosDateFormat(date)
+    date = new Date(date)
+
+    const oldMonth = date.getMonth()
+    date.setMonth(oldMonth + 1)
+    const newMonth = date.getMonth()
+    if(newMonth - oldMonth > 1){
+      date.setMonth(newMonth - 1)
+    }
+    return this.getDateObj(date)
+  }
+
 	/**
-	 * 获取任意时间
+	 * 获取指定格式Date对象
 	 */
-	getDate(date, AddDayCount = 0, str = 'day') {
-		if (!date) {
-			date = new Date()
-		}
-		if (typeof date !== 'object') {
-			date = date.replace(/-/g, '/')
-		}
-		const dd = new Date(date)
-		switch (str) {
-			case 'day':
-				dd.setDate(dd.getDate() + AddDayCount) // 获取AddDayCount天后的日期
-				break
-			case 'month':
-				if (dd.getDate() === 31) {
-					dd.setDate(dd.getDate() + AddDayCount)
-				} else {
-					dd.setMonth(dd.getMonth() + AddDayCount) // 获取AddDayCount天后的日期
-				}
-				break
-			case 'year':
-				dd.setFullYear(dd.getFullYear() + AddDayCount) // 获取AddDayCount天后的日期
-				break
-		}
-		const y = dd.getFullYear()
-		const m = dd.getMonth() + 1 < 10 ? '0' + (dd.getMonth() + 1) : dd.getMonth() + 1 // 获取当前月份的日期,不足10补0
-		const d = dd.getDate() < 10 ? '0' + dd.getDate() : dd.getDate() // 获取当前几号,不足10补0
+	getDateObj(date) {
+    date = fixIosDateFormat(date)
+    date = new Date(date)
+
 		return {
-			fullDate: y + '-' + m + '-' + d,
-			year: y,
-			month: m,
-			date: d,
-			day: dd.getDay()
+			fullDate: getDate(date),
+      year: date.getFullYear(),
+      month: addZero(date.getMonth() + 1),
+      date: addZero(date.getDate()),
+      day: date.getDay()
 		}
 	}
 
-
 	/**
-	 * 获取上月剩余天数
+	 * 获取上一个月日期集合
 	 */
-	_getLastMonthDays(firstDay, full) {
-		let dateArr = []
-		for (let i = firstDay; i > 0; i--) {
-			const beforeDate = new Date(full.year, full.month - 1, -i + 1).getDate()
-			dateArr.push({
-				date: beforeDate,
-				month: full.month - 1,
+	getPreMonthDays(amount, dateObj) {
+		const result = []
+		for (let i = amount - 1; i >= 0; i--) {
+      const month = dateObj.month - 1
+			result.push({
+				date: new Date(dateObj.year, month, -i).getDate(),
+				month,
 				disable: true
 			})
 		}
-		return dateArr
+		return result
 	}
 	/**
-	 * 获取本月天数
+	 * 获取本月日期集合
 	 */
-	_currentMonthDys(dateData, full) {
-		let dateArr = []
-		let fullDate = this.date.fullDate
-		for (let i = 1; i <= dateData; i++) {
-			let isinfo = false
-			let nowDate = full.year + '-' + (full.month < 10 ?
-				full.month : full.month) + '-' + (i < 10 ?
-				'0' + i : i)
-			// 是否今天
-			let isDay = fullDate === nowDate
+	getCurrentMonthDays(amount, dateObj) {
+		const result = []
+		const fullDate = this.date.fullDate
+		for (let i = 1; i <= amount; i++) {
+			const currentDate = `${dateObj.year}-${dateObj.month}-${addZero(i)}`
+			const isToday = fullDate === currentDate
 			// 获取打点信息
-			let info = this.selected && this.selected.find((item) => {
-				if (this.dateEqual(nowDate, item.date)) {
+			const info = this.selected && this.selected.find((item) => {
+				if (this.dateEqual(currentDate, item.date)) {
 					return item
 				}
 			})
@@ -139,62 +125,52 @@ class Calendar {
 			let disableBefore = true
 			let disableAfter = true
 			if (this.startDate) {
-				// let dateCompBefore = this.dateCompare(this.startDate, fullDate)
-				// disableBefore = this.dateCompare(dateCompBefore ? this.startDate : fullDate, nowDate)
-				disableBefore = this.dateCompare(this.startDate, nowDate)
+				disableBefore = dateCompare(this.startDate, currentDate)
 			}
 
 			if (this.endDate) {
-				// let dateCompAfter = this.dateCompare(fullDate, this.endDate)
-				// disableAfter = this.dateCompare(nowDate, dateCompAfter ? this.endDate : fullDate)
-				disableAfter = this.dateCompare(nowDate, this.endDate)
+				disableAfter = dateCompare(currentDate, this.endDate)
 			}
+
 			let multiples = this.multipleStatus.data
-			let checked = false
 			let multiplesStatus = -1
-			if (this.range) {
-				if (multiples) {
-					multiplesStatus = multiples.findIndex((item) => {
-						return this.dateEqual(item, nowDate)
-					})
-				}
-				if (multiplesStatus !== -1) {
-					checked = true
-				}
+			if (this.range && multiples) {
+        multiplesStatus = multiples.findIndex((item) => {
+          return this.dateEqual(item, currentDate)
+        })
 			}
-			let data = {
-				fullDate: nowDate,
-				year: full.year,
+      const checked = multiplesStatus !== -1
+
+			result.push({
+				fullDate: currentDate,
+				year: dateObj.year,
 				date: i,
 				multiple: this.range ? checked : false,
-				beforeMultiple: this.isLogicBefore(nowDate, this.multipleStatus.before, this.multipleStatus.after),
-				afterMultiple: this.isLogicAfter(nowDate, this.multipleStatus.before, this.multipleStatus.after),
-				month: full.month,
-				disable: !(disableBefore && disableAfter),
-				isDay,
-				userChecked: false
-			}
-			if (info) {
-				data.extraInfo = info
-			}
-
-			dateArr.push(data)
+				beforeMultiple: this.isLogicBefore(currentDate, this.multipleStatus.before, this.multipleStatus.after),
+				afterMultiple: this.isLogicAfter(currentDate, this.multipleStatus.before, this.multipleStatus.after),
+				month: dateObj.month,
+				disable: (this.startDate && !dateCompare(this.startDate, currentDate)) || (this.endDate && !dateCompare(currentDate,this.endDate)),
+				isToday,
+				userChecked: false,
+        extraInfo: info
+			})
 		}
-		return dateArr
+		return result
 	}
 	/**
-	 * 获取下月天数
+	 * 获取下一个月日期集合
 	 */
-	_getNextMonthDays(surplus, full) {
-		let dateArr = []
-		for (let i = 1; i < surplus + 1; i++) {
-			dateArr.push({
+	_getNextMonthDays(amount, dateObj) {
+		const result = []
+    const month = dateObj.month + 1
+		for (let i = 1; i <= amount; i++) {
+			result.push({
 				date: i,
-				month: Number(full.month) + 1,
+				month,
 				disable: true
 			})
 		}
-		return dateArr
+		return result
 	}
 
 	/**
@@ -205,58 +181,37 @@ class Calendar {
 		if (!date) {
 			date = new Date()
 		}
-		const dateInfo = this.canlender.find(item => item.fullDate === this.getDate(date).fullDate)
-		return dateInfo
-	}
 
-	/**
-	 * 比较时间大小
-	 */
-	dateCompare(startDate, endDate) {
-		// 计算截止时间
-		startDate = new Date(startDate.replace('-', '/').replace('-', '/'))
-		// 计算详细项的截止时间
-		endDate = new Date(endDate.replace('-', '/').replace('-', '/'))
-		if (startDate <= endDate) {
-			return true
-		} else {
-			return false
-		}
+		return this.calendar.find(item => item.fullDate === this.getDateObj(date).fullDate)
 	}
 
 	/**
 	 * 比较时间是否相等
 	 */
 	dateEqual(before, after) {
-		// 计算截止时间
-		before = new Date(before.replace('-', '/').replace('-', '/'))
-		// 计算详细项的截止时间
-		after = new Date(after.replace('-', '/').replace('-', '/'))
-		if (before.getTime() - after.getTime() === 0) {
-			return true
-		} else {
-			return false
-		}
+		before = new Date(fixIosDateFormat(before))
+		after = new Date(fixIosDateFormat(after))
+		return before.valueOf() === after.valueOf()
 	}
 
 	/**
 	 *  比较真实起始日期
 	 */
 
-	isLogicBefore(currentDay, before, after) {
+	isLogicBefore(currentDate, before, after) {
 		let logicBefore = before
 		if (before && after) {
-			logicBefore = this.dateCompare(before, after) ? before : after
+			logicBefore = dateCompare(before, after) ? before : after
 		}
-		return this.dateEqual(logicBefore, currentDay)
+		return this.dateEqual(logicBefore, currentDate)
 	}
 
-	isLogicAfter(currentDay, before, after) {
+	isLogicAfter(currentDate, before, after) {
 		let logicAfter = after
 		if (before && after) {
-			logicAfter = this.dateCompare(before, after) ? after : before
+			logicAfter = dateCompare(before, after) ? after : before
 		}
-		return this.dateEqual(logicAfter, currentDay)
+		return this.dateEqual(logicAfter, currentDate)
 	}
 
 	/**
@@ -276,7 +231,7 @@ class Calendar {
 		var unixDe = de.getTime() - 24 * 60 * 60 * 1000
 		for (var k = unixDb; k <= unixDe;) {
 			k = k + 24 * 60 * 60 * 1000
-			arr.push(this.getDate(new Date(parseInt(k))).fullDate)
+			arr.push(this.getDateObj(new Date(parseInt(k))).fullDate)
 		}
 		return arr
 	}
@@ -285,11 +240,12 @@ class Calendar {
 	 *  获取多选状态
 	 */
 	setMultiple(fullDate) {
+    if (!this.range) return
+
 		let {
 			before,
 			after
 		} = this.multipleStatus
-		if (!this.range) return
 		if (before && after) {
 			if (!this.lastHover) {
 				this.lastHover = true
@@ -306,7 +262,7 @@ class Calendar {
 				this.lastHover = false
 			} else {
 				this.multipleStatus.after = fullDate
-				if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
+				if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
 					this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus
 						.after);
 				} else {
@@ -316,32 +272,28 @@ class Calendar {
 				this.lastHover = true
 			}
 		}
-		this._getWeek(fullDate)
+		this.getWeeks(fullDate)
 	}
 
 	/**
 	 *  鼠标 hover 更新多选状态
 	 */
 	setHoverMultiple(fullDate) {
-		let {
-			before,
-			after
-		} = this.multipleStatus
+    if (!this.range || this.lastHover) return
 
-		if (!this.range) return
-		if (this.lastHover) return
+		const { before } = this.multipleStatus
 
 		if (!before) {
 			this.multipleStatus.before = fullDate
 		} else {
 			this.multipleStatus.after = fullDate
-			if (this.dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
+			if (dateCompare(this.multipleStatus.before, this.multipleStatus.after)) {
 				this.multipleStatus.data = this.geDateAll(this.multipleStatus.before, this.multipleStatus.after);
 			} else {
 				this.multipleStatus.data = this.geDateAll(this.multipleStatus.after, this.multipleStatus.before);
 			}
 		}
-		this._getWeek(fullDate)
+		this.getWeeks(fullDate)
 	}
 
 	/**
@@ -351,12 +303,12 @@ class Calendar {
 		this.multipleStatus.before = before
 		this.multipleStatus.after = after
 		if (before && after) {
-			if (this.dateCompare(before, after)) {
+			if (dateCompare(before, after)) {
 				this.multipleStatus.data = this.geDateAll(before, after);
-				this._getWeek(after)
+				this.getWeeks(after)
 			} else {
 				this.multipleStatus.data = this.geDateAll(after, before);
-				this._getWeek(before)
+				this.getWeeks(before)
 			}
 		}
 	}
@@ -365,46 +317,87 @@ class Calendar {
 	 * 获取每周数据
 	 * @param {Object} dateData
 	 */
-	_getWeek(dateData) {
+	getWeeks(dateData) {
 		const {
-			fullDate,
 			year,
 			month,
-			date,
-			day
-		} = this.getDate(dateData)
-		let firstDay = new Date(year, month - 1, 1).getDay()
-		let currentDay = new Date(year, month, 0).getDate()
-		let dates = {
-			lastMonthDays: this._getLastMonthDays(firstDay, this.getDate(dateData)), // 上个月末尾几天
-			currentMonthDys: this._currentMonthDys(currentDay, this.getDate(dateData)), // 本月天数
-			nextMonthDays: [], // 下个月开始几天
-			weeks: []
-		}
-		let canlender = []
-		const surplus = 42 - (dates.lastMonthDays.length + dates.currentMonthDys.length)
-		dates.nextMonthDays = this._getNextMonthDays(surplus, this.getDate(dateData))
-		canlender = canlender.concat(dates.lastMonthDays, dates.currentMonthDys, dates.nextMonthDays)
-		let weeks = {}
-		// 拼接数组  上个月开始几天 + 本月天数+ 下个月开始几天
-		for (let i = 0; i < canlender.length; i++) {
-			if (i % 7 === 0) {
-				weeks[parseInt(i / 7)] = new Array(7)
-			}
-			weeks[parseInt(i / 7)][i % 7] = canlender[i]
+		} = this.getDateObj(dateData)
+
+		const preMonthDayAmount = new Date(year, month - 1, 1).getDay()
+    const preMonthDays = this.getPreMonthDays(preMonthDayAmount, this.getDateObj(dateData))
+
+		const currentMonthDayAmount = new Date(year, month, 0).getDate()
+    const currentMonthDays = this.getCurrentMonthDays(currentMonthDayAmount, this.getDateObj(dateData))
+
+    const nextMonthDayAmount = 42 - preMonthDayAmount - currentMonthDayAmount
+    const nextMonthDays = this._getNextMonthDays(nextMonthDayAmount, this.getDateObj(dateData))
+
+		const calendarDays = [...preMonthDays, ...currentMonthDays, ...nextMonthDays]
+
+		const weeks = new Array(6)
+		for (let i = 0; i < calendarDays.length; i++) {
+      const index = Math.floor(i / 7)
+      if(!weeks[index]){
+        weeks[index] = new Array(7)
+      }
+			weeks[index][i % 7] = calendarDays[i]
 		}
-		this.canlender = canlender
+
+		this.calendar = calendarDays
 		this.weeks = weeks
 	}
+}
+
+function getDateTime(date, hideSecond){
+  return `${getDate(date)} ${getTime(date, hideSecond)}`
+}
+
+function getDate(date) {
+  date = fixIosDateFormat(date)
+  date = new Date(date)
+  const year = date.getFullYear()
+  const month = date.getMonth()+1
+  const day = date.getDate()
+  return `${year}-${addZero(month)}-${addZero(day)}`
+}
+
+function getTime(date, hideSecond){
+  date = fixIosDateFormat(date)
+  date = new Date(date)
+  const hour = date.getHours()
+  const minute = date.getMinutes()
+  const second = date.getSeconds()
+  return hideSecond ? `${addZero(hour)}:${addZero(minute)}` : `${addZero(hour)}:${addZero(minute)}:${addZero(second)}`
+}
 
-	//静态方法
-	// static init(date) {
-	// 	if (!this.instance) {
-	// 		this.instance = new Calendar(date);
-	// 	}
-	// 	return this.instance;
-	// }
+function addZero(num) {
+  if(num < 10){
+    num = `0${num}`
+  }
+  return num
 }
 
+function getDefaultSecond(hideSecond) {
+  return hideSecond ? '00:00' : '00:00:00'
+}
+
+function dateCompare(startDate, endDate) {
+  startDate = new Date(fixIosDateFormat(startDate))
+  endDate = new Date(fixIosDateFormat(endDate))
+  return startDate <= endDate
+}
+
+function checkDate(date){
+  const dateReg = /((19|20)\d{2})(-|\/)\d{1,2}(-|\/)\d{1,2}/g
+  return date.match(dateReg)
+}
+
+const dateTimeReg = /^\d{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])( [0-5]?[0-9]:[0-5]?[0-9]:[0-5]?[0-9])?$/
+function fixIosDateFormat(value) {
+  if (typeof value === 'string' && dateTimeReg.test(value)) {
+    value = value.replace(/-/g, '/')
+  }
+  return value
+}
 
-export default Calendar
+export {Calendar, getDateTime, getDate, getTime, addZero, getDefaultSecond, dateCompare, checkDate, fixIosDateFormat}

+ 1 - 1
uni_modules/uni-datetime-picker/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-datetime-picker",
   "displayName": "uni-datetime-picker 日期选择器",
-  "version": "2.2.11",
+  "version": "2.2.23",
   "description": "uni-datetime-picker 日期时间选择器,支持日历,支持范围选择",
   "keywords": [
     "uni-datetime-picker",

+ 1 - 1
uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue

@@ -105,7 +105,7 @@
 	}
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped>
 	$uni-mask: rgba($color: #000000, $alpha: 0.4) ;
 	// 抽屉宽度
 	$drawer-width: 220px;

+ 12 - 1
uni_modules/uni-easyinput/changelog.md

@@ -1,10 +1,21 @@
+## 1.1.9(2023-04-11)
+- 修复 vue3 下 keyboardheightchange 事件报错的bug
+## 1.1.8(2023-03-29)
+- 优化 trim 属性默认值
+## 1.1.7(2023-03-29)
+- 新增 cursor-spacing 属性
+## 1.1.6(2023-01-28)
+- 新增 keyboardheightchange 事件,可监听键盘高度变化
+## 1.1.5(2022-11-29)
+- 优化 主题样式
+## 1.1.4(2022-10-27)
+- 修复 props 中背景颜色无默认值的bug
 ## 1.1.0(2022-06-30)
 
 - 新增 在 uni-forms 1.4.0 中使用可以在 blur 时校验内容
 - 新增 clear 事件,点击右侧叉号图标触发
 - 新增 change 事件 ,仅在输入框失去焦点或用户按下回车时触发
 - 优化 组件样式,组件获取焦点时高亮显示,图标颜色调整等
--
 
 ## 1.0.5(2022-06-07)
 

+ 115 - 137
uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue

@@ -1,24 +1,7 @@
 <template>
-	<view
-		class="uni-easyinput"
-		:class="{ 'uni-easyinput-error': msg }"
-		:style="boxStyle"
-	>
-		<view
-			class="uni-easyinput__content"
-			:class="inputContentClass"
-			:style="inputContentStyle"
-		>
-			<slot name="prefixIcon">
-				<uni-icons
-					v-if="prefixIcon"
-					class="content-clear-icon"
-					:type="prefixIcon"
-					color="#c0c4cc"
-					@click="onClickIcon('prefix')"
-					size="22"
-				></uni-icons>
-			</slot>
+	<view class="uni-easyinput" :class="{ 'uni-easyinput-error': msg }" :style="boxStyle">
+		<view class="uni-easyinput__content" :class="inputContentClass" :style="inputContentStyle">
+			<uni-icons v-if="prefixIcon" class="content-clear-icon" :type="prefixIcon" color="#c0c4cc" @click="onClickIcon('prefix')" size="22"></uni-icons>
 			<textarea
 				v-if="type === 'textarea'"
 				class="uni-easyinput__content-textarea"
@@ -32,10 +15,12 @@
 				:maxlength="inputMaxlength"
 				:focus="focused"
 				:autoHeight="autoHeight"
+				:cursor-spacing="cursorSpacing"
 				@input="onInput"
 				@blur="_Blur"
 				@focus="_Focus"
 				@confirm="onConfirm"
+        @keyboardheightchange="onkeyboardheightchange"
 			></textarea>
 			<input
 				v-else
@@ -52,10 +37,12 @@
 				:maxlength="inputMaxlength"
 				:focus="focused"
 				:confirmType="confirmType"
+				:cursor-spacing="cursorSpacing"
 				@focus="_Focus"
 				@blur="_Blur"
 				@input="onInput"
 				@confirm="onConfirm"
+        @keyboardheightchange="onkeyboardheightchange"
 			/>
 			<template v-if="type === 'password' && passwordIcon">
 				<!-- 开启密码时显示小眼睛 -->
@@ -67,20 +54,10 @@
 					:size="22"
 					:color="focusShow ? primaryColor : '#c0c4cc'"
 					@click="onEyes"
-				>
-				</uni-icons>
+				></uni-icons>
 			</template>
-			<template v-else-if="suffixIcon || $slots.suffixIcon">
-				<slot name="suffixIcon">
-					<uni-icons
-						v-if="suffixIcon"
-						class="content-clear-icon"
-						:type="suffixIcon"
-						color="#c0c4cc"
-						@click="onClickIcon('suffix')"
-						size="22"
-					></uni-icons>
-				</slot>
+			<template v-else-if="suffixIcon">
+				<uni-icons v-if="suffixIcon" class="content-clear-icon" :type="suffixIcon" color="#c0c4cc" @click="onClickIcon('suffix')" size="22"></uni-icons>
 			</template>
 			<template v-else>
 				<uni-icons
@@ -124,6 +101,7 @@
  * @property {String}	suffixIcon	输入框尾部图标
  * @property {String}	primaryColor	设置主题色(默认#2979ff)
  * @property {Boolean}	trim	是否自动去除两端的空格
+ * @property {Boolean}	cursorSpacing	指定光标与键盘的距离,单位 px
  * @value both	去除两端空格
  * @value left	去除左侧空格
  * @value right	去除右侧空格
@@ -139,12 +117,10 @@
  * @event {Function}	blur	输入框失去焦点时触发
  * @event {Function}	confirm	点击完成按钮时触发
  * @event {Function}	iconClick	点击图标时触发
- * @slot prefixIcon 输入框头部插槽
- * @slot suffixIcon 输入框尾部插槽
  * @example <uni-easyinput v-model="mobile"></uni-easyinput>
  */
 function obj2strClass(obj) {
-	let classess = "";
+	let classess = '';
 	for (let key in obj) {
 		const val = obj[key];
 		if (val) {
@@ -155,7 +131,7 @@ function obj2strClass(obj) {
 }
 
 function obj2strStyle(obj) {
-	let style = "";
+	let style = '';
 	for (let key in obj) {
 		const val = obj[key];
 		style += `${key}:${val};`;
@@ -163,35 +139,24 @@ function obj2strStyle(obj) {
 	return style;
 }
 export default {
-	name: "uni-easyinput",
-	emits: [
-		"click",
-		"iconClick",
-		"update:modelValue",
-		"input",
-		"focus",
-		"blur",
-		"confirm",
-		"clear",
-		"eyes",
-		"change",
-	],
+	name: 'uni-easyinput',
+	emits: ['click', 'iconClick', 'update:modelValue', 'input', 'focus', 'blur', 'confirm', 'clear', 'eyes', 'change', 'keyboardheightchange'],
 	model: {
-		prop: "modelValue",
-		event: "update:modelValue",
+		prop: 'modelValue',
+		event: 'update:modelValue'
 	},
 	options: {
-		virtualHost: true,
+		virtualHost: true
 	},
 	inject: {
 		form: {
-			from: "uniForm",
-			default: null,
+			from: 'uniForm',
+			default: null
 		},
 		formItem: {
-			from: "uniFormItem",
-			default: null,
-		},
+			from: 'uniFormItem',
+			default: null
+		}
 	},
 	props: {
 		name: String,
@@ -199,91 +164,97 @@ export default {
 		modelValue: [Number, String],
 		type: {
 			type: String,
-			default: "text",
+			default: 'text'
 		},
 		clearable: {
 			type: Boolean,
-			default: true,
+			default: true
 		},
 		autoHeight: {
 			type: Boolean,
-			default: false,
+			default: false
 		},
 		placeholder: {
 			type: String,
-			default: " ",
+			default: ' '
 		},
 		placeholderStyle: String,
 		focus: {
 			type: Boolean,
-			default: false,
+			default: false
 		},
 		disabled: {
 			type: Boolean,
-			default: false,
+			default: false
 		},
 		maxlength: {
 			type: [Number, String],
-			default: 140,
+			default: 140
 		},
 		confirmType: {
 			type: String,
-			default: "done",
+			default: 'done'
 		},
 		clearSize: {
 			type: [Number, String],
-			default: 24,
+			default: 24
 		},
 		inputBorder: {
 			type: Boolean,
-			default: true,
+			default: true
 		},
 		prefixIcon: {
 			type: String,
-			default: "",
+			default: ''
 		},
 		suffixIcon: {
 			type: String,
-			default: "",
+			default: ''
 		},
 		trim: {
 			type: [Boolean, String],
-			default: true,
+			default: false
+		},
+		cursorSpacing: {
+			type: Number,
+			default: 0
 		},
 		passwordIcon: {
 			type: Boolean,
-			default: true,
+			default: true
 		},
 		primaryColor: {
 			type: String,
-			default: "#2979ff",
+			default: '#2979ff'
 		},
 		styles: {
 			type: Object,
 			default() {
 				return {
-					color: "#333",
-					disableColor: "#F7F6F6",
-					borderColor: "#e5e5e5",
+					color: '#333',
+					backgroundColor: '#fff',
+					disableColor: '#F7F6F6',
+					borderColor: '#e5e5e5'
 				};
-			},
+			}
 		},
 		errorMessage: {
 			type: [String, Boolean],
-			default: "",
-		},
+			default: ''
+		}
 	},
 	data() {
 		return {
 			focused: false,
-			val: "",
-			showMsg: "",
+			val: '',
+			showMsg: '',
 			border: false,
 			isFirstBorder: false,
 			showClearIcon: false,
 			showPassword: false,
 			focusShow: false,
-			localMsg: "",
+			localMsg: '',
+			isEnter: false // 用于判断当前是否是使用回车操作
 		};
 	},
 	computed: {
@@ -312,42 +283,34 @@ export default {
 
 		// 处理外层样式的style
 		boxStyle() {
-			return `color:${
-				this.inputBorder && this.msg ? "#e43d33" : this.styles.color
-			};`;
+			return `color:${this.inputBorder && this.msg ? '#e43d33' : this.styles.color};`;
 		},
 		// input 内容的类和样式处理
 		inputContentClass() {
 			return obj2strClass({
-				"is-input-border": this.inputBorder,
-				"is-input-error-border": this.inputBorder && this.msg,
-				"is-textarea": this.type === "textarea",
-				"is-disabled": this.disabled,
+				'is-input-border': this.inputBorder,
+				'is-input-error-border': this.inputBorder && this.msg,
+				'is-textarea': this.type === 'textarea',
+				'is-disabled': this.disabled,
+				'is-focused': this.focusShow
 			});
 		},
 		inputContentStyle() {
-			const focusColor = this.focusShow
-				? this.primaryColor
-				: this.styles.borderColor;
-			const borderColor = this.inputBorder && this.msg ? "#dd524d" : focusColor;
+			const focusColor = this.focusShow ? this.primaryColor : this.styles.borderColor;
+			const borderColor = this.inputBorder && this.msg ? '#dd524d' : focusColor;
 			return obj2strStyle({
-				"border-color": borderColor || "#e5e5e5",
-				"background-color": this.disabled
-					? this.styles.disableColor
-					: this.styles.backgroundColor,
+				'border-color': borderColor || '#e5e5e5',
+				'background-color': this.disabled ? this.styles.disableColor : this.styles.backgroundColor
 			});
 		},
 		// input右侧样式
 		inputStyle() {
-			const paddingRight =
-				this.type === "password" || this.clearable || this.prefixIcon
-					? ""
-					: "10px";
+			const paddingRight = this.type === 'password' || this.clearable || this.prefixIcon ? '' : '10px';
 			return obj2strStyle({
-				"padding-right": paddingRight,
-				"padding-left": this.prefixIcon ? "" : "10px",
+				'padding-right': paddingRight,
+				'padding-left': this.prefixIcon ? '' : '10px'
 			});
-		},
+		}
 	},
 	watch: {
 		value(newVal) {
@@ -361,13 +324,13 @@ export default {
 				this.focused = this.focus;
 				this.focusShow = this.focus;
 			});
-		},
+		}
 	},
 	created() {
 		this.init();
 		// TODO 处理头条vue3 computed 不监听 inject 更改的问题(formItem.errMsg)
 		if (this.form && this.formItem) {
-			this.$watch("formItem.errMsg", (newVal) => {
+			this.$watch('formItem.errMsg', newVal => {
 				this.localMsg = newVal;
 			});
 		}
@@ -385,7 +348,7 @@ export default {
 		init() {
 			if (this.value || this.value === 0) {
 				this.val = this.value;
-			} else if (this.modelValue || this.modelValue === 0) {
+			} else if (this.modelValue || this.modelValue === 0 || this.modelValue === '') {
 				this.val = this.modelValue;
 			} else {
 				this.val = null;
@@ -397,7 +360,7 @@ export default {
 		 * @param {Object} type
 		 */
 		onClickIcon(type) {
-			this.$emit("iconClick", type);
+			this.$emit('iconClick', type);
 		},
 
 		/**
@@ -405,7 +368,7 @@ export default {
 		 */
 		onEyes() {
 			this.showPassword = !this.showPassword;
-			this.$emit("eyes", this.showPassword);
+			this.$emit('eyes', this.showPassword);
 		},
 
 		/**
@@ -416,19 +379,19 @@ export default {
 			let value = event.detail.value;
 			// 判断是否去除空格
 			if (this.trim) {
-				if (typeof this.trim === "boolean" && this.trim) {
+				if (typeof this.trim === 'boolean' && this.trim) {
 					value = this.trimStr(value);
 				}
-				if (typeof this.trim === "string") {
+				if (typeof this.trim === 'string') {
 					value = this.trimStr(value, this.trim);
 				}
 			}
-			if (this.errMsg) this.errMsg = "";
+			if (this.errMsg) this.errMsg = '';
 			this.val = value;
 			// TODO 兼容 vue2
-			this.$emit("input", value);
+			this.$emit('input', value);
 			// TODO 兼容 vue3
-			this.$emit("update:modelValue", value);
+			this.$emit('update:modelValue', value);
 		},
 
 		/**
@@ -440,12 +403,12 @@ export default {
 			this.$nextTick(() => {
 				this.focused = true;
 			});
-			this.$emit("focus", null);
+			this.$emit('focus', null);
 		},
 
 		_Focus(event) {
 			this.focusShow = true;
-			this.$emit("focus", event);
+			this.$emit('focus', event);
 		},
 
 		/**
@@ -455,18 +418,20 @@ export default {
 		 */
 		onBlur() {
 			this.focused = false;
-			this.$emit("focus", null);
+			this.$emit('focus', null);
 		},
 		_Blur(event) {
 			let value = event.detail.value;
 			this.focusShow = false;
-			this.$emit("blur", event);
+			this.$emit('blur', event);
 			// 根据类型返回值,在event中获取的值理论上讲都是string
-			this.$emit("change", this.val);
+			if (this.isEnter === false) {
+				this.$emit('change', this.val);
+			}
 			// 失去焦点时参与表单校验
 			if (this.form && this.formItem) {
 				const { validateTrigger } = this.form;
-				if (validateTrigger === "blur") {
+				if (validateTrigger === 'blur') {
 					this.formItem.onFieldChange();
 				}
 			}
@@ -477,8 +442,12 @@ export default {
 		 * @param {Object} e
 		 */
 		onConfirm(e) {
-			this.$emit("confirm", this.val);
-			this.$emit("change", this.val);
+			this.$emit('confirm', this.val);
+			this.isEnter = true;
+			this.$emit('change', this.val);
+			this.$nextTick(() => {
+				this.isEnter = false;
+			});
 		},
 
 		/**
@@ -486,38 +455,47 @@ export default {
 		 * @param {Object} event
 		 */
 		onClear(event) {
-			this.val = "";
+			this.val = '';
 			// TODO 兼容 vue2
-			this.$emit("input", "");
+			this.$emit('input', '');
 			// TODO 兼容 vue2
 			// TODO 兼容 vue3
-			this.$emit("update:modelValue", "");
+			this.$emit('update:modelValue', '');
 			// 点击叉号触发
-			this.$emit("clear");
+			this.$emit('clear');
 		},
 
+    /**
+     * 键盘高度发生变化的时候触发此事件
+     * 兼容性:微信小程序2.7.0+、App 3.1.0+
+     * @param {Object} event
+     */
+    onkeyboardheightchange(event) {
+      this.$emit("keyboardheightchange",event);
+    },
+
 		/**
 		 * 去除空格
 		 */
-		trimStr(str, pos = "both") {
-			if (pos === "both") {
+		trimStr(str, pos = 'both') {
+			if (pos === 'both') {
 				return str.trim();
-			} else if (pos === "left") {
+			} else if (pos === 'left') {
 				return str.trimLeft();
-			} else if (pos === "right") {
+			} else if (pos === 'right') {
 				return str.trimRight();
-			} else if (pos === "start") {
+			} else if (pos === 'start') {
 				return str.trimStart();
-			} else if (pos === "end") {
+			} else if (pos === 'end') {
 				return str.trimEnd();
-			} else if (pos === "all") {
-				return str.replace(/\s+/g, "");
-			} else if (pos === "none") {
+			} else if (pos === 'all') {
+				return str.replace(/\s+/g, '');
+			} else if (pos === 'none') {
 				return str;
 			}
 			return str;
-		},
-	},
+		}
+	}
 };
 </script>
 

+ 1 - 1
uni_modules/uni-easyinput/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-easyinput",
   "displayName": "uni-easyinput 增强输入框",
-  "version": "1.1.3",
+  "version": "1.1.9",
   "description": "Easyinput 组件是对原生input组件的增强",
   "keywords": [
     "uni-ui",

+ 2 - 0
uni_modules/uni-fab/changelog.md

@@ -1,3 +1,5 @@
+## 1.2.5(2023-03-29)
+- 新增 pattern.icon 属性,可自定义图标
 ## 1.2.4(2022-09-07)
 小程序端由于 style 使用了对象导致报错,[详情](https://ask.dcloud.net.cn/question/152790?item_id=211778&rf=false)
 ## 1.2.3(2022-09-05)

+ 3 - 2
uni_modules/uni-fab/components/uni-fab/uni-fab.vue

@@ -35,7 +35,7 @@
 		  'uni-fab__circle--rightTop': rightTop,
 		  'uni-fab__content--other-platform': !isAndroidNvue
 		}" class="uni-fab__circle uni-fab__plus" :style="{ 'background-color': styles.buttonColor, 'bottom': nvueBottom }" @click="_onClick">
-			<uni-icons class="fab-circle-icon" type="plusempty" :color="styles.iconColor" size="32"
+			<uni-icons class="fab-circle-icon" :type="styles.icon" :color="styles.iconColor" size="32"
 				:class="{'uni-fab__plus--active': isShow && content.length > 0}"></uni-icons>
 			<!-- <view class="fab-circle-v"  :class="{'uni-fab__plus--active': isShow && content.length > 0}"></view>
 			<view class="fab-circle-h" :class="{'uni-fab__plus--active': isShow  && content.length > 0}"></view> -->
@@ -115,7 +115,8 @@
 					selectedColor: '#007AFF',
 					backgroundColor: '#fff',
 					buttonColor: '#007AFF',
-					iconColor: '#fff'
+					iconColor: '#fff',
+					icon: 'plusempty'
 				}
 			}
 		},

+ 1 - 1
uni_modules/uni-fab/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-fab",
   "displayName": "uni-fab 悬浮按钮",
-  "version": "1.2.4",
+  "version": "1.2.5",
   "description": "悬浮按钮 fab button ,点击可展开一个图标按钮菜单。",
   "keywords": [
     "uni-ui",

+ 4 - 0
uni_modules/uni-file-picker/changelog.md

@@ -1,3 +1,7 @@
+## 1.0.4(2023-03-29)
+- 修复 手动上传删除一个文件后不能再上传的bug
+## 1.0.3(2022-12-19)
+- 新增 sourceType 属性, 可以自定义图片和视频选择的来源
 ## 1.0.2(2022-07-04)
 - 修复 在uni-forms下样式不生效的bug
 ## 1.0.1(2021-11-23)

+ 2 - 2
uni_modules/uni-file-picker/components/uni-file-picker/choose-and-upload-file.js

@@ -7,7 +7,7 @@ function chooseImage(opts) {
 	const {
 		count,
 		sizeType = ['original', 'compressed'],
-		sourceType = ['album', 'camera'],
+		sourceType,
 		extension
 	} = opts
 	return new Promise((resolve, reject) => {
@@ -33,7 +33,7 @@ function chooseVideo(opts) {
 		camera,
 		compressed,
 		maxDuration,
-		sourceType = ['album', 'camera'],
+		sourceType,
 		extension
 	} = opts;
 	return new Promise((resolve, reject) => {

+ 12 - 1
uni_modules/uni-file-picker/components/uni-file-picker/uni-file-picker.vue

@@ -185,6 +185,12 @@
 				default () {
 					return ['original', 'compressed']
 				}
+			},
+			sourceType: {
+				type: Array,
+				default () {
+					return  ['album', 'camera']
+				}
 			}
 		},
 		data() {
@@ -349,6 +355,7 @@
 						type: this.fileMediatype,
 						compressed: false,
 						sizeType: this.sizeType,
+						sourceType: this.sourceType,
 						// TODO 如果为空,video 有问题
 						extension: _extname.length > 0 ? _extname : undefined,
 						count: this.limitLength - this.files.length, //默认9
@@ -576,7 +583,11 @@
 						path: v.path,
 						size: v.size,
 						fileID:v.fileID,
-						url: v.url
+						url: v.url,
+						// 修改删除一个文件后不能再上传的bug, #694
+            uuid: v.uuid,
+            status: v.status,
+            cloudPath: v.cloudPath
 					})
 				})
 				return newFilesData

+ 4 - 7
uni_modules/uni-file-picker/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-file-picker",
   "displayName": "uni-file-picker 文件选择上传",
-  "version": "1.0.2",
+  "version": "1.0.4",
   "description": "文件选择上传组件,可以选择图片、视频等任意文件并上传到当前绑定的服务空间",
   "keywords": [
     "uni-ui",
@@ -16,11 +16,7 @@
   "directories": {
     "example": "../../temps/example_temps"
   },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
+"dcloudext": {
     "sale": {
       "regular": {
         "price": "0.00"
@@ -37,7 +33,8 @@
       "data": "无",
       "permissions": "无"
     },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
   },
   "uni_modules": {
     "dependencies": ["uni-scss"],

+ 2 - 0
uni_modules/uni-forms/changelog.md

@@ -1,3 +1,5 @@
+## 1.4.9(2023-02-10)
+- 修复 required 参数无法动态绑定
 ## 1.4.8(2022-08-23)
 - 优化 根据 rules 自动添加 required 的问题
 ## 1.4.7(2022-08-22)

+ 2 - 6
uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue

@@ -2,9 +2,9 @@
 	<view class="uni-forms-item"
 		:class="['is-direction-' + localLabelPos ,border?'uni-forms-item--border':'' ,border && isFirstBorder?'is-first-border':'']">
 		<slot name="label">
-			<view class="uni-forms-item__label" :class="{'no-label':!label && !isRequired}"
+			<view class="uni-forms-item__label" :class="{'no-label':!label && !required}"
 				:style="{width:localLabelWidth,justifyContent: localLabelAlign}">
-				<text v-if="isRequired" class="is-required">*</text>
+				<text v-if="required" class="is-required">*</text>
 				<text>{{label}}</text>
 			</view>
 		</slot>
@@ -126,7 +126,6 @@
 		data() {
 			return {
 				errMsg: '',
-				isRequired: false,
 				userRules: null,
 				localLabelAlign: 'left',
 				localLabelWidth: '65px',
@@ -315,7 +314,6 @@
 				this.localLabelWidth = this._labelWidthUnit(labelWidth)
 				// 标签位置
 				this.localLabelPos = this._labelPosition()
-				this.isRequired = this.required
 				// 将需要校验的子组件加入form 队列
 				this.form && type && childrens.push(this)
 
@@ -351,8 +349,6 @@
 				this.validator = validator
 				// 默认值赋予
 				this.itemSetValue(_getDataValue(this.name, localData))
-				this.isRequired = this._isRequired()
-
 			},
 			unInit() {
 				if (this.form) {

+ 1 - 1
uni_modules/uni-forms/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-forms",
   "displayName": "uni-forms 表单",
-  "version": "1.4.8",
+  "version": "1.4.9",
   "description": "由输入框、选择器、单选框、多选框等控件组成,用以收集、校验、提交数据",
   "keywords": [
     "uni-ui",

+ 1 - 1
uni_modules/uni-grid/components/uni-grid-item/uni-grid-item.vue

@@ -68,7 +68,7 @@
 	}
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped>
 	.uni-grid-item {
 		/* #ifndef APP-NVUE */
 		height: 100%;

+ 1 - 1
uni_modules/uni-grid/components/uni-grid/uni-grid.vue

@@ -106,7 +106,7 @@
 	}
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped>
 	.uni-grid-wrap {
 		/* #ifndef APP-NVUE */
 		display: flex;

+ 1 - 1
uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list-item.vue

@@ -53,7 +53,7 @@
 	}
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped>
 	.uni-indexed-list__list {
 		background-color: $uni-bg-color;
 		/* #ifndef APP-NVUE */

+ 2 - 2
uni_modules/uni-indexed-list/components/uni-indexed-list/uni-indexed-list.vue

@@ -140,7 +140,7 @@
 			setList() {
 				let index = 0;
 				this.lists = []
-				this.options.forEach((value) => {
+				this.options.forEach((value, index) => {
 					if (value.data.length === 0) {
 						return
 					}
@@ -282,7 +282,7 @@
 		}
 	}
 </script>
-<style lang="scss" >
+<style lang="scss" scoped>
 	.uni-indexed-list {
 		position: absolute;
 		left: 0;

+ 26 - 0
uni_modules/uni-list/changelog.md

@@ -1,3 +1,29 @@
+## 1.2.14(2023-04-14)
+- 优化 uni-list-chat 具名插槽`header` 非app端套一层元素,方便使用时通过外层元素定位实现样式修改
+## 1.2.13(2023-03-03)
+- uni-list-chat 新增 支持具名插槽`header`
+## 1.2.12(2023-02-01)
+- 新增 列表图标新增 customPrefix 属性 ,用法 [详见](https://uniapp.dcloud.net.cn/component/uniui/uni-icons.html#icons-props)
+## 1.2.11(2023-01-31)
+- 修复 无反馈效果呈现的bug
+## 1.2.9(2022-11-22)
+- 修复 uni-list-chat 在vue3下跳转报错的bug
+## 1.2.8(2022-11-21)
+- 修复 uni-list-chat avatar属性 值为本地路径时错误的问题
+## 1.2.7(2022-11-21)
+- 修复 uni-list-chat avatar属性 在腾讯云版uniCloud下错误的问题
+## 1.2.6(2022-11-18)
+- 修复 uni-list-chat note属性 支持:“草稿”字样功能 文本少1位的问题
+## 1.2.5(2022-11-15)
+- 修复 uni-list-item 的 customStyle 属性 padding值在 H5端 无效的bug
+## 1.2.4(2022-11-15)
+- 修复 uni-list-item 的 customStyle 属性 padding值在nvue(vue2)下无效的bug
+## 1.2.3(2022-11-14)
+- uni-list-chat 新增 avatar 支持 fileId
+## 1.2.2(2022-11-11)
+- uni-list 新增属性 render-reverse 详情参考:[https://uniapp.dcloud.net.cn/component/list.html](https://uniapp.dcloud.net.cn/component/list.html)
+- uni-list-chat note属性 支持:“草稿”字样 加红显示 详情参考uni-im:[https://ext.dcloud.net.cn/plugin?name=uni-im](https://ext.dcloud.net.cn/plugin?name=uni-im)
+- uni-list-item 新增属性 customStyle 支持设置padding、backgroundColor
 ## 1.2.1(2022-03-30)
 - 删除无用文件
 ## 1.2.0(2021-11-23)

+ 62 - 7
uni_modules/uni-list/components/uni-list-chat/uni-list-chat.vue

@@ -7,7 +7,7 @@
 			<view class="uni-list-chat__container">
 				<view class="uni-list-chat__header-warp">
 					<view v-if="avatarCircle || avatarList.length === 0" class="uni-list-chat__header" :class="{ 'header--circle': avatarCircle }">
-						<image class="uni-list-chat__header-image" :class="{ 'header--circle': avatarCircle }" :src="avatar" mode="aspectFill"></image>
+						<image class="uni-list-chat__header-image" :class="{ 'header--circle': avatarCircle }" :src="avatarUrl" mode="aspectFill"></image>
 					</view>
 					<!-- 头像组 -->
 					<view v-else class="uni-list-chat__header">
@@ -18,13 +18,23 @@
 						</view>
 					</view>
 				</view>
+				<!-- #ifndef APP -->
+				<view class="slot-header">
+				<!-- #endif -->
+					<slot name="header"></slot>
+				<!-- #ifndef APP -->
+				</view>
+				<!-- #endif -->
 				<view v-if="badgeText && badgePositon === 'left'" class="uni-list-chat__badge uni-list-chat__badge-pos" :class="[isSingle]">
 					<text class="uni-list-chat__badge-text">{{ badgeText === 'dot' ? '' : badgeText }}</text>
 				</view>
 				<view class="uni-list-chat__content">
 					<view class="uni-list-chat__content-main">
 						<text class="uni-list-chat__content-title uni-ellipsis">{{ title }}</text>
-						<text class="uni-list-chat__content-note uni-ellipsis">{{ note }}</text>
+						<view style="flex-direction: row;">
+							<text class="draft" v-if="isDraft">[草稿]</text>
+							<text class="uni-list-chat__content-note uni-ellipsis">{{isDraft?note.slice(14):note}}</text>
+						</view>
 					</view>
 					<view class="uni-list-chat__content-extra">
 						<slot>
@@ -121,6 +131,9 @@
 		},
 		// inject: ['list'],
 		computed: {
+			isDraft(){
+				return this.note.slice(0,14) == '[uni-im-draft]'
+			},
 			isSingle() {
 				if (this.badgeText === 'dot') {
 					return 'uni-badge--dot';
@@ -146,12 +159,32 @@
 				}
 			}
 		},
+		watch: {
+			avatar:{
+				handler(avatar) {
+					if(avatar.substr(0,8) == 'cloud://'){
+						uniCloud.getTempFileURL({
+							fileList: [avatar]
+						}).then(res=>{
+							// console.log(res);
+							// 兼容uniCloud私有化部署
+							let fileList = res.fileList || res.result.fileList
+							this.avatarUrl = fileList[0].tempFileURL
+						})
+					}else{
+						this.avatarUrl = avatar
+					}
+				},
+				immediate: true
+			}
+		},
 		data() {
 			return {
 				isFirstChild: false,
 				border: true,
 				// avatarList: 3,
-				imageWidth: 50
+				imageWidth: 50,
+				avatarUrl:''
 			};
 		},
 		mounted() {
@@ -198,7 +231,7 @@
 				}
 			},
 			pageApi(api) {
-				uni[api]({
+				let callback = {
 					url: this.to,
 					success: res => {
 						this.$emit('click', {
@@ -209,9 +242,24 @@
 						this.$emit('click', {
 							data: err
 						});
-						console.error(err.errMsg);
 					}
-				});
+				}
+				switch (api) {
+					case 'navigateTo':
+						uni.navigateTo(callback)
+						break
+					case 'redirectTo':
+						uni.redirectTo(callback)
+						break
+					case 'reLaunch':
+						uni.reLaunch(callback)
+						break
+					case 'switchTab':
+						uni.switchTab(callback)
+						break
+					default:
+					uni.navigateTo(callback)
+				}
 			}
 		}
 	};
@@ -445,13 +493,20 @@
 		overflow: hidden;
 	}
 
-	.uni-list-chat__content-note {
+	.draft ,.uni-list-chat__content-note {
 		margin-top: 3px;
 		color: $note-color;
 		font-size: $note-size;
 		font-weight: $title-weight;
 		overflow: hidden;
 	}
+	.draft{
+		color: #eb3a41;
+		/* #ifndef APP-NVUE */
+		flex-shrink: 0;
+		/* #endif */
+		padding-right: 3px;
+	}
 
 	.uni-list-chat__content-extra {
 		/* #ifndef APP-NVUE */

+ 94 - 14
uni_modules/uni-list/components/uni-list-item/uni-list-item.vue

@@ -1,21 +1,21 @@
 <template>
 	<!-- #ifdef APP-NVUE -->
-	<cell>
+	<cell :keep-scroll-position="keepScrollPosition">
 		<!-- #endif -->
-
-		<view :class="{ 'uni-list-item--disabled': disabled }"
+		<view :class="{ 'uni-list-item--disabled': disabled }" :style="{'background-color':customStyle.backgroundColor}"
 			:hover-class="(!clickable && !link) || disabled || showSwitch ? '' : 'uni-list-item--hover'"
 			class="uni-list-item" @click="onClick">
 			<view v-if="!isFirstChild" class="border--left" :class="{ 'uni-list--border': border }"></view>
 			<view class="uni-list-item__container"
-				:class="{ 'container--right': showArrow || link, 'flex--direction': direction === 'column' }">
+				:class="{ 'container--right': showArrow || link, 'flex--direction': direction === 'column'}"
+				:style="{paddingTop:padding.top,paddingLeft:padding.left,paddingRight:padding.right,paddingBottom:padding.bottom}">
 				<slot name="header">
 					<view class="uni-list-item__header">
 						<view v-if="thumb" class="uni-list-item__icon">
 							<image :src="thumb" class="uni-list-item__icon-img" :class="['uni-list--' + thumbSize]" />
 						</view>
 						<view v-else-if="showExtraIcon" class="uni-list-item__icon">
-							<uni-icons :color="extraIcon.color" :size="extraIcon.size" :type="extraIcon.type" />
+							<uni-icons :customPrefix="extraIcon.customPrefix" :color="extraIcon.color" :size="extraIcon.size" :type="extraIcon.type" />
 						</view>
 					</view>
 				</slot>
@@ -96,7 +96,7 @@
 				default: ''
 			},
 			ellipsis: {
-				type: [Number,String],
+				type: [Number, String],
 				default: 0
 			},
 			disabled: {
@@ -139,7 +139,7 @@
 				type: String,
 				default: 'success'
 			},
-			badgeStyle:{
+			badgeStyle: {
 				type: Object,
 				default () {
 					return {}
@@ -167,19 +167,75 @@
 					return {
 						type: '',
 						color: '#000000',
-						size: 20
+						size: 20,
+						customPrefix: ''
 					};
 				}
 			},
 			border: {
 				type: Boolean,
 				default: true
+			},
+			customStyle: {
+				type: Object,
+				default () {
+					return {
+						padding: '',
+						backgroundColor: '#FFFFFF'
+					}
+				}
+			},
+			keepScrollPosition: {
+				type: Boolean,
+				default: false
+			}
+		},
+		watch: {
+			'customStyle.padding': {
+				handler(padding) {
+					if(typeof padding == 'number'){
+						padding += ''
+					}
+					let paddingArr = padding.split(' ')
+					if (paddingArr.length === 1) {
+						const allPadding = paddingArr[0]
+						this.padding = {
+							"top": allPadding,
+							"right": allPadding,
+							"bottom": allPadding,
+							"left": allPadding
+						}
+					} else if (paddingArr.length === 2) {
+						const [verticalPadding, horizontalPadding] = paddingArr;
+						this.padding = {
+							"top": verticalPadding,
+							"right": horizontalPadding,
+							"bottom": verticalPadding,
+							"left": horizontalPadding
+						}
+					} else if (paddingArr.length === 4) {
+							const [topPadding, rightPadding, bottomPadding, leftPadding] = paddingArr;
+							this.padding = {
+								"top": topPadding,
+								"right": rightPadding,
+								"bottom": bottomPadding,
+								"left": leftPadding
+							}
+					}
+				},
+				immediate: true
 			}
 		},
 		// inject: ['list'],
 		data() {
 			return {
-				isFirstChild: false
+				isFirstChild: false,
+				padding: {
+					top: "",
+					right: "",
+					bottom: "",
+					left: ""
+				}
 			};
 		},
 		mounted() {
@@ -255,7 +311,7 @@
 						uni.switchTab(callback)
 						break
 					default:
-					uni.navigateTo(callback)
+						uni.navigateTo(callback)
 				}
 			}
 		}
@@ -275,6 +331,7 @@
 	$uni-bg-color-hover:#f1f1f1;
 	$uni-text-color-grey:#999;
 	$list-item-pd: $uni-spacing-col-lg $uni-spacing-row-lg;
+
 	.uni-list-item {
 		/* #ifndef APP-NVUE */
 		display: flex;
@@ -289,12 +346,15 @@
 		cursor: pointer;
 		/* #endif */
 	}
+
 	.uni-list-item--disabled {
 		opacity: 0.3;
 	}
+
 	.uni-list-item--hover {
-		background-color: $uni-bg-color-hover;
+		background-color: $uni-bg-color-hover !important;
 	}
+
 	.uni-list-item__container {
 		position: relative;
 		/* #ifndef APP-NVUE */
@@ -307,9 +367,11 @@
 		overflow: hidden;
 		// align-items: center;
 	}
+
 	.container--right {
 		padding-right: 0;
 	}
+
 	// .border--left {
 	// 	margin-left: $uni-spacing-row-lg;
 	// }
@@ -324,6 +386,7 @@
 		border-top-width: 0.5px;
 		/* #endif */
 	}
+
 	/* #ifndef APP-NVUE */
 	.uni-list--border:after {
 		position: absolute;
@@ -336,6 +399,7 @@
 		transform: scaleY(0.5);
 		background-color: $uni-border-color;
 	}
+
 	/* #endif */
 	.uni-list-item__content {
 		/* #ifndef APP-NVUE */
@@ -349,20 +413,24 @@
 		justify-content: space-between;
 		overflow: hidden;
 	}
+
 	.uni-list-item__content--center {
 		justify-content: center;
 	}
+
 	.uni-list-item__content-title {
 		font-size: $uni-font-size-base;
 		color: #3b4144;
 		overflow: hidden;
 	}
+
 	.uni-list-item__content-note {
 		margin-top: 6rpx;
 		color: $uni-text-color-grey;
 		font-size: $uni-font-size-sm;
 		overflow: hidden;
 	}
+
 	.uni-list-item__extra {
 		// width: 25%;
 		/* #ifndef APP-NVUE */
@@ -372,6 +440,7 @@
 		justify-content: flex-end;
 		align-items: center;
 	}
+
 	.uni-list-item__header {
 		/* #ifndef APP-NVUE */
 		display: flex;
@@ -379,12 +448,14 @@
 		flex-direction: row;
 		align-items: center;
 	}
+
 	.uni-list-item__icon {
 		margin-right: 18rpx;
 		flex-direction: row;
 		justify-content: center;
 		align-items: center;
 	}
+
 	.uni-list-item__icon-img {
 		/* #ifndef APP-NVUE */
 		display: block;
@@ -393,6 +464,7 @@
 		width: $uni-img-size-base;
 		margin-right: 10px;
 	}
+
 	.uni-icon-wrapper {
 		/* #ifndef APP-NVUE */
 		display: flex;
@@ -400,33 +472,40 @@
 		align-items: center;
 		padding: 0 10px;
 	}
+
 	.flex--direction {
 		flex-direction: column;
 		/* #ifndef APP-NVUE */
 		align-items: initial;
 		/* #endif */
 	}
+
 	.flex--justify {
 		/* #ifndef APP-NVUE */
 		justify-content: initial;
 		/* #endif */
 	}
+
 	.uni-list--lg {
 		height: $uni-img-size-lg;
 		width: $uni-img-size-lg;
 	}
+
 	.uni-list--base {
 		height: $uni-img-size-base;
 		width: $uni-img-size-base;
 	}
+
 	.uni-list--sm {
 		height: $uni-img-size-sm;
 		width: $uni-img-size-sm;
 	}
+
 	.uni-list-item__extra-text {
 		color: $uni-text-color-grey;
 		font-size: $uni-font-size-sm;
 	}
+
 	.uni-ellipsis-1 {
 		/* #ifndef APP-NVUE */
 		overflow: hidden;
@@ -435,9 +514,10 @@
 		/* #endif */
 		/* #ifdef APP-NVUE */
 		lines: 1;
-		text-overflow:ellipsis;
+		text-overflow: ellipsis;
 		/* #endif */
 	}
+
 	.uni-ellipsis-2 {
 		/* #ifndef APP-NVUE */
 		overflow: hidden;
@@ -448,7 +528,7 @@
 		/* #endif */
 		/* #ifdef APP-NVUE */
 		lines: 2;
-		text-overflow:ellipsis;
+		text-overflow: ellipsis;
 		/* #endif */
 	}
-</style>
+</style>

+ 100 - 85
uni_modules/uni-list/components/uni-list/uni-list.vue

@@ -7,102 +7,117 @@
 	</view>
 	<!-- #endif -->
 	<!-- #ifdef APP-NVUE -->
-	<list class="uni-list" :class="{ 'uni-list--border': border }" :enableBackToTop="enableBackToTop" loadmoreoffset="15"><slot /></list>
+	<list :bounce="false" :scrollable="true" show-scrollbar :render-reverse="renderReverse" @scroll="scroll" class="uni-list" :class="{ 'uni-list--border': border }" :enableBackToTop="enableBackToTop"
+		loadmoreoffset="15">
+		<slot />
+	</list>
 	<!-- #endif -->
 </template>
 
 <script>
-/**
- * List 列表
- * @description 列表组件
- * @tutorial https://ext.dcloud.net.cn/plugin?id=24
- * @property {String} 	border = [true|false] 		标题
- */
-export default {
-	name: 'uniList',
-	'mp-weixin': {
-		options: {
-			multipleSlots: false
-		}
-	},
-	props: {
-		enableBackToTop: {
-			type: [Boolean, String],
-			default: false
+	/**
+	 * List 列表
+	 * @description 列表组件
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=24
+	 * @property {String} 	border = [true|false] 		标题
+	 */
+	export default {
+		name: 'uniList',
+		'mp-weixin': {
+			options: {
+				multipleSlots: false
+			}
 		},
-		scrollY: {
-			type: [Boolean, String],
-			default: false
+		props: {
+			stackFromEnd:{
+				type: Boolean,
+				default:false
+			},
+			enableBackToTop: {
+				type: [Boolean, String],
+				default: false
+			},
+			scrollY: {
+				type: [Boolean, String],
+				default: false
+			},
+			border: {
+				type: Boolean,
+				default: true
+			},
+			renderReverse:{
+				type: Boolean,
+				default: false
+			}
 		},
-		border: {
-			type: Boolean,
-			default: true
-		}
-	},
-	// provide() {
-	// 	return {
-	// 		list: this
-	// 	};
-	// },
-	created() {
-		this.firstChildAppend = false;
-	},
-	methods: {
-		loadMore(e) {
-			this.$emit('scrolltolower');
+		// provide() {
+		// 	return {
+		// 		list: this
+		// 	};
+		// },
+		created() {
+			this.firstChildAppend = false;
+		},
+		methods: {
+			loadMore(e) {
+				this.$emit('scrolltolower');
+			},
+			scroll(e) {
+				this.$emit('scroll', e);
+			}
 		}
-	}
-};
+	};
 </script>
-<style lang="scss" >
-$uni-bg-color:#ffffff;
-$uni-border-color:#e5e5e5;
-.uni-list {
-	/* #ifndef APP-NVUE */
-	display: flex;
-	/* #endif */
-	background-color: $uni-bg-color;
-	position: relative;
-	flex-direction: column;
-}
+<style lang="scss">
+	$uni-bg-color:#ffffff;
+	$uni-border-color:#e5e5e5;
 
-.uni-list--border {
-	position: relative;
-	/* #ifdef APP-NVUE */
-	border-top-color: $uni-border-color;
-	border-top-style: solid;
-	border-top-width: 0.5px;
-	border-bottom-color: $uni-border-color;
-	border-bottom-style: solid;
-	border-bottom-width: 0.5px;
-	/* #endif */
-	z-index: -1;
-}
+	.uni-list {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		background-color: $uni-bg-color;
+		position: relative;
+		flex-direction: column;
+	}
 
-/* #ifndef APP-NVUE */
+	.uni-list--border {
+		position: relative;
+		/* #ifdef APP-NVUE */
+		border-top-color: $uni-border-color;
+		border-top-style: solid;
+		border-top-width: 0.5px;
+		border-bottom-color: $uni-border-color;
+		border-bottom-style: solid;
+		border-bottom-width: 0.5px;
+		/* #endif */
+		z-index: -1;
+	}
 
-.uni-list--border-top {
-	position: absolute;
-	top: 0;
-	right: 0;
-	left: 0;
-	height: 1px;
-	-webkit-transform: scaleY(0.5);
-	transform: scaleY(0.5);
-	background-color: $uni-border-color;
-	z-index: 1;
-}
+	/* #ifndef APP-NVUE */
 
-.uni-list--border-bottom {
-	position: absolute;
-	bottom: 0;
-	right: 0;
-	left: 0;
-	height: 1px;
-	-webkit-transform: scaleY(0.5);
-	transform: scaleY(0.5);
-	background-color: $uni-border-color;
-}
+	.uni-list--border-top {
+		position: absolute;
+		top: 0;
+		right: 0;
+		left: 0;
+		height: 1px;
+		-webkit-transform: scaleY(0.5);
+		transform: scaleY(0.5);
+		background-color: $uni-border-color;
+		z-index: 1;
+	}
 
-/* #endif */
+	.uni-list--border-bottom {
+		position: absolute;
+		bottom: 0;
+		right: 0;
+		left: 0;
+		height: 1px;
+		-webkit-transform: scaleY(0.5);
+		transform: scaleY(0.5);
+		background-color: $uni-border-color;
+	}
+
+	/* #endif */
 </style>

+ 4 - 7
uni_modules/uni-list/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-list",
   "displayName": "uni-list 列表",
-  "version": "1.2.1",
+  "version": "1.2.14",
   "description": "List 组件 ,帮助使用者快速构建列表。",
   "keywords": [
     "",
@@ -18,11 +18,7 @@
   "directories": {
     "example": "../../temps/example_temps"
   },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
+"dcloudext": {
     "sale": {
       "regular": {
         "price": "0.00"
@@ -39,7 +35,8 @@
       "data": "无",
       "permissions": "无"
     },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
   },
   "uni_modules": {
     "dependencies": [

+ 4 - 0
uni_modules/uni-nav-bar/changelog.md

@@ -1,3 +1,7 @@
+## 1.3.11(2023-03-29)
+- 修复 自定义状态栏高度闪动BUG
+## 1.3.10(2023-03-29)
+- 修复 暗黑模式下边线颜色错误的bug
 ## 1.3.9(2022-10-13)
 - 修复 条件编译错误的bug
 ## 1.3.8(2022-10-12)

+ 1 - 1
uni_modules/uni-nav-bar/components/uni-nav-bar/uni-nav-bar.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="uni-navbar" :class="{'uni-dark':dark, 'uni-nvue-fixed': fixed}">
 		<view class="uni-navbar__content" :class="{ 'uni-navbar--fixed': fixed, 'uni-navbar--shadow': shadow, 'uni-navbar--border': border }"
-			:style="{ 'background-color': themeBgColor }" >
+			:style="{ 'background-color': themeBgColor, 'border-bottom-color':themeColor }" >
 			<status-bar v-if="statusBar" />
 			<view :style="{ color: themeColor,backgroundColor: themeBgColor ,height:navbarHeight}"
 				class="uni-navbar__header">

+ 1 - 4
uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar.vue

@@ -9,11 +9,8 @@
 		name: 'UniStatusBar',
 		data() {
 			return {
-				statusBarHeight: 20
+				statusBarHeight: uni.getSystemInfoSync().statusBarHeight + 'px'
 			}
-		},
-		mounted() {
-			this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight + 'px'
 		}
 	}
 </script>

+ 1 - 1
uni_modules/uni-nav-bar/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-nav-bar",
   "displayName": "uni-nav-bar 自定义导航栏",
-  "version": "1.3.9",
+  "version": "1.3.11",
   "description": "自定义导航栏组件,主要用于头部导航。",
   "keywords": [
     "uni-ui",

+ 4 - 0
uni_modules/uni-number-box/changelog.md

@@ -1,3 +1,7 @@
+## 1.2.3(2023-05-23)
+更新示例工程
+## 1.2.2(2023-05-08)
+- 修复 change 事件执行顺序错误的问题
 ## 1.2.1(2021-11-22)
 - 修复 vue3中某些scss变量无法找到的问题
 ## 1.2.0(2021-11-19)

+ 2 - 2
uni_modules/uni-number-box/components/uni-number-box/uni-number-box.vue

@@ -114,11 +114,11 @@
 				}
 
 				this.inputValue = (value / scale).toFixed(String(scale).length - 1);
-				this.$emit("change", +this.inputValue);
 				// TODO vue2 兼容
 				this.$emit("input", +this.inputValue);
 				// TODO vue3 兼容
 				this.$emit("update:modelValue", +this.inputValue);
+				this.$emit("change", +this.inputValue);
 			},
 			_getDecimalScale() {
 
@@ -144,9 +144,9 @@
 				}
 				const scale = this._getDecimalScale();
 				this.inputValue = value.toFixed(String(scale).length - 1);
-				this.$emit("change", +this.inputValue);
 				this.$emit("input", +this.inputValue);
 				this.$emit("update:modelValue", +this.inputValue);
+				this.$emit("change", +this.inputValue);
 			},
 			_onFocus(event) {
 				this.$emit('focus', event)

+ 4 - 7
uni_modules/uni-number-box/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-number-box",
   "displayName": "uni-number-box 数字输入框",
-  "version": "1.2.1",
+  "version": "1.2.3",
   "description": "NumberBox 带加减按钮的数字输入框组件,用户可以控制每次点击增加的数值,支持小数。",
   "keywords": [
     "uni-ui",
@@ -15,11 +15,7 @@
   "directories": {
     "example": "../../temps/example_temps"
   },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
+"dcloudext": {
     "sale": {
       "regular": {
         "price": "0.00"
@@ -36,7 +32,8 @@
       "data": "无",
       "permissions": "无"
     },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
   },
   "uni_modules": {
     "dependencies": ["uni-scss"],

+ 8 - 0
uni_modules/uni-popup/changelog.md

@@ -1,3 +1,11 @@
+## 1.8.3(2023-04-17)
+- 修复 uni-popup 重复打开时的 bug
+## 1.8.2(2023-02-02)
+- uni-popup-dialog 组件新增 inputType 属性
+## 1.8.1(2022-12-01)
+- 修复 nvue 下 v-show 报错
+## 1.8.0(2022-11-29)
+- 优化 主题样式
 ## 1.7.9(2022-04-02)
 - 修复 弹出层内部无法滚动的bug
 ## 1.7.8(2022-03-28)

+ 5 - 1
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -10,7 +10,7 @@
 		</view>
 		<view v-else class="uni-dialog-content">
 			<slot>
-				<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" >
+				<input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" >
 			</slot>
 		</view>
 		<view class="uni-dialog-button-group">
@@ -57,6 +57,10 @@
 		mixins: [popup],
 		emits:['confirm','close'],
 		props: {
+			inputType:{
+				type: String,
+				default: 'text'
+			},
 			value: {
 				type: [String, Number],
 				default: ''

+ 3 - 9
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -1,10 +1,10 @@
 <template>
-	<view v-if="showPopup||onceRender" v-show="showPopup"  class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
+	<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
 		<view @touchstart="touchstart">
 			<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
 				:duration="duration" :show="showTrans" @click="onTap" />
 			<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
-				:show="showTrans" @click="onTap" :once-render="onceRender">
+				:show="showTrans" @click="onTap">
 				<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
 					<slot />
 				</view>
@@ -86,11 +86,6 @@
 				type: String,
 				default: 'rgba(0, 0, 0, 0.4)'
 			},
-			// 指定使用v-show指令,不重新渲染Pop组件
-			onceRender:{
-				type:Boolean,
-				default:false
-			},
 		},
 
 		watch: {
@@ -274,8 +269,7 @@
 			open(direction) {
 				// fix by mehaotian 处理快速打开关闭的情况
 				if (this.showPopup) {
-					clearTimeout(this.timer)
-					this.showPopup = false
+					return
 				}
 				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
 				if (!(direction && innerType.indexOf(direction) !== -1)) {

+ 5 - 8
uni_modules/uni-popup/package.json

@@ -1,7 +1,7 @@
 {
 	"id": "uni-popup",
 	"displayName": "uni-popup 弹出层",
-	"version": "1.7.9",
+	"version": "1.8.3",
 	"description": " Popup 组件,提供常用的弹层",
 	"keywords": [
         "uni-ui",
@@ -17,12 +17,8 @@
 	"directories": {
 		"example": "../../temps/example_temps"
 	},
-	"dcloudext": {
-		"category": [
-			"前端组件",
-			"通用组件"
-		],
-		"sale": {
+    "dcloudext": {
+        "sale": {
 			"regular": {
 				"price": "0.00"
 			},
@@ -38,7 +34,8 @@
 			"data": "无",
 			"permissions": "无"
 		},
-		"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+        "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+        "type": "component-vue"
 	},
 	"uni_modules": {
 		"dependencies": [

+ 1 - 1
uni_modules/uni-row/components/uni-col/uni-col.vue

@@ -212,7 +212,7 @@
 	}
 </script>
 
-<style lang='scss' >
+<style lang='scss' scoped>
 	/* breakpoints */
 	$--sm: 768px !default;
 	$--md: 992px !default;

+ 1 - 1
uni_modules/uni-row/components/uni-row/uni-row.vue

@@ -180,7 +180,7 @@
 	}
 
 	// 字节、QQ配置后不生效
-	// 此处用法无法使用
+	// 此处用法无法使用scoped
 	/* #ifdef MP-WEIXIN || MP-TOUTIAO || MP-QQ */
 	:host {
 		display: block;

+ 2 - 0
uni_modules/uni-search-bar/changelog.md

@@ -1,3 +1,5 @@
+## 1.2.4(2023-05-09)
+- 修复 i18n 国际化不正确的 Bug
 ## 1.2.3(2022-05-24)
 - 新增 readonly 属性,组件只读
 ## 1.2.2(2022-05-06)

+ 1 - 1
uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hans.json

@@ -1,4 +1,4 @@
 {
-	"uni-search-bar.cancel": "cancel",
+	"uni-search-bar.cancel": "取消",
 	"uni-search-bar.placeholder": "请输入搜索内容"
 }

+ 1 - 1
uni_modules/uni-search-bar/components/uni-search-bar/i18n/zh-Hant.json

@@ -1,4 +1,4 @@
 {
-	"uni-search-bar.cancel": "cancel",
+	"uni-search-bar.cancel": "取消",
 	"uni-search-bar.placeholder": "請輸入搜索內容"
 }

+ 1 - 1
uni_modules/uni-search-bar/components/uni-search-bar/uni-search-bar.vue

@@ -80,7 +80,7 @@
 			},
 			cancelText: {
 				type: String,
-				default: '取消'
+				default: ""
 			},
 			bgColor: {
 				type: String,

+ 4 - 7
uni_modules/uni-search-bar/package.json

@@ -1,7 +1,7 @@
 {
   "id": "uni-search-bar",
   "displayName": "uni-search-bar 搜索栏",
-  "version": "1.2.3",
+  "version": "1.2.4",
   "description": "搜索栏组件,通常用于搜索商品、文章等",
   "keywords": [
     "uni-ui",
@@ -16,11 +16,7 @@
   "directories": {
     "example": "../../temps/example_temps"
   },
-  "dcloudext": {
-    "category": [
-      "前端组件",
-      "通用组件"
-    ],
+"dcloudext": {
     "sale": {
       "regular": {
         "price": "0.00"
@@ -37,7 +33,8 @@
       "data": "无",
       "permissions": "无"
     },
-    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+    "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+    "type": "component-vue"
   },
   "uni_modules": {
     "dependencies": [

+ 1 - 1
uni_modules/uni-segmented-control/components/uni-segmented-control/uni-segmented-control.vue

@@ -87,7 +87,7 @@
 	}
 </script>
 
-<style lang="scss" >
+<style lang="scss" scoped>
 	.segmented-control {
 		/* #ifndef APP-NVUE */
 		display: flex;

+ 2 - 0
uni_modules/uni-swipe-action/changelog.md

@@ -1,3 +1,5 @@
+## 1.3.8(2023-04-13)
+- 修复`uni-swipe-action`和`uni-swipe-action-item`不同时使用导致 closeOther 方法报错的 bug
 ## 1.3.7(2022-06-06)
 - 修复 vue3 下使用组件不能正常运行的Bug
 ## 1.3.6(2022-05-31)

+ 2 - 2
uni_modules/uni-swipe-action/components/uni-swipe-action-item/bindingx.js

@@ -31,7 +31,7 @@ bindIngXMixins = {
 	},
 	created() {
 		this.swipeaction = this.getSwipeAction()
-		if (this.swipeaction.children !== undefined) {
+		if (this.swipeaction && Array.isArray(this.swipeaction.children)) {
 			this.swipeaction.children.push(this)
 		}
 	},
@@ -74,7 +74,7 @@ bindIngXMixins = {
 			// 每次只触发一次,避免多次监听造成闪烁
 			if (this.stop) return
 			this.stop = true
-			if (this.autoClose) {
+			if (this.autoClose && this.swipeaction) {
 				this.swipeaction.closeOther(this)
 			}
 

+ 4 - 2
uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpalipay.js

@@ -21,7 +21,7 @@ export default {
 	},
 	created() {
 		this.swipeaction = this.getSwipeAction()
-		if (this.swipeaction.children !== undefined) {
+		if (this.swipeaction && Array.isArray(this.swipeaction.children)) {
 			this.swipeaction.children.push(this)
 		}
 	},
@@ -65,7 +65,9 @@ export default {
 		touchstart(e) {
 			this.transition = false
 			this.isclose = true
-			this.autoClose && this.swipeaction.closeOther(this)
+			if (this.autoClose && this.swipeaction) {
+				this.swipeaction.closeOther(this)
+			}
 		},
 		touchmove(e) {},
 		touchend(e) {

+ 4 - 3
uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpother.js

@@ -36,7 +36,7 @@ otherMixins = {
 	},
 	mounted() {
 		this.swipeaction = this.getSwipeAction()
-		if (this.swipeaction.children !== undefined) {
+		if (this.swipeaction && Array.isArray(this.swipeaction.children)) {
 			this.swipeaction.children.push(this)
 		}
 		this.init()
@@ -53,8 +53,9 @@ otherMixins = {
 		},
 
 		closeSwipe(e) {
-			if (!this.autoClose) return
-			this.swipeaction.closeOther(this)
+			if (this.autoClose && this.swipeaction) {
+				this.swipeaction.closeOther(this)
+			}
 		},
 		appTouchStart(e) {
 			const {

+ 4 - 3
uni_modules/uni-swipe-action/components/uni-swipe-action-item/mpwxs.js

@@ -21,7 +21,7 @@ mpMixins = {
 	},
 	created() {
 		this.swipeaction = this.getSwipeAction()
-		if (this.swipeaction.children !== undefined) {
+		if (this.swipeaction && Array.isArray(this.swipeaction.children)) {
 			this.swipeaction.children.push(this)
 		}
 	},
@@ -31,8 +31,9 @@ mpMixins = {
 	methods: {
 		// wxs 中调用
 		closeSwipe(e) {
-			if (!this.autoClose) return
-			this.swipeaction.closeOther(this)
+			if (this.autoClose && this.swipeaction) {
+				this.swipeaction.closeOther(this)
+			}
 		},
 
 		change(e) {

+ 5 - 8
uni_modules/uni-swipe-action/package.json

@@ -1,7 +1,7 @@
 {
 	"id": "uni-swipe-action",
 	"displayName": "uni-swipe-action 滑动操作",
-	"version": "1.3.7",
+	"version": "1.3.8",
 	"description": "SwipeAction 滑动操作操作组件",
 	"keywords": [
         "",
@@ -17,12 +17,8 @@
 	"directories": {
 		"example": "../../temps/example_temps"
 	},
-	"dcloudext": {
-		"category": [
-			"前端组件",
-			"通用组件"
-		],
-		"sale": {
+    "dcloudext": {
+        "sale": {
 			"regular": {
 				"price": "0.00"
 			},
@@ -38,7 +34,8 @@
 			"data": "无",
 			"permissions": "无"
 		},
-		"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
+        "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+        "type": "component-vue"
 	},
 	"uni_modules": {
 		"dependencies": ["uni-scss"],

+ 1 - 1
uni_modules/uni-swiper-dot/components/uni-swiper-dot/uni-swiper-dot.vue

@@ -120,7 +120,7 @@
 	}
 </script>
 
-<style lang="scss">
+<style lang="scss" scoped>
 	.uni-swiper__warp {
 		/* #ifndef APP-NVUE */
 		display: flex;

+ 4 - 0
uni_modules/uni-table/changelog.md

@@ -1,3 +1,7 @@
+## 1.2.3(2023-03-28)
+- 修复 在vue3模式下可能会出现错误的问题
+## 1.2.2(2022-11-29)
+- 优化 主题样式
 ## 1.2.1(2022-06-06)
 - 修复 微信小程序存在无使用组件的问题
 ## 1.2.0(2021-11-19)

+ 3 - 3
uni_modules/uni-table/components/uni-table/uni-table.vue

@@ -3,9 +3,9 @@
 		<!-- #ifdef H5 -->
 		<table class="uni-table" border="0" cellpadding="0" cellspacing="0" :class="{ 'table--stripe': stripe }" :style="{ 'min-width': minWidth + 'px' }">
 			<slot></slot>
-			<view v-if="noData" class="uni-table-loading">
-				<view class="uni-table-text" :class="{ 'empty-border': border }">{{ emptyText }}</view>
-			</view>
+			<tr v-if="noData" class="uni-table-loading">
+				<td class="uni-table-text" :class="{ 'empty-border': border }">{{ emptyText }}</td>
+			</tr>
 			<view v-if="loading" class="uni-table-mask" :class="{ 'empty-border': border }"><div class="uni-table--loader"></div></view>
 		</table>
 		<!-- #endif -->

+ 16 - 8
uni_modules/uni-table/components/uni-th/filter-dropdown.vue

@@ -112,6 +112,12 @@
 						value: 'value'
 					}
 				}
+			},
+			filterDefaultValue: {
+				type: [Array,String],
+				default () {
+					return ""
+				}
 			}
 		},
 		computed: {
@@ -157,7 +163,7 @@
 				enabled: true,
 				isOpened: false,
 				dataList: [],
-				filterValue: '',
+				filterValue: this.filterDefaultValue,
 				checkedValues: [],
 				gtValue: '',
 				ltValue: '',
@@ -286,6 +292,8 @@
 </script>
 
 <style lang="scss">
+	$uni-primary: #1890ff !default;
+	
 	.flex-r {
 		display: flex;
 		flex-direction: row;
@@ -315,8 +323,8 @@
 	}
 
 	.icon-select.active {
-		background-color: #1890ff;
-		border-top-color: #1890ff;
+		background-color: $uni-primary;
+		border-top-color: $uni-primary;
 	}
 
 	.icon-search {
@@ -343,11 +351,11 @@
 	}
 
 	.icon-search.active .icon-search-0 {
-		border-color: #1890ff;
+		border-color: $uni-primary;
 	}
 
 	.icon-search.active .icon-search-1 {
-		background-color: #1890ff;
+		background-color: $uni-primary;
 	}
 
 	.icon-calendar {
@@ -387,14 +395,14 @@
 	}
 
 	.icon-calendar.active {
-		color: #1890ff;
+		color: $uni-primary;
 	}
 
 	.icon-calendar.active .icon-calendar-0,
 	.icon-calendar.active .icon-calendar-1,
 	.icon-calendar.active .icon-calendar-0:before,
 	.icon-calendar.active .icon-calendar-0:after {
-		background-color: #1890ff;
+		background-color: $uni-primary;
 	}
 
 	.uni-filter-dropdown {
@@ -497,7 +505,7 @@
 	}
 
 	.btn-submit {
-		background-color: #1890ff;
+		background-color: $uni-primary;
 		color: #ffffff;
 	}
 </style>

+ 10 - 3
uni_modules/uni-table/components/uni-th/uni-th.vue

@@ -9,7 +9,7 @@
 					<text class="arrow down" :class="{ active: descending }" @click.stop="descendingFn"></text>
 				</view>
 			</view>
-			<dropdown v-if="filterType || filterData.length" :filterData="filterData" :filterType="filterType" @change="ondropdown"></dropdown>
+			<dropdown v-if="filterType || filterData.length" :filterDefaultValue="filterDefaultValue" :filterData="filterData" :filterType="filterType" @change="ondropdown"></dropdown>
 		</view>
 	</th>
 	<!-- #endif -->
@@ -79,6 +79,12 @@ export default {
 			default () {
 				return []
 			}
+		},
+		filterDefaultValue: {
+			type: [Array,String],
+			default () {
+				return ""
+			}
 		}
 	},
 	data() {
@@ -200,6 +206,7 @@ export default {
 
 <style lang="scss">
 $border-color: #ebeef5;
+$uni-primary: #007aff !default;
 
 .uni-table-th {
 	padding: 12px 10px;
@@ -254,7 +261,7 @@ $border-color: #ebeef5;
 	}
 	&.active {
 		::after {
-			background-color: #007aff;
+			background-color: $uni-primary;
 		}
 	}
 }
@@ -271,7 +278,7 @@ $border-color: #ebeef5;
 	}
 	&.active {
 		::after {
-			background-color: #007aff;
+			background-color: $uni-primary;
 		}
 	}
 }

Some files were not shown because too many files changed in this diff