fix:新增功能

上级 497d5b7e
.login-container[data-v-2d08abd9]{background-color:#35495e;height:100%}.login-container .login-box[data-v-2d08abd9]{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-2d08abd9]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-2d08abd9]{flex:1}.avatar-box[data-v-2d08abd9]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-2d08abd9]{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-4c695124]{width:250px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-4c695124]{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-4ac73c72]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-4ac73c72]{color:#333}.pagination[data-v-4ac73c72]{margin-top:16px;text-align:right}.header-button-item[data-v-4ac73c72]{margin-right:15px;font-size:20px}.backtop[data-v-4ac73c72]{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-4ac73c72]:hover{background-color:#0050a0}.el-header[data-v-2f22499b]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-2f22499b]{color:#333}.pagination[data-v-2f22499b]{margin-top:16px;text-align:right}.header-button-item[data-v-2f22499b]{margin-right:15px;font-size:20px}.backtop[data-v-2f22499b]{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-2f22499b]:hover{background-color:#0050a0}.button-container[data-v-2e8dcb2e]{position:fixed;bottom:0;right:0;margin:16px}.container[data-v-869fde4a]{display:flex;justify-content:center;align-items:center;height:30vh} .login-container[data-v-2d08abd9]{background-color:#35495e;height:100%}.login-container .login-box[data-v-2d08abd9]{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-2d08abd9]{position:absolute;bottom:0;left:0;width:100%;box-sizing:border-box}.form-control[data-v-2d08abd9]{flex:1}.avatar-box[data-v-2d08abd9]{position:absolute;width:100%;top:-65px;left:0}.avatar-box .avatar[data-v-2d08abd9]{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-3235a6cc]{width:250px;height:100%;border-right:1px solid #eaeaea}.left-aside-item[data-v-3235a6cc]{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-2a73445c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-2a73445c]{color:#333}.pagination[data-v-2a73445c]{margin-top:16px;text-align:right}.el-header[data-v-c92e998c]{background-color:#b3c0d1;color:#333;line-height:60px}.el-aside[data-v-c92e998c]{color:#333}.pagination[data-v-c92e998c]{margin-top:16px;text-align:right}.header-button-item[data-v-c92e998c]{margin-right:15px;font-size:20px}.backtop[data-v-c92e998c]{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-c92e998c]: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/) * 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.62bf7500.css" rel="preload" as="style"><link href="/css/chunk-vendors.bedbfba9.css" rel="preload" as="style"><link href="/js/app.00aa2a55.js" rel="preload" as="script"><link href="/js/chunk-vendors.7ec94df9.js" rel="preload" as="script"><link href="/css/chunk-vendors.bedbfba9.css" rel="stylesheet"><link href="/css/app.62bf7500.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.7ec94df9.js"></script><script src="/js/app.00aa2a55.js"></script></body></html> <!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.83c37b1e.css" rel="preload" as="style"><link href="/css/chunk-vendors.bedbfba9.css" rel="preload" as="style"><link href="/js/app.8dff95dc.js" rel="preload" as="script"><link href="/js/chunk-vendors.7ec94df9.js" rel="preload" as="script"><link href="/css/chunk-vendors.bedbfba9.css" rel="stylesheet"><link href="/css/app.83c37b1e.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.7ec94df9.js"></script><script src="/js/app.8dff95dc.js"></script></body></html>
\ No newline at end of file \ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="initCartList">查询</el-button> <el-button type="primary" @click="initCartList">查询</el-button>
<!-- <el-button type="primary" circle icon="el-icon-search" @click="initCartList"></el-button> -->
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click.prevent="addChat">新增</el-button> <el-button type="primary" @click.prevent="addChat">新增</el-button>
......
...@@ -2,12 +2,15 @@ ...@@ -2,12 +2,15 @@
<div> <div>
<el-container> <el-container>
<el-main> <el-main>
<el-select v-model="picType" placeholder="请选择" @change="queryPic">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
<el-table border :data="picList" v-loading="loading"> <el-table border :data="picList" v-loading="loading">
<el-table-column prop="id" label="序号" width="100" sortable></el-table-column> <el-table-column prop="id" label="序号" width="100" sortable></el-table-column>
<el-table-column prop="picName" label="图片名字" width="240" show-overflow-tooltip></el-table-column> <el-table-column prop="picName" label="图片名字" width="240" show-overflow-tooltip></el-table-column>
<el-table-column align="center"> <el-table-column align="center">
<template slot-scope="props"> <template slot-scope="props">
<img :src="props.row.picUrl" alt="图片" height="100px" /> <img :src="props.row.picUrl" alt="图片" height="100px" @click="showImageDialog(props.row.picUrl)" style="cursor: pointer" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="创建时间" width="170"> <el-table-column label="创建时间" width="170">
...@@ -16,6 +19,9 @@ ...@@ -16,6 +19,9 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog :visible.sync="imageDialogVisible" width="30%">
<img :src="enlargedImageUrl" alt="放大图片" style="width: 100%" />
</el-dialog>
<el-pagination class="pagination" background :key="elementui_page_component_key" :current-page.sync="currentPage" :page-size="pageSize" :total="total" @current-change="handleCurrentChange"></el-pagination> <el-pagination class="pagination" background :key="elementui_page_component_key" :current-page.sync="currentPage" :page-size="pageSize" :total="total" @current-change="handleCurrentChange"></el-pagination>
</el-main> </el-main>
</el-container> </el-container>
...@@ -26,92 +32,69 @@ ...@@ -26,92 +32,69 @@
import axios from 'axios' import axios from 'axios'
export default { export default {
name: 'MyPic', name: 'MyPic',
data() { data() {
return { return {
// 用户列表数据 // 用户列表数据
picList: [], picList: [],
loading: false, loading: false,
elementui_page_component_key: 0, elementui_page_component_key: 0,
currentPage: Number(localStorage.getItem('lastPage')) || 1, currentPage: 1,
pageSize: 9, pageSize: 6,
total: 0, total: 0,
formInline: { imageDialogVisible: false,
question: '', enlargedImageUrl: '',
options: [
{
value: 0,
label: '宝宝照片',
}, },
} {
value: 1,
label: '学习照片',
}, },
watch: { {
'formInline.question'(newVal) { value: 2,
if (newVal === '') { label: '风景照片',
this.currentPage = 1
localStorage.setItem('lastPage', this.currentPage)
this.initCartList()
}
}, },
{
value: 3,
label: '美女照片',
}, },
created() { {
this.$nextTick(() => { value: 99,
const foo = this.$route.query.back label: '其他照片',
const add = this.$route.query.add },
if (foo === 'back' && add != 'add') { ],
this.currentPage = Number(localStorage.getItem('lastPage')) || 1 picType: 0,
this.formInline.question = localStorage.getItem('lastQuestion') || ''
} else {
localStorage.setItem('lastPage', 1)
localStorage.setItem('lastQuestion', '')
this.currentPage = 1
this.formInline.question = ''
} }
// 调用请求数据的方法
this.initCartList()
})
}, },
mounted() { created() {
this.currentPage = Number(localStorage.getItem('lastPage')) || 1 // 调用请求数据的方法
this.formInline.question = localStorage.getItem('lastQuestion') this.queryPic()
this.elementui_page_component_key++
}, },
methods: { methods: {
async onDelete(id) { showImageDialog(url) {
this.loading = true this.enlargedImageUrl = url
const { data: res } = await axios.get('http://120.79.36.53:8888/chatbot/delete', { this.imageDialogVisible = true
params: {
id: id,
}, },
}) async queryPic() {
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 this.loading = true
const { data: res } = await axios.get('http://120.79.36.53:8888/picInfo/page', { const { data: res } = await axios.get('http://120.79.36.53:8888/picInfo/page', {
params: { params: {
page: this.currentPage, page: this.currentPage,
pageSize: this.pageSize, pageSize: this.pageSize,
picType: this.picType,
}, },
}) })
if (res.code === 200) { if (res.code === 200) {
this.picList = res.result.records this.picList = res.result.records
this.total = res.result.total this.total = res.result.total
localStorage.setItem('lastPage', this.currentPage)
localStorage.setItem('lastQuestion', this.formInline.question)
} }
this.loading = false this.loading = false
}, },
handleCurrentChange(currentPage) { handleCurrentChange(currentPage) {
this.currentPage = currentPage this.currentPage = currentPage
this.initCartList() this.queryPic()
}, },
}, },
} }
...@@ -132,27 +115,4 @@ export default { ...@@ -132,27 +115,4 @@ export default {
margin-top: 16px; margin-top: 16px;
text-align: right; text-align: right;
} }
.header-button-item {
margin-right: 15px;
font-size: 20px;
}
.backtop {
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:hover {
background-color: #0050a0;
}
</style> </style>
\ No newline at end of file
...@@ -6,18 +6,18 @@ ...@@ -6,18 +6,18 @@
<span slot="title">对话管理</span> <span slot="title">对话管理</span>
</el-menu-item> </el-menu-item>
</router-link> </router-link>
<router-link to="/home/users">
<el-menu-item index="/users" class="left-aside-item">
<i class="el-icon-user"></i>
<span slot="title">用户管理</span>
</el-menu-item>
</router-link>
<router-link to="/home/pic"> <router-link to="/home/pic">
<el-menu-item index="/pic" class="left-aside-item"> <el-menu-item index="/pic" class="left-aside-item">
<i class="el-icon-setting"></i> <i class="el-icon-setting"></i>
<span slot="title">图片管理</span> <span slot="title">图片管理</span>
</el-menu-item> </el-menu-item>
</router-link> </router-link>
<router-link to="/home/users">
<el-menu-item index="/users" class="left-aside-item">
<i class="el-icon-user"></i>
<span slot="title">用户管理</span>
</el-menu-item>
</router-link>
<router-link to="/home/goods"> <router-link to="/home/goods">
<el-menu-item index="/goods" class="left-aside-item"> <el-menu-item index="/goods" class="left-aside-item">
<i class="el-icon-goods"></i> <i class="el-icon-goods"></i>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册