liranlong vor 4 Tagen
Ursprung
Commit
efb2c42d9d
27 geänderte Dateien mit 3901 neuen und 70 gelöschten Zeilen
  1. 520 0
      components/myMosoweTreeList/myMosoweTreeList.vue
  2. 146 0
      components/mySegmentedControl/mySegmentedControl.vue
  3. 49 0
      pages/api/informationApi.js
  4. 297 70
      pages/information/information.vue
  5. 51 0
      pages/information/leftView.vue
  6. 150 0
      pages/information/sectionRyTreeList.vue
  7. 8 0
      uni_modules/mosowe-tree-list/changelog.md
  8. 535 0
      uni_modules/mosowe-tree-list/components/mosowe-tree-list/mosowe-tree-list.vue
  9. 81 0
      uni_modules/mosowe-tree-list/package.json
  10. 374 0
      uni_modules/mosowe-tree-list/readme.md
  11. 92 0
      uni_modules/uni-popup/changelog.md
  12. 45 0
      uni_modules/uni-popup/components/uni-popup-dialog/keypress.js
  13. 316 0
      uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue
  14. 143 0
      uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue
  15. 187 0
      uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue
  16. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/en.json
  17. 8 0
      uni_modules/uni-popup/components/uni-popup/i18n/index.js
  18. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json
  19. 7 0
      uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json
  20. 45 0
      uni_modules/uni-popup/components/uni-popup/keypress.js
  21. 26 0
      uni_modules/uni-popup/components/uni-popup/popup.js
  22. 90 0
      uni_modules/uni-popup/components/uni-popup/uni-popup.uvue
  23. 518 0
      uni_modules/uni-popup/components/uni-popup/uni-popup.vue
  24. 88 0
      uni_modules/uni-popup/package.json
  25. 17 0
      uni_modules/uni-popup/readme.md
  26. 45 0
      utils/requesttest.js
  27. 49 0
      utils/requesttest2.js

+ 520 - 0
components/myMosoweTreeList/myMosoweTreeList.vue

@@ -0,0 +1,520 @@
+<!--
+ 树形结构数据展示
+ @Author: mosowe
+ @Date:2023-05-11 11:17:58
+-->
+<template>
+	<view class="" v-if="treeData.length">
+		<view class="mosowe-tree-list-component" v-for="(item, index) in treeData" :key="index">
+			<view class="mosowe-tree-title-wrap">
+				<view class="mosowe-tree-title-icon">
+					<view class="icon" v-if="item[children] && item[children].length" :class="{
+              open: showChidren.includes(item[nodeKey]),
+              close: !showChidren.includes(item[nodeKey])
+            }" @click="toggleChildrens(item[nodeKey])"></view>
+				</view>
+				<view class="mosowe-tree-title-selection" :class="{
+            disabled: item.disabled,
+            'part-select':
+              item[children] &&
+              treeToArray(JSON.parse(JSON.stringify(item[children])), children).filter((ci) =>
+                selectionList.includes(ci[nodeKey])
+              ).length > 0 &&
+              !selectionList.includes(item[nodeKey]),
+            'all-select': selectionList.includes(item[nodeKey])
+          }" v-if="multiple" @click="selectionClick(item)"></view>
+				<view class="mosowe-tree-title-name" :class="{'mosowe-tree-title-name-disable':!item.enable}" @click.stop="nodeClick(item)">
+					{{ item[text] }}
+				</view>
+			</view>
+			<template v-if="item[children] && item[children].length">
+				<template v-if="showChidren.indexOf(item[nodeKey]) > -1">
+					<view class="mosowe-tree-children-wrap">
+<!-- 						<my-mosowe-tree-list v-model="selectionList" :treeData="item[children]" :text="text" :children="children"
+							:multiple="multiple" :nodeKey="nodeKey" :defaultShowChildren="defaultShowChildren"
+							:textClickToggle="textClickToggle" :accordion="accordion" :index="index + 1" :isOnceShow="onceShow"
+							@nodeClick="nodeClick" @childCancel="childCancel(item)" @childChoosed="childChoosed(item)">
+									{{ node[text] }}
+						</my-mosowe-tree-list> -->
+						<view style="text-align: left;line-height: 70rpx;" class="">
+							<span  style="font-weight: 400;display: inline-block;padding: 0rpx 20rpx;border: 1rpx solid #bdbdbe;margin: 10rpx 20rpx;font-size: 30rpx;border-radius: 10rpx;" v-for="(iitem,iindex) in item[children]" class="">
+								{{iitem.text}}
+							</span>
+						</view>
+					</view>
+				</template>
+			</template>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		name: 'my-mosowe-tree-list',
+		emits: ['nodeClick', 'childCancel', 'childChoosed', 'update:modelValue'],
+		props: {
+			modelValue: {
+				type: Array,
+				default: () => []
+			},
+			value: {
+				type: Array,
+				default: () => []
+			},
+			treeData: {
+				// 数据
+				type: Array,
+				default: () => []
+			},
+			text: {
+				// 显示的文案标题字段
+				type: String,
+				default: 'text'
+			},
+			nodeKey: {
+				// 目标字段
+				type: String,
+				default: 'value'
+			},
+			children: {
+				// 子集字段
+				type: String,
+				default: 'childrens'
+			},
+			multiple: {
+				// 显示多选框
+				type: Boolean,
+				default: false
+			},
+			textClickToggle: {
+				// 标题点击触发子集列表显隐
+				type: Boolean,
+				default: false
+			},
+			defaultShowChildren: {
+				// 默认展开所有,或展开几级
+				type: [Boolean, Number],
+				default: false
+			},
+			accordion: {
+				// 手风琴模式
+				type: Boolean,
+				default: false
+			},
+			index: {
+				// 当前层级
+				type: Number,
+				default: 1
+			},
+			isOnceShow: {
+				// 是否显示过了
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				showChidren: [],
+				once: false,
+				onceShow: false
+			};
+		},
+		computed: {
+			selectionList: {
+				get() {
+					let list = [];
+					// TODO 兼容 vue2
+					// #ifdef VUE2
+					list = this.value;
+					// #endif
+
+					// TODO 兼容 vue3
+					// #ifdef VUE3
+					list = this.modelValue;
+					// #endif
+					if (!this.once && list.length !== 0) {
+						// 只执行一次,初始化时
+						const flatArr = this.getValueByKeyForObject({
+								value: list,
+								source: this.treeData,
+								valueKey: this.nodeKey,
+								targetKey: this.children,
+								treeDataAll: false,
+								treeChildKey: this.children
+							})
+							.flat(Infinity)
+							.filter((item) => item)
+							.map((item) => {
+								return item[this.nodeKey];
+							});
+
+						this.once = true;
+						const r = [...list, ...flatArr];
+						return [...new Set(r)];
+					}
+
+					return list;
+				},
+				set(value) {
+					// TODO 兼容 vue2
+					// #ifdef VUE2
+					this.$emit('input', value);
+					// #endif
+
+					// TODO 兼容 vue3
+					// #ifdef VUE3
+					this.$emit('update:modelValue', value);
+					// #endif
+				}
+			}
+		},
+		watch: {
+			defaultShowChildren: {
+				handler() {
+					if (!this.isOnceShow) {
+						if (this.defaultShowChildren === true) {
+							this.showChidren = this.treeToArray(
+								JSON.parse(JSON.stringify(this.treeData)),
+								this.children
+							).map((item) => item[this.nodeKey]);
+						} else if (typeof this.defaultShowChildren === 'number') {
+							if (this.index < this.defaultShowChildren) {
+								const findIndex = (treeData, index) => {
+									let r = [];
+									treeData.forEach((item) => {
+										r.push(item[this.nodeKey]);
+										if (
+											index < this.defaultShowChildren &&
+											item[this.children] &&
+											item[this.children].length
+										) {
+											r.push(...findIndex(item[this.children], index + 1));
+										}
+									});
+									return r;
+								};
+								const list = findIndex(JSON.parse(JSON.stringify(this.treeData)), 0);
+								this.showChidren = list;
+							}
+						}
+						let t = setTimeout(() => {
+							clearTimeout(t);
+							t = null;
+							this.onceShow = this.index === 1 ? true : this.isOnceShow;
+						}, 10);
+					}
+				},
+				immediate: true
+			}
+		},
+		methods: {
+			nodeClick(e) {
+				//this.$emit('nodeClick', e);
+				console.log(e);
+				this.toggleChildrens(e[this.nodeKey]);
+			},
+			// 选择
+			selectionClick(node) {
+				const list = [...this.selectionList];
+				const value = node[this.nodeKey];
+				if (node[this.children] && node[this.children].length) {
+					// 此项有子集
+					if (list.includes(value)) {
+						// 已选->改取消选择
+						const index = list.findIndex((item) => item === value);
+						list.splice(index, 1);
+						// 子集的也要取消掉
+						const childrenData = JSON.parse(JSON.stringify(node[this.children]));
+						this.treeToArray(childrenData, this.children).forEach((item) => {
+							const findex = list.findIndex((fitem) => fitem === item[this.nodeKey]);
+							list.splice(findex, 1);
+						});
+						// 父级也要取消
+						this.$emit('childCancel');
+					} else {
+						// 加入已选
+						list.push(value);
+						// 子集的也要全部加入
+						const childrenData = JSON.parse(JSON.stringify(node[this.children]));
+						this.treeToArray(childrenData, this.children).forEach((item) => {
+							list.push(item[this.nodeKey]);
+						});
+						// 父级看情况选择不选择
+						this.$emit('childChoosed');
+					}
+				} else {
+					// 没有子集
+					if (list.includes(value)) {
+						// 已选->改取消选择
+						const index = list.findIndex((item) => item === value);
+						list.splice(index, 1);
+						// 父级也要取消
+						this.$emit('childCancel');
+					} else {
+						// 加入已选
+						list.push(value);
+						// 父级看情况选择不选择
+						this.$emit('childChoosed');
+					}
+				}
+
+				this.selectionList = [...new Set(list)];
+			},
+			childChoosed(node) {
+				let t = setTimeout(() => {
+					clearTimeout(t);
+					t = null;
+					const list = [...this.selectionList];
+					const value = node[this.nodeKey];
+					let join = true;
+					node[this.children].forEach((item) => {
+						if (!list.includes(item[this.nodeKey])) {
+							join = false;
+						}
+					});
+					if (join) {
+						list.push(value);
+					}
+					// 父级也要考虑下选择不
+					this.selectionList = [...new Set(list)];
+					this.$emit('childChoosed');
+				}, 10);
+			},
+			childCancel(node) {
+				let t = setTimeout(() => {
+					clearTimeout(t);
+					t = null;
+					const list = [...this.selectionList];
+					const value = node[this.nodeKey];
+					const index = list.findIndex((item) => item === value);
+					if (index > -1) {
+						list.splice(index, 1);
+						this.selectionList = [...new Set(list)];
+					} // 父级也要取消
+					this.$emit('childCancel');
+				}, 10);
+			},
+			// 展开收起
+			toggleChildrens(key) {
+				if (this.showChidren.includes(key)) {
+					const index = this.showChidren.findIndex((item) => item === key);
+					this.showChidren.splice(index, 1);
+				} else {
+					if (this.accordion) {
+						this.showChidren = [key];
+					} else {
+						this.showChidren.push(key);
+					}
+				}
+			},
+			// 树转数组
+			treeToArray(nodes, childKey) {
+				var r = [];
+				if (Array.isArray(nodes)) {
+					for (var i = 0, l = nodes.length; i < l; i++) {
+						r.push(nodes[i]); // 取每项数据放入一个新数组
+						if (Array.isArray(nodes[i][childKey]) && nodes[i][childKey].length > 0)
+							// 若存在leaf则递归调用,把数据拼接到新数组中,并且删除该leaf
+							r = r.concat(this.treeToArray(nodes[i][childKey]));
+						delete nodes[i][childKey];
+					}
+				}
+				return r;
+			},
+			getValueByKeyForObject(options) {
+				if (!options) {
+					return [];
+				}
+				const {
+					value,
+					source,
+					valueKey,
+					targetKey,
+					treeDataAll = false,
+					treeChildKey = 'leaf'
+				} = options;
+				let treePrefix = '';
+				let result = [];
+				if (!(value ?? '') || !source || !valueKey || !targetKey) {
+					requiredKey(options, ['value', 'source', 'valueKey', 'targetKey']);
+					return [];
+				}
+				let val = value;
+				if (typeof value === 'string') {
+					val = [value];
+				}
+				// 树数据处理
+				const treeDeal = (data) => {
+					if (data[treeChildKey]) {
+						// 是个树
+						let r = this.getValueByKeyForObject({
+							...options,
+							source: data[treeChildKey]
+						});
+						if (treeDataAll && r.length) {
+							// 需要返回父级数据
+							treePrefix = data[targetKey];
+							r = r.map((item) => {
+								return treePrefix + '/' + item;
+							});
+						}
+						result.push(...r);
+					}
+				};
+				if (Object.prototype.toString.call(source) === '[object Object]') {
+					// object类型,假设是树
+					if (val.includes(source[valueKey])) {
+						result.push(source[targetKey]);
+					}
+					treeDeal(source);
+				} else {
+					// 数组,也可能是数组树
+					source.forEach((item) => {
+						if (Object.prototype.toString.call(item) === '[object Object]') {
+							// object类型,假设是树
+							if (val.includes(item[valueKey])) {
+								result.push(item[targetKey]);
+							}
+							treeDeal(item); // 树处理
+						}
+						if (Array.isArray(item)) {
+							// 多维数组
+							result.push(
+								...this.getValueByKeyForObject({
+									...options,
+									source: item
+								})
+							);
+						}
+					});
+				}
+				return result;
+			},
+			requiredKey(obj, keys) {
+				let r = [];
+				keys.forEach((item) => {
+					if (ZoIsEmpty(obj[item])) {
+						console.error(`${item} is required!`);
+						r.push(item);
+					}
+				});
+				return r;
+			}
+		}
+	};
+</script>
+
+<style scoped lang="scss">
+	.mosowe-tree-list-component {
+		font-size: 40rpx;
+		color: #333;
+		line-height: 70rpx;
+		font-weight: 700;
+
+		.mosowe-tree-title-wrap {
+			margin-top: 10rpx;
+			border-radius: 10rpx;
+			border:1rpx solid #007aff;
+			display: flex;
+			align-items: center;
+
+			.mosowe-tree-title-icon {
+				flex: none;
+				width: 20px;
+				height: 20px;
+
+				.icon {
+					width: 100%;
+					height: 100%;
+					display: flex;
+					position: relative;
+					cursor: pointer;
+					transition: all 0.3s;
+
+					&::before {
+						content: '';
+						display: inline-block;
+						width: 0;
+						height: 0;
+						border: 6px solid;
+						border-color: transparent transparent transparent #999;
+						margin: auto;
+						margin-right: -2rpx;
+					}
+
+					&.open {
+						transform: rotate(90deg);
+						transform-origin: center;
+					}
+				}
+			}
+
+			.mosowe-tree-title-selection {
+				flex: none;
+				width: 30rpx;
+				height: 30rpx;
+				border: 1rpx solid #ccc;
+				border-radius: 2rpx;
+				margin-right: 18rpx;
+				cursor: pointer;
+				position: relative;
+
+				&.part-select {
+					background-color: $uni-color-primary;
+					border-color: $uni-color-primary;
+
+					&::after {
+						content: '';
+						display: block;
+						width: 8px;
+						height: 2px;
+						background-color: #fff;
+						border-radius: 2px;
+						position: absolute;
+						left: 50%;
+						top: 50%;
+						transform: translateX(-50%) translateY(-50%);
+					}
+				}
+
+				&.all-select {
+					background-color: $uni-color-primary;
+					border-color: $uni-color-primary;
+
+					&::after {
+						content: '';
+						display: block;
+						width: 6px;
+						height: 3px;
+						border: 2px solid;
+						border-color: transparent transparent #fff #fff;
+						border-radius: 2px;
+						position: absolute;
+						left: 50%;
+						top: 50%;
+						transform: translateX(-50%) translateY(-80%) rotate(-45deg);
+					}
+				}
+
+				&.disabled {
+					background-color: rgba(0, 0, 0, 0.2);
+					cursor: no-drop;
+				}
+			}
+
+			.mosowe-tree-title-name {
+				//	flex: 1;
+				cursor: pointer;
+			}
+			.mosowe-tree-title-name-disable {
+				//	flex: 1;
+				color: #999;
+				cursor: pointer;
+			}
+		}
+
+		.mosowe-tree-children-wrap {
+			padding-left: 10px;
+		}
+	}
+</style>

+ 146 - 0
components/mySegmentedControl/mySegmentedControl.vue

@@ -0,0 +1,146 @@
+<template>
+	<view :class="[styleType === 'text'?'segmented-control--text' : 'segmented-control--button' ]"
+		:style="{ borderColor: styleType === 'text' ? '' : activeColor }" class="segmented-control">
+		<view v-for="(item, index) in values" :class="[styleType === 'text' ? '' : 'segmented-control__item--button',
+					index === 0 && styleType === 'button' ? 'segmented-control__item--button--first' : '',
+					index === values.length - 1 && styleType === 'button' ? 'segmented-control__item--button--last':'']" :key="index"
+			:style="{backgroundColor: index === currentIndex && styleType === 'button' ? activeColor : styleType === 'button' ?inActiveColor:'transparent', borderColor: index === currentIndex && styleType === 'text' || styleType === 'button' ? activeColor : inActiveColor}"
+			class="segmented-control__item" @click="_onClick(index)">
+			<view>
+				<text
+					:style="{color:index === currentIndex? styleType === 'text'? activeColor: '#fff': styleType === 'text'? '#000': activeColor}"
+					class="segmented-control__text"
+					:class="styleType === 'text' && index === currentIndex ? 'segmented-control__item--text': ''">{{ item }}</text>
+			</view>
+
+		</view>
+	</view>
+</template>
+
+<script>
+	/**
+	 * SegmentedControl 分段器
+	 * @description 用作不同视图的显示
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=54
+	 * @property {Number} current 当前选中的tab索引值,从0计数
+	 * @property {String} styleType = [button|text] 分段器样式类型
+	 * 	@value button 按钮类型
+	 * 	@value text 文字类型
+	 * @property {String} activeColor 选中的标签背景色与边框颜色
+	 * @property {String} inActiveColor 未选中的标签背景色与边框颜色
+	 * @property {Array} values 选项数组
+	 * @event {Function} clickItem 组件触发点击事件时触发,e={currentIndex}
+	 */
+
+	export default {
+		name: 'UniSegmentedControl',
+		emits: ['clickItem'],
+		props: {
+			current: {
+				type: Number,
+				default: 0
+			},
+			values: {
+				type: Array,
+				default () {
+					return []
+				}
+			},
+			activeColor: {
+				type: String,
+				default: '#2979FF'
+			},
+			inActiveColor: {
+				type: String,
+				default: 'transparent'
+			},
+			styleType: {
+				type: String,
+				default: 'button'
+			}
+		},
+		data() {
+			return {
+				currentIndex: 0
+			}
+		},
+		watch: {
+			current(val) {
+				if (val !== this.currentIndex) {
+					this.currentIndex = val
+				}
+			}
+		},
+		computed: {},
+		created() {
+			this.currentIndex = this.current
+		},
+		methods: {
+			_onClick(index) {
+				if (this.currentIndex !== index) {
+					this.currentIndex = index
+					this.$emit('clickItem', {
+						currentIndex: index
+					})
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.segmented-control {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		box-sizing: border-box;
+		/* #endif */
+		flex-direction: row;
+		height: 36px;
+		overflow: hidden;
+		/* #ifdef H5 */
+		cursor: pointer;
+		/* #endif */
+	}
+
+	.segmented-control__item {
+		/* #ifndef APP-NVUE */
+		display: inline-flex;
+		box-sizing: border-box;
+		/* #endif */
+		position: relative;
+		padding: 0 20rpx;
+		justify-content: center;
+		align-items: center;
+	}
+
+	.segmented-control__item--button {
+		border-style: solid;
+		border-top-width: 1px;
+		border-bottom-width: 1px;
+		border-right-width: 1px;
+		border-left-width: 0;
+	}
+
+	.segmented-control__item--button--first {
+		border-left-width: 1px;
+		border-top-left-radius: 5px;
+		border-bottom-left-radius: 5px;
+	}
+
+	.segmented-control__item--button--last {
+		border-top-right-radius: 5px;
+		border-bottom-right-radius: 5px;
+	}
+
+	.segmented-control__item--text {
+		border-bottom-style: solid;
+		border-bottom-width: 2px;
+		padding: 6px 0;
+	}
+
+	.segmented-control__text {
+		font-size: 14px;
+		line-height: 20px;
+		text-align: center;
+	}
+</style>

+ 49 - 0
pages/api/informationApi.js

@@ -0,0 +1,49 @@
+import {
+	ApiRequest
+} from '@/utils/requesttest2'
+//const base_url = 'http://192.168.3.152:8088'
+const base_url = ''
+// 登录方法
+export function abaseQueryData(data) {
+	return ApiRequest({
+		'url': base_url + '/glwork/g2app/abase/queryData',
+		'method': 'post',
+		'data': data
+	})
+}
+export function queryFormeditSignByCopyrightid(data) {
+	return ApiRequest({
+		'url': base_url + '/glwork/g2work/abase/queryFormeditSignByCopyrightid',
+		'method': 'post',
+		'data': data
+	})
+}
+export function flowdirectionQueryData(data) {
+	return ApiRequest({
+		'url': base_url + '/glwork/g2work/flowdirection/queryData',
+		'method': 'post',
+		'data': data
+	})
+}
+export function queryDataSendByTarget(data) {
+	return ApiRequest({
+		'url': base_url + '/glwork/g2app/abase/queryDataSendByTarget',
+		'method': 'post',
+		'data': data
+	})
+}
+export function saveDataSend(data) {
+	return ApiRequest({
+		'url': base_url + '/glwork/g2app/abase/saveDataSend',
+		'method': 'post',
+		'data': data
+	})
+}
+
+export function saveDataOpinion(data) {
+	return ApiRequest({
+		'url': base_url + '/glwork/g2app/abase/saveDataOpinion',
+		'method': 'post',
+		'data': data
+	})
+}

+ 297 - 70
pages/information/information.vue

@@ -3,33 +3,14 @@
 		<u-subsection bg-color="rgb(215,224,233)" button-color="rgb(0,99,208)" active-color="white" :list="list"
 			v-model="current" @change="subChange"></u-subsection>
 		<view class="btn">
-			<u-button size="medium" type="primary">已阅</u-button>
-			<u-button size="medium" type="success">转交</u-button>
-			<u-button size="medium" type="error">退件</u-button>
 			<u-button size="medium" @click="onClose">关闭</u-button>
 		</view>
 	</view>
-	<scroll-view scroll-y="true" class="content" v-show="current === 0">
-		<image v-for="it in 48" src="../../static/666.png" mode="heightFix"></image>
-	</scroll-view>
-
-	<view class="handleFile" v-show="current === 1">
+	<view class="handleFile" v-show="current === 0">
 
 		<!-- 左侧视图 -->
-		<view style="height: 100%;">
-			<view style="border-bottom: 1rpx solid #cccccc;line-height: 100rpx;display: flex;">
-				<mySelectTree class="mySelectTree" v-model="pdfValue" label="收文" :localdata="range" @change="change">
-				</mySelectTree>
-				<u-button style="float: right;line-height: 60rpx;height: 60rpx;margin-top: 10rpx;" size="medium"
-					type="primary">重新加载</u-button>
-				<uni-icons style="float: right;line-height: 40rpx;background-color: #bdc7d4;margin: 20rpx 20rpx;" type="left"
-					size="20" color="#999" />
-			</view>
-			<scroll-view scroll-y="true">
-				<image style="width: 100%;height: 12000rpx;" src="../../static/pdf.png"></image>
-
-
-			</scroll-view>
+		<view style="height: 100%;width: 65%;">
+			<leftView></leftView>
 		</view>
 
 		<!-- 右侧视图 -->
@@ -50,17 +31,17 @@
 				操作
 			</view>
 			<view class="selected">
-				<view style="width: 500rpx;">
-					<uni-segmented-control :current="czcurrent" :values="czlist" @clickItem="czsubChange" />
+				<view style="width: 100%;">
+					<my-segmented-control :current="czcurrent" :values="fwBtn" @clickItem="czsubChange" />
 				</view>
-				<view style="padding: 20rpx;background-color: #f2f2f2;" v-show="!show">
+				<!-- 				<view style="padding: 20rpx;background-color: #f2f2f2;" v-show="!show">
 					<view style="display: flex;line-height: 80rpx;padding: 10rpx;">
 						<span style="color: #2d68ea;">转处室,直属领导:</span>
 						<u-button v-for="(item,index) in zcszsdwList" :type="zcszsdwIndex == index ?'primary' :''" class="lybut"
 							size="mini" @click="zcszsdwClick(index)">{{item.value}}</u-button>
 						<view style="flex: 1;">
-							<u-button style="float: right;margin-top: 10rpx;" size="mini">更多</u-button>
-
+							<u-button style="float: right;margin-top: 10rpx;" size="mini" @click="openRyTree">更多</u-button>
+							<section-ry-tree-list ref="sectionRyTreeList"></section-ry-tree-list>
 						</view>
 					</view>
 					<view style="background-color: #fff;height: 100rpx;">
@@ -69,9 +50,17 @@
 				</view>
 				<view class="" v-show="show">
 					已阅后,本件转入已办件!
+				</view> -->
+				<view style="height: 300rpx;align-items: center;">
+					<view style="line-height: 300rpx;font-size: 30rpx">
+						{{flowData.CODEFUNCTITLE}}
+						<u-button v-show="showCxxzBut" style="display: inline-block;line-height: 70rpx;height: 70rpx;"
+							type="primary" @click="openRyTree">重新选择</u-button>
+					</view>
+					<section-ry-tree-list ref="sectionRyTreeList"></section-ry-tree-list>
 				</view>
 				<view class="">
-					<u-button type="primary" style="height: 70rpx;width: 400rpx;">提交</u-button>
+					<u-button type="primary" style="height: 70rpx;width: 400rpx;" @click="openRyTree">提交</u-button>
 				</view>
 			</view>
 		</scroll-view>
@@ -84,20 +73,74 @@
 		reactive,
 		nextTick
 	} from "vue"
-
+	import leftView from "./leftView.vue"
+	import mySegmentedControl from "../../components/mySegmentedControl/mySegmentedControl.vue"
+	import sectionRyTreeList from "./sectionRyTreeList.vue"
+	import {
+		abaseQueryData,
+		queryFormeditSignByCopyrightid,
+		flowdirectionQueryData,
+		queryDataSendByTarget,
+		saveDataSend,
+		saveDataOpinion
+	} from "../api/informationApi.js"
+	const s4 = new SM4Util()
 
 	export default {
+		components: {
+			leftView,
+			mySegmentedControl,
+			sectionRyTreeList
+		},
 		onLoad(e) {
-			this.urlParams = e.url
+			//this.urlParams = e.url
+			this.urlParams = {
+				docmode: 12,
+				guid: 'ZjNjOWU1Nj',
+				directionid: 'Flow_19dq6vo_87f37f8f-955a-44ff-a531-4675deb7063d',
+				routeinfoid: '1225074972981907456',
+				routeid: '1225084527690305536',
+				formeditid: 'FW_WFH_V_07',
+				lastrouteinfoid: '1225072376867115008',
+				copyrightid: '87f37f8f-955a-44ff-a531-4675deb7063d',
+				dotype: '1',
+				type: 'todo',
+				lastReturnPageno: '1',
+				flowid: 'AA08',
+				dotype: '1',
+				url: 'pages/handleFile/handleFile'
+			}
+			let data = {
+				"ckey": "FW_WFH",
+				"id": 0,
+				"directionid": this.urlParams.directionid,
+				"formeditid": this.urlParams.formeditid,
+				"routeid": this.urlParams.routeid,
+				"routeinfoid": this.urlParams.routeinfoid
+			}
+			abaseQueryData(data).then(res => {
+				this.queryData = res.data
+				console.log(this.queryData)
+				this.fwBtn = []
+				this.fwInfo = []
+				let fwBtn = res.data["FW_WFH.FUNCLIST"]
+				for (let i = 0; i < fwBtn.length; i++) {
+					if (fwBtn[i].ENDNODETYPE == 2) {
+						this.fwBtn.push(fwBtn[i].CNAME)
+						this.fwInfo.push(fwBtn[i])
+					}
+				}
+				if (this.fwInfo.length > 0) {
+					this.doFlow(this.fwInfo[0])
+				}
+			})
 		},
 		data() {
 			return {
-				urlParams:"",
+				queryData: {},
+				urlParams: {},
 				show: true,
 				list: [{
-						name: '文件浏览'
-					},
-					{
 						name: '办理'
 					},
 					{
@@ -114,29 +157,8 @@
 						ry: ["张三", "王五"]
 					}
 				],
-				czlist: ref(['转发', '已阅']),
-				current: ref(0),
-				czcurrent: ref(0),
-				pdfValue: ref(null),
-				range: ref([{
-						value: 0,
-						text: "文档目录",
-						file: [{
-							value: 10,
-							text: "PDF1",
-							pageNum: 5
-						}, {
-							value: 12,
-							text: "PDF222",
-							pageNum: 8
-						}]
-					},
-					{
-						value: 1,
-						text: "附件",
-						file: []
-					},
-				]),
+				current: 0,
+				czcurrent: 0,
 				form: {
 					suggest: ""
 				},
@@ -145,9 +167,24 @@
 						required: true,
 						message: '请输入意见',
 					}]
-				}
+				},
+				fwBtn: [],
+				fwInfo: [],
+				flowData: {
+					SENDERRORS: {}
+				},
+				forwardUser: [],
+				flowDataList: [],
+				activeDirection: {}
 			};
 		},
+		computed: {
+			showCxxzBut() {
+				return this.flowData.ENDNODETYPE != 1 && this.flowData.CODEFUNCBUTTON != 'SENDCOPYEND' && this.flowData
+					.CODEFUNCBUTTON !=
+					'SENDPERUSAL' && this.flowData.CODEFUNCBUTTON != 'SENDCOMMIT' && this.flowData.SENDERRORS.MESSAGE == ''
+			}
+		},
 		created() {
 
 		},
@@ -155,35 +192,227 @@
 			this.$refs.form1.setRules(this.rules)
 		},
 		methods: {
-			change(e) {
-				console.log("e:", e);
+			openRyTree() {
+				this.$refs.sectionRyTreeList.open()
 			},
-
 			onClose() {
 				uni.reLaunch({
-					url: this.urlParams
+					url: this.urlParams.url
 				})
 			},
 
 			confirm() {
 				this.$refs.form1.validate((valid) => {
 					if (valid) {
-						uni.showToast({
-							icon: "none",
-							title: "表单验证通过"
+						saveDataOpinion({
+							"cmanid": "0c67561f-5d0d-48fd-a90b-90d69a98fbac", //userid
+							"routeinfoid": this.urlParams.routeinfoid,
+							"routeid": this.urlParams.routeid,
+							"tableid": "FW_WFH",
+							"colid": "WLDSSL",
+							"opiniontype": 0,
+							"cresult": "",
+							"opinion": this.form.suggest,
+							"opinionimage": ""
+						}).then(res => {
+							uni.showToast({
+								icon: "success",
+								title: "保存成功"
+							})
 						})
 					}
 				})
 			},
-
 			zcszsdwClick(index) {
 				this.zcszsdwIndex = index
 			},
 
 			subChange() {},
 
-			czsubChange() {
-				this.show = !this.show
+			czsubChange(e) {
+				this.doFlow(this.fwInfo[e.currentIndex])
+			},
+			doFlow(fwInfo) {
+				this.flowData = {
+					SENDERRORS: {}
+				}
+				queryFormeditSignByCopyrightid({
+					"copyrightid": this.urlParams.copyrightid
+				}).then(res => {
+					//console.log("data1", res)
+				})
+				flowdirectionQueryData({
+					"directionid": this.urlParams.directionid
+				}).then(res => {
+					//console.log("data2", res)
+				})
+				queryDataSendByTarget({
+					"codefuncbutton": fwInfo.CODE, //--
+					"directionid": this.urlParams.directionid,
+					"directionidtarget": fwInfo.DIRECTIONIDTARGET, //--
+					"userid": "0c67561f-5d0d-48fd-a90b-90d69a98fbac",
+					"routeinfoid": this.urlParams.routeinfoid,
+					"routeid": this.urlParams.routeid
+				}).then(res => {
+					Object.assign(this.flowData, res.data[0])
+					console.log(this.flowData)
+					if (this.flowData.SENDERRORS && this.flowData.SENDERRORS.MESSAGE != "") {
+						this.flowData.CODEFUNCTITLE = this.flowData.SENDERRORS.MESSAGE;
+						return
+					}
+
+					if (this.flowData.ENDNODETYPE == 1 || this.flowData.CODEFUNCBUTTON == "SENDCOPYEND" || this.flowData
+						.CODEFUNCBUTTON == "SENDPERUSAL" || this.flowData.CODEFUNCBUTTON == "SENDCOMMIT") {} else if (this
+						.flowData.ENDNODETYPE == 3) {
+						//弹窗
+						// self.showContent = true;
+						// self.forwardUser = [];
+						// this.flowDataList = this.flowData["DIRECTION.CHILD"];
+						// $.each(this.flowDataList, function(index, item) {
+						// 	item.forwardUser = index;
+						// 	self.forwardUser.push([])
+						// 	item.people1 = item.SENDUSERS.USERS.USERS; //人员
+						// 	item.people1.forEach(function(item) {
+						// 		item.show = item.USERS.length > 0;
+						// 		item.childshow = false;
+						// 		item.USERS.forEach(function(item1) {
+						// 			item1.show = true;
+						// 		})
+						// 	})
+						// 	item.people2 = item.SENDUSERS.USERSALL.USERS; //人员
+						// 	item.people2.forEach(function(item) {
+						// 		item.show = true;
+						// 		item.childshow = false;
+						// 		item.USERS.forEach(function(item1) {
+						// 			item1.show = true;
+						// 		})
+						// 	})
+						// 	item.people = JSON.parse(JSON.stringify(item.people1));
+						// })
+						// self.activeDirection = this.flowDataList[0]
+						// self.roleList = self.activeDirection.SENDUSERS.USERS.ROLES;
+					} else {
+						this.forwardUser = []
+						this.flowDataList = [];
+						this.flowDataList.push(this.flowData)
+						for (let i = 0; i < this.flowDataList.length; i++) {
+							let item = this.flowDataList[0]
+							item.forwardUser = i;
+							this.forwardUser.push([])
+							item.people1 = item.SENDUSERS.USERS.USERS; //人员
+							item.people1.forEach(function(item) {
+								item.show = item.USERS.length > 0;
+								item.childshow = false;
+								item.USERS.forEach(function(item1) {
+									item1.show = true;
+								})
+							})
+							item.people2 = item.SENDUSERS.USERSALL.USERS; //人员
+							item.people2.forEach(function(item) {
+								item.show = true;
+								item.childshow = false;
+								item.USERS.forEach(function(item1) {
+									item1.show = true;
+								})
+							})
+							item.people = JSON.parse(JSON.stringify(item.people1));
+						}
+						this.activeDirection = this.flowDataList[0]
+						this.roleList = this.flowData.SENDUSERS.USERS.ROLES;
+						let n = 0;
+						this.flowDataList[0].people1.forEach(function(item) {
+							n = n + item.USERS.length;
+						})
+						if (n == 1) { //如果推荐人员唯一时,缺省直接赋值转发,可以重新选择
+							this.showContent = false;
+							this.adduserAll(2);
+							var usernameStr = "";
+							this.flowDataList[0].people1.forEach(function(item) {
+								if (item.USERS.length == 1) {
+									usernameStr = item.USERS[0].USERNAME
+								}
+							})
+							this.flowData.CODEFUNCTITLE = "确认后将转发【" + usernameStr + "】";
+						} else {
+							//弹窗
+							this.showContent = true;
+						}
+					}
+				})
+
+			},
+
+			adduserAll() {
+				this.activeDirection.people.forEach((item, index) => {
+					item.USERS.forEach((item1, index1) => {
+						if (item1.show == true) {
+							this.forwardUser[this.activeDirection.forwardUser].push(item1);
+							item1.checked = false;
+							item1.show = false;
+						}
+					})
+				})
+				this.forwardUser[this.activeDirection.forwardUser].forEach(function(x, y) {
+					x.type = y == 0 ? 1 : 2
+				})
+			},
+
+			submit() {
+				console.log(this.flowDataList)
+				console.log(this.forwardUser)
+				let sendUser = []
+				if (this.flowData.ENDNODETYPE == 1) {
+					sendUser.push({
+						DIRECTIONID: this.flowData.DIRECTIONID,
+						MAINUSERID: "STOP",
+						COPYUSERID: ""
+					})
+				} else if (this.flowData.CODEFUNCBUTTON == "SENDCOPYEND" || this.flowData.CODEFUNCBUTTON ==
+					"SENDPERUSAL" || this.flowData.CODEFUNCBUTTON == "SENDCOMMIT") {
+					sendUser.push({
+						DIRECTIONID: this.flowData.DIRECTIONID,
+						MAINUSERID: "",
+						COPYUSERID: ""
+					})
+				} else {
+					let n = 0,
+						text = [];
+					this.flowDataList.forEach((item) => {
+						if (this.forwardUser[item.forwardUser].length > 0) {
+							n++
+							sendUser.push({
+								DIRECTIONID: item.DIRECTIONID,
+								MAINUSERID: this.forwardUser[item.forwardUser].filter(function(item1) {
+									return item1.type == 1
+								}).map(function(item1) {
+									return item1.USERID
+								}).join("|"),
+								COPYUSERID: this.forwardUser[item.forwardUser].filter(function(item1) {
+									return item1.type == 2
+								}).map(function(item1) {
+									return item1.USERID
+								}).join("|")
+							})
+						} else {
+							text.push(item.CNAME)
+						}
+					})
+					if (n == 0) {
+						// 未选择人员,请选择至少一项人员!
+						return
+					}
+					}
+				let data = {
+					"codefuncbutton": this.flowData.CODEFUNCBUTTON,
+					"directionid": this.urlParams.directionid,
+					"userid": "0c67561f-5d0d-48fd-a90b-90d69a98fbac",
+					"routeinfoid": this.urlParams.routeinfoid,
+					"routeid": this.urlParams.routeid,
+					"data": JSON.stringify(sendUser)
+				}
+				saveDataSend(data).then(res => {
+					console.log(res)
+				})
 			}
 		}
 	}
@@ -223,14 +452,12 @@
 		background-color: #ebebeb;
 		border-radius: 20rpx;
 		width: calc(100vw - 100rpx);
-		;
 		height: calc(100vh - 300rpx);
 		text-align: center;
 	}
 
 	.handleFile {
 		width: calc(100vw - 100rpx);
-		;
 		height: calc(100vh - 300rpx);
 		display: flex;
 		justify-content: space-around;

+ 51 - 0
pages/information/leftView.vue

@@ -0,0 +1,51 @@
+<template>
+	<view style="height: 100%;width: 100%;">
+		<view style="border-bottom: 1rpx solid #cccccc;line-height: 100rpx;display: flex;">
+			<mySelectTree class="mySelectTree" v-model="pdfValue" label="收文" :localdata="range" @change="change">
+			</mySelectTree>
+			<u-button style="float: right;line-height: 60rpx;height: 60rpx;margin-top: 10rpx;" size="medium" type="primary">
+				重新加载
+			</u-button>
+			<uni-icons style="float: right;line-height: 40rpx;background-color: #bdc7d4;margin: 20rpx 20rpx;" type="left"
+				size="20" color="#999" />
+		</view>
+		<scroll-view style="height: 100%;" scroll-y="true">
+			<image style="width: 100%;height: 16000rpx;" src="../../static/pdf.png"></image>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				pdfValue: "",
+				range: [{
+					value: 0,
+					text: "文档目录",
+					file: [{
+						value: 10,
+						text: "PDF1",
+						pageNum: 5
+					}, {
+						value: 12,
+						text: "PDF222",
+						pageNum: 8
+					}]
+				}, {
+					value: 1,
+					text: "附件",
+					file: []
+				}],
+			}
+		},
+		methods: {
+			change(e) {
+				console.log("e:", e);
+			},
+		}
+	}
+</script>
+
+<style>
+</style>

+ 150 - 0
pages/information/sectionRyTreeList.vue

@@ -0,0 +1,150 @@
+<template>
+	<view>
+		<uni-popup ref="popup" type="dialog">
+			<view
+				style="background-color: #fff;height: 70vh;width: 70vw;border-radius: 15rpx;padding: 50rpx;display: flex;flex-direction: column;">
+				<view style="flex: 1;overflow: hidden;display: flex;">
+					<scroll-view scroll-y="true" style="flex: 1;border-radius: 15rpx;border: 1rpx solid #babbbd;padding: 20rpx;">
+						<my-mosowe-tree-list v-model="data" :treeData="treeList" text="text" nodeKey="_id"
+							defaultShowChildren accordion multiple>
+						</my-mosowe-tree-list>
+					</scroll-view>
+					<view style="margin: 20rpx;display: flex;flex-direction: column;align-items: center;justify-content: center;">
+						<button type="primary" style="padding: 0;height:100rpx;line-height: 100rpx;color: #babbbd;">
+							<uni-icons style="color: #fff;" type="left" size="30"></uni-icons>
+						</button>
+						<button type="primary"
+							style="padding: 0;height:100rpx;line-height: 100rpx;color: #babbbd;margin-top: 30rpx;">
+							<uni-icons style="color: #fff;" type="right" size="30"></uni-icons>
+						</button>
+					</view>
+					<view style="flex: 1;border-radius: 15rpx;border: 1rpx solid #babbbd;padding: 20rpx;">
+
+					</view>
+				</view>
+				<view style="height: 150rpx;border: 1rpx solid #babbbd;border-radius: 15rpx;margin-top: 20rpx;">
+
+				</view>
+				<view style="margin-top: 20rpx;">
+					<u-button type="primary"
+						style="height: 70rpx;line-height:70rpx;width: 300rpx; display: inline-block;">提交</u-button>
+					<u-button
+						style="height: 70rpx;line-height:70rpx;width: 300rpx; display: inline-block;margin-left: 20rpx;">关闭</u-button>
+				</view>
+
+			</view>
+		</uni-popup>
+	</view>
+</template>
+
+<script>
+	import myMosoweTreeList from '../../components/myMosoweTreeList/myMosoweTreeList.vue'
+	export default {
+		components: {
+			myMosoweTreeList
+		},
+		data() {
+			return {
+				data: [],
+				treeList: [{
+						_id: '64589cd409e29891989bc316',
+						enable: false,
+						text: '用户管理',
+						childrens: [{
+								_id: '64589cd409e29891989bc317',
+								enable: true,
+								text: '查看',
+							},
+							{
+								_id: '64589cd409e29891989bc318',
+								enable: true,
+								text: '新增',
+							},
+							{
+								_id: '64589cd409e29891989bc319',
+								enable: true,
+								text: '编辑',
+							},
+							{
+								_id: '64589cd409e29891989bc31a',
+								enable: true,
+								text: '删除',
+							},
+							{
+								_id: '64589cd409e29891989bc31b',
+								enable: true,
+								text: '重置密码',
+							},
+							{
+								_id: '64589cd409e29891989bc31c',
+								enable: true,
+								text: '用户状态设置',
+							}
+						],
+					},
+					{
+						_id: '64589cd409e29891989bc31d',
+						enable: true,
+						text: '菜单管理',
+						childrens: [{
+								_id: '64589cd409e29891989bc31e',
+								enable: true,
+								text: '查看',
+							},
+							{
+								_id: '64589cd409e29891989bc31f',
+								enable: true,
+								text: '新增',
+							},
+							{
+								_id: '64589cd409e29891989bc320',
+								enable: true,
+								text: '编辑',
+							},
+							{
+								_id: '64589cd409e29891989bc321',
+								enable: true,
+								text: '删除',
+							}
+						],
+					},
+					{
+						_id: '64589cd409e29891989bc322',
+						enable: true,
+						text: '角色管理',
+						childrens: [{
+								_id: '64589cd409e29891989bc323',
+								enable: true,
+								text: '查看',
+							},
+							{
+								_id: '64589cd409e29891989bc324',
+								enable: true,
+								text: '新增',
+							},
+							{
+								_id: '64589cd409e29891989bc325',
+								enable: true,
+								text: '编辑',
+							},
+							{
+								_id: '64589cd409e29891989bc326',
+								enable: true,
+								text: '删除',
+							}
+						]
+					}
+				],
+
+			}
+		},
+		methods: {
+			open() {
+				this.$refs.popup.open()
+			}
+		}
+	}
+</script>
+
+<style>
+</style>

+ 8 - 0
uni_modules/mosowe-tree-list/changelog.md

@@ -0,0 +1,8 @@
+## 1.0.5(2023-11-30)
+小程序不支持插槽,如需修改,请更改组件注释处
+## 1.0.4(2023-11-30)
+优化小程序端插槽问题
+## 1.0.3(2023-11-15)
+优化
+## 1.0.0(2023-11-15)
+上传

+ 535 - 0
uni_modules/mosowe-tree-list/components/mosowe-tree-list/mosowe-tree-list.vue

@@ -0,0 +1,535 @@
+<!--
+ 树形结构数据展示
+ @Author: mosowe
+ @Date:2023-05-11 11:17:58
+-->
+<template>
+  <view
+    class=""
+    v-if="treeData.length">
+    <view
+      class="mosowe-tree-list-component"
+      v-for="(item, index) in treeData"
+      :key="index">
+      <view class="mosowe-tree-title-wrap">
+        <view class="mosowe-tree-title-icon">
+          <view
+            class="icon"
+            v-if="item[children] && item[children].length"
+            :class="{
+              open: showChidren.includes(item[nodeKey]),
+              close: !showChidren.includes(item[nodeKey])
+            }"
+            @click="toggleChildrens(item[nodeKey])"></view>
+        </view>
+        <view
+          class="mosowe-tree-title-selection"
+          :class="{
+            disabled: item.disabled,
+            'part-select':
+              item[children] &&
+              treeToArray(JSON.parse(JSON.stringify(item[children])), children).filter((ci) =>
+                selectionList.includes(ci[nodeKey])
+              ).length > 0 &&
+              !selectionList.includes(item[nodeKey]),
+            'all-select': selectionList.includes(item[nodeKey])
+          }"
+          v-if="multiple"
+          @click="selectionClick(item)"></view>
+        <view
+          class="mosowe-tree-title-name"
+          @click.stop="nodeClick(item)">
+          <!-- #ifndef MP -->
+          <slot :node="item">
+            {{ item[text] }}
+          </slot>
+          <!-- #endif -->
+          <!-- #ifdef MP -->
+          <!-- 小程序不支持此类插槽,需要自行处理相关结构在此处 -->
+          {{ item[text] }}
+          <!-- #endif -->
+        </view>
+      </view>
+      <template v-if="item[children] && item[children].length">
+        <template v-if="showChidren.indexOf(item[nodeKey]) > -1">
+          <view class="mosowe-tree-children-wrap">
+            <mosowe-tree-list
+              v-model="selectionList"
+              :treeData="item[children]"
+              :text="text"
+              :children="children"
+              :multiple="multiple"
+              :nodeKey="nodeKey"
+              :defaultShowChildren="defaultShowChildren"
+              :textClickToggle="textClickToggle"
+              :accordion="accordion"
+              :index="index + 1"
+              :isOnceShow="onceShow"
+              @nodeClick="nodeClick"
+              @childCancel="childCancel(item)"
+              @childChoosed="childChoosed(item)">
+              <!-- #ifndef MP -->
+              <template #default="{ node }">
+                <slot :node="node">
+                  {{ node[text] }}
+                </slot>
+              </template>
+              <!-- #endif -->
+            </mosowe-tree-list>
+          </view>
+        </template>
+      </template>
+    </view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'mosowe-tree-list',
+  emits: ['nodeClick', 'childCancel', 'childChoosed', 'update:modelValue'],
+  props: {
+    modelValue: {
+      type: Array,
+      default: () => []
+    },
+    value: {
+      type: Array,
+      default: () => []
+    },
+    treeData: {
+      // 数据
+      type: Array,
+      default: () => []
+    },
+    text: {
+      // 显示的文案标题字段
+      type: String,
+      default: 'text'
+    },
+    nodeKey: {
+      // 目标字段
+      type: String,
+      default: 'value'
+    },
+    children: {
+      // 子集字段
+      type: String,
+      default: 'childrens'
+    },
+    multiple: {
+      // 显示多选框
+      type: Boolean,
+      default: false
+    },
+    textClickToggle: {
+      // 标题点击触发子集列表显隐
+      type: Boolean,
+      default: false
+    },
+    defaultShowChildren: {
+      // 默认展开所有,或展开几级
+      type: [Boolean, Number],
+      default: false
+    },
+    accordion: {
+      // 手风琴模式
+      type: Boolean,
+      default: false
+    },
+    index: {
+      // 当前层级
+      type: Number,
+      default: 1
+    },
+    isOnceShow: {
+      // 是否显示过了
+      type: Boolean,
+      default: false
+    }
+  },
+  data() {
+    return {
+      showChidren: [],
+      once: false,
+      onceShow: false
+    };
+  },
+  computed: {
+    selectionList: {
+      get() {
+        let list = [];
+        // TODO 兼容 vue2
+        // #ifdef VUE2
+        list = this.value;
+        // #endif
+
+        // TODO 兼容 vue3
+        // #ifdef VUE3
+        list = this.modelValue;
+        // #endif
+        if (!this.once && list.length !== 0) {
+          // 只执行一次,初始化时
+          const flatArr = this.getValueByKeyForObject({
+            value: list,
+            source: this.treeData,
+            valueKey: this.nodeKey,
+            targetKey: this.children,
+            treeDataAll: false,
+            treeChildKey: this.children
+          })
+            .flat(Infinity)
+            .filter((item) => item)
+            .map((item) => {
+              return item[this.nodeKey];
+            });
+
+          this.once = true;
+          const r = [...list, ...flatArr];
+          return [...new Set(r)];
+        }
+
+        return list;
+      },
+      set(value) {
+        // TODO 兼容 vue2
+        // #ifdef VUE2
+        this.$emit('input', value);
+        // #endif
+
+        // TODO 兼容 vue3
+        // #ifdef VUE3
+        this.$emit('update:modelValue', value);
+        // #endif
+      }
+    }
+  },
+  watch: {
+    defaultShowChildren: {
+      handler() {
+        if (!this.isOnceShow) {
+          if (this.defaultShowChildren === true) {
+            this.showChidren = this.treeToArray(
+              JSON.parse(JSON.stringify(this.treeData)),
+              this.children
+            ).map((item) => item[this.nodeKey]);
+          } else if (typeof this.defaultShowChildren === 'number') {
+            if (this.index < this.defaultShowChildren) {
+              const findIndex = (treeData, index) => {
+                let r = [];
+                treeData.forEach((item) => {
+                  r.push(item[this.nodeKey]);
+                  if (
+                    index < this.defaultShowChildren &&
+                    item[this.children] &&
+                    item[this.children].length
+                  ) {
+                    r.push(...findIndex(item[this.children], index + 1));
+                  }
+                });
+                return r;
+              };
+              const list = findIndex(JSON.parse(JSON.stringify(this.treeData)), 0);
+              this.showChidren = list;
+            }
+          }
+          let t = setTimeout(() => {
+            clearTimeout(t);
+            t = null;
+            this.onceShow = this.index === 1 ? true : this.isOnceShow;
+          }, 10);
+        }
+      },
+      immediate: true
+    }
+  },
+  methods: {
+    nodeClick(e) {
+      this.$emit('nodeClick', e);
+      console.log(e);
+      if (this.textClickToggle) {
+        this.toggleChildrens(e[this.nodeKey]);
+      }
+    },
+    // 选择
+    selectionClick(node) {
+      const list = [...this.selectionList];
+      const value = node[this.nodeKey];
+      if (node[this.children] && node[this.children].length) {
+        // 此项有子集
+        if (list.includes(value)) {
+          // 已选->改取消选择
+          const index = list.findIndex((item) => item === value);
+          list.splice(index, 1);
+          // 子集的也要取消掉
+          const childrenData = JSON.parse(JSON.stringify(node[this.children]));
+          this.treeToArray(childrenData, this.children).forEach((item) => {
+            const findex = list.findIndex((fitem) => fitem === item[this.nodeKey]);
+            list.splice(findex, 1);
+          });
+          // 父级也要取消
+          this.$emit('childCancel');
+        } else {
+          // 加入已选
+          list.push(value);
+          // 子集的也要全部加入
+          const childrenData = JSON.parse(JSON.stringify(node[this.children]));
+          this.treeToArray(childrenData, this.children).forEach((item) => {
+            list.push(item[this.nodeKey]);
+          });
+          // 父级看情况选择不选择
+          this.$emit('childChoosed');
+        }
+      } else {
+        // 没有子集
+        if (list.includes(value)) {
+          // 已选->改取消选择
+          const index = list.findIndex((item) => item === value);
+          list.splice(index, 1);
+          // 父级也要取消
+          this.$emit('childCancel');
+        } else {
+          // 加入已选
+          list.push(value);
+          // 父级看情况选择不选择
+          this.$emit('childChoosed');
+        }
+      }
+
+      this.selectionList = [...new Set(list)];
+    },
+    childChoosed(node) {
+      let t = setTimeout(() => {
+        clearTimeout(t);
+        t = null;
+        const list = [...this.selectionList];
+        const value = node[this.nodeKey];
+        let join = true;
+        node[this.children].forEach((item) => {
+          if (!list.includes(item[this.nodeKey])) {
+            join = false;
+          }
+        });
+        if (join) {
+          list.push(value);
+        }
+        // 父级也要考虑下选择不
+        this.selectionList = [...new Set(list)];
+        this.$emit('childChoosed');
+      }, 10);
+    },
+    childCancel(node) {
+      let t = setTimeout(() => {
+        clearTimeout(t);
+        t = null;
+        const list = [...this.selectionList];
+        const value = node[this.nodeKey];
+        const index = list.findIndex((item) => item === value);
+        if (index > -1) {
+          list.splice(index, 1);
+          this.selectionList = [...new Set(list)];
+        } // 父级也要取消
+        this.$emit('childCancel');
+      }, 10);
+    },
+    // 展开收起
+    toggleChildrens(key) {
+      if (this.showChidren.includes(key)) {
+        const index = this.showChidren.findIndex((item) => item === key);
+        this.showChidren.splice(index, 1);
+      } else {
+        if (this.accordion) {
+          this.showChidren = [key];
+        } else {
+          this.showChidren.push(key);
+        }
+      }
+    },
+    // 树转数组
+    treeToArray(nodes, childKey) {
+      var r = [];
+      if (Array.isArray(nodes)) {
+        for (var i = 0, l = nodes.length; i < l; i++) {
+          r.push(nodes[i]); // 取每项数据放入一个新数组
+          if (Array.isArray(nodes[i][childKey]) && nodes[i][childKey].length > 0)
+            // 若存在leaf则递归调用,把数据拼接到新数组中,并且删除该leaf
+            r = r.concat(this.treeToArray(nodes[i][childKey]));
+          delete nodes[i][childKey];
+        }
+      }
+      return r;
+    },
+    getValueByKeyForObject(options) {
+      if (!options) {
+        return [];
+      }
+      const {
+        value,
+        source,
+        valueKey,
+        targetKey,
+        treeDataAll = false,
+        treeChildKey = 'leaf'
+      } = options;
+      let treePrefix = '';
+      let result = [];
+      if (!(value ?? '') || !source || !valueKey || !targetKey) {
+        requiredKey(options, ['value', 'source', 'valueKey', 'targetKey']);
+        return [];
+      }
+      let val = value;
+      if (typeof value === 'string') {
+        val = [value];
+      }
+      // 树数据处理
+      const treeDeal = (data) => {
+        if (data[treeChildKey]) {
+          // 是个树
+          let r = this.getValueByKeyForObject({
+            ...options,
+            source: data[treeChildKey]
+          });
+          if (treeDataAll && r.length) {
+            // 需要返回父级数据
+            treePrefix = data[targetKey];
+            r = r.map((item) => {
+              return treePrefix + '/' + item;
+            });
+          }
+          result.push(...r);
+        }
+      };
+      if (Object.prototype.toString.call(source) === '[object Object]') {
+        // object类型,假设是树
+        if (val.includes(source[valueKey])) {
+          result.push(source[targetKey]);
+        }
+        treeDeal(source);
+      } else {
+        // 数组,也可能是数组树
+        source.forEach((item) => {
+          if (Object.prototype.toString.call(item) === '[object Object]') {
+            // object类型,假设是树
+            if (val.includes(item[valueKey])) {
+              result.push(item[targetKey]);
+            }
+            treeDeal(item); // 树处理
+          }
+          if (Array.isArray(item)) {
+            // 多维数组
+            result.push(
+              ...this.getValueByKeyForObject({
+                ...options,
+                source: item
+              })
+            );
+          }
+        });
+      }
+      return result;
+    },
+    requiredKey(obj, keys) {
+      let r = [];
+      keys.forEach((item) => {
+        if (ZoIsEmpty(obj[item])) {
+          console.error(`${item} is required!`);
+          r.push(item);
+        }
+      });
+      return r;
+    }
+  }
+};
+</script>
+
+<style scoped lang="scss">
+.mosowe-tree-list-component {
+  font-size: 14px;
+  color: #333;
+  line-height: 24px;
+  .mosowe-tree-title-wrap {
+    display: flex;
+    align-items: center;
+    .mosowe-tree-title-icon {
+      flex: none;
+      width: 20px;
+      height: 20px;
+      .icon {
+        width: 100%;
+        height: 100%;
+        display: flex;
+        position: relative;
+        cursor: pointer;
+        transition: all 0.3s;
+        &::before {
+          content: '';
+          display: inline-block;
+          width: 0;
+          height: 0;
+          border: 6px solid;
+          border-color: transparent transparent transparent #999;
+          margin: auto;
+          margin-right: -2rpx;
+        }
+        &.open {
+          transform: rotate(90deg);
+          transform-origin: center;
+        }
+      }
+    }
+    .mosowe-tree-title-selection {
+      flex: none;
+      width: 12px;
+      height: 12px;
+      border: 1px solid #ccc;
+      border-radius: 2px;
+      margin-right: 4px;
+      cursor: pointer;
+      position: relative;
+      &.part-select {
+        background-color: $uni-color-primary;
+        border-color: $uni-color-primary;
+        &::after {
+          content: '';
+          display: block;
+          width: 8px;
+          height: 2px;
+          background-color: #fff;
+          border-radius: 2px;
+          position: absolute;
+          left: 50%;
+          top: 50%;
+          transform: translateX(-50%) translateY(-50%);
+        }
+      }
+      &.all-select {
+        background-color: $uni-color-primary;
+        border-color: $uni-color-primary;
+        &::after {
+          content: '';
+          display: block;
+          width: 6px;
+          height: 3px;
+          border: 2px solid;
+          border-color: transparent transparent #fff #fff;
+          border-radius: 2px;
+          position: absolute;
+          left: 50%;
+          top: 50%;
+          transform: translateX(-50%) translateY(-80%) rotate(-45deg);
+        }
+      }
+      &.disabled {
+        background-color: rgba(0, 0, 0, 0.2);
+        cursor: no-drop;
+      }
+    }
+    .mosowe-tree-title-name {
+      flex: 1;
+      cursor: pointer;
+    }
+  }
+  .mosowe-tree-children-wrap {
+    padding-left: 10px;
+  }
+}
+</style>

+ 81 - 0
uni_modules/mosowe-tree-list/package.json

@@ -0,0 +1,81 @@
+{
+  "id": "mosowe-tree-list",
+  "displayName": "mosowe-tree-list树形结构展示,兼容v2 v3",
+  "version": "1.0.5",
+  "description": "兼容v2/v2树形结构,可单选,多选,不再维护,建议使用mosowe-tree虚拟树组件:https://ext.dcloud.net.cn/plugin?id=16764",
+  "keywords": [
+    "树形结构",
+    "树结构"
+],
+  "repository": "",
+"engines": {
+  },
+  "dcloudext": {
+    "type": "component-vue",
+    "sale": {
+      "regular": {
+        "price": "0.00"
+      },
+      "sourcecode": {
+        "price": "0.00"
+      }
+    },
+    "contact": {
+      "qq": ""
+    },
+    "declaration": {
+      "ads": "无",
+      "data": "插件不采集任何数据",
+      "permissions": "无"
+    },
+    "npmurl": ""
+  },
+  "uni_modules": {
+    "dependencies": [],
+    "encrypt": [],
+    "platforms": {
+      "cloud": {
+        "tcb": "y",
+        "aliyun": "y"
+      },
+      "client": {
+        "Vue": {
+          "vue2": "y",
+          "vue3": "y"
+        },
+        "App": {
+          "app-vue": "y",
+          "app-nvue": "y"
+        },
+        "H5-mobile": {
+          "Safari": "y",
+          "Android Browser": "y",
+          "微信浏览器(Android)": "y",
+          "QQ浏览器(Android)": "y"
+        },
+        "H5-pc": {
+          "Chrome": "y",
+          "IE": "y",
+          "Edge": "y",
+          "Firefox": "y",
+          "Safari": "y"
+        },
+        "小程序": {
+          "微信": "y",
+          "阿里": "y",
+          "百度": "y",
+          "字节跳动": "y",
+          "QQ": "y",
+          "钉钉": "y",
+          "快手": "y",
+          "飞书": "y",
+          "京东": "y"
+        },
+        "快应用": {
+          "华为": "y",
+          "联盟": "y"
+        }
+      }
+    }
+  }
+}

+ 374 - 0
uni_modules/mosowe-tree-list/readme.md

@@ -0,0 +1,374 @@
+树形结构,支持多选,默认都收起,为保证数据量大的时候页面卡顿问题,采用 v-if 渲染子数据,如果数据巨大,又默认全展开,可能页面会有性能问题,建议默认关闭或展开少数层级。
+
+## props
+
+| prop                | 类型           | 默认      | 说明                                   |
+| ------------------- | -------------- | --------- | -------------------------------------- |
+| v-model             | Array          | []        | 默认值                                 |
+| treeData            | Array          | []        | 树结构`1.0.2`                          |
+| text                | string         | text      | 展示标题字段                           |
+| nodeKey             | string         | value     | 目标字段,即多选后返回的数组值对应的键 |
+| children            | string         | childrens | 子集列表键                             |
+| multiple            | Boolean        | false     | 是否开启多选`1.0.2`                    |
+| textClickToggle     | Boolean        | false     | 标题点击触发子集列表显隐               |
+| defaultShowChildren | Boolean/Number | false     | 默认展开所有,或展开 Number 级         |
+| accordion           | Boolean        | false     | 手风琴模式,每次只展开一项             |
+
+## emits
+
+| emit      | 说明                                     |
+| --------- | ---------------------------------------- |
+| nodeClick | 点击标题时触发事件,回调参数为当前项数据 |
+
+## slot
+
+| slot    | 说明                                                           |
+| ------- | -------------------------------------------------------------- |
+| default | 节点文案区插槽,不包含左侧图标和多选框,作用域参数为:{ node } |
+
+## 示例
+
+```html
+<template>
+  <view class="">
+    <mosowe-tree-list
+      v-model="data"
+      :treeData="treeList"
+      text="name"
+      nodeKey="permission"
+      defaultShowChildren
+      accordion
+      multiple>
+      <template #default="{ node }">
+        <view class="test">{{ node.name }}</view>
+      </template>
+    </mosowe-tree-list>
+  </view>
+</template>
+
+<script
+  setup
+  lang="ts">
+  import { ref, watch } from 'vue';
+  import { onShow } from '@dcloudio/uni-app';
+  const data = ref([]);
+  watch(
+    () => data.value,
+    () => {
+      console.log(data.value);
+    }
+  );
+  const treeList = [
+    {
+      _id: '64589cd409e29891989bc315',
+      comment: '系统管理-目录',
+      create_date: 0,
+      enable: true,
+      icon: 'uni-icons-list',
+      menu_id: 'system',
+      name: '系统管理',
+      parent_id: '',
+      permission: 'system',
+      sort: 99,
+      type: 0,
+      url: '',
+      childrens: [
+        {
+          _id: '64589cd409e29891989bc316',
+          comment: '用户管理',
+          create_date: 0,
+          enable: true,
+          icon: 'uni-icons-person-filled',
+          menu_id: 'system-user',
+          name: '用户管理',
+          parent_id: 'system',
+          permission: 'system-user',
+          sort: 99,
+          type: 1,
+          url: '/pages/system/users/users',
+          childrens: [
+            {
+              _id: '64589cd409e29891989bc317',
+              comment: '用户管理-查看',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-user-see',
+              name: '查看',
+              parent_id: 'system-user',
+              permission: 'system-user-see',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '查看',
+              value: 'system-user-see'
+            },
+            {
+              _id: '64589cd409e29891989bc318',
+              comment: '用户管理-新增',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-user-add',
+              name: '新增',
+              parent_id: 'system-user',
+              permission: 'system-user-add',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '新增',
+              value: 'system-user-add'
+            },
+            {
+              _id: '64589cd409e29891989bc319',
+              comment: '用户管理-编辑',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-user-edit',
+              name: '编辑',
+              parent_id: 'system-user',
+              permission: 'system-user-edit',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '编辑',
+              value: 'system-user-edit'
+            },
+            {
+              _id: '64589cd409e29891989bc31a',
+              comment: '用户管理-删除',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-user-delete',
+              name: '删除',
+              parent_id: 'system-user',
+              permission: 'system-user-delete',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '删除',
+              value: 'system-user-delete'
+            },
+            {
+              _id: '64589cd409e29891989bc31b',
+              comment: '用户管理-重置密码',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-user-password',
+              name: '重置密码',
+              parent_id: 'system-user',
+              permission: 'system-user-password',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '重置密码',
+              value: 'system-user-password'
+            },
+            {
+              _id: '64589cd409e29891989bc31c',
+              comment: '用户管理-用户状态设置,启用禁用',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-user-status',
+              name: '用户状态设置',
+              parent_id: 'system-user',
+              permission: 'system-user-status',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '用户状态设置',
+              value: 'system-user-status'
+            }
+          ],
+          text: '用户管理',
+          value: '/pages/system/users/users'
+        },
+        {
+          _id: '64589cd409e29891989bc31d',
+          comment: '菜单管理',
+          create_date: 0,
+          enable: true,
+          icon: 'uni-icons-list',
+          menu_id: 'system-menu',
+          name: '菜单管理',
+          parent_id: 'system',
+          permission: 'system-menu',
+          sort: 99,
+          type: 1,
+          url: '/pages/system/menus/menus',
+          childrens: [
+            {
+              _id: '64589cd409e29891989bc31e',
+              comment: '菜单管理-查看',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-menu-see',
+              name: '查看',
+              parent_id: 'system-menu',
+              permission: 'system-menu-see',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '查看',
+              value: 'system-menu-see'
+            },
+            {
+              _id: '64589cd409e29891989bc31f',
+              comment: '菜单管理-新增',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-menu-add',
+              name: '新增',
+              parent_id: 'system-menu',
+              permission: 'system-menu-add',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '新增',
+              value: 'system-menu-add'
+            },
+            {
+              _id: '64589cd409e29891989bc320',
+              comment: '菜单管理-编辑',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-menu-edit',
+              name: '编辑',
+              parent_id: 'system-menu',
+              permission: 'system-menu-edit',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '编辑',
+              value: 'system-menu-edit'
+            },
+            {
+              _id: '64589cd409e29891989bc321',
+              comment: '菜单管理-删除',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-menu-delete',
+              name: '删除',
+              parent_id: 'system-menu',
+              permission: 'system-menu-delete',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '删除',
+              value: 'system-menu-delete'
+            }
+          ],
+          text: '菜单管理',
+          value: '/pages/system/menus/menus'
+        },
+        {
+          _id: '64589cd409e29891989bc322',
+          comment: '角色管理',
+          create_date: 0,
+          enable: true,
+          icon: '',
+          menu_id: 'system-roles',
+          name: '角色管理',
+          parent_id: 'system',
+          permission: 'system-roles',
+          sort: 99,
+          type: 1,
+          url: '/pages/system/roles/roles',
+          childrens: [
+            {
+              _id: '64589cd409e29891989bc323',
+              comment: '角色管理-查看',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-roles-see',
+              name: '查看',
+              parent_id: 'system-roles',
+              permission: 'system-roles-see',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '查看',
+              value: 'system-roles-see'
+            },
+            {
+              _id: '64589cd409e29891989bc324',
+              comment: '角色管理-新增',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-roles-add',
+              name: '新增',
+              parent_id: 'system-roles',
+              permission: 'system-roles-add',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '新增',
+              value: 'system-roles-add'
+            },
+            {
+              _id: '64589cd409e29891989bc325',
+              comment: '角色管理-编辑',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-roles-edit',
+              name: '编辑',
+              parent_id: 'system-roles',
+              permission: 'system-roles-edit',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '编辑',
+              value: 'system-roles-edit'
+            },
+            {
+              _id: '64589cd409e29891989bc326',
+              comment: '角色管理-删除',
+              create_date: 0,
+              enable: true,
+              icon: '',
+              menu_id: 'system-roles-delete',
+              name: '删除',
+              parent_id: 'system-roles',
+              permission: 'system-roles-delete',
+              sort: 99,
+              type: 2,
+              url: '',
+              childrens: [],
+              text: '删除',
+              value: 'system-roles-delete'
+            }
+          ],
+          text: '角色管理',
+          value: '/pages/system/roles/roles'
+        }
+      ],
+      text: '系统管理',
+      value: 'system'
+    }
+  ];
+</script>
+```

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

@@ -0,0 +1,92 @@
+## 1.9.5(2024-10-15)
+- 修复 微信小程序中的getSystemInfo警告
+## 1.9.4(2024-10-12)
+- 修复 微信小程序中的getSystemInfo警告
+## 1.9.3(2024-10-12)
+- 修复 微信小程序中的getSystemInfo警告
+## 1.9.2(2024-09-21)
+- 修复 uni-popup在android上的重复点击弹出位置不正确的bug
+## 1.9.1(2024-04-02)
+- 修复 uni-popup-dialog vue3下使用value无法进行绑定的bug(双向绑定兼容旧写法)
+## 1.9.0(2024-03-28)
+- 修复 uni-popup-dialog 双向绑定时初始化逻辑修正
+## 1.8.9(2024-03-20)
+- 修复 uni-popup-dialog 数据输入时修正为双向绑定
+## 1.8.8(2024-02-20)
+- 修复 uni-popup 在微信小程序下出现文字向上闪动的bug
+## 1.8.7(2024-02-02)
+- 新增 uni-popup-dialog 新增属性focus:input模式下,是否自动自动聚焦
+## 1.8.6(2024-01-30)
+- 新增 uni-popup-dialog 新增属性maxLength:限制输入框字数
+## 1.8.5(2024-01-26)
+- 新增 uni-popup-dialog 新增属性showClose:控制关闭按钮的显示
+## 1.8.4(2023-11-15)
+- 新增 uni-popup 支持uni-app-x 注意暂时仅支持 `maskClick` `@open` `@close`
+## 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)
+- 修复 小程序中高度错误的bug
+## 1.7.7(2022-03-17)
+- 修复 快速调用open出现问题的Bug
+## 1.7.6(2022-02-14)
+- 修复 safeArea 属性不能设置为false的bug
+## 1.7.5(2022-01-19)
+- 修复 isMaskClick 失效的bug
+## 1.7.4(2022-01-19)
+- 新增 cancelText \ confirmText 属性 ,可自定义文本
+- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
+- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
+## 1.7.3(2022-01-13)
+- 修复 设置 safeArea 属性不生效的bug
+## 1.7.2(2021-11-26)
+- 优化 组件示例
+## 1.7.1(2021-11-26)
+- 修复 vuedoc 文字错误
+## 1.7.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-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
+## 1.6.2(2021-08-24)
+- 新增 支持国际化
+## 1.6.1(2021-07-30)
+- 优化 vue3下事件警告的问题
+## 1.6.0(2021-07-13)
+- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
+## 1.5.0(2021-06-23)
+- 新增 mask-click 遮罩层点击事件
+## 1.4.5(2021-06-22)
+- 修复 nvue 平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.4(2021-06-18)
+- 修复 H5平台中间弹出后,点击内容,再点击遮罩无法关闭的Bug
+## 1.4.3(2021-06-08)
+- 修复 错误的 watch 字段
+- 修复 safeArea 属性不生效的问题
+- 修复 点击内容,再点击遮罩无法关闭的Bug
+## 1.4.2(2021-05-12)
+- 新增 组件示例地址
+## 1.4.1(2021-04-29)
+- 修复 组件内放置 input 、textarea 组件,无法聚焦的问题
+## 1.4.0 (2021-04-29)
+- 新增 type 属性的 left\right 值,支持左右弹出
+- 新增 open(String:type) 方法参数 ,可以省略 type 属性 ,直接传入类型打开指定弹窗
+- 新增 backgroundColor 属性,可定义主窗口背景色,默认不显示背景色
+- 新增 safeArea 属性,是否适配底部安全区
+- 修复 App\h5\微信小程序底部安全区占位不对的Bug
+- 修复 App 端弹出等待的Bug
+- 优化 提升低配设备性能,优化动画卡顿问题
+- 优化 更简单的组件自定义方式
+## 1.2.9(2021-02-05)
+- 优化 组件引用关系,通过uni_modules引用组件
+## 1.2.8(2021-02-05)
+- 调整为uni_modules目录规范
+## 1.2.7(2021-02-05)
+- 调整为uni_modules目录规范
+- 新增 支持 PC 端
+- 新增 uni-popup-message 、uni-popup-dialog扩展组件支持 PC 端

+ 45 - 0
uni_modules/uni-popup/components/uni-popup-dialog/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    this.$once('hook:beforeDestroy', () => {
+      document.removeEventListener('keyup', listener)
+    })
+  },
+	render: () => {}
+}
+// #endif

+ 316 - 0
uni_modules/uni-popup/components/uni-popup-dialog/uni-popup-dialog.vue

@@ -0,0 +1,316 @@
+<template>
+	<view class="uni-popup-dialog">
+		<view class="uni-dialog-title">
+			<text class="uni-dialog-title-text" :class="['uni-popup__'+dialogType]">{{titleText}}</text>
+		</view>
+		<view v-if="mode === 'base'" class="uni-dialog-content">
+			<slot>
+				<text class="uni-dialog-content-text">{{content}}</text>
+			</slot>
+		</view>
+		<view v-else class="uni-dialog-content">
+			<slot>
+				<input class="uni-dialog-input" :maxlength="maxlength" v-model="val" :type="inputType"
+					:placeholder="placeholderText" :focus="focus">
+			</slot>
+		</view>
+		<view class="uni-dialog-button-group">
+			<view class="uni-dialog-button" v-if="showClose" @click="closeDialog">
+				<text class="uni-dialog-button-text">{{closeText}}</text>
+			</view>
+			<view class="uni-dialog-button" :class="showClose?'uni-border-left':''" @click="onOk">
+				<text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
+			</view>
+		</view>
+
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	import {
+		initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from '../uni-popup/i18n/index.js'
+	const {
+		t
+	} = initVueI18n(messages)
+	/**
+	 * PopUp 弹出层-对话框样式
+	 * @description 弹出层-对话框样式
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} value input 模式下的默认值
+	 * @property {String} placeholder input 模式下输入提示
+	 * @property {Boolean} focus input模式下是否自动聚焦,默认为true
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} mode = [base|input] 模式、
+	 * 	@value base 基础对话框
+	 * 	@value input 可输入对话框
+	 * @showClose {Boolean} 是否显示关闭按钮
+	 * @property {String} content 对话框内容
+	 * @property {Boolean} beforeClose 是否拦截取消事件
+	 * @property {Number} maxlength 输入
+	 * @event {Function} confirm 点击确认按钮触发
+	 * @event {Function} close 点击取消按钮触发
+	 */
+
+	export default {
+		name: "uniPopupDialog",
+		mixins: [popup],
+		emits: ['confirm', 'close', 'update:modelValue', 'input'],
+		props: {
+			inputType: {
+				type: String,
+				default: 'text'
+			},
+			showClose: {
+				type: Boolean,
+				default: true
+			},
+			// #ifdef VUE2
+			value: {
+				type: [String, Number],
+				default: ''
+			},
+			// #endif
+			// #ifdef VUE3
+			modelValue: {
+				type: [Number, String],
+				default: ''
+			},
+			// #endif
+
+
+			placeholder: {
+				type: [String, Number],
+				default: ''
+			},
+			type: {
+				type: String,
+				default: 'error'
+			},
+			mode: {
+				type: String,
+				default: 'base'
+			},
+			title: {
+				type: String,
+				default: ''
+			},
+			content: {
+				type: String,
+				default: ''
+			},
+			beforeClose: {
+				type: Boolean,
+				default: false
+			},
+			cancelText: {
+				type: String,
+				default: ''
+			},
+			confirmText: {
+				type: String,
+				default: ''
+			},
+			maxlength: {
+				type: Number,
+				default: -1,
+			},
+			focus: {
+				type: Boolean,
+				default: true,
+			}
+		},
+		data() {
+			return {
+				dialogType: 'error',
+				val: ""
+			}
+		},
+		computed: {
+			okText() {
+				return this.confirmText || t("uni-popup.ok")
+			},
+			closeText() {
+				return this.cancelText || t("uni-popup.cancel")
+			},
+			placeholderText() {
+				return this.placeholder || t("uni-popup.placeholder")
+			},
+			titleText() {
+				return this.title || t("uni-popup.title")
+			}
+		},
+		watch: {
+			type(val) {
+				this.dialogType = val
+			},
+			mode(val) {
+				if (val === 'input') {
+					this.dialogType = 'info'
+				}
+			},
+			value(val) {
+				if (this.maxlength != -1 && this.mode === 'input') {
+					this.val = val.slice(0, this.maxlength);
+				} else {
+					this.val = val
+				}
+			},
+			val(val) {
+				// #ifdef VUE2
+				// TODO 兼容 vue2
+				this.$emit('input', val);
+				// #endif
+				// #ifdef VUE3
+				// TODO 兼容 vue3
+				this.$emit('update:modelValue', val);
+				// #endif
+			}
+		},
+		created() {
+			// 对话框遮罩不可点击
+			this.popup.disableMask()
+			// this.popup.closeMask()
+			if (this.mode === 'input') {
+				this.dialogType = 'info'
+				this.val = this.value;
+				// #ifdef VUE3
+				this.val = this.modelValue;
+				// #endif
+			} else {
+				this.dialogType = this.type
+			}
+		},
+		methods: {
+			/**
+			 * 点击确认按钮
+			 */
+			onOk() {
+				if (this.mode === 'input') {
+					this.$emit('confirm', this.val)
+				} else {
+					this.$emit('confirm')
+				}
+				if (this.beforeClose) return
+				this.popup.close()
+			},
+			/**
+			 * 点击取消按钮
+			 */
+			closeDialog() {
+				this.$emit('close')
+				if (this.beforeClose) return
+				this.popup.close()
+			},
+			close() {
+				this.popup.close()
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.uni-popup-dialog {
+		width: 300px;
+		border-radius: 11px;
+		background-color: #fff;
+	}
+
+	.uni-dialog-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 25px;
+	}
+
+	.uni-dialog-title-text {
+		font-size: 16px;
+		font-weight: 500;
+	}
+
+	.uni-dialog-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		padding: 20px;
+	}
+
+	.uni-dialog-content-text {
+		font-size: 14px;
+		color: #6C6C6C;
+	}
+
+	.uni-dialog-button-group {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		border-top-color: #f5f5f5;
+		border-top-style: solid;
+		border-top-width: 1px;
+	}
+
+	.uni-dialog-button {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+
+		flex: 1;
+		flex-direction: row;
+		justify-content: center;
+		align-items: center;
+		height: 45px;
+	}
+
+	.uni-border-left {
+		border-left-color: #f0f0f0;
+		border-left-style: solid;
+		border-left-width: 1px;
+	}
+
+	.uni-dialog-button-text {
+		font-size: 16px;
+		color: #333;
+	}
+
+	.uni-button-color {
+		color: #007aff;
+	}
+
+	.uni-dialog-input {
+		flex: 1;
+		font-size: 14px;
+		border: 1px #eee solid;
+		height: 40px;
+		padding: 0 10px;
+		border-radius: 5px;
+		color: #555;
+	}
+
+	.uni-popup__success {
+		color: #4cd964;
+	}
+
+	.uni-popup__warn {
+		color: #f0ad4e;
+	}
+
+	.uni-popup__error {
+		color: #dd524d;
+	}
+
+	.uni-popup__info {
+		color: #909399;
+	}
+</style>

+ 143 - 0
uni_modules/uni-popup/components/uni-popup-message/uni-popup-message.vue

@@ -0,0 +1,143 @@
+<template>
+	<view class="uni-popup-message">
+		<view class="uni-popup-message__box fixforpc-width" :class="'uni-popup__'+type">
+			<slot>
+				<text class="uni-popup-message-text" :class="'uni-popup__'+type+'-text'">{{message}}</text>
+			</slot>
+		</view>
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	/**
+	 * PopUp 弹出层-消息提示
+	 * @description 弹出层-消息提示
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [success|warning|info|error] 主题样式
+	 *  @value success 成功
+	 * 	@value warning 提示
+	 * 	@value info 消息
+	 * 	@value error 错误
+	 * @property {String} message 消息提示文字
+	 * @property {String} duration 显示时间,设置为 0 则不会自动关闭
+	 */
+
+	export default {
+		name: 'uniPopupMessage',
+		mixins:[popup],
+		props: {
+			/**
+			 * 主题 success/warning/info/error	  默认 success
+			 */
+			type: {
+				type: String,
+				default: 'success'
+			},
+			/**
+			 * 消息文字
+			 */
+			message: {
+				type: String,
+				default: ''
+			},
+			/**
+			 * 显示时间,设置为 0 则不会自动关闭
+			 */
+			duration: {
+				type: Number,
+				default: 3000
+			},
+			maskShow:{
+				type:Boolean,
+				default:false
+			}
+		},
+		data() {
+			return {}
+		},
+		created() {
+			this.popup.maskShow = this.maskShow
+			this.popup.messageChild = this
+		},
+		methods: {
+			timerClose(){
+				if(this.duration === 0) return
+				clearTimeout(this.timer) 
+				this.timer = setTimeout(()=>{
+					this.popup.close()
+				},this.duration)
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-popup-message {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+	}
+
+	.uni-popup-message__box {
+		background-color: #e1f3d8;
+		padding: 10px 15px;
+		border-color: #eee;
+		border-style: solid;
+		border-width: 1px;
+		flex: 1;
+	}
+
+	@media screen and (min-width: 500px) {
+		.fixforpc-width {
+			margin-top: 20px;
+			border-radius: 4px;
+			flex: none;
+			min-width: 380px;
+			/* #ifndef APP-NVUE */
+			max-width: 50%;
+			/* #endif */
+			/* #ifdef APP-NVUE */
+			max-width: 500px;
+			/* #endif */
+		}
+	}
+
+	.uni-popup-message-text {
+		font-size: 14px;
+		padding: 0;
+	}
+
+	.uni-popup__success {
+		background-color: #e1f3d8;
+	}
+
+	.uni-popup__success-text {
+		color: #67C23A;
+	}
+
+	.uni-popup__warn {
+		background-color: #faecd8;
+	}
+
+	.uni-popup__warn-text {
+		color: #E6A23C;
+	}
+
+	.uni-popup__error {
+		background-color: #fde2e2;
+	}
+
+	.uni-popup__error-text {
+		color: #F56C6C;
+	}
+
+	.uni-popup__info {
+		background-color: #F2F6FC;
+	}
+
+	.uni-popup__info-text {
+		color: #909399;
+	}
+</style>

+ 187 - 0
uni_modules/uni-popup/components/uni-popup-share/uni-popup-share.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="uni-popup-share">
+		<view class="uni-share-title"><text class="uni-share-title-text">{{shareTitleText}}</text></view>
+		<view class="uni-share-content">
+			<view class="uni-share-content-box">
+				<view class="uni-share-content-item" v-for="(item,index) in bottomData" :key="index" @click.stop="select(item,index)">
+					<image class="uni-share-image" :src="item.icon" mode="aspectFill"></image>
+					<text class="uni-share-text">{{item.text}}</text>
+				</view>
+
+			</view>
+		</view>
+		<view class="uni-share-button-box">
+			<button class="uni-share-button" @click="close">{{cancelText}}</button>
+		</view>
+	</view>
+</template>
+
+<script>
+	import popup from '../uni-popup/popup.js'
+	import {
+	initVueI18n
+	} from '@dcloudio/uni-i18n'
+	import messages from '../uni-popup/i18n/index.js'
+	const {	t	} = initVueI18n(messages)
+	export default {
+		name: 'UniPopupShare',
+		mixins:[popup],
+		emits:['select'],
+		props: {
+			title: {
+				type: String,
+				default: ''
+			},
+			beforeClose: {
+				type: Boolean,
+				default: false
+			}
+		},
+		data() {
+			return {
+				bottomData: [{
+						text: '微信',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/c2b17470-50be-11eb-b680-7980c8a877b8.png',
+						name: 'wx'
+					},
+					{
+						text: '支付宝',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/d684ae40-50be-11eb-8ff1-d5dcf8779628.png',
+						name: 'ali'
+					},
+					{
+						text: 'QQ',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/e7a79520-50be-11eb-b997-9918a5dda011.png',
+						name: 'qq'
+					},
+					{
+						text: '新浪',
+						icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
+						name: 'sina'
+					},
+					// {
+					// 	text: '百度',
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
+					// 	name: 'copy'
+					// },
+					// {
+					// 	text: '其他',
+					// 	icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
+					// 	name: 'more'
+					// }
+				]
+			}
+		},
+		created() {},
+		computed: {
+			cancelText() {
+				return t("uni-popup.cancel")
+			},
+		shareTitleText() {
+				return this.title || t("uni-popup.shareTitle")
+			}
+		},
+		methods: {
+			/**
+			 * 选择内容
+			 */
+			select(item, index) {
+				this.$emit('select', {
+					item,
+					index
+				})
+				this.close()
+
+			},
+			/**
+			 * 关闭窗口
+			 */
+			close() {
+				if(this.beforeClose) return
+				this.popup.close()
+			}
+		}
+	}
+</script>
+<style lang="scss" >
+	.uni-popup-share {
+		background-color: #fff;
+		border-top-left-radius: 11px;
+		border-top-right-radius: 11px;
+	}
+	.uni-share-title {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		align-items: center;
+		justify-content: center;
+		height: 40px;
+	}
+	.uni-share-title-text {
+		font-size: 14px;
+		color: #666;
+	}
+	.uni-share-content {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		justify-content: center;
+		padding-top: 10px;
+	}
+
+	.uni-share-content-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		flex-wrap: wrap;
+		width: 360px;
+	}
+
+	.uni-share-content-item {
+		width: 90px;
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: column;
+		justify-content: center;
+		padding: 10px 0;
+		align-items: center;
+	}
+
+	.uni-share-content-item:active {
+		background-color: #f5f5f5;
+	}
+
+	.uni-share-image {
+		width: 30px;
+		height: 30px;
+	}
+
+	.uni-share-text {
+		margin-top: 10px;
+		font-size: 14px;
+		color: #3B4144;
+	}
+
+	.uni-share-button-box {
+		/* #ifndef APP-NVUE */
+		display: flex;
+		/* #endif */
+		flex-direction: row;
+		padding: 10px 15px;
+	}
+
+	.uni-share-button {
+		flex: 1;
+		border-radius: 50px;
+		color: #666;
+		font-size: 16px;
+	}
+
+	.uni-share-button::after {
+		border-radius: 50px;
+	}
+</style>

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/en.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "cancel",
+	"uni-popup.ok": "ok",
+	"uni-popup.placeholder": "pleace enter",
+	"uni-popup.title": "Hint",
+	"uni-popup.shareTitle": "Share to"
+}

+ 8 - 0
uni_modules/uni-popup/components/uni-popup/i18n/index.js

@@ -0,0 +1,8 @@
+import en from './en.json'
+import zhHans from './zh-Hans.json'
+import zhHant from './zh-Hant.json'
+export default {
+	en,
+	'zh-Hans': zhHans,
+	'zh-Hant': zhHant
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hans.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "取消",
+	"uni-popup.ok": "确定",
+	"uni-popup.placeholder": "请输入",
+		"uni-popup.title": "提示",
+		"uni-popup.shareTitle": "分享到"
+}

+ 7 - 0
uni_modules/uni-popup/components/uni-popup/i18n/zh-Hant.json

@@ -0,0 +1,7 @@
+{
+	"uni-popup.cancel": "取消",
+	"uni-popup.ok": "確定",
+	"uni-popup.placeholder": "請輸入",
+	"uni-popup.title": "提示",
+	"uni-popup.shareTitle": "分享到"
+}

+ 45 - 0
uni_modules/uni-popup/components/uni-popup/keypress.js

@@ -0,0 +1,45 @@
+// #ifdef H5
+export default {
+  name: 'Keypress',
+  props: {
+    disable: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted () {
+    const keyNames = {
+      esc: ['Esc', 'Escape'],
+      tab: 'Tab',
+      enter: 'Enter',
+      space: [' ', 'Spacebar'],
+      up: ['Up', 'ArrowUp'],
+      left: ['Left', 'ArrowLeft'],
+      right: ['Right', 'ArrowRight'],
+      down: ['Down', 'ArrowDown'],
+      delete: ['Backspace', 'Delete', 'Del']
+    }
+    const listener = ($event) => {
+      if (this.disable) {
+        return
+      }
+      const keyName = Object.keys(keyNames).find(key => {
+        const keyName = $event.key
+        const value = keyNames[key]
+        return value === keyName || (Array.isArray(value) && value.includes(keyName))
+      })
+      if (keyName) {
+        // 避免和其他按键事件冲突
+        setTimeout(() => {
+          this.$emit(keyName, {})
+        }, 0)
+      }
+    }
+    document.addEventListener('keyup', listener)
+    // this.$once('hook:beforeDestroy', () => {
+    //   document.removeEventListener('keyup', listener)
+    // })
+  },
+	render: () => {}
+}
+// #endif

+ 26 - 0
uni_modules/uni-popup/components/uni-popup/popup.js

@@ -0,0 +1,26 @@
+
+export default {
+	data() {
+		return {
+			
+		}
+	},
+	created(){
+		this.popup = this.getParent()
+	},
+	methods:{
+		/**
+		 * 获取父元素实例
+		 */
+		getParent(name = 'uniPopup') {
+			let parent = this.$parent;
+			let parentName = parent.$options.name;
+			while (parentName !== name) {
+				parent = parent.$parent;
+				if (!parent) return false
+				parentName = parent.$options.name;
+			}
+			return parent;
+		},
+	}
+}

+ 90 - 0
uni_modules/uni-popup/components/uni-popup/uni-popup.uvue

@@ -0,0 +1,90 @@
+<template>
+  <view class="popup-root" v-if="isOpen" v-show="isShow" @click="clickMask">
+    <view @click.stop>
+      <slot></slot>
+    </view>
+  </view>
+</template>
+
+<script>
+  type CloseCallBack = ()=> void;
+  let closeCallBack:CloseCallBack = () :void => {};
+  export default {
+    emits:["close","clickMask"],
+    data() {
+      return {
+        isShow:false,
+        isOpen:false
+      }
+    },
+    props: {
+      maskClick: {
+        type: Boolean,
+        default: true
+      },
+    },
+    watch: {
+      // 设置show = true 时,如果没有 open 需要设置为 open
+      isShow:{
+        handler(isShow) {
+          // console.log("isShow",isShow)
+          if(isShow && this.isOpen == false){
+            this.isOpen = true
+          }
+        },
+        immediate:true
+      },
+      // 设置isOpen = true 时,如果没有 isShow 需要设置为 isShow
+      isOpen:{
+        handler(isOpen) {
+          // console.log("isOpen",isOpen)
+          if(isOpen && this.isShow == false){
+            this.isShow = true
+          }
+        },
+        immediate:true
+      }
+    },
+    methods:{
+      open(){
+        // ...funs : CloseCallBack[]
+        // if(funs.length > 0){
+        //   closeCallBack = funs[0]
+        // }
+        this.isOpen = true;
+      },
+      clickMask(){
+        if(this.maskClick == true){
+          this.$emit('clickMask')
+          this.close()
+        }
+      },
+      close(): void{
+        this.isOpen = false;
+        this.$emit('close')
+        closeCallBack()
+      },
+      hiden(){
+        this.isShow = false
+      },
+      show(){
+        this.isShow = true
+      }
+    }
+  }
+</script>
+
+<style>
+.popup-root {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 750rpx;
+  height: 100%;
+  flex: 1;
+  background-color: rgba(0, 0, 0, 0.3);
+  justify-content: center;
+  align-items: center;
+  z-index: 99;
+}
+</style>

+ 518 - 0
uni_modules/uni-popup/components/uni-popup/uni-popup.vue

@@ -0,0 +1,518 @@
+<template>
+	<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">
+				<view class="uni-popup__wrapper" :style="getStyles" :class="[popupstyle]" @click="clear">
+					<slot />
+				</view>
+			</uni-transition>
+		</view>
+		<!-- #ifdef H5 -->
+		<keypress v-if="maskShow" @esc="onTap" />
+		<!-- #endif -->
+	</view>
+</template>
+
+<script>
+	// #ifdef H5
+	import keypress from './keypress.js'
+	// #endif
+
+	/**
+	 * PopUp 弹出层
+	 * @description 弹出层组件,为了解决遮罩弹层的问题
+	 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
+	 * @property {String} type = [top|center|bottom|left|right|message|dialog|share] 弹出方式
+	 * 	@value top 顶部弹出
+	 * 	@value center 中间弹出
+	 * 	@value bottom 底部弹出
+	 * 	@value left		左侧弹出
+	 * 	@value right  右侧弹出
+	 * 	@value message 消息提示
+	 * 	@value dialog 对话框
+	 * 	@value share 底部分享示例
+	 * @property {Boolean} animation = [true|false] 是否开启动画
+	 * @property {Boolean} maskClick = [true|false] 蒙版点击是否关闭弹窗(废弃)
+	 * @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
+	 * @property {String}  backgroundColor 主窗口背景色
+	 * @property {String}  maskBackgroundColor 蒙版颜色
+	 * @property {String}  borderRadius 设置圆角(左上、右上、右下和左下) 示例:"10px 10px 10px 10px"
+	 * @property {Boolean} safeArea		   是否适配底部安全区
+	 * @event {Function} change 打开关闭弹窗触发,e={show: false}
+	 * @event {Function} maskClick 点击遮罩触发
+	 */
+
+	export default {
+		name: 'uniPopup',
+		components: {
+			// #ifdef H5
+			keypress
+			// #endif
+		},
+		emits: ['change', 'maskClick'],
+		props: {
+			// 开启动画
+			animation: {
+				type: Boolean,
+				default: true
+			},
+			// 弹出层类型,可选值,top: 顶部弹出层;bottom:底部弹出层;center:全屏弹出层
+			// message: 消息提示 ; dialog : 对话框
+			type: {
+				type: String,
+				default: 'center'
+			},
+			// maskClick
+			isMaskClick: {
+				type: Boolean,
+				default: null
+			},
+			// TODO 2 个版本后废弃属性 ,使用 isMaskClick
+			maskClick: {
+				type: Boolean,
+				default: null
+			},
+			backgroundColor: {
+				type: String,
+				default: 'none'
+			},
+			safeArea: {
+				type: Boolean,
+				default: true
+			},
+			maskBackgroundColor: {
+				type: String,
+				default: 'rgba(0, 0, 0, 0.4)'
+			},
+			borderRadius:{
+				type: String,
+			}
+		},
+
+		watch: {
+			/**
+			 * 监听type类型
+			 */
+			type: {
+				handler: function(type) {
+					if (!this.config[type]) return
+					this[this.config[type]](true)
+				},
+				immediate: true
+			},
+			isDesktop: {
+				handler: function(newVal) {
+					if (!this.config[newVal]) return
+					this[this.config[this.type]](true)
+				},
+				immediate: true
+			},
+			/**
+			 * 监听遮罩是否可点击
+			 * @param {Object} val
+			 */
+			maskClick: {
+				handler: function(val) {
+					this.mkclick = val
+				},
+				immediate: true
+			},
+			isMaskClick: {
+				handler: function(val) {
+					this.mkclick = val
+				},
+				immediate: true
+			},
+			// H5 下禁止底部滚动
+			showPopup(show) {
+				// #ifdef H5
+				// fix by mehaotian 处理 h5 滚动穿透的问题
+				document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible'
+				// #endif
+			}
+		},
+		data() {
+			return {
+				duration: 300,
+				ani: [],
+				showPopup: false,
+				showTrans: false,
+				popupWidth: 0,
+				popupHeight: 0,
+				config: {
+					top: 'top',
+					bottom: 'bottom',
+					center: 'center',
+					left: 'left',
+					right: 'right',
+					message: 'top',
+					dialog: 'center',
+					share: 'bottom'
+				},
+				maskClass: {
+					position: 'fixed',
+					bottom: 0,
+					top: 0,
+					left: 0,
+					right: 0,
+					backgroundColor: 'rgba(0, 0, 0, 0.4)'
+				},
+				transClass: {
+					backgroundColor: 'transparent',
+					borderRadius: this.borderRadius || "0",
+					position: 'fixed',
+					left: 0,
+					right: 0
+				},
+				maskShow: true,
+				mkclick: true,
+				popupstyle: 'top'
+			}
+		},
+		computed: {
+			getStyles() {
+				let res = { backgroundColor: this.bg };
+				if (this.borderRadius || "0") {
+					res = Object.assign(res, { borderRadius: this.borderRadius })
+				}
+				return res;
+			},
+			isDesktop() {
+				return this.popupWidth >= 500 && this.popupHeight >= 500
+			},
+			bg() {
+				if (this.backgroundColor === '' || this.backgroundColor === 'none') {
+					return 'transparent'
+				}
+				return this.backgroundColor
+			}
+		},
+		mounted() {
+			const fixSize = () => {
+				// #ifdef MP-WEIXIN
+				const {
+					windowWidth,
+					windowHeight,
+					windowTop,
+					safeArea,
+					screenHeight,
+					safeAreaInsets
+				} = uni.getWindowInfo()
+				// #endif
+				// #ifndef MP-WEIXIN
+				const {
+					windowWidth,
+					windowHeight,
+					windowTop,
+					safeArea,
+					screenHeight,
+					safeAreaInsets
+				} = uni.getSystemInfoSync()
+				// #endif
+				this.popupWidth = windowWidth
+				this.popupHeight = windowHeight + (windowTop || 0)
+				// TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
+				if (safeArea && this.safeArea) {
+					// #ifdef MP-WEIXIN
+					this.safeAreaInsets = screenHeight - safeArea.bottom
+					// #endif
+					// #ifndef MP-WEIXIN
+					this.safeAreaInsets = safeAreaInsets.bottom
+					// #endif
+				} else {
+					this.safeAreaInsets = 0
+				}
+			}
+			fixSize()
+			// #ifdef H5
+			// window.addEventListener('resize', fixSize)
+			// this.$once('hook:beforeDestroy', () => {
+			// 	window.removeEventListener('resize', fixSize)
+			// })
+			// #endif
+		},
+		// #ifndef VUE3
+		// TODO vue2
+		destroyed() {
+			this.setH5Visible()
+		},
+		// #endif
+		// #ifdef VUE3
+		// TODO vue3
+		unmounted() {
+			this.setH5Visible()
+		},
+		// #endif
+		activated() {
+   	  this.setH5Visible(!this.showPopup);
+    },
+    deactivated() {
+      this.setH5Visible(true);
+    },
+		created() {
+			// this.mkclick =  this.isMaskClick || this.maskClick
+			if (this.isMaskClick === null && this.maskClick === null) {
+				this.mkclick = true
+			} else {
+				this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
+			}
+			if (this.animation) {
+				this.duration = 300
+			} else {
+				this.duration = 0
+			}
+			// TODO 处理 message 组件生命周期异常的问题
+			this.messageChild = null
+			// TODO 解决头条冒泡的问题
+			this.clearPropagation = false
+			this.maskClass.backgroundColor = this.maskBackgroundColor
+		},
+		methods: {
+			setH5Visible(visible = true) {
+				// #ifdef H5
+				// fix by mehaotian 处理 h5 滚动穿透的问题
+				document.getElementsByTagName('body')[0].style.overflow =  visible ? "visible" : "hidden";
+				// #endif
+			},
+			/**
+			 * 公用方法,不显示遮罩层
+			 */
+			closeMask() {
+				this.maskShow = false
+			},
+			/**
+			 * 公用方法,遮罩层禁止点击
+			 */
+			disableMask() {
+				this.mkclick = false
+			},
+			// TODO nvue 取消冒泡
+			clear(e) {
+				// #ifndef APP-NVUE
+				e.stopPropagation()
+				// #endif
+				this.clearPropagation = true
+			},
+
+			open(direction) {
+				// fix by mehaotian 处理快速打开关闭的情况
+				if (this.showPopup) {
+					return
+				}
+				let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
+				if (!(direction && innerType.indexOf(direction) !== -1)) {
+					direction = this.type
+				}
+				if (!this.config[direction]) {
+					console.error('缺少类型:', direction)
+					return
+				}
+				this[this.config[direction]]()
+				this.$emit('change', {
+					show: true,
+					type: direction
+				})
+			},
+			close(type) {
+				this.showTrans = false
+				this.$emit('change', {
+					show: false,
+					type: this.type
+				})
+				clearTimeout(this.timer)
+				// // 自定义关闭事件
+				// this.customOpen && this.customClose()
+				this.timer = setTimeout(() => {
+					this.showPopup = false
+				}, 300)
+			},
+			// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
+			touchstart() {
+				this.clearPropagation = false
+			},
+
+			onTap() {
+				if (this.clearPropagation) {
+					// fix by mehaotian 兼容 nvue
+					this.clearPropagation = false
+					return
+				}
+				this.$emit('maskClick')
+				if (!this.mkclick) return
+				this.close()
+			},
+			/**
+			 * 顶部弹出样式处理
+			 */
+			top(type) {
+				this.popupstyle = this.isDesktop ? 'fixforpc-top' : 'top'
+				this.ani = ['slide-top']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					right: 0,
+					backgroundColor: this.bg,
+					borderRadius:this.borderRadius || "0"
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPopup = true
+				this.showTrans = true
+				this.$nextTick(() => {
+					this.showPoptrans()
+					if (this.messageChild && this.type === 'message') {
+						this.messageChild.timerClose()
+					}
+				})
+			},
+			/**
+			 * 底部弹出样式处理
+			 */
+			bottom(type) {
+				this.popupstyle = 'bottom'
+				this.ani = ['slide-bottom']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					right: 0,
+					bottom: 0,
+					paddingBottom: this.safeAreaInsets + 'px',
+					backgroundColor: this.bg,
+					borderRadius:this.borderRadius || "0",
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPoptrans()
+			},
+			/**
+			 * 中间弹出样式处理
+			 */
+			center(type) {
+				this.popupstyle = 'center'
+				//微信小程序下,组合动画会出现文字向上闪动问题,再此做特殊处理
+				// #ifdef MP-WEIXIN
+					this.ani = ['fade']
+				// #endif
+				// #ifndef MP-WEIXIN
+					this.ani = ['zoom-out', 'fade']
+				// #endif
+				this.transClass = {
+					position: 'fixed',
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column',
+					/* #endif */
+					bottom: 0,
+					left: 0,
+					right: 0,
+					top: 0,
+					justifyContent: 'center',
+					alignItems: 'center',
+					borderRadius:this.borderRadius || "0"
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPoptrans()
+			},
+			left(type) {
+				this.popupstyle = 'left'
+				this.ani = ['slide-left']
+				this.transClass = {
+					position: 'fixed',
+					left: 0,
+					bottom: 0,
+					top: 0,
+					backgroundColor: this.bg,
+					borderRadius:this.borderRadius || "0",
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column'
+					/* #endif */
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPoptrans()
+			},
+			right(type) {
+				this.popupstyle = 'right'
+				this.ani = ['slide-right']
+				this.transClass = {
+					position: 'fixed',
+					bottom: 0,
+					right: 0,
+					top: 0,
+					backgroundColor: this.bg,
+					borderRadius:this.borderRadius || "0",
+					/* #ifndef APP-NVUE */
+					display: 'flex',
+					flexDirection: 'column'
+					/* #endif */
+				}
+				// TODO 兼容 type 属性 ,后续会废弃
+				if (type) return
+				this.showPoptrans()
+			},
+			showPoptrans(){
+				this.$nextTick(()=>{
+					this.showPopup = true
+					this.showTrans = true
+				})
+			}
+		}
+	}
+</script>
+<style lang="scss">
+	.uni-popup {
+		position: fixed;
+		/* #ifndef APP-NVUE */
+		z-index: 99;
+
+		/* #endif */
+		&.top,
+		&.left,
+		&.right {
+			/* #ifdef H5 */
+			top: var(--window-top);
+			/* #endif */
+			/* #ifndef H5 */
+			top: 0;
+			/* #endif */
+		}
+
+		.uni-popup__wrapper {
+			/* #ifndef APP-NVUE */
+			display: block;
+			/* #endif */
+			position: relative;
+
+			/* iphonex 等安全区设置,底部安全区适配 */
+			/* #ifndef APP-NVUE */
+			// padding-bottom: constant(safe-area-inset-bottom);
+			// padding-bottom: env(safe-area-inset-bottom);
+			/* #endif */
+			&.left,
+			&.right {
+				/* #ifdef H5 */
+				padding-top: var(--window-top);
+				/* #endif */
+				/* #ifndef H5 */
+				padding-top: 0;
+				/* #endif */
+				flex: 1;
+			}
+		}
+	}
+
+	.fixforpc-z-index {
+		/* #ifndef APP-NVUE */
+		z-index: 999;
+		/* #endif */
+	}
+
+	.fixforpc-top {
+		top: 0;
+	}
+</style>

+ 88 - 0
uni_modules/uni-popup/package.json

@@ -0,0 +1,88 @@
+{
+	"id": "uni-popup",
+	"displayName": "uni-popup 弹出层",
+	"version": "1.9.5",
+	"description": " Popup 组件,提供常用的弹层",
+	"keywords": [
+        "uni-ui",
+        "弹出层",
+        "弹窗",
+        "popup",
+        "弹框"
+    ],
+	"repository": "https://github.com/dcloudio/uni-ui",
+	"engines": {
+		"HBuilderX": ""
+	},
+	"directories": {
+		"example": "../../temps/example_temps"
+	},
+    "dcloudext": {
+        "sale": {
+			"regular": {
+				"price": "0.00"
+			},
+			"sourcecode": {
+				"price": "0.00"
+			}
+		},
+		"contact": {
+			"qq": ""
+		},
+		"declaration": {
+			"ads": "无",
+			"data": "无",
+			"permissions": "无"
+		},
+        "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+        "type": "component-vue"
+	},
+	"uni_modules": {
+		"dependencies": [
+			"uni-scss",
+			"uni-transition"
+		],
+		"encrypt": [],
+		"platforms": {
+			"cloud": {
+				"tcb": "y",
+                "aliyun": "y",
+                "alipay": "n"
+			},
+			"client": {
+				"App": {
+					"app-vue": "y",
+					"app-nvue": "y"
+				},
+				"H5-mobile": {
+					"Safari": "y",
+					"Android Browser": "y",
+					"微信浏览器(Android)": "y",
+					"QQ浏览器(Android)": "y"
+				},
+				"H5-pc": {
+					"Chrome": "y",
+					"IE": "y",
+					"Edge": "y",
+					"Firefox": "y",
+					"Safari": "y"
+				},
+				"小程序": {
+					"微信": "y",
+					"阿里": "y",
+					"百度": "y",
+					"字节跳动": "y",
+					"QQ": "y"
+				},
+				"快应用": {
+					"华为": "u",
+					"联盟": "u"
+                },
+                "Vue": {
+                    "vue2": "y",
+                    "vue3": "y"
+                }
+			}
+		}
+	}
+}

+ 17 - 0
uni_modules/uni-popup/readme.md

@@ -0,0 +1,17 @@
+
+
+## Popup 弹出层
+> **组件名:uni-popup**
+> 代码块: `uPopup`
+> 关联组件:`uni-transition`
+
+
+弹出层组件,在应用中弹出一个消息提示窗口、提示框等
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-popup)
+#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839 
+
+
+
+
+

Datei-Diff unterdrückt, da er zu groß ist
+ 45 - 0
utils/requesttest.js


+ 49 - 0
utils/requesttest2.js

@@ -0,0 +1,49 @@
+const BASE_URL = '' //http://192.168.3.152:8088/glwork
+const s4 = new SM4Util()
+
+//加密
+function encrypt(content) {
+	return s4.encryptData_CBC(content)
+}
+//解密
+function decrypt(content) {
+	content = content.replace(/"+/g, "").replace(/\s+/g, "");
+	return s4.decryptData_CBC(content).replace(
+		/\u0000|\u0001|\u0002|\u0003|\u0004|\u0005|\u0006|\u0007|\u0008|\u0009|\u000a|\u000b|\u000c|\u000d|\u000e|\u000f|\u0010|\u0011|\u0012|\u0013|\u0014|\u0015|\u0016|\u0017|\u0018|\u0019|\u001a|\u001b|\u001c|\u001d|\u001e|\u001f|\u007F/g,
+		"")
+}
+
+export function ApiRequest(config = {}){
+	let {
+		url, 
+		data,
+		method="GET",
+		header={} 
+	} = config
+	url = BASE_URL + url
+	header['Authorization'] = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwYzY3NTYxZi01ZDBkLTQ4ZmQtYTkwYi05MGQ2OWE5OGZiYWMiLCJjbGllbnRpZCI6ImFuZHJvaWRjbGllbnQiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIFJlZmluZUFQSSIsImV4cCI6MTczNDcxNzExNywiY29uZmlnIjoiMjAyMC0yMDk5In0.zkgfGsl0euGKek87wVIxXSfMOp4ZgY_uz4rz-zmOzFA'
+	
+	if(uni.getStorageSync('GlWorkPlatform-AccessToken')){
+		header['Authorization'] = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIwYzY3NTYxZi01ZDBkLTQ4ZmQtYTkwYi05MGQ2OWE5OGZiYWMiLCJjbGllbnRpZCI6ImFuZHJvaWRjbGllbnQiLCJncmFudF90eXBlIjoicGFzc3dvcmQiLCJzY29wZSI6Im9wZW5pZCBwcm9maWxlIGVtYWlsIFJlZmluZUFQSSIsImV4cCI6MTczNDcxNzExNywiY29uZmlnIjoiMjAyMC0yMDk5In0.zkgfGsl0euGKek87wVIxXSfMOp4ZgY_uz4rz-zmOzFA'
+		
+		//'Bearer ' + uni.getStorageSync('GlWorkPlatform-AccessToken')
+	}
+	return new Promise((resolve, reject)=>{
+		uni.request({
+			url: url,
+			data: {data:encrypt(JSON.stringify(data))} ,
+			method: method,
+			header: header,
+			timeout: 60000,
+			success: (res)=>{
+				resolve(JSON.parse(decrypt(res.data.data)))
+			},
+			fail: (err) => {
+				reject(err)
+			},
+			complete: (event)=>{
+				
+			}
+		})
+	})
+}

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden.