|
|
@@ -59,7 +59,7 @@
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-form-item field="email" label="邮箱">
|
|
|
- <a-input v-model="queryDataForm.email" allow-clear />
|
|
|
+ <EmailAutoComplete v-model="queryDataForm.email" allow-clear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
@@ -316,8 +316,7 @@
|
|
|
</a-radio-group>
|
|
|
</a-form-item>
|
|
|
<a-form-item field="email" label="通知邮箱" v-if="form.notice_type === 'email'">
|
|
|
- <a-auto-complete :data="email" @search="handleSearch" v-model="form.email" placeholder="用于接收乐跑失败、登录失效的通知"
|
|
|
- allow-clear />
|
|
|
+ <EmailAutoComplete v-model="form.email" placeholder="用于接收乐跑失败、登录失效的通知" allow-clear />
|
|
|
</a-form-item>
|
|
|
<a-form-item field="area" label="乐跑跑区">
|
|
|
<a-select v-model="form.area" placeholder="请选择乐跑跑区" default-value="">
|
|
|
@@ -373,7 +372,6 @@ import { hasPermission } from '@/utils/permission'
|
|
|
|
|
|
const notice = ref('')
|
|
|
|
|
|
-const email = ref([])
|
|
|
const faceInfo = ref({})
|
|
|
const bindBotRef = ref(null)
|
|
|
const accountDetailRef = ref(null)
|
|
|
@@ -417,34 +415,6 @@ const pagination = reactive({
|
|
|
pagesize: 20
|
|
|
})
|
|
|
|
|
|
-const handleSearch = (value) => {
|
|
|
- const emailSuffix = ["qq.com", "ctbu.edu.cn", "163.com"]
|
|
|
- const input = (value || "").trim()
|
|
|
-
|
|
|
- if (!input) {
|
|
|
- email.value = []
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- // 没有输入 @,直接拼接所有后缀
|
|
|
- if (!input.includes("@")) {
|
|
|
- email.value = emailSuffix.map(suffix => `${input}@${suffix}`)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- // 输入了 @ 但结尾是 @,拼接所有后缀
|
|
|
- if (input.endsWith("@")) {
|
|
|
- email.value = emailSuffix.map(suffix => `${input}${suffix}`)
|
|
|
- return
|
|
|
- }
|
|
|
-
|
|
|
- // 输入了 @ 且有部分后缀,智能匹配
|
|
|
- const [prefix, suffixPart] = input.split("@")
|
|
|
- email.value = emailSuffix
|
|
|
- .filter(suffix => suffix.startsWith(suffixPart))
|
|
|
- .map(suffix => `${prefix}@${suffix}`)
|
|
|
-}
|
|
|
-
|
|
|
const area = ["兰花湖校区跑区", "主校区北跑区", "主校区南跑区", "重庆工商大学茶园校区"]
|
|
|
const state = [
|
|
|
{ label: '全部', value: -1 }, { label: '需登录', value: 0 }, { label: '正常', value: 1 }, { label: '状态异常', value: 2 }
|