Commit ab5bc092 authored by rencs's avatar rencs

1.19 css

parent c2797cde
...@@ -5,189 +5,193 @@ ...@@ -5,189 +5,193 @@
</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;
-webkit-font-smoothing: antialiased; font-size: 16px;
-webkit-text-stroke-width: 0.2px; font-style: normal;
-moz-osx-font-smoothing: grayscale;} -webkit-font-smoothing: antialiased;
i.focus-i:hover{ -webkit-text-stroke-width: 0.2px;
cursor: pointer; -moz-osx-font-smoothing: grayscale;
} }
.flex-aic{ i.focus-i:hover {
display: flex; cursor: pointer;
align-items: center; }
} .flex-aic {
.flex-wrap{ display: flex;
display: flex; align-items: center;
flex-wrap: wrap; }
} .flex-wrap {
.flex-aic-jcb{ display: flex;
display: flex; flex-wrap: wrap;
justify-content: space-between; }
align-items: center; .flex-aic-jcb {
} display: flex;
.flex-aic-jcc{ justify-content: space-between;
display: flex; align-items: center;
justify-content: center; }
align-items: center; .flex-aic-jcc {
} display: flex;
.el-button--primary.is-plain{ justify-content: center;
color: #516FCD !important; align-items: center;
border: 0.5px solid #82AAF9 !important; }
background: #E4ECFC !important; .el-button--primary.is-plain {
} color: #516fcd !important;
.filter-container .el-form--inline .el-form-item{ border: 0.5px solid #82aaf9 !important;
margin-bottom: 10px; background: #e4ecfc !important;
} }
.xiajia{ .filter-container .el-form--inline .el-form-item {
color:#58CB73; margin-bottom: 10px;
font-size: 14px; }
} .xiajia {
.default-btn-text{ color: #58cb73;
color: #5178F2; font-size: 14px;
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{
border-bottom: 1px solid #eee;
}
.c-top-main{
width: calc(100% - 0px);
position: absolute;
height: 70px;
top: 0;
z-index: 9;
background: #fff;
left: 0;
padding: 16px 20px;
border-radius: 10px 10px 0 0;
border-bottom: 0.5px solid #eee;
}
.goods-add-footer{
width: calc(100% - 0px);
position: absolute;
height: 76px;
bottom: 0;
z-index: 999;
background: #fff;
left: 0;
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{
/*height: calc(100vh - 124px);*/
overflow: auto;
}
.add-btn-default, .el-button--primary{
background: #5178F2 !important;
font-size: 14px;
color: #fff !important;
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{ .default-btn-text {
color: #516FCD; color: #5178f2;
font-size: 16px; font-size: 14px;
font-weight: normal; }
} .el-radio__input.is-checked .el-radio__inner {
.to-link-title{ background: #5178f2;
color: #666666; border-color: #5178f2;
font-size: 18px; }
font-weight: normal; .el-radio__input.is-checked + .el-radio__label {
} color: #5178f2;
.to-link-title:hover{ }
cursor: pointer; .top-title-main {
color: #516FCD; border-bottom: 1px solid #eee;
opacity: 0.7; }
} .c-top-main {
width: calc(100% - 0px);
position: absolute;
height: 70px;
top: 0;
z-index: 9;
background: #fff;
left: 0;
padding: 16px 20px;
border-radius: 10px 10px 0 0;
border-bottom: 0.5px solid #eee;
}
.goods-add-footer {
width: calc(100% - 0px);
position: absolute;
height: 76px;
bottom: 0;
z-index: 999;
background: #fff;
left: 0;
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 {
/*height: calc(100vh - 124px);*/
overflow: auto;
}
.add-btn-default,
.el-button--primary {
background: #5178f2 !important;
font-size: 14px;
color: #fff !important;
border: 0.5px solid #5178f2 !important;
}
.ellipsis {
-webkit-box-orient: vertical;
display: -webkit-box;
-webkit-line-clamp: 1;
text-overflow: ellipsis;
overflow: hidden;
}
.mrt-70{ .select-top-title {
margin-top: 70px; color: #516fcd;
} font-size: 16px;
font-weight: normal;
}
.to-link-title {
color: #666666;
font-size: 18px;
font-weight: normal;
}
.to-link-title:hover {
cursor: pointer;
color: #516fcd;
opacity: 0.7;
}
.mrt-50{ .mrt-70 {
margin-top: 50px; margin-top: 70px;
} }
.ellipsis-2{ .mrt-50 {
-webkit-box-orient: vertical; margin-top: 50px;
display: -webkit-box; }
-webkit-line-clamp: 2;
text-overflow: ellipsis;
overflow: hidden;
}
.flex-aic{
display: flex;
align-items: center;
}
.unright{ .ellipsis-2 {
/*background: #eee !important;*/ -webkit-box-orient: vertical;
opacity: 0.1; display: -webkit-box;
} -webkit-line-clamp: 2;
.unright:hover{ text-overflow: ellipsis;
cursor: default !important; overflow: hidden;
} }
.unrightMenu{ .flex-aic {
color: #999 !important; display: flex;
} align-items: center;
.unrightMenu:hover{ }
cursor: default !important;
} .unright {
.mt-70{ /*background: #eee !important;*/
margin-top: 70px; opacity: 0.1;
} }
.el-date-editor .el-range-separator{ .unright:hover {
width: auto; cursor: default !important;
} }
.clap { .unrightMenu {
.el-date-editor.el-input, .el-date-editor.el-input__inner{ color: #999 !important;
width: 160px; }
} .unrightMenu:hover {
} cursor: default !important;
}
.mt-70 {
margin-top: 70px;
}
.el-date-editor .el-range-separator {
width: auto;
}
.clap {
.el-date-editor.el-input,
.el-date-editor.el-input__inner {
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,34 +94,37 @@ Vue.use(BaiduMap, { ...@@ -92,34 +94,37 @@ 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;
} }
} }
}); });
} }
}); });
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,22 +155,26 @@ router.beforeEach((to, from, next) => { ...@@ -148,22 +155,26 @@ 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 {
// else { // else {
// // 没有动态改变权限的需求可直接next() 删除下方权限判断 ↓ // // 没有动态改变权限的需求可直接next() 删除下方权限判断 ↓
// if (hasPermission(store.getters.roles, to.meta.role)) { // if (hasPermission(store.getters.roles, to.meta.role)) {
// next();// // next();//
// } else { // } else {
next(); next();
// } // }
// // 可删 ↑ // // 可删 ↑
} }
} }
} 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,8 +210,10 @@ new Vue({ ...@@ -199,8 +210,10 @@ new Vue({
router, router,
store, store,
template: '<App/>', template: '<App/>',
components: { App } components: {
App
}
}) })
const Bus = new Vue() const Bus = new Vue()
Vue.prototype.$bus = Bus Vue.prototype.$bus = Bus
\ No newline at end of file
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.
This diff is collapsed.
<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-select v-model="listQuery.type" placeholder="请选择需求类型">
><el-form-item label="需求类型"> <el-option label="全部" :value="''"></el-option>
<el-select v-model="listQuery.type" placeholder="请选择需求类型"> <el-option label="编程需求" :value="1"></el-option>
<el-option label="全部" :value="''"></el-option> <el-option label="专题应用需求" :value="2"></el-option>
<el-option label="编程需求" :value="1"></el-option> <el-option label="影像图需求" :value="3"></el-option>
<el-option label="专题应用需求" :value="2"></el-option> </el-select>
<el-option label="影像图需求" :value="3"></el-option> </el-form-item>
</el-select> </el-form-item
></el-col> <el-form-item label="需求状态">
<el-col :span="6" <el-select
><el-form-item label="需求状态"> v-model="listQuery.auditStatus"
<el-select placeholder="请选择需求状态"
v-model="listQuery.auditStatus" >
placeholder="请选择需求状态" <el-option label="全部" :value="''"></el-option>
> <el-option label="待处理" :value="1"></el-option>
<el-option label="全部" :value="''"></el-option> <el-option label="已生成订单" :value="2"></el-option>
<el-option label="待处理" :value="1"></el-option> </el-select>
<el-option label="已生成订单" :value="2"></el-option> </el-form-item>
</el-select> </el-form-item
></el-col> <el-button type="primary" @click="search" plain icon="el-icon-search"
<el-col :span="6"> >搜索</el-button
<el-button type="primary" @click="search">搜索</el-button> >
<el-button type="info" @click="clear">清除搜索</el-button> <el-button type="primary" plain @click="clear">清除搜索</el-button>
</el-col>
</el-row>
</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,
});
},
/** /**
* 搜索 * 搜索
*/ */
......
...@@ -34,7 +34,13 @@ ...@@ -34,7 +34,13 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<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 type="primary" plain @click="clearFilterData"
>清除搜索</el-button >清除搜索</el-button
> >
...@@ -88,19 +94,11 @@ ...@@ -88,19 +94,11 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="250"> <el-table-column align="center" label="操作" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="edit(scope.row)" <el-button type="text" @click="edit(scope.row)">编辑</el-button>
>编辑</el-button <el-button type="text" @click="changeParams(scope.row, 'status')">{{
> scope.row.status === 1 ? "下架" : "上架"
<el-button }}</el-button>
:type="scope.row.status === 1 ? 'info' : 'warning'" <el-button type="text" @click="changeParams(scope.row, 'isDel')"
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 >删除</el-button
> >
</template> </template>
...@@ -109,6 +107,7 @@ ...@@ -109,6 +107,7 @@
<div class="page-foot"> <div class="page-foot">
<el-pagination <el-pagination
style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="currentChange" @current-change="currentChange"
:current-page.sync="listQuery.page" :current-page.sync="listQuery.page"
......
...@@ -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"
......
...@@ -51,16 +51,19 @@ ...@@ -51,16 +51,19 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="controls"> <div style="margin-left: 20px">
<div <el-button
class="item" type="primary"
:icon="index == 0 ? 'el-icon-search' : ''"
plain
v-for="(item, index) in operatorControls" v-for="(item, index) in operatorControls"
:key="index" :key="index"
@click.stop="clickOperator(index)" @click.stop="clickOperator(index)"
> >
{{ item.name }} {{ item.name }}
</div> </el-button>
</div> </div>
<div class="addApp"> <div class="addApp">
<div class="add" @click.stop="addApp">新增应用</div> <div class="add" @click.stop="addApp">新增应用</div>
</div> </div>
...@@ -79,7 +82,7 @@ ...@@ -79,7 +82,7 @@
<span>{{ scope.row.index }}</span> <span>{{ scope.row.index }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="应用类别" width="200" align="center"> <el-table-column label="应用类别" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
scope.row.firstTitle scope.row.firstTitle
...@@ -101,22 +104,23 @@ ...@@ -101,22 +104,23 @@
<img <img
class="icon" class="icon"
:src="scope.row.icon.url" :src="scope.row.icon.url"
@click="showPreview(scope.row.icon)" @click="preview(scope.row.icon.url)"
/> />
<!-- @click="showPreview(scope.row.icon)" -->
</span> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="发布时间" width="150" align="center"> <el-table-column label="发布时间" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.crtTime }}</span> <span>{{ scope.row.crtTime }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" width="150" align="center"> <el-table-column label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.status == 1 ? "上架" : "下架" }}</span> <span>{{ scope.row.status == 1 ? "上架" : "下架" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="150" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span>{{scope.row.operator}}</span> --> <!-- <span>{{scope.row.operator}}</span> -->
<span> <span>
...@@ -145,6 +149,7 @@ ...@@ -145,6 +149,7 @@
</div> </div>
<div class="infoPagination" v-show="infoPagination"> <div class="infoPagination" v-show="infoPagination">
<el-pagination <el-pagination
style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page.sync="infoPagination.currentPage" :current-page.sync="infoPagination.currentPage"
...@@ -497,6 +502,13 @@ export default { ...@@ -497,6 +502,13 @@ export default {
onPreview(url) { onPreview(url) {
this.form.coverImg = url; this.form.coverImg = url;
}, },
preview(src) {
let imgs = [src];
this.$imagePreview({
images: imgs,
index: 0,
});
},
showPreview(icon) { showPreview(icon) {
this.currentIcon = icon; this.currentIcon = icon;
this.currentIcon.showPreview = true; this.currentIcon.showPreview = true;
......
...@@ -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"
...@@ -696,7 +697,7 @@ export default { ...@@ -696,7 +697,7 @@ export default {
.pagination { .pagination {
margin: 1% 1% 0 1%; margin: 1% 1% 0 1%;
width: 98%; width: 98%;
height: auto; height: auto;
} }
} }
</style> </style>
...@@ -26,7 +26,13 @@ ...@@ -26,7 +26,13 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" plain @click="search">搜索</el-button> <el-button
type="primary"
plain
@click="search"
icon="el-icon-search"
>搜索</el-button
>
<el-button type="primary" plain @click="clearFilterData" <el-button type="primary" plain @click="clearFilterData"
>清除搜索</el-button >清除搜索</el-button
> >
...@@ -57,7 +63,7 @@ ...@@ -57,7 +63,7 @@
<img <img
class="cover" class="cover"
:src="scope.row.coverImg" :src="scope.row.coverImg"
@click.stop="showPreview(scope.row.coverImg)" @click="preview(scope.row.coverImg)"
/> />
</template> </template>
</el-table-column> </el-table-column>
...@@ -78,19 +84,11 @@ ...@@ -78,19 +84,11 @@
</el-table-column> </el-table-column>
<el-table-column align="center" label="操作" width="250"> <el-table-column align="center" label="操作" width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="primary" size="mini" @click="edit(scope.row)" <el-button type="text" @click="edit(scope.row)">编辑</el-button>
>编辑</el-button <el-button type="text" @click="changeParams(scope.row, 'status')">{{
> scope.row.status === 1 ? "下架" : "上架"
<el-button }}</el-button>
:type="scope.row.status === 1 ? 'info' : 'warning'" <el-button type="text" @click="changeParams(scope.row, 'isDel')"
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 >删除</el-button
> >
</template> </template>
...@@ -104,6 +102,7 @@ ...@@ -104,6 +102,7 @@
/> />
<div class="page-foot"> <div class="page-foot">
<el-pagination <el-pagination
style="text-align: center"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="currentChange" @current-change="currentChange"
:current-page.sync="listQuery.page" :current-page.sync="listQuery.page"
...@@ -175,6 +174,13 @@ export default { ...@@ -175,6 +174,13 @@ export default {
this.getList(); this.getList();
}, },
preview(src) {
let imgs = [src];
this.$imagePreview({
images: imgs,
index: 0,
});
},
showPreview(url) { showPreview(url) {
this.currentIcon.url = url; this.currentIcon.url = url;
this.currentIcon.showPreview = true; this.currentIcon.showPreview = true;
......
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