西南醫院

數據初始化

發起基因檢測,填寫數據後不能提交,此時需要初始化。

步驟:查看開發者工具下Application下的organization字段複製 xxxxxxx;

           再npm run initdata --  (有空格)xxxxx   xnyy

           再npm start

(2)西南醫院的laboratory-api修改過後,體現不到前端頁面上。

         要先在laboratory-api使用命令:npm run initdata -- eargene_test xnyy

1.檢測管理

(1)點擊病歷編號,跳轉到病歷詳情;

流程是:
先把column裏的Document引入,然後使用

medical-web/projects/xnyy/detections/index.js

//從Modules引入Document,Document表示病歷
const {moment, Report, Detail, Priority, Risk, Status, Link, Document} = Modules;


//修改病歷編號下的render
{
        title: '病歷編號',
        dataIndex: 'subject.spec.readable_document_id',
        width: 200,
        fixed:"left",   //表示固定在左側,不能滾動
        render: (text, record) => ({
          children: Document(text, record.subject.spec.document_id),
          props: {rowSpan: record.rowSpan}
        })
}



medical-web/src/pages/detection/list/index.jsx

//增加一個方法
 pushDocument(text, id) {
    const url = `/medical/document/${id}`;
    return (
      <span className="task_id">
        <a href={url}>{text}</a>
      </span>
    );
  }


//把寫的方法,添加到columns裏,命名爲Document
const columns = detectionConfig.columns({
      moment,
      Priority: this.priority,
      Risk: this.risk,
      Link: this.createLink,
      Report: this.createShlyLink,
      Detail: this.pushDetail,
      Document: this.pushDocument,
      Status: this.renderStatus,
      filters: {
        project: _.map(projects, t => ({
          text: t.name,
          value: t.name
        })),
        priority: [
          {value: 0, text: '加急'},
          {value: 1, text: '普通'}
        ]
      }
    });


//跳轉到檢測詳情的方法,可以對比參考
 pushDetail(text, record) {
    const id = get(record, '_id', get(record, 'r_id'));
    return (
      <span className="task_id">
        <Link to={`/detections/detail/${id}`}>
          {text}
        </Link>
      </span>
    );
  }








(2)在搜索框右邊添加搜索結果條數

找到搜索框的代碼在Filterstable組件裏面,找到這個組件渲染搜索框的地方,添加相應內容;

數據在使用這個組件的位置,通過props傳遞進total數據即可。

(3)

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章