|
|
@ -129,88 +129,6 @@ |
|
|
|
|
|
|
|
<!-- 高级设置内容区域 --> |
|
|
|
<div class="advanced-settings-content"> |
|
|
|
<!-- 设置审查重点 --> |
|
|
|
<div class="section review-focus-section"> |
|
|
|
<div class="section-header"> |
|
|
|
<BulbOutlined class="section-icon" /> |
|
|
|
<h3 class="section-title">设置审查重点</h3> |
|
|
|
</div> |
|
|
|
<p class="section-description">编辑设置合同重点,影响代表方的审查倾向</p> |
|
|
|
|
|
|
|
<div class="review-focus-controls"> |
|
|
|
<div class="toggle-container"> |
|
|
|
<Switch v-model:checked="autoGenerateReviewPoints" /> |
|
|
|
<span :class="{ 'enabled-text': autoGenerateReviewPoints, 'disabled-text': !autoGenerateReviewPoints }"> |
|
|
|
{{ autoGenerateReviewPoints ? '启用' : '禁用' }} |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 审查重点列表 --> |
|
|
|
<div class="review-points-list" :class="{ 'disabled': !autoGenerateReviewPoints }"> |
|
|
|
<!-- 已有的审查重点 --> |
|
|
|
<div |
|
|
|
v-for="(point, index) in reviewPoints" |
|
|
|
:key="point.id" |
|
|
|
class="review-point-item" |
|
|
|
> |
|
|
|
<div class="review-point-number">{{ index + 1 }}.</div> |
|
|
|
<div class="review-point-content" v-if="editingPointIndex !== index"> |
|
|
|
{{ point.content }} |
|
|
|
</div> |
|
|
|
<div class="review-point-content edit-mode" v-else> |
|
|
|
<Input |
|
|
|
v-model:value="newPointContent" |
|
|
|
placeholder="输入审查重点内容" |
|
|
|
@pressEnter="saveEditReviewPoint" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div class="review-point-action" v-if="autoGenerateReviewPoints"> |
|
|
|
<EditOutlined |
|
|
|
class="edit-icon" |
|
|
|
v-if="editingPointIndex !== index" |
|
|
|
@click="startEditReviewPoint(index)" |
|
|
|
/> |
|
|
|
<div v-if="editingPointIndex === index" class="edit-actions"> |
|
|
|
<CheckCircleFilled class="confirm-icon" @click="saveEditReviewPoint" /> |
|
|
|
<MinusCircleOutlined class="cancel-icon" @click="cancelEditReviewPoint" /> |
|
|
|
</div> |
|
|
|
<MinusCircleOutlined |
|
|
|
v-if="editingPointIndex !== index" |
|
|
|
class="delete-icon" |
|
|
|
@click="deleteReviewPoint(index)" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 新增审查重点的输入框 --> |
|
|
|
<div class="review-point-item" v-if="isAddingNewPoint && autoGenerateReviewPoints"> |
|
|
|
<div class="review-point-number">{{ reviewPoints.length + 1 }}.</div> |
|
|
|
<div class="review-point-content edit-mode"> |
|
|
|
<Input |
|
|
|
v-model:value="newPointContent" |
|
|
|
placeholder="输入新的审查重点内容" |
|
|
|
@pressEnter="addReviewPoint" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div class="review-point-action"> |
|
|
|
<div class="edit-actions"> |
|
|
|
<CheckCircleFilled class="confirm-icon" @click="addReviewPoint" /> |
|
|
|
<MinusCircleOutlined class="cancel-icon" @click="cancelAddNewPoint" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 添加按钮 --> |
|
|
|
<div class="review-point-add" v-if="autoGenerateReviewPoints && !isAddingNewPoint"> |
|
|
|
<Button class="add-point-btn" type="primary" @click="startAddNewPoint"> |
|
|
|
<PlusOutlined /> |
|
|
|
添加 |
|
|
|
</Button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 选择合同审查组件 --> |
|
|
|
<div class="section review-components-section"> |
|
|
|
<div class="section-header"> |
|
|
@ -251,12 +169,9 @@ |
|
|
|
LoadingOutlined, |
|
|
|
CheckCircleFilled, |
|
|
|
PlusOutlined, |
|
|
|
MinusCircleOutlined, |
|
|
|
BulbOutlined, |
|
|
|
BarsOutlined, |
|
|
|
SafetyCertificateOutlined, |
|
|
|
FileTextOutlined, |
|
|
|
EditOutlined, |
|
|
|
RobotOutlined |
|
|
|
} from '@ant-design/icons-vue'; |
|
|
|
import { message } from 'ant-design-vue'; |
|
|
@ -278,18 +193,19 @@ |
|
|
|
// 状态变量 |
|
|
|
const analyzing = ref(true); |
|
|
|
const selectedPosition = ref(''); |
|
|
|
const autoGenerateReviewPoints = ref(true); |
|
|
|
const editingPointIndex = ref(-1); |
|
|
|
const newPointContent = ref(''); |
|
|
|
const isAddingNewPoint = ref(false); |
|
|
|
|
|
|
|
// 审查重点列表 |
|
|
|
const reviewPoints = ref([ |
|
|
|
{ id: 1, content: '保密信息的定义是否全面覆盖了甲方需要保护的内容' }, |
|
|
|
{ id: 2, content: '乙方对保密信息的使用范围是否明确且受限于项目评估和准备' }, |
|
|
|
{ id: 3, content: '违约责任中关于信息披露的赔偿条款是否足够保护甲方利益' }, |
|
|
|
]); |
|
|
|
|
|
|
|
// 模拟甲乙方信息 |
|
|
|
const contractParties = ref({ |
|
|
|
partyA: '企查查科技股份有限公司', |
|
|
|
partyB: '北京柒腾科技股份有限公司', |
|
|
|
fileName: '保密协议' |
|
|
|
}); |
|
|
|
|
|
|
|
// 审查清单相关 |
|
|
|
const loading = ref(false); |
|
|
|
const checklistGroups = ref<any[]>([]); |
|
|
|
const selectedGroupId = ref<string>('ai'); // 默认选中AI自动生成 |
|
|
|
|
|
|
|
// 审查组件选中状态 (默认都选中) |
|
|
|
const reviewComponents = ref([ |
|
|
|
{ |
|
|
@ -307,18 +223,6 @@ |
|
|
|
description: '调取合同相对方的信息,分析相关主体的资信能力以及是否具备合同签署的资质或许可。' |
|
|
|
} |
|
|
|
]); |
|
|
|
|
|
|
|
// 模拟甲乙方信息 |
|
|
|
const contractParties = ref({ |
|
|
|
partyA: '企查查科技股份有限公司', |
|
|
|
partyB: '北京柒腾科技股份有限公司', |
|
|
|
fileName: '保密协议' |
|
|
|
}); |
|
|
|
|
|
|
|
// 审查清单相关 |
|
|
|
const loading = ref(false); |
|
|
|
const checklistGroups = ref<any[]>([]); |
|
|
|
const selectedGroupId = ref<string>('ai'); // 默认选中AI自动生成 |
|
|
|
|
|
|
|
// 加载审查清单 |
|
|
|
const loadChecklists = async () => { |
|
|
@ -357,10 +261,6 @@ |
|
|
|
// 弹窗打开时,重置状态 |
|
|
|
analyzing.value = true; |
|
|
|
selectedPosition.value = ''; |
|
|
|
autoGenerateReviewPoints.value = true; |
|
|
|
editingPointIndex.value = -1; |
|
|
|
newPointContent.value = ''; |
|
|
|
isAddingNewPoint.value = false; |
|
|
|
|
|
|
|
// 重置审查组件为默认选中状态 |
|
|
|
reviewComponents.value.forEach(component => { |
|
|
@ -423,67 +323,6 @@ |
|
|
|
component.selected = !component.selected; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 删除审查重点 |
|
|
|
function deleteReviewPoint(index: number) { |
|
|
|
if (autoGenerateReviewPoints.value) { |
|
|
|
reviewPoints.value.splice(index, 1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 开始编辑审查重点 |
|
|
|
function startEditReviewPoint(index: number) { |
|
|
|
if (autoGenerateReviewPoints.value) { |
|
|
|
editingPointIndex.value = index; |
|
|
|
newPointContent.value = reviewPoints.value[index].content; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 保存编辑的审查重点 |
|
|
|
function saveEditReviewPoint() { |
|
|
|
if (editingPointIndex.value >= 0) { |
|
|
|
if (newPointContent.value.trim()) { |
|
|
|
reviewPoints.value[editingPointIndex.value].content = newPointContent.value.trim(); |
|
|
|
} |
|
|
|
editingPointIndex.value = -1; |
|
|
|
newPointContent.value = ''; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 添加新的审查重点 |
|
|
|
function addReviewPoint() { |
|
|
|
if (autoGenerateReviewPoints.value) { |
|
|
|
if (newPointContent.value.trim()) { |
|
|
|
const newId = reviewPoints.value.length > 0 ? Math.max(...reviewPoints.value.map(p => p.id)) + 1 : 1; |
|
|
|
reviewPoints.value.push({ |
|
|
|
id: newId, |
|
|
|
content: newPointContent.value.trim() |
|
|
|
}); |
|
|
|
newPointContent.value = ''; |
|
|
|
isAddingNewPoint.value = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 开始添加新的审查重点 |
|
|
|
function startAddNewPoint() { |
|
|
|
if (autoGenerateReviewPoints.value) { |
|
|
|
isAddingNewPoint.value = true; |
|
|
|
newPointContent.value = ''; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 取消添加或编辑 |
|
|
|
function cancelEditReviewPoint() { |
|
|
|
editingPointIndex.value = -1; |
|
|
|
newPointContent.value = ''; |
|
|
|
} |
|
|
|
|
|
|
|
// 取消添加新的审查重点 |
|
|
|
function cancelAddNewPoint() { |
|
|
|
isAddingNewPoint.value = false; |
|
|
|
newPointContent.value = ''; |
|
|
|
} |
|
|
|
|
|
|
|
// 取消按钮处理 |
|
|
|
function handleCancel() { |
|
|
@ -512,7 +351,6 @@ |
|
|
|
emit('success', { |
|
|
|
position: selectedPosition.value, |
|
|
|
reviewComponents: reviewComponents.value.filter(item => item.selected).map(item => item.id), |
|
|
|
reviewPoints: !autoGenerateReviewPoints.value ? [] : reviewPoints.value, |
|
|
|
// 可以添加其他需要传递的数据 |
|
|
|
}); |
|
|
|
} |
|
|
@ -742,111 +580,6 @@ |
|
|
|
border-radius: 8px; |
|
|
|
} |
|
|
|
|
|
|
|
// 审查重点部分 |
|
|
|
.review-focus-controls { |
|
|
|
display: flex; |
|
|
|
justify-content: flex-end; |
|
|
|
align-items: center; |
|
|
|
margin-bottom: 20px; |
|
|
|
|
|
|
|
.toggle-container { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
gap: 8px; |
|
|
|
} |
|
|
|
|
|
|
|
.enabled-text { |
|
|
|
color: #52c41a; |
|
|
|
} |
|
|
|
|
|
|
|
.disabled-text { |
|
|
|
color: #999; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.review-points-list { |
|
|
|
background-color: #fff; |
|
|
|
border-radius: 4px; |
|
|
|
overflow: hidden; |
|
|
|
border: 1px solid #eee; |
|
|
|
|
|
|
|
&.disabled { |
|
|
|
opacity: 0.7; |
|
|
|
pointer-events: none; |
|
|
|
filter: grayscale(0.5); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.review-point-item { |
|
|
|
display: flex; |
|
|
|
padding: 15px; |
|
|
|
border-bottom: 1px solid #f0f0f0; |
|
|
|
|
|
|
|
&:last-child { |
|
|
|
border-bottom: none; |
|
|
|
} |
|
|
|
|
|
|
|
.review-point-number { |
|
|
|
flex: 0 0 30px; |
|
|
|
font-weight: bold; |
|
|
|
} |
|
|
|
|
|
|
|
.review-point-content { |
|
|
|
flex: 1; |
|
|
|
|
|
|
|
&.edit-mode { |
|
|
|
padding-right: 10px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.review-point-action { |
|
|
|
width: 60px; |
|
|
|
display: flex; |
|
|
|
justify-content: flex-end; |
|
|
|
align-items: center; |
|
|
|
gap: 10px; |
|
|
|
|
|
|
|
.delete-icon { |
|
|
|
color: #ff4d4f; |
|
|
|
cursor: pointer; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
|
|
|
|
.edit-icon { |
|
|
|
color: #1890ff; |
|
|
|
cursor: pointer; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
|
|
|
|
.edit-actions { |
|
|
|
display: flex; |
|
|
|
gap: 10px; |
|
|
|
|
|
|
|
.confirm-icon { |
|
|
|
color: #52c41a; |
|
|
|
cursor: pointer; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
|
|
|
|
.cancel-icon { |
|
|
|
color: #ff4d4f; |
|
|
|
cursor: pointer; |
|
|
|
font-size: 16px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.review-point-add { |
|
|
|
padding: 15px; |
|
|
|
text-align: center; |
|
|
|
|
|
|
|
.add-point-btn { |
|
|
|
background-color: #52c41a; |
|
|
|
border-color: #52c41a; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 审查组件部分 |
|
|
|
.review-components { |
|
|
|
display: flex; |
|
|
|