diff --git a/src/components/AiPagePicker.vue b/src/components/AiPagePicker.vue index 78c6e241..d7520978 100644 --- a/src/components/AiPagePicker.vue +++ b/src/components/AiPagePicker.vue @@ -20,6 +20,7 @@ export default { value: {default: ""}, type: {default: "resident"}, nodeKey: {default: "idNumber"}, + isRequire: {default: 1}, selected: {default: () => []}, placeholder: {default: "选择人员"}, ops: {default: () => ({})}, @@ -48,7 +49,7 @@ export default { }, methods: { handleJump() { - let {config, nodeKey, valueObj} = this, + let {config, nodeKey, valueObj, isRequire} = this, selected = (valueObj ? this.value[nodeKey] : this.value) || this.selected?.map(e => e[nodeKey]) uni.$once('pagePicker:' + this.type, data => { console.log('发送', data) @@ -58,7 +59,7 @@ export default { }) let url = `${config.url}`, qsstr = qs.stringify({ - selected, nodeKey, ...this.$attrs + selected, nodeKey, isRequire, ...this.$attrs }) if (!!qsstr) { url += `?${qsstr}` diff --git a/src/components/pages/selectDept.vue b/src/components/pages/selectDept.vue index 8962cb40..b2a1daaa 100644 --- a/src/components/pages/selectDept.vue +++ b/src/components/pages/selectDept.vue @@ -48,6 +48,9 @@ export default { }, nodeKey() { return this.$route.query.nodeKey || "idNumber" + }, + isRequire() { + return this.$route.query.isRequire || 1 } }, onLoad(query) { @@ -86,12 +89,15 @@ export default { checkList.push(item) } }) - - uni.navigateBack({ - success: () => { - uni.$emit("pagePicker:dept", checkList) - } - }) + if (!checkList.length && this.isRequire == 1) { + return this.$u.toast('请先选择部门') + } else { + uni.navigateBack({ + success: () => { + uni.$emit("pagePicker:dept", checkList) + } + }) + } } }, } diff --git a/src/components/pages/selectSysUser.vue b/src/components/pages/selectSysUser.vue index e990c10c..8a69b755 100644 --- a/src/components/pages/selectSysUser.vue +++ b/src/components/pages/selectSysUser.vue @@ -51,7 +51,10 @@ export default { }, nodeKey() { return this.$route.query.nodeKey || "idNumber" - } + }, + isRequire() { + return this.$route.query.isRequire || 1 + }, }, onLoad(query) { if (query.selected) { @@ -92,7 +95,7 @@ export default { checkList.push(item) } }) - if (!checkList.length) { + if (!checkList.length && this.isRequire == 1) { return this.$u.toast('请先选择人员') } else { uni.navigateBack({ diff --git a/src/project/police/AppMessageNotification/AppMessageNotification.vue b/src/project/police/AppMessageNotification/AppMessageNotification.vue index 30b853a2..d6ce89d7 100644 --- a/src/project/police/AppMessageNotification/AppMessageNotification.vue +++ b/src/project/police/AppMessageNotification/AppMessageNotification.vue @@ -48,15 +48,15 @@
图片
-视频
-附件
-部门
人员