|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<footer class="wendangbaogaoshengcheng-footer" v-if="show_doc_rpt_footer">
|
|
|
<div class="upload-footer" v-show="doc_form_show">
|
|
|
- <div v-if="act_type === 3" class="form-fold-btn" @click="handleFormFold">
|
|
|
+ <div v-if="act_type === 3 && init_status" class="form-fold-btn" @click="handleFormFold">
|
|
|
<icon-menu-fold :size="20" />
|
|
|
</div>
|
|
|
|
|
|
@@ -15,36 +15,38 @@
|
|
|
|
|
|
<div class="vertical-placeholder"></div>
|
|
|
|
|
|
- <a-typography-text>
|
|
|
- 请上传文件<span class="attention-requred">*</span>
|
|
|
- </a-typography-text>
|
|
|
-
|
|
|
- <a-upload :file-list="file_list" :multiple="true" :limit="MAX_ACCEPT_FILE" :auto-upload="false"
|
|
|
- :show-upload-button="{ showOnExceedLimit: false }" accept=".pdf,.docx" @change="handleFileChange">
|
|
|
- <template #upload-button>
|
|
|
- <a-tooltip :content="upload_warning_text">
|
|
|
- <a-button class="upload-button">
|
|
|
- <template #icon>
|
|
|
- <icon-upload />
|
|
|
- </template>
|
|
|
-
|
|
|
- <template #default>点击上传</template>
|
|
|
- </a-button>
|
|
|
- </a-tooltip>
|
|
|
- </template>
|
|
|
-
|
|
|
- <template #file-name="{ fileItem }">
|
|
|
- <a-tooltip :content="fileItem.name">
|
|
|
- <span>{{fileItem.name}}</span>
|
|
|
- </a-tooltip>
|
|
|
- </template>
|
|
|
-
|
|
|
- <!-- <template #upload-item="{ fileItem, index }">
|
|
|
+ <a-space :direction="act_type === 3 ? 'horizonta' : 'vertical'" fill>
|
|
|
+ <a-typography-text class="label-class">
|
|
|
+ 请上传文件<span class="attention-requred">*</span>
|
|
|
+ </a-typography-text>
|
|
|
+
|
|
|
+ <a-upload :file-list="file_list" :multiple="true" :limit="MAX_ACCEPT_FILE" :auto-upload="false"
|
|
|
+ :show-upload-button="{ showOnExceedLimit: false }" accept=".pdf,.docx" @change="handleFileChange">
|
|
|
+ <template #upload-button>
|
|
|
+ <a-tooltip :content="upload_warning_text">
|
|
|
+ <a-button class="upload-button">
|
|
|
+ <template #icon>
|
|
|
+ <icon-upload />
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #default>点击上传</template>
|
|
|
+ </a-button>
|
|
|
+ </a-tooltip>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #file-name="{ fileItem }">
|
|
|
+ <a-tooltip :content="fileItem.name">
|
|
|
+ <span>{{ fileItem.name }}</span>
|
|
|
+ </a-tooltip>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <!-- <template #upload-item="{ fileItem, index }">
|
|
|
<div>
|
|
|
<div>{{ fileItem.name }}</div>
|
|
|
</div>
|
|
|
</template> -->
|
|
|
- </a-upload>
|
|
|
+ </a-upload>
|
|
|
+ </a-space>
|
|
|
|
|
|
|
|
|
<template v-if="act_type === 2 || act_type === 1 || show_start_btn">
|
|
|
@@ -59,7 +61,12 @@
|
|
|
<div class="message-input-container">
|
|
|
<div v-show="!doc_form_show" class="form-fold-btn open" @click="handleFormOpen">
|
|
|
<!-- <icon-menu-fold :size="20" /> -->
|
|
|
- <icon-menu-unfold :size="20" />
|
|
|
+ <a-space>
|
|
|
+ <icon-menu-unfold :size="20" />
|
|
|
+ <a-typography-text>
|
|
|
+ 用户上传管理
|
|
|
+ </a-typography-text>
|
|
|
+ </a-space>
|
|
|
</div>
|
|
|
|
|
|
<MessageInputV2 :readonly="readonly" @message="handleChatMessageUpdate" />
|
|
|
@@ -90,13 +97,21 @@ const props = defineProps({
|
|
|
|
|
|
const { config, helper, ajax } = inject("$global");
|
|
|
|
|
|
+/**
|
|
|
+ * 初始状态未点击开始前
|
|
|
+ *用来控制弹框右上角是否显示收起按钮
|
|
|
+ * 初始不显示:false
|
|
|
+ * 点击开始后:true
|
|
|
+ */
|
|
|
+const init_status = ref(false)
|
|
|
+
|
|
|
/**
|
|
|
* 操作类型
|
|
|
* 1 文档清洗
|
|
|
* 2 报告生成
|
|
|
* 3 小标题生成
|
|
|
*/
|
|
|
-const act_type = ref(1);
|
|
|
+const act_type = ref(3);
|
|
|
const text_title = ref(""); // 单行文本:标题
|
|
|
const text_description = ref(""); // 多行文本:描述
|
|
|
const chat_message = ref(''); // 对话输入框的消息
|
|
|
@@ -291,9 +306,9 @@ const handleStart = async () => {
|
|
|
// showMsg('请填写小标题');
|
|
|
// return;
|
|
|
// }
|
|
|
-
|
|
|
if (is_first_generate.value) {
|
|
|
// 第一次
|
|
|
+ init_status.value = true; // 标记为已点击开始,显示收起按钮
|
|
|
} else {
|
|
|
// 非第一次
|
|
|
if (!chat_message.value) {
|
|
|
@@ -468,30 +483,47 @@ const radio_shengcheng_text = "对上传的(经过清洗的)文档生成报告
|
|
|
|
|
|
position: relative;
|
|
|
}
|
|
|
-.form-fold-btn{
|
|
|
+
|
|
|
+.form-fold-btn {
|
|
|
position: absolute;
|
|
|
right: 10px;
|
|
|
cursor: pointer;
|
|
|
z-index: 9;
|
|
|
+
|
|
|
}
|
|
|
-.form-fold-btn.open{
|
|
|
+
|
|
|
+.form-fold-btn.open {
|
|
|
left: 4px;
|
|
|
- top: -4px;
|
|
|
+ top: -10px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ width: 130px;
|
|
|
+ padding: 3px;
|
|
|
+ border-radius: 5px;
|
|
|
+ background-color: #eee;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.attention-requred {
|
|
|
color: red;
|
|
|
}
|
|
|
|
|
|
-.wendangbaogaoshengcheng-footer {
|
|
|
-
|
|
|
+.label-class {
|
|
|
+ display: block;
|
|
|
+ width: 100px;
|
|
|
+ margin-right: 10px;
|
|
|
+ text-align: right;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+.wendangbaogaoshengcheng-footer {}
|
|
|
+
|
|
|
.max-limit-warning {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
-.upload-button{
|
|
|
+.upload-button {
|
|
|
background-color: rgb(var(--primary-6));
|
|
|
color: #fff;
|
|
|
}
|
|
|
@@ -501,7 +533,7 @@ const radio_shengcheng_text = "对上传的(经过清洗的)文档生成报告
|
|
|
color: #fff;
|
|
|
}
|
|
|
|
|
|
-.message-input-container{
|
|
|
+.message-input-container {
|
|
|
position: relative;
|
|
|
}
|
|
|
</style>
|
|
|
@@ -515,17 +547,21 @@ const radio_shengcheng_text = "对上传的(经过清洗的)文档生成报告
|
|
|
}
|
|
|
|
|
|
.wendangbaogaoshengcheng-footer .arco-upload-list.arco-upload-list-type-text,
|
|
|
-.wendangbaogaoshengcheng-footer .arco-upload-list.arco-upload-list-type-picture{
|
|
|
+.wendangbaogaoshengcheng-footer .arco-upload-list.arco-upload-list-type-picture {
|
|
|
+ min-width: 355px;
|
|
|
width: 100%;
|
|
|
max-height: 400px;
|
|
|
overflow-y: auto;
|
|
|
padding-right: 5px;
|
|
|
}
|
|
|
+.wendangbaogaoshengcheng-footer .arco-upload-list.arco-upload-list-type-text .arco-upload-list-item {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
</style>
|
|
|
|
|
|
|
|
|
<style>
|
|
|
.arco-textarea-wrapper[flag="document-report-generate"] .arco-textarea {
|
|
|
- font-size: 13px;
|
|
|
+ font-size: 12px;
|
|
|
}
|
|
|
</style>
|