bibi 3 years ago
parent 48ffeec77a
commit 27f1aea353

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 40 KiB

@ -1,58 +0,0 @@
<template>
<div class="hello">
<h1>{{ msg }}</h1>
<p>
For a guide and recipes on how to configure / customize this project,<br>
check out the
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
</p>
<h3>Installed CLI Plugins</h3>
<ul>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
</ul>
<h3>Essential Links</h3>
<ul>
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
</ul>
<h3>Ecosystem</h3>
<ul>
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
</ul>
</div>
</template>
<script>
export default {
name: 'HelloWorld',
props: {
msg: String
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h3 {
margin: 40px 0 0;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: inline-block;
margin: 0 10px;
}
a {
color: #42b983;
}
</style>

@ -0,0 +1,68 @@
<template>
<div class="main">
<div style="margin-bottom: 16px">
<a-button type="primary" :disabled="!hasSelected" :loading="loading">
批量
</a-button>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<a-table
:columns="columns"
:data-source="tableData"
:pagination="pagination"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:row-key="
(record, index) => {
return index;
}
"
>
<!-- <a slot="del" slot-scope="scope" @click="del(scope)"></a>
<span slot="formatter" slot-scope="scope" >{{scope}}</span> -->
</a-table>
</div>
</template>
<script>
export default {
data() {
return {
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
loading: false,
selectedRowKeys: [],
};
},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
props: {
columns: Array,
tableData: Array,
},
methods: {
onSelectChange(selectedRowKeys) {
console.log('selectedRowKeys changed: ', selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
},
},
};
</script>
<style lang="less" scoped>
#commonTable {
margin: 24px;
}
</style>

@ -17,6 +17,16 @@ Vue.use(mixins);
import store from "@/store";
import router from "@/permission";
Vue.config.productionTip = false
import commonTable from './components/table'
// 注册组件
Vue.component('commonTable', commonTable)
router.beforeEach((to, from, next) => {
// 让页面回到顶部
document.documentElement.scrollTop = 0
next()
})
new Vue({
render: h => h(App),

@ -18,9 +18,5 @@ router.beforeEach((to, from, next) => {
router.afterEach(() => {
NProgress.done()
})
// router.beforeEach((to, from, next) => {
// // 让页面回到顶部
// document.documentElement.scrollTop = 0
// next()
// })
export default router

@ -43,7 +43,7 @@ export default new Router({
mode: 'history',
routes: router,
scrollBehavior(to, from, savedPosition) {
console.log(savedPosition);
// console.log(savedPosition);
if (savedPosition) {
return new Promise((resolve) => {
setTimeout(() => {

@ -1,13 +1,24 @@
@import "./antd.less";
// 公共样式
#app{
background: #E5E5E5;
}
.content{
padding: 13px;
}
.main{
padding: 13px;
background: #fff;
}
.cardTitle{
border-left: 8px solid #205FBD;
padding-left:10px;
margin-left: 10px;
margin-bottom: 10px;
}
#app{
background: #E5E5E5;
#commonTable{
margin: 24px;
}
.search-box {
margin: 30px;
}

@ -7,18 +7,18 @@
* @FilePath: /ansu-business/src/views/Login/index.vue
-->
<template>
<div>
<div class="bg">
<div class="logo-box">
<img src="@/assets/images/logo.png" alt="" />
</div>
<div class="login-box">
<a-row>
<a-col :span="12" class="box-a">
<!-- <a-col :span="12" class="box-a">
<img src="@/assets/images/logo.png" alt="" />
</a-col>
<a-col :span="1" class="box-cen"></a-col>
</a-col> -->
<!-- <a-col :span="1" class="box-cen"></a-col> -->
<!-- 登录 -->
<a-col :span="11" class="box-b" v-if="status === 1">
<a-col class="box-b" v-if="status === 1">
<a-tabs v-model="activeName" @change="tabsSwitch">
<a-tab-pane key="1" tab="密码登录">
</a-tab-pane>
@ -45,7 +45,7 @@
</div>
</a-col>
<!-- 注册 -->
<a-col :span="11" class="box-b" v-if="status === 2">
<a-col class="box-b" v-if="status === 2">
<div class="cardTitle">新建账号</div>
<a-form-model
ref="ruleForm"
@ -98,7 +98,7 @@
</a-form-model>
</a-col>
<!-- 找回密码 -->
<a-col :span="11" class="box-b" v-if="status === 3">
<a-col class="box-b" v-if="status === 3">
<div class="cardTitle">找回密码</div>
<a-form-model
ref="ruleForm"
@ -223,6 +223,11 @@ export default {
</script>
<style lang="less" scoped>
.bg{
background-image: url(../../assets/images/loginBg.png);
height: 100vh;
background-size:cover;
}
.logo-box {
text-align: left;
background: #ffffff;
@ -231,16 +236,16 @@ export default {
line-height: 93px;
margin-bottom: 42px;
img {
width: 126px;
width: 61px;
height: 61px;
background: #ffffff;
margin-left: 32px;
margin-left: 42px;
}
}
.login-box {
background: #ffffff;
height: 500px;
width: 989px;
width: 489px;
margin: auto;
}
.box-a {

@ -0,0 +1,176 @@
<template>
<div class="main">
<!-- 标题 -->
<div class="cardTitle">申请入驻管理</div>
<!-- 搜索 -->
<div class="search-box">
<a-space size="large">
<a-input placeholder="请输入申请人/公司名" />
<a-select style="width: 200px" placeholder="选择状态" />
<a-button type="primary"> </a-button>
<a-button> </a-button>
</a-space>
</div>
<!-- 表格 -->
<div id="commonTable">
<div style="margin-bottom: 16px">
<a-button type="primary" :disabled="!hasSelected" :loading="loading">
批量操作
</a-button>
<span style="margin-left: 8px">
<template v-if="hasSelected">
{{ `已选择 ${selectedRowKeys.length}` }}
</template>
</span>
</div>
<a-table
:scroll="{ x: 1300 }"
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
}"
:row-key="
(record, index) => {
return index;
}
"
>
操作
<span slot="action" slot-scope="scope">
<a @click="del(scope)"></a>
<span style="margin: 2px">|</span>
<a @click="detail(scope)"></a>
</span>
<span slot="formatter" slot-scope="scope">{{
scope === 1 ? "可" : ""
}}</span>
</a-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
//
searchForm: {
name: "",
code: "",
},
//
columns: [
{
title: "Name",
dataIndex: "name",
width: "200",
},
{
title: "Gender",
dataIndex: "gender",
width: "200",
},
{
title: "Gender1",
dataIndex: "gender1",
width: "200",
},
{
title: "Gender2",
dataIndex: "gender2",
width: "200",
},
{
title: "Gender3",
dataIndex: "gender3",
width: "200",
},
{
title: "Gender4",
dataIndex: "gender4",
width: "200",
},
{
title: "Gender5",
dataIndex: "gender5",
width: "200",
},
{
title: "Gender6",
dataIndex: "gender6",
width: "200",
},
{
title: "status",
dataIndex: "status",
scopedSlots: { customRender: "formatter" },
width: "200",
},
{
title: "操作",
dataIndex: "action",
key: "action",
width: "200",
fixed: "right",
scopedSlots: { customRender: "action" },
},
],
//
tableData: [
{
name: "11",
id: 1,
status: 1,
},
{},
{},
{},
{},
{},
{},
{},
{},
{},
{},
],
//
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
loading: false,
selectedRowKeys: [],
};
},
mounted(){},
computed: {
hasSelected() {
return this.selectedRowKeys.length > 0;
},
},
methods: {
onSelectChange(selectedRowKeys) {
console.log("selectedRowKeys changed: ", selectedRowKeys);
this.selectedRowKeys = selectedRowKeys;
},
handleTableChange(pagination) {
console.log(pagination);
const pager = { ...this.pagination };
pager.current = pagination.current;
this.pagination = pager;
},
},
};
</script>
<style lang="less" scoped>
</style>>
Loading…
Cancel
Save