|
|
@@ -130,18 +130,31 @@
|
|
|
<span>状态</span>
|
|
|
<span>操作</span>
|
|
|
</li>
|
|
|
- <li class="newslist" v-for="(d, i) in arr" :key="i">
|
|
|
- <span>{{d.leixing}}</span>
|
|
|
- <span>{{d.time}}</span>
|
|
|
- <span class="newscentent">
|
|
|
- <span>{{d.neirong.qyname}}</span>
|
|
|
- <span>{{d.neirong.saas}}</span>
|
|
|
- <span>{{d.neirong.phone}}</span>
|
|
|
+ <li v-if="isnews" class="newslist" v-for="(d, i) in arr" :key="i">
|
|
|
+ <span>加入申请</span>
|
|
|
+ <span>{{d.createTime}}</span>
|
|
|
+ <span class="newscentent" style="position:relative;top:9px">
|
|
|
+ <span>{{d.companyName}}</span>
|
|
|
+ <span>{{d.admin}}</span>
|
|
|
+ <span>{{d.adminMobile}}</span>
|
|
|
</span>
|
|
|
- <span>{{d.zhuangtai}}</span>
|
|
|
- <span><button v-if="d.caozuo" @click="Rejoin(i)" class="news-btn">重新加入</button></span>
|
|
|
+ <span v-if='d.status == 0'>未通过</span>
|
|
|
+ <span v-else-if='d.status == 1'>已批准</span>
|
|
|
+ <span v-else-if='d.status == 2'>待批准</span>
|
|
|
+ <span><button v-if="d.status == 0" @click="Rejoin(i)" class="news-btn">重新加入</button></span>
|
|
|
+ </li>
|
|
|
+ <li v-if="!isnews">
|
|
|
+ <img style="width:100%" src="/static/img/nodata.png" alt="">
|
|
|
</li>
|
|
|
</ul>
|
|
|
+ <div v-if="isnews" class="my-pagination">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :total= list>
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -163,27 +176,27 @@ import { setTimeout } from 'timers';
|
|
|
isname:true,//姓名验证
|
|
|
reg: new RegExp(/[\@\#\$\%\&\*!\¥]/),//非法字符
|
|
|
isheigh:false,//默认高度
|
|
|
+ isnews: false,
|
|
|
tab: [
|
|
|
{name: '企业信息'},
|
|
|
{name: '个人信息'},
|
|
|
{name: '安全设置'},
|
|
|
- // {name: '消息'},
|
|
|
+ {name: '消息'},
|
|
|
],
|
|
|
- arr: [
|
|
|
- {leixing:'加入申请',time:'2018/12/01 12:45:21',neirong:{qyname:'X防守对方的发士大夫XX公司',saas:'管理员名称范德萨发达',phone:'1345678923'},zhuangtai:'待批准',caozuo:false},
|
|
|
- {leixing:'加入申请',time:'2018/12/01 12:45:21',neirong:{qyname:'XXX公司',saas:'管理员名称',phone:'1345678923'},zhuangtai:'未通过',caozuo:true},
|
|
|
- ]
|
|
|
+ arr: [],
|
|
|
+ list:1
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|
|
|
- let mob = this.mytoken.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
|
|
- this.mobile = mob;
|
|
|
+ let phone = this.mytoken.mobile.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
|
|
|
+ this.mobile = phone;
|
|
|
this.boxheight();
|
|
|
},
|
|
|
watch:{
|
|
|
arr:function(){
|
|
|
this.$nextTick(function(){
|
|
|
this.boxheight();
|
|
|
+ this.isnews = true;
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
@@ -193,26 +206,28 @@ import { setTimeout } from 'timers';
|
|
|
},
|
|
|
ishongdian(){
|
|
|
return this.$store.state.ishongdian;
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
methods: {
|
|
|
// tab切换
|
|
|
tabswitch(index){
|
|
|
if (index == 3) {
|
|
|
this.nowindex = 3;
|
|
|
- let mytoken = JSON.parse(localStorage.getItem('app-state-session'));
|
|
|
+ let mytoken = Session.get();
|
|
|
let id = mytoken.account.id;
|
|
|
- // tab切换到消息的时候执行
|
|
|
let param = {
|
|
|
type:'condition',
|
|
|
value:'creatorId='+id+''
|
|
|
}
|
|
|
+ // tab切换到消息的时候执行
|
|
|
this.$ajax({
|
|
|
- url:'http://192.168.253.41:8560/api/commons/remind/apply/list',
|
|
|
+ url: this.$url.api+'/api/commons/remind/apply/list',
|
|
|
method:'GET',
|
|
|
async:false,
|
|
|
params: {
|
|
|
- condition:JSON.stringify(param)
|
|
|
+ condition:JSON.stringify(param),
|
|
|
+ number:1,
|
|
|
+ size:10
|
|
|
},
|
|
|
headers:{
|
|
|
'Access-Control-Allow-Origin':'*',
|
|
|
@@ -221,8 +236,11 @@ import { setTimeout } from 'timers';
|
|
|
}
|
|
|
})
|
|
|
.then(res=>{
|
|
|
- console.log(res)
|
|
|
- this.$store.state.ishongdian = false
|
|
|
+ if (res.data.success) {
|
|
|
+ this.arr = res.data.data.list;
|
|
|
+ this.list = res.data.data.total;
|
|
|
+ this.$store.state.ishongdian = false;
|
|
|
+ }
|
|
|
})
|
|
|
} else {
|
|
|
this.nowindex = index;
|
|
|
@@ -230,9 +248,58 @@ import { setTimeout } from 'timers';
|
|
|
|
|
|
},
|
|
|
setTurnHome(){
|
|
|
- // debugger
|
|
|
this.$parent.turnHome = true
|
|
|
},
|
|
|
+ //重新加入
|
|
|
+ Rejoin(i){
|
|
|
+ this.$ajax({
|
|
|
+ url: this.$url.api+'/api/account/accountCenter/company/join',
|
|
|
+ method:'POST',
|
|
|
+ data:{
|
|
|
+ username:this.arr[i].creatorName,
|
|
|
+ accountId:this.mytoken.id,
|
|
|
+ companyId:this.arr[i].companyId,
|
|
|
+ },
|
|
|
+ headers:{
|
|
|
+ "Authorization":Session.getToken(),
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(res=>{
|
|
|
+ if (res.data.success) {
|
|
|
+ this.$message.success('提交成功,待管理员批准');
|
|
|
+ this.tabswitch(3);//本页面刷新
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 分页
|
|
|
+ handleCurrentChange(val) {
|
|
|
+ let mytoken = Session.get();
|
|
|
+ let id = mytoken.account.id;
|
|
|
+ let param = {
|
|
|
+ type:'condition',
|
|
|
+ value:'creatorId='+id+''
|
|
|
+ }
|
|
|
+ this.$ajax({
|
|
|
+ url: this.$url.api+'/api/commons/remind/apply/list',
|
|
|
+ method:'GET',
|
|
|
+ async:false,
|
|
|
+ params: {
|
|
|
+ condition:JSON.stringify(param),
|
|
|
+ number:val,
|
|
|
+ size:10
|
|
|
+ },
|
|
|
+ headers:{
|
|
|
+ 'Access-Control-Allow-Origin':'*',
|
|
|
+ "Authorization":mytoken.token,
|
|
|
+ 'Content-Type':'application/json;charset=UTF-8'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .then(res=>{
|
|
|
+ if (res.data.success) {
|
|
|
+ this.arr = res.data.data.list;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//退出
|
|
|
loginout(){
|
|
|
const frame = window.frames[window.frames.length - 1]
|
|
|
@@ -278,7 +345,6 @@ import { setTimeout } from 'timers';
|
|
|
if (this.isname) {
|
|
|
let name = this.$refs.realname.value.replace(/\s+/g, "");
|
|
|
let id = this.mytoken.id;
|
|
|
- let token = JSON.parse(localStorage.getItem('app-state-session')).token;
|
|
|
this.$ajax({
|
|
|
url: this.$url.api+"/api/account/account/update",
|
|
|
method :'post',
|
|
|
@@ -287,12 +353,12 @@ import { setTimeout } from 'timers';
|
|
|
realname:name
|
|
|
},
|
|
|
headers: {
|
|
|
- "Authorization":token
|
|
|
+ "Authorization":Session.getToken()
|
|
|
}
|
|
|
})
|
|
|
.then(res=>{
|
|
|
if (res.data.success) {
|
|
|
- let session = JSON.parse(window.localStorage.getItem('app-state-session'));
|
|
|
+ let session = Session.get();
|
|
|
session.account.realname = name;
|
|
|
Session.set(session);
|
|
|
this.$router.go(0);
|
|
|
@@ -303,20 +369,10 @@ import { setTimeout } from 'timers';
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- //重新加入
|
|
|
- Rejoin(i){
|
|
|
- //成功后提示
|
|
|
- this.$message({
|
|
|
- message: '提交成功,待管理员批准',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.arr[i].zhuangtai = '待批准';
|
|
|
- this.arr[i].caozuo = false;
|
|
|
- },
|
|
|
//没有内容也要有一定的高度
|
|
|
boxheight(){
|
|
|
let H = this.$refs.qiyebox.offsetHeight;
|
|
|
- if (H < 500) {
|
|
|
+ if (H <= 500) {
|
|
|
this.isheigh = true
|
|
|
} else {
|
|
|
this.isheigh = false
|
|
|
@@ -385,6 +441,9 @@ import { setTimeout } from 'timers';
|
|
|
width: 130%;
|
|
|
margin-left: -15%;
|
|
|
}
|
|
|
+.gs-news > img {
|
|
|
+ width: 100%
|
|
|
+}
|
|
|
.gs-news > ul {
|
|
|
padding: 0;
|
|
|
font-family: PingFangSC-Regular;
|
|
|
@@ -457,4 +516,9 @@ import { setTimeout } from 'timers';
|
|
|
top: -5px;
|
|
|
left: -25px;
|
|
|
}
|
|
|
+.my-pagination {
|
|
|
+ margin: 0;
|
|
|
+ text-align: center !important;
|
|
|
+ margin-top: 50px;
|
|
|
+}
|
|
|
</style>
|