Commit 3fd5fc77 by fukai

完成office调整

parent f7e52a4e
...@@ -20,4 +20,11 @@ export default { ...@@ -20,4 +20,11 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
} }
.e-table-wrapper{
display: flex;
flex-direction: column;
}
.e-table-wrapper .el-table {
flex:1;
}
</style> </style>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
height: 100%; height: 100%;
width: 100%; width: 100%;
margin: 0; margin: 0;
overflow: hidden;
} }
</style> </style>
</head> </head>
......
...@@ -11,11 +11,13 @@ import RootRouter from './routers' ...@@ -11,11 +11,13 @@ import RootRouter from './routers'
import store from "./store" import store from "./store"
import CustomComponent from "./components" import CustomComponent from "./components"
import VueFunc from "./utils/vuefunc"
window.SUCCESS="00000" window.SUCCESS="00000"
Vue.use(ElementUI) Vue.use(ElementUI)
Vue.use(CustomComponent) Vue.use(CustomComponent)
Vue.use(VueFunc)
new Vue({ new Vue({
el: '#app', el: '#app',
......
import axios from 'axios' import axios from 'axios'
import { MessageBox } from 'element-ui' import { MessageBox } from 'element-ui'
export const BASE_HOST = "/reactremit/" export const BASE_HOST = "/gjjs/"
export const BASE_URI=BASE_HOST+"service/"; export const BASE_URI=BASE_HOST+"";
const instance = axios.create({ const instance = axios.create({
baseURL: BASE_URI, baseURL: BASE_URI,
...@@ -24,22 +24,22 @@ export default class Api ...@@ -24,22 +24,22 @@ export default class Api
{ {
let token = window.sessionStorage.token let token = window.sessionStorage.token
let userId = window.sessionStorage.userId let userId = window.sessionStorage.userId
let headers = {userId,token}; let headers = {userId,token,"terminal":"WEB"};
if(url!= `${BASE_URI}login` && token) if(url!= `${BASE_URI}login` && token)
headers.token = token; headers.token = token;
return new Promise( (resolve, reject) =>{ return new Promise( (resolve, reject) =>{
axios.post(url,data,{ axios.post(url,data,{
headers, headers,
method, method,
timeout: 5000, timeout: 50000,
}) })
.then(response=>{ .then(response=>{
const {data} = response; const {data} = response;
if(data && data.retcod != SUCCESS) if(data && data.code != SUCCESS)
{ {
console.log("错误码:"+data.retcod+" 错误信息:"+data.retmsg) console.log("错误码:"+data.code+" 错误信息:"+data.message)
} }
if(data && data.retcod == 'L0003'){ if(data && data.code == 'L0003'){
window.sessionStorage.removeItem("token") window.sessionStorage.removeItem("token")
window.sessionStorage.removeItem("userId") window.sessionStorage.removeItem("userId")
MessageBox.alert({ MessageBox.alert({
......
const I18N = { const I18N = {
namespaced: true,
state:{ state:{
lang:"cn" lang:"cn"
}, },
......
const UserContext={ const UserContext={
namespaced: true,
state:{ state:{
userName:"", userName:"",
userId:"", userId:"",
...@@ -15,6 +16,9 @@ const UserContext={ ...@@ -15,6 +16,9 @@ const UserContext={
state.menu = info.menu state.menu = info.menu
state.state = "LOGIN" state.state = "LOGIN"
state.token = info.token state.token = info.token
window.sessionStorage.userId = info.userId
window.sessionStorage.userName = info.userName
window.sessionStorage.token = info.token
}, },
setLogout(state){ setLogout(state){
state.userName = "" state.userName = ""
......
...@@ -7,8 +7,8 @@ Vue.use(Vuex) ...@@ -7,8 +7,8 @@ Vue.use(Vuex)
const store = new Vuex.Store({ const store = new Vuex.Store({
modules: { modules: {
i18n: I18NStore, I18n: I18NStore,
userContext: UserContext UserContext: UserContext
} }
}) })
......
export function findCodeLabel(codes,val)
{
if(!codes)
return val;
let item = codes.find(item=>item.value==val)
if(!item)
return val;
return item.label
}
export default {
install(Vue){
Vue.prototype.findCodeLabel = findCodeLabel
}
}
<template>
<div class="e-table-wrapper" style="height:100%">
<el-table
:data="todolist"
style="width: 100%"
>
<el-table-column
prop="typ"
label="操作类型"
sortable
>
<template slot-scope="scope">
<span>{{ findCodeLabel(codes.oratyp,scope.row.typ) }}</span>
</template>
</el-table-column>
<el-table-column
prop="inifrm"
label="交易码"
sortable
>
</el-table-column>
<el-table-column
prop="ownref"
label="业务编号"
sortable
>
</el-table-column>
<el-table-column
prop="nam"
label="概要描述"
sortable
>
</el-table-column>
<el-table-column
prop="usr"
label="经办柜员"
sortable
>
</el-table-column>
<el-table-column
prop="cur"
label="币种"
sortable
>
</el-table-column>
<el-table-column
prop="amt"
label="金额"
sortable
width="100">
</el-table-column>
</el-table>
<el-pagination
layout="prev, pager, next"
:total="pager.total">
</el-pagination>
</div>
</template>
<script>
import CodeTable from "~/config/CodeTable"
import Api from "~/service/Api"
export default {
props:['todoType'],
data(){
return {
codes:{
oratyp:CodeTable.oratyp,
},
todolist:[],
pager:{total:0,curIdx:0}
}
},
methods:{
async onOffpTodo(){
let rtnmsg = await Api.post("office/offp_todo",{data:{'offp_todotyp':this.todoType}})
if(rtnmsg.code == SUCCESS)
{
//TODO 处理数据逻辑
this.todolist = rtnmsg.data.offp_todolst
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
}
},
mounted(){
this.onOffpTodo()
}
}
</script>
<template> <template>
<div class="self-header"> <div class="self-header">
<h2 class="self_header_label">新一代邮储银行国际结算系统</h2> <h2 class="self_header_label">新一代银行国际结算系统</h2>
</div> </div>
</template> </template>
......
<template> <template>
<div class="loginContainer"> <div class="loginContainer">
<div id="loginForamWrapper"> <div id="loginForamWrapper">
<h2>欢迎邮储银行国际结算系统</h2> <h2>欢迎银行国际结算系统</h2>
<div id="loginForm"> <div id="loginForm">
<p style="text-align:left;font-size:1.2em;color:#888">用户登录 / LOGIN IN</p> <p style="text-align:left;font-size:1.2em;color:#888">用户登录 / LOGIN IN</p>
<el-form :model="loginForm" status-icon :rules="rules" ref="loginForm" size="small" > <el-form :model="loginForm" status-icon :rules="rules" ref="loginForm" size="small" >
...@@ -23,6 +23,11 @@ ...@@ -23,6 +23,11 @@
</template> </template>
<script> <script>
import { createNamespacedHelpers } from 'vuex'
const { mapState, mapMutations,mapActions } = createNamespacedHelpers('UserContext')
export default { export default {
data() { data() {
return { return {
...@@ -44,6 +49,7 @@ ...@@ -44,6 +49,7 @@
submitForm(formName) { submitForm(formName) {
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
this.setLoginInfo({userId:this.loginForm.username})
this.$router.push("/business/office"); this.$router.push("/business/office");
} else { } else {
console.log('error submit!!'); console.log('error submit!!');
...@@ -53,7 +59,8 @@ ...@@ -53,7 +59,8 @@
}, },
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
} },
...mapMutations(["setLoginInfo"])
} }
} }
</script> </script>
......
...@@ -58,11 +58,11 @@ module.exports = (options = {}) => ({ ...@@ -58,11 +58,11 @@ module.exports = (options = {}) => ({
host: '127.0.0.1', host: '127.0.0.1',
port: 8010, port: 8010,
proxy: { proxy: {
'/api/': { '/gjjs/': {
target: 'http://127.0.0.1:8080', target: 'http://127.0.0.1:8070',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
'^/api': '' '^/gjjs': '/gjjs'
} }
} }
}, },
......
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