Commit e77a174f authored by mhw's avatar mhw

版本迭代

parent f6718ad1
module.exports = {
baseUrl: 'http://localhost:8082/',
baseUrl: 'http://218.76.0.69:8082/',
wsUrl: 'ws://218.76.0.69:7860/',
projectName: '灵境大模型平台'
}
......@@ -27,7 +27,7 @@
</div>
</el-form-item>
<el-form-item label-width="0px" v-if="form.prompt_template">
<div style="background-color: #f3f3f3;padding: 10px;border-radius: 10px;">
<div style="background-color: #f3f3f3;padding: 10px;border-radius: 10px;white-space: pre-wrap; display: inline-flex;">
{{ form.prompt_template }}
</div>
</el-form-item>
......@@ -225,7 +225,6 @@ export default {
});
},
changePromptTemplate () {
console.log(1, this.$bus);
this.$bus.$emit('isPromptTemplate', this.isPromptTemplate);
}
}
......
......@@ -2,12 +2,12 @@
<template>
<div>
<div class="promptWordTemplate">
<span v-for="(item,index) in content" :key="index">
<span v-for="(item,index) in content" :key="index" style="white-space: pre-wrap;">
<template v-if="item.text">
{{ item.text }}
</template>
<template v-else-if="item.placeholder">
<el-input v-model="item.value" style="display:inline-block;width: 100px;margin-left: 10px;" size="small" :placeholder="item.placeholder"></el-input>
<el-input v-model="item.value" style="display:inline-block;width: 100px;margin:0 10px 0 10px;" size="small" :placeholder="item.placeholder"></el-input>
</template>
</span>
<el-row type="flex" justify="end" class="dialog-btn-layer mt20">
......@@ -76,6 +76,6 @@ export default {
</script>
<style scoped>
.promptWordTemplate{
line-height: 30px;
line-height: 35px;
}
</style>
......@@ -35,6 +35,12 @@
</div>
</div>
</el-card>
<template v-if="dataList.length===0">
<div class="table-empty unified-font">
<img src="@/assets/img/empty.png">
<span>暂无数据</span>
</div>
</template>
<div class="box-card-2" v-for="item in 3" :key="item"></div>
</div>
</template>
......@@ -184,6 +190,7 @@ div /deep/.el-divider--horizontal {
margin-bottom: 16px;
}
.cardBox {
width: 100%;
display: flex;
flex-wrap: wrap;
justify-content: space-around;
......@@ -207,4 +214,7 @@ left: 3px;
/deep/ .el-icon-star-off{
font-size: 14px !important;
}
.table-empty{
width: 100%;
}
</style>
<!-- 创建Prompt模板 -->
<template>
<el-form label-position="left" ref="form" label-width="80px" :model="form" :size="defaultFormItemSize">
<el-form-item label="模板名称:">
<el-input v-model="form.templateName" class="inputWidth" :size="defaultFormItemSize"></el-input>
<el-form label-position="left" ref="form" label-width="80px" :model="form" :size="defaultFormItemSize" :rules="rules">
<el-form-item label="模板名称:" prop="templateName">
<el-input v-model="form.templateName" class="inputWidth" :size="defaultFormItemSize" ></el-input>
</el-form-item>
<el-form-item label="模板标签:">
<el-select :size="defaultFormItemSize" class="inputWidth" v-model="form.templateLabel" multiple :filterable='true' :allow-create='true' default-first-option placeholder="请选择模板标签">
......@@ -10,7 +10,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="场景类型:">
<el-form-item label="场景类型:" >
<el-radio v-model="form.scenarioType" v-for="item in ScenarioTypeDict.getList()" :label="item.id" :size="defaultFormItemSize" :key="item.id">{{ item.name }}</el-radio>
</el-form-item>
<el-form-item label="变量识别符:">
......@@ -23,7 +23,7 @@
<el-form-item label="模板框架:" class="templateFramework" v-if=" !isEdit">
<el-radio v-model="form.templateFramework" v-for="item in TemplateFrameworkDict.getList()" :label="item.id" :size="defaultFormItemSize" :key="item.id" @input="$refs.promptInput.init()">{{ item.name }}</el-radio>
</el-form-item>
<el-form-item label="Prompt:">
<el-form-item label="Prompt:" prop="templateContent">
<promptInput ref="promptInput" v-model="form.templateContent" :templateFramework="form.templateFramework" :isEdit="isEdit" />
</el-form-item>
</template>
......@@ -65,6 +65,10 @@ export default {
templateSource: 0,
templateVariables: '',
viewCount: 0
},
rules: {
'templateName': [{ required: true, message: '请选输入名称', trigger: 'blur' }],
'templateContent': [{ required: true, message: '请选输入Prompt', trigger: 'blur' }]
}
};
......@@ -119,7 +123,7 @@ export default {
});
}
} else {
reject();
}
});
});
......
......@@ -4,7 +4,7 @@
<el-input v-if="[1,2,3].indexOf(templateFramework)===-1||isEdit" type="textarea" :rows="5" placeholder="请输入内容" :value="prompt" class="inputWidth" @input="changeInput"></el-input>
<el-card class="box-card" style="width:600px" v-else>
<div v-for="(item,index) in myPrompts" :key="index">
<div class="inputBox" v-for="(item,index) in myPrompts" :key="index">
{{ item.label }}:
<el-input v-if="item.label!=='示例'" type="textarea" :rows="3" placeholder="请输入内容" v-model="item.value" class="inputWidth" @input="changeInput"></el-input>
<div v-else>
......@@ -145,4 +145,13 @@ export default {
</script>
<style scoped>
.inputBox{
margin-bottom: 10px;
}
div /deep/ .el-table th.is-leaf{
background: #f5f7fa;
}
.add{
margin-top: 20px;
}
</style>
......@@ -14,7 +14,7 @@
<div class="listBox">
<card :dataList='myDataSetPage.tableData.impl.dataList' :refresh="refresh"></card>
<el-row slot="pagination" type="flex" justify="end" style="margin-top: 16px;">
<el-row slot="pagination" type="flex" justify="end" style="margin-top: 16px;width: 100%;">
<el-pagination :total="myDataSetPage.tableData.impl.totalCount" :current-page="myDataSetPage.tableData.impl.currentPage" :page-size="myDataSetPage.tableData.impl.pageSize" :page-sizes="[10, 20, 50, 100]" layout="total, prev, pager, next, sizes" @current-change="myDataSetPage.tableData.impl.onCurrentPageChange" @size-change="myDataSetPage.tableData.impl.onPageSizeChange">
</el-pagination>
</el-row>
......
......@@ -15,7 +15,7 @@
<div class="listBox">
<card :dataList='myDataSetPage.operationLog.impl.dataList' :refresh="refresh"></card>
<el-row slot="pagination" type="flex" justify="end" style="margin-top: 16px;">
<el-row slot="pagination" type="flex" justify="end" style="margin-top: 16px;width: 100%;">
<el-pagination :total="myDataSetPage.operationLog.impl.totalCount" :current-page="myDataSetPage.operationLog.impl.currentPage" :page-size="myDataSetPage.operationLog.impl.pageSize" :page-sizes="[10, 20, 50, 100]" layout="total, prev, pager, next, sizes" @current-change="myDataSetPage.operationLog.impl.onCurrentPageChange" @size-change="myDataSetPage.operationLog.impl.onPageSizeChange">
</el-pagination>
</el-row>
......
......@@ -14,7 +14,7 @@
<div class="listBox">
<card :dataList='myDataSetPage.operationLog.impl.dataList' :isPreset="true" :refresh="refresh"></card>
<el-row slot="pagination" type="flex" justify="end" style="margin-top: 16px;">
<el-row slot="pagination" type="flex" justify="end" style="margin-top: 16px;width: 100%;">
<el-pagination :total="myDataSetPage.operationLog.impl.totalCount" :current-page="myDataSetPage.operationLog.impl.currentPage" :page-size="myDataSetPage.operationLog.impl.pageSize" :page-sizes="[10, 20, 50, 100]" layout="total, prev, pager, next, sizes" @current-change="myDataSetPage.operationLog.impl.onCurrentPageChange" @size-change="myDataSetPage.operationLog.impl.onPageSizeChange">
</el-pagination>
</el-row>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment