Przeglądaj źródła

Merge branch 'master-ukk'

glglove 18 godzin temu
rodzic
commit
8286cc1842

+ 58 - 50
packages/cpt_uk/lib/modules/job/job_applied/applied_staff_item.dart

@@ -435,72 +435,80 @@ class AppliedStaffItem extends StatelessWidget {
                 //编辑按钮
                 Visibility(
                   visible: item.actionList?.contains("edit") ?? false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onEditAction?.call();
-                    },
-                    text: "Edit".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor(
-                      "#FFBB1B",
-                    ),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onEditAction?.call();
+                      },
+                      text: "Edit".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor(
+                        "#FFBB1B",
+                      ),
+                      radius: 17.25,
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
 
                 // revise 按钮
                 Visibility(
                   visible: item.actionList?.contains("revise") ?? false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onReviseAction?.call();
-                    },
-                    text: "Revise".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#FFFFBB1B"),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onReviseAction?.call();
+                      },
+                      text: "Revise".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor("#FFFFBB1B"),
+                      radius: 17.25,
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
 
 
                 //状态工作流按钮
                 Visibility(
                   visible: item.actionList?.contains("status") ?? false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onStatusAction?.call();
-                    },
-                    text: "Status".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#0AC074"),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onStatusAction?.call();
+                      },
+                      text: "Status".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor("#0AC074"),
+                      radius: 17.25,
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
 
                 //Remark按钮
                 Visibility(
                   visible: item.actionList?.contains("remarks") ?? false,
-                  child: MyButton(
-                    onPressed: () {
-                      FocusScope.of(context).unfocus();
-                      onRemarkAction?.call();
-                    },
-                    text: "Remarks".tr,
-                    textColor: ColorConstants.white,
-                    backgroundColor: hexToColor("#56AAFF"),
-                    radius: 17.25,
-                    minWidth: 60,
-                    minHeight: 35,
-                  ).marginOnly(left: 12),
+                  child: Flexible(
+                    child: MyButton(
+                      onPressed: () {
+                        FocusScope.of(context).unfocus();
+                        onRemarkAction?.call();
+                      },
+                      text: "Remarks".tr,
+                      textColor: ColorConstants.white,
+                      backgroundColor: hexToColor("#56AAFF"),
+                      radius: 17.25,
+                      minWidth: 60,
+                      minHeight: 35,
+                    ).marginOnly(left: 12),
+                  ),
                 ),
               ],
             ).marginOnly(top: 15),

+ 12 - 11
packages/cpt_uk/lib/modules/job/job_applied/widget/applied_add_staff_controller.dart

@@ -311,17 +311,18 @@ class AppliedAddStaffController extends GetxController with DioCancelableMixin {
       // 使用PDF查看器打开或下载文件
       String title = url!.substring(url!.lastIndexOf("/") + 1);
 
-      // 对URL进行正确解码
-      String decodedUrl = Uri.decodeComponent(url);
-      // 再编码
-      String encodedUrl = Uri.encodeFull(url);
-
-      Log.d('解码后URL: $decodedUrl');
-      Log.d('编码后URL: $encodedUrl');
-
-      // String urlNew = "https://yycircle-ap.s3.ap-southeast-1.amazonaws.com/202406/19/supporting_documents_to_submit.pdf";
-
-      GlobalWebPage.startInstance(title, url!, isNeedEncodeFull:false);
+      // // 对URL进行正确解码
+      // String decodedUrl = Uri.decodeComponent(url);
+      // // 再编码
+      // String encodedUrl = Uri.encodeFull(url);
+      //
+      // Log.d('解码后URL: $decodedUrl');
+      // Log.d('编码后URL: $encodedUrl');
+
+      // 打开pdf 链接 用google 地址拼接成新的链接
+      String urlNew = "https://docs.google.com/viewer?url=" + url;
+      Log.d('googleURL: $urlNew');
+      GlobalWebPage.startInstance(title, urlNew!, isNeedEncodeFull:true);
 
     } else {
       String title = url!.substring(url!.lastIndexOf("/") + 1);

+ 12 - 11
packages/cpt_uk/lib/modules/job/labour_request_preselected_list/widget/preselected_add_staff_controller.dart

@@ -308,17 +308,18 @@ class PreselectedAddStaffController extends GetxController with DioCancelableMix
       // 使用PDF查看器打开或下载文件
       String title = url!.substring(url!.lastIndexOf("/") + 1);
 
-      // 对URL进行正确解码
-      String decodedUrl = Uri.decodeComponent(url);
-      // 再编码
-      String encodedUrl = Uri.encodeFull(url);
-
-      Log.d('解码后URL: $decodedUrl');
-      Log.d('编码后URL: $encodedUrl');
-
-      // String urlNew = "https://yycircle-ap.s3.ap-southeast-1.amazonaws.com/202406/19/supporting_documents_to_submit.pdf";
-
-      GlobalWebPage.startInstance(title, url!, isNeedEncodeFull:false);
+      // // 对URL进行正确解码
+      // String decodedUrl = Uri.decodeComponent(url);
+      // // 再编码
+      // String encodedUrl = Uri.encodeFull(url);
+      //
+      // Log.d('解码后URL: $decodedUrl');
+      // Log.d('编码后URL: $encodedUrl');
+
+      // 打开pdf 链接 用google 地址拼接成新的链接
+      String urlNew = "https://docs.google.com/viewer?url=" + url;
+      Log.d('googleURL: $urlNew');
+      GlobalWebPage.startInstance(title, urlNew!, isNeedEncodeFull:true);
 
     } else {
       String title = url!.substring(url!.lastIndexOf("/") + 1);

+ 1 - 1
packages/cs_plugin_platform/lib/platform_export.dart

@@ -1,4 +1,4 @@
 export 'package:dio/dio.dart';
 export 'package:permission_handler/permission_handler.dart';
 export 'engine/image/image_nine_grid.dart';
-export 'engine/media/image_picker_utils.dart';
+export 'engine/media/image_picker_utils.dart';