import { BasicColumn } from "/@/components/Table"; import { FormSchema } from "/@/components/Table"; import { rules } from "/@/utils/helper/validator"; import { render } from "/@/utils/common/renderUtils"; import { getWeekMonthQuarterYear } from "/@/utils"; //列表数据 export const columns: BasicColumn[] = [ { title: "关键词", align: "center", dataIndex: "keywords" }, { title: "关键词所在URL", align: "center", dataIndex: "positionUrl", }, { title: "关键词类型", align: "center", dataIndex: "keywordType" }, { title: '添加时间', align: 'left', dataIndex: 'createTime', sorter: true, }, { title: '最新排名日期', align: 'left', dataIndex: 'lastSearchTime', sorter: true, }, { title: '查询日期(定时任务)', align: 'left', dataIndex: 'timerLastSearchTime', }, { title: '最新排名', align: 'left', dataIndex: 'lastRank', sorter: true, }, ]; //查询数据 export const searchFormSchema: FormSchema[] = []; //表单数据 export const formSchema: FormSchema[] = [ { label: "平台标识", field: "appKey", component: "Input", dynamicRules: ({ model, schema }) => { return [ { required: true, message: "请输入平台标识!" } ]; } }, { label: "用户标识", field: "siteCode", component: "Input", dynamicRules: ({ model, schema }) => { return [ { required: true, message: "请输入用户标识!" } ]; } }, { label: "关键词", field: "keywords", component: "Input", dynamicRules: ({ model, schema }) => { return [ { required: true, message: "请输入关键词!" } ]; } }, { label: "关键词所属域名", field: "domain", component: "Input", dynamicRules: ({ model, schema }) => { return [ { required: true, message: "请输入关键词所属域名!" } ]; } }, { label: "语种", field: "lang", component: "Input" }, { label: "最新搜索时间", field: "lastSearchTime", component: "DatePicker", componentProps: { showTime: true, valueFormat: "YYYY-MM-DD" } }, { label: "定时器的最新搜索时间", field: "timerLastSearchTime", component: "DatePicker", componentProps: { showTime: true, valueFormat: "YYYY-MM-DD" } }, { label: "0删除,1有效,2过期", field: "status", component: "InputNumber" }, { label: "数据复制源ID", field: "sourceId", component: "InputNumber" }, { label: "关键词优先级(1:高;2:中;3:低)", field: "priority", component: "InputNumber" }, { label: "SEO关键词优化完成时间", field: "finishTime", component: "DatePicker", componentProps: { showTime: true, valueFormat: "YYYY-MM-DD" } }, { label: "优化进度", field: "optimizeProcess", component: "InputNumber" }, { label: "优化状态", field: "optimizeStatus", component: "InputNumber" }, { label: "关键词类型", field: "keywordType", component: "InputNumber", dynamicRules: ({ model, schema }) => { return [ { required: true, message: "请输入关键词类型(1:指定;2:长尾)!" } ]; } }, { label: "最近一次搜索排名", field: "lastRank", component: "InputNumber" }, { label: "搜索状态,0为普通状态,1为搜索进行中状态", field: "searchStatus", component: "InputNumber" }, { label: "关键词所在URL", field: "positionUrl", component: "InputTextArea" }, { label: "相关关键词关联的关键词的id", field: "relatedKeywordId", component: "InputNumber" }, { label: "关键词对应套餐的ID", field: "planId", component: "Input" }, { label: "订购表ID", field: "subscriptionId", component: "Input" }, { label: "网站表ID", field: "siteId", component: "Input" }, // TODO 主键隐藏字段,目前写死为ID { label: "", field: "id", component: "Input", show: false } ]; // 高级查询数据 export const superQuerySchema = { keywords: { title: "关键词", order: 2, view: "text", type: "string" }, lastSearchTime: { title: "最新搜索时间", order: 5, view: "datetime", type: "string" }, timerLastSearchTime: { title: "定时器的最新搜索时间", order: 6, view: "datetime", type: "string" }, status: { title: "0删除,1有效,2过期", order: 7, view: "number", type: "number" }, sourceId: { title: "数据复制源ID", order: 8, view: "number", type: "number" }, priority: { title: "关键词优先级(1:高;2:中;3:低)", order: 9, view: "number", type: "number" }, finishTime: { title: "SEO关键词优化完成时间", order: 10, view: "datetime", type: "string" }, optimizeProcess: { title: "优化进度(默认0)", order: 11, view: "number", type: "number" }, optimizeStatus: { title: "优化状态(0:未完成;1:已完成)", order: 12, view: "number", type: "number" }, keywordType: { title: "关键词类型(1:指定;2:长尾)", order: 13, view: "number", type: "number" }, lastRank: { title: "最近一次搜索排名", order: 14, view: "number", type: "number" }, searchStatus: { title: "搜索状态,0为普通状态,1为搜索进行中状态", order: 15, view: "number", type: "number" }, positionUrl: { title: "关键词所在URL", order: 16, view: "textarea", type: "string" }, relatedKeywordId: { title: "相关关键词关联的关键词的id", order: 17, view: "number", type: "number" }, planId: { title: "关键词对应套餐的ID", order: 18, view: "text", type: "string" }, subscriptionId: { title: "订购表ID", order: 19, view: "text", type: "string" }, siteId: { title: "网站表ID", order: 20, view: "text", type: "string" } }; /** * 流程表单调用这个方法获取formSchema * @param param */ export function getBpmFormSchema(_formData): FormSchema[] { // 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema return formSchema; }