Compare commits

...

5 Commits

  1. 2
      .env.production
  2. 15
      src/views/doc/agent.vue
  3. 3
      src/views/doc/manage.vue
  4. 4
      src/views/doc/space.vue
  5. 28
      src/views/doc/spacePermission.vue

2
.env.production

@ -8,4 +8,4 @@ VITE_APP_SJZT_URL = 'http://120.224.6.6:29911/prod-api'
VITE_APP_SYSTEM_APP = 'stzl' VITE_APP_SYSTEM_APP = 'stzl'
VITE_APP_AGAIN = 1 VITE_APP_AGAIN = 1
VITE_ONLYOFFICE_HOST = 'https://gyhlw.hxgk.group/onlyoffice' VITE_ONLYOFFICE_HOST = 'https://gyhlw.hxgk.group/onlyoffice'
VITE_DEFAULT_AI_AGENT = '23a3c2c5-2de1-40df-59fa-a9206b11861d' VITE_DEFAULT_AI_AGENT = '74938263-ffe5-43c5-90af-25e62d34a51f'

15
src/views/doc/agent.vue

@ -40,6 +40,7 @@ const agent=ref<{name:string,uuid:string}>({name:"通用AI",uuid:import.meta.env
const agentList=ref<{name:string,uuid:string}[]>([{name:"通用AI",uuid:import.meta.env.VITE_DEFAULT_AI_AGENT}]) const agentList=ref<{name:string,uuid:string}[]>([{name:"通用AI",uuid:import.meta.env.VITE_DEFAULT_AI_AGENT}])
const respMsg=ref("") const respMsg=ref("")
const drawerModel=ref(true) const drawerModel=ref(true)
const queryUrl=ref("")
// //
interface message{ interface message{
@ -69,10 +70,17 @@ async function onSendTextToAI(){
const params={ const params={
"onlineSearch":"否", "onlineSearch":"否",
"useDataset":"否" "useDataset":"否",
"queryUrl":""
} }
for (let item of checkedModel.value){ for (let item of checkedModel.value){
if(item==="onlineSearch") params.onlineSearch="是" if(item==="onlineSearch"){
params.onlineSearch="是"
if(queryUrl.value!="") {
params.queryUrl=queryUrl.value
//queryUrl.value="" //
}
}
if(item==="useDataset") params.useDataset="是" if(item==="useDataset") params.useDataset="是"
} }
if (conversation.value==""){ if (conversation.value==""){
@ -362,6 +370,9 @@ onMounted(() => {
{{ mod.name }} {{ mod.name }}
</el-checkbox-button> </el-checkbox-button>
</el-checkbox-group> </el-checkbox-group>
<div v-if="agent.name.startsWith('法')&&checkedModel.length>0 && checkedModel[0]=='onlineSearch' " style="width: 98%;margin-bottom: 5px;">
<el-input placeholder="是否指定网站, 多个地址以逗号分隔。" v-model="queryUrl" input-style="border-radius: 2px;"/>
</div>
<el-input placeholder="问灵犀..." v-model="myquestion" input-style="border-radius: 18px;" <el-input placeholder="问灵犀..." v-model="myquestion" input-style="border-radius: 18px;"
resize="none" :autosize="{minRows: 4}" type="textarea" /> resize="none" :autosize="{minRows: 4}" type="textarea" />

3
src/views/doc/manage.vue

@ -322,9 +322,6 @@ function onLoadMatterList(){
} }
//----------for dir----------- //----------for dir-----------
function createDir(){ function createDir(){
if(matterList.value){
if (matterList.value[0].name=="") return;
}
matterList.value?.unshift({ matterList.value?.unshift({
name:"", name:"",
userUuid:uid, userUuid:uid,

4
src/views/doc/space.vue

@ -24,7 +24,7 @@ import {
ArrowLeft, ArrowLeft,
} from '@element-plus/icons-vue' } from '@element-plus/icons-vue'
import {ElMessage,UploadFile,UploadFiles,ElPagination} from "element-plus"; import {ElMessage,UploadFile,UploadFiles,ElPagination} from "element-plus";
import aiagent from './agent.vue'; //import aiagent from './agent.vue';
import router from "@/utils/router"; import router from "@/utils/router";
import SvgIcon from "@/components/svgIcon/index.vue"; import SvgIcon from "@/components/svgIcon/index.vue";
import BottomPage from '@/views/common/bottom/index.vue' import BottomPage from '@/views/common/bottom/index.vue'
@ -425,7 +425,7 @@ function handleAiUpload(info:matterInfo){
}) })
}) })
}else{ }else{
alert("当前路径没有智能体") console.log("当前路径没有智能体,不需要训练")
} }
} }

28
src/views/doc/spacePermission.vue

@ -33,6 +33,7 @@ interface Tree {
radio?:number[]; radio?:number[];
child?: Tree[] child?: Tree[]
ismanager?:boolean, ismanager?:boolean,
indeterminate2?:boolean,//for manager member
} }
const dataSource = ref<Tree[]>([]) const dataSource = ref<Tree[]>([])
@ -67,6 +68,7 @@ async function onSavePermChange(){
if(item.indeterminate) { if(item.indeterminate) {
item.radio[0]+=10 item.radio[0]+=10
} }
resultPermits[item.id]=item.radio[0] resultPermits[item.id]=item.radio[0]
} }
@ -96,7 +98,7 @@ function collectManager(node:Tree){
} }
// //
function collectNodePermits(node:Tree){ function collectNodePermits(node:Tree){
node.child?.forEach(ele => { node.child?.forEach(ele => {
if(ele.radio&&ele.radio.length>0){ if(ele.radio&&ele.radio.length>0){
if(ele.indeterminate) { if(ele.indeterminate) {
@ -114,18 +116,26 @@ function collectNodePermits(node:Tree){
// //
function onGroupValueChange(node:Tree, val:number[]){ function onGroupValueChange(node:Tree, val:number[]){
if(node.indeterminate) node.indeterminate=false; //if(node.indeterminate) node.indeterminate=false;
updateChildNode(node, val)
if(node.superior){
updateParentNode(node)
}
}
function updateChildNode(node:Tree, val:number[]){
if(node.indeterminate) {
node.indeterminate=false;
}
node.child?.forEach(ele => { node.child?.forEach(ele => {
ele.radio=val ele.radio=val.slice() //val
if(ele.child){ if(ele.child){
onGroupValueChange(ele,val) updateChildNode(ele,val)
} }
}); });
if(node.superior){
updateParentNode(node)
}
} }
// //
function updateParentNode(node:Tree){ function updateParentNode(node:Tree){
if(node.superior){ if(node.superior){
@ -176,7 +186,7 @@ function setParentIndeterminate(node:Tree){
const pnode = treeRef.value?.getNode(node.superior); const pnode = treeRef.value?.getNode(node.superior);
if(pnode){ if(pnode){
const tdata=pnode.data as Tree const tdata=pnode.data as Tree
tdata.indeterminate=true tdata.indeterminate2=true
setParentIndeterminate(tdata) setParentIndeterminate(tdata)
} }
@ -320,7 +330,7 @@ onMounted(()=>{
<span style="width: 100px;overflow: hidden;">{{ data.name }}</span> <span style="width: 100px;overflow: hidden;">{{ data.name }}</span>
<div v-if="managerMode" class="buttons"> <div v-if="managerMode" class="buttons">
<el-checkbox v-model="data.ismanager" :indeterminate="data.indeterminate" /> <el-checkbox v-model="data.ismanager" :indeterminate="data.indeterminate2" />
</div> </div>
<div v-else class="buttons"> <div v-else class="buttons">
<el-checkbox-group :min="0" :max="1" v-model="data.radio" @change="(val)=>onGroupValueChange(data,val)"> <el-checkbox-group :min="0" :max="1" v-model="data.radio" @change="(val)=>onGroupValueChange(data,val)">

Loading…
Cancel
Save