注册
@@ -126,6 +126,23 @@ const gotoAIHome = (row) => {
router.push({ name: 'aihome' });
};
+const handleHelp = () => {
+ // 方法功能:跳转到帮助页面
+ try {
+ // 使用 window.location.href 实现页面跳转
+ // window.location.href = 'http://222.20.126.208:4399/';
+
+ // 或者使用 window.open 打开新标签页
+ window.open('http://222.20.126.208:4399/', '_blank');
+
+ console.log('正在跳转到帮助页面');
+ } catch (error) {
+ console.error('跳转失败:', error);
+ // 可以在此处添加错误提示(如使用 Message 组件)
+ // Message.error('跳转帮助页面失败,请手动访问该链接');
+ }
+};
+
/* store 用户信息 */
/* @test 后面将清除 */
diff --git a/src/views/Jyh/Version/Detail/SubscriptionModal.vue b/src/views/Jyh/Version/Detail/SubscriptionModal.vue
index 8997893..f7db194 100644
--- a/src/views/Jyh/Version/Detail/SubscriptionModal.vue
+++ b/src/views/Jyh/Version/Detail/SubscriptionModal.vue
@@ -6,6 +6,16 @@
+
+
+
+
+
+
+
+
+
+
@@ -19,6 +29,7 @@
import { subscribeSoftware } from '@/api/jyh';
import { computed, ref } from 'vue';
import { Message } from 'vue-devui';
+import { useAccountStore } from '@/stores/user';
const subscribeTypeOptions = [
{ name: '短信', value: 'mobileSwitch', id: 1 },
{ name: '邮件', value: 'emailSwitch', id: 2 },
@@ -26,13 +37,40 @@ const subscribeTypeOptions = [
];
const props = defineProps(['softwareData']);
const emit = defineEmits(['close','closeSub']);
+
+const userInfo = useAccountStore();
+const {accountInfo} = userInfo;
+debugger
+
const formRef = ref(null);
const formData = ref({
subscribeType: [],
+ warningMobile: accountInfo.warningMobile||'',
+ warningEmail: accountInfo.warningEmail||'',
});
+
const rules = {
subscribeType: [{ type: 'array', required: true, message: '请至少选择一种通知方式', trigger: 'change' }],
+ warningMobile: [
+ { pattern: /^1[3-9]\d{9}$/, message: '请输入正确的11位手机号码', trigger: 'blur' },
+ { required: true, message: '请输入预警手机号', trigger: 'blur' }
+ ],
+ warningEmail: [
+ { type: 'email', message: '请输入正确的邮箱格式', trigger: 'blur' },
+ { required: true, message: '请输入预警邮箱', trigger: 'blur' }
+ ]
};
+
+// 计算属性 - 控制输入框显示
+const showWarningMobile = computed(() => {
+ return formData.value.subscribeType.some(item => item.value === 'mobileSwitch');
+});
+
+const showWarningEmail = computed(() => {
+ return formData.value.subscribeType.some(item => item.value === 'emailSwitch');
+});
+
+
const sendSubscribe = async () => {
let alertType = {};
formData.value.subscribeType.forEach(item => {
@@ -42,6 +80,8 @@ const sendSubscribe = async () => {
softwareId: props.softwareData.id,
status: '1',
alertType,
+ warningMobile: formData.value.warningMobile,
+ warningEmail: formData.value.warningEmail
}).catch(err => {
Message({
message: err.error,