Commit 7f81c760 authored by rencs's avatar rencs

Merge branch 'dev_ren' into 'master'

1.19 css

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