Commit ab5bc092 authored by rencs's avatar rencs

1.19 css

parent c2797cde
...@@ -5,89 +5,91 @@ ...@@ -5,89 +5,91 @@
</template> </template>
<script> <script>
export default{ export default {
name: 'APP', name: "APP",
// 监听,当路由发生变化的时候执行 // 监听,当路由发生变化的时候执行
watch: { watch: {
$route: { $route: {
handler: function(val, oldVal) { handler: function (val, oldVal) {},
},
// 深度观察监听 // 深度观察监听
deep: true deep: true,
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
@import './styles/index.scss'; // 全局自定义的css样式 @import "./styles/index.scss"; // 全局自定义的css样式
body .el-table th.gutter{ body .el-table th.gutter {
display: table-cell!important; display: table-cell !important;
} }
@font-face { @font-face {
font-family: 'iconfont'; /* project id 1739211 */ font-family: "iconfont"; /* project id 1739211 */
src: url('//at.alicdn.com/t/font_1739211_q2limaqw3k.eot'); src: url("//at.alicdn.com/t/font_1739211_q2limaqw3k.eot");
src: url('//at.alicdn.com/t/font_1739211_q2limaqw3k.eot?#iefix') format('embedded-opentype'), src: url("//at.alicdn.com/t/font_1739211_q2limaqw3k.eot?#iefix")
url('//at.alicdn.com/t/font_1739211_q2limaqw3k.woff2') format('woff2'), format("embedded-opentype"),
url('//at.alicdn.com/t/font_1739211_q2limaqw3k.woff') format('woff'), url("//at.alicdn.com/t/font_1739211_q2limaqw3k.woff2") format("woff2"),
url('//at.alicdn.com/t/font_1739211_q2limaqw3k.ttf') format('truetype'), url("//at.alicdn.com/t/font_1739211_q2limaqw3k.woff") format("woff"),
url('//at.alicdn.com/t/font_1739211_q2limaqw3k.svg#iconfont') format('svg'); url("//at.alicdn.com/t/font_1739211_q2limaqw3k.ttf") format("truetype"),
} url("//at.alicdn.com/t/font_1739211_q2limaqw3k.svg#iconfont") format("svg");
.iconfont{ }
font-family:"iconfont" !important; .iconfont {
font-size:16px;font-style:normal; font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-text-stroke-width: 0.2px; -webkit-text-stroke-width: 0.2px;
-moz-osx-font-smoothing: grayscale;} -moz-osx-font-smoothing: grayscale;
i.focus-i:hover{ }
i.focus-i:hover {
cursor: pointer; cursor: pointer;
} }
.flex-aic{ .flex-aic {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.flex-wrap{ .flex-wrap {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.flex-aic-jcb{ .flex-aic-jcb {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.flex-aic-jcc{ .flex-aic-jcc {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.el-button--primary.is-plain{ .el-button--primary.is-plain {
color: #516FCD !important; color: #516fcd !important;
border: 0.5px solid #82AAF9 !important; border: 0.5px solid #82aaf9 !important;
background: #E4ECFC !important; background: #e4ecfc !important;
} }
.filter-container .el-form--inline .el-form-item{ .filter-container .el-form--inline .el-form-item {
margin-bottom: 10px; margin-bottom: 10px;
} }
.xiajia{ .xiajia {
color:#58CB73; color: #58cb73;
font-size: 14px; font-size: 14px;
} }
.default-btn-text{
color: #5178F2; .default-btn-text {
color: #5178f2;
font-size: 14px; font-size: 14px;
} }
.el-radio__input.is-checked .el-radio__inner{ .el-radio__input.is-checked .el-radio__inner {
background: #5178F2; background: #5178f2;
border-color: #5178F2; border-color: #5178f2;
} }
.el-radio__input.is-checked+.el-radio__label{ .el-radio__input.is-checked + .el-radio__label {
color: #5178F2; color: #5178f2;
} }
.top-title-main{ .top-title-main {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
} }
.c-top-main{ .c-top-main {
width: calc(100% - 0px); width: calc(100% - 0px);
position: absolute; position: absolute;
height: 70px; height: 70px;
...@@ -98,8 +100,8 @@ ...@@ -98,8 +100,8 @@
padding: 16px 20px; padding: 16px 20px;
border-radius: 10px 10px 0 0; border-radius: 10px 10px 0 0;
border-bottom: 0.5px solid #eee; border-bottom: 0.5px solid #eee;
} }
.goods-add-footer{ .goods-add-footer {
width: calc(100% - 0px); width: calc(100% - 0px);
position: absolute; position: absolute;
height: 76px; height: 76px;
...@@ -110,84 +112,86 @@ ...@@ -110,84 +112,86 @@
padding: 16px; padding: 16px;
border-radius: 0 0 10px 10px; border-radius: 0 0 10px 10px;
border-top: 0.5px solid #eee; border-top: 0.5px solid #eee;
box-shadow: 3px 0 6px rgba(0,0,0,0.16); box-shadow: 3px 0 6px rgba(0, 0, 0, 0.16);
} }
.goods-list-container{ .goods-list-container {
/*height: calc(100vh - 124px);*/ /*height: calc(100vh - 124px);*/
overflow: auto; overflow: auto;
} }
.add-btn-default, .el-button--primary{ .add-btn-default,
background: #5178F2 !important; .el-button--primary {
background: #5178f2 !important;
font-size: 14px; font-size: 14px;
color: #fff !important; color: #fff !important;
border: 0.5px solid #5178F2 !important; border: 0.5px solid #5178f2 !important;
} }
.ellipsis{ .ellipsis {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.select-top-title{ .select-top-title {
color: #516FCD; color: #516fcd;
font-size: 16px; font-size: 16px;
font-weight: normal; font-weight: normal;
} }
.to-link-title{ .to-link-title {
color: #666666; color: #666666;
font-size: 18px; font-size: 18px;
font-weight: normal; font-weight: normal;
} }
.to-link-title:hover{ .to-link-title:hover {
cursor: pointer; cursor: pointer;
color: #516FCD; color: #516fcd;
opacity: 0.7; opacity: 0.7;
} }
.mrt-70{ .mrt-70 {
margin-top: 70px; margin-top: 70px;
} }
.mrt-50{ .mrt-50 {
margin-top: 50px; margin-top: 50px;
} }
.ellipsis-2{ .ellipsis-2 {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
} }
.flex-aic{ .flex-aic {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.unright{ .unright {
/*background: #eee !important;*/ /*background: #eee !important;*/
opacity: 0.1; opacity: 0.1;
} }
.unright:hover{ .unright:hover {
cursor: default !important; cursor: default !important;
} }
.unrightMenu{ .unrightMenu {
color: #999 !important; color: #999 !important;
} }
.unrightMenu:hover{ .unrightMenu:hover {
cursor: default !important; cursor: default !important;
} }
.mt-70{ .mt-70 {
margin-top: 70px; margin-top: 70px;
} }
.el-date-editor .el-range-separator{ .el-date-editor .el-range-separator {
width: auto; width: auto;
} }
.clap { .clap {
.el-date-editor.el-input, .el-date-editor.el-input__inner{ .el-date-editor.el-input,
.el-date-editor.el-input__inner {
width: 160px; width: 160px;
} }
} }
</style> </style>
This diff is collapsed.
...@@ -8,22 +8,24 @@ import ElementUI from 'element-ui'; ...@@ -8,22 +8,24 @@ import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'; import 'element-ui/lib/theme-chalk/index.css';
import 'assets/custom-theme/index.css'; // 换肤版本element-ui css import 'assets/custom-theme/index.css'; // 换肤版本element-ui css
import NProgress from 'nprogress'; // Progress 进度条 import NProgress from 'nprogress'; // Progress 进度条
import 'nprogress/nprogress.css';// Progress 进度条 样式 import 'nprogress/nprogress.css'; // Progress 进度条 样式
import 'normalize.css/normalize.css';// normalize.css 样式格式化 import 'normalize.css/normalize.css'; // normalize.css 样式格式化
import 'assets/iconfont/iconfont'; // iconfont 具体图标见https://github.com/PanJiaChen/vue-element-admin/wiki import 'assets/iconfont/iconfont'; // iconfont 具体图标见https://github.com/PanJiaChen/vue-element-admin/wiki
import * as filters from './filters'; // 全局vue filter import * as filters from './filters'; // 全局vue filter
import Multiselect from 'vue-multiselect';// 使用的一个多选框组件,element-ui的select不能满足所有需求 import Multiselect from 'vue-multiselect'; // 使用的一个多选框组件,element-ui的select不能满足所有需求
import 'vue-multiselect/dist/vue-multiselect.min.css';// 多选框组件css import 'vue-multiselect/dist/vue-multiselect.min.css'; // 多选框组件css
import 'swiper/dist/css/swiper.css';// 引入swiper样式 import 'swiper/dist/css/swiper.css'; // 引入swiper样式
import Sticky from 'components/Sticky'; // 粘性header组件 import Sticky from 'components/Sticky'; // 粘性header组件
import IconSvg from 'components/Icon-svg';// svg 组件 import IconSvg from 'components/Icon-svg'; // svg 组件
import vueWaves from './directive/waves';// 水波纹指令 import vueWaves from './directive/waves'; // 水波纹指令
import errLog from 'store/errLog';// error log组件 import errLog from 'store/errLog'; // error log组件
// import './mock/index.js'; // 该项目所有请求使用mockjs模拟 // import './mock/index.js'; // 该项目所有请求使用mockjs模拟
import { getToken } from 'utils/auth'; import {
getToken
} from 'utils/auth';
import 'babel-polyfill'; // 支持IE执行原生script import 'babel-polyfill'; // 支持IE执行原生script
import XEUtils from 'xe-utils';// 加入常用工具类 import XEUtils from 'xe-utils'; // 加入常用工具类
import VXEUtils from 'vxe-utils';// 加入常用工具类 import VXEUtils from 'vxe-utils'; // 加入常用工具类
import BaiduMap from 'vue-baidu-map' import BaiduMap from 'vue-baidu-map'
import '../node_modules/echarts/map/js/china.js' // 引入中国地图数据 import '../node_modules/echarts/map/js/china.js' // 引入中国地图数据
import '../node_modules/echarts/map/js/province/aomen.js' import '../node_modules/echarts/map/js/province/aomen.js'
...@@ -92,18 +94,21 @@ Vue.use(BaiduMap, { ...@@ -92,18 +94,21 @@ Vue.use(BaiduMap, {
import infiniteScroll from 'vue-infinite-scroll' import infiniteScroll from 'vue-infinite-scroll'
Vue.use(infiniteScroll); Vue.use(infiniteScroll);
import VueImageSwipe from 'vue-image-swipe'
import 'vue-image-swipe/dist/vue-image-swipe.css'
Vue.use(VueImageSwipe)
//只能输入正整数 //只能输入正整数
Vue.directive('enterNumber', { Vue.directive('enterNumber', {
inserted: function (el) { inserted: function (el) {
el.addEventListener("keypress",function(e){ el.addEventListener("keypress", function (e) {
e = e || window.event; e = e || window.event;
let charcode = typeof e.charCode == 'number' ? e.charCode : e.keyCode; let charcode = typeof e.charCode == 'number' ? e.charCode : e.keyCode;
let re = /\d/; let re = /\d/;
if(!re.test(String.fromCharCode(charcode)) && charcode > 9 && !e.ctrlKey){ if (!re.test(String.fromCharCode(charcode)) && charcode > 9 && !e.ctrlKey) {
if(e.preventDefault){ if (e.preventDefault) {
e.preventDefault(); e.preventDefault();
}else{ } else {
e.returnValue = false; e.returnValue = false;
} }
} }
...@@ -112,14 +117,14 @@ Vue.directive('enterNumber', { ...@@ -112,14 +117,14 @@ Vue.directive('enterNumber', {
}); });
Vue.directive('isNumber', { Vue.directive('isNumber', {
inserted: function (el) { inserted: function (el) {
el.addEventListener("keypress",function(e){ el.addEventListener("keypress", function (e) {
e = e || window.event; e = e || window.event;
let charcode = typeof e.charCode == 'number' ? e.charCode : e.keyCode; let charcode = typeof e.charCode == 'number' ? e.charCode : e.keyCode;
let re = /\d/; let re = /\d/;
if(!re.test(String.fromCharCode(charcode)) && charcode > 9 && !e.ctrlKey){ if (!re.test(String.fromCharCode(charcode)) && charcode > 9 && !e.ctrlKey) {
if(e.preventDefault){ if (e.preventDefault) {
e.preventDefault(); e.preventDefault();
}else{ } else {
e.returnValue = false; e.returnValue = false;
} }
} }
...@@ -133,12 +138,14 @@ Object.keys(filters).forEach(key => { ...@@ -133,12 +138,14 @@ Object.keys(filters).forEach(key => {
}); });
// register global progress. // register global progress.
const whiteList = ['/login', '/authredirect', '/map', '/stockCrowd', '/stockCrowdDetail', '/companyInfo', '/provinceMap', '/campsite','/companyDetail'];// 不重定向白名单 const whiteList = ['/login', '/authredirect', '/map', '/stockCrowd', '/stockCrowdDetail', '/companyInfo', '/provinceMap', '/campsite', '/companyDetail']; // 不重定向白名单
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
NProgress.start(); // 开启Progress NProgress.start(); // 开启Progress
if (getToken()) { // 判断是否有token if (getToken()) { // 判断是否有token
if (to.path === '/login') { if (to.path === '/login') {
next({ path: '/' }); next({
path: '/'
});
} else { } else {
if (store.getters.menus === undefined) { // 判断当前用户是否已拉取完user_info信息 if (store.getters.menus === undefined) { // 判断当前用户是否已拉取完user_info信息
store.dispatch('GetInfo').then(info => { // 拉取user_info store.dispatch('GetInfo').then(info => { // 拉取user_info
...@@ -148,11 +155,15 @@ router.beforeEach((to, from, next) => { ...@@ -148,11 +155,15 @@ router.beforeEach((to, from, next) => {
} }
store.dispatch('GenerateRoutes', menus).then(() => { // 生成可访问的路由表 store.dispatch('GenerateRoutes', menus).then(() => { // 生成可访问的路由表
router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表 router.addRoutes(store.getters.addRouters) // 动态添加可访问路由表
next({ ...to }); // hack方法 确保addRoutes已完成 next({
...to
}); // hack方法 确保addRoutes已完成
}) })
}).catch(() => { }).catch(() => {
store.dispatch('FedLogOut').then(() => { store.dispatch('FedLogOut').then(() => {
next({ path: '/login' }); next({
path: '/login'
});
}) })
}) })
} else { } else {
...@@ -184,7 +195,7 @@ Vue.config.productionTip = false; ...@@ -184,7 +195,7 @@ Vue.config.productionTip = false;
// 生产环境错误日志 // 生产环境错误日志
if (process.env.NODE_ENV === 'production') { if (process.env.NODE_ENV === 'production') {
Vue.config.errorHandler = function(err, vm) { Vue.config.errorHandler = function (err, vm) {
console.log(err, window.location.href); console.log(err, window.location.href);
errLog.pushLog({ errLog.pushLog({
err, err,
...@@ -199,7 +210,9 @@ new Vue({ ...@@ -199,7 +210,9 @@ new Vue({
router, router,
store, store,
template: '<App/>', template: '<App/>',
components: { App } components: {
App
}
}) })
const Bus = new Vue() const Bus = new Vue()
......
This diff is collapsed.
...@@ -77,6 +77,7 @@ ...@@ -77,6 +77,7 @@
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination <el-pagination
style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :current-page.sync="listQuery.page"
...@@ -87,7 +88,11 @@ ...@@ -87,7 +88,11 @@
> >
</el-pagination> </el-pagination>
</div> </div>
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible"> <el-dialog
:title="textMap[dialogStatus]"
width="30%"
:visible.sync="dialogFormVisible"
>
<el-form :model="form" :rules="rules" ref="form" label-width="100px"> <el-form :model="form" :rules="rules" ref="form" label-width="100px">
<el-form-item label="角色名称" prop="name"> <el-form-item label="角色名称" prop="name">
<el-input v-model="form.name" placeholder="请输入角色名称"></el-input> <el-input v-model="form.name" placeholder="请输入角色名称"></el-input>
......
This diff is collapsed.
This diff is collapsed.
...@@ -44,8 +44,10 @@ ...@@ -44,8 +44,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-button type="primary" @click="search">搜索</el-button> <el-button type="primary" plain @click="search" icon="el-icon-search"
<el-button type="info" @click="clear">清除搜索</el-button> >搜索</el-button
>
<el-button type="primary" plain @click="clear">清除搜索</el-button>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
...@@ -74,7 +76,7 @@ ...@@ -74,7 +76,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
style="margin-top: 20px" style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="listQuery.page" :current-page="listQuery.page"
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
style="margin-top: 20px" style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="listQuery.page" :current-page="listQuery.page"
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
style="margin-top: 20px" style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="listQuery.page" :current-page="listQuery.page"
......
This diff is collapsed.
This diff is collapsed.
...@@ -7,37 +7,53 @@ ...@@ -7,37 +7,53 @@
<!-- 主体 --> <!-- 主体 -->
<div class="app-container calendar-list-container"> <div class="app-container calendar-list-container">
<!-- 数据列表 --> <!-- 数据列表 -->
<el-table :data="list" v-loading.body="listLoading" border fit highlight-current-row style="width: 100%"> <el-table
:data="list"
v-loading.body="listLoading"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column align="center" label="用户ID" width="120"> <el-table-column align="center" label="用户ID" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.userId}} {{ scope.row.userId }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="姓名" prop="name"></el-table-column> <el-table-column
<el-table-column align="center" label="电话" prop="phone"></el-table-column> align="center"
label="姓名"
prop="name"
></el-table-column>
<el-table-column
align="center"
label="电话"
prop="phone"
></el-table-column>
<el-table-column align="center" label="创建时间"> <el-table-column align="center" label="创建时间">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.crtTime}} {{ scope.row.crtTime }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="内容"> <el-table-column align="center" label="内容">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.content}} {{ scope.row.content }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="回复内容"> <el-table-column align="center" label="回复内容">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.responseInfo}} {{ scope.row.responseInfo }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作"> <el-table-column align="center" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="!scope.row.responseInfo" v-if="!scope.row.responseInfo"
size="small" type="text"
class="el-button el-button--text el-button--small" class="el-button el-button--text el-button--small"
@click="handleDeal(scope.row)" @click="handleDeal(scope.row)"
>回复</el-button> >回复</el-button
>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column align="center" label="状态">--> <!-- <el-table-column align="center" label="状态">-->
...@@ -48,35 +64,52 @@ ...@@ -48,35 +64,52 @@
<!-- </el-table-column>--> <!-- </el-table-column>-->
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" style="text-align: center"
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination> @size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="listQuery.page"
:page-sizes="[10, 20, 30, 50]"
:page-size="listQuery.limit"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</div> </div>
</div> </div>
<!-- 回复 --> <!-- 回复 -->
<deal-dialog v-if="dealVisible" :one-row="oneRow" v-on:dealEvent="dealEvent"></deal-dialog> <deal-dialog
v-if="dealVisible"
:one-row="oneRow"
v-on:dealEvent="dealEvent"
></deal-dialog>
</div> </div>
</template> </template>
<script type="javascript"> <script type="javascript">
import dealDialog from "./dealDialog"; import dealDialog from "./dealDialog";
import { feedbackInfoList } from 'api/userManagement/index' import { feedbackInfoList } from "api/userManagement/index";
import {timestamp2Date} from '@/utils/dateUtils'; import { timestamp2Date } from "@/utils/dateUtils";
export default { export default {
name: 'userManagement', name: "userManagement",
components: { components: {
dealDialog dealDialog,
}, },
computed:{ computed: {
getStatus(status) { getStatus(status) {
return (status) => { return (status) => {
let a = "" let a = "";
switch(status) { switch (status) {
case 0: a = '启用'; break; case 0:
case 1: a = '禁用'; break; a = "启用";
default: a = '未知';break break;
} case 1:
return a a = "禁用";
break;
default:
a = "未知";
break;
} }
return a;
};
}, },
}, },
data() { data() {
...@@ -88,99 +121,104 @@ ...@@ -88,99 +121,104 @@
listQuery: { listQuery: {
page: 1, page: 1,
limit: 20, limit: 20,
type: 2 //1、联系客服,2、意见反馈,3、订单反馈 type: 2, //1、联系客服,2、意见反馈,3、订单反馈
}, },
oneRow: {}, // 当前操作项 oneRow: {}, // 当前操作项
dealVisible: false, // 回复弹窗 dealVisible: false, // 回复弹窗
invoiceDialogVisible: false, // 查看发票弹窗 invoiceDialogVisible: false, // 查看发票弹窗
addressDialogVisible: false // 查看地址弹窗 addressDialogVisible: false, // 查看地址弹窗
} };
}, },
created() { created() {
this.getList() this.getList();
}, },
methods:{ methods: {
/** /**
* 搜索 * 搜索
*/ */
handleSearch(){ handleSearch() {
this.listQuery.page = 1 this.listQuery.page = 1;
this.getList() // 获取用户列表 this.getList(); // 获取用户列表
}, },
/** /**
* 查看发票-返回界面 * 查看发票-返回界面
*/ */
invoiceEvent(){ invoiceEvent() {
this.invoiceDialogVisible = false this.invoiceDialogVisible = false;
}, },
/** /**
* 查看地址-返回界面 * 查看地址-返回界面
*/ */
addressEvent(){ addressEvent() {
this.addressDialogVisible = false this.addressDialogVisible = false;
}, },
/** /**
* 启用、禁用 * 启用、禁用
*/ */
changeStatus(row){ changeStatus(row) {
this.$confirm("是否继续?", "提示", { this.$confirm("是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
}).then(() => { })
.then(() => {
// 0、启用,1、禁用 // 0、启用,1、禁用
updateStatus({id: row.userId, status: row.status == 1?0:1}).then((response) => { updateStatus({
if(response.status == 200){ id: row.userId,
status: row.status == 1 ? 0 : 1,
}).then((response) => {
if (response.status == 200) {
this.$notify({ this.$notify({
title: "成功", title: "成功",
message: "操作成功", message: "操作成功",
type: "success", type: "success",
duration: 2000 duration: 2000,
}); });
this.getList() this.getList();
} else { } else {
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: response.message, message: response.message,
type: 'error', type: "error",
duration: 2000 duration: 2000,
}) });
} }
}); });
}).catch(()=>{}) })
.catch(() => {});
}, },
/** /**
* 查看发票 * 查看发票
*/ */
handleInvoice(){ handleInvoice() {
this.invoiceDialogVisible = true this.invoiceDialogVisible = true;
}, },
/** /**
* 查看地址 * 查看地址
*/ */
handleAddress(){ handleAddress() {
this.addressDialogVisible = true this.addressDialogVisible = true;
}, },
/** /**
* 回复 * 回复
*/ */
handleDeal(row){ handleDeal(row) {
this.oneRow = row this.oneRow = row;
this.dealVisible = true this.dealVisible = true;
}, },
/** /**
* 回复-返回 * 回复-返回
*/ */
dealEvent(e){ dealEvent(e) {
this.dealVisible = false this.dealVisible = false;
if(e){ if (e) {
this.getList() this.getList();
} }
}, },
/** /**
* 清除搜索 * 清除搜索
*/ */
handleCleanSearch(){ handleCleanSearch() {
this.listQuery = { this.listQuery = {
page: 1, page: 1,
limit: 20, limit: 20,
...@@ -189,34 +227,34 @@ ...@@ -189,34 +227,34 @@
userId: undefined, // 用户id userId: undefined, // 用户id
status: undefined, // 0:启用 1:禁用 status: undefined, // 0:启用 1:禁用
registrationTimeBegin: undefined, // 开始时间 registrationTimeBegin: undefined, // 开始时间
registrationTimeEnd: undefined // 结束时间 registrationTimeEnd: undefined, // 结束时间
} };
this.times = [] this.times = [];
this.getList() // 获取用户列表 this.getList(); // 获取用户列表
}, },
/** /**
* 获取用户列表 * 获取用户列表
*/ */
getList(){ getList() {
this.listLoading = true this.listLoading = true;
feedbackInfoList(this.listQuery).then(response => { feedbackInfoList(this.listQuery).then((response) => {
if(response.status == 200){ if (response.status == 200) {
response.data.data.map(function(item){ response.data.data.map(function (item) {
item.crtTimeStr = timestamp2Date(item.createTime); item.crtTimeStr = timestamp2Date(item.createTime);
}) });
this.list = response.data.data; this.list = response.data.data;
this.total = response.data.totalCount; this.total = response.data.totalCount;
this.listLoading = false; this.listLoading = false;
} else { } else {
this.listLoading = false this.listLoading = false;
this.$notify({ this.$notify({
title: '失败', title: "失败",
message: response.message, message: response.message,
type: 'error', type: "error",
duration: 2000 duration: 2000,
}) });
} }
}) });
}, },
handleSizeChange(val) { handleSizeChange(val) {
this.listQuery.limit = val; this.listQuery.limit = val;
...@@ -225,12 +263,12 @@ ...@@ -225,12 +263,12 @@
handleCurrentChange(val) { handleCurrentChange(val) {
this.listQuery.page = val; this.listQuery.page = val;
this.getList(); this.getList();
} },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.user-list { .user-list {
.head { .head {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -240,5 +278,5 @@ ...@@ -240,5 +278,5 @@
border-bottom: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6;
height: 57px; height: 57px;
} }
} }
</style> </style>
<template> <template>
<div class="main"> <div class="main">
<div> <div>
<el-form ref="form"> <el-form ref="form" :inline="true" label-width="100px">
<el-row> <el-form-item label="需求类型">
<el-col :span="6"
><el-form-item label="需求类型">
<el-select v-model="listQuery.type" placeholder="请选择需求类型"> <el-select v-model="listQuery.type" placeholder="请选择需求类型">
<el-option label="全部" :value="''"></el-option> <el-option label="全部" :value="''"></el-option>
<el-option label="编程需求" :value="1"></el-option> <el-option label="编程需求" :value="1"></el-option>
<el-option label="专题应用需求" :value="2"></el-option> <el-option label="专题应用需求" :value="2"></el-option>
<el-option label="影像图需求" :value="3"></el-option> <el-option label="影像图需求" :value="3"></el-option>
</el-select> </el-form-item </el-select>
></el-col> </el-form-item>
<el-col :span="6"
><el-form-item label="需求状态"> <el-form-item label="需求状态">
<el-select <el-select
v-model="listQuery.auditStatus" v-model="listQuery.auditStatus"
placeholder="请选择需求状态" placeholder="请选择需求状态"
...@@ -21,13 +19,13 @@ ...@@ -21,13 +19,13 @@
<el-option label="全部" :value="''"></el-option> <el-option label="全部" :value="''"></el-option>
<el-option label="待处理" :value="1"></el-option> <el-option label="待处理" :value="1"></el-option>
<el-option label="已生成订单" :value="2"></el-option> <el-option label="已生成订单" :value="2"></el-option>
</el-select> </el-form-item </el-select>
></el-col> </el-form-item>
<el-col :span="6">
<el-button type="primary" @click="search">搜索</el-button> <el-button type="primary" @click="search" plain icon="el-icon-search"
<el-button type="info" @click="clear">清除搜索</el-button> >搜索</el-button
</el-col> >
</el-row> <el-button type="primary" plain @click="clear">清除搜索</el-button>
</el-form> </el-form>
<div class="orderItem" v-for="(item, idx) in tableData" :key="idx"> <div class="orderItem" v-for="(item, idx) in tableData" :key="idx">
<div class="itemTop">提交时间:{{ item.crtTimeStr }}</div> <div class="itemTop">提交时间:{{ item.crtTimeStr }}</div>
...@@ -86,7 +84,7 @@ ...@@ -86,7 +84,7 @@
</div> </div>
</div> </div>
<el-pagination <el-pagination
style="margin-top: 20px" style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="listQuery.page" :current-page="listQuery.page"
......
...@@ -55,7 +55,11 @@ ...@@ -55,7 +55,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" plain @click="handleSearch" <el-button
type="primary"
plain
@click="handleSearch"
icon="el-icon-search"
>搜索</el-button >搜索</el-button
> >
<el-button type="primary" plain @click="handleCleanSearch" <el-button type="primary" plain @click="handleCleanSearch"
...@@ -92,9 +96,14 @@ ...@@ -92,9 +96,14 @@
<el-table-column align="center" label="头像"> <el-table-column align="center" label="头像">
<template slot-scope="scope"> <template slot-scope="scope">
<el-image <el-image
style="width: 40px; height: 40px; border-radius: 50%" style="
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
"
:src="scope.row.headimgurl" :src="scope.row.headimgurl"
:preview-src-list="[scope.row.headimgurl]" @click="preview(scope.row.headimgurl)"
></el-image> ></el-image>
<!-- <img style="width: 40px;height: 40px;border-radius: 50%;" :src="scope.row.headimgurl" @click.stop="showPreview(scope.row.headimgurl)"/>--> <!-- <img style="width: 40px;height: 40px;border-radius: 50%;" :src="scope.row.headimgurl" @click.stop="showPreview(scope.row.headimgurl)"/>-->
</template> </template>
...@@ -112,29 +121,21 @@ ...@@ -112,29 +121,21 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="300"> <el-table-column align="center" label="操作" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button type="text" @click="handleInvoice(scope.row)"
type="primary"
size="mini"
@click="handleInvoice(scope.row)"
>查看发票</el-button >查看发票</el-button
> >
<el-button <el-button type="text" @click="handleAddress(scope.row)"
type="primary"
size="mini"
@click="handleAddress(scope.row)"
>查看地址</el-button >查看地址</el-button
> >
<el-button <el-button type="text" @click="changeStatus(scope.row)">{{
:type="scope.row.status === 1 ? 'info' : 'warning'" scope.row.status === 0 ? "禁用" : "启用"
size="mini" }}</el-button>
@click="changeStatus(scope.row)"
>{{ scope.row.status === 0 ? "禁用" : "启用" }}</el-button
>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination <el-pagination
style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :current-page.sync="listQuery.page"
...@@ -214,6 +215,13 @@ export default { ...@@ -214,6 +215,13 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
preview(src) {
let imgs = [src];
this.$imagePreview({
images: imgs,
index: 0,
});
},
/** /**
* 搜索 * 搜索
*/ */
......
...@@ -210,6 +210,7 @@ ...@@ -210,6 +210,7 @@
</div> </div>
<div class="typePagination"> <div class="typePagination">
<el-pagination <el-pagination
style="text-align: center"
@size-change="changeHandleSize" @size-change="changeHandleSize"
@current-change="changeHandleCurrent" @current-change="changeHandleCurrent"
:current-page.sync="typePagination.currentPage" :current-page.sync="typePagination.currentPage"
......
...@@ -197,6 +197,7 @@ ...@@ -197,6 +197,7 @@
</div> </div>
<div class="pagination"> <div class="pagination">
<el-pagination <el-pagination
style="text-align: center"
@size-change="changeHandleSize" @size-change="changeHandleSize"
@current-change="changeHandleCurrent" @current-change="changeHandleCurrent"
:current-page.sync="pagination.currentPage" :current-page.sync="pagination.currentPage"
......
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