zhengli

上级 cca95824
.login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-container[data-v-36ae6cf9]{height:60px;border-bottom:1px solid #eaeaea}.layout-header-left-img[data-v-36ae6cf9]{height:50px}.layout-aside-container[data-v-3160d41c]{width:250px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-3160d41c]{font-size:20px}.home-container[data-v-e41dbfec]{height:100%;display:flex;flex-direction:column}.home-container .home-main-box[data-v-e41dbfec]{height:100%;display:flex}.home-container .home-main-box .home-main-body[data-v-e41dbfec]{padding:15px;flex:1}.el-header[data-v-fa69704c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-fa69704c]{color:#333}.pagination[data-v-fa69704c]{margin-top:16px;text-align:right}.arrow-button[data-v-fa69704c]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-fa69704c]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-fa69704c]{pointer-events:none;opacity:.1}.el-header[data-v-7d023d4e]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-7d023d4e]{color:#333}.pagination[data-v-7d023d4e]{margin-top:16px;text-align:right}.header-button-item[data-v-7d023d4e]{margin-right:15px;font-size:20px}.backtop[data-v-7d023d4e]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-7d023d4e]:hover{background-color:#0050a0}.el-header[data-v-65b4b87d]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-65b4b87d]{color:#333}.pagination[data-v-65b4b87d]{margin-top:16px;text-align:right}.header-button-item[data-v-65b4b87d]{margin-right:15px;font-size:20px}.red-title[data-v-65b4b87d]{line-height:24px;font-size:18px;color:red}.backtop[data-v-65b4b87d]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.reddish-purple-value[data-v-65b4b87d]{color:#eb6ea5}.new-orange-value[data-v-65b4b87d]{color:#59b9c6}.clove-tea-value[data-v-65b4b87d]{color:#b4866b}.grassy-value[data-v-65b4b87d]{color:#c3d825}.daylily-value[data-v-65b4b87d]{color:#f8b862}.balloon-flower-value[data-v-65b4b87d]{color:#4d5aaf}.pink-value[data-v-65b4b87d]{color:#f47983}.purple-value[data-v-65b4b87d]{color:#8d4bbb}.sapphire-blue-value[data-v-65b4b87d]{color:#4b5cc4}.green-value[data-v-65b4b87d]{color:#ce9ffc}.black-value[data-v-65b4b87d]{color:#000}.magenta-value[data-v-65b4b87d]{color:#ff0097}.dark-blue-value[data-v-65b4b87d]{color:#3eede7}.rose-hermosa-value[data-v-65b4b87d]{color:#ff6fd8}.white-dress-value[data-v-65b4b87d]{color:#83ccd2}.prunus-gracilis-value[data-v-65b4b87d]{color:#5a79ba}.custom-textarea[data-v-65b4b87d]{width:100%;text-align:left}.backtop[data-v-65b4b87d]:hover{background-color:#0050a0}.button-container[data-v-621ce089]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-5e39bc67]{display:flex;justify-content:center;align-items:center;height:30vh}
.login-container[data-v-1be4e8ce]{background-color:#35495e;height:100%}.login-container .login-box[data-v-1be4e8ce]{width:400px;height:250px;background-color:#fff;border-radius:3px;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);box-shadow:0 0 6px hsla(0,0%,100%,.5)}.login-container .login-box .form-login[data-v-1be4e8ce]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-1be4e8ce]{flex:1}.avatar-box[data-v-1be4e8ce]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-1be4e8ce]{width:120px;height:120px;border-radius:50%!important;box-shadow:0 0 6px #efefef}.layout-header-container[data-v-36ae6cf9]{height:60px;border-bottom:1px solid #eaeaea}.layout-header-left-img[data-v-36ae6cf9]{height:50px}.layout-aside-container[data-v-3160d41c]{width:250px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-3160d41c]{font-size:20px}.home-container[data-v-e41dbfec]{height:100%;display:flex;flex-direction:column}.home-container .home-main-box[data-v-e41dbfec]{height:100%;display:flex}.home-container .home-main-box .home-main-body[data-v-e41dbfec]{padding:15px;flex:1}.el-header[data-v-15b8f4b2]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-15b8f4b2]{color:#333}.pagination[data-v-15b8f4b2]{margin-top:16px;text-align:right}.arrow-button[data-v-15b8f4b2]{display:flex;align-items:center;justify-content:center;border:none;background-color:transparent;cursor:pointer}.custom-icon[data-v-15b8f4b2]{font-size:24px;color:#f90;margin-right:6px}.arrow-button.disabled[data-v-15b8f4b2]{pointer-events:none;opacity:.1}.el-header[data-v-6e64ea6a]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-6e64ea6a]{color:#333}.pagination[data-v-6e64ea6a]{margin-top:16px;text-align:right}.header-button-item[data-v-6e64ea6a]{margin-right:15px;font-size:20px}.backtop[data-v-6e64ea6a]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.backtop[data-v-6e64ea6a]:hover{background-color:#0050a0}.el-header[data-v-153268c2]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-153268c2]{color:#333}.pagination[data-v-153268c2]{margin-top:16px;text-align:right}.header-button-item[data-v-153268c2]{margin-right:15px;font-size:20px}.red-title[data-v-153268c2]{line-height:24px;font-size:18px;color:red}.backtop[data-v-153268c2]{position:fixed;bottom:50px;right:50px;height:40px;width:40px;line-height:40px;text-align:center;border-radius:20px;background-color:#007aff;color:#fff;cursor:pointer;z-index:999}.reddish-purple-value[data-v-153268c2]{color:#eb6ea5}.new-orange-value[data-v-153268c2]{color:#59b9c6}.clove-tea-value[data-v-153268c2]{color:#b4866b}.grassy-value[data-v-153268c2]{color:#c3d825}.daylily-value[data-v-153268c2]{color:#f8b862}.balloon-flower-value[data-v-153268c2]{color:#4d5aaf}.pink-value[data-v-153268c2]{color:#f47983}.purple-value[data-v-153268c2]{color:#8d4bbb}.sapphire-blue-value[data-v-153268c2]{color:#4b5cc4}.green-value[data-v-153268c2]{color:#ce9ffc}.black-value[data-v-153268c2]{color:#000}.magenta-value[data-v-153268c2]{color:#ff0097}.dark-blue-value[data-v-153268c2]{color:#3eede7}.rose-hermosa-value[data-v-153268c2]{color:#ff6fd8}.white-dress-value[data-v-153268c2]{color:#83ccd2}.prunus-gracilis-value[data-v-153268c2]{color:#5a79ba}.custom-textarea[data-v-153268c2]{width:100%;text-align:left}.backtop[data-v-153268c2]:hover{background-color:#0050a0}.button-container[data-v-9d5d30a4]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-ddc6c3e0]{display:flex;justify-content:center;align-items:center;height:30vh}
/*!
* Bootstrap v4.5.0 (https://getbootstrap.com/)
......
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan66</title><link href="/css/app.6506dc7a.css" rel="preload" as="style"><link href="/css/chunk-vendors.bedbfba9.css" rel="preload" as="style"><link href="/js/app.ea9da8e3.js" rel="preload" as="script"><link href="/js/chunk-vendors.48475ebe.js" rel="preload" as="script"><link href="/css/chunk-vendors.bedbfba9.css" rel="stylesheet"><link href="/css/app.6506dc7a.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan66 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.48475ebe.js"></script><script src="/js/app.ea9da8e3.js"></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/kwan.png"><title>kwan66</title><link href="/css/app.7b861b6c.css" rel="preload" as="style"><link href="/css/chunk-vendors.bedbfba9.css" rel="preload" as="style"><link href="/js/app.a42e9102.js" rel="preload" as="script"><link href="/js/chunk-vendors.48475ebe.js" rel="preload" as="script"><link href="/css/chunk-vendors.bedbfba9.css" rel="stylesheet"><link href="/css/app.7b861b6c.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but kwan66 doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="/js/chunk-vendors.48475ebe.js"></script><script src="/js/app.a42e9102.js"></script></body></html>
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -39,98 +39,98 @@
<script>
import axios from 'axios'
export default {
name: 'MyChat',
name: 'MyChat',
data() {
return {
// 用户列表数据
userlist: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('lastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
question: '',
},
}
},
watch: {
'formInline.question'(newVal) {
if (newVal === '') {
this.currentPage = 1
localStorage.setItem('lastPage', this.currentPage)
this.initCartList()
}
},
},
created() {
this.$nextTick(() => {
const foo = this.$route.query.back
const add = this.$route.query.add
if (foo === 'back' && add != 'add') {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1
this.formInline.question = localStorage.getItem('lastQuestion') || ''
} else {
localStorage.setItem('lastPage', 1)
localStorage.setItem('lastQuestion', '')
this.currentPage = 1
this.formInline.question = ''
}
// 调用请求数据的方法
this.initCartList()
})
},
mounted() {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1
this.formInline.question = localStorage.getItem('lastQuestion')
this.elementui_page_component_key++
},
methods: {
async onDelete(id) {
this.loading = true
const { data: res } = await axios.get('http://localhost:8080/chatbot/delete', {
params: {
id: id,
},
})
this.initCartList()
this.loading = false
},
refreshPage() {
location.reload()
},
gotoDetail(id) {
this.$router.push('/home/chatinfo/' + id)
},
addChat() {
this.$router.push('/home/addChat/')
},
data() {
return {
// 用户列表数据
userlist: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('lastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
question: '',
},
}
},
watch: {
'formInline.question'(newVal) {
if (newVal === '') {
this.currentPage = 1
localStorage.setItem('lastPage', this.currentPage)
this.initCartList()
}
},
},
created() {
this.$nextTick(() => {
const foo = this.$route.query.back
const add = this.$route.query.add
if (foo === 'back' && add != 'add') {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1
this.formInline.question = localStorage.getItem('lastQuestion') || ''
} else {
localStorage.setItem('lastPage', 1)
localStorage.setItem('lastQuestion', '')
this.currentPage = 1
this.formInline.question = ''
}
// 调用请求数据的方法
this.initCartList()
})
},
mounted() {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1
this.formInline.question = localStorage.getItem('lastQuestion')
this.elementui_page_component_key++
},
methods: {
async onDelete(id) {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/chatbot/delete', {
params: {
id: id,
},
})
this.initCartList()
this.loading = false
},
refreshPage() {
location.reload()
},
gotoDetail(id) {
this.$router.push('/home/chatinfo/' + id)
},
addChat() {
this.$router.push('/home/addChat/')
},
async initCartList() {
this.loading = true
const { data: res } = await axios.get('http://localhost:8080/chatbot/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
question: this.formInline.question,
},
})
console.log(res)
if (res.code === 200) {
this.userlist = res.result.content
this.total = res.result.totalElements
localStorage.setItem('lastPage', this.currentPage)
localStorage.setItem('lastQuestion', this.formInline.question)
}
this.loading = false
},
async initCartList() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/chatbot/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
question: this.formInline.question,
},
})
console.log(res)
if (res.code === 200) {
this.userlist = res.result.content
this.total = res.result.totalElements
localStorage.setItem('lastPage', this.currentPage)
localStorage.setItem('lastQuestion', this.formInline.question)
}
this.loading = false
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.initCartList()
},
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.initCartList()
},
},
}
</script>
......
......@@ -105,242 +105,242 @@
<script>
import axios from 'axios'
export default {
name: 'MyInterview',
name: 'MyInterview',
data() {
return {
// 用户列表数据
userlist: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('lastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
question: '',
},
options: [],
questionType: 0,
// 新增的内容
dialogFormVisible: false,
dialogMutiFormVisible: false,
form: {
question: '',
questionType: 0,
},
formLabelWidth: '120px',
dialogVisible: false,
editVisible: false,
currentRowId: null,
}
},
watch: {
'formInline.question'(newVal) {
if (newVal === '') {
this.currentPage = 1
localStorage.setItem('lastPage', this.currentPage)
this.interviewPage()
}
},
},
created() {
//获取问题类型的枚举
this.getQuestionType()
//获取问题列表
this.interviewPage()
},
mounted() {},
methods: {
prepareAdd() {
this.form.question = ''
this.form.questionType = 0
this.dialogFormVisible = true
},
prepareMutiAdd() {
this.form.question = ''
this.form.questionType = 0
this.dialogMutiFormVisible = true
},
data() {
return {
// 用户列表数据
userlist: [],
loading: false,
elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('lastPage')) || 1,
pageSize: 9,
total: 0,
formInline: {
question: '',
},
options: [],
questionType: 0,
// 新增的内容
dialogFormVisible: false,
dialogMutiFormVisible: false,
form: {
question: '',
questionType: 0,
},
formLabelWidth: '120px',
dialogVisible: false,
editVisible: false,
currentRowId: null,
}
},
watch: {
'formInline.question'(newVal) {
if (newVal === '') {
this.currentPage = 1
localStorage.setItem('lastPage', this.currentPage)
this.interviewPage()
}
},
},
created() {
//获取问题类型的枚举
this.getQuestionType()
//获取问题列表
this.interviewPage()
},
mounted() {},
methods: {
prepareAdd() {
this.form.question = ''
this.form.questionType = 0
this.dialogFormVisible = true
},
prepareMutiAdd() {
this.form.question = ''
this.form.questionType = 0
this.dialogMutiFormVisible = true
},
prepareDelete(id) {
this.currentRowId = id
this.dialogVisible = true
},
preEdit(id, question, questionTypeName) {
this.form.question = question
prepareDelete(id) {
this.currentRowId = id
this.dialogVisible = true
},
preEdit(id, question, questionTypeName) {
this.form.question = question
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.name] = option.questionType
})
this.form.questionType = questionTypeToNameMap[questionTypeName]
this.currentRowId = id
this.editVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addQuestion(addType) // 发送请求
},
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.name] = option.questionType
})
this.form.questionType = questionTypeToNameMap[questionTypeName]
this.currentRowId = id
this.editVisible = true
},
handleClose(done) {
this.$confirm('确认关闭?')
.then((_) => {
done()
})
.catch((_) => {})
},
handleConfirm(addType) {
this.dialogFormVisible = false // 关闭对话框
this.dialogMutiFormVisible = false
this.addQuestion(addType) // 发送请求
},
async addQuestion(addType) {
try {
this.loading = true
async addQuestion(addType) {
try {
this.loading = true
const { data: res } = await axios.post('http://localhost:8080/interviewQuestion/add', {
addType: addType,
question: this.form.question,
questionType: this.form.questionType,
})
if (res.code === 200) {
this.form.question = ''
this.form.questionType = 0
this.interviewPage() // 确保这个方法是有效的
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
}
} catch (error) {
console.error('An error occurred while adding the question:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://120.79.36.53:8888/interviewQuestion/add', {
addType: addType,
question: this.form.question,
questionType: this.form.questionType,
})
if (res.code === 200) {
this.form.question = ''
this.form.questionType = 0
this.interviewPage() // 确保这个方法是有效的
} else {
console.error('Received non-200 status code', res)
this.errorMsg(res.message)
}
} catch (error) {
console.error('An error occurred while adding the question:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
errorMsg(msg) {
this.$message({
showClose: true,
message: msg,
type: 'error',
})
},
async editConfirm() {
try {
this.loading = true
const { data: res } = await axios.post('http://localhost:8080/interviewQuestion/update', {
id: this.currentRowId,
question: this.form.question,
questionType: this.form.questionType,
})
if (res.code === 200) {
this.form.question = ''
this.form.questionType = 0
this.editVisible = false
currentRowId: null
this.interviewPage() // 确保这个方法是有效的
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the question:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
const { data: res } = await axios.post('http://120.79.36.53:8888/interviewQuestion/update', {
id: this.currentRowId,
question: this.form.question,
questionType: this.form.questionType,
})
if (res.code === 200) {
this.form.question = ''
this.form.questionType = 0
this.editVisible = false
currentRowId: null
this.interviewPage() // 确保这个方法是有效的
} else {
console.error('Received non-200 status code', res)
}
} catch (error) {
console.error('An error occurred while adding the question:', error)
// 异常处理逻辑
} finally {
this.loading = false
}
},
async onDelete(id) {
this.dialogVisible = false
this.loading = true
const { data: res } = await axios.get('http://localhost:8080/interviewQuestion/delete', {
params: {
id: id,
},
})
this.interviewPage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.getQuestionType()
location.reload()
},
async onDelete(id) {
this.dialogVisible = false
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/delete', {
params: {
id: id,
},
})
this.interviewPage()
this.loading = false
},
refreshPage() {
//获取问题类型的枚举
this.getQuestionType()
location.reload()
},
async getQuestionType() {
const { data: res } = await axios.get('http://localhost:8080/interviewQuestion/questionType', { params: {} })
if (res.code === 200) {
this.options = res.result
}
},
async getQuestionType() {
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/questionType', { params: {} })
if (res.code === 200) {
this.options = res.result
}
},
async interviewPage() {
this.loading = true
const { data: res } = await axios.get('http://localhost:8080/interviewQuestion/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
question: this.formInline.question,
questionType: this.questionType,
},
})
if (res.code === 200) {
this.total = res.result.totalElements
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.questionType] = option.name
})
// 修改 userlist 中的每一个元素,将 questionType 转换为 name
res.result.content.forEach((user) => {
user.questionTypeName = questionTypeToNameMap[user.questionType] || 'Unknown'
})
this.userlist = res.result.content
}
this.loading = false
},
getClassForValue(value) {
// 根据值返回相应的类名
// 您可以根据需要编写逻辑来决定何时使用相同的类名
// 这里只是一个示例
if (value === '基础知识') {
return 'reddish-purple-value'
} else if (value === '集合') {
return 'new-orange-value'
} else if (value === 'JVM') {
return 'clove-tea-value'
} else if (value === '并发编程') {
return 'grassy-value'
} else if (value === 'MySql') {
return 'daylily-value'
} else if (value === 'Redis') {
return 'balloon-flower-value'
} else if (value === '中间件') {
return 'pink-value'
} else if (value === 'Spring') {
return 'purple-value'
} else if (value === '微服务') {
return 'sapphire-blue-value'
} else if (value === '分布式') {
return 'green-value'
} else if (value === '项目') {
return 'black-value'
} else if (value === '算法') {
return 'rose-hermosa-value'
} else if (value === '反问环节') {
return 'white-dress-value'
} else if (value === '设计模式') {
return 'prunus-gracilis-value'
} else if (value === '其他') {
return 'magenta-value'
} else {
return 'dark-blue-value'
}
},
async interviewPage() {
this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/interviewQuestion/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
question: this.formInline.question,
questionType: this.questionType,
},
})
if (res.code === 200) {
this.total = res.result.totalElements
// 定义一个映射(map)来存储 questionType 到 name 的转换
const questionTypeToNameMap = {}
this.options.forEach((option) => {
questionTypeToNameMap[option.questionType] = option.name
})
// 修改 userlist 中的每一个元素,将 questionType 转换为 name
res.result.content.forEach((user) => {
user.questionTypeName = questionTypeToNameMap[user.questionType] || 'Unknown'
})
this.userlist = res.result.content
}
this.loading = false
},
getClassForValue(value) {
// 根据值返回相应的类名
// 您可以根据需要编写逻辑来决定何时使用相同的类名
// 这里只是一个示例
if (value === '基础知识') {
return 'reddish-purple-value'
} else if (value === '集合') {
return 'new-orange-value'
} else if (value === 'JVM') {
return 'clove-tea-value'
} else if (value === '并发编程') {
return 'grassy-value'
} else if (value === 'MySql') {
return 'daylily-value'
} else if (value === 'Redis') {
return 'balloon-flower-value'
} else if (value === '中间件') {
return 'pink-value'
} else if (value === 'Spring') {
return 'purple-value'
} else if (value === '微服务') {
return 'sapphire-blue-value'
} else if (value === '分布式') {
return 'green-value'
} else if (value === '项目') {
return 'black-value'
} else if (value === '算法') {
return 'rose-hermosa-value'
} else if (value === '反问环节') {
return 'white-dress-value'
} else if (value === '设计模式') {
return 'prunus-gracilis-value'
} else if (value === '其他') {
return 'magenta-value'
} else {
return 'dark-blue-value'
}
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.interviewPage()
},
},
handleCurrentChange(currentPage) {
this.currentPage = currentPage
this.interviewPage()
},
},
}
</script>
......
......@@ -106,7 +106,7 @@ export default {
},
async queryPic() {
this.loading = true
const { data: res } = await axios.get('http://localhost:8080/picInfo/page', {
const { data: res } = await axios.get('http://120.79.36.53:8888/picInfo/page', {
params: {
page: this.currentPage,
pageSize: this.pageSize,
......
......@@ -42,7 +42,7 @@ export default {
response: this.form.response,
}
axios
.post('http://localhost:8080/chatbot', data)
.post('http://120.79.36.53:8888/chatbot', data)
.then((response) => {
// 只要请求回来的数据,在页面渲染期间要用到,则必须转存到 data 中
if (response.data.code === 200) {
......
......@@ -66,7 +66,7 @@ export default {
// 封装请求列表数据的方法
async initChatList() {
// 调用 axios 的 get 方法,请求列表数据
const { data: res } = await axios.get('http://localhost:8080/chatbot/' + this.id)
const { data: res } = await axios.get('http://120.79.36.53:8888/chatbot/' + this.id)
// 只要请求回来的数据,在页面渲染期间要用到,则必须转存到 data 中
if (res.code === 200) {
this.list = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册