提交 ce2551c5 authored 作者: huaxinzhu's avatar huaxinzhu

云仓新功能

上级 2e5e6aaa
......@@ -9,3 +9,21 @@ export default {
name: 'App'
}
</script>
<style>
body {
font-family:Microsoft YaHei,Arial,Helvetica,sans-serif;
}
/* 在全局CSS里引用: */
/* 滚动条宽度 */
::-webkit-scrollbar {
width: 10px;
height: 10px;
}
/* 滚动条的滑块 */
::-webkit-scrollbar-thumb {
background-color: #c0ccda;
border-radius: 6px;
}
</style>
......@@ -4,7 +4,10 @@ import Router from 'vue-router'
Vue.use(Router)
/* Layout */
import Layout from '@/layout'
import Layout from '@/layout';
import Entry from '@/views/entry';
/**
* Note: 路由配置项
......@@ -57,7 +60,43 @@ export const constantRoutes = [
component: (resolve) => require(['@/views/error/401'], resolve),
hidden: true
},
// 阅读协议
{
path: '/agreement',
component: (resolve) => require(['@/views/entry/agreement'], resolve),
hidden: true
},
// 主体信息 fillStoreInf
{
path: '/fillMainInf',
component: (resolve) => require(['@/views/entry/fillMainInf'], resolve),
hidden: true
},
// 品牌信息
{
path: '/fillBrandInf',
component: (resolve) => require(['@/views/entry/fillBrandInf'], resolve),
hidden: true
},
// 店铺信息
{
path: '/fillShopInf',
component: (resolve) => require(['@/views/entry/fillShopInf'], resolve),
hidden: true
},
// 提交审核
{
path: '/reviewing',
component: (resolve) => require(['@/views/entry/reviewing'], resolve),
hidden: true
},
// 审核失败
{
path: '/reviewFail',
component: (resolve) => require(['@/views/entry/reviewFail'], resolve),
hidden: true
},
/*{
path: '',
component: Layout,
redirect: 'index',
......@@ -69,6 +108,19 @@ export const constantRoutes = [
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
}
]
},*/
{
path: '',
component: Entry,
redirect: 'index',
children: [
{
path: 'index',
component: (resolve) => require(['@/views/index'], resolve),
name: '首页',
meta: { title: '首页', icon: 'dashboard', noCache: true, affix: true }
}
]
},
{
path: '/user',
......
......@@ -3,60 +3,41 @@
<script>
export default {
name: "Login2",
created() {
this.gotosso()
this.gotosso()
},
methods: {
getCookie() {
var de = this.$store.commit("SET_TOKEN")
console.log("SET_TOKEN",de)
// const password = Cookies.get("password");
// const rememberMe = Cookies.get('rememberMe')
// this.loginForm = {
// username: username === undefined ? this.loginForm.username : username,
// password: password === undefined ? this.loginForm.password : decrypt(password),
// rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
// };
},
gotosso(){
gotosso() {
var ticket = this.$route.query.ticket
// let data = this.getUrlParam('ticket')
// this.loading = true
this.$store.dispatch('Login', {"ticket":ticket}).then((res) => {
// console.log(123456)
// console.log(res)
// return false
// debugger
if(res.token != ""){
this.$router.push({ path:'/' })
}else{
this.$store.dispatch('Login', {"ticket": ticket}).then((res) => {
if (res.token != "") {
this.$router.push({path: '/'})
} else {
this.$store.dispatch('Statistic')
this.$store.dispatch('FedLogOut')
var ssa = window.location.host
setTimeout(function (){
if(ssa =='localhost:1024'){
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
}else{
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
setTimeout(function () {
if (ssa == 'localhost:1024') {
window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa + '/login'
} else {
window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa + '/login'
}
}, 1000)
}
this.loading = false
})
.catch(() => {
debugger
console.log(222222222222)
this.$store.dispatch('FedLogOut')
var ssa = window.location.host
setTimeout(function (){
if(ssa =='localhost:1024'){
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
}else{
window.location.href='http://sso.jxhh.com/logout?redirect=http://'+ssa+'/login'
setTimeout(function () {
if (ssa == 'localhost:1024') {
window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa + '/login'
} else {
window.location.href = 'http://sso.jxhh.com/logout?redirect=http://' + ssa + '/login'
}
}, 1000)
this.loading = false
......
<script>
export default {
export default {
created() {
const { params, query } = this.$route
const { path } = params
this.$router.replace({ path: '/' + path, query })
const {params, query} = this.$route
const {path} = params;
this.$router.replace({path: '/' + path, query})
},
render: function(h) {
return h() // avoid warning message
render: function (h) {
return h()
}
}
}
</script>
<template>
<div class="app-container">
<el-card class="box-card">
......@@ -12,7 +11,8 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
>删除</el-button>
>删除
</el-button>
<el-button
style="float:right;"
type="success"
......@@ -20,27 +20,29 @@
size="mini"
:disabled="single"
@click="handleUpdate"
>修改</el-button>
>修改
</el-button>
<el-button
style="float:right;margin-left: 20px;"
type="primary"
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
>新增
</el-button>
</div>
<el-table v-loading="loading" :data="freightList" :height="tableHeight" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="ID" align="center" prop="Id" />
<el-table-column type="selection" width="55" align="center"/>
<el-table-column label="ID" align="center" prop="Id"/>
<el-table-column label="模板名称" align="center" prop="Name" />
<el-table-column label="排序" align="center" prop="Sort" />
<el-table-column label="是否是默认模板" align="center" :formatter="formatDefault" prop="IsDefault" />
<el-table-column label="类型" align="center" :formatter="formatType" prop="ChargeType" />
<el-table-column label="模板名称" align="center" prop="Name"/>
<el-table-column label="排序" align="center" prop="Sort"/>
<el-table-column label="是否是默认模板" align="center" :formatter="formatDefault" prop="IsDefault"/>
<el-table-column label="类型" align="center" :formatter="formatType" prop="ChargeType"/>
<el-table-column label="是否是默认" align="center" prop="Publish" />
<el-table-column label="创建时间" align="center" :formatter="formatTime" prop="Created" />
<el-table-column label="是否是默认" align="center" prop="Publish"/>
<el-table-column label="创建时间" align="center" :formatter="formatTime" prop="Created"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
......@@ -48,13 +50,15 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>修改</el-button>
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
>删除</el-button>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
......@@ -67,21 +71,22 @@
/>
<!-- 添加或修改freight对话框 -->
<el-dialog :title="title" :visible.sync="open" v-if="open" width="90%" append-to-body>
<IndexBtn :option="form" />
<IndexBtn :option="form"/>
</el-dialog>
</el-card>
</div>
</template>
<script>
import IndexBtn from './indexbtn'
import { listFreight, getFreight, delFreight, addFreight, updateFreight } from '@/api/module/freight'
import {dateFormat} from '@/utils'
export default {
import {listFreight, getFreight, delFreight, addFreight, updateFreight} from '@/api/module/freight'
import {dateFormat} from '@/utils'
export default {
name: "freight",
data() {
return {
fullHeight: '',
tableHeight:null,
tableHeight: null,
// 遮罩层
loading: true,
// 选中数组
......@@ -120,55 +125,55 @@ export default {
// 表单校验
rules: {
name: [
{ required: true, message: "模板名称不能为空", trigger: "blur" }
{required: true, message: "模板名称不能为空", trigger: "blur"}
],
}
};
},
components:{
components: {
IndexBtn
},
created() {
this.getList();
this.$nextTick(()=>{
this.$nextTick(() => {
this.fullHeight = document.getElementsByClassName('box-card')[0].clientHeight
})
},
watch:{
fullHeight(val,oldval){
watch: {
fullHeight(val, oldval) {
console.log(val)
this.tableHeight = val - 130
}
},
methods: {
formatType(row){
formatType(row) {
var typese = row.ChargeType
var optDess = ''
if(typese==1){
if (typese == 1) {
optDess = "按重量"
}else if(typese==2){
} else if (typese == 2) {
optDess = "按数量"
}
return optDess
},
//格式化状态
formatDefault(row){
formatDefault(row) {
var types = row.IsDefault
var optDes = ''
if(types==1){
if (types == 1) {
optDes = "是"
}else if(types==0){
} else if (types == 0) {
optDes = "否"
}
return optDes
},
//格式化时间
formatTime(row){
formatTime(row) {
var Time = row.Created
var newtime = ""
if(Time>0){
newtime = dateFormat(Time*1000,"Y-m-d H:i:s");
if (Time > 0) {
newtime = dateFormat(Time * 1000, "Y-m-d H:i:s");
}
return newtime
},
......@@ -216,7 +221,7 @@ export default {
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
......@@ -224,7 +229,7 @@ export default {
this.reset();
this.open = true;
this.form = {
Id:0,
Id: 0,
Sort: 0,
Name: "0",
IsDefault: 0,
......@@ -243,12 +248,6 @@ export default {
},
this.title = "添加运费模板";
},
reset() {
this.form = {
};
this.resetForm("form");
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row)
......@@ -294,29 +293,32 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(function () {
return delFreight(ids);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(function() {});
}).catch(function () {
});
},
} //methods结束
};
};
</script>
<style scoped>
.app-container{
height:100%;
.app-container {
height: 100%;
}
.box-card{
height:100%;
.box-card {
height: 100%;
}
.box-card /deep/ .el-card__body{
height:100%;
.box-card /deep/ .el-card__body {
height: 100%;
overflow: hidden;
}
.el-table{
height:calc(100% - 120px);
.el-table {
height: calc(100% - 120px);
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论