1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import 'package:fis_common/event/event_type.dart';
- /// 检查信息
- class ExamInfo {
- int _selectedImageIndex = -1;
- /// 检查编号
- final String code;
- /// 检查图像集合
- List<ExamImageInfo> images = [];
- ExamInfo(this.code);
- /// 选中图像索引
- int get selectedImageIndex => _selectedImageIndex;
- set selectedImageIndex(int value) {
- if (value != _selectedImageIndex) {
- _selectedImageIndex = value;
- selectedImageChanged.emit(this, value);
- }
- }
- /// 当前选中图像
- ExamImageInfo get selectedImage => images[selectedImageIndex];
- /// 图像选中变化事件
- final selectedImageChanged = FEventHandler<int>();
- }
- /// 检查图像信息
- class ExamImageInfo {
- /// 图像文件链接
- final String url;
- /// 预览图链接
- final String previewUrl;
- /// 图像code
- final String? remedicalCode;
- ExamImageInfo(
- this.url,
- this.previewUrl, {
- this.remedicalCode,
- });
- }
|