|
@@ -7,13 +7,17 @@
|
|
|
@ok="handleOk"
|
|
|
>
|
|
|
<div class="pt-3px pr-3px">
|
|
|
- <BasicForm @register="registerForm" />
|
|
|
+ <BasicForm @register="registerForm">
|
|
|
+ <template #text="{ model, field }">
|
|
|
+ {{ model[field] }}
|
|
|
+ </template>
|
|
|
+ </BasicForm>
|
|
|
</div>
|
|
|
</BasicModal>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
import { defineComponent, ref, unref } from 'vue';
|
|
|
- import { delApi } from '/@/api/staff/list';
|
|
|
+ import { UpdateApi } from '/@/api/scene/list';
|
|
|
import { uploadLiveApi } from '/@/api/scene/live';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
|
|
@@ -36,10 +40,16 @@
|
|
|
const { createMessage } = useMessage();
|
|
|
const schemas: FormSchema[] = [
|
|
|
{
|
|
|
+ field: 'sceneNum',
|
|
|
+ component: 'Input',
|
|
|
+ label: 'sceneNum',
|
|
|
+ show: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
field: 'sceneName',
|
|
|
component: 'Input',
|
|
|
label: '场景名称',
|
|
|
- required: true,
|
|
|
+ slot: 'text',
|
|
|
colProps: {
|
|
|
span: 22,
|
|
|
},
|
|
@@ -48,6 +58,7 @@
|
|
|
field: 'picList',
|
|
|
label: '直播间图片',
|
|
|
component: 'Upload',
|
|
|
+ required: true,
|
|
|
componentProps: {
|
|
|
api: uploadLiveApi,
|
|
|
maxSize: 5,
|
|
@@ -65,7 +76,7 @@
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- field: 'livestreamStatus',
|
|
|
+ field: 'isShow',
|
|
|
component: 'RadioGroup',
|
|
|
label: t('routes.scenes.livestream'),
|
|
|
required: true,
|
|
@@ -101,16 +112,19 @@
|
|
|
function onDataReceive(data) {
|
|
|
data = unref(data);
|
|
|
console.log('onDataReceive', data);
|
|
|
- setFieldsValue(data);
|
|
|
+ setFieldsValue({
|
|
|
+ ...data,
|
|
|
+ sceneNum: data.num,
|
|
|
+ });
|
|
|
// 方式1;
|
|
|
}
|
|
|
|
|
|
async function handleOk() {
|
|
|
let data = await validate();
|
|
|
- let res = await delApi({
|
|
|
- toUserPhone: data.toUserPhone,
|
|
|
- userId: modelRef.value.userId,
|
|
|
- toUserId: modelRef.value.toUserId,
|
|
|
+ console.log('data', data);
|
|
|
+ let res = await UpdateApi({
|
|
|
+ ...data,
|
|
|
+ appListPicUrl: data.picList[0],
|
|
|
});
|
|
|
context && context.emit('reload', res);
|
|
|
createMessage.success(t('common.optSuccess'));
|