2020/12/31
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 27 KiB |
@ -34,6 +34,9 @@ public class HSController {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
HSService hsService;
|
HSService hsService;
|
||||||
|
/**文件路径*/
|
||||||
|
@Value("${filePath}")
|
||||||
|
private String filesPath;
|
||||||
|
|
||||||
/**登录验证*/
|
/**登录验证*/
|
||||||
@RequestMapping(value = "/login", method = {RequestMethod.POST, RequestMethod.GET})
|
@RequestMapping(value = "/login", method = {RequestMethod.POST, RequestMethod.GET})
|
||||||
@ -477,4 +480,41 @@ public class HSController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 以流的形式写照片
|
||||||
|
*
|
||||||
|
* @param response
|
||||||
|
* @throws FileNotFoundException
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
@RequestMapping("/showImg/{fileName}")
|
||||||
|
private void responPhoto(HttpServletResponse response, @PathVariable(value = "fileName") String fileName) throws IOException {
|
||||||
|
String filePath = filesPath + "\\" + fileName;
|
||||||
|
File imageFile = new File(filePath);
|
||||||
|
if (imageFile.exists()) {
|
||||||
|
FileInputStream fis = null;
|
||||||
|
OutputStream os = null;
|
||||||
|
try {
|
||||||
|
fis = new FileInputStream(imageFile);
|
||||||
|
os = response.getOutputStream();
|
||||||
|
int count = 0;
|
||||||
|
byte[] buffer = new byte[1024 * 8];
|
||||||
|
while ((count = fis.read(buffer)) != -1) {
|
||||||
|
os.write(buffer, 0, count);
|
||||||
|
os.flush();
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
fis.close();
|
||||||
|
os.close();
|
||||||
|
} catch (IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,11 +27,11 @@ public class SaticScheduleTask {
|
|||||||
/**
|
/**
|
||||||
* 3.添加定时任务
|
* 3.添加定时任务
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "0/5 * * * * ?")
|
/*@Scheduled(cron = "0/5 * * * * ?")*/
|
||||||
/**
|
/**
|
||||||
* 或直接指定时间间隔,例如:5秒
|
* 或直接指定时间间隔,例如:5秒
|
||||||
*/
|
*/
|
||||||
/*@Scheduled(fixedRate=5000)*/
|
@Scheduled(fixedRate = 120000)
|
||||||
|
|
||||||
private void configureTasks() {
|
private void configureTasks() {
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
@ -12,12 +12,13 @@ logging:
|
|||||||
##数据源
|
##数据源
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:mysql://127.0.0.1:3306/hslink?serverTimezone=Hongkong&useUnicode=true&characterEncoding=utf8
|
# url: jdbc:mysql://127.0.0.1:3306/hslink?serverTimezone=Hongkong&useUnicode=true&characterEncoding=utf8
|
||||||
|
url: jdbc:mysql://106.53.113.158:3306/hslink?serverTimezone=Hongkong&useUnicode=true&characterEncoding=utf8
|
||||||
username: root
|
username: root
|
||||||
password: 123456
|
password: Beater123
|
||||||
db-name: hslink
|
db-name: hslink
|
||||||
filters: log4j,wall,mergeStat
|
filters: log4j,wall,mergeStat
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
|
|
||||||
##文件保存路径
|
##文件保存路径
|
||||||
filePath: D:\office\phy\HSLink\HSLink-front\src\assets\file
|
filePath: ${user.dir}\src\main\static\files
|
||||||
|
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 78 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 112 KiB |
After Width: | Height: | Size: 99 KiB |
After Width: | Height: | Size: 207 KiB |
@ -6,7 +6,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'App'
|
name: 'App',
|
||||||
|
mounted() {
|
||||||
|
const url = `http://192.168.10.207:8048`;
|
||||||
|
sessionStorage.setItem('url', url);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
// 配置API接口地址
|
// 配置API接口地址
|
||||||
import de from "element-ui/src/locale/lang/de";
|
import de from "element-ui/src/locale/lang/de";
|
||||||
|
|
||||||
// let root = 'http://192.168.10.29:8048'
|
|
||||||
let root = 'http://106.53.113.158:8048'
|
|
||||||
// let root = 'http://127.0.0.1:8048'
|
|
||||||
// 引用axios
|
// 引用axios
|
||||||
let axios = require('axios')
|
let axios = require('axios')
|
||||||
// 自定义判断元素类型JS
|
// 自定义判断元素类型JS
|
||||||
@ -46,7 +43,7 @@ function apiAxios (method, url, params, success, failure) {
|
|||||||
url: url,
|
url: url,
|
||||||
data: method === 'POST' || method === 'PUT' ? params : null,
|
data: method === 'POST' || method === 'PUT' ? params : null,
|
||||||
params: method === 'GET' || method === 'DELETE' ? params : null,
|
params: method === 'GET' || method === 'DELETE' ? params : null,
|
||||||
baseURL: root,
|
baseURL: sessionStorage.getItem('url'),
|
||||||
withCredentials: false
|
withCredentials: false
|
||||||
})
|
})
|
||||||
.then(function (res) {
|
.then(function (res) {
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
<div class="comment-area">
|
<div class="comment-area">
|
||||||
<el-button class="message" type="primary" @click="messages">留言</el-button>
|
<el-button class="message" type="primary" @click="messages">留言</el-button>
|
||||||
<div class="comment-list">
|
<div class="comment-list">
|
||||||
<div class="comment-one" v-for="(item,index) in message">
|
<div class="comment-one" v-for="(item, index) in message" :key='index'>
|
||||||
<div class="comment-header">
|
<div class="comment-header">
|
||||||
<div class="header-photo">{{item.header_photo}}</div>
|
<div class="header-photo">{{item.header_photo}}</div>
|
||||||
<div class="name">{{item.real_name}}</div>
|
<div class="name">{{item.real_name}}</div>
|
||||||
@ -461,8 +461,10 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
.el-aside{
|
.el-aside{
|
||||||
/*margin-top: 1rem;*/
|
|
||||||
width: 14rem!important;
|
width: 14rem!important;
|
||||||
|
position: fixed;
|
||||||
|
top: 15rem;
|
||||||
|
right: 10%;
|
||||||
}
|
}
|
||||||
.el-main{
|
.el-main{
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -12,21 +12,21 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-carousel indicator-position="outside">
|
<el-carousel indicator-position="outside">
|
||||||
<el-carousel-item v-for="(item,index) in rotationPhotoList" :key="index">
|
<el-carousel-item v-for="(item,index) in rotationPhotoList" :key="index">
|
||||||
<img :src="item.fileName" height="100%" width="100%"/>
|
<img class="rotation-photo" :src='imgPath(item)'/>
|
||||||
</el-carousel-item>
|
</el-carousel-item>
|
||||||
</el-carousel>
|
</el-carousel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="bottom">
|
<div id="bottom">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<el-tabs v-model="activeName" @tab-click="" v-loading="tabLoading">
|
<el-tabs v-model="activeName" v-loading="tabLoading">
|
||||||
<el-tab-pane label="校园通知" name="first">
|
<el-tab-pane label="校园通知" name="first">
|
||||||
<div class="newest-notice module">
|
<div class="newest-notice module">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<i class="el-icon-chat-dot-square"></i> 最 新 通 知
|
<i class="el-icon-chat-dot-square"></i> 最 新 通 知
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="one theme-font-blue" v-for="item in newestNotice" :data-id="item.id" >
|
<div class="one theme-font-blue" v-for="(item, index) in newestNotice" :data-id="item.id" :key='index'>
|
||||||
<div class="type" @click="searchLabel(item.label)">
|
<div class="type" @click="searchLabel(item.label)">
|
||||||
[{{item.label}}]
|
[{{item.label}}]
|
||||||
</div>
|
</div>
|
||||||
@ -43,7 +43,7 @@
|
|||||||
<i class="el-icon-chat-line-square"></i> 优 秀 建 议
|
<i class="el-icon-chat-line-square"></i> 优 秀 建 议
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="one theme-font-blue" v-for="item in goodAdvice" :data-id="item.id">
|
<div class="one theme-font-blue" v-for="(item, index) in goodAdvice" :data-id="item.id" :key='index'>
|
||||||
<div class="type" @click="searchLabel(item.label)">[{{item.label}}]</div>
|
<div class="type" @click="searchLabel(item.label)">[{{item.label}}]</div>
|
||||||
<div class="text" @click="getContent(item.id)">{{item.title}}</div>
|
<div class="text" @click="getContent(item.id)">{{item.title}}</div>
|
||||||
<div class="release" @click="goPersonalInfo(item.user_id)">{{item.real_name}}</div>
|
<div class="release" @click="goPersonalInfo(item.user_id)">{{item.real_name}}</div>
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<i class="el-icon-chat-square"></i> 神 奇 想 法
|
<i class="el-icon-chat-square"></i> 神 奇 想 法
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="one theme-font-blue" v-for="item in magicalThinking" :data-id="item.id">
|
<div class="one theme-font-blue" v-for="(item, index) in magicalThinking" :data-id="item.id" :key='index'>
|
||||||
<div class="type" @click="searchLabel(item.label)">[{{item.label}}]</div>
|
<div class="type" @click="searchLabel(item.label)">[{{item.label}}]</div>
|
||||||
<div class="text" @click="getContent(item.id)">{{item.title}}</div>
|
<div class="text" @click="getContent(item.id)">{{item.title}}</div>
|
||||||
<div class="release" @click="goPersonalInfo(item.user_id)">{{item.real_name}}</div>
|
<div class="release" @click="goPersonalInfo(item.user_id)">{{item.real_name}}</div>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
<i class="el-icon-trophy"></i>
|
<i class="el-icon-trophy"></i>
|
||||||
优 秀 教 师
|
优 秀 教 师
|
||||||
</div>
|
</div>
|
||||||
<div class="one" v-for="item in prominentTeacher">
|
<div class="one" v-for="(item, index) in prominentTeacher" :key='index'>
|
||||||
<div class="name theme-font-blue">{{item.name}}老师</div>
|
<div class="name theme-font-blue">{{item.name}}老师</div>
|
||||||
<!-- <div class="subject theme-font-blue">数学</div>-->
|
<!-- <div class="subject theme-font-blue">数学</div>-->
|
||||||
<!-- <div class="grade theme-font-blue">2016届</div>-->
|
<!-- <div class="grade theme-font-blue">2016届</div>-->
|
||||||
@ -87,7 +87,7 @@
|
|||||||
<i class="el-icon-trophy-1"></i>
|
<i class="el-icon-trophy-1"></i>
|
||||||
三 好 学 生
|
三 好 学 生
|
||||||
</div>
|
</div>
|
||||||
<div class="one" v-for="item in meritStudent">
|
<div class="one" v-for="(item, index) in meritStudent" :key='index'>
|
||||||
<div class="name theme-font-blue">{{item.name}}同学</div>
|
<div class="name theme-font-blue">{{item.name}}同学</div>
|
||||||
<!-- <div class="grade theme-font-blue">2016届</div>-->
|
<!-- <div class="grade theme-font-blue">2016届</div>-->
|
||||||
<div class="subject theme-font-blue">{{item.class}}</div>
|
<div class="subject theme-font-blue">{{item.class}}</div>
|
||||||
@ -173,6 +173,12 @@
|
|||||||
this.getNoticeList();
|
this.getNoticeList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 图片地址
|
||||||
|
*/
|
||||||
|
imgPath(item) {
|
||||||
|
return `${sessionStorage.getItem('url')}/hs/showImg/${item.fileEncryption}`
|
||||||
|
},
|
||||||
//获取通知列表
|
//获取通知列表
|
||||||
getNoticeList() {
|
getNoticeList() {
|
||||||
this.tabLoading = true;
|
this.tabLoading = true;
|
||||||
@ -187,16 +193,7 @@
|
|||||||
getRotationPhotoList() {
|
getRotationPhotoList() {
|
||||||
this.$ajax.post('/hs/getRotationPhotoList',{},res=>{
|
this.$ajax.post('/hs/getRotationPhotoList',{},res=>{
|
||||||
console.log("轮播图列表",res);
|
console.log("轮播图列表",res);
|
||||||
this.rotationPhotoList = [];
|
this.rotationPhotoList = res.rotationPhotoList;
|
||||||
for (let i = 0; i < res.rotationPhotoList.length; i++) {
|
|
||||||
this.rotationPhotoList.push(
|
|
||||||
{
|
|
||||||
id: res.rotationPhotoList[i].id,
|
|
||||||
fileId: res.rotationPhotoList[i].fileId,
|
|
||||||
fileName: require('../assets/img/carousel/'+res.rotationPhotoList[i].fileName)},
|
|
||||||
);
|
|
||||||
}
|
|
||||||
console.log("rotationPhotoList",this.rotationPhotoList)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
searchLabel(label) {
|
searchLabel(label) {
|
||||||
@ -220,6 +217,11 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.rotation-photo{
|
||||||
|
object-fit: contain;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
.el-main{
|
.el-main{
|
||||||
padding: 0.5rem 1rem;
|
padding: 0.5rem 1rem;
|
||||||
}
|
}
|
||||||
|
@ -177,6 +177,8 @@
|
|||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: 21rem;
|
height: 21rem;
|
||||||
|
position: sticky;
|
||||||
|
top: 1rem;
|
||||||
}
|
}
|
||||||
.el-radio-group{
|
.el-radio-group{
|
||||||
margin-bottom: 0!important;
|
margin-bottom: 0!important;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
:visible.sync="dialogVisible"
|
:visible.sync="dialogVisible"
|
||||||
width="40%">
|
width="40%">
|
||||||
<div class="list">
|
<div class="list">
|
||||||
<div class="one" v-for="item in list" >
|
<div class="one" v-for="(item, index) in list" :key='index'>
|
||||||
<div class="type">[{{item.label}}]</div>
|
<div class="type">[{{item.label}}]</div>
|
||||||
<div class="text" @click="getContent(item.id)">{{item.title}}</div>
|
<div class="text" @click="getContent(item.id)">{{item.title}}</div>
|
||||||
<div class="release" @click="goPersonalInfo(item.user_id)">{{item.real_name}}</div>
|
<div class="release" @click="goPersonalInfo(item.user_id)">{{item.real_name}}</div>
|
||||||
|
@ -34,6 +34,11 @@ export default new Router({
|
|||||||
path: '/homepagemanagement',
|
path: '/homepagemanagement',
|
||||||
name: 'homepagemanagement',
|
name: 'homepagemanagement',
|
||||||
component:() => import('@/view/admin/homepageManagement/HomepageManagement')
|
component:() => import('@/view/admin/homepageManagement/HomepageManagement')
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/helpreply',
|
||||||
|
name: 'helpreply',
|
||||||
|
component:() => import('@/view/admin/helpReply/HelpReply')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -29,8 +29,7 @@
|
|||||||
<el-menu-item index="1" @click="goToHomepageManagement">首页管理</el-menu-item>
|
<el-menu-item index="1" @click="goToHomepageManagement">首页管理</el-menu-item>
|
||||||
<el-menu-item index="2" @click="goToArticleReview">文章审核</el-menu-item>
|
<el-menu-item index="2" @click="goToArticleReview">文章审核</el-menu-item>
|
||||||
<el-menu-item index="3" @click="goToPersonnelManagement">人员管理</el-menu-item>
|
<el-menu-item index="3" @click="goToPersonnelManagement">人员管理</el-menu-item>
|
||||||
<el-menu-item index="4" @click="goToHomepageManagement">注册管理</el-menu-item>
|
<el-menu-item index="5" @click="goToHelpReply">帮助答复</el-menu-item>
|
||||||
<el-menu-item index="5" @click="goToHomepageManagement">帮助答复</el-menu-item>
|
|
||||||
<el-menu-item index="6" disabled>更多···</el-menu-item>
|
<el-menu-item index="6" disabled>更多···</el-menu-item>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-aside>
|
</el-aside>
|
||||||
@ -83,6 +82,10 @@
|
|||||||
goToHomepageManagement() {
|
goToHomepageManagement() {
|
||||||
this.$router.push({name: "homepagemanagement"})
|
this.$router.push({name: "homepagemanagement"})
|
||||||
},
|
},
|
||||||
|
//跳转帮助答复
|
||||||
|
goToHelpReply() {
|
||||||
|
this.$router.push({name: "helpreply"})
|
||||||
|
},
|
||||||
timingTask(userId) {
|
timingTask(userId) {
|
||||||
this.$ajax.post("/hs/timingTask",{userId:userId},r=>{
|
this.$ajax.post("/hs/timingTask",{userId:userId},r=>{
|
||||||
console.log(r)
|
console.log(r)
|
||||||
|
25
HSLink-front/src/view/admin/helpReply/HelpReply.vue
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
<template>
|
||||||
|
<div class="page">
|
||||||
|
<h1>完善中···</h1>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return{
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 获取帮助答复列表
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
@ -1,12 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<h1>完善中···</h1>
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
|
<el-tab-pane label="轮播图管理" name="1">
|
||||||
|
<rotation-photo-management></rotation-photo-management>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="版块管理" name="2">
|
||||||
|
<registration></registration>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import rotationPhotoManagement from '@/view/admin/homepageManagement/homepageManagement/RotationPhotoManagement';
|
||||||
export default {
|
export default {
|
||||||
name: "HomepageManagement"
|
components: {
|
||||||
|
rotationPhotoManagement
|
||||||
|
},
|
||||||
|
name: "HomepageManagement",
|
||||||
|
data() {
|
||||||
|
return{
|
||||||
|
activeName: '1'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 切换tab
|
||||||
|
*/
|
||||||
|
handleClick(tab, event) {
|
||||||
|
console.log(tab, event);
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -0,0 +1,97 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="title">轮播图管理</div>
|
||||||
|
<div class="img-list">
|
||||||
|
<div class="img" v-for="(img, index) in rotationPhotoList" :key='index'>
|
||||||
|
<el-image class="rotation-photo"
|
||||||
|
:src='imgPath(img)'
|
||||||
|
:preview-src-list="srcList"
|
||||||
|
fit='scale-down'></el-image>
|
||||||
|
<i class="el-icon-circle-close delete-icon pointer" @click="deleteImg(img)"></i>
|
||||||
|
</div>
|
||||||
|
<div class="add-img pointer">
|
||||||
|
<i class="el-icon-plus"></i>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return{
|
||||||
|
//轮播图图片
|
||||||
|
rotationPhotoList: [],
|
||||||
|
//轮播图片URL列表
|
||||||
|
srcList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getRotationPhotoList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 删除图片
|
||||||
|
*/
|
||||||
|
deleteImg(img) {
|
||||||
|
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 图片地址
|
||||||
|
*/
|
||||||
|
imgPath(item) {
|
||||||
|
return `${sessionStorage.getItem('url')}/hs/showImg/${item.fileEncryption}`
|
||||||
|
},
|
||||||
|
//获取轮播图片
|
||||||
|
getRotationPhotoList() {
|
||||||
|
this.$ajax.post('/hs/getRotationPhotoList',{},res=>{
|
||||||
|
console.log("轮播图列表",res);
|
||||||
|
if (res.rotationPhotoList.length > 0) {
|
||||||
|
this.rotationPhotoList = res.rotationPhotoList;
|
||||||
|
res.rotationPhotoList.forEach(img => {
|
||||||
|
this.srcList.push(`${sessionStorage.getItem('url')}/hs/showImg/${img.fileEncryption}`)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.delete-icon{
|
||||||
|
position: absolute;
|
||||||
|
margin-left: -1rem;
|
||||||
|
margin-top: -0.4rem;
|
||||||
|
color: #ff0000;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
.img-list{
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
.add-img{
|
||||||
|
width: 10rem;
|
||||||
|
height: 10rem;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.add-img i{
|
||||||
|
font-size: 5rem;
|
||||||
|
color: #999999;
|
||||||
|
}
|
||||||
|
.img, .add-img{
|
||||||
|
border: 1px solid #999999;
|
||||||
|
margin: 0.5rem;
|
||||||
|
padding: 0.5rem;
|
||||||
|
border-radius: 0.5rem
|
||||||
|
}
|
||||||
|
.title{
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
|
.rotation-photo{
|
||||||
|
width: 10rem;
|
||||||
|
height: 10rem;
|
||||||
|
}
|
||||||
|
</style>
|
@ -12,12 +12,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import noDate from '@/components/components/NoData'
|
|
||||||
import person from '@/view/admin/personnelManagement/personnelManagement/PersonnelManagement'
|
import person from '@/view/admin/personnelManagement/personnelManagement/PersonnelManagement'
|
||||||
import registration from '@/view/admin/personnelManagement/registrationManagement/RegistrationManagement'
|
import registration from '@/view/admin/personnelManagement/registrationManagement/RegistrationManagement'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
noDate,
|
|
||||||
person,
|
person,
|
||||||
registration
|
registration
|
||||||
},
|
},
|
||||||
|
@ -16,13 +16,13 @@
|
|||||||
<div class="table-content">
|
<div class="table-content">
|
||||||
<div class="one-data" v-for="(person, index) in personList" :key="index">
|
<div class="one-data" v-for="(person, index) in personList" :key="index">
|
||||||
<div class="index box">{{index+1}}</div>
|
<div class="index box">{{index+1}}</div>
|
||||||
<div class="article-name box theme-font-blue special-text">{{person.real_name}}</div>
|
<div class="article-name box theme-font-blue special-text" @click="goPersonalInfo(person.user_id)">{{person.real_name}}</div>
|
||||||
<div class="article-type box">{{person.user_type}}</div>
|
<div class="article-type box">{{person.user_type}}</div>
|
||||||
<div class="time box theme-font-blue special-text">{{person.create_time}}</div>
|
<div class="time box theme-font-blue special-text">{{person.create_time}}</div>
|
||||||
<div class="article-type box" :class="person.frozen_state === '0' ? 'theme-font-green' : 'theme-font-red'">{{person.frozen_state === '0' ? '未冻结' : '已冻结'}}</div>
|
<div class="article-type box" :class="person.frozen_state === '0' ? 'theme-font-green' : 'theme-font-red'">{{person.frozen_state === '0' ? '未冻结' : '已冻结'}}</div>
|
||||||
<div class="function box">
|
<div class="function box">
|
||||||
<el-button type="danger" size='mini' @click="" v-if="person.frozen_state === '0'">冻结</el-button>
|
<el-button type="danger" size='mini' @click="peopleManagement(person, '1')" v-if="person.frozen_state === '0'">冻结</el-button>
|
||||||
<el-button type="success" size='mini' @click="" v-if="person.frozen_state === '1'">解冻</el-button>
|
<el-button type="success" size='mini' @click="peopleManagement(person, '0')" v-if="person.frozen_state === '1'">解冻</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="number">共{{personList.length}}条数据</div>
|
<div class="number">共{{personList.length}}条数据</div>
|
||||||
@ -51,6 +51,50 @@
|
|||||||
this.getFollowPeopleList()
|
this.getFollowPeopleList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
/**
|
||||||
|
* 冻结/解冻
|
||||||
|
* @param {Object} item
|
||||||
|
* @param {Object} operation 冻结/解冻
|
||||||
|
*/
|
||||||
|
peopleManagement(item, operating) {
|
||||||
|
const OPERATING = {
|
||||||
|
"0": "解冻",
|
||||||
|
"1": "冻结",
|
||||||
|
};
|
||||||
|
let _this = this;
|
||||||
|
_this.$confirm(`确认${OPERATING[operating]+item.real_name}?`, `${OPERATING[operating]}`, {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
}).then(() => {
|
||||||
|
this.$ajax.post('/admin/peopleManagement', {
|
||||||
|
userId: item.user_id,
|
||||||
|
operating: operating
|
||||||
|
}, res => {
|
||||||
|
console.log("人员操作结果", res);
|
||||||
|
if (res > 0) {
|
||||||
|
this.$message({
|
||||||
|
type: 'success',
|
||||||
|
message: `${OPERATING[operating]+item.real_name}成功`
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
_this.getFollowPeopleList();
|
||||||
|
}, 1000)
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
type: 'error',
|
||||||
|
message: '服务器出小差了,请稍后再试'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 查看个人主页
|
||||||
|
*/
|
||||||
|
goPersonalInfo(userId) {
|
||||||
|
this.$router.push({name: 'personalinfo'});
|
||||||
|
sessionStorage.setItem("userId",userId);
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 获取人员列表
|
* 获取人员列表
|
||||||
*/
|
*/
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div id="upload">
|
<div id="upload">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action="http://127.0.0.1:8048/hs/upload"
|
:action="url"
|
||||||
:on-preview="handlePreview"
|
:on-preview="handlePreview"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
@ -11,17 +11,23 @@
|
|||||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<div class="img">
|
<div class="img">
|
||||||
<img v-for="(item,index) in fileList" :src="item.path" height="100" width="100"/>
|
<img v-for="(item,index) in fileList" :src="item.path" height="100" width="100" :key='index'/>
|
||||||
</div>
|
</div>
|
||||||
<el-button @click="fileUpload">
|
<el-button @click="fileUpload">
|
||||||
下载
|
下载
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<img :src="imgUrl" alt="">
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
//图片地址
|
||||||
|
imgUrl: `${sessionStorage.getItem('url')}/hs/showImg/3fdc4d49-8bd4-4dc7-a8c1-50d2fa8e89f5carousel4.jpg`,
|
||||||
|
//服务器地址
|
||||||
|
url: `${sessionStorage.getItem('url')}/hs/upload`,
|
||||||
|
//文件列表
|
||||||
fileList: []
|
fileList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -34,7 +40,7 @@
|
|||||||
this.$axios(
|
this.$axios(
|
||||||
{
|
{
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: 'http://127.0.0.1:8048/hs/fileDownload',
|
url: `${sessionStorage.getItem('url')}/hs/fileDownload`,
|
||||||
params: {
|
params: {
|
||||||
fileId: '111'
|
fileId: '111'
|
||||||
},
|
},
|
||||||
|