Browse Source

修改状态

newdev_shunjiawei
tanlongsheng 9 months ago
parent
commit
49465ef4c3
  1. 12
      lib/modules/meeting/controllers/meeting_details_controller.dart
  2. 3
      lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart
  3. 18
      lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart
  4. 6
      lib/modules/meeting/views/meeting_home_view.dart
  5. 54
      lib/modules/meeting/views/tabs/overview_tab.dart
  6. 479
      lib/modules/meeting/views/tabs/speech_tab.dart
  7. 74
      lib/modules/meeting/views/tabs/summary_tab.dart

12
lib/modules/meeting/controllers/meeting_details_controller.dart

@ -57,7 +57,7 @@ class MeetingDetailsController extends GetxController
RxInt editSpeakerTextId = 0.obs; RxInt editSpeakerTextId = 0.obs;
String editSpeakerTextChange = ''; String editSpeakerTextChange = '';
int _everType = 99; int _everType = 99999;
RxInt summaryNumberModifications = 0.obs; RxInt summaryNumberModifications = 0.obs;
RxInt personnelNumberModifications = 0.obs; RxInt personnelNumberModifications = 0.obs;
@ -94,12 +94,12 @@ class MeetingDetailsController extends GetxController
_tasktypeListener = ever(_meetingTaskService.tasktype, (value) { _tasktypeListener = ever(_meetingTaskService.tasktype, (value) {
meetingDetails.value.tasktype = value; meetingDetails.value.tasktype = value;
if (_everType <= value) { if (_everType <= value) {
if (value >= 5) { if (value >= 5 && value < 10000) {
meetingDetails.value.personnel = _meetingTaskService.personnel; meetingDetails.value.personnel = _meetingTaskService.personnel;
meetingDetails.value.summary = _meetingTaskService.summary; meetingDetails.value.summary = _meetingTaskService.summary;
meetingDetails.value.overview = _meetingTaskService.overview; meetingDetails.value.overview = _meetingTaskService.overview;
summaryNumberModifications.value++; summaryNumberModifications.value++;
} else if (value >= 3) { } else if (value >= 3 && value < 10000) {
textList.value = _meetingTaskService.textList; textList.value = _meetingTaskService.textList;
} }
} }
@ -132,14 +132,16 @@ class MeetingDetailsController extends GetxController
if (meetingDetails.value.tasktype == 5) { if (meetingDetails.value.tasktype == 5) {
await _meetingTaskService.readTask(id); await _meetingTaskService.readTask(id);
} }
if (meetingDetails.value.tasktype >= 5) { if (meetingDetails.value.tasktype >= 5 &&
meetingDetails.value.tasktype < 10000) {
dragOffset.value = 0; dragOffset.value = 0;
isTop.value = true; isTop.value = true;
} }
if (meetingData.value.filepath.isNotEmpty) { if (meetingData.value.filepath.isNotEmpty) {
await _loadPlayerController(); await _loadPlayerController();
} }
if (meetingDetails.value.tasktype >= 3) { if (meetingDetails.value.tasktype >= 3 &&
meetingDetails.value.tasktype < 10000) {
List speakerList = await SqfliteApi.getMeetingSpeaker(id); List speakerList = await SqfliteApi.getMeetingSpeaker(id);
textList.value = List.from(speakerList); textList.value = List.from(speakerList);
} }

3
lib/modules/meeting/views/bottomSheet/more_bottom_sheet.dart

@ -26,7 +26,8 @@ class _MoreBottomSheetState extends State<MoreBottomSheet> {
children: [ children: [
SizedBox(height: 10.w), SizedBox(height: 10.w),
_shareItem(Icons.refresh, 'reSummarize'.tr, //重新总结 _shareItem(Icons.refresh, 'reSummarize'.tr, //重新总结
onTap: _detailsController.meetingDetails.value.tasktype >= 5 onTap: _detailsController.meetingDetails.value.tasktype >= 5 &&
_detailsController.meetingDetails.value.tasktype < 10002
? () { ? () {
Get.back(); Get.back();
Get.bottomSheet( Get.bottomSheet(

18
lib/modules/meeting/views/bottomSheet/share_bottom_sheet.dart

@ -117,7 +117,8 @@ class _ShareBottomSheetState extends State<ShareBottomSheet> {
]), ]),
_box([ _box([
_shareItem(Icons.copy, 'copyTranscript'.tr, // 对应中文:复制转写 _shareItem(Icons.copy, 'copyTranscript'.tr, // 对应中文:复制转写
onTap: _controller.meetingDetails.value.tasktype >= 3 onTap: _controller.meetingDetails.value.tasktype >= 3 &&
_controller.meetingDetails.value.tasktype < 10002
? () { ? () {
Get.back(); Get.back();
_copy(_getAllText()); _copy(_getAllText());
@ -125,7 +126,8 @@ class _ShareBottomSheetState extends State<ShareBottomSheet> {
: null), : null),
_shareItem(Icons.copy, 'copySummary'.tr, // 对应中文:复制总结 _shareItem(Icons.copy, 'copySummary'.tr, // 对应中文:复制总结
isBorder: false, isBorder: false,
onTap: _controller.meetingDetails.value.tasktype >= 5 onTap: _controller.meetingDetails.value.tasktype >= 5 &&
_controller.meetingDetails.value.tasktype < 10001
? () { ? () {
Get.back(); Get.back();
_copy(_markdownToPlainText( _copy(_markdownToPlainText(
@ -142,7 +144,8 @@ class _ShareBottomSheetState extends State<ShareBottomSheet> {
'shareMeetingAudio'.tr); // 对应中文:分享会议音频 'shareMeetingAudio'.tr); // 对应中文:分享会议音频
}), }),
_shareItem(Icons.message, 'exportTranscript'.tr, // 对应中文:导出转写 _shareItem(Icons.message, 'exportTranscript'.tr, // 对应中文:导出转写
onTap: _controller.meetingDetails.value.tasktype >= 3 onTap: _controller.meetingDetails.value.tasktype >= 3 &&
_controller.meetingDetails.value.tasktype < 10002
? () async { ? () async {
Get.back(); Get.back();
final tempDir = await getTemporaryDirectory(); final tempDir = await getTemporaryDirectory();
@ -155,7 +158,8 @@ class _ShareBottomSheetState extends State<ShareBottomSheet> {
} }
: null), : null),
_shareItem(Icons.article, 'exportSummary'.tr, // 对应中文:导出总结 _shareItem(Icons.article, 'exportSummary'.tr, // 对应中文:导出总结
onTap: _controller.meetingDetails.value.tasktype >= 5 onTap: _controller.meetingDetails.value.tasktype >= 5 &&
_controller.meetingDetails.value.tasktype < 10001
? () async { ? () async {
Get.back(); Get.back();
Get.bottomSheet( Get.bottomSheet(
@ -205,7 +209,8 @@ class _ShareBottomSheetState extends State<ShareBottomSheet> {
_shareItem( _shareItem(
Icons.save_alt, Icons.save_alt,
'保存思维导图', '保存思维导图',
onTap: _controller.meetingDetails.value.tasktype >= 5 onTap: _controller.meetingDetails.value.tasktype >= 5 &&
_controller.meetingDetails.value.tasktype < 10001
? () { ? () {
Get.back(); Get.back();
final mindMapController = final mindMapController =
@ -233,7 +238,8 @@ class _ShareBottomSheetState extends State<ShareBottomSheet> {
Icons.lan, Icons.lan,
'shareMindMap'.tr, // 对应中文:分享思维导图 'shareMindMap'.tr, // 对应中文:分享思维导图
isBorder: false, isBorder: false,
onTap: _controller.meetingDetails.value.tasktype >= 5 onTap: _controller.meetingDetails.value.tasktype >= 5 &&
_controller.meetingDetails.value.tasktype < 10001
? () { ? () {
Get.back(); Get.back();
final mindMapController = final mindMapController =

6
lib/modules/meeting/views/meeting_home_view.dart

@ -267,6 +267,12 @@ class _MeetingHomeViewState extends State<MeetingHomeView>
case 5: case 5:
tasktypeText = 'summaryComplete'.tr; // 对应中文:总结完成 tasktypeText = 'summaryComplete'.tr; // 对应中文:总结完成
break; break;
case 10001:
tasktypeText = '总结失败';
break;
case 10002:
tasktypeText = '转写失败';
break;
default: default:
tasktypeText = ''; tasktypeText = '';
} }

54
lib/modules/meeting/views/tabs/overview_tab.dart

@ -99,7 +99,8 @@ class _OverviewTabState extends State<OverviewTab> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if (_controller.meetingDetails.value.tasktype >= 3) if (_controller.meetingDetails.value.tasktype >= 3 &&
_controller.meetingDetails.value.tasktype < 10000)
_button( _button(
Icons.auto_awesome, Icons.auto_awesome,
'Ask AI', 'Ask AI',
@ -138,6 +139,50 @@ class _OverviewTabState extends State<OverviewTab> {
}, },
), ),
), ),
if (_controller.meetingDetails.value.tasktype == 10002)
SizedBox(
width: 150.w,
child: _button(
Icons.auto_awesome,
'重新生成',
() {
Get.bottomSheet(
const GenerateBottomSheet(),
isScrollControlled: true,
backgroundColor:
isDarkMode ? Colors.grey[800] : Colors.grey[100],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r),
),
),
);
},
),
),
if (_controller.meetingDetails.value.tasktype == 10001)
SizedBox(
width: 150.w,
child: _button(
Icons.auto_awesome,
'重新总结',
() {
Get.bottomSheet(
const GenerateBottomSheet(
isSummarizeAgain: true,
),
isScrollControlled: true,
backgroundColor:
isDarkMode ? Colors.grey[800] : Colors.grey[100],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r),
),
),
);
},
),
),
], ],
), ),
), ),
@ -200,7 +245,8 @@ class _OverviewTabState extends State<OverviewTab> {
Widget _empty() { Widget _empty() {
final isDarkMode = Theme.of(context).brightness == Brightness.dark; final isDarkMode = Theme.of(context).brightness == Brightness.dark;
return Padding( return Container(
width: double.infinity,
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 30.w), padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 30.w),
child: Column( child: Column(
children: [ children: [
@ -221,7 +267,9 @@ class _OverviewTabState extends State<OverviewTab> {
), ),
), ),
Text( Text(
'aiAnalysisDesc'.tr, // 对应中文:AI分析识别录音中的关键事件,让你选择重要事件进行AI生成。 _controller.meetingDetails.value.tasktype < 10000
? 'aiAnalysisDesc'.tr // 对应中文:AI分析识别录音中的关键事件,让你选择重要事件进行AI生成。
: '分析失败,请稍后重试',
style: TextStyle( style: TextStyle(
color: MeetingUIUtils.getSecondaryTextColor(isDarkMode), color: MeetingUIUtils.getSecondaryTextColor(isDarkMode),
fontSize: 14.sp, fontSize: 14.sp,

479
lib/modules/meeting/views/tabs/speech_tab.dart

@ -20,229 +20,259 @@ class SpeechTab extends GetView<MeetingDetailsController> {
return Stack( return Stack(
children: [ children: [
Obx( Obx(
() => ListView.builder( () => controller.meetingDetails.value.tasktype != 10002
itemCount: controller.textList.length, ? ListView.builder(
padding: EdgeInsets.only(bottom: 80.w), itemCount: controller.textList.length,
itemBuilder: (BuildContext context, int index) { padding: EdgeInsets.only(bottom: 80.w),
Map item = controller.textList[index]; itemBuilder: (BuildContext context, int index) {
TextStyle textStyle = TextStyle( Map item = controller.textList[index];
fontSize: 15.sp, TextStyle textStyle = TextStyle(
color: MeetingUIUtils.getTextColor(isDarkMode), fontSize: 15.sp,
letterSpacing: 0, color: MeetingUIUtils.getTextColor(isDarkMode),
height: 1.4, letterSpacing: 0,
); height: 1.4,
return Column( );
crossAxisAlignment: CrossAxisAlignment.start, return Column(
children: [ crossAxisAlignment: CrossAxisAlignment.start,
Padding(
padding: EdgeInsets.only(top: 10.w),
child: Row(
children: [ children: [
if (item['speaker'].isNotEmpty) Padding(
Container( padding: EdgeInsets.only(top: 10.w),
width: 11.w, child: Row(
height: 11.w, children: [
margin: EdgeInsets.only(right: 3.w), if (item['speaker'].isNotEmpty)
decoration: BoxDecoration( Container(
borderRadius: BorderRadius.circular(11.r), width: 11.w,
border: Border.all( height: 11.w,
color: const Color(0xFFFFC107), margin: EdgeInsets.only(right: 3.w),
width: 3.w, decoration: BoxDecoration(
), borderRadius: BorderRadius.circular(11.r),
), border: Border.all(
), color: const Color(0xFFFFC107),
if (item['speaker'].isNotEmpty) width: 3.w,
GestureDetector( ),
onTap: () {
if (controller.isSpeakerText.value) return;
Get.bottomSheet(
SpeakerBottomSheet(item['id'], item['speaker']),
isScrollControlled: true,
backgroundColor: isDarkMode ? Colors.grey[800] : Colors.grey[100],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r),
), ),
), ),
); if (item['speaker'].isNotEmpty)
}, GestureDetector(
child: Padding( onTap: () {
padding: EdgeInsets.only(right: 5.w), if (controller.isSpeakerText.value) return;
child: Text( Get.bottomSheet(
item['speaker'], SpeakerBottomSheet(
item['id'], item['speaker']),
isScrollControlled: true,
backgroundColor: isDarkMode
? Colors.grey[800]
: Colors.grey[100],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r),
),
),
);
},
child: Padding(
padding: EdgeInsets.only(right: 5.w),
child: Text(
item['speaker'],
style: TextStyle(
color: const Color(0xFFFFC107),
fontSize: 13.sp,
),
),
),
),
Text(
DateUtil.formatDateMs(
item['starttime'],
format: 'HH:mm:ss',
isUtc: true,
),
style: TextStyle( style: TextStyle(
color: const Color(0xFFFFC107), color: MeetingUIUtils.getSecondaryTextColor(
isDarkMode),
fontSize: 13.sp, fontSize: 13.sp,
), ),
), ),
), Obx(() {
), bool isActive = false;
Text( int starttime = item['starttime'];
DateUtil.formatDateMs( int endtime = 0;
item['starttime'], if (index == controller.textList.length - 1) {
format: 'HH:mm:ss', endtime = controller.durationMax.value;
isUtc: true, } else {
), endtime = controller.textList[index + 1]
style: TextStyle( ['starttime'];
color: MeetingUIUtils.getSecondaryTextColor(isDarkMode), }
fontSize: 13.sp, if (controller.currentDuration.value != 0) {
if (controller.currentDuration.value >=
starttime &&
controller.currentDuration.value <
endtime) {
isActive = true;
}
}
return isActive
? Container(
width: 16.w,
height: 16.w,
margin: EdgeInsets.only(left: 5.w),
alignment: Alignment.center,
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
color: Colors.red[100],
borderRadius:
BorderRadius.circular(4.r),
),
child: Transform.scale(
scale: 1.6,
child: Lottie.asset(
'assets/lottie/sound_effect.json',
controller:
controller.lottieController,
),
),
)
: const SizedBox();
}),
],
), ),
), ),
Obx(() { Obx(() {
bool isActive = false; if (controller.isSpeakerText.value) {
int starttime = item['starttime']; TextEditingController speakerTextController =
int endtime = 0; TextEditingController(text: item['content']);
if (index == controller.textList.length - 1) { return Obx(
endtime = controller.durationMax.value; () => Container(
padding: EdgeInsets.symmetric(
horizontal: 14.w,
),
decoration: BoxDecoration(
color: controller.editSpeakerTextId.value ==
item['id']
? Colors.blue[100]
: null,
borderRadius: BorderRadius.circular(8.w),
),
child: FocusScope(
onFocusChange: (bool hasFocus) {
if (hasFocus) {
controller.editSpeakerTextId.value =
item['id'];
controller.editSpeakerTextChange = '';
} else {
if (speakerTextController.text !=
item['content']) {
Map? foundElement = controller
.editSpeakerTextList
.firstWhere(
(element) =>
element['id'] == item['id'],
orElse: () => null,
);
if (foundElement != null) {
foundElement['content'] =
speakerTextController.text;
} else {
controller.editSpeakerTextList.add({
'id': item['id'],
'content':
speakerTextController.text,
});
}
}
}
},
child: TextField(
controller: speakerTextController,
style: textStyle,
minLines: 1,
maxLines: 100,
decoration: InputDecoration(
isDense: true,
fillColor: Colors.transparent,
border: InputBorder.none,
contentPadding:
EdgeInsets.symmetric(vertical: 5.w),
),
onChanged: (String value) {
controller.editSpeakerTextChange = value;
},
),
),
),
);
} else { } else {
endtime = return Obx(() {
controller.textList[index + 1]['starttime']; bool isActive = false;
} int starttime = item['starttime'];
if (controller.currentDuration.value != 0) { int endtime = 0;
if (controller.currentDuration.value >= starttime && if (index == controller.textList.length - 1) {
controller.currentDuration.value < endtime) { endtime = controller.durationMax.value;
isActive = true; } else {
} endtime =
} controller.textList[index + 1]['starttime'];
return isActive }
? Container( if (controller.currentDuration.value != 0) {
width: 16.w, if (controller.currentDuration.value >=
height: 16.w, starttime &&
margin: EdgeInsets.only(left: 5.w), controller.currentDuration.value <
alignment: Alignment.center, endtime) {
clipBehavior: Clip.hardEdge, isActive = true;
decoration: BoxDecoration( }
color: Colors.red[100], }
borderRadius: BorderRadius.circular(4.r), return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
if (isActive) {
if (controller.isPlay.value) {
controller.playerController.pausePlayer();
} else {
controller.playerController.startPlayer();
}
} else {
controller.playerController
.seekTo(item['starttime']);
controller.playerController.startPlayer();
}
},
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: 14.w,
vertical: 5.w,
), ),
child: Transform.scale( child: Text(
scale: 1.6, item['content'],
child: Lottie.asset( style: TextStyle(
'assets/lottie/sound_effect.json', fontSize: 15.sp,
controller: controller.lottieController, color: isActive
? Colors.red
: MeetingUIUtils.getTextColor(
isDarkMode),
letterSpacing: 0,
height: 1.4,
), ),
), ),
) ),
: const SizedBox(); );
});
}
}), }),
], ],
);
},
)
: Container(
height: 200.w,
alignment: Alignment.center,
child: Text(
'转写失败,请稍后重试',
style: TextStyle(
color: MeetingUIUtils.getSecondaryTextColor(isDarkMode),
fontSize: 14.sp,
), ),
), ),
Obx(() { ),
if (controller.isSpeakerText.value) {
TextEditingController speakerTextController =
TextEditingController(text: item['content']);
return Obx(
() => Container(
padding: EdgeInsets.symmetric(
horizontal: 14.w,
),
decoration: BoxDecoration(
color:
controller.editSpeakerTextId.value == item['id']
? Colors.blue[100]
: null,
borderRadius: BorderRadius.circular(8.w),
),
child: FocusScope(
onFocusChange: (bool hasFocus) {
if (hasFocus) {
controller.editSpeakerTextId.value = item['id'];
controller.editSpeakerTextChange = '';
} else {
if (speakerTextController.text !=
item['content']) {
Map? foundElement =
controller.editSpeakerTextList.firstWhere(
(element) => element['id'] == item['id'],
orElse: () => null,
);
if (foundElement != null) {
foundElement['content'] =
speakerTextController.text;
} else {
controller.editSpeakerTextList.add({
'id': item['id'],
'content': speakerTextController.text,
});
}
}
}
},
child: TextField(
controller: speakerTextController,
style: textStyle,
minLines: 1,
maxLines: 100,
decoration: InputDecoration(
isDense: true,
fillColor: Colors.transparent,
border: InputBorder.none,
contentPadding:
EdgeInsets.symmetric(vertical: 5.w),
),
onChanged: (String value) {
controller.editSpeakerTextChange = value;
},
),
),
),
);
} else {
return Obx(() {
bool isActive = false;
int starttime = item['starttime'];
int endtime = 0;
if (index == controller.textList.length - 1) {
endtime = controller.durationMax.value;
} else {
endtime = controller.textList[index + 1]['starttime'];
}
if (controller.currentDuration.value != 0) {
if (controller.currentDuration.value >= starttime &&
controller.currentDuration.value < endtime) {
isActive = true;
}
}
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
if (isActive) {
if (controller.isPlay.value) {
controller.playerController.pausePlayer();
} else {
controller.playerController.startPlayer();
}
} else {
controller.playerController
.seekTo(item['starttime']);
controller.playerController.startPlayer();
}
},
child: Container(
width: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: 14.w,
vertical: 5.w,
),
child: Text(
item['content'],
style: TextStyle(
fontSize: 15.sp,
color: isActive ? Colors.red : MeetingUIUtils.getTextColor(isDarkMode),
letterSpacing: 0,
height: 1.4,
),
),
),
);
});
}
}),
],
);
},
),
), ),
Obx( Obx(
() => Positioned( () => Positioned(
@ -253,7 +283,8 @@ class SpeechTab extends GetView<MeetingDetailsController> {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if (controller.meetingDetails.value.tasktype >= 2 && if (controller.meetingDetails.value.tasktype >= 2 &&
!controller.isSpeakerText.value) !controller.isSpeakerText.value &&
controller.meetingDetails.value.tasktype != 10002)
_button( _button(
Icons.edit, Icons.edit,
'editSpeaker'.tr, // 对应中文:编辑 'editSpeaker'.tr, // 对应中文:编辑
@ -264,7 +295,8 @@ class SpeechTab extends GetView<MeetingDetailsController> {
}, },
), ),
if (controller.meetingDetails.value.tasktype >= 2 && if (controller.meetingDetails.value.tasktype >= 2 &&
!controller.isSpeakerText.value) !controller.isSpeakerText.value &&
controller.meetingDetails.value.tasktype != 10002)
_button( _button(
Icons.supervisor_account, Icons.supervisor_account,
'nameSpeaker'.tr, // 对应中文:命名发言者 'nameSpeaker'.tr, // 对应中文:命名发言者
@ -272,7 +304,8 @@ class SpeechTab extends GetView<MeetingDetailsController> {
Get.bottomSheet( Get.bottomSheet(
const SpeakerAllBottomSheet(), const SpeakerAllBottomSheet(),
isScrollControlled: true, isScrollControlled: true,
backgroundColor: isDarkMode ? Colors.grey[800] : Colors.grey[100], backgroundColor:
isDarkMode ? Colors.grey[800] : Colors.grey[100],
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r), top: Radius.circular(12.r),
@ -282,7 +315,8 @@ class SpeechTab extends GetView<MeetingDetailsController> {
}, },
), ),
if (controller.meetingDetails.value.tasktype >= 2 && if (controller.meetingDetails.value.tasktype >= 2 &&
!controller.isSpeakerText.value) !controller.isSpeakerText.value &&
controller.meetingDetails.value.tasktype != 10002)
_button( _button(
Icons.auto_awesome, Icons.auto_awesome,
'Ask AI', 'Ask AI',
@ -290,7 +324,8 @@ class SpeechTab extends GetView<MeetingDetailsController> {
Get.bottomSheet( Get.bottomSheet(
const AIBottomSheet(), const AIBottomSheet(),
isScrollControlled: true, isScrollControlled: true,
backgroundColor: isDarkMode ? Colors.grey[800] : Colors.white, backgroundColor:
isDarkMode ? Colors.grey[800] : Colors.white,
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r), top: Radius.circular(12.r),
@ -309,7 +344,29 @@ class SpeechTab extends GetView<MeetingDetailsController> {
Get.bottomSheet( Get.bottomSheet(
const GenerateBottomSheet(), const GenerateBottomSheet(),
isScrollControlled: true, isScrollControlled: true,
backgroundColor: isDarkMode ? Colors.grey[800] : Colors.grey[100], backgroundColor:
isDarkMode ? Colors.grey[800] : Colors.grey[100],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r),
),
),
);
},
),
),
if (controller.meetingDetails.value.tasktype == 10002)
SizedBox(
width: 150.w,
child: _button(
Icons.auto_awesome,
'重新生成',
() {
Get.bottomSheet(
const GenerateBottomSheet(),
isScrollControlled: true,
backgroundColor:
isDarkMode ? Colors.grey[800] : Colors.grey[100],
shape: RoundedRectangleBorder( shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical( borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r), top: Radius.circular(12.r),

74
lib/modules/meeting/views/tabs/summary_tab.dart

@ -8,6 +8,7 @@ import 'package:parchment/codecs.dart';
import '../../../../data/services/db/sqflite_api.dart'; import '../../../../data/services/db/sqflite_api.dart';
import '../../../../data/services/network/api.dart'; import '../../../../data/services/network/api.dart';
import '../../controllers/meeting_details_controller.dart'; import '../../controllers/meeting_details_controller.dart';
import '../../utils/meeting_ui_utils.dart';
import '../bottomSheet/ai_bottom_sheet.dart'; import '../bottomSheet/ai_bottom_sheet.dart';
import '../bottomSheet/generate_bottom_sheet.dart'; import '../bottomSheet/generate_bottom_sheet.dart';
import '../bottomSheet/speaker_all_bottom_sheet.dart'; import '../bottomSheet/speaker_all_bottom_sheet.dart';
@ -335,11 +336,22 @@ class _SummaryTabState extends State<SummaryTab> {
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 10.w), padding: EdgeInsets.only(top: 10.w),
child: FleatherEditor( child: _controller.meetingDetails.value.tasktype < 10000
controller: _fleatherController!, ? FleatherEditor(
focusNode: _focusNode, controller: _fleatherController!,
editorKey: _editorKey, focusNode: _focusNode,
), editorKey: _editorKey,
)
: Center(
child: Text(
'总结失败,请稍后重试',
style: TextStyle(
color: MeetingUIUtils.getSecondaryTextColor(
isDarkMode),
fontSize: 14.sp,
),
),
),
), ),
], ],
), ),
@ -354,7 +366,8 @@ class _SummaryTabState extends State<SummaryTab> {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
if (_controller.meetingDetails.value.tasktype >= 3) if (_controller.meetingDetails.value.tasktype >= 3 &&
_controller.meetingDetails.value.tasktype < 10000)
_button( _button(
Icons.supervisor_account, Icons.supervisor_account,
'editSpeaker'.tr, // 对应中文:编辑发言者 'editSpeaker'.tr, // 对应中文:编辑发言者
@ -372,7 +385,8 @@ class _SummaryTabState extends State<SummaryTab> {
); );
}, },
), ),
if (_controller.meetingDetails.value.tasktype >= 3) if (_controller.meetingDetails.value.tasktype >= 3 &&
_controller.meetingDetails.value.tasktype < 10000)
_button( _button(
Icons.auto_awesome, Icons.auto_awesome,
'Ask AI', 'Ask AI',
@ -412,6 +426,52 @@ class _SummaryTabState extends State<SummaryTab> {
}, },
), ),
), ),
if (_controller.meetingDetails.value.tasktype == 10002)
SizedBox(
width: 150.w,
child: _button(
Icons.auto_awesome,
'重新生成',
() {
Get.bottomSheet(
const GenerateBottomSheet(),
isScrollControlled: true,
backgroundColor: isDarkMode
? Colors.grey[800]
: Colors.grey[100],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r),
),
),
);
},
),
),
if (_controller.meetingDetails.value.tasktype == 10001)
SizedBox(
width: 150.w,
child: _button(
Icons.auto_awesome,
'重新总结',
() {
Get.bottomSheet(
const GenerateBottomSheet(
isSummarizeAgain: true,
),
isScrollControlled: true,
backgroundColor: isDarkMode
? Colors.grey[800]
: Colors.grey[100],
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(12.r),
),
),
);
},
),
),
], ],
), ),
), ),

Loading…
Cancel
Save