---
title: "监控时修改表单，支持同时修改正文（基线20250501以上）"
publicId: "e7f7fe21-05e3-4a81-a006-9fc32d8daab6"
source: "https://weapp.eteams.cn/build/techdoc/wdoc/index.html#/public/doc/e7f7fe21-05e3-4a81-a006-9fc32d8daab6"
---
流程监控时，开启了允许修改表单，进入到监控修改表单的页面时，正文也允许修改。

但是标准产品目前未直接支持，需要此功能时，需要通过ecode开启。参考代码如下：

```javascript
import { qs } from '@weapp/utils';
const isMatchUrl = (requestUrl: string) => {
  if (requestUrl) {
    return requestUrl.indexOf('/api/odoc/flowForm/loadOdocTextSetting') !== -1
      || requestUrl.indexOf('/api/odoc/flowForm/loadOdocFormConfig') !== -1;
  }

  return false;
}

const getUrlParams = () => {
  let searchParams = window.location.search;
  if (!!searchParams && searchParams.length > 0) {
    if (searchParams.indexOf('?') == 0) {
      searchParams = searchParams.substring(1);
    }

    return qs.parse(searchParams);
  }

  return {};
}

axios.interceptors.request.use(request => {
  try {
    const requestUrl = request.url;
    if (isMatchUrl(requestUrl)) {
      const searchParams = getUrlParams();
      const { editFormData, authType } = searchParams;

      const json = request.data;
      //流程监控修改表单
      json.editFormData = editFormData;
      json.authType = authType;
      request.data = json;
    }
  } catch (error) {
    return request;
  }
  return request;
}, error => Promise.reject(error));
```
