提交 f1cb05cf authored 作者: zwh's avatar zwh

合并分支 'zwh' 到 'master'

zwh 查看合并请求 !1
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;
<template> <template>
<div class="content-add"> <div class="content-add">
<div class="same-title"> <div class="same-title">
<div class="title-icon"></div> <div class="title-icon"></div>
<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"
<div class="input-size"> label-position="right"
<el-input v-model="rulesForm.adviceName" placeholder="请输入" ></el-input> :rules="rules"
</div> :model="rulesForm"
</el-form-item> label-width="160px"
<el-form-item label="公司电话:" prop="adviceName"> >
<div class="input-size"> <el-form-item label="所在单位/公司:" prop="company">
<el-input v-model="rulesForm.adviceName" placeholder="请输入" ></el-input> <div class="input-size">
</div> <el-input
</el-form-item> v-model="rulesForm.company"
<el-form-item label="联系人:" prop="adviceName"> placeholder="请输入"
<div class="input-size"> :disabled="true"
<el-input v-model="rulesForm.adviceName" placeholder="请输入" ></el-input> ></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">
<el-input
v-model="rulesForm.companytel"
placeholder="请输入"
:disabled="true"
></el-input>
</div>
</el-form-item>
<el-form-item label="联系人:" prop="person">
<div class="input-size">
<el-input
v-model="rulesForm.person"
:disabled="true"
placeholder="请输入"
></el-input>
</div>
</el-form-item>
<!-- <el-form-item label="公司所在地:" prop="adviceName">
<div class="input-size"> <div class="input-size">
<el-select <el-select
v-model="rulesForm.province" v-model="rulesForm.province"
...@@ -48,228 +66,226 @@ ...@@ -48,228 +66,226 @@
</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
</div> v-model="rulesForm.address"
</el-form-item> :disabled="true"
</el-form> placeholder="请输入标题"
</div> ></el-input>
<div class="bottom-btn"> </div>
<div class="cancel">取消</div> </el-form-item>
<div class="submit">确定</div> </el-form>
</div>
</div> </div>
<!-- <div class="bottom-btn">
<div class="cancel">取消</div>
<div class="submit">确定</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:[],
province2:[],
areaName2:[]
}
},
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) => {
if (valid) {
this.$axios.edit(this.rulesForm).then(res=>{
sessionStorage.setItem("add",1)
this.$message.success("操作成功")
this.$router.back()
}).catch(err=>{
})
}else{
return false
}
})
},
cancel(){
sessionStorage.setItem("add",1)
this.$router.back()
}, },
rules: {
address: [{ message: "请输入地址", trigger: "change" }],
company: [{ required: true, message: "请选择", trigger: "change" }],
companytel: [{ required: true, message: "请输入", trigger: "change" }],
person: [{ required: true, message: "请输入", trigger: "change" }],
},
city2: [],
// province2: [],
// areaName2: [],
};
},
beforeCreate(){
this.$server.companyInfo(localStorage.getItem('id')).then(res=>{
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)
})
},
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) => {
if (valid) {
this.$axios
.edit(this.rulesForm)
.then((res) => {
sessionStorage.setItem("add", 1);
this.$message.success("操作成功");
this.$router.back();
})
.catch((err) => {});
} else {
return false;
}
});
}, },
mounted(){ // cancel() {
this.province2 = getMap.getProvince() // sessionStorage.setItem("add", 1);
} // this.$router.back();
} // },
},
// mounted() {
// 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;
padding: 20px 36px; padding: 20px 36px;
overflow-y: auto; overflow-y: auto;
font-family: "AlibabaPuHuiTi-Regular"; font-family: "AlibabaPuHuiTi-Regular";
font-size: 16px; font-size: 16px;
background-color: #fff; background-color: #fff;
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{ }
margin-bottom: 40px; /deep/ .el-form .el-form-item {
} margin-bottom: 40px;
/deep/ .el-form .el-form-item__label{ }
font-family: "AlibabaPuHuiTi-Regular"; /deep/ .el-form .el-form-item__label {
font-size: 16px; font-family: "AlibabaPuHuiTi-Regular";
font-weight: normal; font-size: 16px;
font-stretch: normal; font-weight: normal;
letter-spacing: 0px; font-stretch: normal;
color: #747C93; letter-spacing: 0px;
color: #747c93;
}
// .inline-form{
// display: flex !important;
// justify-content: space-between;
// /deep/ .el-form-item{
// width: 32%;
// }
// /deep/ .el-form-item .el-form-item__content{
// width: calc(100% - 120px);
// }
// }
// .inline-form2{
// display: flex !important;
// // justify-content: space-between;
// /deep/ .el-form-item{
// width: 33%;
// }
// /deep/ .el-form-item .el-form-item__content{
// width: calc(100% - 120px);
// }
// }
// /deep/ .el-textarea .el-textarea__inner{
// font-family: "AlibabaPuHuiTi-Regular";
// font-size: 16px;
// font-weight: normal;
// font-stretch: normal;
// letter-spacing: 0px;
// color: #333333;
// min-height:400px !important;
// }
.backList {
width: 100%;
height: 32px;
display: flex;
border-bottom: 1px dashed #dedede;
margin-bottom: 40px;
}
.up-rect {
width: 36px;
height: 36px;
background-color: #f5f5f5;
border-radius: 2px;
border: solid 1px #c8c8c8;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
.up-icon {
width: 16px;
height: 14px;
background-image: url("../assets/img/upload_icon.png");
cursor: pointer;
} }
// .inline-form{ }
// display: flex !important; .bottom-btn {
// justify-content: space-between; font-family: "AlibabaPuHuiTi-Medium";
// /deep/ .el-form-item{ font-size: 20px;
// width: 32%; font-weight: normal;
// } font-stretch: normal;
// /deep/ .el-form-item .el-form-item__content{ text-align: center;
// width: calc(100% - 120px); line-height: 50px;
// } letter-spacing: 4px;
// } width: 100%;
// .inline-form2{ display: flex;
// display: flex !important; justify-content: center;
// // justify-content: space-between; margin-top: 70px;
// /deep/ .el-form-item{
// width: 33%; .cancel {
// } cursor: pointer;
// /deep/ .el-form-item .el-form-item__content{ width: 158px;
// width: calc(100% - 120px); height: 50px;
// } background-color: #ffffff;
// } border-radius: 4px;
// /deep/ .el-textarea .el-textarea__inner{ border: solid 1px #5c87c1;
// font-family: "AlibabaPuHuiTi-Regular"; color: #317ce3;
// font-size: 16px; margin-right: 92px;
// font-weight: normal;
// font-stretch: normal;
// letter-spacing: 0px;
// color: #333333;
// min-height:400px !important;
// }
.backList{
width: 100%;
height: 32px;
display: flex;
border-bottom: 1px dashed #dedede;
margin-bottom: 40px;
} }
.up-rect{ .submit {
width: 36px; cursor: pointer;
height: 36px; width: 158px;
background-color: #f5f5f5; height: 50px;
border-radius: 2px; background-color: #2570d7;
border: solid 1px #c8c8c8; border-radius: 4px;
display: flex; color: #ffffff;
justify-content: center;
align-items: center;
cursor: pointer;
.up-icon{
width: 16px;height: 14px;
background-image: url('../assets/img/upload_icon.png');
cursor: pointer;
}
} }
.bottom-btn{ }
font-family: "AlibabaPuHuiTi-Medium";
font-size: 20px;
font-weight: normal;
font-stretch: normal;
text-align: center;
line-height: 50px;
letter-spacing: 4px;
width: 100%;
display: flex;
justify-content: center;
margin-top: 70px;
.cancel{
cursor: pointer;
width: 158px;
height: 50px;
background-color: #ffffff;
border-radius: 4px;
border: solid 1px #5c87c1;
color: #317ce3;
margin-right: 92px;
}
.submit{
cursor: pointer;
width: 158px;
height: 50px;
background-color: #2570d7;
border-radius: 4px;
color: #ffffff;
}
}
} }
</style> </style>
\ No newline at end of file
<template> <template>
<div class="content-home"> <div class="content-home">
<div class="content-top"> <div class="content-top">
<div class="bind same-padding"> <div class="bind same-padding">
<div class="same-title"> <div class="same-title">
<div class="title-icon"></div> <div class="title-icon"></div>
<div class="title-name">授权绑定</div> <div class="title-name">授权绑定</div>
</div>
<div class="bind-input">
<div class="bind-name">序列号:</div>
<div class="bind-size">
<el-input placeholder="请输入序列号"></el-input>
</div>
</div>
<div class="bind-input">
<div class="bind-name">激活码:</div>
<div class="bind-size2">
<el-input placeholder="请输入序列号"></el-input>
</div>
<div class="bind-btn" @click="getRandom">激活</div>
</div>
</div>
<div class="use-num same-padding">
<div class="same-title">
<div class="title-icon"></div>
<div class="title-name">使用数量/购买数量</div>
</div>
<div class="use-center">
<div class="num-c">
<div class="num-font">123</div>
<div class="num-name">使用数量</div>
</div>
<div class="num-c" style="background-color: #42CBD4;">
<div class="num-font">123</div>
<div class="num-name">购买数量</div>
</div>
</div>
</div>
</div> </div>
<div class="content-bottom same-padding"> <div class="bind-input">
<div class="top-list"> <div class="bind-name">序列号:</div>
<div class="same-title"> <div class="bind-size">
<div class="title-icon"></div> <el-input placeholder="请输入序列号" v-model="serial"></el-input>
<div class="title-name">使用列表</div> </div>
</div>
<div class="right-search">
<div class="search-font">MAC地址:</div>
<div class="input-c">
<el-input></el-input>
</div>
<div class="search-btn">查询</div>
</div>
</div>
<div class="table">
<el-table
:data="tableData"
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
prop="name"
label="MAC地址"
width="180">
</el-table-column>
<el-table-column
prop="address"
label="授权码">
</el-table-column>
</el-table>
</div>
<div class="page">
<el-pagination
background
layout="prev, pager, next"
:total="100">
</el-pagination>
</div>
</div> </div>
<div class="bind-input">
<div class="bind-name">激活码:</div>
<div class="bind-size2">
<el-input placeholder="激活码" v-model="Activation"></el-input>
</div>
<div class="bind-btn" @click="getRandom">激活</div>
</div>
</div>
<div class="use-num same-padding">
<div class="same-title">
<div class="title-icon"></div>
<div class="title-name">使用数量/购买数量</div>
</div>
<div class="use-center">
<div class="num-c">
<div class="num-font">{{ useNum }}</div>
<div class="num-name">使用数量</div>
</div>
<div class="num-c" style="background-color: #42cbd4">
<div class="num-font">{{ buyNum }}</div>
<div class="num-name">购买数量</div>
</div>
</div>
</div>
</div>
<div class="content-bottom same-padding">
<div class="top-list">
<div class="same-title">
<div class="title-icon"></div>
<div class="title-name">使用列表</div>
</div>
<div class="right-search">
<div class="search-font">MAC地址:</div>
<div class="input-c">
<el-input v-model="mac" @keyup.enter.native="search"></el-input>
</div>
<div class="search-btn" @click="search">查询</div>
</div>
</div>
<div class="table">
<el-table :data="tableData" stripe border style="width: 100%">
<el-table-column type="index" align="center" label="序号" width="100">
</el-table-column>
<el-table-column prop="creatTime" label="生成时间" width="180">
</el-table-column>
<el-table-column prop="mac" label="MAC地址" width="180">
</el-table-column>
<el-table-column prop="activationCode" label="授权码"> </el-table-column>
</el-table>
</div>
<div class="page">
<el-pagination background layout="prev, pager, next" :total="total" :page-size='size' @current-change='pageChange'>
</el-pagination>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
tableData:[ tableData: [],
{ useNum: "", // 使用数量
date:'123', buyNum: "", // 购买数量
name:'m1', serial: "", // 序列号
address:'123' Activation: "", //激活码
}, sysname: "", // 系统名称
{ page:0,// 当前页
date:'123', size:4,// 条数
name:'m1', total:0,// 总页数
address:'123' mac:'',// mac查询
}, };
{ },
date:'123', created() {
name:'m1', this.getInfo();
address:'123' this.getNum();
}, this.getList()
{ },
date:'123', methods: {
name:'m1', getInfo() {
address:'123' this.$server
}, .companyInfo(localStorage.getItem("id"))
{ .then((res) => {
date:'123', if (res.status === 200) {
name:'m1', this.sysname = res.data.sysName;
address:'123' }
}, })
{ .catch((err) => {
date:'123', console.log(err);
name:'m1', });
address:'123'
}
]
}
}, },
methods: { getRandom() {
getRandom(){ let param = {
this.$server.acRandom().then(res=>{ companyId: localStorage.getItem("id"),
console.log(res); mac: this.serial, // 序列号
}) sysName: this.sysname,
};
this.$server.acRandom(param).then((res) => {
if (res.status === 200) {
this.Activation = res.data.code;
} }
});
}, },
// 获取数量
} getNum() {
this.$server
.getNum(localStorage.getItem("id"))
.then((res) => {
if (res.status === 200) {
this.buyNum = res.data.limit;
this.useNum = res.data.now;
}
})
.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%;
height: 100%;
// border: 1px solid red;
display: flex;
flex-direction: column;
justify-content: space-between;
.same-padding {
box-sizing: border-box;
padding: 30px 40px;
}
.same-title {
display: flex;
height: 22px;
align-items: center;
font-size: 20px;
font-family: "AlibabaPuHuiTi-Medium";
font-weight: normal;
color: #1f295d;
line-height: 22px;
.title-icon {
width: 6px;
height: 20px;
background-image: url("../assets/img/split.png");
background-size: 100% 100%;
background-repeat: no-repeat;
margin-right: 4px;
}
}
.content-top {
width: 100%; width: 100%;
height: 100%; height: 36%;
// border: 1px solid red;
display: flex; display: flex;
flex-direction: column;
justify-content: space-between; justify-content: space-between;
.same-padding{ .bind {
box-sizing: border-box; width: 1000px;
padding: 30px 40px; height: 100%;
} background-color: #fff;
.same-title{ .bind-input {
display: flex; display: flex;
height: 22px; margin-top: 5%;
margin-left: 63px;
align-items: center; align-items: center;
font-size: 20px; .bind-btn {
font-family: "AlibabaPuHuiTi-Medium"; width: 100px;
font-weight: normal; height: 40px;
color: #1F295D; background: #4176f0;
line-height: 22px; font-size: 18px;
.title-icon{ // font-family: AlibabaPuHuiTiR;
width: 6px; color: #ffffff;
height: 20px; line-height: 40px;
background-image: url('../assets/img/split.png'); border-radius: 4px;
background-size: 100% 100%; border: 1px solid #4176f0;
background-repeat: no-repeat; text-align: center;
margin-right: 4px; cursor: pointer;
margin-left: 20px;
&:hover {
// box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.5);
opacity: 0.8;
}
}
.bind-name {
width: 72px;
height: 25px;
font-size: 18px;
// font-family: AlibabaPuHuiTiR;
color: #747c93;
line-height: 25px;
}
.bind-size {
width: 600px;
height: 40px;
margin-left: 12px;
} }
.bind-size2 {
width: 480px;
height: 40px;
margin-left: 12px;
}
}
} }
.content-top{ .use-num {
width: 640px;
height: 100%;
background-color: #fff;
.use-center {
width: 100%; width: 100%;
height: 36%; height: calc(100% - 22px);
display: flex; display: flex;
box-sizing: border-box;
padding: 0 18px;
justify-content: space-between; justify-content: space-between;
.bind{ align-items: center;
width: 1000px; .num-c {
height: 100%; width: 220px;
background-color: #fff; height: 120px;
.bind-input{ background: #4176f0;
display: flex; box-shadow: 0px 2px 8px 0px rgba(70, 88, 173, 0.4);
margin-top:5%; border-radius: 10px;
margin-left: 63px; color: #fff;
align-items: center; box-sizing: border-box;
.bind-btn{ padding-left: 20px;
width: 100px; display: flex;
height: 40px; flex-direction: column;
background: #4176F0; justify-content: center;
font-size: 18px; .num-font {
// font-family: AlibabaPuHuiTiR; font-size: 42px;
color: #FFFFFF; font-family: "Helvetica-Bold";
line-height: 40px; font-weight: bold;
border-radius: 4px; letter-spacing: 2px;
border: 1px solid #4176F0;
text-align: center; line-height: 50px;
cursor: pointer; color: #ffffff;
margin-left: 20px; }
&:hover{ .num-name {
// box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.5); font-size: 20px;
opacity: 0.8; font-weight: normal;
} color: #ffffff;
} line-height: 27px;
.bind-name{ letter-spacing: 1px;
width: 72px; }
height: 25px;
font-size: 18px;
// font-family: AlibabaPuHuiTiR;
color: #747C93;
line-height: 25px;
}
.bind-size{
width: 600px;
height: 40px;
margin-left: 12px;
}
.bind-size2{
width: 480px;
height: 40px;
margin-left: 12px;
}
}
}
.use-num{
width: 640px;
height: 100%;
background-color: #fff;
.use-center{
width: 100%;
height: calc(100% - 22px);
display: flex;
box-sizing: border-box;
padding: 0 18px;
justify-content: space-between;
align-items: center;
.num-c{
width: 220px;
height: 120px;
background: #4176F0;
box-shadow: 0px 2px 8px 0px rgba(70, 88, 173, 0.4);
border-radius: 10px;
color: #fff;
box-sizing: border-box;
padding-left: 20px;
display: flex;
flex-direction: column;
justify-content: center;
.num-font{
font-size: 42px;
font-family: "Helvetica-Bold";
font-weight: bold;
letter-spacing: 2px;
line-height: 50px;
color: #FFFFFF;
}
.num-name{
font-size: 20px;
font-weight: normal;
color: #FFFFFF;
line-height: 27px;
letter-spacing: 1px;
}
}
}
} }
}
} }
.content-bottom{ }
width: 100%; .content-bottom {
height: 62%; width: 100%;
background-color: #fff; height: 62%;
background-color: #fff;
display: flex;
flex-direction: column;
.top-list {
width: 100%;
display: flex;
justify-content: space-between;
align-items: flex-start;
height: 64px;
.right-search {
display: flex; display: flex;
flex-direction: column; height: 40px;
.top-list{ align-items: center;
width: 100%; .input-c {
display: flex; width: 320px;
justify-content: space-between; height: 40px;
align-items: flex-start; margin: 0 10px;
height: 64px;
.right-search{
display: flex;
height: 40px;
align-items: center;
.input-c{
width: 320px;
height: 40px;
margin: 0 10px;
}
.search-font{
font-size: 18px;
// font-family: AlibabaPuHuiTiR;
color: #747C93;
}
.search-btn{
width: 95px;
height: 38px;
background: #4176F0;
font-size: 18px;
// font-family: AlibabaPuHuiTiR;
color: #FFFFFF;
line-height: 40px;
border-radius: 4px;
border: 1px solid #4176F0;
text-align: center;
cursor: pointer;
// margin-left: 20px;
&:hover{
// box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.5);
opacity: 0.8;
}
}
}
} }
.table{ .search-font {
flex: 1; font-size: 18px;
// border: 1px solid red; // font-family: AlibabaPuHuiTiR;
overflow-y:auto ; color: #747c93;
overflow-x: hidden;
/deep/ .el-table .el-table__header-wrapper .has-gutter tr th:first-child{
padding-left: 0px;
}
/deep/ .el-table .el-table__header-wrapper .has-gutter tr th{
border: none;
background-color:#CFD6E3 ;
font-size: 20px;
font-family: "AlibabaPuHuiTi-Regular";
letter-spacing: 1px;
// font-weight: 500;
color: #1F295D;
padding-left: 30px;
}
/deep/ .el-table .el-table__body-wrapper .el-table__body .el-table__row--striped{
// height: 40px;
td{
background-color: #F4F6F9;
}
}
/deep/ .el-table .el-table__body-wrapper .el-table__body tr td:first-child {
padding-left: 0;
}
/deep/ .el-table .el-table__body-wrapper .el-table__body tr td{
padding-left:30px ;
font-size: 16px;
// font-family: AlibabaPuHuiTiR;
color: #747C93;
line-height: 25px;
}
} }
.page{ .search-btn {
height: 64px; width: 95px;
width: 100%; height: 38px;
display: flex; background: #4176f0;
align-items: flex-end; font-size: 18px;
justify-content: flex-end; // font-family: AlibabaPuHuiTiR;
/deep/ .el-pagination .el-pager{ color: #ffffff;
.number{ line-height: 40px;
background-color: #fff; border-radius: 4px;
border: 1px solid #E5EBEF; border: 1px solid #4176f0;
color: #778CA2; text-align: center;
} cursor: pointer;
.el-icon-more{ // margin-left: 20px;
background-color: #fff; &:hover {
line-height: 40px; // box-shadow: 0px 2px 8px 0px rgba(11, 30, 119, 0.5);
} opacity: 0.8;
.el-icon-d-arrow-right{ }
background-color: #fff;
border: 1px solid #E5EBEF;
color: #778CA2;
}
}
/deep/ .el-pagination .el-pager .number.active{
background-color: #4176F0;
color: #fff;
}
/deep/ .el-pagination .btn-next{
background-color: #fff;
border: 1px solid #E5EBEF;
color: #778CA2;
// &:hover{
// background-color: #4176F0;
// color: #fff;
// }
}
/deep/ .el-pagination .btn-prev{
background-color: #fff;
border: 1px solid #E5EBEF;
color: #778CA2;
// &:hover{
// background-color: #4176F0;
// color: #fff;
// }
}
} }
}
}
.table {
flex: 1;
// border: 1px solid red;
overflow-y: auto;
overflow-x: hidden;
/deep/ .el-table .el-table__header-wrapper .has-gutter tr th:first-child {
padding-left: 0px;
}
/deep/ .el-table .el-table__header-wrapper .has-gutter tr th {
border: none;
background-color: #cfd6e3;
font-size: 20px;
font-family: "AlibabaPuHuiTi-Regular";
letter-spacing: 1px;
// font-weight: 500;
color: #1f295d;
padding-left: 30px;
}
/deep/
.el-table
.el-table__body-wrapper
.el-table__body
.el-table__row--striped {
// height: 40px;
td {
background-color: #f4f6f9;
}
}
/deep/
.el-table
.el-table__body-wrapper
.el-table__body
tr
td:first-child {
padding-left: 0;
}
/deep/ .el-table .el-table__body-wrapper .el-table__body tr td {
padding-left: 30px;
font-size: 16px;
// font-family: AlibabaPuHuiTiR;
color: #747c93;
line-height: 25px;
}
}
.page {
height: 64px;
width: 100%;
display: flex;
align-items: flex-end;
justify-content: flex-end;
/deep/ .el-pagination .el-pager {
.number {
background-color: #fff;
border: 1px solid #e5ebef;
color: #778ca2;
}
.el-icon-more {
background-color: #fff;
line-height: 40px;
}
.el-icon-d-arrow-right {
background-color: #fff;
border: 1px solid #e5ebef;
color: #778ca2;
}
}
/deep/ .el-pagination .el-pager .number.active {
background-color: #4176f0;
color: #fff;
}
/deep/ .el-pagination .btn-next {
background-color: #fff;
border: 1px solid #e5ebef;
color: #778ca2;
// &:hover{
// background-color: #4176F0;
// color: #fff;
// }
}
/deep/ .el-pagination .btn-prev {
background-color: #fff;
border: 1px solid #e5ebef;
color: #778ca2;
// &:hover{
// background-color: #4176F0;
// color: #fff;
// }
}
} }
}
} }
</style> </style>
\ No newline at end of file
...@@ -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')
}
}) })
} }
}, },
...@@ -157,7 +171,7 @@ export default { ...@@ -157,7 +171,7 @@ export default {
width: 540px; width: 540px;
height: 560px; height: 560px;
background-color: #ffffff; background-color: #ffffff;
box-shadow: 0px 2px 20px 0px box-shadow: 0px 2px 20px 0px
rgba(6, 25, 72, 0.3); rgba(6, 25, 72, 0.3);
border-radius: 0px 10px 10px 0px; border-radius: 0px 10px 10px 0px;
box-sizing: border-box; box-sizing: border-box;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论