Commit 2618d792 authored by zhangderong's avatar zhangderong

no message

parent 86f798b3
...@@ -15,7 +15,7 @@ module.exports = { ...@@ -15,7 +15,7 @@ module.exports = {
// Various Dev Server settings // Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false, autoOpenBrowser: true,
errorOverlay: true, errorOverlay: true,
notifyOnErrors: true, notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
......
This diff is collapsed.
...@@ -11,11 +11,14 @@ ...@@ -11,11 +11,14 @@
"build": "node build/build.js" "build": "node build/build.js"
}, },
"dependencies": { "dependencies": {
"axios": "^0.19.0",
"iview": "^3.4.2", "iview": "^3.4.2",
"less": "^3.9.0", "less": "^3.9.0",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"qs": "^6.7.0",
"vue": "^2.5.2", "vue": "^2.5.2",
"vue-router": "^3.0.1" "vue-router": "^3.0.1",
"vue-upload-component": "^2.8.20"
}, },
"devDependencies": { "devDependencies": {
"autoprefixer": "^7.1.2", "autoprefixer": "^7.1.2",
......
import axios from '../service/http.service'
import {
baseApi,contractApi
} from '../config/env.config'
import qs from 'qs'
//账号列表查询
export function queryaccount(params) {
// params = checkParamsVoid(params)
params = qs.stringify(params)
return axios.post(`${contractApi}/api/user/findList`,params)
}
//添加账户
export function addAccount (params) {
console.log(params)
// params =qs.stringify(params)
return axios.post(`${contractApi}/api/user/add`,qs.stringify(params),{headers: {
'Accept':'application/json',
'Content-Type':'application/json'
}})
}
\ No newline at end of file
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<Icon type="ios-paper" /> <Icon type="ios-paper" />
{{menu.item}} {{menu.item}}
</template> </template>
<MenuItem v-for="child in menu.child" :key="child.name" :name="child.name" @click="go(menu.route)">{{child.item}}</MenuItem> <MenuItem v-for="child in menu.child" :key="child.name" :name="child.name" @click="go">{{child.item}}</MenuItem>
</Submenu> </Submenu>
</Menu> </Menu>
</Col> </Col>
...@@ -43,16 +43,23 @@ ...@@ -43,16 +43,23 @@
vName: ['1'], vName: ['1'],
vSubName: '1-1', vSubName: '1-1',
menuList: [ menuList: [
{ name: '1', item: '简历管理', child: [{ name: '1', item: '全部简历', child: [{ name: '1-1', item:'全部简历', route: '/user/login' }] }] }, { name: '1', item: '简历管理', child: [{ name: '1', item: '全部简历', child: [{ name: '1-1', item:'全部简历', route: '/allResume' }] }] },
{ name: '2', item: '面试管理', child: [{ name: '1', item: '面试管理', child: [{ name: '1-1', item:'全部简历', route: '/home' }] }] } { name: '2', item: '面试管理', child: [{ name: '1', item: '面试管理', child: [{ name: '1-1', item:'全部简历', route: '/interview' }] }] },
{ name: '3', item: '上传简历', child: [{ name: '1', item: '上传简历', child: [{ name: '1-1', item:'上传简历', route: '/upload' }] }] },
{ name: '4', item: '系统管理', child: [{ name: '1', item: '账户管理', child: [{ name: '1-1', item:'账户管理', route: '/account' }] },
{ name: '2', item: '邮箱管理', child: [{ name: '1-2', item:'邮箱管理', route: '/emailMange' }] },
{ name: '3', item: '二维码管理', child: [{ name: '1-3', item:'账户管理', route: '/QRcode' }] }
] },
], ],
childMenu: [{ name: '1', item: '全部简历', child: [{ name: '1-1', item:'全部简历', route: '/user/login' }] }] childMenu: [{ name: '1', item: '全部简历', child: [{ name: '1-1', item:'全部简历', route: '/allResume' }] }]
} }
}, },
methods: { methods: {
go(name) { go(name) {
const menu = this.childMenu.filter(v => this.vName === v.name) let vName = name.split('-')[1]
const route = menu.length === 1 ? menu[0].child.filter(v => name === v.name)[0].route : '/login' const menu = this.childMenu.filter(v => vName === v.name)
const route = menu.length === 1 ? menu[0].child.filter(v => name === v.name)[0].route : '/allResume'
this.$router.push(route) this.$router.push(route)
}, },
loginOut() { loginOut() {
...@@ -72,7 +79,7 @@ ...@@ -72,7 +79,7 @@
.home{ .home{
height: 100%; height: 100%;
.aside{ .aside{
height: 100%; min-height: 1100px;
border-right: 1px solid #dcdee2; border-right: 1px solid #dcdee2;
box-shadow: #dcdee2 0 0 6px 1px; box-shadow: #dcdee2 0 0 6px 1px;
img{ img{
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<Icon color="#2d8cf0" type="ios-lock-outline" slot="prepend"></Icon> <Icon color="#2d8cf0" type="ios-lock-outline" slot="prepend"></Icon>
</Input> </Input>
<Button type="primary" @click="login" >登录</Button> <Button type="primary" @click="login" >登录</Button>
<span class="tip"><Icon type="md-alert" /> 请输入正确的手机号码</span> <span class="tip"><Icon type="md-alert" />账号与密码不匹配,请重新输入</span>
</Row> </Row>
<Row class="foot"> <Row class="foot">
<span>量化派为您提供全程服务</span> <span>量化派为您提供全程服务</span>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
export default { export default {
methods: { methods: {
login() { login() {
this.$router.push('/user/login') this.$router.push('/allResume')
} }
} }
} }
......
const protocol = window.location.protocol
let baseApi = '',contractApi = ''
if(process.env.NODE_ENV === 'production'){
baseApi ='http://credit.xyqb.com'
contractApi ='http://pdf.quantgroup.cn'
}else{
// baseApi ='http://credit-chark.liangkebang.com'
baseApi ='http://recruit-ai3.liangkebang.net'
contractApi = `http://recruit-ai3.liangkebang.net`
// baseApi ='http://credit-0zhangheng.q-gp.com'
// baseApi ='http://credit-jinsong.q-gp.com'
// contractApi = `http://pdf-0zhangheng.q-gp.com`
//合同中心
// contractApi =`http://pdf-tower.q-gp.com`
}
export { baseApi, contractApi }
\ No newline at end of file
...@@ -5,7 +5,6 @@ import iView from 'iview'; ...@@ -5,7 +5,6 @@ import iView from 'iview';
import 'iview/dist/styles/iview.css'; import 'iview/dist/styles/iview.css';
import App from './App'; import App from './App';
import router from './router'; import router from './router';
Vue.use(iView); Vue.use(iView);
Vue.config.productionTip = false; Vue.config.productionTip = false;
......
This diff is collapsed.
<template>
<div>
<div class="login">
<div class="login-content">
<div class="loginContent-left">
<img src="../../assets/login.jpg">
</div>
<div class="loginContent-right">
<div class="logo">
<img src="../../assets/log.jpg">
<h3>登录</h3>
</div>
<div class="login_content">
<Form ref="formInline" :model="formInline" :rules="ruleInline" >
<FormItem prop="user">
<Input type="text" v-model="formInline.user" placeholder="Username" class="wordStyle">
<Icon type="ios-person-outline" slot="prepend"></Icon>
</Input>
</FormItem>
<FormItem prop="password">
<Input type="password" v-model="formInline.password" placeholder="Password" class="wordStyle">
<Icon type="ios-lock-outline" slot="prepend"></Icon>
</Input>
</FormItem>
</Form>
<button type="primary" style="height:30px;width:440px;margin-left:30px; border-radius: 5px;background:rgb(0, 146, 255);color:rgb(255,255,255)" @click="login">登录</button>
</div>
<div class="copy">
<p>量化派为你提供全程服务</p>
<p>量化派版权所有</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
formInline: {
user: '',
password: ''
},
ruleInline: {
user: [
{ required: true, message: '请输入正确的手机号', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入正确的密码', trigger: 'blur' },
{ type: 'string', min: 4, message: '', trigger: 'blur' }
]
}
}
},
methods: {
handleSubmit(name) {
this.$refs[name].validate((valid) => {
if (valid) {
this.$Message.success('Success!');
} else {
this.$Message.error('Fail!');
}
})
},
login(){
this.$router.push({name:"allResume"})
}
}
}
</script>
<style>
.login{
width:100%;
height:100%;
background: #EAEAEA;
}
.login-content{
width: 1100px;
height: 1000px;
margin-left: 500px
}
.loginContent-left {
float: left;
width: 600px;
height: 800px
}
.loginContent-right{
float: left;
width: 500px;
height: 800px;
background: #ffffff
}
.loginContent-left img{
width: 100%;
height: 100%;
}
.logo{
width:100%;
height:140px;
margin-top:80px;
}
.logo img {
width: 100px;
height: 60px;
margin-left: 30px
}
.logo h3{
font-size: 25px;
color: black;
margin-left: 40px
}
.login_content{
height: 200px;
width: 100%;
}
.copy{
width: 100%;
height:100px;
margin-top: 200px;
}
.copy p{
margin-left: 30px
}
.wordStyle{
width: 440px;
margin-left: 30px
}
</style>
<template>
<div>
llllll
</div>
</template>
<script>
export default {
}
</script>
<style>
</style>
<template>
<div>
<div class="login">
<div class="login-content">
<div class="loginContent-left">
<img src="../../assets/login.jpg">
</div>
<div class="loginContent-right">
<div class="logo">
<img src="../../assets/log.png">
<h3>首次登录请修改密码</h3>
</div>
<div class="login_content">
<Form ref="formInline" :model="formInline" :rules="ruleInline" >
<FormItem prop="user">
<Input type="text" v-model="formInline.user" placeholder="Username" class="wordStyle">
<Icon type="ios-person-outline" slot="prepend"></Icon>
</Input>
</FormItem>
<FormItem prop="password">
<Input type="password" v-model="formInline.password" placeholder="Password" class="wordStyle">
<Icon type="ios-lock-outline" slot="prepend"></Icon>
</Input>
</FormItem>
<FormItem>
<button style="width:440px;margin-left:30px; border-radius: 5px;background:rgb(0, 146, 255);color:rgb(255,255,255)">登录</button>
</FormItem>
</Form>
</div>
<div class="copy">
<p>量化派为你提供全程服务</p>
<p>量化派版权所有</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data () {
return {
formInline: {
user: '',
password: ''
},
ruleInline: {
user: [
{ required: true, message: '请输入正确的手机号', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入正确的密码', trigger: 'blur' },
{ type: 'string', min: 4, message: '', trigger: 'blur' }
]
}
}
},
methods: {
handleSubmit(name) {
this.$refs[name].validate((valid) => {
if (valid) {
this.$Message.success('Success!');
} else {
this.$Message.error('Fail!');
}
})
}
}
}
</script>
<style>
.login{
width:100%;
height:100%;
background: #EAEAEA;
}
.login-content{
width: 1100px;
height: 1000px;
margin-left: 500px
}
.loginContent-left {
float: left;
width: 600px;
height: 800px
}
.loginContent-right{
float: left;
width: 500px;
height: 800px;
background: #ffffff
}
.loginContent-left img{
width: 100%;
height: 100%;
}
.logo{
width:100%;
height:140px;
margin-top:80px;
}
.logo img {
width: 100px;
height: 60px;
margin-left: 30px
}
.logo h3{
font-size: 25px;
color: black;
margin-left: 40px
}
.login_content{
height: 200px;
width: 100%;
}
.copy{
width: 100%;
height:100px;
margin-top: 200px;
}
.copy p{
margin-left: 30px
}
.wordStyle{
width: 440px;
margin-left: 30px
}
</style>
This diff is collapsed.
<template>
<div></div>
</template>
<script>
export default {
}
</script>
<style>
</style>
<template>
<div class="account">
<div class="addAcount">
<p style="margin-top:10px">
<span style="font-size:18px;color:#2d8cf0;margin-left:18px;">新增账户</span>
<span style="margin-left:10px">以下内容均为必填项</span>
</p>
<Form :label-width="100" :model="formInline" :rules="ruleInline">
<FormItem label="配置登录账号" style="margin-top:20px" prop="PhoneNumber">
<Input placeholder="请输入正确的手机号" style="width:300px" v-model="formInline.PhoneNumber"></Input>
</FormItem>
<FormItem label="绑定真实姓名" style="margin-top:20px" prop="PerName">
<Input placeholder="请输入真实姓名" style="width:300px" v-model="formInline.PerName"></Input>
</FormItem>
</Form>
<p>
<span style="margin-left:18px">初始登录密码</span>
<span style="margin-left:8px">默认是"123456",新用户首次登录需修改后才能进入系统。</span>
<span style=""><button style="width:55px;height:25px;font-size:14px;background:#436EEE;color:#ffffff;margin-left:20px" @click="addacount"> 添加</button></span>
</p>
</div>
<div class="accountMange">
<p style="height:40px;line-height:40px">
<span style="font-size:18px;color:#2d8cf0;margin-left:18px">账户管理</span>
<span style="margin-left:10px">删除后该用户将无法登录,该账户上传的简历仍然保留。</span>
</p>
<p style="border-bottom:1px solid black;line-height:30px">
<input type='checkbox' class='input-checkbox' v-model='checked' v-on:click='checkedAll' style="margin-left:25px"><span style="margin-left:10px">全选</span>
<span style="margin-left:40px;color:#2d8cf0">删除</span>
</p>
<!-- <Table ref="selection" :columns="columns4" :data="data1"></Table> -->
<div v-for='item in ajaxData' :key="item.id">
<input type='checkbox' name='checkboxinput' class='input-checkbox' v-model='checkboxList' :value="item.id" style="margin-left:25px;margin-top:20px">
<span style="margin-left:5px" >{{item.name}}</span>
<span style="margin-left:35px">{{item.phone}}</span>
<span style="margin-left:35px">{{item.b}}</span>
<span style="margin-left:10px">{{item.data}}</span>
<span style="margin-left:35px;color:#2d8cf0" @click="modal1=true">恢复初始密码</span>
<span style="margin-left:35px;color:#2d8cf0">删除</span>
</div>
<div class="pageBottom">
<Page :total="100" show-elevator style="text-align:center;margin-top:8px"/>
</div>
</div>
<!-- 恢复初始密码 -->
<Modal
v-model="modal1"
@on-ok="ok"
:closable="false"
width='250px'
@on-cancel="cancel">
<h3 style="text-align:center">提示</h3>
<p>是否将该账号的密码,恢复至初始状态。</p>
<div slot='footer' style="text-align:center">
<Button type='primary' @click='modal1=false'>取消</Button>
<Button type='primary' >确定</Button>
</div>
</Modal>
</div>
</template>
<script>
import { queryaccount,addAccount} from '../../api/stystem.server.js'
export default {
data(){
return {
modal1:false,
checkboxList:[],
checked: false,
userName:'',
userCode:'',
a:'',
formInline: {
PhoneNumber: '',
PerName: ''
},
ruleInline: {
PhoneNumber: [
{ required: true, pattern:/^[1][3,4,5,7,8,6,9][0-9]{9}$/, message: '请输入正确的手机号', trigger: 'blur' }
],
PerName: [
{ required: true, message: '请输入真实的姓名', trigger: 'blur' },
{ type: 'string', message: '', trigger: 'blur' }
]
},
ajaxData: [{ // 后台请求过来的数据
id:'1',
name: '李宁',
phone: '12345678998',
age:'33岁',
sex:'',
work:'10年',
a:'java工程师',
b:'2019-09-02',
data:'13:09:09',
qudao:'boss直聘',
email:'445151511516516@quiwhu.cn'
},{
id:'2',
name: '李宁',
phone: '12345678998',
age:'33岁',
sex:'',
work:'10年',
a:'java工程师',
b:'2019-09-02',
data:'13:09:09',
qudao:'boss直聘',
email:'445151511516516@quiwhu.cn'
},{
id:'3',
name: '李宁',
phone: '12345678998',
age:'33岁',
sex:'',
work:'10年',
a:'java工程师',
b:'2019-09-02',
data:'13:09:09',
qudao:'boss直聘',
email:'445151511516516@quiwhu.cn'
}],
checkData: [] ,// 双向数据绑定的数组
}
},
methods:{
handleSelectAll (status) {
this.$refs.selection.selectAll(status);
},
ok () {
this.$Message.info('Clicked ok');
},
cancel () {
this.$Message.info('Clicked cancel');
},
//全选与反选
checkedAll: function() {
if (this.checked) {//实现反选
this.checkboxList = [];
} else { //实现全选
this.checkboxList = [];
this.ajaxData.forEach( (item) => {
this.checkboxList.push(item.id);
});
}
},
//添加账户
addacount(){
let parmars={
userCode:this.formInline.PhoneNumber,
userName:this.formInline.PerName
}
// if(this.userCode==''||this.userName=='') return
addAccount(parmars).then(res=>{
if(res.success){
this.$Message.success('添加成功')
}
})
}
},
watch: {
checkboxList: {
handler: function (val, oldVal) {
if (this.checkboxList.length === this.ajaxData.length) {
this.checked=true;
} else {
this.checked=false;
}
},
deep: true
}
},
}
</script>
<style>
/* .account{
width: 100%;
height: 100%;
} */
.addAcount{
/* width: 1000px; */
height: 200px;
/* border: 1px solid black; */
}
.accountMange{
/* width: 1000px; */
/* height: 1000px; */
/* border: 1px solid black; */
}
.pageBottom{
height: 40px;
width:1800px;
background:#EDEDED;
position: fixed;
bottom: 0;
}
</style>
<template>
<div class="emailMange">
<div class="addEmail">
<p style="margin-top:10px">
<span style="font-size:18px;color:#2d8cf0;margin-left:18px">新增账户</span>
<span style="margin-left:10px">绑定邮箱以接收简历</span>
</p>
<Form :label-width="100" :model="formInline" :rules="ruleInline">
<FormItem label="邮箱账号" style="margin-top:20px" prop="emailNumber">
<Input placeholder="请输入企业邮箱" style="width:300px" v-model="formInline.emailNumber"></Input>
</FormItem>
<FormItem label="请选择开始同步的时间" style="margin-top:20px; position: absolute;top:30px;left: 490px" :label-width="180">
<DatePicker type="datetime" format="yyyy-MM-dd HH:mm" placeholder="请选择日期" style="width: 200px"></DatePicker><br>
<span style="font-size:8px;margin-left:0px;"><Icon type="md-information-circle" />如不选取默认同步邮箱中的所有简历</span>
</FormItem>
<FormItem label="邮箱密码" style="margin-top:20px; position: absolute;top:110px;left: -80px" prop="emailPsd" :label-width="180">
<Input placeholder="请输入企业邮箱" style="width:300px" v-model="formInline.emailPsd"></Input><br>
<span style="font-size:8px;position: relative;top:0px left:30px"><Icon type="md-information-circle" />邮箱密码在绑定后再次修改,请及时点击修改来更新。</span>
</FormItem>
<FormItem label="所属人" style="margin-top:20px; position: absolute;top:110px;left: 410px" prop="UserName" :label-width="180">
<Input placeholder="请输入企业邮箱" style="width:300px" v-model="formInline.UserName"></Input>
</FormItem>
<button type="primary" style=" width:110px;height:30px;position: absolute;top:130px;left: 910px;border-radius: 5px;background:rgb(0, 146, 255);color:rgb(255,255,255)">绑定并开始同步</button>
</Form>
</div>
<div class="Emailmange">
<p style="height:40px;line-height:40px">
<span style="font-size:18px;color:#2d8cf0;margin-left:18px">账户管理</span>
<span style="margin-left:10px">删除后该用户将无法登录,该账户上传的简历仍然保留。</span>
</p>
<p style="border-bottom:1px solid black;line-height:30px">
<input type='checkbox' class='input-checkbox' v-model='checked' v-on:click='checkedAll' style="margin-left:25px">全选
<span style="margin-left:40px;color:#2d8cf0">解绑</span>
</p>
<div v-for='item in ajaxData' :key="item.id">
<input type='checkbox' name='checkboxinput' class='input-checkbox' v-model='checkboxList' :value="item.id" style="margin-left:25px;margin-top:20px">
<span style="margin-left:5px;width:100px" >{{item.name}}</span>
<span style="margin-left:35px;width:160px">{{item.phone}}</span>
<span style="margin-left:35px;width:200px">{{item.b}}</span>
<span style="margin-left:10px">{{item.data}}</span>
<span style="margin-left:35px;color:#2d8cf0">恢复初始密码</span>
<span style="margin-left:35px;color:#2d8cf0">删除</span>
<span style="margin-left:150px">正在进行</span>
</div>
</div>
<!-- 恢复初始密码 -->
<Modal
v-model="modal1"
@on-ok="ok"
:closable="false"
width='250px'
@on-cancel="cancel">
<h3 style="text-align:center">提示</h3>
<p>是否将该账号的密码,恢复至初始状态。</p>
<div slot='footer' style="text-align:center">
<Button type='primary' @click='modal1=false'>取消</Button>
<Button type='primary' >确定</Button>
</div>
</Modal>
</div>
</template>
<script>
export default {
data(){
return {
modal1:false,
checkboxList:[],
checked: false,
formInline: {
emailNumber: '',
emailPsd: '',
UserName:''
},
ruleInline: {
emailNumber: [
// derong.zhang@quantgroup.cn
{ required: true, pattern:/\S+@quantgroup.cn/, message: '请输入正确的邮箱账号', trigger: 'blur' }
],
emailPsd: [
{ required: true, message: '请输入正确的密码', trigger: 'blur' },
{ type: 'string', min: 11, message: '', trigger: 'blur' }
],
UserName:[
{ required: true, message: '请输入正确的姓名', trigger: 'blur' },
{ type: 'string', min: 4, message: '', trigger: 'blur' }
]
},
ajaxData: [{ // 后台请求过来的数据
id:'1',
name: '李宁Q',
phone: '12345678998',
age:'33岁',
sex:'',
work:'10年',
a:'java工程师',
b:'2019-09-02',
data:'13:09:09',
qudao:'boss直聘',
email:'445151511516516@quiwhu.cn'
},{
id:'2',
name: '李宁',
phone: '12345678998',
age:'33岁',
sex:'',
work:'10年',
a:'java工程师',
b:'2019-09-02',
data:'13:09:09',
qudao:'boss直聘',
email:'445151511516516@quiwhu.cn'
},{
id:'3',
name: '李宁',
phone: '12345678998',
age:'33岁',
sex:'',
work:'10年',
a:'java工程师',
b:'2019-09-02',
data:'13:09:09',
qudao:'boss直聘',
email:'445151511516516@quiwhu.cn'
}],
checkData: [] ,// 双向数据绑定的数组
}
},
methods:{
//全选与反选
checkedAll: function() {
if (this.checked) {//实现反选
this.checkboxList = [];
} else { //实现全选
this.checkboxList = [];
this.ajaxData.forEach( (item) => {
this.checkboxList.push(item.id);
});
}
},
//确认恢复初始密码
Recognitionrecovery(){
},
},
watch: {
checkboxList: {
handler: function (val, oldVal) {
if (this.checkboxList.length === this.ajaxData.length) {
this.checked=true;
} else {
this.checked=false;
}
},
deep: true
}
},
}
</script>
<style>
.emailMange{
/* height: 100%;
width:100%; */
/* background: #F2F2F2; */
}
.addEmail{
height: 220px;
/* border: 1px solid black; */
}
.Emailmange{
height: 1000px;
/* border: 1px solid black; */
}
</style>
<template>
<div class="upload">
<div class="upload-left">
<div class="UleftcontentTop" >
<!-- <input type="text" class="detailTW" v-model="Filename">
<Upload
:before-upload="handleUpload"
multiple
action="//jsonplaceholder.typicode.com/posts/">
<Button class="detailTB">选择文件</Button>
</Upload> -->
<input type="text" class="detailTW" v-model="Filename">
<file-upload
ref="upload"
v-model="files"
post-action="/post.method"
put-action="/put.method"
@input-file="inputFile"
@input-filter="inputFilter"
>
<p style="width:100px;height:30px;line-height:30px;background:#2d8cf0;color:#ffffff;margin:20px 0 0 390px">选择文件</p>
</file-upload>
<p>
<span class="format">单个文件不能大于2MB,支持html,word,txt,pdf等格式,暂时不支持压缩格式</span><br>
<span class="number">支持最多二十份简历批量上传</span>
</p>
<Button class="clickUpload" type="primary" @click.prevent="$refs.upload.active = true" >开始上传</Button>
</div>
<div class="leftcontrentFotter">
<h5 style="width:100%;height:40px;background:rgb(0,176,160);text-align:center;line-height:40px;color:white">上传记录</h5>
<div style="width:100%;background:rgb(0,176,160); opacity: 0.7">
<span>{{Filename}}</span>
</div>
</div>
</div>
<div class="upload-right">
<p style="height:40px;width:100%;line-height:40px;background:#F2F2F2"><span style="margin-left:30px;color:#2d8cf0;font-size:16px">预览</span></p>
<div class="detailUload">
<p style="width:60px;height:30px;line-height:30px;text-align:center;margin-left:1020px;margin-top:10px;background:#2d8cf0; border-radius: 5px;"><span style="color:white">下载</span></p>
</div>
</div>
<!-- 上传记录弹出框 -->
<Modal
v-model="modal3"
@on-ok="ok"
:closable="false"
width='830px'
@on-cancel="cancel">
<Progress :percent="100" status="active">
<span></span>
<Icon type="checkmark-circled"></Icon>
<span>{{Filename}}成功</span>
</Progress>
<div slot='footer' style="text-align:center">
<Button type='primary' @click='modal3=false'>取消</Button>
<Button type='primary' >确定</Button>
</div>
</Modal>
</div>
</template>
<script>
import Vue from 'vue';
const VueUploadComponent = require('vue-upload-component')
Vue.component('file-upload', VueUploadComponent)
export default {
data () {
return {
file: null,
loadingStatus: false,
modal3:false,
Filename:'',
files: []
}
},
methods: {
handleUpload (file) {
this.file = file;
this.Filename=file.name;
return false;
},
ok () {
this.$Message.info('Clicked ok');
},
cancel () {
this.$Message.info('Clicked cancel');
},
upload () {
this.loadingStatus = true;
this.modal3=true
setTimeout(() => {
this.file = null;
this.loadingStatus = false;
this.$Message.success('Success')
}, 1500);
},
inputFile: function (newFile, oldFile) {
if (newFile && oldFile && !newFile.active && oldFile.active) {
// 获得相应数据
console.log('response', newFile.response)
if (newFile.xhr) {
// 获得响应状态码
console.log('status', newFile.xhr.status)
}
}
},
/**
* Pretreatment
* @param Object|undefined newFile 读写
* @param Object|undefined oldFile 只读
* @param Function prevent 阻止回调
* @return undefined
*/
inputFilter: function (newFile, oldFile, prevent) {
if (newFile && !oldFile) {
// 过滤不是图片后缀的文件
if (!/\.(jpeg|jpe|jpg|gif|png|webp)$/i.test(newFile.name)) {
return prevent()
}
}
// 创建 blob 字段 用于图片预览
newFile.blob = ''
let URL = window.URL || window.webkitURL
if (URL && URL.createObjectURL) {
newFile.blob = URL.createObjectURL(newFile.file)
}
},
components: {
FileUpload: VueUploadComponent
}
}
}
</script>
<style>
.upload{
min-height: 1200px;
width: 100%;
background: #F2F2F2
}
.upload-left{
width: 500px;
min-height: 1200px;
border: 1px solid black;
float: left;
}
.upload-right{
min-height: 1200px;
width: 1100px;
border: 1px solid #999999;
float: left;
}
.UleftcontentTop{
height: 300px;
width: 100%;
border: 1px #FF8247 solid;
}
.detailUload{
min-height: 1200px;
width: 100%;
border: 1px solid black;
margin-top: 3px;
}
.leftcontrentFotter{
min-height: 00px;
display: block
}
.detailTW{
height: 30px;
width: 370px;
position: relative;
top: 50px;
left: 20px;
/* display: block */
}
.detailTB{
background:#F4F4F4;
color:black;
position: relative;
top:20px;
left: 390px
}
.format{
position: relative;
top: 60px;
left: 30px;
}
.number{
position: relative;
top: 90px;
left: 160px
}
.clickUpload{
position: relative;
top: 120px;
left: 190px
}
</style>
...@@ -2,30 +2,69 @@ import Vue from 'vue'; ...@@ -2,30 +2,69 @@ import Vue from 'vue';
import Router from 'vue-router'; import Router from 'vue-router';
const home = r => require.ensure([], () => r(require('@/components/home.vue')), 'home'); const home = r => require.ensure([], () => r(require('@/components/home.vue')), 'home');
const login = r => require.ensure([], () => r(require('@/components/login.vue')), 'login'); // const login = r => require.ensure([], () => r(require('@/components/login.vue')), 'login');
const login = r => require.ensure([], () => r(require('@/page/login/login.vue')), 'login');
const interview = r => require.ensure([], () => r(require('@/page/interview/interview.vue')), 'interview');
const allResume = r => require.ensure([], () => r(require('@/page/resume/allResume.vue')), 'allResume');
const account = r => require.ensure([], () => r(require('@/page/system/account.vue')), 'account');
const emailMange = r => require.ensure([], () => r(require('@/page/system/emailMange.vue')), 'emailMange');
const QRcode = r => require.ensure([], () => r(require('@/page/system/QRcode.vue')), 'QRcode');
const upload = r => require.ensure([], () => r(require('@/page/upload/upload.vue')), 'upload');
const text = r => require.ensure([], () => r(require('@/page/login/text.vue')), 'text');
Vue.use(Router); Vue.use(Router);
export default new Router({ export default new Router({
mode: 'history', // mode: 'history',
routes: [ routes: [
{ {
path: '/', path: '/',
redirect: '/home', redirect: '/login',
}, { }, {
path: '/login', path: '/login',
name: 'login', name: 'login',
component: login, component: login,
}, { },{
path: '/text',
name: 'text',
component: text
},{
path: '/home', path: '/home',
name: 'home', name: 'home',
component: home, component: home,
children: [ children: [
{ {
path: '/user/login', path: '/interview',
name: 'userLogin', name: 'interview',
component: login component: interview
} },
{
path: '/allResume',
name: 'allResume',
component: allResume
},
{
path: '/account',
name: 'account',
component: account
},
{
path: '/emailMange',
name: 'emailMange',
component: emailMange
},
{
path: '/QRcode',
name: 'QRcode',
component: QRcode
},
{
path: '/upload',
name: 'upload',
component: upload
},
] ]
}, },
], ],
......
http.service.js import axios from 'axios'
\ No newline at end of file
export default axios
\ No newline at end of file
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