flat:暂存

This commit is contained in:
Apcallover
2024-05-06 20:49:06 +08:00
parent 9f2d4d5fee
commit 25a3a49bda
4 changed files with 30 additions and 7 deletions

View File

@@ -97,7 +97,6 @@ export default {
}, { }, {
label: '手机号', label: '手机号',
prop: 'surveyContent', prop: 'surveyContent',
search: true,
}, { }, {
label: '创建人', label: '创建人',
prop: 'createUser', prop: 'createUser',

View File

@@ -97,7 +97,6 @@ export default {
}, { }, {
label: '手机号', label: '手机号',
prop: 'surveyContent', prop: 'surveyContent',
search: true,
}, { }, {
label: '创建人', label: '创建人',
prop: 'createUser', prop: 'createUser',

View File

@@ -42,6 +42,7 @@
<div class="content-right relative"> <div class="content-right relative">
<avue-crud height="900" ref="crud2" :data="rightDataList" <avue-crud height="900" ref="crud2" :data="rightDataList"
:option="rightTabs ? rightPostOptions : rightPolicyOptions" :page.sync="rightPages" :option="rightTabs ? rightPostOptions : rightPolicyOptions" :page.sync="rightPages"
@current-change="rightCurrentPageChange" @size-change="rightSizePageChange"
@selection-change="rightSelectionChange"> @selection-change="rightSelectionChange">
<template slot="menuLeft"> <template slot="menuLeft">
<el-input style="width: 300px" placeholder="搜索岗位" v-show="rightTabs === 1" <el-input style="width: 300px" placeholder="搜索岗位" v-show="rightTabs === 1"
@@ -289,6 +290,16 @@ export default {
this.getLeftUserList() this.getLeftUserList()
console.log('leftpages:', this.leftPages) console.log('leftpages:', this.leftPages)
}, },
rightCurrentPageChange(current) {
this.rightPages.currentPage = current
this.rightTabs === 0 && this.getRightListPolicy()
this.rightTabs === 1 && this.getRightSearchByUserId()
},
rightSizePageChange(current) {
this.rightPages.size = current
this.rightTabs === 0 && this.getRightListPolicy()
this.rightTabs === 1 && this.getRightSearchByUserId()
},
leftSelectionChange(val) { leftSelectionChange(val) {
this.leftUserSelections = val this.leftUserSelections = val
console.log(val, '--------------------00000'); console.log(val, '--------------------00000');
@@ -374,28 +385,42 @@ export default {
} }
}, },
async getRightSearchByUserId() { async getRightSearchByUserId() {
const {currentPage, size} = this.rightPages
const ids = this.leftUserSelections.map(item => item.userId).join(','); const ids = this.leftUserSelections.map(item => item.userId).join(',');
const createTime = Date.now() + 3000 const createTime = Date.now() + 3000
this.rightLoading = true this.rightLoading = true
let resData = await getSearchAllByUserId({ids}) let params = {
ids, current: currentPage,
size,
}
let resData = await getSearchAllByUserId(params)
if (resData.data.code === 200) { if (resData.data.code === 200) {
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0 const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
setTimeout(() => { setTimeout(() => {
const {records, total, size, current} = resData.data.data
this.rightLoading = false this.rightLoading = false
this.rightDataList = resData.data.data this.rightDataList = records
this.rightPages = {total, size, currentPage: current}
}, timed) }, timed)
} }
}, },
async getRightListPolicy() { async getRightListPolicy() {
let params = {ids: this.rowData.policyIds} const {currentPage, size} = this.rightPages
let params = {
ids: this.rowData.policyIds,
current: currentPage,
size,
}
const createTime = Date.now() + 3000 const createTime = Date.now() + 3000
this.rightLoading = true this.rightLoading = true
let resData = await getListByids(params) let resData = await getListByids(params)
if (resData.data.code === 200) { if (resData.data.code === 200) {
const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0 const timed = createTime - Date.now() > 0 ? createTime - Date.now() : 0
setTimeout(() => { setTimeout(() => {
const {records, total, size, current} = resData.data.data
this.rightLoading = false this.rightLoading = false
this.rightDataList = resData.data.data this.rightDataList = records
this.rightPages = {total, size, currentPage: current}
}, timed) }, timed)
} }
}, },

View File

@@ -23,7 +23,7 @@ module.exports = {
port: 1888, port: 1888,
proxy: { proxy: {
"/api": { "/api": {
target: 'http://10.165.0.173:8000', target: 'http://192.168.1.105:8000',
ws: true, ws: true,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {