|
@@ -9,29 +9,32 @@
|
|
<el-col :span="8" style="text-align:center;border-right: 1px solid #ccc;"><el-button @click="btnIn('out')">校外</el-button></el-col>
|
|
<el-col :span="8" style="text-align:center;border-right: 1px solid #ccc;"><el-button @click="btnIn('out')">校外</el-button></el-col>
|
|
</span>
|
|
</span>
|
|
<el-col :span="canSpan" style="text-align:center;border-right: 1px solid #ccc;">
|
|
<el-col :span="canSpan" style="text-align:center;border-right: 1px solid #ccc;">
|
|
- <el-button icon="el-icon-date" @click="toggle()">
|
|
|
|
|
|
+ <el-button icon="el-icon-date" @click="toggle()" style="border:0px">
|
|
{{ Rili }}
|
|
{{ Rili }}
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
</el-button>
|
|
</el-button>
|
|
|
|
+ <el-button type="text" icon="el-icon-circle-close" @click="reset()"></el-button>
|
|
</el-col>
|
|
</el-col>
|
|
<nut-calendar :is-visible="isVisible2" :is-auto-back-fill="true" @close="switchPicker('isVisible2')" @choose="talkRili"> </nut-calendar>
|
|
<nut-calendar :is-visible="isVisible2" :is-auto-back-fill="true" @close="switchPicker('isVisible2')" @choose="talkRili"> </nut-calendar>
|
|
</el-row>
|
|
</el-row>
|
|
- <span v-if="list.length > 0">
|
|
|
|
- <el-row :span="24" class="talk_li" v-for="(item, index) in list" :key="index" @click.native="link(item.id)">
|
|
|
|
- <el-col :span="4"><el-image :src="item.corp.identity.logo_url"></el-image> </el-col>
|
|
|
|
- <el-col :span="14" class="talk_li14">
|
|
|
|
- <el-row class="talk_li14_1" :span="4">{{ item.title }}</el-row>
|
|
|
|
- <el-row><i class="el-icon-office-building el-icon--left"></i>{{ item.corpname }}</el-row>
|
|
|
|
- <el-row><i class="el-icon-location-outline el-icon--left"></i>{{ item.schname }}</el-row>
|
|
|
|
- <el-row class="talk_li14_3"><i class="el-icon-office-building el-icon--left"></i>{{ item.address }} </el-row>
|
|
|
|
- </el-col>
|
|
|
|
- <el-col :span="6" class="talk_li6">
|
|
|
|
- <el-row class="talk_li6_2"> {{ item.date }}<br /> </el-row>
|
|
|
|
- <el-row class="talk_li6_3"><i class="el-icon-view el-icon--left"></i>2019</el-row>
|
|
|
|
- </el-col>
|
|
|
|
- </el-row>
|
|
|
|
- </span>
|
|
|
|
- <nodata v-else></nodata>
|
|
|
|
|
|
+ <el-col :span="24" v-loading="loading">
|
|
|
|
+ <span v-if="list.length > 0">
|
|
|
|
+ <el-row :span="24" class="talk_li" v-for="(item, index) in list" :key="index" @click.native="link(item.id)">
|
|
|
|
+ <el-col :span="4"><el-image :src="getImg(`corp.identity.logo_url`, item)"></el-image> </el-col>
|
|
|
|
+ <el-col :span="14" class="talk_li14">
|
|
|
|
+ <el-row class="talk_li14_1" :span="4">{{ item.title }}</el-row>
|
|
|
|
+ <el-row><i class="el-icon-office-building el-icon--left"></i>{{ item.corpname }}</el-row>
|
|
|
|
+ <el-row><i class="el-icon-location-outline el-icon--left"></i>{{ item.schname }}</el-row>
|
|
|
|
+ <el-row class="talk_li14_3"><i class="el-icon-office-building el-icon--left"></i>{{ item.address }} </el-row>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="6" class="talk_li6">
|
|
|
|
+ <el-row class="talk_li6_2"> {{ item.date }}<br /> </el-row>
|
|
|
|
+ <el-row class="talk_li6_3"><i class="el-icon-view el-icon--left"></i>2019</el-row>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ </span>
|
|
|
|
+ <nodata v-else></nodata>
|
|
|
|
+ </el-col>
|
|
</el-row>
|
|
</el-row>
|
|
</template>
|
|
</template>
|
|
</list-layout>
|
|
</list-layout>
|
|
@@ -42,6 +45,7 @@
|
|
import listLayout from '@/layout/list-layout.vue';
|
|
import listLayout from '@/layout/list-layout.vue';
|
|
import { mapActions, mapState } from 'vuex';
|
|
import { mapActions, mapState } from 'vuex';
|
|
import nodata from '@/components/nodata.vue';
|
|
import nodata from '@/components/nodata.vue';
|
|
|
|
+import _ from 'lodash';
|
|
export default {
|
|
export default {
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return {
|
|
return {
|
|
@@ -57,6 +61,7 @@ export default {
|
|
nodata,
|
|
nodata,
|
|
},
|
|
},
|
|
data: () => ({
|
|
data: () => ({
|
|
|
|
+ loading: true,
|
|
hasMore: true,
|
|
hasMore: true,
|
|
totalRow: 20,
|
|
totalRow: 20,
|
|
searchInfo: {},
|
|
searchInfo: {},
|
|
@@ -108,6 +113,7 @@ export default {
|
|
methods: {
|
|
methods: {
|
|
...mapActions(['talksOperation', 'corpOperation']),
|
|
...mapActions(['talksOperation', 'corpOperation']),
|
|
async search(type) {
|
|
async search(type) {
|
|
|
|
+ this.loading = true;
|
|
let skip = 0;
|
|
let skip = 0;
|
|
//判断下type,如果type存在.当前页加一
|
|
//判断下type,如果type存在.当前页加一
|
|
if (type && type === 'nextPage') {
|
|
if (type && type === 'nextPage') {
|
|
@@ -128,6 +134,7 @@ export default {
|
|
this.$set(this, `totalRow`, result.total); //将数据库返回的总数放到页面的totalRow变量中,用来判断
|
|
this.$set(this, `totalRow`, result.total); //将数据库返回的总数放到页面的totalRow变量中,用来判断
|
|
this.$set(this, `hasMore`, this.list.length < this.totalRow); //此处是根据数据库总数的结果和当前列表的总条数比较,看看是否可以继续请求数据
|
|
this.$set(this, `hasMore`, this.list.length < this.totalRow); //此处是根据数据库总数的结果和当前列表的总条数比较,看看是否可以继续请求数据
|
|
}
|
|
}
|
|
|
|
+ this.loading = false;
|
|
},
|
|
},
|
|
searchBar({ type, value }) {
|
|
searchBar({ type, value }) {
|
|
this.$set(this, `searchInfo`, value);
|
|
this.$set(this, `searchInfo`, value);
|
|
@@ -160,25 +167,42 @@ export default {
|
|
this.search();
|
|
this.search();
|
|
},
|
|
},
|
|
changeState(schIn) {
|
|
changeState(schIn) {
|
|
- if (this.$site === 'master') {
|
|
|
|
- this.searchInfo.schid = undefined;
|
|
|
|
- this.changeStateBtn = false;
|
|
|
|
- this.canSpan = 24;
|
|
|
|
- } else {
|
|
|
|
|
|
+ let site = sessionStorage.getItem('site');
|
|
|
|
+ let notMaster = schIn => {
|
|
if (schIn === 'in') {
|
|
if (schIn === 'in') {
|
|
this.searchInfo.schid = this.user.schid || undefined;
|
|
this.searchInfo.schid = this.user.schid || undefined;
|
|
} else {
|
|
} else {
|
|
this.searchInfo.schid = undefined;
|
|
this.searchInfo.schid = undefined;
|
|
}
|
|
}
|
|
|
|
+ };
|
|
|
|
+ if (!site) notMaster(schIn);
|
|
|
|
+ site = JSON.parse(site);
|
|
|
|
+ if (_.get(site, `site`) === 'master') {
|
|
|
|
+ this.searchInfo.schid = undefined;
|
|
|
|
+ this.changeStateBtn = false;
|
|
|
|
+ this.canSpan = 24;
|
|
|
|
+ } else {
|
|
|
|
+ notMaster(schIn);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
async searchCorp(data) {
|
|
async searchCorp(data) {
|
|
for (const item of data) {
|
|
for (const item of data) {
|
|
- let res = await this.corpOperation({ type: 'search', data: { corpid: item.corpid } });
|
|
|
|
- item.corp = res;
|
|
|
|
|
|
+ if (_.get(item, `corpid`)) {
|
|
|
|
+ let res = await this.corpOperation({ type: 'search', data: { corpid: item.corpid } });
|
|
|
|
+ item.corp = res;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return data;
|
|
return data;
|
|
},
|
|
},
|
|
|
|
+ getImg(item, data) {
|
|
|
|
+ return _.get(data, item);
|
|
|
|
+ },
|
|
|
|
+ reset() {
|
|
|
|
+ this.$set(this, `Rili`, '日历');
|
|
|
|
+ delete this.searchInfo.date;
|
|
|
|
+ this.hasMore = true;
|
|
|
|
+ this.search();
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|