This commit is contained in:
2023-05-29 17:52:21 +08:00
10 changed files with 356 additions and 15 deletions

View File

@@ -29,5 +29,9 @@ public class RiskUserController extends BaseController {
return success(userService.queryList(userQ));
}
@PostMapping(value = "/query_pages")
public ResponseData queryPages(@RequestBody Map entrysQ) {
return success(userService.queryPage(entrysQ));
}
}

BIN
web/public/template.xlsx Normal file

Binary file not shown.

View File

@@ -34,7 +34,7 @@
<el-button type="primary" style="float:right;" @click="queryData" :loading="btLoading">执行</el-button>
</el-col>
</el-row>
<div><a :href="path+'武器装备-本体模型.xlsx'" download="武器装备-本体模型.xlsx" style="text-decoration:underline;color: #0D6DFF">下载模板</a></div>
<div><a :href="path+'template.xlsx'" download="template.xlsx" style="text-decoration:underline;color: #0D6DFF">下载模板</a></div>
<div class="result" style="width: 100%;margin-top: 20px;color: #5c5c5c;" v-if="showFlag && activeName == 'first'">成功导入</div>
<div style="margin-top: 20px;height:20px;border: 1px solid rgba(0, 0, 0, 0.1);padding: 20px" v-if="showFlag && activeName == 'first'">
<el-descriptions title="" :column="3" >

View File

@@ -0,0 +1,142 @@
<template>
<div>
<div class="menu-title">
概览
</div>
<div class="home-box">
<div class="counts-box">
<div class="count-item" v-for="(value, key) in count" :key="key">
<div>{{ key }}</div>
<div>{{ value }}</div>
</div>
</div>
<div class="chart-box">
<div class="title">正反馈率</div>
<div id="chart"></div>
</div>
</div>
</div>
</template>
<script>
import request from '@/utils/request';
var _this;
export default {
name: "homePage",
data() {
return {
count: {
'用户': '2,636',
'物品': '51,754',
'总反馈': '267,610',
'正面反馈': '120,927',
'负面反馈': '51,123'
}
}
},
mounted() {
_this = this;
_this.initChart();
},
methods: {
initChart() {
let dom = document.getElementById("chart");
let chart = _this.$echarts.init(dom);
chart.setOption({
grid: {
left: '3%',
right: '3%'
},
xAxis: {
type: 'category',
data: ['05/01', '05/02', '05/03', '05/04', '05/05', '05/06', '05/07']
},
yAxis: {
type: 'value'
},
series: [
{
name: 'like',
data: [0.1, 0.23, 0.52, 0.44, 0.49, 0.78, 1],
type: 'line'
},
{
name: 'star',
data: [0.92, 0.7, 0.65, 0.44, 0.55, 0.55, 0.78],
type: 'line'
}
]
});
}
}
}
</script>
<style scoped lang="scss">
.content-box > div {
height: 100%;
}
.home-box {
padding: 0 30px;
height: calc(100% - 160px);
.chart-box {
background-color: #fff;
box-shadow: 0px 5px 12px 1px rgba(105, 105, 105, 0.12);
border-radius: 10px;
overflow: hidden;
margin-top: 30px;
height: calc(100% - 200px);
#chart {
width: 100%;
height: calc(100% - 60px);
}
.title {
width: 100%;
height: 60px;
line-height: 60px;
padding-left: 20px;
font-size: 18px;
color: #626672;
border-bottom: 1px solid rgba(105, 105, 105, 0.12);
}
}
.counts-box {
display: flex;
justify-content: space-between;
.count-item {
width: 18%;
height: 165px;
background-color: #fff;
box-shadow: 0px 5px 12px 1px rgba(105, 105, 105, 0.12);
text-align: center;
border-radius: 10px;
&:hover {
transform: scale(1.03);
}
> div:first-child {
font-size: 18px;
padding-top: 35px;
color: rgba(103, 109, 122, 0.58);
}
> div:last-child {
font-size: 40px;
color: #3e4c5c;
padding-top: 25px;
}
}
}
}
</style>

View File

@@ -58,12 +58,12 @@
</div>
<div class="line-item" v-for="item in recommendByCategoryList" :key="item.id">
<div class="title-time">
<div>{{ item.fid }}</div>
<div>{{ item.createTime }}</div>
<div>{{ item.ItemId }}</div>
<div>{{ item.Timestamp }}</div>
</div>
<div class="description">{{ item.description }}</div>
<div class="description">{{ item.Comment }}</div>
<div class="labels">
<el-tag v-for="la in item.labelArr">{{la}}</el-tag>
<el-tag v-for="la in item.Labels">{{la}}</el-tag>
</div>
</div>
</el-tab-pane>
@@ -114,10 +114,10 @@ export default {
},
handleCategorySelectChange() {
request({
url: '/gorse/recommend_by_userid',
url: '/gorse/popular_by_category',
method: 'post',
data: {
userId: _this.selectCategory
category: _this.selectCategory
}
}).then(res => {
res.data.forEach(row => {
@@ -147,10 +147,10 @@ export default {
},
handleUserSelectChange() {
request({
url: '/gorse/popular_by_category',
url: '/gorse/recommend_by_userid',
method: 'post',
data: {
category: _this.selectCategory
userId: _this.selectUserId
}
}).then(res => {
res.data.forEach(row => {

View File

@@ -0,0 +1,175 @@
<template>
<div>
<div class="menu-title">
用户管理
</div>
<div class="menu-content">
<div>
<el-form :inline="true" :model="qo" class="demo-form-inline">
<el-form-item>
<el-input v-model="qo.LIKES_fid" placeholder="请输入Fid"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="qo.pageNo=1;queryData()"> </el-button>
</el-form-item>
</el-form>
</div>
<div style="margin: 0px 0 20px 0">
<el-button type="primary" @click="createRow()">添加</el-button>
</div>
<div>
<el-table :data="result.records" style="width: 100%">
<el-table-column type="index" label="行号" width="60"></el-table-column>
<el-table-column prop="fid" label="fid"></el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180"></el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="scope">
<el-button @click.native.prevent="modifyRow(scope.row)" type="text" size="small">
编辑
</el-button>
<el-button @click.native.prevent="removeRow(scope.row)" type="text" size="small">
删除
</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="page-box">
<el-pagination background
@current-change="handleCurrentChange"
:current-page="qo.pageNo"
:page-size="qo.pageSize"
layout="total, prev, pager, next"
:total="result.total">
</el-pagination>
</div>
</div>
<el-dialog
:title="dialogName"
:visible.sync="cmdDialogVisible"
width="40%">
<el-form ref="cmd" label-width="100px" :rules="rules" :model="cmd">
<el-form-item label="fid" prop="fid">
<el-input v-model="cmd.fid" placeholder="请输入fid"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="cmdDialogVisible = false"> </el-button>
<el-button type="primary" @click="submitModify"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import request from '@/utils/request';
var _this;
export default {
name: "userManage",
data() {
return {
qo: {
pageNo: 1,
pageSize: 10,
LIKES_fid: '',
},
result: {
records: [],
total: 0
},
dialogName: '编辑',
cmdDialogVisible: false,
cmd: {},
rules: {
fid: [
{required: true, message: '请输入fid'}
],
},
}
},
mounted() {
_this = this;
_this.queryData();
},
methods: {
queryData() {
request({
url: '/risk-user/query_pages',
method: 'post',
data: _this.qo
}).then(res => {
_this.result.records = res.data.records;
_this.result.total = res.data.total;
});
},
handleCurrentChange(val) {
_this.qo.pageNo = val;
_this.queryData();
},
removeRow(item) {
_this.$confirm('此操作将永久删除记录, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
request({
url: '/risk-user/remove/' + item.id,
method: 'post'
}).then(res => {
_this.$message.success("删除成功");
_this.queryData();
});
}).catch(() => {
});
},
createRow() {
_this.dialogName = '新建';
_this.cmdDialogVisible = true;
_this.$nextTick(_=> {
_this.$refs['cmd'].clearValidate();
_this.cmd = {
fid: '',
};
})
},
modifyRow(item) {
_this.dialogName = '编辑';
_this.cmdDialogVisible = true;
_this.$nextTick(_=> {
_this.$refs['cmd'].clearValidate();
_this.cmd = JSON.parse(JSON.stringify(item));
})
},
submitModify() {
this.$refs.cmd.validate((valid) => {
if (valid) {
if (_this.cmd.id) {
request({
url: '/risk-user/modify',
method: 'post',
data: _this.cmd
}).then(res => {
_this.$message.success("编辑成功");
_this.queryData();
_this.cmdDialogVisible = false;
});
} else { // 新建
request({
url: '/risk-user/create',
method: 'post',
data: _this.cmd
}).then(res => {
_this.$message.success("添加成功");
_this.cmdDialogVisible = false;
});
}
}
});
}
}
}
</script>
<style lang="scss">
</style>

View File

@@ -43,6 +43,14 @@ export default new Router({
path: 'graphSpaceManage',
component: () => import('@/components/menus/GraphSpaceManage')
},
{
path: 'homePage',
component: () => import('@/components/menus/HomePage')
},
{
path: 'userManage',
component: () => import('@/components/menus/UserManage')
},
{
path: 'entrysManage',
component: () => import('@/components/menus/EntrysManage')
@@ -57,7 +65,7 @@ export default new Router({
},
{
path: '/',
redirect: "entrysManage"
redirect: "homePage"
},
]
},

View File

@@ -1,4 +1,10 @@
const menuList = [
{
index: "0",
icon: "el-icon-s-home",
name: "概览",
url: "/homePage"
},
{
index: "1",
icon: "el-icon-monitor",
@@ -11,18 +17,24 @@ const menuList = [
},
{
index: "2",
icon: "el-icon-s-custom",
name: "用户管理",
url: "/userManage"
},
{
index: "3",
icon: "el-icon-collection",
name: "条目管理",
url: "/entrysManage"
},
{
index: "3",
index: "4",
icon: "el-icon-headset",
name: "反馈类型管理",
url: "/feedbackTypeManage"
},
{
index: "4",
index: "5",
icon: "el-icon-s-opportunity",
name: "智能推荐",
url: "/intelligenceRecommend"

View File

@@ -3,8 +3,8 @@ import {MessageBox, Message} from 'element-ui'
import store from '@/store'
import {getToken} from '@/utils/auth'
var _baseURL = "http://localhost:4026";
// var _baseURL = "http://118.31.22.243/api/";
// var _baseURL = "http://localhost:4026";
var _baseURL = "http://139.9.106.207:4026";
var _fileURL = "http://118.31.22.243:80/web/";
// create an axios instance
const service = axios.create({

View File

@@ -52,7 +52,7 @@ export default {
menuList: [],
info: {},
activeIndex: '',
permission: ['1', '1-1', '1-2', '1-3', '2', '2-1', '2-2', '21', '21-1', '21-2', '22', '23', '24',
permission: ['0','1', '1-1', '1-2', '1-3', '2', '2-1', '2-2', '21', '21-1', '21-2', '22', '23', '24',
'3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '16-1', '16-2', '16-3', '16-4', '16-5', '16-6'],
}
},