|
|
|
|
@ -1,516 +1,502 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="townsman-container w">
|
|
|
|
|
<div class="contenttitle">
|
|
|
|
|
<ul @click="resetpag">
|
|
|
|
|
<li
|
|
|
|
|
@click="pagination.status = 0"
|
|
|
|
|
:class="{ townsmanactive: pagination.status === 0 }"
|
|
|
|
|
>
|
|
|
|
|
全部<span>{{ pagination.total ? pagination.total : "0" }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li
|
|
|
|
|
@click="pagination.status = 1"
|
|
|
|
|
:class="{ townsmanactive: pagination.status === 1 }"
|
|
|
|
|
>
|
|
|
|
|
空闲中<span>{{ pagination.total ? pagination.total : "0" }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li
|
|
|
|
|
@click="pagination.status = 2"
|
|
|
|
|
:class="{ townsmanactive: pagination.status === 2 }"
|
|
|
|
|
>
|
|
|
|
|
报名中<span>{{ pagination.total ? pagination.total : "0" }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li
|
|
|
|
|
@click="pagination.status = 3"
|
|
|
|
|
:class="{ townsmanactive: pagination.status === 3 }"
|
|
|
|
|
>
|
|
|
|
|
在职中<span>{{ pagination.total ? pagination.total : "0" }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="contentbody">
|
|
|
|
|
<div class="searchbox">
|
|
|
|
|
<div class="searchinput">
|
|
|
|
|
<a-input
|
|
|
|
|
placeholder="请输入老乡姓名/身份证号"
|
|
|
|
|
@keyup.enter="onSearch"
|
|
|
|
|
@input="resetsearch"
|
|
|
|
|
v-model="pagination.keys"
|
|
|
|
|
><i slot="prefix" class="iconfont icon-sousuo"></i>
|
|
|
|
|
<button slot="suffix" @click="onSearch">搜索</button>
|
|
|
|
|
</a-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pagechange">
|
|
|
|
|
<button @click="changepage(-1)">上一页</button>
|
|
|
|
|
<button @click="changepage(1)">下一页</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-table
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:data-source="data"
|
|
|
|
|
:pagination="false"
|
|
|
|
|
@change="onChange"
|
|
|
|
|
:loading="{
|
|
|
|
|
spinning: isspinning,
|
|
|
|
|
tip: '加载中',
|
|
|
|
|
wrapperClassName: 'spinstyle',
|
|
|
|
|
}"
|
|
|
|
|
:locale="tablenodata"
|
|
|
|
|
:rowKey="(record) => record.index"
|
|
|
|
|
>
|
|
|
|
|
<a slot="name" slot-scope="text">{{ text }}</a>
|
|
|
|
|
</a-table>
|
|
|
|
|
<div class="pagecontainer">
|
|
|
|
|
<a-pagination
|
|
|
|
|
:current="+pagination.pageNum"
|
|
|
|
|
:default-current="1"
|
|
|
|
|
:defaultPageSize="2"
|
|
|
|
|
:total="pagination.total"
|
|
|
|
|
@change="onChange"
|
|
|
|
|
/>
|
|
|
|
|
<div class="ant-pagination-options-quick-jumper">
|
|
|
|
|
跳至<input
|
|
|
|
|
ref="pageinput"
|
|
|
|
|
type="text"
|
|
|
|
|
@keyup.enter="inputpageChange"
|
|
|
|
|
@blur="inputpageChange"
|
|
|
|
|
:style="{ 'background-Color': '#f6f6f6' }"
|
|
|
|
|
/>页
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="townsman-container w">
|
|
|
|
|
<div class="contenttitle">
|
|
|
|
|
<ul @click="resetpag">
|
|
|
|
|
<li @click="pagination.status = 0" :class="{ townsmanactive: pagination.status === 0 }">
|
|
|
|
|
全部<span>{{ statusNum.num0 }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li @click="pagination.status = 1" :class="{ townsmanactive: pagination.status === 1 }">
|
|
|
|
|
空闲中<span>{{ statusNum.num1 }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li @click="pagination.status = 2" :class="{ townsmanactive: pagination.status === 2 }">
|
|
|
|
|
报名中<span>{{ statusNum.num2 }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
<li @click="pagination.status = 3" :class="{ townsmanactive: pagination.status === 3 }">
|
|
|
|
|
在职中<span>{{ statusNum.num3 }}</span>
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="contentbody">
|
|
|
|
|
<div class="searchbox">
|
|
|
|
|
<div class="searchinput">
|
|
|
|
|
<a-input placeholder="请输入老乡姓名/身份证号" @keyup.enter="onSearch" @input="resetsearch" v-model="pagination.keys"
|
|
|
|
|
><i slot="prefix" class="iconfont icon-sousuo"></i>
|
|
|
|
|
<button slot="suffix" @click="onSearch">搜索</button>
|
|
|
|
|
</a-input>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pagechange">
|
|
|
|
|
<button @click="changepage(-1)">上一页</button>
|
|
|
|
|
<button @click="changepage(1)">下一页</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<a-table
|
|
|
|
|
:columns="columns"
|
|
|
|
|
:data-source="data"
|
|
|
|
|
:pagination="false"
|
|
|
|
|
@change="onChange"
|
|
|
|
|
:loading="{
|
|
|
|
|
spinning: isspinning,
|
|
|
|
|
tip: '加载中',
|
|
|
|
|
wrapperClassName: 'spinstyle',
|
|
|
|
|
}"
|
|
|
|
|
:locale="tablenodata"
|
|
|
|
|
:rowKey="(record) => record.index"
|
|
|
|
|
>
|
|
|
|
|
<a slot="name" slot-scope="text">{{ text }}</a>
|
|
|
|
|
</a-table>
|
|
|
|
|
<div class="pagecontainer">
|
|
|
|
|
<a-pagination :current="+pagination.pageNum" :default-current="1" :defaultPageSize="8" :total="pagination.total" @change="onChange" />
|
|
|
|
|
<div class="ant-pagination-options-quick-jumper">跳至<input ref="pageinput" type="text" @keyup.enter="inputpageChange" @blur="inputpageChange" :style="{ 'background-Color': '#f6f6f6' }" />页</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { userTownsmanApi } from "../../../../api/userinfo";
|
|
|
|
|
import {
|
|
|
|
|
formatDateYMD,
|
|
|
|
|
getUserApplyOrderStatusById,
|
|
|
|
|
} from "../../../../utils/commonUtil";
|
|
|
|
|
import { userTownsmanApi, gettownsManCountApi } from "../../../../api/userinfo";
|
|
|
|
|
import { formatDateYMD, getUserApplyOrderStatusById } from "../../../../utils/commonUtil";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
// 组件名称
|
|
|
|
|
name: "",
|
|
|
|
|
// 局部注册的组件
|
|
|
|
|
components: {},
|
|
|
|
|
// 组件参数 接收来自父组件的数据
|
|
|
|
|
props: {},
|
|
|
|
|
// 组件状态值
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
tablenodata: {
|
|
|
|
|
// 空状态文本内容
|
|
|
|
|
emptyText: () => (
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<img
|
|
|
|
|
src="https://user-images.githubusercontent.com/507615/54591670-ac0a0180-4a65-11e9-846c-e55ffce0fe7b.png"
|
|
|
|
|
style="width:105px;height:90px;marginTop:20px"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="marginBottom:20px">暂无数据</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
pagination: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 2,
|
|
|
|
|
total: null, //分页配置
|
|
|
|
|
status: 0,
|
|
|
|
|
// searchTag: 1,
|
|
|
|
|
},
|
|
|
|
|
isspinning: false,
|
|
|
|
|
sortedInfo: null,
|
|
|
|
|
// 组件名称
|
|
|
|
|
name: "",
|
|
|
|
|
// 局部注册的组件
|
|
|
|
|
components: {},
|
|
|
|
|
// 组件参数 接收来自父组件的数据
|
|
|
|
|
props: {},
|
|
|
|
|
// 组件状态值
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
tablenodata: {
|
|
|
|
|
// 空状态文本内容
|
|
|
|
|
emptyText: () => (
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
<img src="https://user-images.githubusercontent.com/507615/54591670-ac0a0180-4a65-11e9-846c-e55ffce0fe7b.png" style="width:105px;height:90px;marginTop:20px" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style="marginBottom:20px">暂无数据</div>
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
},
|
|
|
|
|
pagination: {
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 8,
|
|
|
|
|
total: null, //分页配置
|
|
|
|
|
status: 0,
|
|
|
|
|
keys:null,
|
|
|
|
|
// searchTag: 1,
|
|
|
|
|
},
|
|
|
|
|
isspinning: false,
|
|
|
|
|
sortedInfo: null,
|
|
|
|
|
statusNum: {
|
|
|
|
|
num0: 0,
|
|
|
|
|
num1: 0,
|
|
|
|
|
num2: 0,
|
|
|
|
|
num3: 0,
|
|
|
|
|
},
|
|
|
|
|
data: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
// 计算属性
|
|
|
|
|
computed: {
|
|
|
|
|
columns() {
|
|
|
|
|
let { sortedInfo } = this;
|
|
|
|
|
sortedInfo = sortedInfo || {};
|
|
|
|
|
const columns = [
|
|
|
|
|
{
|
|
|
|
|
title: "序号",
|
|
|
|
|
dataIndex: "index",
|
|
|
|
|
key: "index",
|
|
|
|
|
scopedSlots: { customRender: "index" },
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 40,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "老乡姓名",
|
|
|
|
|
dataIndex: "userName",
|
|
|
|
|
key: "userName",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 90,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "年龄",
|
|
|
|
|
dataIndex: "age",
|
|
|
|
|
key: "age",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 50,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "民族",
|
|
|
|
|
dataIndex: "nation",
|
|
|
|
|
key: "nation",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 50,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "手机号",
|
|
|
|
|
dataIndex: "tel",
|
|
|
|
|
key: "tel",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "身份证号",
|
|
|
|
|
dataIndex: "IDCard",
|
|
|
|
|
key: "IDCard",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
// width: 50,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "状态",
|
|
|
|
|
dataIndex: "userApplyOrder",
|
|
|
|
|
key: "userApplyOrder",
|
|
|
|
|
sorter: (a, b) => a.userApplyOrder.localeCompare(b.userApplyOrder),
|
|
|
|
|
|
|
|
|
|
data: [],
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
// 计算属性
|
|
|
|
|
computed: {
|
|
|
|
|
columns() {
|
|
|
|
|
let { sortedInfo } = this;
|
|
|
|
|
sortedInfo = sortedInfo || {};
|
|
|
|
|
const columns = [
|
|
|
|
|
{
|
|
|
|
|
title: "序号",
|
|
|
|
|
dataIndex: "index",
|
|
|
|
|
key: "index",
|
|
|
|
|
scopedSlots: { customRender: "index" },
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 40,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "老乡姓名",
|
|
|
|
|
dataIndex: "userName",
|
|
|
|
|
key: "userName",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 90,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "年龄",
|
|
|
|
|
dataIndex: "age",
|
|
|
|
|
key: "age",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 50,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "民族",
|
|
|
|
|
dataIndex: "nation",
|
|
|
|
|
key: "nation",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 50,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "手机号",
|
|
|
|
|
dataIndex: "tel",
|
|
|
|
|
key: "tel",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "身份证号",
|
|
|
|
|
dataIndex: "idCard",
|
|
|
|
|
key: "idCard",
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
// width: 50,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "状态",
|
|
|
|
|
dataIndex: "userApplyOrder",
|
|
|
|
|
key: "userApplyOrder",
|
|
|
|
|
sorter: (a, b) => {
|
|
|
|
|
a.userApplyOrderStatus - b.userApplyOrderStatus;
|
|
|
|
|
},
|
|
|
|
|
sortOrder:
|
|
|
|
|
sortedInfo.columnKey === "userApplyOrder" && sortedInfo.order,
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
return columns;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// 侦听器
|
|
|
|
|
watch: {},
|
|
|
|
|
// 生命周期钩子 注:没用到的钩子请自行删除
|
|
|
|
|
/**
|
|
|
|
|
* 组件实例创建完成,属性已绑定,但DOM还未生成,$ el属性还不存在
|
|
|
|
|
*/
|
|
|
|
|
created() {
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* el 被新创建的 vm.el 替换,并挂载到实例上去之后调用该钩子。
|
|
|
|
|
* 如果 root 实例挂载了一个文档内元素,当 mounted 被调用时 vm.el 也在文档内。
|
|
|
|
|
*/
|
|
|
|
|
mounted() {},
|
|
|
|
|
// 组件方法
|
|
|
|
|
methods: {
|
|
|
|
|
onChange(e) {
|
|
|
|
|
this.pagination.pageNum = e;
|
|
|
|
|
console.log(this.pagination);
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
// sortOrder: sortedInfo.columnKey == "userApplyOrder" && sortedInfo.order,
|
|
|
|
|
// ellipsis: true,
|
|
|
|
|
width: 120,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
console.log(sortedInfo);
|
|
|
|
|
return columns;
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
// 侦听器
|
|
|
|
|
watch: {},
|
|
|
|
|
// 生命周期钩子 注:没用到的钩子请自行删除
|
|
|
|
|
/**
|
|
|
|
|
* 组件实例创建完成,属性已绑定,但DOM还未生成,$ el属性还不存在
|
|
|
|
|
*/
|
|
|
|
|
created() {
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
},
|
|
|
|
|
/**
|
|
|
|
|
* el 被新创建的 vm.el 替换,并挂载到实例上去之后调用该钩子。
|
|
|
|
|
* 如果 root 实例挂载了一个文档内元素,当 mounted 被调用时 vm.el 也在文档内。
|
|
|
|
|
*/
|
|
|
|
|
mounted() {
|
|
|
|
|
this.gettownsManCount();
|
|
|
|
|
},
|
|
|
|
|
// 组件方法
|
|
|
|
|
methods: {
|
|
|
|
|
onChange(e,e1,e2) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
},
|
|
|
|
|
inputpageChange(e) {
|
|
|
|
|
const pagenumcount = this.pagination.total / this.pagination.pageSize;
|
|
|
|
|
console.log(pagenumcount);
|
|
|
|
|
if (e.target.value) {
|
|
|
|
|
if (e.target.value > pagenumcount) {
|
|
|
|
|
this.pagination.pageNum = Math.ceil(pagenumcount);
|
|
|
|
|
} else {
|
|
|
|
|
this.pagination.pageNum = e.target.value;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.pagination.pageNum = 1;
|
|
|
|
|
}
|
|
|
|
|
// this.getJobList();
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
console.log(e);
|
|
|
|
|
},
|
|
|
|
|
async getTownsman() {
|
|
|
|
|
// let jobinfo = {...this.pagination , searchTag:1}
|
|
|
|
|
try {
|
|
|
|
|
this.isspinning = true;
|
|
|
|
|
console.log(this.pagination);
|
|
|
|
|
const { data } = await userTownsmanApi(this.pagination);
|
|
|
|
|
if (data.status === 200) {
|
|
|
|
|
// console.log();
|
|
|
|
|
this.data = data.data.recordList;
|
|
|
|
|
this.data.forEach((item, index) => {
|
|
|
|
|
console.log(item);
|
|
|
|
|
item.userApplyOrder = getUserApplyOrderStatusById(
|
|
|
|
|
item.userApplyOrderStatus
|
|
|
|
|
);
|
|
|
|
|
item.updateTime = formatDateYMD(item.updateTime);
|
|
|
|
|
item.index = index + 1;
|
|
|
|
|
});
|
|
|
|
|
console.log(data);
|
|
|
|
|
console.log(e1);
|
|
|
|
|
console.log(e2);
|
|
|
|
|
if (typeof e == 'number') {
|
|
|
|
|
this.pagination.pageNum = e;
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
|
|
|
|
|
console.log(true);
|
|
|
|
|
this.pagination.total = data.data.recordCount;
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
}
|
|
|
|
|
this.isspinning = false;
|
|
|
|
|
},
|
|
|
|
|
getPopupContainer(el, dialogContext) {
|
|
|
|
|
console.log(el);
|
|
|
|
|
console.log(dialogContext);
|
|
|
|
|
if (dialogContext) {
|
|
|
|
|
return dialogContext.getDialogWrap();
|
|
|
|
|
} else {
|
|
|
|
|
return document.body;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
resetpag() {
|
|
|
|
|
this.pagination = {
|
|
|
|
|
//分页配置
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 2,
|
|
|
|
|
total: null,
|
|
|
|
|
status: this.pagination.status,
|
|
|
|
|
};
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
},
|
|
|
|
|
resetsearch(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
if (e.target.value.length === 0) {
|
|
|
|
|
this.pagination.keys = "";
|
|
|
|
|
},
|
|
|
|
|
inputpageChange(e) {
|
|
|
|
|
const pagenumcount = this.pagination.total / this.pagination.pageSize;
|
|
|
|
|
console.log(pagenumcount);
|
|
|
|
|
if (e.target.value) {
|
|
|
|
|
if (e.target.value > pagenumcount) {
|
|
|
|
|
this.pagination.pageNum = Math.ceil(pagenumcount);
|
|
|
|
|
} else {
|
|
|
|
|
this.pagination.pageNum = e.target.value;
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
this.pagination.pageNum = 1;
|
|
|
|
|
}
|
|
|
|
|
// this.getJobList();
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
console.log(e);
|
|
|
|
|
},
|
|
|
|
|
async getTownsman() {
|
|
|
|
|
// let jobinfo = {...this.pagination , searchTag:1}
|
|
|
|
|
try {
|
|
|
|
|
this.isspinning = true;
|
|
|
|
|
console.log(this.pagination);
|
|
|
|
|
const { data } = await userTownsmanApi(this.pagination);
|
|
|
|
|
if (data.status === 200) {
|
|
|
|
|
// console.log();
|
|
|
|
|
this.data = data.data.recordList;
|
|
|
|
|
this.data.forEach((item, index) => {
|
|
|
|
|
// console.log(item);
|
|
|
|
|
item.userApplyOrder = getUserApplyOrderStatusById(item.userApplyOrderStatus);
|
|
|
|
|
item.updateTime = formatDateYMD(item.updateTime);
|
|
|
|
|
item.index = index + 1;
|
|
|
|
|
});
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
|
|
console.log(true);
|
|
|
|
|
this.pagination.total = data.data.recordCount;
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
}
|
|
|
|
|
this.isspinning = false;
|
|
|
|
|
},
|
|
|
|
|
async gettownsManCount() {
|
|
|
|
|
try {
|
|
|
|
|
const { data } = await gettownsManCountApi(this.pagination);
|
|
|
|
|
console.log(data);
|
|
|
|
|
if (data.status == 200) {
|
|
|
|
|
console.log("yes");
|
|
|
|
|
this.statusNum = data.data;
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.log(error);
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getPopupContainer(el, dialogContext) {
|
|
|
|
|
console.log(el);
|
|
|
|
|
console.log(dialogContext);
|
|
|
|
|
if (dialogContext) {
|
|
|
|
|
return dialogContext.getDialogWrap();
|
|
|
|
|
} else {
|
|
|
|
|
return document.body;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
resetpag() {
|
|
|
|
|
this.pagination = {
|
|
|
|
|
//分页配置
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 8,
|
|
|
|
|
total: null,
|
|
|
|
|
status: this.pagination.status,
|
|
|
|
|
keys: null
|
|
|
|
|
};
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
},
|
|
|
|
|
resetsearch(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
if (e.target.value.length === 0) {
|
|
|
|
|
this.pagination.keys = "";
|
|
|
|
|
|
|
|
|
|
this.gettownsManCount();
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onSearch() {
|
|
|
|
|
if(this.pagination.keys != null && this.pagination.keys.length != 0){
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
this.gettownsManCount();
|
|
|
|
|
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
onSearch() {
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
},
|
|
|
|
|
changepage(num) {
|
|
|
|
|
console.log(Math.ceil(this.pagination.total / this.pagination.pageSize));
|
|
|
|
|
if (
|
|
|
|
|
(this.pagination.pageNum === 1 && num === -1) ||
|
|
|
|
|
(this.pagination.pageNum ===
|
|
|
|
|
Math.ceil(this.pagination.total / this.pagination.pageSize) &&
|
|
|
|
|
num === 1)
|
|
|
|
|
) {
|
|
|
|
|
if (num === -1) {
|
|
|
|
|
this.$message.warning("已经到第一页了");
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning("已经到最后一页了");
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
this.pagination.pageNum += num;
|
|
|
|
|
}
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
changepage(num) {
|
|
|
|
|
console.log(Math.ceil(this.pagination.total / this.pagination.pageSize));
|
|
|
|
|
if ((this.pagination.pageNum === 1 && num === -1) || (this.pagination.pageNum === Math.ceil(this.pagination.total / this.pagination.pageSize) && num === 1)) {
|
|
|
|
|
if (num === -1) {
|
|
|
|
|
this.$message.warning("已经到第一页了");
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.warning("已经到最后一页了");
|
|
|
|
|
}
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
this.pagination.pageNum += num;
|
|
|
|
|
}
|
|
|
|
|
this.getTownsman();
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
|
|
.townsman-container {
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border: 1px solid #0000;
|
|
|
|
|
padding: 0 10px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
border: 1px solid #0000;
|
|
|
|
|
}
|
|
|
|
|
.contenttitle {
|
|
|
|
|
display: flex;
|
|
|
|
|
padding-bottom: 0px;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
border-bottom: 1px solid rgba(77, 87, 94, 0.1);
|
|
|
|
|
display: flex;
|
|
|
|
|
padding-bottom: 0px;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
border-bottom: 1px solid rgba(77, 87, 94, 0.1);
|
|
|
|
|
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
margin-top: 16px;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
|
|
|
|
|
ul {
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 40px;
|
|
|
|
|
.townsmanactive {
|
|
|
|
|
// border-color: #;
|
|
|
|
|
width: 128px;
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
z-index: 999;
|
|
|
|
|
border-bottom: 2px solid #ff6a00;
|
|
|
|
|
> span {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
li {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 118px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
// height: 40px;
|
|
|
|
|
padding-bottom: 16px;
|
|
|
|
|
color: #666;
|
|
|
|
|
// line-height: 40px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
transition: width 0.2s;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
> span {
|
|
|
|
|
margin-left: 12px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
&::after {
|
|
|
|
|
content: "";
|
|
|
|
|
position: absolute;
|
|
|
|
|
display: block;
|
|
|
|
|
width: 1px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 5px;
|
|
|
|
|
// transform: translateY(-50%);
|
|
|
|
|
background-color: #eeeeee;
|
|
|
|
|
}
|
|
|
|
|
&:last-child::after {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
button {
|
|
|
|
|
width: 100px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
position: relative;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
border: 1px solid #cccccc;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
margin-right: -1px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
&:hover {
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
button:first-child {
|
|
|
|
|
border-radius: 4px 0px 0px 4px;
|
|
|
|
|
}
|
|
|
|
|
button:last-child {
|
|
|
|
|
border-radius: 0px 4px 4px 0px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ul {
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 40px;
|
|
|
|
|
.townsmanactive {
|
|
|
|
|
// border-color: #;
|
|
|
|
|
width: 128px;
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
z-index: 999;
|
|
|
|
|
border-bottom: 2px solid #ff6a00;
|
|
|
|
|
> span {
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
li {
|
|
|
|
|
position: relative;
|
|
|
|
|
width: 118px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
// height: 40px;
|
|
|
|
|
padding-bottom: 16px;
|
|
|
|
|
color: #666;
|
|
|
|
|
// line-height: 40px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
transition: width 0.2s;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
> span {
|
|
|
|
|
margin-left: 12px;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: #666;
|
|
|
|
|
}
|
|
|
|
|
&::after {
|
|
|
|
|
content: "";
|
|
|
|
|
position: absolute;
|
|
|
|
|
display: block;
|
|
|
|
|
width: 1px;
|
|
|
|
|
height: 16px;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 5px;
|
|
|
|
|
// transform: translateY(-50%);
|
|
|
|
|
background-color: #eeeeee;
|
|
|
|
|
}
|
|
|
|
|
&:last-child::after {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
button {
|
|
|
|
|
width: 100px;
|
|
|
|
|
height: 28px;
|
|
|
|
|
position: relative;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
border: 1px solid #cccccc;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
margin-right: -1px;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
&:hover {
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
button:first-child {
|
|
|
|
|
border-radius: 4px 0px 0px 4px;
|
|
|
|
|
}
|
|
|
|
|
button:last-child {
|
|
|
|
|
border-radius: 0px 4px 4px 0px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.contentbody {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
/deep/ .searchbox {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
.searchinput {
|
|
|
|
|
width: 326px;
|
|
|
|
|
position: relative;
|
|
|
|
|
.ant-input {
|
|
|
|
|
// width: 300px;
|
|
|
|
|
position: relative;
|
|
|
|
|
height: 32px;
|
|
|
|
|
text-indent: 10px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
// border: 1px solid rgba(77, 87, 94, 0.3);
|
|
|
|
|
border-radius: 136px;
|
|
|
|
|
box-shadow: 0px 2px 4px 0px transparent;
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
padding-right: 0;
|
|
|
|
|
border-color: #e9e9e9;
|
|
|
|
|
// z-index: ;
|
|
|
|
|
&::placeholder {
|
|
|
|
|
text-indent: 10px;
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
}
|
|
|
|
|
&:focus {
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.ant-input-affix-wrapper {
|
|
|
|
|
.ant-input-prefix {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 20px;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 16px;
|
|
|
|
|
i {
|
|
|
|
|
color: #c9c9c9;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.ant-input-suffix {
|
|
|
|
|
// position: absolute;
|
|
|
|
|
right: 0px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
button {
|
|
|
|
|
width: 70px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
color: white;
|
|
|
|
|
background: #ff6a00;
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
outline: none;
|
|
|
|
|
&:hover {
|
|
|
|
|
background-color: #ff842b;
|
|
|
|
|
}
|
|
|
|
|
// &:focus {
|
|
|
|
|
// border: none;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.pagechange {
|
|
|
|
|
button {
|
|
|
|
|
width: 66px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
border: 1px solid rgba(77, 87, 94, 0.3);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #4d575e;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
&:hover {
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
}
|
|
|
|
|
&:first-child {
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/deep/ .ant-table-placeholder {
|
|
|
|
|
min-height: 300px;
|
|
|
|
|
> div {
|
|
|
|
|
position: relative;
|
|
|
|
|
height: 131px;
|
|
|
|
|
top: 30px;
|
|
|
|
|
// transform: translateY(-50%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/deep/ .ant-table-content {
|
|
|
|
|
.ant-table-body {
|
|
|
|
|
.ant-table-thead {
|
|
|
|
|
th {
|
|
|
|
|
padding: 16px 0;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
/deep/ .searchbox {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
margin-bottom: 16px;
|
|
|
|
|
.searchinput {
|
|
|
|
|
width: 326px;
|
|
|
|
|
position: relative;
|
|
|
|
|
.ant-input {
|
|
|
|
|
// width: 300px;
|
|
|
|
|
position: relative;
|
|
|
|
|
height: 32px;
|
|
|
|
|
text-indent: 10px;
|
|
|
|
|
background: #fff;
|
|
|
|
|
// border: 1px solid rgba(77, 87, 94, 0.3);
|
|
|
|
|
border-radius: 136px;
|
|
|
|
|
box-shadow: 0px 2px 4px 0px transparent;
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
padding-right: 0;
|
|
|
|
|
border-color: #e9e9e9;
|
|
|
|
|
// z-index: ;
|
|
|
|
|
&::placeholder {
|
|
|
|
|
text-indent: 10px;
|
|
|
|
|
font-size: 14px !important;
|
|
|
|
|
}
|
|
|
|
|
&:hover {
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
}
|
|
|
|
|
&:focus {
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.ant-input-affix-wrapper {
|
|
|
|
|
.ant-input-prefix {
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: 20px;
|
|
|
|
|
right: 0;
|
|
|
|
|
top: 16px;
|
|
|
|
|
i {
|
|
|
|
|
color: #c9c9c9;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.ant-input-suffix {
|
|
|
|
|
// position: absolute;
|
|
|
|
|
right: 0px !important;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
button {
|
|
|
|
|
width: 70px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
color: white;
|
|
|
|
|
background: #ff6a00;
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
border: none;
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
box-shadow: none;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
outline: none;
|
|
|
|
|
&:hover {
|
|
|
|
|
background-color: #ff842b;
|
|
|
|
|
}
|
|
|
|
|
// &:focus {
|
|
|
|
|
// border: none;
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.pagechange {
|
|
|
|
|
button {
|
|
|
|
|
width: 66px;
|
|
|
|
|
height: 24px;
|
|
|
|
|
border: 1px solid rgba(77, 87, 94, 0.3);
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
color: #4d575e;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
&:hover {
|
|
|
|
|
border-color: #ff6a00;
|
|
|
|
|
color: #ff6a00;
|
|
|
|
|
}
|
|
|
|
|
&:first-child {
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/deep/ .ant-table-placeholder {
|
|
|
|
|
min-height: 300px;
|
|
|
|
|
> div {
|
|
|
|
|
position: relative;
|
|
|
|
|
height: 131px;
|
|
|
|
|
top: 30px;
|
|
|
|
|
// transform: translateY(-50%);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/deep/ .ant-table-content {
|
|
|
|
|
.ant-table-body {
|
|
|
|
|
.ant-table-thead {
|
|
|
|
|
th {
|
|
|
|
|
padding: 16px 0;
|
|
|
|
|
|
|
|
|
|
&:not(:first-child) {
|
|
|
|
|
> span {
|
|
|
|
|
// line-height: 22px;
|
|
|
|
|
> div {
|
|
|
|
|
// line-height: 1;
|
|
|
|
|
border-left: 1px solid #ccc;
|
|
|
|
|
padding-left: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.ant-table-tbody {
|
|
|
|
|
.ant-table-row-cell-ellipsis {
|
|
|
|
|
padding: 16px 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
&:not(:first-child) {
|
|
|
|
|
> span {
|
|
|
|
|
// line-height: 22px;
|
|
|
|
|
> div {
|
|
|
|
|
// line-height: 1;
|
|
|
|
|
border-left: 1px solid #ccc;
|
|
|
|
|
padding-left: 12px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.ant-table-tbody {
|
|
|
|
|
.ant-table-row-cell-ellipsis {
|
|
|
|
|
padding: 16px 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
|