提交 599d1118 authored 作者: lhh's avatar lhh

update

上级 d09fb11f
...@@ -60,14 +60,18 @@ const submitForm = async (formEl: FormInstance | undefined, bl: string) => { ...@@ -60,14 +60,18 @@ const submitForm = async (formEl: FormInstance | undefined, bl: string) => {
}, {}) }, {})
) )
} }
submitScheduleMember(ruleForm).then(res => { submitScheduleMember(ruleForm).then((res: any) => {
if (res.data) { if (res.code === 0) {
ElMessage({ ElMessage({
message: '保存成功', message: '保存成功',
type: 'success' type: 'success'
}) })
emit('update:modelValue', false)
} else {
ElMessage({
message: res.message
})
} }
emit('update:modelValue', false)
}) })
} else { } else {
console.log('error submit!', fields) console.log('error submit!', fields)
...@@ -84,9 +88,18 @@ const rules = [{ required: true }] ...@@ -84,9 +88,18 @@ const rules = [{ required: true }]
class="data-form" class="data-form"
title="自动生成用户数据" title="自动生成用户数据"
:close-on-click-modal="false" :close-on-click-modal="false"
@update:modelValue="value => $emit('update:modelValue', value)"> @update:modelValue="value => $emit('update:modelValue', value)"
>
<div class="button-flex"> <div class="button-flex">
<el-form :disabled="userStore.role?.id === 1" label-suffix=":" ref="ruleFormRef" :model="ruleForm" label-width="auto" class="demo-ruleForm" status-icon> <el-form
:disabled="userStore.role?.id === 1"
label-suffix=":"
ref="ruleFormRef"
:model="ruleForm"
label-width="auto"
class="demo-ruleForm"
status-icon
>
<el-form-item label="请输入需要生成的数据量" :rules="rules"> <el-form-item label="请输入需要生成的数据量" :rules="rules">
<el-radio-group v-model="ruleForm.size"> <el-radio-group v-model="ruleForm.size">
<el-radio :value="1000">1000</el-radio> <el-radio :value="1000">1000</el-radio>
......
...@@ -5,9 +5,12 @@ import AppList from '@/components/base/AppList.vue' ...@@ -5,9 +5,12 @@ import AppList from '@/components/base/AppList.vue'
import ListItem from '../components/ListItem.vue' import ListItem from '../components/ListItem.vue'
import { getConnectionList, getConnectionDetails, getScheduleMember, getStudentFollow } from '../api' import { getConnectionList, getConnectionDetails, getScheduleMember, getStudentFollow } from '../api'
import { useMapStore } from '@/stores/map' import { useMapStore } from '@/stores/map'
import { useUserStore } from '@/stores/user'
const store = useMapStore() const store = useMapStore()
const userStore = useUserStore()
const FormDialog = defineAsyncComponent(() => import('../components/FormDialog.vue')) const FormDialog = defineAsyncComponent(() => import('../components/FormDialog.vue'))
const UserDataDialog = defineAsyncComponent(() => import('../components/UserDataDialog.vue')) const UserDataDialog = defineAsyncComponent(() => import('../components/UserDataDialog.vue'))
const EventDataDialog = defineAsyncComponent(() => import('../components/EventDataDialog.vue')) const EventDataDialog = defineAsyncComponent(() => import('../components/EventDataDialog.vue'))
...@@ -131,7 +134,7 @@ const handleStudentFollow = function (experimentId: string, id: string, type: st ...@@ -131,7 +134,7 @@ const handleStudentFollow = function (experimentId: string, id: string, type: st
@viewDataProgress="viewDataProgress" @viewDataProgress="viewDataProgress"
@handleStudentFollow="handleStudentFollow" @handleStudentFollow="handleStudentFollow"
></ListItem> ></ListItem>
<div class="connect-item" @click="createConnect"> <div class="connect-item" @click="createConnect" v-if="userStore.role?.id !== 1">
<div class="connect-add-button"> <div class="connect-add-button">
<el-icon><Plus /></el-icon> <el-icon><Plus /></el-icon>
<span>新建连接</span> <span>新建连接</span>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论