12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- import { BasicColumn, FormSchema } from '/@/components/Table';
- import { render } from '/@/utils/common/renderUtils';
- import { rules } from '@/utils/helper/validator';
- //列表数据
- export const columns: BasicColumn[] = [
- {
- title: '上架状态:0:未上架;1:已上架;默认0',
- align: 'center',
- dataIndex: 'putaway',
- },
- {
- title: '图片路径',
- align: 'center',
- dataIndex: 'images',
- customRender: render.renderImage,
- },
- {
- title: '模板价格',
- align: 'center',
- dataIndex: 'templatePrice',
- },
- {
- title: '模板标签',
- align: 'center',
- dataIndex: 'templateTags',
- },
- {
- title: '站点域名',
- align: 'center',
- dataIndex: 'domain',
- },
- {
- title: '站点备注',
- align: 'center',
- dataIndex: 'descirbe',
- },
- {
- title: '站点状态:0:创建失败,1:正常运行,2:运行异常 3:站点停止',
- align: 'center',
- dataIndex: 'runStatus',
- },
- ];
- export const formSchema: FormSchema[] = [
- {
- label: '',
- field: 'id',
- component: 'Input',
- show: false,
- },
- {
- label: '模板名称',
- field: 'name',
- component: 'Input',
- required: true,
- },
- {
- label: '图片路径',
- field: 'images',
- required: true,
- component: 'JImageUpload',
- componentProps: {
- fileMax: 1,
- },
- },
- {
- label: '站点code',
- field: 'code',
- component: 'Input',
- dynamicDisabled: ({ values }) => {
- return !!values.code && !!values.id;
- },
- ifShow: ({ values }) => {
- return !values.domain;
- },
- dynamicRules: ({ model, schema }) => {
- return [{ ...rules.existCheckRule('adweb_site', 'code', model, schema, false, '该临时站点不存在')[0], trigger: 'blur' }];
- },
- helpMessage: '请输入已经存在的临时站点code,系统将会自动生成该模板站点,如果该站点code为空,将会创建仅带图片的模板',
- //自定义提示属性,需要结合helpMessage一起使用
- helpComponentProps: {
- maxWidth: '200px',
- color: '#FFF',
- },
- },
- {
- label: '域名',
- field: 'domain',
- component: 'Input',
- dynamicDisabled: ({ values }) => {
- return !!values.id;
- },
- ifShow: ({ values }) => {
- return !!values.domain;
- },
- },
- ];
|