前置条件:step-02 已完成。 实施依据:
docs/crm-migration/plans/{module}/06-steps.md中的前端适配步骤。 同步参考:ref-frontend-diff.md、ref-ui-standards.md 模块方案:docs/crm-migration/plans/{module}/03-frontend-spec.md(前端功能规格)
逐行阅读理解后修改,不要机械式查找替换。 不同页面上下文不同,适配方式可能不同。
对每个 .vue 文件执行以下审阅:
<script> 部分逐行阅读,理解数据流和调用链后逐处修改:
getCurrentInstance() / proxy → 理解用途后改用 shanxia2.0 等价 APIproxy?.useDict('xxx') → useDictTag('xxx') 或 dictStore.getLabel('xxx', val)proxy?.$modal.msgSuccess(msg) → ElMessage.success(msg)proxy?.$modal.confirm(msg) → ElMessageBox.confirm(msg, '提示', { type: 'warning' })request({ url, method, data }) → request.post('/web/crm/xxx', data)hasPermi(['crm:xxx:add']) → v-auth="'add'"import { ElXxx } / import { ref, reactive } → 删除(自动导入)<template> 部分逐行阅读,理解结构意图后逐处修改:
<el-drawer> → <el-dialog>(统一用弹窗,禁止抽屉)<dict-tag> → <el-tag :type="getTagType(val)" size="small">{{ getLabel(val) }}</el-tag><right-toolbar> → <div class="list-toolbar"><div class="list-toolbar-row">...</div></div>label-width="120px" → label-position="top"<el-row :gutter="20"><el-col :span="12"> → .dialog-form-layout + .form-grid-2fetchUploadAttachmentel-button 添加 <el-icon><style> 部分逐行阅读,理解样式意图后适配:
所有弹窗必须符合以下模板:
<el-dialog v-model="innerVisible" :title="..." width="960px"
destroy-on-close align-center :close-on-click-modal="false"
style="backdrop-filter: none" class="dialog-form-layout">
<el-form ref="formRef" :model="formData" :rules="formRules" label-position="top" scroll-to-error>
<div class="form-grid-2">...</div>
</el-form>
<template #footer>
<el-button @click="innerVisible = false"><el-icon><Close /></el-icon>取消</el-button>
<el-button type="primary" @click="handleSubmit"><el-icon><Check /></el-icon>确定</el-button>
</template>
</el-dialog>
为该模块创建 web-admin/src/api/crm/{module}.ts,每个接口对应一个函数,使用 request.post() 调用。
在路由配置中添加该模块的页面路由。
对照 ref-ui-standards.md 逐条检查。
SystemViewDialog(勿保留 el-drawer);状态/类型字段配 tagType + dictStore.getLabel(见 OpenSpec P09)。responseType: 'blob' + showErrorMessage: false;详见 ref-frontend-diff.md §「Excel / Blob 导出」。authList,使用 useXxxPerm + menu-codes(见 ref-lessons-learned.md §28)。.vue 文件的 script/template/style 已逐行审阅并适配完成后加载 step-04-backend.md 实现后端。