|
@@ -3,18 +3,28 @@
|
|
|
v-bind="$attrs"
|
|
|
@register="register"
|
|
|
title="绑定主播"
|
|
|
+ width="700px"
|
|
|
@visible-change="handleVisibleChange"
|
|
|
@ok="handleSubmit"
|
|
|
>
|
|
|
<div class="pt-2px pr-3px">
|
|
|
- <BasicForm @register="registerForm" :model="model" />
|
|
|
+ <BasicTable
|
|
|
+ @register="registerTable"
|
|
|
+ :searchInfo="searchInfo"
|
|
|
+ :rowSelection="{ type: 'checkbox' }"
|
|
|
+ />
|
|
|
+ <!-- <BasicForm @register="registerForm" :model="model" /> -->
|
|
|
</div>
|
|
|
+ <template #centerFooter>
|
|
|
+ <!-- <a-button>xxxx</a-button> -->
|
|
|
+ </template>
|
|
|
</BasicModal>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
- import { defineComponent, ref, nextTick } from 'vue';
|
|
|
+ import { defineComponent, reactive, nextTick } from 'vue';
|
|
|
import { BasicModal, useModalInner } from '/@/components/Modal';
|
|
|
- import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
|
|
|
+ // import { BasicForm, FormSchema, useForm } from '/@/components/Form/index';
|
|
|
+ import { BasicTable, useTable, BasicColumn } from '/@/components/Table';
|
|
|
// import { useMessage } from '/@/hooks/web/useMessage';
|
|
|
// import { checkUserAddAble } from '/@/api/corporation/modal';
|
|
|
// import { useI18n } from '/@/hooks/web/useI18n';
|
|
@@ -35,47 +45,78 @@
|
|
|
immediate: true,
|
|
|
params: {
|
|
|
page: 1,
|
|
|
+ // brandId:
|
|
|
limit: 1000,
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
];
|
|
|
+ const columns: BasicColumn[] = [
|
|
|
+ {
|
|
|
+ title: 'ID',
|
|
|
+ dataIndex: 'id',
|
|
|
+ fixed: 'left',
|
|
|
+ width: 40,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '员工名称',
|
|
|
+ dataIndex: 'name',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '角色',
|
|
|
+ dataIndex: 'roleName',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '手机号',
|
|
|
+ dataIndex: 'phone',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '绑定时间',
|
|
|
+ dataIndex: 'createTime',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ ];
|
|
|
export default defineComponent({
|
|
|
- components: { BasicModal, BasicForm },
|
|
|
+ components: { BasicModal, BasicTable },
|
|
|
props: {
|
|
|
userData: { type: Object },
|
|
|
},
|
|
|
setup(props) {
|
|
|
- const modelRef = ref({});
|
|
|
- // const { createMessage } = useMessage();
|
|
|
- const [
|
|
|
- registerForm,
|
|
|
- {
|
|
|
- // getFieldsValue,
|
|
|
- // setFieldsValue,
|
|
|
- // setProps
|
|
|
- },
|
|
|
- ] = useForm({
|
|
|
- labelWidth: 120,
|
|
|
- schemas,
|
|
|
- // api: bindAnchorListApi,
|
|
|
- showActionButtonGroup: false,
|
|
|
- actionColOptions: {
|
|
|
- span: 24,
|
|
|
- },
|
|
|
- });
|
|
|
- let addListFunc = () => {};
|
|
|
const [register, { closeModal }] = useModalInner((data) => {
|
|
|
data && onDataReceive(data);
|
|
|
});
|
|
|
|
|
|
+ const searchInfo = reactive<Recordable>({});
|
|
|
+ const [registerTable, { reload }] = useTable({
|
|
|
+ title: '主播列表',
|
|
|
+ api: bindAnchorListApi,
|
|
|
+ columns: columns,
|
|
|
+ useSearchForm: false,
|
|
|
+ // formConfig: searchForm,
|
|
|
+ showTableSetting: false,
|
|
|
+ tableSetting: { fullScreen: true },
|
|
|
+ showIndexColumn: false,
|
|
|
+ immediate: false,
|
|
|
+ rowKey: 'id',
|
|
|
+ pagination: { pageSize: 20 },
|
|
|
+ bordered: true,
|
|
|
+
|
|
|
+ fetchSetting: {
|
|
|
+ pageField: 'pageNum',
|
|
|
+ sizeField: 'pageSize',
|
|
|
+ listField: 'list',
|
|
|
+ totalField: 'totalCount',
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
function onDataReceive(data) {
|
|
|
- console.log('Data Received', data);
|
|
|
- const { addList } = data;
|
|
|
- if (typeof addList === 'function') {
|
|
|
- //是函数 其中 FunName 为函数名称
|
|
|
- addListFunc = addList;
|
|
|
- }
|
|
|
+ console.log('Data Received', data.id);
|
|
|
+ searchInfo.brandId = data.id;
|
|
|
+ reload();
|
|
|
}
|
|
|
const handleSubmit = async () => {};
|
|
|
function handleVisibleChange(v) {
|
|
@@ -85,11 +126,10 @@
|
|
|
return {
|
|
|
register,
|
|
|
schemas,
|
|
|
- registerForm,
|
|
|
- model: modelRef,
|
|
|
+ registerTable,
|
|
|
handleVisibleChange,
|
|
|
handleSubmit,
|
|
|
- addListFunc,
|
|
|
+ searchInfo,
|
|
|
closeModal,
|
|
|
};
|
|
|
},
|