76 lines
2.1 KiB
HTML
76 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>控制面板</title>
|
|
<link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.15.13/theme-chalk/index.min.css">
|
|
<script src="https://cdn.staticfile.org/vue/2.6.11/vue.min.js"></script>
|
|
<script src="https://cdn.staticfile.org/element-ui/2.15.13/index.js"></script>
|
|
<script src="https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>
|
|
<style>
|
|
</style>
|
|
</head>
|
|
<body style="background-color: #eef0f6;padding: 20px">
|
|
<div id="app" style="display: flex;width: 100%">
|
|
<template>
|
|
|
|
<el-dialog
|
|
:show-close="false"
|
|
title="知识库AI"
|
|
:visible.sync="show"
|
|
width="50%"
|
|
:close-on-click-modal="false"
|
|
top="20%"
|
|
>
|
|
<el-form size="medium">
|
|
<el-form-item label="请输入集合名称">
|
|
<el-input type="text" v-model="collectName"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="jump()">确认</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
|
|
</template>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
new Vue({
|
|
el: '#app',
|
|
delimiters:["<{","}>"],
|
|
data: {
|
|
show:true,
|
|
collectName:"",
|
|
|
|
},
|
|
methods: {
|
|
jump(){
|
|
let _this=this;
|
|
if(this.collectName=="") return
|
|
fetch(this.collectName+'/info', {
|
|
method: 'GET',
|
|
}).then(res => res.json()).then(data => {
|
|
if(!data.result){
|
|
_this.$message({
|
|
message: data.status.error,
|
|
type: 'error'
|
|
});
|
|
}else{
|
|
window.location.href=_this.collectName+'/qdrant';
|
|
}
|
|
});
|
|
|
|
|
|
}
|
|
},
|
|
mounted:function(){
|
|
|
|
},
|
|
created: function () {
|
|
|
|
}
|
|
})
|
|
</script>
|
|
</html> |