|
|
|
@ -2,9 +2,19 @@
|
|
|
|
<div class="townsman-container">
|
|
|
|
<div class="townsman-container">
|
|
|
|
<div class="contenttitle">
|
|
|
|
<div class="contenttitle">
|
|
|
|
<span>我的老乡</span>
|
|
|
|
<span>我的老乡</span>
|
|
|
|
<div>
|
|
|
|
<div @click="getTownsman">
|
|
|
|
<button>已在职</button>
|
|
|
|
<button
|
|
|
|
<button>未在职</button>
|
|
|
|
@click="pagination.searchTag = 1"
|
|
|
|
|
|
|
|
:class="{ townsmanactive: pagination.searchTag === 1 }"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
已在职
|
|
|
|
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
|
|
|
|
@click="pagination.searchTag = 0"
|
|
|
|
|
|
|
|
:class="{ townsmanactive: pagination.searchTag === 0 }"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
未在职
|
|
|
|
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="contentbody">
|
|
|
|
<div class="contentbody">
|
|
|
|
@ -13,6 +23,11 @@
|
|
|
|
:data-source="data"
|
|
|
|
:data-source="data"
|
|
|
|
:pagination="false"
|
|
|
|
:pagination="false"
|
|
|
|
@change="onChange"
|
|
|
|
@change="onChange"
|
|
|
|
|
|
|
|
:loading="{
|
|
|
|
|
|
|
|
spinning: isspinning,
|
|
|
|
|
|
|
|
tip: '加载中',
|
|
|
|
|
|
|
|
wrapperClassName: 'spinstyle',
|
|
|
|
|
|
|
|
}"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<a slot="name" slot-scope="text">{{ text }}</a>
|
|
|
|
<a slot="name" slot-scope="text">{{ text }}</a>
|
|
|
|
</a-table>
|
|
|
|
</a-table>
|
|
|
|
@ -20,7 +35,7 @@
|
|
|
|
<a-pagination
|
|
|
|
<a-pagination
|
|
|
|
:current="+pagination.pageNum"
|
|
|
|
:current="+pagination.pageNum"
|
|
|
|
:default-current="1"
|
|
|
|
:default-current="1"
|
|
|
|
:defaultPageSize="2"
|
|
|
|
:defaultPageSize="1"
|
|
|
|
:total="pagination.total"
|
|
|
|
:total="pagination.total"
|
|
|
|
@change="onChange"
|
|
|
|
@change="onChange"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
@ -38,6 +53,8 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
import { userTownsmanApi } from "../../../../api/userinfo";
|
|
|
|
|
|
|
|
import { formatDateYMD } from "../../../../utils/commonUtil";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
// 组件名称
|
|
|
|
// 组件名称
|
|
|
|
name: "",
|
|
|
|
name: "",
|
|
|
|
@ -50,56 +67,42 @@ export default {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
pagination: {
|
|
|
|
pagination: {
|
|
|
|
pageNum: 1,
|
|
|
|
pageNum: 1,
|
|
|
|
pageSize: 2,
|
|
|
|
pageSize: 1,
|
|
|
|
total: 8, //分页配置
|
|
|
|
total: null, //分页配置
|
|
|
|
|
|
|
|
searchTag: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
isspinning: false,
|
|
|
|
columns: [
|
|
|
|
columns: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "序号",
|
|
|
|
title: "序号",
|
|
|
|
dataIndex: "index",
|
|
|
|
dataIndex: "index",
|
|
|
|
key: "index",
|
|
|
|
key: "index",
|
|
|
|
scopedSlots: { customRender: "index" },
|
|
|
|
scopedSlots: { customRender: "index" },
|
|
|
|
|
|
|
|
ellipsis: true,
|
|
|
|
width: 60,
|
|
|
|
width: 60,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "老乡姓名",
|
|
|
|
title: "老乡姓名",
|
|
|
|
dataIndex: "name",
|
|
|
|
dataIndex: "userName",
|
|
|
|
key: "name",
|
|
|
|
key: "userName",
|
|
|
|
|
|
|
|
ellipsis: true,
|
|
|
|
width: 90,
|
|
|
|
width: 90,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "跟进记录",
|
|
|
|
title: "跟进记录",
|
|
|
|
dataIndex: "record",
|
|
|
|
dataIndex: "userServeRecordDespLatest",
|
|
|
|
key: "record",
|
|
|
|
key: "userServeRecordDespLatest",
|
|
|
|
ellipsis: true,
|
|
|
|
ellipsis: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: "更新时间",
|
|
|
|
title: "更新时间",
|
|
|
|
dataIndex: "time",
|
|
|
|
dataIndex: "updateTime",
|
|
|
|
key: "time",
|
|
|
|
key: "updateTime",
|
|
|
|
|
|
|
|
ellipsis: true,
|
|
|
|
width: 160,
|
|
|
|
width: 160,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
|
|
|
data: [
|
|
|
|
data: [],
|
|
|
|
{
|
|
|
|
|
|
|
|
index: "1",
|
|
|
|
|
|
|
|
name: "房竟慧",
|
|
|
|
|
|
|
|
record: "协助报名@草莓/郭美美",
|
|
|
|
|
|
|
|
time: "2021-09-13 15:41",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
index: "2",
|
|
|
|
|
|
|
|
name: "范明",
|
|
|
|
|
|
|
|
record: "自主报名 朋友推荐",
|
|
|
|
|
|
|
|
time: "2021-09-13 15:41",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
index: "3",
|
|
|
|
|
|
|
|
name: "陈伟运",
|
|
|
|
|
|
|
|
record: "自主登录",
|
|
|
|
|
|
|
|
time: "2021-09-13 15:41",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 计算属性
|
|
|
|
// 计算属性
|
|
|
|
@ -110,7 +113,9 @@ export default {
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 组件实例创建完成,属性已绑定,但DOM还未生成,$ el属性还不存在
|
|
|
|
* 组件实例创建完成,属性已绑定,但DOM还未生成,$ el属性还不存在
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
created() {},
|
|
|
|
created() {
|
|
|
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
|
|
|
},
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* el 被新创建的 vm.el 替换,并挂载到实例上去之后调用该钩子。
|
|
|
|
* el 被新创建的 vm.el 替换,并挂载到实例上去之后调用该钩子。
|
|
|
|
* 如果 root 实例挂载了一个文档内元素,当 mounted 被调用时 vm.el 也在文档内。
|
|
|
|
* 如果 root 实例挂载了一个文档内元素,当 mounted 被调用时 vm.el 也在文档内。
|
|
|
|
@ -120,13 +125,38 @@ export default {
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
onChange(e) {
|
|
|
|
onChange(e) {
|
|
|
|
this.pagination.pageNum = e;
|
|
|
|
this.pagination.pageNum = e;
|
|
|
|
|
|
|
|
this.getTownsman();
|
|
|
|
console.log(e);
|
|
|
|
console.log(e);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
inputpageChange(e) {
|
|
|
|
inputpageChange(e) {
|
|
|
|
this.pagination.pageNum = e.target.value;
|
|
|
|
this.pagination.pageNum = e.target.value;
|
|
|
|
// this.getJobList();
|
|
|
|
// this.getJobList();
|
|
|
|
|
|
|
|
this.getTownsman();
|
|
|
|
console.log(e);
|
|
|
|
console.log(e);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
async getTownsman() {
|
|
|
|
|
|
|
|
// let jobinfo = {...this.pagination , searchTag:1}
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
this.isspinning = true;
|
|
|
|
|
|
|
|
const { data } = await userTownsmanApi(this.pagination);
|
|
|
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
if (data.status === 200) {
|
|
|
|
|
|
|
|
// console.log();
|
|
|
|
|
|
|
|
this.data = data.data.recordList;
|
|
|
|
|
|
|
|
this.data.forEach((item, index) => {
|
|
|
|
|
|
|
|
console.log(item);
|
|
|
|
|
|
|
|
item.updateTime = formatDateYMD(item.updateTime);
|
|
|
|
|
|
|
|
item.index = index + 1;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(true);
|
|
|
|
|
|
|
|
this.pagination.total = data.data.recordCount;
|
|
|
|
|
|
|
|
this.isspinning = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} catch (error) {
|
|
|
|
|
|
|
|
console.log(error);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
@ -144,12 +174,20 @@ export default {
|
|
|
|
color: #ff6a00;
|
|
|
|
color: #ff6a00;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
div {
|
|
|
|
div {
|
|
|
|
|
|
|
|
.townsmanactive {
|
|
|
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
|
|
|
}
|
|
|
|
button {
|
|
|
|
button {
|
|
|
|
width: 100px;
|
|
|
|
width: 100px;
|
|
|
|
height: 28px;
|
|
|
|
height: 28px;
|
|
|
|
font-size: 14px;
|
|
|
|
font-size: 14px;
|
|
|
|
border: 1px solid #cccccc;
|
|
|
|
border: 1px solid #cccccc;
|
|
|
|
background-color: #fff;
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
button:first-child {
|
|
|
|
button:first-child {
|
|
|
|
border-radius: 4px 0px 0px 4px;
|
|
|
|
border-radius: 4px 0px 0px 4px;
|
|
|
|
@ -159,4 +197,7 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.contentbody {
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</style>
|
|
|
|
|