作者 zhangFan

修改部分URL并上传全局CSS文件

... ... @@ -29,7 +29,7 @@ module.exports = {
assetsPublicPath: '/',
proxyTable: {
'/api':{
target: 'http://127.0.0.1:7003',//设置你调用的接口域名和端口号 别忘了加http
target: 'http://127.0.0.1:12343',//设置你调用的接口域名和端口号 别忘了加http
changeOrigin: true,
pathRewrite: {
'^/api': '/'//这里理解成用‘/api’代替target里面的地址,后面组件中我们掉接口时直接用api代替 比如我要调用'http://40.00.100.100:3002/user/add',直接写‘/api/user/add’即可
... ...
... ... @@ -5,13 +5,13 @@ import qs from 'qs'
Vue.prototype.$http = axios;
export const getuserMenus = params => { return axios.get(`/perm/userMenus`, { params: params }); };
export const getuserMenus = params => { return axios.get(`USER-CENTER/perm/userMenus`, { params: params }); };
export const getUserList = params => { return axios.get(`/user/list`, { params: params }); };
export const getUserList = params => { return axios.get(`USER-CENTER/user/list`, { params: params }); };
export const getUserListPage = params => { return axios({
method: 'GET',
url: `/user/list`,
url: `USER-CENTER/user/list`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
... ... @@ -21,18 +21,18 @@ export const getUserListPage = params => { return axios({
export const removeUser = params => { return axios({
method: 'DELETE',
url: `/user/del`,
url: `USER-CENTER/user/del`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})};
export const batchRemoveUser = params => { return axios.get(`/user/batchremove`, { params: params }); };
export const batchRemoveUser = params => { return axios.get(`USER-CENTER/user/batchremove`, { params: params }); };
export const editUser = params => { return axios({
method: 'PUT',
url: `/user/edit`,
url: `USER-CENTER/user/edit`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
... ... @@ -41,7 +41,7 @@ export const editUser = params => { return axios({
export const addUser = params => { return axios({
method: 'POST',
url: `/user/add`,
url: `USER-CENTER/user/add`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
... ... @@ -50,9 +50,9 @@ export const addUser = params => { return axios({
export const setUserRole = params => { return axios({
method: 'PUT',
url: `/user/roleset`,
url: `USER-CENTER/user/roleset`,
data: params,
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})};
\ No newline at end of file
})};
... ...
... ... @@ -46,7 +46,7 @@ export default {
login: data =>{
return axios({
method: 'POST', // 请求协议
url: '/login', // 请求的地址
url: 'user-center/login', // 请求的地址
data: qs.stringify(data), // post 请求的数据
timeout: 30000, // 超时时间, 单位毫秒
headers: {
... ... @@ -67,4 +67,4 @@ export default {
// headers: {},
// // axios 的配置
// config: {}
// }
\ No newline at end of file
// }
... ...
import axios from 'axios'
axios.defaults.baseURL = 'http://localhost:8082/api';
let base = axios.defaults.baseURL+'/system/log';
let base = axios.defaults.baseURL+'USER-CENTER/system/log';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ...
import axios from 'axios'
axios.defaults.baseURL = 'http://localhost:8082/api';
let base = axios.defaults.baseURL+'/perm';
let base = axios.defaults.baseURL+'USER-CENTER/perm';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ... @@ -35,4 +35,4 @@ export const add = params => { return axios({
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})};
\ No newline at end of file
})};
... ...
import axios from 'axios'
let base = '/role';
let base = 'USER-CENTER/role';
export const getList = params => { return axios.get(`${base}/list`, { params: params }); };
... ... @@ -43,4 +43,4 @@ export const updateRolePerm = params => { return axios({
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})};
\ No newline at end of file
})};
... ...
import http from './http.js'
let baseUrl = '/user'
let baseUrl = 'user-center/user'
export const getUserList = params => { return http.get(`${baseUrl}/list`, params); };
... ... @@ -13,4 +13,4 @@ export const editUser = params => { return http.put(`/user/edit`,params)};
export const addUser = params => { return http.post(`/user/add`,params)};
export const setUserRole = params => { return http.put(`/user/roleset`,params)};
\ No newline at end of file
export const setUserRole = params => { return http.put(`/user/roleset`,params)};
... ...
<template>
<el-table :data="formatData" :row-style="showRow" v-bind="$attrs">
<el-table-column type="selection" width="30" align="center"/>
<el-table-column v-if="columns.length===0" width="30" align="center">
<el-table-column type="selection" width="50" align="center"></el-table-column>
<el-table-column v-if="columns.length===0" width="40" align="center">
<template slot-scope="scope">
<span v-for="space in scope.row._level" :key="space" class="ms-tree-space"/>
<span v-if="iconShow(0,scope.row)" class="tree-ctrl" @click="toggleExpanded(scope.$index)">
... ...
... ... @@ -14,6 +14,7 @@ import rout from './routes'
import Mock from './mock'
import i18n from './lang'
import 'font-awesome/css/font-awesome.min.css'
import '@/styles/index.scss'
//定义一个全局过滤器实现日期格式化
Vue.filter('datefmt',function(input,fmtstring){
... ...
... ... @@ -7,6 +7,7 @@ import Role from './views/nav1/role.vue'
import Perm from './views/nav1/perm.vue'
import LOG from './views/nav1/Log.vue'
import PreManifest from './views/agent/PreManifest.vue'
import OrgManifest from './views/nmms/orgManifest.vue'
// import Form from './views/nav1/Form.vue'
import User from './views/nav1/user.vue'
... ... @@ -58,7 +59,7 @@ let routes = [
iconCls: 'fa fa-id-card-o',
children: [
{ path: '/pre', component: PreManifest, name: '预配' },
{ path: '/page5', component: Page5, name: '页面5' }
{ path: '/org', component: OrgManifest, name: '进港' }
]
},
{
... ... @@ -129,4 +130,4 @@ let handleMenuList = function (router,menu) {
}
export default {
routes,setUserMenus,handleMenuList,initRouters
};
\ No newline at end of file
};
... ...
@import './variables.scss';
@mixin colorBtn($color) {
background: $color;
&:hover {
color: $color;
&:before,
&:after {
background: $color;
}
}
}
.blue-btn {
@include colorBtn($blue)
}
.light-blue-btn {
@include colorBtn($light-blue)
}
.red-btn {
@include colorBtn($red)
}
.pink-btn {
@include colorBtn($pink)
}
.green-btn {
@include colorBtn($green)
}
.tiffany-btn {
@include colorBtn($tiffany)
}
.yellow-btn {
@include colorBtn($yellow)
}
.pan-btn {
font-size: 14px;
color: #fff;
padding: 14px 36px;
border-radius: 8px;
border: none;
outline: none;
transition: 600ms ease all;
position: relative;
display: inline-block;
&:hover {
background: #fff;
&:before,
&:after {
width: 100%;
transition: 600ms ease all;
}
}
&:before,
&:after {
content: '';
position: absolute;
top: 0;
right: 0;
height: 2px;
width: 0;
transition: 400ms ease all;
}
&::after {
right: inherit;
top: inherit;
left: 0;
bottom: 0;
}
}
.custom-button {
display: inline-block;
line-height: 1;
white-space: nowrap;
cursor: pointer;
background: #fff;
color: #fff;
-webkit-appearance: none;
text-align: center;
box-sizing: border-box;
outline: 0;
margin: 0;
padding: 10px 15px;
font-size: 14px;
border-radius: 4px;
}
... ...
//覆盖一些element-ui样式
.el-breadcrumb__inner,
.el-breadcrumb__inner a {
font-weight: 400 !important;
}
.el-upload {
input[type="file"] {
display: none !important;
}
}
.el-upload__input {
display: none;
}
.cell {
.el-tag {
margin-right: 0px;
}
}
.small-padding {
.cell {
padding-left: 5px;
padding-right: 5px;
}
}
.fixed-width {
.el-button--mini {
padding: 7px 10px;
width: 60px;
}
}
.status-col {
.cell {
padding: 0 10px;
text-align: center;
.el-tag {
margin-right: 0px;
}
}
}
//暂时性解决dialog 问题 https://github.com/ElemeFE/element/issues/2461
.el-dialog {
transform: none;
left: 0;
position: relative;
margin: 0 auto;
}
//文章页textarea修改样式
.article-textarea {
textarea {
padding-right: 40px;
resize: none;
border: none;
border-radius: 0px;
border-bottom: 1px solid #bfcbd9;
}
}
//element ui upload
.upload-container {
.el-upload {
width: 100%;
.el-upload-dragger {
width: 100%;
height: 200px;
}
}
}
//dropdown
.el-dropdown-menu {
a {
display: block
}
}
... ...
@import './variables.scss';
@import './mixin.scss';
@import './transition.scss';
@import './element-ui.scss';
@import './sidebar.scss';
@import './btn.scss';
body {
height: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
}
label {
font-weight: 700;
}
html {
height: 100%;
box-sizing: border-box;
}
#app {
height: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
.no-padding {
padding: 0px !important;
}
.padding-content {
padding: 4px 0;
}
a:focus,
a:active {
outline: none;
}
a,
a:focus,
a:hover {
cursor: pointer;
color: inherit;
text-decoration: none;
}
div:focus {
outline: none;
}
.fr {
float: right;
}
.fl {
float: left;
}
.pr-5 {
padding-right: 5px;
}
.pl-5 {
padding-left: 5px;
}
.block {
display: block;
}
.pointer {
cursor: pointer;
}
.inlineBlock {
display: block;
}
.clearfix {
&:after {
visibility: hidden;
display: block;
font-size: 0;
content: " ";
clear: both;
height: 0;
}
}
code {
background: #eef1f6;
padding: 15px 16px;
margin-bottom: 20px;
display: block;
line-height: 36px;
font-size: 15px;
font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
a {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
}
.warn-content {
background: rgba(66, 185, 131, .1);
border-radius: 2px;
padding: 16px;
padding: 1rem;
line-height: 1.6rem;
word-spacing: .05rem;
a {
color: #42b983;
font-weight: 600;
}
}
//main-container全局样式
.app-container {
padding: 20px;
}
.components-container {
margin: 30px 50px;
position: relative;
}
.pagination-container {
margin-top: 30px;
}
.text-center {
text-align: center
}
.sub-navbar {
height: 50px;
line-height: 50px;
position: relative;
width: 100%;
text-align: right;
padding-right: 20px;
transition: 600ms ease position;
background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
.subtitle {
font-size: 20px;
color: #fff;
}
&.draft {
background: #d0d0d0;
}
&.deleted {
background: #d0d0d0;
}
}
.link-type,
.link-type:focus {
color: #337ab7;
cursor: pointer;
&:hover {
color: rgb(32, 160, 255);
}
}
.filter-container {
padding-bottom: 10px;
.filter-item {
display: inline-block;
vertical-align: middle;
margin-bottom: 10px;
}
}
//refine vue-multiselect plugin
.multiselect {
line-height: 16px;
}
.multiselect--active {
z-index: 1000 !important;
}
... ...
@mixin clearfix {
&:after {
content: "";
display: table;
clear: both;
}
}
@mixin scrollBar {
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
@mixin relative {
position: relative;
width: 100%;
height: 100%;
}
@mixin pct($pct) {
width: #{$pct};
position: relative;
margin: 0 auto;
}
@mixin triangle($width, $height, $color, $direction) {
$width: $width/2;
$color-border-style: $height solid $color;
$transparent-border-style: $width solid transparent;
height: 0;
width: 0;
@if $direction==up {
border-bottom: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
}
@else if $direction==right {
border-left: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
@else if $direction==down {
border-top: $color-border-style;
border-left: $transparent-border-style;
border-right: $transparent-border-style;
}
@else if $direction==left {
border-right: $color-border-style;
border-top: $transparent-border-style;
border-bottom: $transparent-border-style;
}
}
... ...
#app {
// 主体区域 Main container
.main-container {
min-height: 100%;
transition: margin-left .28s;
margin-left: $sideBarWidth;
position: relative;
}
// 侧边栏 Sidebar container
.sidebar-container {
transition: width 0.28s;
width: $sideBarWidth !important;
height: 100%;
position: fixed;
font-size: 0px;
top: 0;
bottom: 0;
left: 0;
z-index: 1001;
overflow: hidden;
//reset element-ui css
.horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
}
.scrollbar-wrapper {
overflow-x: hidden !important;
.el-scrollbar__view {
height: 100%;
}
}
.el-scrollbar__bar.is-vertical {
right: 0px;
}
.is-horizontal {
display: none;
}
a {
display: inline-block;
width: 100%;
overflow: hidden;
}
.svg-icon {
margin-right: 16px;
}
.el-menu {
border: none;
height: 100%;
width: 100% !important;
}
// menu hover
.submenu-title-noDropdown,
.el-submenu__title {
&:hover {
background-color: $menuHover !important;
}
}
.is-active>.el-submenu__title {
color: $subMenuActiveText !important;
}
& .nest-menu .el-submenu>.el-submenu__title,
& .el-submenu .el-menu-item {
min-width: $sideBarWidth !important;
background-color: $subMenuBg !important;
&:hover {
background-color: $subMenuHover !important;
}
}
}
.hideSidebar {
.sidebar-container {
width: 36px !important;
}
.main-container {
margin-left: 36px;
}
.submenu-title-noDropdown {
padding-left: 10px !important;
position: relative;
.el-tooltip {
padding: 0 10px !important;
}
}
.el-submenu {
overflow: hidden;
&>.el-submenu__title {
padding-left: 10px !important;
.el-submenu__icon-arrow {
display: none;
}
}
}
.el-menu--collapse {
.el-submenu {
&>.el-submenu__title {
&>span {
height: 0;
width: 0;
overflow: hidden;
visibility: hidden;
display: inline-block;
}
}
}
}
}
.el-menu--collapse .el-menu .el-submenu {
min-width: $sideBarWidth !important;
}
// 适配移动端, Mobile responsive
.mobile {
.main-container {
margin-left: 0px;
}
.sidebar-container {
transition: transform .28s;
width: $sideBarWidth !important;
}
&.hideSidebar {
.sidebar-container {
pointer-events: none;
transition-duration: 0.3s;
transform: translate3d(-$sideBarWidth, 0, 0);
}
}
}
.withoutAnimation {
.main-container,
.sidebar-container {
transition: none;
}
}
}
// when menu collapsed
.el-menu--vertical {
&>.el-menu {
.svg-icon {
margin-right: 16px;
}
}
.nest-menu .el-submenu>.el-submenu__title,
.el-menu-item {
&:hover {
// you can use $subMenuHover
background-color: $menuHover !important;
}
}
// the scroll bar appears when the subMenu is too long
>.el-menu--popup {
max-height: 100vh;
overflow-y: auto;
&::-webkit-scrollbar-track-piece {
background: #d3dce6;
}
&::-webkit-scrollbar {
width: 6px;
}
&::-webkit-scrollbar-thumb {
background: #99a9bf;
border-radius: 20px;
}
}
}
... ...
//globl transition css
/*fade*/
.fade-enter-active,
.fade-leave-active {
transition: opacity 0.28s;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
/*fade-transform*/
.fade-transform-leave-active,
.fade-transform-enter-active {
transition: all .5s;
}
.fade-transform-enter {
opacity: 0;
transform: translateX(-30px);
}
.fade-transform-leave-to {
opacity: 0;
transform: translateX(30px);
}
/*breadcrumb transition*/
.breadcrumb-enter-active,
.breadcrumb-leave-active {
transition: all .5s;
}
.breadcrumb-enter,
.breadcrumb-leave-active {
opacity: 0;
transform: translateX(20px);
}
.breadcrumb-move {
transition: all .5s;
}
.breadcrumb-leave-active {
position: absolute;
}
... ...
// base color
$blue:#324157;
$light-blue:#3A71A8;
$red:#C03639;
$pink: #E65D6E;
$green: #30B08F;
$tiffany: #4AB7BD;
$yellow:#FEC171;
$panGreen: #30B08F;
//sidebar
$menuText:#bfcbd9;
$menuActiveText:#409EFF;
$subMenuActiveText:#f4f4f5; //https://github.com/ElemeFE/element/issues/12951
$menuBg:#304156;
$menuHover:#263445;
$subMenuBg:#1f2d3d;
$subMenuHover:#001528;
$sideBarWidth: 180px;
// the :export directive is the magic sauce for webpack
:export {
menuText: $menuText;
menuActiveText: $menuActiveText;
subMenuActiveText: $subMenuActiveText;
menuBg: $menuBg;
menuHover: $menuHover;
subMenuBg: $subMenuBg;
subMenuHover: $subMenuHover;
sideBarWidth: $sideBarWidth;
}
... ...
... ... @@ -37,7 +37,7 @@
<li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item">
<template v-if="!item.leaf">
<div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div>
<ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)">
<ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)">
<li v-for="child in item.children" v-if="!child.hidden" :key="child.path" class="el-menu-item" style="padding-left: 40px;" :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">{{child.name}}</li>
</ul>
</template>
... ... @@ -73,6 +73,7 @@
<script>
import rt from '../routes'
export default {
data() {
return {
sysName:'流浪地球管理系统',
... ... @@ -156,7 +157,7 @@
<style scoped lang="scss">
@import '~scss_vars';
.container {
position: absolute;
top: 0px;
... ... @@ -286,4 +287,4 @@
}
}
}
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -27,7 +27,7 @@
</el-table-column>
<el-table-column label="航班日期" width="100px" align="center" sortable>
<template slot-scope="scope">
<span>{{ scope.row.flightDate | parseTime('{y}-{m}-{d}') }}</span>
<span>{{ scope.row.flightDate }}</span>
</template>
</el-table-column>
<el-table-column label="起始站" width="60px" align="center">
... ... @@ -63,7 +63,7 @@
</div>
</template>
</el-table-column>
<el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width">
<el-table-column :label="$t('table.actions')" align="center" class-name="small-padding fixed-width" >
<template slot-scope="scope">
<el-button type="primary" size="small" @click="handleUpdate(scope.row)">快速编辑</el-button>
<el-button type="primary" size="mini" @click="handleUpdate(scope.row)">{{ $t('table.edit') }}</el-button>
... ... @@ -80,7 +80,7 @@
<pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" />
<el-dialog :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" fullscreen="true">
<el-form ref="" :inline="true" label-position="left" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px">
<el-form ref="" :inline="true" :rules="rules" :model="temp" label-width="100px" style="font-size: 13px">
<div>
<el-tag type="info" effect="plain">
航班信息
... ... @@ -350,17 +350,16 @@
Auth: Lei.j1ang
Created: 2018/1/19-14:54
*/
import { fetchList } from '@/api/article'
import treeTable from '@/components/TreeTable'
import treeToArray from './customEval'
import treeToArray from '@/utils/customEval'
import Pagination from '@/components/Pagination'
import waves from '@/directive/waves' // Waves directive
import country from '@/utils/country.js'
import companyType from '@/utils/companyType.js'
import dangerGoods from '@/utils/dangerGoods.js'
import goodsPackage from '@/utils/goodsPackage.js'
import excel from '@/vendor/Export2Excel'
import { parseTime } from '@/utils'
const calendarTypeOptions = [
{ key: 'CN', display_name: 'China' },
{ key: 'US', display_name: 'USA' },
... ... @@ -405,9 +404,9 @@ export default {
expandAll: true,
total: 1,
resend: true,
listLoading: false,
downloadLoading: false,
loading: false,
loading:false,
listLoading: true,
downloadLoading:false,
multipleSelection: [],
dialogFormVisible: false,
dialogStatus: '',
... ... @@ -520,7 +519,7 @@ export default {
]
},
{
id: 5,
id: 4,
waybillNo: '580-20728391',
houseWaybillNo: '',
custom: '4604',
... ... @@ -599,6 +598,15 @@ export default {
}
this.handleFilter()
},
handleFilter(){
},
handleSwitch(row){
},
handleDownload(){
this.downloadLoading = true
},
handleUpdate(row) {
this.temp = Object.assign({}, row) // copy obj
this.temp.timestamp = new Date(this.temp.timestamp)
... ... @@ -608,10 +616,6 @@ export default {
this.$refs[''].clearValidate()
})
},
handleFilter() {
this.listQuery.page = 1
this.getList()
},
handleModifyStatus(row, status) {
this.$message({
message: '操作成功',
... ... @@ -620,16 +624,7 @@ export default {
row.status = status
},
getList() {
this.listLoading = true
fetchList(this.listQuery).then(response => {
this.list = response.data.items
this.total = response.data.total
// Just to simulate the time of the request
setTimeout(() => {
this.listLoading = false
}, 1.5 * 1000)
})
},
handleSelectionChange(val) {
this.multipleSelection = val
... ... @@ -656,18 +651,6 @@ export default {
this.$refs[''].clearValidate()
})
},
handleDownload() {
this.downloadLoading = true
const tHeader = ['timestamp', 'title', 'type', 'importance', 'status']
const filterVal = ['timestamp', 'title', 'type', 'importance', 'status']
const data = this.formatJson(filterVal, this.list)
excel.export_json_to_excel({
header: tHeader,
data,
filename: 'table-list'
})
this.downloadLoading = false
},
remoteMethod(query) {
if (query !== '') {
this.loading = true
... ...