import CreateTitleSvg from '@/assets/webapp/8.svg'
import PolishSvg from '@/assets/webapp/9.svg'
import ExpansionSvg from '@/assets/webapp/10.svg'
import AbbreviationsSvg from '@/assets/webapp/11.svg'

// const sceneTypeData = ['智能报告生成', '事务公文类']
const sceneTypeData = ['智能报告生成']
/* 智能报告生成	*/
/* 报告 */
const formList1 = [{
        field: "标题",
        label: "标题",
        type: "textarea",
        placeholder: "建议：事由+报告，例如“关于启动2025年度XX市XX区高新技术企业培育工作的通知”",
        required: true,
        defaultText: "2024年度青秀区环境保护工作情况报告",
        rules: [{
            required: true,
            message: "请输入标题",
            trigger: ['change', 'blur']
        }],
        attrs: {
            // rows: 2,
        }
    },
    {
        field: "主送机关",
        label: "主送机关",
        type: "textarea",
        placeholder: "请说明主送机关，例如“XX区人民政府”",
        required: false,
        defaultText: "2024年度青秀区环境保护工作情况报告",
    },
    {
        field: "缘由",
        label: "缘由",
        type: "textarea",
        placeholder: "请简要说明发文的起因和依据",
        required: true,
        defaultText: "根据《南宁市县区生态环境保护考核细则（2024 年修订）》（南环发〔2024〕8 号）要求，现将我区 2024 年生态环境保护工作成效、存在问题及 2025 年工作计划报告如下：",
        rules: [{
            required: true,
            message: "请输入缘由",
            trigger: ['change', 'blur']
        }],
        attrs: {
            rows: 10,
            maxlength: 1000
        },

    },
    {
        field: "事项",
        label: "事项",
        type: "textarea",
        placeholder: "请详细说明发文的主要内容",
        required: true,
        defaultText: `一、工作成效：
①大气污染防治：完成 35 家餐饮企业油烟净化设备升级，PM2.5 年均浓度 32μg/m³（同比下降 8%）；
②水污染治理：投入 2.3 亿元完成竹排江支流黑臭水体整治，国考断面水质达标率 100%；
③固废管理：建成青秀区大件垃圾拆解中心，年处理能力 5 万吨，资源化利用率达 75%；
④监管执法：开展 “绿盾 2024” 专项行动，查处环境违法案件 17 起，处罚金额 210 万元。
二、存在问题：工业园区挥发性有机物（VOCs）治理进度滞后，农村生活污水收集率仅 60%。
三、改进措施：2025 年计划推进工业园区环保设施提标改造，启动 5 个村屯生活污水治理项目。`,
        rules: [{
            required: true,
            message: "请输入事项",
            trigger: ['change', 'blur']
        }],
        attrs: {
            rows: 10,
            maxlength: 1000
        },
    },
    {
        field: "结语",
        label: "结语",
        type: "textarea",
        placeholder: "例如”特此报告”、“如无不妥，请转批有关单位执行”",
        required: false,
        defaultText: "以上报告，请审阅。"
    },
    {
        field: "发文机关",
        label: "发文机关",
        type: "textarea",
        placeholder: "请说明发文机关，例如“市政府办公室”",
        required: true,
        defaultText: "南宁市青秀区生态环境局",
        rules: [{
            required: true,
            message: "请输入发文机关",
            trigger: ['change', 'blur']
        }]
    },
    {
        field: "发文日期",
        label: "发文日期",
        type: "datePicker",
        placeholder: "请选择日期",
        required: false,
        defaultText: "2025 年 05 月 15 日",
    },
];
/* 通告 */
const formList2 = [{
        field: "标题",
        label: "标题",
        type: "select",
        placeholder: "建议：发文机关+事由+通告，例如“关于《2025年XX市XX区统计年鉴》延迟发布的通告”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入标题",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "主送机关",
        label: "主送机关",
        type: "textarea",
        placeholder: "请说明主送机关（非必填），例如“XX区人民政府”",
        required: false,
        defaultText: "",
    },
    {
        field: "缘由",
        label: "缘由",
        type: "textarea",
        placeholder: "请简要说明发文的起因和依据",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入缘由",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "事项",
        label: "事项",
        type: "textarea",
        placeholder: "请详细说明发文的主要内容",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入事项",
            trigger: ['change', 'blur']
        }]
    },
    {
        field: "结语",
        label: "结语",
        type: "textarea",
        placeholder: "例如“本通告自发布之日起实施”，“特此通告”等",
        required: false,
        defaultText: ""
    },
    {
        field: "发文机关",
        label: "发文机关",
        type: "textarea",
        placeholder: "请说明发文机关，例如“市政府办公室”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入发文机关",
            trigger: ['change', 'blur']
        }]
    },
    {
        field: "发文日期",
        label: "发文日期",
        type: "datePicker",
        placeholder: "请选择日期",
        required: false,
        defaultText: "",
    },
];
/* 决定 */
const formList3 = [{
        field: "标题",
        label: "标题",
        type: "textarea",
        placeholder: "建议：发文机关+关于+事由+决定，例如“XX学校关于处罚 XXXXXXXXXXXXXXXXXXXXXXX 的决定”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入标题",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "主送机关",
        label: "主送机关",
        type: "textarea",
        placeholder: "请说明主送机关，例如“XX学校教务处”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入主送机关",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "缘由",
        label: "缘由",
        type: "textarea",
        placeholder: "请简要说明发文的起因和依据",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入缘由",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "事项",
        label: "事项",
        type: "textarea",
        placeholder: "请详细说明发文的主要内容",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入事项",
            trigger: ['change', 'blur']
        }]
    },
    {
        field: "决定要求",
        label: "决定要求",
        type: "textarea",
        placeholder: "提出决定执行要求，发起希望、号召，例如“希望全体学生引以为戒，严格遵守校规校纪。”",
        required: false,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入决定要求",
            trigger: ['change', 'blur']
        }]
    },
    {
        field: "发文机关",
        label: "发文机关",
        type: "textarea",
        placeholder: "请说明发文机关，例如“XX学校校长办公室”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入发文机关",
            trigger: ['change', 'blur']
        }]
    },
    {
        field: "发文日期",
        label: "发文日期",
        type: "datePicker",
        placeholder: "请选择日期",
        required: false,
        defaultText: "",
    },
];
/* 函 */
const formList4 = [{
        field: "标题",
        label: "标题",
        type: "textarea",
        placeholder: "建议：发文机关+关于+事由+类型+函，例如：XX市档案馆关于商请提供旧城改造影像资料的函",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入标题",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "主送机关",
        label: "主送机关",
        type: "textarea",
        placeholder: "请说明受理并处理来函事项的机关，例如“XX市城建投资集团有限公司”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入主送机关",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "缘由",
        label: "缘由",
        type: "textarea",
        placeholder: "请简要说明发文的起因和依据",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入缘由",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "事项",
        label: "事项",
        type: "textarea",
        placeholder: "请详细说明发文的主要内容",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入事项",
            trigger: ['change', 'blur']
        }]
    },
    {
        field: "要求",
        label: "要求",
        type: "textarea",
        placeholder: "提出希望和要求，例如“请贵单位协助提供相关资料。”",
        required: false,
        defaultText: "",
    },
    {
        field: "结语",
        label: "结语",
        type: "textarea",
        placeholder: "例如“特此函告”、“此致，敬礼”等",
        required: false,
        defaultText: "",
    },
    {
        field: "发文机关",
        label: "发文机关",
        type: "textarea",
        placeholder: "请说明发文机关，例如“XX学校校长办公室”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入发文机关",
            trigger: ['change', 'blur']
        }]
    },
    {
        field: "发文日期",
        label: "发文日期",
        type: "datePicker",
        placeholder: "请选择日期",
        required: false,
        defaultText: "",
    },
];
/* 通知 */
const formList5 = [{
        field: "写作场景",
        label: "写作场景",
        type: "select",
        placeholder: "请选择写作场景",
        required: true,
        defaultText: "工作通知",
        rules: [{
            required: true,
            message: "请选择写作场景",
            trigger: "change"
        }],
        options: [
            { value: "工作通知", label: "工作通知" },
            { value: "会议通知", label: "会议通知" },
            { value: "转批性通知", label: "转批性通知" }
        ],
    },
    // 工作通知
    {
        field: "主题",
        label: "主题",
        type: "textarea",
        placeholder: "关于节能减排专项检查的通知",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入主题",
            trigger: ['change', 'blur']
        }],
        show(val: string) {
            return val === '工作通知'
        }
    },
    {
        field: "主送机关",
        label: "主送机关",
        type: "textarea",
        placeholder: "请说明主送机关，例如“各分公司、各部门“",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入主送机关",
            trigger: ['change', 'blur']
        }],
        show(val: string) {
            return val === '工作通知'
        }
    },
    {
        field: "发文日期",
        label: "发文日期",
        type: "datePicker",
        placeholder: "请选择日期",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请选择日期",
            trigger: "change"
        }],
        show(val: string) {
            return val === '工作通知'
        }
    },
    {
        field: "发文机关",
        label: "发文机关",
        type: "textarea",
        placeholder: "请说明发文机关，例如“集团办公室”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入发文机关",
            trigger: ['change', 'blur']
        }],
        show(val: string) {
            return val === '工作通知'
        }
    },

    // 会议通知
    {
        field: "主题",
        label: "主题",
        type: "textarea",
        placeholder: "关于召开2023年度安全生产工作总结会议的通知",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入主题",
            trigger: ['change', 'blur']
        }],
        show(val: string) {
            return val === '会议通知'
        }
    },
    {
        field: "主送机关",
        label: "主送机关",
        type: "textarea",
        placeholder: "各分公司、各部门",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入主送机关",
            trigger: ['change', 'blur']
        }],
        show(val: string) {
            return val === '会议通知'
        }
    },
    {
        field: "发文日期",
        label: "发文日期",
        type: "datePicker",
        placeholder: "请选择日期",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请选择日期",
            trigger: "change"
        }],
        show(val: string) {
            return val === '会议通知'
        }
    },
    {
        field: "会议时间",
        label: "会议时间",
        type: "datetimePicker",
        placeholder: "请选择时间",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请选择时间",
            trigger: "change"
        }],
         show(val: string) {
            return val === '会议通知'
        }
    },
    {
        field: "会议地点",
        label: "会议地点",
        type: "textarea",
        placeholder: "XX地点XX层XX会议室",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入会议地点",
            trigger: ['change', 'blur']
        }],
         show(val: string) {
            return val === '会议通知'
        }
    },
    {
        field: "参会人员",
        label: "参会人员",
        type: "textarea",
        placeholder: "公司全体员工",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入发文机关",
            trigger: ['change', 'blur']
        }],
         show(val: string) {
            return val === '会议通知'
        }
    },
    {
        field: "发文机关",
        label: "发文机关",
        type: "textarea",
        placeholder: "请说明发文机关，例如“集团办公室”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入发文机关",
            trigger: ['change', 'blur']
        }],
         show(val: string) {
            return val === '会议通知'
        }
    },

    // 转批性通知
    {
        field: "主题",
        label: "主题",
        type: "textarea",
        placeholder: "XX批转关于XX的通知",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入主题",
            trigger: ['change', 'blur']
        }],
         show(val: string) {
            return val === '转批性通知'
        }
    },
    {
        field: "主送机关",
        label: "主送机关",
        type: "textarea",
        placeholder: "例如“XX市科技局”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入主送机关",
            trigger: ['change', 'blur']
        }],
         show(val: string) {
            return val === '转批性通知'
        }
    },
    {
        field: "批复意见",
        label: "批复意见",
        type: "textarea",
        placeholder: "例如“认真贯彻执行”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入批复意见",
            trigger: ['change', 'blur']
        }],
         show(val: string) {
            return val === '转批性通知'
        }
    },
    {
        field: "发文机关",
        label: "发文机关",
        type: "textarea",
        placeholder: "请说明发文机关，例如“集团办公室”",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入发文机关",
            trigger: ['change', 'blur']
        }],
         show(val: string) {
            return val === '转批性通知'
        }
    },
    {
        field: "发文日期",
        label: "发文日期",
        type: "datePicker",
        placeholder: "请选择日期",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请选择日期",
            trigger: "change"
        }],
         show(val: string) {
            return val === '转批性通知'
        }
    },
];

/* 事务公文类	*/
/* 工作汇报 */
const formList8 = [{
        field: "标题",
        label: "标题",
        type: "textarea",
        placeholder: "例如：市场部2024年第一季度XX工作汇报",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入标题",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "工作总结",
        label: "工作总结",
        type: "textarea",
        placeholder: "请概述工作的基本情况、主要任务、主要目标、达成情况",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入标题",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "工作计划",
        label: "工作计划",
        type: "textarea",
        placeholder: "请填写后续计划安排",
        required: false,
        defaultText: "",
    },
    {
        field: "问题反思",
        label: "问题反思",
        type: "textarea",
        placeholder: "请填写工作中遇到的问题及反思",
        required: false,
        defaultText: "",
    },
    {
        field: "报告背景",
        label: "报告背景",
        type: "textarea",
        placeholder: "请填写报告的背景信息",
        required: false,
        defaultText: "",
    },
];
/* 演讲稿 */
const formList9 = [{
        field: "演讲主题",
        label: "演讲主题",
        type: "textarea",
        placeholder: "例如：青春逐梦，未来可期",
        required: true,
        defaultText: "青春逐梦，未来可期",
        rules: [{
            required: true,
            message: "请输入演讲主题",
            trigger: ['change', 'blur']
        }],
        attrs: {
            maxlength: 200,
        }
    },
    {
        field: "演讲目的",
        label: "演讲目的",
        type: "textarea",
        placeholder: "例如：回顾高三生活，展望未来",
        required: true,
        defaultText: "回顾高三生活，展望未来",
        rules: [{
            required: true,
            message: "请输入演讲目的",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "演讲者",
        label: "演讲者",
        type: "textarea",
        placeholder: "例如：XX学校高三班主任XX",
        required: true,
        defaultText: "XX学校高三班主任XX",
        rules: [{
            required: true,
            message: "请输入演讲者",
            trigger: ['change', 'blur']
        }],
    },
    {
        field: "观众群体",
        label: "观众群体",
        type: "textarea",
        placeholder: "例如：XX学校高三学生",
        required: true,
        defaultText: "XX学校高三学生",
        rules: [{
            required: true,
            message: "请输入观众群体",
            trigger: ['change', 'blur']
        }],
    },
];

/* 故障预测与诊断报告 */ 
const formList10 = [
    {
        field: "背景信息",
        label: "背景信息",
        type: "textarea",
        placeholder: "",
        required: true,
        defaultText: "",
        rules: [{
            required: true,
            message: "请输入背景信息",
            trigger: ['change', 'blur']
        }],
        attrs: {
            rows: 12,
            maxlength: 500,
        }
    },
]

/* 隐藏 [填入示例] 按钮配置 */
const hiddenDefaultText = [
    'template-001-006', // 故障预测与诊断报告
]

const formListConfig = {
    'template-001-001': formList1,
    'template-001-002': formList2,
    'template-001-003': formList3,
    'template-001-004': formList4,
    'template-001-005': formList5,
    'template-001-006': formList10, /* 故障预测与诊断报告 */
    'template-002-001': formList8,
    'template-002-002': formList9,
}

/* 润色配置列表 */
const polishConfig = [{
        id: 0,
        title: '生成标题',
        description: '根据文档内容生成标题',
        url: CreateTitleSvg
    },
    {
        id: 1,
        title: '润色',
        description: '对文章语言进行丰富润色',
        url: PolishSvg
    },
    {
        id: 2,
        title: '扩写',
        description: '对文章内容进行扩写',
        url: ExpansionSvg
    },
    {
        id: 3,
        title: '缩写',
        description: '根据文章内容进行缩写',
        url: AbbreviationsSvg
    }
]

/* 字数限制 */
const wordCountLimit = [
    '不限制',
    '100字',
    '200字',
    '300字',
    '400字',
    '500字',
    '800字',
    '1000字',
    '1200字',
    '1500字',
]

export {
    sceneTypeData,
    formListConfig,
    polishConfig,
    wordCountLimit,
    hiddenDefaultText
}