Commit ba7bdcf9 authored by 仇晓婷's avatar 仇晓婷

Merge branch 'product' of http://git.mes123.com/zhouyx/mes-ui into ting-p

parents f35ec95d aa63d0ce
<template> <template>
<div class="table-content myBug flex fd"> <div class="table-content">
<div class="table-tools" v-if="tool" ref="tools"> <div class="table-tools" v-if="tool">
<div class="table-search" v-if="easy"> <div class="table-search" v-if="easy">
<slot name="easySearch"> <slot name="easySearch">
<Input <Input
...@@ -11,30 +11,28 @@ ...@@ -11,30 +11,28 @@
v-model="keys" v-model="keys"
/> />
</slot> </slot>
<Button v-if="high" @click="modalSearch=true" type="text">
<Icon type="md-search" />高级
</Button>
</div> </div>
<Button v-if="high" @click="modalSearch=true" type="text">
<Icon type="md-search" />高级
</Button>
<div class="searchBack"> <div class="searchBack">
<slot name="searchBack"></slot> <slot name="searchBack"></slot>
</div> </div>
<div class="btns"> <div class="btns">
<slot name="buttons"></slot> <slot name="buttons"></slot>
<Button v-if="set&&type=='table'" @click="config=!config"> <Button v-if="set&&type=='table'" @click="config=!config">
<Icon type="md-build" class="table-set" size="14" title="列设置" /> <Icon type="md-build" title="列设置" />
</Button> </Button>
</div> </div>
</div> </div>
<div class="fg" ref="ftable"> <div class="table-main" ref="main">
<div v-if="type=='card'" class="table-card"> <Row v-if="type=='card'">
<Row :gutter="gutter"> <Col :span="span" v-for="(row,i) in list" :key="i">
<Col :span="span" v-for="(row,i) in list" :key="i"> <slot name="card" :row="row">
<slot name="card" :row="row"> <span>{{row.id}}</span>
<span>{{row.id}}</span> </slot>
</slot> </Col>
</Col> </Row>
</Row>
</div>
<Table <Table
v-else v-else
:border="border" :border="border"
...@@ -42,35 +40,30 @@ ...@@ -42,35 +40,30 @@
:data="list" :data="list"
:height="tableHeight" :height="tableHeight"
:draggable="draggable" :draggable="draggable"
:size="size"
:row-key="rowKey"
ref="table" ref="table"
class="tableCommon fg" class="tableCommon"
@on-expand="expand" @on-expand="expand"
@on-drag-drop="onDragDrop" @on-drag-drop="onDragDrop"
@on-selection-change="selectionChange" @on-selection-change="selectionChange"
@on-select="onSelect" @on-select="onSelect"
:loading="loading"
></Table> ></Table>
<div class="table-footer" ref="footer"> </div>
<div> <div class="table-footer">
<slot name="footer"></slot> <slot name="footer"></slot>
</div>&nbsp; <Page
<Page v-if="page"
v-if="page" :total="search.total"
:total="search.total" :current="search.page"
:current="search.page" class="fr"
class="mr15 mt15 fr" show-total
show-total size="small"
size="small" show-elevator
show-elevator show-sizer
show-sizer :page-size="search.pageSize"
:page-size="search.pageSize" :page-size-opts="pageSizeOpts"
:page-size-opts="pageSizeOpts" @on-change="pageChange"
@on-change="pageChange" @on-page-size-change="pageSizeChange"
@on-page-size-change="pageSizeChange" />
/>
</div>
</div> </div>
<Modal v-if="high" v-model="modalSearch" title="高级搜索" draggable width="800" ref="search"> <Modal v-if="high" v-model="modalSearch" title="高级搜索" draggable width="800" ref="search">
<slot name="searchForm"></slot> <slot name="searchForm"></slot>
...@@ -107,13 +100,10 @@ ...@@ -107,13 +100,10 @@
</li> </li>
</ul> </ul>
</Drawer> </Drawer>
<FooterToolbar style="height:60px" v-if="batch" v-show="footerToolbar"> <FooterToolbar v-if="batch" v-show="footerToolbar">
<div class="tip"> <div class="tip">已选{{selectItems.length}}</div>
已选{{selectItems.length}} <slot name="batch"></slot>
<slot name="batch"></slot> <Button @click="footerToolbar=false">取消</Button>
</div>
<Button @click="cancelFooterToolbar" class="btn">取消</Button>
</FooterToolbar> </FooterToolbar>
</div> </div>
</template> </template>
...@@ -141,8 +131,7 @@ export default { ...@@ -141,8 +131,7 @@ export default {
configLoad: false, configLoad: false,
userConfig: null, //用户页面配置信息。, userConfig: null, //用户页面配置信息。,
// userId: 1 // userId: 1
userId: this.$store.state.userInfo.userId, userId: this.$store.state.userInfo.userId
loading: false
}; };
}, },
props: { props: {
...@@ -165,10 +154,6 @@ export default { ...@@ -165,10 +154,6 @@ export default {
type: String, type: String,
default: "请输入关键字" default: "请输入关键字"
}, },
size: {
type: String,
default: "default"
},
height: { height: {
type: Number, type: Number,
default: 0 default: 0
...@@ -237,17 +222,9 @@ export default { ...@@ -237,17 +222,9 @@ export default {
return ["table", "card", "list"].indexOf(value) !== -1; return ["table", "card", "list"].indexOf(value) !== -1;
} }
}, },
gutter:{
type:Number,
default:0
},
span: { span: {
type: Number, type: Number,
default: 24 default: 24
},
//table控件children子数据控制功能
rowKey: {
type: [String, Number]
} }
}, },
created() { created() {
...@@ -261,28 +238,29 @@ export default { ...@@ -261,28 +238,29 @@ export default {
mounted() { mounted() {
if (this.data && this.data.length > 0) { if (this.data && this.data.length > 0) {
this.list = this.data; this.list = this.data;
//return; return;
} }
this.keys = ""; this.keys = "";
this.intY(); this.intY();
if (this.lazy == true) { if (this.lazy == true) {
return; return;
} }
this.loadUserConfig(); if (this.userId > 0) {
this.loadUserConfig();
} else {
this.easySearch();
}
if (this.height === 0) { if (this.height === 0) {
this.tableHeight = this.$refs.main.offsetHeight;
window.onresize = () => { window.onresize = () => {
///浏览器窗口大小变化 ///浏览器窗口大小变化
return (() => { return (() => {
// console.log(this.$refs.table) this.tableHeight = this.$refs.main.offsetHeight;
window.screenHeight = window.innerHeight;
this.tableHeight = window.screenHeight - this.firstY - 60;
})(); })();
}; };
} else { } else {
this.tableHeight = this.height; this.tableHeight = this.height;
} }
//注册拖拽事件。 //注册拖拽事件。
this.$dragging.$on("dragend", e => { this.$dragging.$on("dragend", e => {
// console.log("dragend",e); // console.log("dragend",e);
...@@ -296,20 +274,10 @@ export default { ...@@ -296,20 +274,10 @@ export default {
this.tableHeight = window.innerHeight - this.firstY - 60; this.tableHeight = window.innerHeight - this.firstY - 60;
} }
if (this.action) { if (this.action) {
this.loading = true; this.$api.post(this.action, this.search).then(r => {
this.$api this.list = r.result.items;
.post(this.action, this.search) this.search.total = r.result.totalCount || r.result.count;
.then(r => { });
this.list = r.result.items;
this.search.total = r.result.totalCount;
this.loading = false;
})
.catch(
function(err) {
this.loading = false;
this.$Message.error("加载失败");
}.bind(this)
);
} }
}, },
columnInit() { columnInit() {
...@@ -401,11 +369,7 @@ export default { ...@@ -401,11 +369,7 @@ export default {
this.$emit("on-drag-drop", a, b); this.$emit("on-drag-drop", a, b);
}, },
easySearch() { easySearch() {
if ( if (this.conditions && this.conditions.keys.default) {
this.conditions &&
this.conditions.keys &&
this.conditions.keys.default
) {
//判断没有传入条件的用默认的查询 //判断没有传入条件的用默认的查询
this.conditions.keys.value = this.keys; this.conditions.keys.value = this.keys;
} }
...@@ -487,10 +451,6 @@ export default { ...@@ -487,10 +451,6 @@ export default {
}, },
selectAll(status) { selectAll(status) {
this.$refs.table.selectAll(status); this.$refs.table.selectAll(status);
},
cancelFooterToolbar() {
this.$refs.table.selectAll(false);
this.footerToolbar = false;
} }
}, },
computed: { computed: {
...@@ -533,16 +493,6 @@ export default { ...@@ -533,16 +493,6 @@ export default {
}); });
}; };
} }
if (u.type == "outputTime") {
u.render = (h, params) => {
let values = u.key;
return h("OutputTime", {
props: {
value: params.row[values]
}
});
};
}
return !u.hide; return !u.hide;
}); });
return cols; return cols;
...@@ -559,69 +509,51 @@ export default { ...@@ -559,69 +509,51 @@ export default {
}; };
</script> </script>
<style lang="less" scoped> <style lang="less">
.table-content { .table-content {
position: relative; position: relative;
height: 100%; height: 100%;
.table-tools { display: flex;
padding-top: 5px; flex-direction: column;
height: 50px;
overflow: hidden;
.table-search {
float: left;
line-height: 50px;
.ivu-form-item {
margin-bottom: 0;
}
}
.btns {
float: right;
text-align: right;
height: 40px;
}
}
.tableCommon {
width: 100%;
}
.tip { .tip {
display: inline; display: inline;
} }
.tableCommon tr th { form {
line-height: 30px; display: inline-block;
font-size: 14px; .ivu-form-item {
background: #f5f6fa; margin: 0;
} vertical-align: middle;
.fg {
overflow: auto;
.table-card{
overflow: hidden;
} }
} }
.tableCommon tr td { .table-main {
line-height: 25px;
font-size: 14px;
padding: 0 2px;
}
.tableCommon tr td .ivu-table-cell {
padding: 0 5px;
}
.table-card {
width: 100%; width: 100%;
text-align: left; text-align: left;
padding: 0; padding: 0;
display: block; display: block;
overflow-y: auto; overflow-y: auto;
flex-grow: 1;
tr td .ivu-table-cell {
padding: 0 5px;
}
} }
.table-tools {
.table-set { display: flex;
cursor: pointer; line-height: 50px;
} .table-search {
.table-set:hover { flex-grow: 1;
color: orange; }
.btns {
min-width: 200px;
text-align: right;
}
} }
.table-footer { .table-footer {
height: 40px; line-height: 45px;
}
.ivu-footer-toolbar {
text-align: left;
background: rgba(0, 0, 0, 0.7);
color: #fff;
} }
} }
.table-columns { .table-columns {
......
<template> <template>
<div class="account"> <div class="account">
<Carousel v-model="value1" autoplay :autoplay-speed="5000" loop class="zmd"> <!-- <Carousel v-model="value1" autoplay :autoplay-speed="5000" loop class="zmd">
<CarouselItem> <CarouselItem>
<div class="bg bg1"></div> <div class="bg bg1"></div>
</CarouselItem> </CarouselItem>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<CarouselItem> <CarouselItem>
<div class="bg bg3"></div> <div class="bg bg3"></div>
</CarouselItem> </CarouselItem>
</Carousel> </Carousel> -->
<div class="main"> <div class="main">
<div class="ad"> <div class="ad">
<div class="page_log"> <div class="page_log">
...@@ -21,20 +21,19 @@ ...@@ -21,20 +21,19 @@
<div class="login"> <div class="login">
<div class="cen"> <div class="cen">
<div class="log_code_box"> <div class="log_code_box">
<div class="log_code"> <div class="log_code" @click="handlTrance">
<img src="@/assets/images/login/erwei.jpg" alt="logoCode" /> <img src="@/assets/images/login/erwei.jpg" alt="logoCode" />
<img src="@/assets/images/login/sanjiao.png" alt="" class="sanjiao" /> <transition name="animation">
<!-- <img v-if="imgFlag" src="@/assets/images/login/sanjiao.png" alt="" class="sanjiao" /> -->
<div v-if="imgFlag" class="sanjiao"></div>
</transition>
</div> </div>
</div> </div>
<h2 class="mb20">登 录</h2> <h2 class="mb20">登 录</h2>
<Login @on-submit="handleSubmit"> <Login @on-submit="handleSubmit" class="form_sub">
<UserName name="username" value="" /> <UserName name="username" class="user_name" value="" />
<Password name="password" value="" enter-to-submit /> <Password name="password" class="pass_word" value="" enter-to-submit />
<!-- <div class="page-account-auto-login mb20"> <div class="sub_btn">
<Checkbox v-model="autoLogin">{{ $t('page.login.remember') }}</Checkbox>
<a href>{{ $t('page.login.forgot') }}</a>
</div> -->
<div class="mt20">
<Submit class="shadown">{{ $t('page.login.submit') }}</Submit> <Submit class="shadown">{{ $t('page.login.submit') }}</Submit>
</div> </div>
</Login> </Login>
...@@ -57,7 +56,8 @@ export default { ...@@ -57,7 +56,8 @@ export default {
data() { data() {
return { return {
value1: 0, value1: 0,
autoLogin: true autoLogin: true,
imgFlag: true,
}; };
}, },
created() { created() {
...@@ -113,6 +113,9 @@ export default { ...@@ -113,6 +113,9 @@ export default {
this.$Message.error("用户信息22查询失败!"); this.$Message.error("用户信息22查询失败!");
} }
}); });
},
handlTrance(){
this.imgFlag = !this.imgFlag
} }
} }
}; };
...@@ -124,6 +127,7 @@ export default { ...@@ -124,6 +127,7 @@ export default {
width: 100%; width: 100%;
top: 0; top: 0;
bottom: 0; bottom: 0;
background-image: url("../../../assets/images/login/login01.png");
.zmd { .zmd {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
...@@ -155,9 +159,10 @@ export default { ...@@ -155,9 +159,10 @@ export default {
bottom: 168px; bottom: 168px;
left: 360px; left: 360px;
right: 360px; right: 360px;
background: url("../../../assets/images/login/login02.jpg") no-repeat -177px -16px; background: url("../../../assets/images/login/login02.jpg") no-repeat -70px 0px;
background-size: 94%; background-size: 80%;
display: flex; display: flex;
h2{ padding: 4px 0 15px 0;}
.ad { .ad {
flex: 1; flex: 1;
text-align: center; text-align: center;
...@@ -171,8 +176,8 @@ export default { ...@@ -171,8 +176,8 @@ export default {
} }
.login { .login {
background-color: white; background-color: white;
width: 420px; width: 410px;
padding: 0 50px; padding: 0 40px;
display: flex; display: flex;
// align-items: center; // align-items: center;
flex-direction: row; flex-direction: row;
...@@ -180,12 +185,18 @@ export default { ...@@ -180,12 +185,18 @@ export default {
width: 100%; width: 100%;
.log_code_box{ .log_code_box{
text-align: right; text-align: right;
height: 130px; height: 110px;
margin: 0 -50px 0 0; margin: 0 -40px 0 0;
.log_code{ .log_code{
width: 100px; cursor: pointer;
width: 90px;
height: 85PX;
float: right; float: right;
.sanjiao{ .sanjiao{
width: 90px;
height: 90px;
border-bottom: 90px solid #ffffff;
border-right: 90px solid transparent;
position: absolute; position: absolute;
right: 0px; right: 0px;
top: 0px; top: 0px;
...@@ -193,19 +204,39 @@ export default { ...@@ -193,19 +204,39 @@ export default {
} }
} }
.ivu-input-wrapper { .ivu-input-wrapper {
margin-bottom: 5px; margin-bottom: 6px;
} }
.mt20 { .sub_btn{
margin-top: 50px; .shadown{
.shadown { padding: 30px 0 0 0;
box-shadow: 1px 5px 15px #2680eb; button{
} height: 50px;
.ivu-btn-large { border-radius: 25px;
height: 50px !important; box-shadow: 0px 9px 11px 3px #c2d6ec;
letter-spacing: 3px;
font-size: 18px;
outline: none;
// background: url("../../../assets/images/login/btn_bg.png") no-repeat center;
// span{
// margin: -14px 0 0;
// display: block;
// }
}
} }
} }
} }
} }
} }
} }
.animation-enter-to,.animation-leave-to{
animation: mymove 1s 1s linear;
}
@keyframes mymove {
0%{
transform: translateX(0px);
}
100%{
transform: translateX(-45px);
}
}
</style> </style>
\ No newline at end of file
This diff is collapsed.
import Api from '@/plugins/request'
export default {
index: `${PlanUrl}/orderexecutequalityrecord/dispatchproductcodes`,
getpaged(params) {
return Api.get(`${PlanUrl}/orderexecutequalityrecord/dispatchproductcodes`, params);
},
submitData(params) {
return Api.post(`${PlanUrl}/orderexecutequalityrecord/checkdispatchproduct`, params);
},
}
\ No newline at end of file
...@@ -445,7 +445,7 @@ ...@@ -445,7 +445,7 @@
} }
.fei_right{ .fei_right{
float: right; float: right;
padding-top: 10px; padding-top: 15px;
line-height: 50px; line-height: 50px;
width: 460px; width: 460px;
} }
......
This diff is collapsed.
...@@ -194,8 +194,8 @@ export default { ...@@ -194,8 +194,8 @@ export default {
created() { created() {
let oldStr=localStorage.getItem('admin'); let oldStr=localStorage.getItem('admin');
let userlist = this.$store.getters.getUser(2); let userlist = this.$store.getters.getUser(2);
console.info(userlist) // console.info(userlist)
console.warn(localStorage) // console.warn(localStorage)
// console.warn("02",sessionStorage) // console.warn("02",sessionStorage)
// console.log("user",oldStr) // console.log("user",oldStr)
}, },
......
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