|
@@ -13,7 +13,7 @@
|
|
|
<el-autocomplete style="margin-right: 15px;" class="inline-input" v-model="Contact" :fetch-suggestions="querySearchContact"
|
|
|
placeholder="联系人" clearable></el-autocomplete>
|
|
|
<el-select v-model="Delegation" clearable filterable placeholder="团组名称" style="width: 20%;margin-right: 15px;">
|
|
|
- <el-option v-for="item in restaurantDelegation" :key="item.id" :label="item.groupName"
|
|
|
+ <el-option v-for="item in restaurantDelegation" :key="item.id" :label="item.teamName"
|
|
|
:value="item.id">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -42,7 +42,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<template>
|
|
|
- <el-table :data="tableDatas.slice((currentPage - 1) * pageSize, currentPage * pageSize)" border
|
|
|
+ <el-table :data="tableData" border
|
|
|
style="width: 100%;margin-top: 10px;" v-loading="loading" element-loading-text="拼命加载中...">
|
|
|
<el-table-column prop="num" label="序 号" width="55">
|
|
|
<template slot-scope="scope">
|
|
@@ -83,7 +83,7 @@
|
|
|
<div class="block">
|
|
|
<el-pagination align='center' @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
|
|
:current-page="currentPage" :page-sizes="[10, 12, 15, 20]" :page-size="pageSize"
|
|
|
- layout="total, sizes, prev, pager, next" :total="tableDatas.length">
|
|
|
+ layout="total, sizes, prev, pager, next" :total="dataCount">
|
|
|
</el-pagination>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -156,10 +156,12 @@ export default {
|
|
|
handleSizeChange(val) {
|
|
|
this.currentPage = 1;
|
|
|
this.pageSize = val;
|
|
|
+ this.QueryInvitationOfficialActivityData()
|
|
|
},
|
|
|
//当前页改变时触发 跳转其他页
|
|
|
handleCurrentChange(val) {
|
|
|
this.currentPage = val;
|
|
|
+ this.QueryInvitationOfficialActivityData()
|
|
|
},
|
|
|
|
|
|
//国家搜索框处理
|
|
@@ -240,6 +242,51 @@ export default {
|
|
|
QueryData() {
|
|
|
this.QueryInvitationOfficialActivityData()
|
|
|
},
|
|
|
+ //基础数据
|
|
|
+ QueryIOAInitData() {
|
|
|
+ var url = "/api/Resource/QueryIOAInitData"
|
|
|
+ var that = this
|
|
|
+ this.$axios({
|
|
|
+ method: 'post',
|
|
|
+ url: url,
|
|
|
+ headers: {
|
|
|
+ Authorization: 'Bearer ' + that.token
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ PortType: 1
|
|
|
+ }
|
|
|
+ }).then(function (res) {
|
|
|
+ console.log(res)
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ res.data.data.countryData.forEach(function (item, index) {
|
|
|
+ that.restaurantsCountry.push({
|
|
|
+ value: item,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ res.data.data.contactData.forEach(function (item, index) {
|
|
|
+ that.restaurantContact.push({
|
|
|
+ value: item,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ res.data.data.inviterData.forEach(function (item, index) {
|
|
|
+ that.restaurantsUnitName.push({
|
|
|
+ value: item,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ res.data.data.domainData.forEach(function (item, index) {
|
|
|
+ that.restaurantField.push({
|
|
|
+ value: item,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ that.restaurantDelegation=res.data.data.groupNameData;
|
|
|
+ that.CreateUserList=res.data.data.userNameData;
|
|
|
+ }else{
|
|
|
+ that.$message.error(res.data.msg);
|
|
|
+ }
|
|
|
+ }).catch(function (error) {
|
|
|
+ that.$message.error(error);
|
|
|
+ });
|
|
|
+ },
|
|
|
QueryInvitationOfficialActivityData() {
|
|
|
console.log(this.Delegation)
|
|
|
var CreateUser = 0;
|
|
@@ -266,8 +313,8 @@ export default {
|
|
|
},
|
|
|
data: {
|
|
|
portType: 1,
|
|
|
- pageIndex: 0,
|
|
|
- pageSize: 0,
|
|
|
+ pageIndex: that.currentPage,
|
|
|
+ pageSize: that.pageSize,
|
|
|
Country: that.Country,
|
|
|
UnitName: that.UnitName,
|
|
|
Contact: that.Contact,
|
|
@@ -280,51 +327,16 @@ export default {
|
|
|
}).then(function (res) {
|
|
|
console.log(res)
|
|
|
if (res.data.code == 200) {
|
|
|
- that.tableData = res.data.data;
|
|
|
- //#region 国家输入推荐数据
|
|
|
- that.tableData.forEach(function (item, index) {
|
|
|
- that.restaurantsCountry.push({
|
|
|
- value: item.country,
|
|
|
- });
|
|
|
- });
|
|
|
//#endregion
|
|
|
- //#region 邀请方输入推荐数据
|
|
|
- that.tableData.forEach(function (item, index) {
|
|
|
- that.restaurantsUnitName.push({
|
|
|
- value: item.unitName,
|
|
|
- });
|
|
|
- });
|
|
|
- //#endregion
|
|
|
- //#region 联系人输入推荐数据
|
|
|
- that.tableData.forEach(function (item, index) {
|
|
|
- that.restaurantContact.push({
|
|
|
- value: item.contact,
|
|
|
- });
|
|
|
- });
|
|
|
- //#endregion
|
|
|
- //#region 领域输入推荐数据
|
|
|
- that.tableData.forEach(function (item, index) {
|
|
|
- that.restaurantField.push({
|
|
|
- value: item.field,
|
|
|
- });
|
|
|
- });
|
|
|
- //#endregion
|
|
|
- that.tableDatas = that.tableData
|
|
|
- if (that.tableDatas.slice((that.currentPage - 1) * that.pageSize, that.currentPage * that.pageSize).length == 0) {
|
|
|
- if (that.currentPage > 1) {
|
|
|
- that.currentPage = that.currentPage - 1;
|
|
|
- }
|
|
|
- }
|
|
|
- if (that.CreateUserId != 0 && that.CreateUserId != "") {
|
|
|
- that.dataCount = that.tableDatas.length
|
|
|
- }
|
|
|
+ that.tableData = res.data.data;
|
|
|
+ that.dataCount=res.data.count;
|
|
|
} else {
|
|
|
that.tableDatas = [];
|
|
|
}
|
|
|
that.loading = false
|
|
|
}).catch(function (error) {
|
|
|
that.loading = false
|
|
|
- that.$message.error("网络错误,请稍后重试");
|
|
|
+ that.$message.error(error);
|
|
|
});
|
|
|
},
|
|
|
QueryCount() {
|
|
@@ -483,6 +495,7 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
mounted() {
|
|
|
+ this.QueryIOAInitData();
|
|
|
this.token = JSON.parse(localStorage.getItem('userinif')).token;
|
|
|
this.userId = JSON.parse(localStorage.getItem('userinif')).userInfo.userId
|
|
|
this.QueryInvitationOfficialActivityData();
|