| @@ -8,6 +8,6 @@ | |||
| </head> | |||
| <body> | |||
| <div id="root"></div> | |||
| <script src="/umi.5e50c73d.js"></script> | |||
| <script src="/umi.ab1cd040.js"></script> | |||
| </body> | |||
| </html> | |||
| @@ -3,6 +3,7 @@ declare namespace InformationType { | |||
| type section = { | |||
| id?: Number, | |||
| name?: String, | |||
| code?: String, | |||
| cover_img?: String, | |||
| parent_id?: Number, | |||
| description?: String, | |||
| @@ -70,6 +70,8 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| setDetail(res.data) | |||
| return res.data; | |||
| } else { | |||
| setUploadedFilephotoName('') | |||
| setDetail(null) | |||
| return { | |||
| area_id: null, | |||
| title: '', | |||
| @@ -135,7 +137,7 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| { | |||
| detail ? | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| <UploadModel multiple={false} form_name="image_url" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| <UploadModel multiple={false} form_name="image_url" image_length={1} uploadTxt="上传封面图" image_type={3} onUploadComplete={handleFileUploadedphoto}></UploadModel> | |||
| {uploadedFilephotoName ? <Image src={`${Imageprefix}${uploadedFilephotoName}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image> : <Image src={`${Imageprefix}${detail?.image_url}`} style={{ marginLeft: '16px', marginTop: '32px', width: '100px', height: '100px' }}></Image>} | |||
| </Col> : <> | |||
| <Col span={24} style={{ display: 'flex' }}> | |||
| @@ -152,7 +154,7 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| rules={[{ required: true, message: '请输入说明' }]} | |||
| /> | |||
| <ProFormText | |||
| label="跳转网址" | |||
| label="跳转网址,小程序内部路径,以/pages/开头,如/pages/index/index, 外部网址需以http://或https://开头, 没有链接就填 //" | |||
| name="target_url" | |||
| placeholder="请输入跳转网址" | |||
| rules={[{ required: true, message: '请输入跳转网址' }]} | |||
| @@ -184,11 +186,12 @@ const PagesMainAdvertisementPutinCreate: React.FC = ({ dispatch, dictModel, open | |||
| <ProFormSelect | |||
| showSearch | |||
| name="company_id" | |||
| label="选择企业" | |||
| label="选择企业,没有企业选人才市场" | |||
| placeholder="请选择企业" | |||
| fieldProps={{ | |||
| fieldNames: selectfieldCompanyNames | |||
| }} | |||
| rules={[{ required: true, message: '请选择企业' }]} | |||
| request={(keyword) => | |||
| getCompanyList({ page: 1, pagesize: 100, keyword: keyword.keyWords }).then(res => { | |||
| return res.data.list; | |||
| @@ -4,8 +4,8 @@ import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable, ProFormSelect | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, Image, ConfigProvider, Tag } from 'antd'; | |||
| import { GetAdvertscheduleList, getCompanyList, GetAdvertareaList} from '@/apis/api'; | |||
| import { Button, Popconfirm, ConfigProvider, Tag,message } from 'antd'; | |||
| import { GetAdvertscheduleList, getCompanyList, GetAdvertareaList, PostAdvertscheduleDel} from '@/apis/api'; | |||
| const selectfieldNames = { label: 'full_name', value: 'id' }; | |||
| const selectfieldAreaNames = { label: 'name', value: 'id' }; | |||
| @@ -147,9 +147,23 @@ const PagesMainAdvertisementPutinTable: React.FC = ({ dispatch, openModel, getId | |||
| setId(record.id) | |||
| dispatch({ type: 'openModel/getOpenModal', payload: true }) | |||
| }}>编辑</Button>, | |||
| <Button key='2' type='link' onClick={() => { | |||
| }}>删除</Button> | |||
| <Popconfirm | |||
| title="是否删除" | |||
| onConfirm={(e) => { | |||
| PostAdvertscheduleDel({ id: record.id }).then(res => { | |||
| message.success('删除成功') | |||
| actionRef.current.reload(); | |||
| }) | |||
| }} | |||
| okText="删除" | |||
| cancelText="取消" | |||
| > | |||
| <a | |||
| key="delete" | |||
| > | |||
| 删除 | |||
| </a> | |||
| </Popconfirm> | |||
| ], | |||
| }, | |||
| ]} | |||
| @@ -66,6 +66,7 @@ const PagesMainInformationSectionCreate: React.FC = ({ dispatch, dictModel, open | |||
| setUploadedFilephotoName('') | |||
| return { | |||
| name: '', | |||
| code: '', | |||
| cover_img: '', | |||
| parent_id: id.nextlevel, | |||
| description: '', | |||
| @@ -82,6 +83,7 @@ const PagesMainInformationSectionCreate: React.FC = ({ dispatch, dictModel, open | |||
| setUploadedFilephotoName('') | |||
| return { | |||
| name: '', | |||
| code: '', | |||
| cover_img: '', | |||
| parent_id: -1, | |||
| description: '', | |||
| @@ -127,6 +129,12 @@ const PagesMainInformationSectionCreate: React.FC = ({ dispatch, dictModel, open | |||
| name="name" | |||
| placeholder="请输入栏目名称" | |||
| rules={[{ required: true, message: '请输入栏目名称' }]} | |||
| /> | |||
| <ProFormText | |||
| label="栏目编码,用英文字母表示,编码不能与其他栏目编码重复" | |||
| name="code" | |||
| placeholder="请输入栏目编码,用英文字母表示,编码不能与其他栏目编码重复" | |||
| rules={[{ required: true, message: '请输入栏目编码,用英文字母表示,编码不能与其他栏目编码重复' }]} | |||
| /> | |||
| <ProFormText | |||
| name="description" | |||
| @@ -4,7 +4,7 @@ import type { ActionType, ProFormInstance } from '@ant-design/pro-components'; | |||
| import { | |||
| ProTable, TableDropdown | |||
| } from '@ant-design/pro-components'; | |||
| import { Button, Image, ConfigProvider, Popconfirm, message } from 'antd'; | |||
| import { Button, Image, ConfigProvider, Popconfirm, message,Tag } from 'antd'; | |||
| import { listSection, delSection } from '@/apis/api'; | |||
| import { Imageprefix } from '@/constants'; | |||
| @@ -52,6 +52,23 @@ const PagesMainInformationSectionTable: React.FC = ({ dispatch, openModel, getId | |||
| title: '栏目名称', | |||
| dataIndex: 'name' | |||
| }, | |||
| { | |||
| title: '栏目编码', | |||
| dataIndex: 'code' | |||
| }, | |||
| { | |||
| title: '可见', | |||
| dataIndex: 'display', | |||
| search: false, | |||
| render: (_, record) => (<> | |||
| { | |||
| <> | |||
| {record.display === 1 ? <Tag color="green">可见</Tag> : <Tag>不可见</Tag>} | |||
| </> | |||
| } | |||
| </>), | |||
| }, | |||
| { | |||
| title: '封面图', | |||
| dataIndex: 'cover_img', | |||
| @@ -77,7 +77,7 @@ const PagesMainPermissionRoleDispense: React.FC = ({ dispatch, dictModel, openMo | |||
| let res = await getPermissionListWithchilds() | |||
| setDetail(res.data) | |||
| let resrole = await getRoleGetpermissionids({ id: id }) | |||
| const nextSelectedTags = resrole.data.permissionIds.map(item => { | |||
| const nextSelectedTags = resrole.data.permissionIds && resrole.data.permissionIds.map(item => { | |||
| return Number(item) | |||
| }) | |||
| setSelectedIds(nextSelectedTags); | |||