|
@@ -5,26 +5,174 @@
|
|
|
<a-col><a-button type="primary" @click="openModal">创建空间</a-button></a-col>
|
|
<a-col><a-button type="primary" @click="openModal">创建空间</a-button></a-col>
|
|
|
</a-row>
|
|
</a-row>
|
|
|
|
|
|
|
|
- <!-- <StepModal
|
|
|
|
|
|
|
+ <table-pro
|
|
|
|
|
+
|
|
|
|
|
+ :columns="columns"
|
|
|
|
|
+ :easy="true"
|
|
|
|
|
+ >
|
|
|
|
|
+
|
|
|
|
|
+ </table-pro>
|
|
|
|
|
+
|
|
|
|
|
+ <StepModal
|
|
|
:step="step"
|
|
:step="step"
|
|
|
:steps="steps"
|
|
:steps="steps"
|
|
|
:visible="visible"
|
|
:visible="visible"
|
|
|
|
|
+ @close="visible = false"
|
|
|
|
|
+ @next="stepNext"
|
|
|
>
|
|
>
|
|
|
- 7788
|
|
|
|
|
- </StepModal> -->
|
|
|
|
|
|
|
+ <a-form style="width: 100%;display: block;" :labelCol="{span: 2}" :wrapperCol="{span: 14}" >
|
|
|
|
|
+ <div v-show="step === 0" >
|
|
|
|
|
+ <a-form-item label="空间名称" v-bind="validateInfos.edgeName" >
|
|
|
|
|
+ <InputTsx allowClear placeholder="请输入空间名称" v-model:value="spaceState.edgeName" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item label="空间类型" v-bind="validateInfos.edgeName" >
|
|
|
|
|
+ <a-radio-group v-model:value="spaceState.type" button-style="solid">
|
|
|
|
|
+ <a-radio-button
|
|
|
|
|
+ v-for="item in SpaceController.type"
|
|
|
|
|
+ :key="item.key"
|
|
|
|
|
+ :value="item.value"
|
|
|
|
|
+ >
|
|
|
|
|
+ {{item.label}}
|
|
|
|
|
+ </a-radio-button>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ <a-form-item label="空间描述" >
|
|
|
|
|
+ <a-textarea v-model:value="spaceState.description" placeholder="请输入空间描述" :rows="4" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div v-show="step === 1" style="width: 100%;" >
|
|
|
|
|
+ <a-row class="section" >
|
|
|
|
|
+ <a-col class="title" :span="24" >推流鉴权</a-col>
|
|
|
|
|
+ <a-col class="content" >
|
|
|
|
|
+ <a-row class="content-item" >
|
|
|
|
|
+ <a-col span="4" >推流配置:</a-col>
|
|
|
|
|
+ <a-col>
|
|
|
|
|
+ <a-radio-group v-model:value="spaceState.config.upstreamAuth.enabled" name="radioGroup">
|
|
|
|
|
+ <a-radio :value="false">关闭</a-radio>
|
|
|
|
|
+ <a-radio :value="true">开启</a-radio>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="content-item" v-show="spaceState.config.upstreamAuth.enabled">
|
|
|
|
|
+ <a-col span="4" >推流鉴权密钥:</a-col>
|
|
|
|
|
+ <a-col><InputTsx placeholder="请输入推流鉴权密钥" v-model:value="spaceState.config.upstreamAuth.key" /> </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="content-item" v-show="spaceState.config.upstreamAuth.enabled">
|
|
|
|
|
+ <a-col span="4" >过期时间: </a-col>
|
|
|
|
|
+ <a-col><a-input-number id="inputNumber" :min="1" v-model:value="spaceState.config.upstreamAuth.expire" /> 分钟 </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="section" >
|
|
|
|
|
+ <a-col class="title" :span="24" >观看鉴权</a-col>
|
|
|
|
|
+ <a-col class="content" >
|
|
|
|
|
+ <a-row class="content-item" >
|
|
|
|
|
+ <a-col span="4" >观看配置:</a-col>
|
|
|
|
|
+ <a-col>
|
|
|
|
|
+ <a-radio-group v-model:value="spaceState.config.downstreamAuth.enabled" name="radioGroup">
|
|
|
|
|
+ <a-radio :value="false">关闭</a-radio>
|
|
|
|
|
+ <a-radio :value="true">开启</a-radio>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="content-item" v-show="spaceState.config.downstreamAuth.enabled" >
|
|
|
|
|
+ <a-col span="4" >观看鉴权密钥:</a-col>
|
|
|
|
|
+ <a-col><InputTsx placeholder="请输入观看鉴权密钥" v-model:value="spaceState.config.downstreamAuth.key" /> </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="content-item" v-show="spaceState.config.downstreamAuth.enabled" >
|
|
|
|
|
+ <a-col span="4" >过期时间: </a-col>
|
|
|
|
|
+ <a-col><a-input-number id="inputNumber" :min="1" v-model:value="spaceState.config.downstreamAuth.expire" /> 分钟 </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="section" >
|
|
|
|
|
+ <a-col class="title" :span="24" >录制回放配置</a-col>
|
|
|
|
|
+ <a-col class="content" >
|
|
|
|
|
+ <a-row class="content-item" >
|
|
|
|
|
+ <a-col span="4" >基础配置:</a-col>
|
|
|
|
|
+ <a-col>
|
|
|
|
|
+ <a-radio-group v-model:value="spaceState.config.recording.enabled" name="radioGroup">
|
|
|
|
|
+ <a-radio :value="false">关闭</a-radio>
|
|
|
|
|
+ <a-radio :value="true">开启</a-radio>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="content-item" v-show="spaceState.config.recording.enabled" >
|
|
|
|
|
+ <a-col span="4">单个文件时常: </a-col>
|
|
|
|
|
+ <a-col><a-input-number id="inputNumber" :min="1" v-model:value="spaceState.config.recording.duration" /> 分钟 </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="content-item" v-show="spaceState.config.recording.enabled" >
|
|
|
|
|
+ <a-col span="4" >存储格式: </a-col>
|
|
|
|
|
+ <a-col>
|
|
|
|
|
+ <a-radio-group v-model:value="spaceState.config.recording.format" name="radioGroup">
|
|
|
|
|
+ <a-radio value="MP4">MP4</a-radio>
|
|
|
|
|
+ <a-radio value="FLV">FLV</a-radio>
|
|
|
|
|
+ <a-radio value="M3U8">M3U8</a-radio>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="content-item" v-show="spaceState.config.recording.enabled" >
|
|
|
|
|
+ <a-col span="4" >录制方式: </a-col>
|
|
|
|
|
+ <a-col>周期录制 </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="section" >
|
|
|
|
|
+ <a-col class="title" :span="24" >截图配置</a-col>
|
|
|
|
|
+ <a-col class="content" >
|
|
|
|
|
+ <a-row class="content-item" >
|
|
|
|
|
+ <a-col span="4" >截图配置:</a-col>
|
|
|
|
|
+ <a-col>
|
|
|
|
|
+ <a-radio-group v-model:value="spaceState.config.thumbnail.enabled" name="radioGroup">
|
|
|
|
|
+ <a-radio :value="false">关闭</a-radio>
|
|
|
|
|
+ <a-radio :value="true">开启</a-radio>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="content-item" v-show="spaceState.config.thumbnail.enabled" >
|
|
|
|
|
+ <a-col span="4" >截图周期: </a-col>
|
|
|
|
|
+ <a-col><a-input-number id="inputNumber" :min="1" v-model:value="spaceState.config.thumbnail.interval" /> 秒 </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <a-row class="section" >
|
|
|
|
|
+ <a-col class="title" :span="24" >AI配置</a-col>
|
|
|
|
|
+ <a-col class="content" >
|
|
|
|
|
+ <a-row class="content-item" >
|
|
|
|
|
+ <a-col span="4" >AI配置:</a-col>
|
|
|
|
|
+ <a-col>
|
|
|
|
|
+ <a-radio-group v-model:value="spaceState.config.aiConfig.enabled" name="radioGroup">
|
|
|
|
|
+ <a-radio :value="false">关闭</a-radio>
|
|
|
|
|
+ <a-radio :value="true">开启</a-radio>
|
|
|
|
|
+ </a-radio-group>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ <!-- <a-row class="content-item" v-show="spaceState.config.thumbnail.enabled" >
|
|
|
|
|
+ <a-col span="4" >截图周期: </a-col>
|
|
|
|
|
+ <a-col><a-input-number id="inputNumber" :min="1" v-model:value="spaceState.config.thumbnail.interval" /> 秒 </a-col>
|
|
|
|
|
+ </a-row> -->
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </a-row>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </a-form>
|
|
|
|
|
+ </StepModal>
|
|
|
</a-card>
|
|
</a-card>
|
|
|
</template>
|
|
</template>
|
|
|
<script lang='ts' setup >
|
|
<script lang='ts' setup >
|
|
|
|
|
|
|
|
import { StepModal } from '@/components/StepModal'
|
|
import { StepModal } from '@/components/StepModal'
|
|
|
import { InputTsx } from '@/components/MicroComponents/index'
|
|
import { InputTsx } from '@/components/MicroComponents/index'
|
|
|
-import { ref } from 'vue'
|
|
|
|
|
|
|
+import { ref, reactive } from 'vue'
|
|
|
|
|
+import { Form } from 'ant-design-vue'
|
|
|
|
|
+import { SpaceController } from '@/controller'
|
|
|
|
|
+
|
|
|
|
|
+const useForm = Form.useForm
|
|
|
|
|
|
|
|
-const steps = [{ title: '空间基本信息' }, { title: '空间配置' }, { title: '选择计费类型' }, { title: '确认订单' }]
|
|
|
|
|
|
|
+const steps = [{ title: '空间基本信息' }, { title: '空间配置' }]
|
|
|
|
|
|
|
|
-const step = ref(0)
|
|
|
|
|
|
|
+const step = ref(1)
|
|
|
|
|
|
|
|
-const visible = ref<boolean>(false)
|
|
|
|
|
|
|
+const visible = ref<boolean>(true)
|
|
|
|
|
|
|
|
const columns = [
|
|
const columns = [
|
|
|
{
|
|
{
|
|
@@ -69,10 +217,76 @@ const columns = [
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
|
|
+const spaceState = reactive<CVS.space>({
|
|
|
|
|
+ description: '',
|
|
|
|
|
+ deviceCount: null,
|
|
|
|
|
+ deviceMode: '',
|
|
|
|
|
+ edgeId: null,
|
|
|
|
|
+ edgeName: '',
|
|
|
|
|
+ serialId: '',
|
|
|
|
|
+ spaceId: null,
|
|
|
|
|
+ status: '',
|
|
|
|
|
+ type: 'RTMP',
|
|
|
|
|
+ config: {
|
|
|
|
|
+ upstreamAuth: {
|
|
|
|
|
+ enabled: false,
|
|
|
|
|
+ key: '',
|
|
|
|
|
+ expire: 1
|
|
|
|
|
+ },
|
|
|
|
|
+ downstreamAuth: {
|
|
|
|
|
+ enabled: false,
|
|
|
|
|
+ key: '',
|
|
|
|
|
+ expire: 1
|
|
|
|
|
+ },
|
|
|
|
|
+ recording: {
|
|
|
|
|
+ enabled: true,
|
|
|
|
|
+ duration: 1,
|
|
|
|
|
+ format: 'FLV',
|
|
|
|
|
+ recordType: 'PERIOD',
|
|
|
|
|
+ bucket: 'cgtt8ufaq9pp493hqy8'
|
|
|
|
|
+ },
|
|
|
|
|
+ thumbnail: {
|
|
|
|
|
+ enabled: true,
|
|
|
|
|
+ interval: 1,
|
|
|
|
|
+ bucket: 'cgtt8ufaq9pp493hqy8'
|
|
|
|
|
+ },
|
|
|
|
|
+ aiConfig: {
|
|
|
|
|
+ enabled: true,
|
|
|
|
|
+ configuration: [],
|
|
|
|
|
+ bucket: 'cgtt8ufaq9pp493hqy8'
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
|
|
+const { resetFields, validate, validateInfos } = useForm(spaceState, {
|
|
|
|
|
+ edgeName: [{ required: true, message: '请填写空间名称' }],
|
|
|
|
|
+ type: [{ required: true }]
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const openModal = () => visible.value = true
|
|
const openModal = () => visible.value = true
|
|
|
|
|
|
|
|
const closeModal = () => visible.value = false
|
|
const closeModal = () => visible.value = false
|
|
|
|
|
|
|
|
|
|
+const stepNext = () => {
|
|
|
|
|
+ step.value++
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
<style lang='less' scoped >
|
|
<style lang='less' scoped >
|
|
|
|
|
+.section {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ .title {
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .content {
|
|
|
|
|
+ margin-top: 20px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ .content-item {
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|