Browse Source

aichat升级

master
xueyinfei 3 days ago
parent
commit
056c5f0622
  1. 4
      vue-fastapi-frontend/src/layout/components/AppMain.vue
  2. 11
      vue-fastapi-frontend/src/views/aichat/Interrupt.vue
  3. 144
      vue-fastapi-frontend/src/views/aichat/OperationButton.vue
  4. 14
      vue-fastapi-frontend/src/views/aichat/aichat.vue
  5. 14
      vue-fastapi-frontend/src/views/meta/metaInfo/index.vue

4
vue-fastapi-frontend/src/layout/components/AppMain.vue

@ -124,10 +124,10 @@ function closeChatDiv(){
cursor: pointer;
max-height: 500px;
max-width: 500px;
z-index: 1000;
z-index: 3000;
}
.ai_chat_div {
z-index: 1000;
z-index: 3000;
border-radius: 8px;
border: 1px solid #ffffff;
background: linear-gradient(188deg, rgba(235, 241, 255, 0.20) 39.6%, rgba(231, 249, 255, 0.20) 94.3%), #EFF0F1;

11
vue-fastapi-frontend/src/views/aichat/Interrupt.vue

@ -6,8 +6,8 @@
<span style="font-size: 14px">{{item.default_value}}</span>
</el-form-item>
<el-form-item v-else :key="'comp'+ index" :label="item.name" :prop="item.name" :rules="getValidationRules(item)">
<el-date-picker popper-class="custom-dropdown" v-if="item.d_type === 'date' && item.ct_type === 'datePicker'" v-model="formData[item.name]" type="date" placeholder="请输入日期" value-format="YYYY-MM-DD" :disabled="item.read_only || !isLastChat"/>
<el-date-picker popper-class="custom-dropdown" v-if="item.d_type === 'date' && item.ct_type === 'dateRangePicker'" v-model="formData[item.name]" type="daterange" range-separator="" start-placeholder="开始时间" end-placeholder="结束时间" value-format="YYYY-MM-DD" :disabled="item.read_only || !isLastChat"/>
<el-date-picker popper-options="{ zIndex: 3000}" v-if="item.d_type === 'date' && item.ct_type === 'datePicker'" v-model="formData[item.name]" type="date" placeholder="请输入日期" value-format="YYYY-MM-DD" :disabled="item.read_only || !isLastChat"/>
<el-date-picker popper-options="{ zIndex: 3000}" v-if="item.d_type === 'date' && item.ct_type === 'dateRangePicker'" v-model="formData[item.name]" type="daterange" range-separator="" start-placeholder="开始时间" end-placeholder="结束时间" value-format="YYYY-MM-DD" :disabled="item.read_only || !isLastChat"/>
<el-input v-if="item.d_type === 'text' && item.ct_type === 'input'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat"></el-input>
<el-radio-group v-if="item.d_type === 'enum' && item.ct_type === 'radioGroup'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat">
<el-radio v-for="radio in item.options" :value="radio">{{radio}}</el-radio>
@ -15,7 +15,7 @@
<el-checkbox-group v-if="item.d_type === 'enum' && item.ct_type === 'checkboxGroup'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat">
<el-checkbox v-for="checkItem in item.options" :label="checkItem" :value="checkItem" />
</el-checkbox-group>
<el-select class="interrupt-select" v-if="item.d_type === 'enum' && item.ct_type === 'select'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat" :filterable="item.allow_create" :allow-create="item.allow_create">
<el-select popper-options="{ zIndex: 3000}" v-if="item.d_type === 'enum' && item.ct_type === 'select'" v-model="formData[item.name]" :disabled="item.read_only || !isLastChat" :filterable="item.allow_create" :allow-create="item.allow_create">
<el-option
v-for="selectItem in item.options"
:key="selectItem"
@ -23,7 +23,7 @@
:value="selectItem"
/>
</el-select>
<el-select popper-class="custom-dropdown" v-if="item.d_type === 'enum' && item.ct_type === 'multiselect'" multiple v-model="formData[item.name]" :disabled="item.read_only || !isLastChat" :filterable="item.allow_create" :allow-create="item.allow_create">
<el-select popper-options="{ zIndex: 3000}" v-if="item.d_type === 'enum' && item.ct_type === 'multiselect'" multiple v-model="formData[item.name]" :disabled="item.read_only || !isLastChat" :filterable="item.allow_create" :allow-create="item.allow_create">
<el-option
v-for="selectItem in item.options"
:key="selectItem"
@ -109,7 +109,4 @@ function click(item){
}
</script>
<style scoped lang="scss">
:deep(.interrupt-select .el-select-dropdown){
z-index: 2000 !important;
}
</style>

144
vue-fastapi-frontend/src/views/aichat/OperationButton.vue

@ -4,84 +4,84 @@
<span class="ml-4" style="margin-left: 4px">{{ datetimeFormat(data.time) }}</span>
</el-text>
</div>
<div>
<span>
<!-- <div>-->
<!-- <span>-->
<!-- <el-tooltip effect="dark" content="换个答案" placement="top" popper-class="operate-tooltip">-->
<!-- <el-button text @click="regeneration" style="padding: 0">-->
<!-- <el-icon><RefreshRight /></el-icon>-->
<!-- </el-button>-->
<!-- </el-tooltip>-->
<!-- <el-divider direction="vertical" />-->
<el-tooltip effect="dark" content="复制" placement="top" popper-class="operate-tooltip">
<el-button text @click="copyClick(data)" style="padding: 0">
<el-icon><CopyDocument /></el-icon>
</el-button>
</el-tooltip>
<el-divider direction="vertical" />
<el-tooltip
effect="dark"
content="赞同"
placement="top"
v-if="data.operate === null || data.operate === ''"
popper-class="operate-tooltip"
>
<el-button text @click="thumbUp" style="padding: 0">
<i class="ri-thumb-up-line"></i>
</el-button>
</el-tooltip>
<el-tooltip
effect="dark"
content="取消赞同"
placement="top"
v-if="data.operate !== null && data.operate === 'thumb_up'"
popper-class="operate-tooltip"
>
<el-button text @click="cancelThumb" style="padding: 0">
<i class="ri-thumb-up-fill" style="color: orange"></i>
</el-button>
</el-tooltip>
<el-divider direction="vertical" v-if="data.operate === null || data.operate === ''" />
<el-popover
:visible="visible"
v-if="data.operate === null || data.operate === ''"
placement="left"
popper-style="z-index:2000;"
:show-arrow=false
title="反对原因"
:width="260">
<template #default>
<el-input v-model="thumbDownReason"></el-input>
<div style="text-align: right; margin-top: 10px">
<el-button size="small" text @click="closeThumb">取消</el-button>
<el-button size="small" type="primary" @click="confirmReason">确定</el-button>
</div>
</template>
<template #reference>
<el-button text @click="showPop" style="padding: 0">
<el-tooltip
effect="dark"
content="反对"
placement="top"
popper-class="operate-tooltip"
>
<i class="ri-thumb-down-line"></i>
</el-tooltip>
</el-button>
</template>
</el-popover>
<el-tooltip
effect="dark"
:content="'反对原因:'+data.thumbDownReason"
placement="top"
v-if="data.operate !== null && data.operate === 'thumb_down'"
popper-class="operate-tooltip"
>
<el-button text @click="cancelThumb" style="padding: 0">
<i class="ri-thumb-down-fill" style="color: orange"></i>
</el-button>
</el-tooltip>
</span>
</div>
<!-- <el-tooltip effect="dark" content="复制" placement="top" popper-class="operate-tooltip">-->
<!-- <el-button text @click="copyClick(data)" style="padding: 0">-->
<!-- <el-icon><CopyDocument /></el-icon>-->
<!-- </el-button>-->
<!-- </el-tooltip>-->
<!-- <el-divider direction="vertical" />-->
<!-- <el-tooltip-->
<!-- effect="dark"-->
<!-- content="赞同"-->
<!-- placement="top"-->
<!-- v-if="data.operate === null || data.operate === ''"-->
<!-- popper-class="operate-tooltip"-->
<!-- >-->
<!-- <el-button text @click="thumbUp" style="padding: 0">-->
<!-- <i class="ri-thumb-up-line"></i>-->
<!-- </el-button>-->
<!-- </el-tooltip>-->
<!-- <el-tooltip-->
<!-- effect="dark"-->
<!-- content="取消赞同"-->
<!-- placement="top"-->
<!-- v-if="data.operate !== null && data.operate === 'thumb_up'"-->
<!-- popper-class="operate-tooltip"-->
<!-- >-->
<!-- <el-button text @click="cancelThumb" style="padding: 0">-->
<!-- <i class="ri-thumb-up-fill" style="color: orange"></i>-->
<!-- </el-button>-->
<!-- </el-tooltip>-->
<!-- <el-divider direction="vertical" v-if="data.operate === null || data.operate === ''" />-->
<!-- <el-popover-->
<!-- :visible="visible"-->
<!-- v-if="data.operate === null || data.operate === ''"-->
<!-- placement="left"-->
<!-- popper-style="z-index:2000;"-->
<!-- :show-arrow=false-->
<!-- title="反对原因"-->
<!-- :width="260">-->
<!-- <template #default>-->
<!-- <el-input v-model="thumbDownReason"></el-input>-->
<!-- <div style="text-align: right; margin-top: 10px">-->
<!-- <el-button size="small" text @click="closeThumb">取消</el-button>-->
<!-- <el-button size="small" type="primary" @click="confirmReason">确定</el-button>-->
<!-- </div>-->
<!-- </template>-->
<!-- <template #reference>-->
<!-- <el-button text @click="showPop" style="padding: 0">-->
<!-- <el-tooltip-->
<!-- effect="dark"-->
<!-- content="反对"-->
<!-- placement="top"-->
<!-- popper-class="operate-tooltip"-->
<!-- >-->
<!-- <i class="ri-thumb-down-line"></i>-->
<!-- </el-tooltip>-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-popover>-->
<!-- <el-tooltip-->
<!-- effect="dark"-->
<!-- :content="'反对原因:'+data.thumbDownReason"-->
<!-- placement="top"-->
<!-- v-if="data.operate !== null && data.operate === 'thumb_down'"-->
<!-- popper-class="operate-tooltip"-->
<!-- >-->
<!-- <el-button text @click="cancelThumb" style="padding: 0">-->
<!-- <i class="ri-thumb-down-fill" style="color: orange"></i>-->
<!-- </el-button>-->
<!-- </el-tooltip>-->
<!-- </span>-->
<!-- </div>-->
</template>
<script setup>
import { ref } from 'vue'

14
vue-fastapi-frontend/src/views/aichat/aichat.vue

@ -30,7 +30,7 @@
</div>
<!-- 回答 -->
<div v-if="item.type === 'answer'" class="item-content mb-16 lighter" style="font-weight: 400">
<el-popconfirm popper-style="z-index:2000" title="确定要回到这一步吗?" @confirm="confirmReturn(item,index)">
<el-popconfirm popper-style="z-index:3000" title="确定要回到这一步吗?" @confirm="confirmReturn(item,index)">
<template #reference>
<div class="returnToHere" style="margin-top: 5px;margin-bottom: 5px">
<i class="ri-bookmark-2-fill returnToHereIcon"></i>
@ -97,18 +97,18 @@
<el-tag type="success" style="margin-bottom: 5px" v-for="(tag,index) in currentFiles" closable :disable-transitions="false" @close="removeFile(index)">{{tag.file}}</el-tag>
</div>
<div>
<span v-if="currentMachine.length > 0"> </span>
<span v-if="currentMachine.length > 0" style="font-size: 14px"> </span>
<el-tag style="margin-bottom: 5px" size="large" v-for="tag in currentMachine" closable :disable-transitions="false" @close="removeMachine">
<span style="font-size: 16px;margin-left: 10px">{{tag}}</span>
<span style="font-size: 14px;margin-left: 10px">{{tag}}</span>
</el-tag>
<span v-if="currentMachine.length > 0"> 对话</span>
<span v-if="currentMachine.length > 0" style="font-size: 14px"> 对话</span>
</div>
<div class="operate-textarea flex chat-width">
<el-popover
:visible="popoverVisible"
placement="top"
:width="is_large?'400px':'860px'"
popper-style="max-width:860px;z-index:2000;margin-left:35px"
popper-style="max-width:860px;z-index:3000;margin-left:47px"
:show-arrow=false
:offset=1
>
@ -178,7 +178,7 @@
<img v-show="!isDisabledChart && !loading" src="@/assets/aichat/icon_send_colorful.svg" alt="" />
</el-button>
<el-popover
popper-style="z-index:2000;width:300px"
popper-style="z-index:3000;width:300px"
title="自动审批配置"
placement="left-end"
trigger="click"
@ -216,7 +216,7 @@
</div>
</div>
<!-- 文件导入对话框 -->
<el-dialog :z-index="2000" title="文件导入" v-model="upload.open" width="400px" append-to-body>
<el-dialog :z-index="4001" title="文件导入" v-model="upload.open" width="400px" append-to-body>
<el-upload v-if="upload.open"
ref="uploadRef"
:headers="upload.headers"

14
vue-fastapi-frontend/src/views/meta/metaInfo/index.vue

@ -147,7 +147,19 @@
</el-table-column>
<el-table-column label="记录数" width="80" align="center" prop="tabRecNum"></el-table-column>
<el-table-column label="补录对象名称" width="150" align="center" prop="tabCrrctName"></el-table-column>
<el-table-column label="补录对象描述" width="150" align="center" prop="tabDesc"></el-table-column>
<el-table-column label="补录对象描述" width="150" align="center" prop="tabDesc">
<template #default="scope">
<span v-if="scope.row.tabDesc && scope.row.tabDesc.length<=20">{{scope.row.tabDesc}}</span>
<el-tooltip
popper-style="width:400px"
effect="dark"
:content="scope.row.tabDesc"
placement="bottom"
>
<span v-if="scope.row.tabDesc && scope.row.tabDesc.length>20">{{scope.row.tabDesc.slice(0, 20)+'...'}}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column label="对象类型" align="center" prop="tabType"></el-table-column>
<el-table-column label="对象治理标志" width="120" align="center" prop="govFlag"></el-table-column>
<el-table-column label="补录审批状态" width="120" align="center" prop="recStat"></el-table-column>

Loading…
Cancel
Save