更新
This commit is contained in:
@@ -160,12 +160,6 @@ class GlobalController extends GetControllerEx<GlobalModel> {
|
||||
return "$mac".toUpperCase();
|
||||
}
|
||||
|
||||
getDeviceType() async {
|
||||
var rs =
|
||||
await ef.from("app_device_type").select().order("id", ascending: true);
|
||||
model.deviceType = rs.where((d) => d["page"] != null).toList();
|
||||
updateAll();
|
||||
}
|
||||
|
||||
getDeviceList({int time = 1}) async {
|
||||
await EasyDartModule.dio.get("/api/device/info/list").then((d) {
|
||||
|
||||
@@ -38,19 +38,7 @@ class PersonController extends GetControllerEx<PersonModel> {
|
||||
attr = GetModel(PersonModel()).obs;
|
||||
}
|
||||
RxList selectedDiseaseIds = [].obs;
|
||||
// RxList diseaseList = [
|
||||
// {'id': 1, 'name': '高血压'},
|
||||
// {'id': 2, 'name': '糖尿病'},
|
||||
// {'id': 3, 'name': '冠心病'},
|
||||
// {'id': 4, 'name': '哮喘'},
|
||||
// {'id': 5, 'name': '脑卒中'},
|
||||
// {'id': 6, 'name': '慢性肾病'},
|
||||
// {'id': 7, 'name': '慢阻肺'},
|
||||
// {'id': 8, 'name': '类风湿关节炎'},
|
||||
// {'id': 9, 'name': '类风湿关节炎类风湿关节炎'},
|
||||
// {'id': 10, 'name': '类风湿关节炎类风湿关节炎类风湿关节炎'},
|
||||
// ].obs;
|
||||
|
||||
|
||||
RxString currentPersonId = "".obs;
|
||||
RxString name = "".obs;
|
||||
RxInt gender = 1.obs;
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
class PdfController extends GetxController {
|
||||
var localPdfPath = Rx<String?>(null);
|
||||
|
||||
// 加载 PDF 文件
|
||||
Future<void> loadPdf() async {
|
||||
final byteData = await rootBundle.load('assets/img/test.pdf');
|
||||
final tempDir = await getTemporaryDirectory();
|
||||
|
||||
// 使用 path 包拼接路径
|
||||
final filePath = p.join(tempDir.path, 'test.pdf');
|
||||
final file = File(filePath);
|
||||
|
||||
// 保存文件到临时目录
|
||||
await file.writeAsBytes(byteData.buffer.asUint8List());
|
||||
localPdfPath.value = filePath; // 更新 PDF 路径
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user