|
@@ -7,7 +7,7 @@
|
|
|
:zhuanjiaData="zhuanjiaData"
|
|
|
:canmoData="canmoData"
|
|
|
:messList="messList"
|
|
|
- :rencaiShowList="rencaiShowList"
|
|
|
+ :rencaiShowList="rencaiData"
|
|
|
:liebiaoList="liebiaoList"
|
|
|
@detail="clickDetail"
|
|
|
@detailgz="clickDetailgz"
|
|
@@ -35,9 +35,13 @@ export default {
|
|
|
personnelDetail,
|
|
|
},
|
|
|
data: () => ({
|
|
|
+ // 站点信息
|
|
|
info: {},
|
|
|
+ // 栏目信息
|
|
|
liebiaoList: [],
|
|
|
+ // 人才
|
|
|
rencaiData: [],
|
|
|
+
|
|
|
jobsData: [],
|
|
|
zhuanjiaData: [],
|
|
|
canmoData: [],
|
|
@@ -67,13 +71,11 @@ export default {
|
|
|
title: '标题',
|
|
|
},
|
|
|
],
|
|
|
- rencaiShowList: [],
|
|
|
canmouId: '',
|
|
|
}),
|
|
|
async created() {
|
|
|
- this.searchSite();
|
|
|
- this.searchColumn();
|
|
|
- this.searchInfo();
|
|
|
+ await this.search();
|
|
|
+ await this.searchInfo();
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
@@ -84,84 +86,109 @@ export default {
|
|
|
...mapzhuanjia({ zhuanjiaList: 'query', zhuanjiaInfo: 'fetch' }),
|
|
|
...mapcanmou({ canmouList: 'query', canmouInfo: 'fetch' }),
|
|
|
|
|
|
- // 查询站点信息
|
|
|
- async searchSite() {
|
|
|
+ clickDetail() {},
|
|
|
+ clickDetailgz() {},
|
|
|
+ clickDetailzj() {},
|
|
|
+ clickDetailcm() {},
|
|
|
+ onsaveClick() {},
|
|
|
+
|
|
|
+ // 查询站点信息+栏目信息
|
|
|
+ async search({ ...info } = {}) {
|
|
|
let res = await this.showInfo();
|
|
|
let object = JSON.parse(JSON.stringify(res.data));
|
|
|
if (object) {
|
|
|
this.$set(this, `info`, res.data);
|
|
|
- } else {
|
|
|
- this.$message.error(res.errmsg ? res.errmsg : 'error');
|
|
|
}
|
|
|
- },
|
|
|
- // 查询科技政务栏目
|
|
|
- async searchColumn({ ...info } = {}) {
|
|
|
- const res = await this.columnList({ ...info });
|
|
|
+ res = await this.columnList({ ...info });
|
|
|
this.$set(this, `liebiaoList`, res.data);
|
|
|
},
|
|
|
- async onsaveClick({ id }) {
|
|
|
- const res = await this.columnInfo(id);
|
|
|
- if (res.data.site === 'zpxx') {
|
|
|
- this.$router.push({ path: '/personnel/recruitList', query: { id: res.data.id } });
|
|
|
- } else if (res.data.site === 'gzgw') {
|
|
|
- this.$router.push({ path: '/personnel/guidanceList', query: { id: res.data.id } });
|
|
|
- } else if (res.data.site === 'qgjx') {
|
|
|
- this.$router.push({ path: '/personnel/practiceList', query: { id: res.data.id } });
|
|
|
- } else if (res.data.site === 'xxsj') {
|
|
|
- this.$router.push({ path: '/personnel/diligenceList', query: { id: res.data.id } });
|
|
|
- } else if (res.data.site === 'jyzd') {
|
|
|
- this.$router.push({ path: '/personnel/adviserList', query: { id: res.data.id } });
|
|
|
- }
|
|
|
- },
|
|
|
- // 人才详情
|
|
|
- clickDetail({ data }) {
|
|
|
- this.$router.push({ path: '/personnel/rencai', query: { id: data.id } });
|
|
|
- },
|
|
|
- // 工作详情
|
|
|
- clickDetailgz({ data }) {
|
|
|
- this.$router.push({ path: '/personnel/personnelwork', query: { id: data.id } });
|
|
|
- },
|
|
|
- // 专家详情
|
|
|
- clickDetailzj({ data }) {
|
|
|
- this.$router.push({ path: '/personnel/personnelexpert', query: { id: data.id } });
|
|
|
- },
|
|
|
- // 参谋详情
|
|
|
- clickDetailcm({ data }) {
|
|
|
- this.$router.push({ path: '/personnel/personnelcmdetail', query: { id: data.id } });
|
|
|
- },
|
|
|
// 查询
|
|
|
- async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ async searchInfo({ ...info } = {}) {
|
|
|
// 人才
|
|
|
- const res = await this.newsList({ skip, limit, ...info });
|
|
|
+ let res = await this.newsList({ limit: 6, ...info });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `rencaiData`, res.data);
|
|
|
- this.$set(this, `rencaiShowList`, res.data);
|
|
|
}
|
|
|
// 工作
|
|
|
- const resJob = await this.xinxiList({ skip, limit, ...info });
|
|
|
- if (this.$checkRes(resJob)) {
|
|
|
- this.$set(this, `jobsData`, resJob.data);
|
|
|
+ res = await this.xinxiList({ limit: 6, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `jobsData`, res.data);
|
|
|
}
|
|
|
// 专家
|
|
|
- const resZhuanjia = await this.zhuanjiaList({ skip, limit, ...info });
|
|
|
- if (this.$checkRes(resZhuanjia)) {
|
|
|
- // this.$set(this, `zhuanjiaData`, resZhuanjia.data);
|
|
|
+ res = await this.zhuanjiaList({ limit: 6, ...info });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `zhuanjiaData`, res.data);
|
|
|
}
|
|
|
//找参谋
|
|
|
- const rescanmou = await this.columnList({ ...info });
|
|
|
- for (const val of rescanmou.data) {
|
|
|
- if (val.site === 'jyzd') {
|
|
|
- this.$set(this, `canmouId`, val.id);
|
|
|
- this.searchCanmou();
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- async searchCanmou({ skip = 0, limit = 10, column_id } = {}) {
|
|
|
- const res = await this.canmouList({ skip, limit, column_id: this.canmouId });
|
|
|
+ let column = this.liebiaoList.find(i => i.site == 'jyzd');
|
|
|
+ res = await this.canmouList({ limit: 6, column_id: column.id });
|
|
|
if (this.$checkRes(res)) {
|
|
|
this.$set(this, `canmoData`, res.data);
|
|
|
}
|
|
|
},
|
|
|
+ // async onsaveClick({ id }) {
|
|
|
+ // const res = await this.columnInfo(id);
|
|
|
+ // if (res.data.site === 'zpxx') {
|
|
|
+ // this.$router.push({ path: '/personnel/recruitList', query: { id: res.data.id } });
|
|
|
+ // } else if (res.data.site === 'gzgw') {
|
|
|
+ // this.$router.push({ path: '/personnel/guidanceList', query: { id: res.data.id } });
|
|
|
+ // } else if (res.data.site === 'qgjx') {
|
|
|
+ // this.$router.push({ path: '/personnel/practiceList', query: { id: res.data.id } });
|
|
|
+ // } else if (res.data.site === 'xxsj') {
|
|
|
+ // this.$router.push({ path: '/personnel/diligenceList', query: { id: res.data.id } });
|
|
|
+ // } else if (res.data.site === 'jyzd') {
|
|
|
+ // this.$router.push({ path: '/personnel/adviserList', query: { id: res.data.id } });
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // // 人才详情
|
|
|
+ // clickDetail({ data }) {
|
|
|
+ // this.$router.push({ path: '/personnel/rencai', query: { id: data.id } });
|
|
|
+ // },
|
|
|
+ // // 工作详情
|
|
|
+ // clickDetailgz({ data }) {
|
|
|
+ // this.$router.push({ path: '/personnel/personnelwork', query: { id: data.id } });
|
|
|
+ // },
|
|
|
+ // // 专家详情
|
|
|
+ // clickDetailzj({ data }) {
|
|
|
+ // this.$router.push({ path: '/personnel/personnelexpert', query: { id: data.id } });
|
|
|
+ // },
|
|
|
+ // // 参谋详情
|
|
|
+ // clickDetailcm({ data }) {
|
|
|
+ // this.$router.push({ path: '/personnel/personnelcmdetail', query: { id: data.id } });
|
|
|
+ // },
|
|
|
+ // // 查询
|
|
|
+ // async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
+ // // 人才
|
|
|
+ // const res = await this.newsList({ skip, limit, ...info });
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // this.$set(this, `rencaiData`, res.data);
|
|
|
+ // this.$set(this, `rencaiShowList`, res.data);
|
|
|
+ // }
|
|
|
+ // // 工作
|
|
|
+ // const resJob = await this.xinxiList({ skip, limit, ...info });
|
|
|
+ // if (this.$checkRes(resJob)) {
|
|
|
+ // this.$set(this, `jobsData`, resJob.data);
|
|
|
+ // }
|
|
|
+ // // 专家
|
|
|
+ // const resZhuanjia = await this.zhuanjiaList({ skip, limit, ...info });
|
|
|
+ // if (this.$checkRes(resZhuanjia)) {
|
|
|
+ // // this.$set(this, `zhuanjiaData`, resZhuanjia.data);
|
|
|
+ // }
|
|
|
+ // //找参谋
|
|
|
+ // const rescanmou = await this.columnList({ ...info });
|
|
|
+ // for (const val of rescanmou.data) {
|
|
|
+ // if (val.site === 'jyzd') {
|
|
|
+ // this.$set(this, `canmouId`, val.id);
|
|
|
+ // this.searchCanmou();
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // async searchCanmou({ skip = 0, limit = 10, column_id } = {}) {
|
|
|
+ // const res = await this.canmouList({ skip, limit, column_id: this.canmouId });
|
|
|
+ // if (this.$checkRes(res)) {
|
|
|
+ // this.$set(this, `canmoData`, res.data);
|
|
|
+ // }
|
|
|
+ // },
|
|
|
},
|
|
|
};
|
|
|
</script>
|