提交 9a080546 authored 作者: zwh's avatar zwh

zwh

上级 9827ad00
import axios from './axios'; import axios from './axios';
import url from './index'; // import url from './index';
const server = { const server = {
login(data) { //科协组织数据分布 login(data) { // 登录
return axios('/auth/login', { return axios('/auth/login', {
method: 'post', method: 'post',
data data
}) })
}, },
acRandom() { //科协组织数据分布 acRandom(data) { // 激活码
return axios('/sacs/ac/random?companyId=1&mac=1&sysName=1', { return axios(`/ac/random?companyId=${data.companyId}&mac=${data.mac}&sysName=${data.sysName}`, {
method: 'get' method: 'get'
}) })
}, },
companyInfo(data) { // 获取单位信息
return axios(`/company?id=${data}`, {
data,
method: 'get'
})
},
getNum(data) {
return axios(`/ac/nums?companyId=${data}`, {
data,
method: 'get'
})
},
getList(data) {
return axios(`/ac/acCode?companyId=${data.companyId}&page=${data.page}&size=${data.size}&mac=${data.mac}`, {
data,
method: 'get'
})
}
} }
export default server; export default server;
...@@ -5,20 +5,38 @@ ...@@ -5,20 +5,38 @@
<div class="title-name">基本信息</div> <div class="title-name">基本信息</div>
</div> </div>
<div class="form-size"> <div class="form-size">
<el-form ref="rulesForm" label-position="right" :rules="rules" :model="rulesForm" label-width="160px"> <el-form
<el-form-item label="所在单位/公司:" prop="adviceName"> ref="rulesForm"
label-position="right"
:rules="rules"
:model="rulesForm"
label-width="160px"
>
<el-form-item label="所在单位/公司:" prop="company">
<div class="input-size"> <div class="input-size">
<el-input v-model="rulesForm.adviceName" placeholder="请输入" ></el-input> <el-input
v-model="rulesForm.company"
placeholder="请输入"
:disabled="true"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="公司电话:" prop="adviceName"> <el-form-item label="公司电话:" prop="companytel">
<div class="input-size"> <div class="input-size">
<el-input v-model="rulesForm.adviceName" placeholder="请输入" ></el-input> <el-input
v-model="rulesForm.companytel"
placeholder="请输入"
:disabled="true"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="联系人:" prop="adviceName"> <el-form-item label="联系人:" prop="person">
<div class="input-size"> <div class="input-size">
<el-input v-model="rulesForm.adviceName" placeholder="请输入" ></el-input> <el-input
v-model="rulesForm.person"
:disabled="true"
placeholder="请输入"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
<!-- <el-form-item label="公司所在地:" prop="adviceName"> <!-- <el-form-item label="公司所在地:" prop="adviceName">
...@@ -48,97 +66,95 @@ ...@@ -48,97 +66,95 @@
</el-select> </el-select>
</div> </div>
</el-form-item> --> </el-form-item> -->
<el-form-item label="详细地址:" prop="remarks"> <el-form-item label="详细地址:" prop="adress">
<div class="input-size"> <div class="input-size">
<el-input v-model="rulesForm.remarks" placeholder="请输入标题" ></el-input> <el-input
v-model="rulesForm.address"
:disabled="true"
placeholder="请输入标题"
></el-input>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="bottom-btn"> <!-- <div class="bottom-btn">
<div class="cancel">取消</div> <div class="cancel">取消</div>
<div class="submit">确定</div> <div class="submit">确定</div>
</div> </div> -->
</div> </div>
</template> </template>
<script> <script>
import getMap from '../utils/map' import getMap from "../utils/map";
export default { export default {
data() { data() {
return { return {
rulesForm:{"adviceName": "", rulesForm: {
"advicePerson": "", address: "",
province:'', company: "",
city:'', companytel: "",
areaName:'', person: "",
"adviceUnit": "",
"content": "",
"periods": "",
"publicationDate": "",
"remarks": ""},
rules: {
adviceName: [
{ required: true, message: '请输入', trigger: 'change' }
],
publicationDate: [
{ required: true, message: '请选择', trigger: 'change' }
],
content: [
{ required: true, message: '请输入', trigger: 'change' }
],
advicePerson: [
{ required: true, message: '请输入', trigger: 'change' }
],
adviceUnit: [
{ required: true, message: '请输入', trigger: 'change' }
],
periods: [
{ required: true, message: '请输入', trigger: 'change' }
]
}, },
city2:[], rules: {
province2:[], address: [{ message: "请输入地址", trigger: "change" }],
areaName2:[] company: [{ required: true, message: "请选择", trigger: "change" }],
companytel: [{ required: true, message: "请输入", trigger: "change" }],
} person: [{ required: true, message: "请输入", trigger: "change" }],
}, },
methods:{ city2: [],
changeProvince(pro){ // province2: [],
this.city2 = getMap.getCity(pro) // areaName2: [],
this.rulesForm.city = "" };
this.rulesForm.areaName = ""
}, },
changeCity(pro, cy){ beforeCreate(){
this.areaName2 = getMap.getArea(pro,cy) this.$server.companyInfo(localStorage.getItem('id')).then(res=>{
this.rulesForm.areaName = "" if(res.status===200){
this.rulesForm.address = res.data.address
this.rulesForm.company = res.data.name
this.rulesForm.companytel = res.data.tel
this.rulesForm.person = res.data.contactPerson
}
}).catch(err=>{
console.log(err)
})
}, },
submit(){ methods: {
// changeProvince(pro) {
// this.city2 = getMap.getCity(pro);
// this.rulesForm.city = "";
// this.rulesForm.areaName = "";
// },
// changeCity(pro, cy) {
// this.areaName2 = getMap.getArea(pro, cy);
// this.rulesForm.areaName = "";
// },
submit() {
this.$refs["rulesForm"].validate((valid) => { this.$refs["rulesForm"].validate((valid) => {
if (valid) { if (valid) {
this.$axios.edit(this.rulesForm).then(res=>{ this.$axios
sessionStorage.setItem("add",1) .edit(this.rulesForm)
this.$message.success("操作成功") .then((res) => {
this.$router.back() sessionStorage.setItem("add", 1);
}).catch(err=>{ this.$message.success("操作成功");
this.$router.back();
}) })
}else{ .catch((err) => {});
return false } else {
return false;
} }
}) });
}, },
cancel(){ // cancel() {
sessionStorage.setItem("add",1) // sessionStorage.setItem("add", 1);
this.$router.back() // this.$router.back();
// },
}, },
}, // mounted() {
mounted(){ // this.province2 = getMap.getProvince();
this.province2 = getMap.getProvince() // },
} };
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.content-add{ .content-add {
width: 100%; width: 100%;
height: 100%; height: 100%;
box-sizing: border-box; box-sizing: border-box;
...@@ -150,41 +166,41 @@ export default { ...@@ -150,41 +166,41 @@ export default {
font-weight: normal; font-weight: normal;
font-stretch: normal; font-stretch: normal;
letter-spacing: 0px; letter-spacing: 0px;
.form-size{ .form-size {
margin-left: 350px; margin-left: 350px;
margin-top: 80px; margin-top: 80px;
} }
.input-size{ .input-size {
width: 600px; width: 600px;
} }
.same-title{ .same-title {
display: flex; display: flex;
height: 22px; height: 22px;
align-items: center; align-items: center;
font-size: 20px; font-size: 20px;
font-family: "AlibabaPuHuiTi-Medium"; font-family: "AlibabaPuHuiTi-Medium";
font-weight: normal; font-weight: normal;
color: #1F295D; color: #1f295d;
line-height: 22px; line-height: 22px;
.title-icon{ .title-icon {
width: 6px; width: 6px;
height: 20px; height: 20px;
background-image: url('../assets/img/split.png'); background-image: url("../assets/img/split.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
margin-right: 4px; margin-right: 4px;
} }
} }
/deep/ .el-form .el-form-item{ /deep/ .el-form .el-form-item {
margin-bottom: 40px; margin-bottom: 40px;
} }
/deep/ .el-form .el-form-item__label{ /deep/ .el-form .el-form-item__label {
font-family: "AlibabaPuHuiTi-Regular"; font-family: "AlibabaPuHuiTi-Regular";
font-size: 16px; font-size: 16px;
font-weight: normal; font-weight: normal;
font-stretch: normal; font-stretch: normal;
letter-spacing: 0px; letter-spacing: 0px;
color: #747C93; color: #747c93;
} }
// .inline-form{ // .inline-form{
// display: flex !important; // display: flex !important;
...@@ -215,14 +231,14 @@ export default { ...@@ -215,14 +231,14 @@ export default {
// color: #333333; // color: #333333;
// min-height:400px !important; // min-height:400px !important;
// } // }
.backList{ .backList {
width: 100%; width: 100%;
height: 32px; height: 32px;
display: flex; display: flex;
border-bottom: 1px dashed #dedede; border-bottom: 1px dashed #dedede;
margin-bottom: 40px; margin-bottom: 40px;
} }
.up-rect{ .up-rect {
width: 36px; width: 36px;
height: 36px; height: 36px;
background-color: #f5f5f5; background-color: #f5f5f5;
...@@ -232,13 +248,14 @@ export default { ...@@ -232,13 +248,14 @@ export default {
justify-content: center; justify-content: center;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
.up-icon{ .up-icon {
width: 16px;height: 14px; width: 16px;
background-image: url('../assets/img/upload_icon.png'); height: 14px;
background-image: url("../assets/img/upload_icon.png");
cursor: pointer; cursor: pointer;
} }
} }
.bottom-btn{ .bottom-btn {
font-family: "AlibabaPuHuiTi-Medium"; font-family: "AlibabaPuHuiTi-Medium";
font-size: 20px; font-size: 20px;
font-weight: normal; font-weight: normal;
...@@ -251,7 +268,7 @@ export default { ...@@ -251,7 +268,7 @@ export default {
justify-content: center; justify-content: center;
margin-top: 70px; margin-top: 70px;
.cancel{ .cancel {
cursor: pointer; cursor: pointer;
width: 158px; width: 158px;
height: 50px; height: 50px;
...@@ -261,7 +278,7 @@ export default { ...@@ -261,7 +278,7 @@ export default {
color: #317ce3; color: #317ce3;
margin-right: 92px; margin-right: 92px;
} }
.submit{ .submit {
cursor: pointer; cursor: pointer;
width: 158px; width: 158px;
height: 50px; height: 50px;
...@@ -270,6 +287,5 @@ export default { ...@@ -270,6 +287,5 @@ export default {
color: #ffffff; color: #ffffff;
} }
} }
} }
</style> </style>
\ No newline at end of file
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
<div class="bind-input"> <div class="bind-input">
<div class="bind-name">序列号:</div> <div class="bind-name">序列号:</div>
<div class="bind-size"> <div class="bind-size">
<el-input placeholder="请输入序列号"></el-input> <el-input placeholder="请输入序列号" v-model="serial"></el-input>
</div> </div>
</div> </div>
<div class="bind-input"> <div class="bind-input">
<div class="bind-name">激活码:</div> <div class="bind-name">激活码:</div>
<div class="bind-size2"> <div class="bind-size2">
<el-input placeholder="请输入序列号"></el-input> <el-input placeholder="激活码" v-model="Activation"></el-input>
</div> </div>
<div class="bind-btn" @click="getRandom">激活</div> <div class="bind-btn" @click="getRandom">激活</div>
</div> </div>
...@@ -27,14 +27,13 @@ ...@@ -27,14 +27,13 @@
</div> </div>
<div class="use-center"> <div class="use-center">
<div class="num-c"> <div class="num-c">
<div class="num-font">123</div> <div class="num-font">{{ useNum }}</div>
<div class="num-name">使用数量</div> <div class="num-name">使用数量</div>
</div> </div>
<div class="num-c" style="background-color: #42CBD4;"> <div class="num-c" style="background-color: #42cbd4">
<div class="num-font">123</div> <div class="num-font">{{ buyNum }}</div>
<div class="num-name">购买数量</div> <div class="num-name">购买数量</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
...@@ -47,44 +46,24 @@ ...@@ -47,44 +46,24 @@
<div class="right-search"> <div class="right-search">
<div class="search-font">MAC地址:</div> <div class="search-font">MAC地址:</div>
<div class="input-c"> <div class="input-c">
<el-input></el-input> <el-input v-model="mac" @keyup.enter.native="search"></el-input>
</div> </div>
<div class="search-btn">查询</div> <div class="search-btn" @click="search">查询</div>
</div> </div>
</div> </div>
<div class="table"> <div class="table">
<el-table <el-table :data="tableData" stripe border style="width: 100%">
:data="tableData" <el-table-column type="index" align="center" label="序号" width="100">
stripe
border
style="width: 100%">
<el-table-column
type="index"
align="center"
label="序号"
width="100">
</el-table-column>
<el-table-column
prop="date"
label="绑定时间"
width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="creatTime" label="生成时间" width="180">
prop="name"
label="MAC地址"
width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="mac" label="MAC地址" width="180">
prop="address"
label="授权码">
</el-table-column> </el-table-column>
<el-table-column prop="activationCode" label="授权码"> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="page"> <div class="page">
<el-pagination <el-pagination background layout="prev, pager, next" :total="total" :page-size='size' @current-change='pageChange'>
background
layout="prev, pager, next"
:total="100">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
...@@ -94,137 +73,183 @@ ...@@ -94,137 +73,183 @@
export default { export default {
data() { data() {
return { return {
tableData:[ tableData: [],
{ useNum: "", // 使用数量
date:'123', buyNum: "", // 购买数量
name:'m1', serial: "", // 序列号
address:'123' Activation: "", //激活码
sysname: "", // 系统名称
page:0,// 当前页
size:4,// 条数
total:0,// 总页数
mac:'',// mac查询
};
}, },
{ created() {
date:'123', this.getInfo();
name:'m1', this.getNum();
address:'123' this.getList()
}, },
{ methods: {
date:'123', getInfo() {
name:'m1', this.$server
address:'123' .companyInfo(localStorage.getItem("id"))
}, .then((res) => {
{ if (res.status === 200) {
date:'123', this.sysname = res.data.sysName;
name:'m1', }
address:'123' })
.catch((err) => {
console.log(err);
});
}, },
{ getRandom() {
date:'123', let param = {
name:'m1', companyId: localStorage.getItem("id"),
address:'123' mac: this.serial, // 序列号
sysName: this.sysname,
};
this.$server.acRandom(param).then((res) => {
if (res.status === 200) {
this.Activation = res.data.code;
}
});
}, },
{ // 获取数量
date:'123', getNum() {
name:'m1', this.$server
address:'123' .getNum(localStorage.getItem("id"))
.then((res) => {
if (res.status === 200) {
this.buyNum = res.data.limit;
this.useNum = res.data.now;
} }
]
}
},
methods: {
getRandom(){
this.$server.acRandom().then(res=>{
console.log(res);
}) })
.catch((err) => {
console.log(err);
});
},
// 列表获取
getList() {
let param = {
companyId: localStorage.getItem("id"),
mac:this.mac,
page:this.page,
size:this.size
};
this.$server
.getList(param)
.then((res) => {
if(res.status===200){
this.total = res.data.total
this.tableData = res.data.data
} }
})
.catch((err) => {
console.log(err);
});
},
// 页码切换
pageChange(page){
this.page = page-1
this.getList()
},
// 查询
search(){
this.page = 0
this.getList()
}, },
} },
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.content-home{ .content-home {
width: 100%; width: 100%;
height: 100%; height: 100%;
// border: 1px solid red; // border: 1px solid red;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
.same-padding{ .same-padding {
box-sizing: border-box; box-sizing: border-box;
padding: 30px 40px; padding: 30px 40px;
} }
.same-title{ .same-title {
display: flex; display: flex;
height: 22px; height: 22px;
align-items: center; align-items: center;
font-size: 20px; font-size: 20px;
font-family: "AlibabaPuHuiTi-Medium"; font-family: "AlibabaPuHuiTi-Medium";
font-weight: normal; font-weight: normal;
color: #1F295D; color: #1f295d;
line-height: 22px; line-height: 22px;
.title-icon{ .title-icon {
width: 6px; width: 6px;
height: 20px; height: 20px;
background-image: url('../assets/img/split.png'); background-image: url("../assets/img/split.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
margin-right: 4px; margin-right: 4px;
} }
} }
.content-top{ .content-top {
width: 100%; width: 100%;
height: 36%; height: 36%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.bind{ .bind {
width: 1000px; width: 1000px;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
.bind-input{ .bind-input {
display: flex; display: flex;
margin-top:5%; margin-top: 5%;
margin-left: 63px; margin-left: 63px;
align-items: center; align-items: center;
.bind-btn{ .bind-btn {
width: 100px; width: 100px;
height: 40px; height: 40px;
background: #4176F0; background: #4176f0;
font-size: 18px; font-size: 18px;
// font-family: AlibabaPuHuiTiR; // font-family: AlibabaPuHuiTiR;
color: #FFFFFF; color: #ffffff;
line-height: 40px; line-height: 40px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #4176F0; border: 1px solid #4176f0;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
margin-left: 20px; margin-left: 20px;
&:hover{ &:hover {
// box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.5); // box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.5);
opacity: 0.8; opacity: 0.8;
} }
} }
.bind-name{ .bind-name {
width: 72px; width: 72px;
height: 25px; height: 25px;
font-size: 18px; font-size: 18px;
// font-family: AlibabaPuHuiTiR; // font-family: AlibabaPuHuiTiR;
color: #747C93; color: #747c93;
line-height: 25px; line-height: 25px;
} }
.bind-size{ .bind-size {
width: 600px; width: 600px;
height: 40px; height: 40px;
margin-left: 12px; margin-left: 12px;
} }
.bind-size2{ .bind-size2 {
width: 480px; width: 480px;
height: 40px; height: 40px;
margin-left: 12px; margin-left: 12px;
} }
} }
} }
.use-num{ .use-num {
width: 640px; width: 640px;
height: 100%; height: 100%;
background-color: #fff; background-color: #fff;
.use-center{ .use-center {
width: 100%; width: 100%;
height: calc(100% - 22px); height: calc(100% - 22px);
display: flex; display: flex;
...@@ -232,10 +257,10 @@ export default { ...@@ -232,10 +257,10 @@ export default {
padding: 0 18px; padding: 0 18px;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.num-c{ .num-c {
width: 220px; width: 220px;
height: 120px; height: 120px;
background: #4176F0; background: #4176f0;
box-shadow: 0px 2px 8px 0px rgba(70, 88, 173, 0.4); box-shadow: 0px 2px 8px 0px rgba(70, 88, 173, 0.4);
border-radius: 10px; border-radius: 10px;
color: #fff; color: #fff;
...@@ -244,19 +269,19 @@ export default { ...@@ -244,19 +269,19 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
.num-font{ .num-font {
font-size: 42px; font-size: 42px;
font-family: "Helvetica-Bold"; font-family: "Helvetica-Bold";
font-weight: bold; font-weight: bold;
letter-spacing: 2px; letter-spacing: 2px;
line-height: 50px; line-height: 50px;
color: #FFFFFF; color: #ffffff;
} }
.num-name{ .num-name {
font-size: 20px; font-size: 20px;
font-weight: normal; font-weight: normal;
color: #FFFFFF; color: #ffffff;
line-height: 27px; line-height: 27px;
letter-spacing: 1px; letter-spacing: 1px;
} }
...@@ -264,126 +289,135 @@ export default { ...@@ -264,126 +289,135 @@ export default {
} }
} }
} }
.content-bottom{ .content-bottom {
width: 100%; width: 100%;
height: 62%; height: 62%;
background-color: #fff; background-color: #fff;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.top-list{ .top-list {
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: flex-start; align-items: flex-start;
height: 64px; height: 64px;
.right-search{ .right-search {
display: flex; display: flex;
height: 40px; height: 40px;
align-items: center; align-items: center;
.input-c{ .input-c {
width: 320px; width: 320px;
height: 40px; height: 40px;
margin: 0 10px; margin: 0 10px;
} }
.search-font{ .search-font {
font-size: 18px; font-size: 18px;
// font-family: AlibabaPuHuiTiR; // font-family: AlibabaPuHuiTiR;
color: #747C93; color: #747c93;
} }
.search-btn{ .search-btn {
width: 95px; width: 95px;
height: 38px; height: 38px;
background: #4176F0; background: #4176f0;
font-size: 18px; font-size: 18px;
// font-family: AlibabaPuHuiTiR; // font-family: AlibabaPuHuiTiR;
color: #FFFFFF; color: #ffffff;
line-height: 40px; line-height: 40px;
border-radius: 4px; border-radius: 4px;
border: 1px solid #4176F0; border: 1px solid #4176f0;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
// margin-left: 20px; // margin-left: 20px;
&:hover{ &:hover {
// box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.5); // box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.5);
opacity: 0.8; opacity: 0.8;
} }
} }
} }
} }
.table{ .table {
flex: 1; flex: 1;
// border: 1px solid red; // border: 1px solid red;
overflow-y:auto ; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
/deep/ .el-table .el-table__header-wrapper .has-gutter tr th:first-child{ /deep/ .el-table .el-table__header-wrapper .has-gutter tr th:first-child {
padding-left: 0px; padding-left: 0px;
} }
/deep/ .el-table .el-table__header-wrapper .has-gutter tr th{ /deep/ .el-table .el-table__header-wrapper .has-gutter tr th {
border: none; border: none;
background-color:#CFD6E3 ; background-color: #cfd6e3;
font-size: 20px; font-size: 20px;
font-family: "AlibabaPuHuiTi-Regular"; font-family: "AlibabaPuHuiTi-Regular";
letter-spacing: 1px; letter-spacing: 1px;
// font-weight: 500; // font-weight: 500;
color: #1F295D; color: #1f295d;
padding-left: 30px; padding-left: 30px;
} }
/deep/ .el-table .el-table__body-wrapper .el-table__body .el-table__row--striped{ /deep/
.el-table
.el-table__body-wrapper
.el-table__body
.el-table__row--striped {
// height: 40px; // height: 40px;
td{ td {
background-color: #F4F6F9; background-color: #f4f6f9;
} }
} }
/deep/ .el-table .el-table__body-wrapper .el-table__body tr td:first-child { /deep/
.el-table
.el-table__body-wrapper
.el-table__body
tr
td:first-child {
padding-left: 0; padding-left: 0;
} }
/deep/ .el-table .el-table__body-wrapper .el-table__body tr td{ /deep/ .el-table .el-table__body-wrapper .el-table__body tr td {
padding-left:30px ; padding-left: 30px;
font-size: 16px; font-size: 16px;
// font-family: AlibabaPuHuiTiR; // font-family: AlibabaPuHuiTiR;
color: #747C93; color: #747c93;
line-height: 25px; line-height: 25px;
} }
} }
.page{ .page {
height: 64px; height: 64px;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: flex-end; align-items: flex-end;
justify-content: flex-end; justify-content: flex-end;
/deep/ .el-pagination .el-pager{ /deep/ .el-pagination .el-pager {
.number{ .number {
background-color: #fff; background-color: #fff;
border: 1px solid #E5EBEF; border: 1px solid #e5ebef;
color: #778CA2; color: #778ca2;
} }
.el-icon-more{ .el-icon-more {
background-color: #fff; background-color: #fff;
line-height: 40px; line-height: 40px;
} }
.el-icon-d-arrow-right{ .el-icon-d-arrow-right {
background-color: #fff; background-color: #fff;
border: 1px solid #E5EBEF; border: 1px solid #e5ebef;
color: #778CA2; color: #778ca2;
} }
} }
/deep/ .el-pagination .el-pager .number.active{ /deep/ .el-pagination .el-pager .number.active {
background-color: #4176F0; background-color: #4176f0;
color: #fff; color: #fff;
} }
/deep/ .el-pagination .btn-next{ /deep/ .el-pagination .btn-next {
background-color: #fff; background-color: #fff;
border: 1px solid #E5EBEF; border: 1px solid #e5ebef;
color: #778CA2; color: #778ca2;
// &:hover{ // &:hover{
// background-color: #4176F0; // background-color: #4176F0;
// color: #fff; // color: #fff;
// } // }
} }
/deep/ .el-pagination .btn-prev{ /deep/ .el-pagination .btn-prev {
background-color: #fff; background-color: #fff;
border: 1px solid #E5EBEF; border: 1px solid #e5ebef;
color: #778CA2; color: #778ca2;
// &:hover{ // &:hover{
// background-color: #4176F0; // background-color: #4176F0;
// color: #fff; // color: #fff;
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
watch:{ watch:{
"$route.path": { "$route.path": {
handler(newName, oldName) { handler(newName, oldName) {
    console.log(newName); //     console.log(newName);
this.nowRouter = newName this.nowRouter = newName
}, },
 immediate: true  immediate: true
...@@ -60,6 +60,7 @@ export default { ...@@ -60,6 +60,7 @@ export default {
methods: { methods: {
logout(){ logout(){
this.$router.push('/login') this.$router.push('/login')
localStorage.clear();
}, },
jumRouter(router){ jumRouter(router){
this.$router.push(router) this.$router.push(router)
......
...@@ -45,13 +45,27 @@ export default { ...@@ -45,13 +45,27 @@ export default {
}, },
methods: { methods: {
login(){ login(){
if(!this.userNameLogin){
this.$message.error('请输入用户名')
return
}
if(!this.passwordLogin){
this.$message.error('请输入密码')
return
}
let data = { let data = {
"password": this.passwordLogin, "password": this.passwordLogin,
"rememberMe": true, "rememberMe": true,
"username": this.userNameLogin "username": this.userNameLogin
} }
this.$server.login(data).then(res=>{ this.$server.login(data).then(res=>{
console.log(res); console.log(res);
if(res.status===200){
localStorage.setItem('token',res.data.authorization)
localStorage.setItem('id',res.data.companyId)
this.$router.push('/home')
}
}) })
} }
}, },
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论