Browse Source

aichat升级

master
xueyinfei 4 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; cursor: pointer;
max-height: 500px; max-height: 500px;
max-width: 500px; max-width: 500px;
z-index: 1000; z-index: 3000;
} }
.ai_chat_div { .ai_chat_div {
z-index: 1000; z-index: 3000;
border-radius: 8px; border-radius: 8px;
border: 1px solid #ffffff; 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; 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> <span style="font-size: 14px">{{item.default_value}}</span>
</el-form-item> </el-form-item>
<el-form-item v-else :key="'comp'+ index" :label="item.name" :prop="item.name" :rules="getValidationRules(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-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-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 === '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-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-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> <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-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 v-for="checkItem in item.options" :label="checkItem" :value="checkItem" />
</el-checkbox-group> </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 <el-option
v-for="selectItem in item.options" v-for="selectItem in item.options"
:key="selectItem" :key="selectItem"
@ -23,7 +23,7 @@
:value="selectItem" :value="selectItem"
/> />
</el-select> </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 <el-option
v-for="selectItem in item.options" v-for="selectItem in item.options"
:key="selectItem" :key="selectItem"
@ -109,7 +109,4 @@ function click(item){
} }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
:deep(.interrupt-select .el-select-dropdown){
z-index: 2000 !important;
}
</style> </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> <span class="ml-4" style="margin-left: 4px">{{ datetimeFormat(data.time) }}</span>
</el-text> </el-text>
</div> </div>
<div> <!-- <div>-->
<span> <!-- <span>-->
<!-- <el-tooltip effect="dark" content="换个答案" placement="top" popper-class="operate-tooltip">--> <!-- <el-tooltip effect="dark" content="换个答案" placement="top" popper-class="operate-tooltip">-->
<!-- <el-button text @click="regeneration" style="padding: 0">--> <!-- <el-button text @click="regeneration" style="padding: 0">-->
<!-- <el-icon><RefreshRight /></el-icon>--> <!-- <el-icon><RefreshRight /></el-icon>-->
<!-- </el-button>--> <!-- </el-button>-->
<!-- </el-tooltip>--> <!-- </el-tooltip>-->
<!-- <el-divider direction="vertical" />--> <!-- <el-divider direction="vertical" />-->
<el-tooltip effect="dark" content="复制" placement="top" popper-class="operate-tooltip"> <!-- <el-tooltip effect="dark" content="复制" placement="top" popper-class="operate-tooltip">-->
<el-button text @click="copyClick(data)" style="padding: 0"> <!-- <el-button text @click="copyClick(data)" style="padding: 0">-->
<el-icon><CopyDocument /></el-icon> <!-- <el-icon><CopyDocument /></el-icon>-->
</el-button> <!-- </el-button>-->
</el-tooltip> <!-- </el-tooltip>-->
<el-divider direction="vertical" /> <!-- <el-divider direction="vertical" />-->
<el-tooltip <!-- <el-tooltip-->
effect="dark" <!-- effect="dark"-->
content="赞同" <!-- content="赞同"-->
placement="top" <!-- placement="top"-->
v-if="data.operate === null || data.operate === ''" <!-- v-if="data.operate === null || data.operate === ''"-->
popper-class="operate-tooltip" <!-- popper-class="operate-tooltip"-->
> <!-- >-->
<el-button text @click="thumbUp" style="padding: 0"> <!-- <el-button text @click="thumbUp" style="padding: 0">-->
<i class="ri-thumb-up-line"></i> <!-- <i class="ri-thumb-up-line"></i>-->
</el-button> <!-- </el-button>-->
</el-tooltip> <!-- </el-tooltip>-->
<el-tooltip <!-- <el-tooltip-->
effect="dark" <!-- effect="dark"-->
content="取消赞同" <!-- content="取消赞同"-->
placement="top" <!-- placement="top"-->
v-if="data.operate !== null && data.operate === 'thumb_up'" <!-- v-if="data.operate !== null && data.operate === 'thumb_up'"-->
popper-class="operate-tooltip" <!-- popper-class="operate-tooltip"-->
> <!-- >-->
<el-button text @click="cancelThumb" style="padding: 0"> <!-- <el-button text @click="cancelThumb" style="padding: 0">-->
<i class="ri-thumb-up-fill" style="color: orange"></i> <!-- <i class="ri-thumb-up-fill" style="color: orange"></i>-->
</el-button> <!-- </el-button>-->
</el-tooltip> <!-- </el-tooltip>-->
<el-divider direction="vertical" v-if="data.operate === null || data.operate === ''" /> <!-- <el-divider direction="vertical" v-if="data.operate === null || data.operate === ''" />-->
<el-popover <!-- <el-popover-->
:visible="visible" <!-- :visible="visible"-->
v-if="data.operate === null || data.operate === ''" <!-- v-if="data.operate === null || data.operate === ''"-->
placement="left" <!-- placement="left"-->
popper-style="z-index:2000;" <!-- popper-style="z-index:2000;"-->
:show-arrow=false <!-- :show-arrow=false-->
title="反对原因" <!-- title="反对原因"-->
:width="260"> <!-- :width="260">-->
<template #default> <!-- <template #default>-->
<el-input v-model="thumbDownReason"></el-input> <!-- <el-input v-model="thumbDownReason"></el-input>-->
<div style="text-align: right; margin-top: 10px"> <!-- <div style="text-align: right; margin-top: 10px">-->
<el-button size="small" text @click="closeThumb">取消</el-button> <!-- <el-button size="small" text @click="closeThumb">取消</el-button>-->
<el-button size="small" type="primary" @click="confirmReason">确定</el-button> <!-- <el-button size="small" type="primary" @click="confirmReason">确定</el-button>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
<template #reference> <!-- <template #reference>-->
<el-button text @click="showPop" style="padding: 0"> <!-- <el-button text @click="showPop" style="padding: 0">-->
<el-tooltip <!-- <el-tooltip-->
effect="dark" <!-- effect="dark"-->
content="反对" <!-- content="反对"-->
placement="top" <!-- placement="top"-->
popper-class="operate-tooltip" <!-- popper-class="operate-tooltip"-->
> <!-- >-->
<i class="ri-thumb-down-line"></i> <!-- <i class="ri-thumb-down-line"></i>-->
</el-tooltip> <!-- </el-tooltip>-->
</el-button> <!-- </el-button>-->
</template> <!-- </template>-->
</el-popover> <!-- </el-popover>-->
<el-tooltip <!-- <el-tooltip-->
effect="dark" <!-- effect="dark"-->
:content="'反对原因:'+data.thumbDownReason" <!-- :content="'反对原因:'+data.thumbDownReason"-->
placement="top" <!-- placement="top"-->
v-if="data.operate !== null && data.operate === 'thumb_down'" <!-- v-if="data.operate !== null && data.operate === 'thumb_down'"-->
popper-class="operate-tooltip" <!-- popper-class="operate-tooltip"-->
> <!-- >-->
<el-button text @click="cancelThumb" style="padding: 0"> <!-- <el-button text @click="cancelThumb" style="padding: 0">-->
<i class="ri-thumb-down-fill" style="color: orange"></i> <!-- <i class="ri-thumb-down-fill" style="color: orange"></i>-->
</el-button> <!-- </el-button>-->
</el-tooltip> <!-- </el-tooltip>-->
</span> <!-- </span>-->
</div> <!-- </div>-->
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'

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

@ -30,7 +30,7 @@
</div> </div>
<!-- 回答 --> <!-- 回答 -->
<div v-if="item.type === 'answer'" class="item-content mb-16 lighter" style="font-weight: 400"> <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> <template #reference>
<div class="returnToHere" style="margin-top: 5px;margin-bottom: 5px"> <div class="returnToHere" style="margin-top: 5px;margin-bottom: 5px">
<i class="ri-bookmark-2-fill returnToHereIcon"></i> <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> <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>
<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"> <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> </el-tag>
<span v-if="currentMachine.length > 0"> 对话</span> <span v-if="currentMachine.length > 0" style="font-size: 14px"> 对话</span>
</div> </div>
<div class="operate-textarea flex chat-width"> <div class="operate-textarea flex chat-width">
<el-popover <el-popover
:visible="popoverVisible" :visible="popoverVisible"
placement="top" placement="top"
:width="is_large?'400px':'860px'" :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 :show-arrow=false
:offset=1 :offset=1
> >
@ -178,7 +178,7 @@
<img v-show="!isDisabledChart && !loading" src="@/assets/aichat/icon_send_colorful.svg" alt="" /> <img v-show="!isDisabledChart && !loading" src="@/assets/aichat/icon_send_colorful.svg" alt="" />
</el-button> </el-button>
<el-popover <el-popover
popper-style="z-index:2000;width:300px" popper-style="z-index:3000;width:300px"
title="自动审批配置" title="自动审批配置"
placement="left-end" placement="left-end"
trigger="click" trigger="click"
@ -216,7 +216,7 @@
</div> </div>
</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" <el-upload v-if="upload.open"
ref="uploadRef" ref="uploadRef"
:headers="upload.headers" :headers="upload.headers"

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

@ -147,7 +147,19 @@
</el-table-column> </el-table-column>
<el-table-column label="记录数" width="80" align="center" prop="tabRecNum"></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="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="对象类型" 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="govFlag"></el-table-column>
<el-table-column label="补录审批状态" width="120" align="center" prop="recStat"></el-table-column> <el-table-column label="补录审批状态" width="120" align="center" prop="recStat"></el-table-column>

Loading…
Cancel
Save