diff --git a/index.html b/index.html index 7418ae3..2752222 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,6 @@ - <%= htmlWebpackPlugin.options.title %> diff --git a/pages.json b/pages.json index cb9be76..495bb3b 100644 --- a/pages.json +++ b/pages.json @@ -421,6 +421,13 @@ "enablePullDownRefresh": true, "navigationStyle": "custom" } + }, + { + "path": "pages/recruit/subPage/updataTaskorWork/updataTaskorWork", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false + } } ], "subPackages": [{ diff --git a/pages/recruit/components/userrecruitList.vue b/pages/recruit/components/userrecruitList.vue index 8a31ea7..767778e 100644 --- a/pages/recruit/components/userrecruitList.vue +++ b/pages/recruit/components/userrecruitList.vue @@ -130,8 +130,15 @@ }, goInfo: function({ id, + reviewState, jobType }) { + if (reviewState === 9) { + this.navTo( + `/pages/recruit/subPage/updataTaskorWork/updataTaskorWork?workId=${encodeURIComponent(id)}&isCan=${isCan}&jobType=${this.companyitem.jobType}&id=${this.companyitem.id}` + ) + return + } const isCan = this.noApply === false ? '0' : '1' switch (jobType) { case 0: diff --git a/pages/recruit/subPage/task.vue b/pages/recruit/subPage/task.vue index 5815406..a394ede 100644 --- a/pages/recruit/subPage/task.vue +++ b/pages/recruit/subPage/task.vue @@ -455,6 +455,35 @@ } }, async backfill(info) { + console.log(info, 'bos') + if (info.reviewState === 9) { + this.info.wage = info.wage + this.info.jobName = info.jobName + this.info.stime = info.stime + this.info.etime = info.etime + this.info.peopleNum = info.peopleNum + this.info.tradeId = info.tradeId + this.info.tradeNames = info.tradeNames + this.info.worktypeIds = info.worktypeIds + this.info.skillNames = info.skillNames + this.info.jobDescription = info.jobDescription + this.info.ageDesc = info.ageDesc + this.info.education = info.education + this.info.educationLabel = dic.eduArr[0].filter((vitem) => vitem.value === info.education)[0] + .label + this.info.experienceDesc = info.experienceDesc + this.info.cityId = info.cityId + this.info.jobCompanyName = info.jobCompanyName + this.info.jobCompanyScale = info.jobCompanyScale + this.info.jobCompanyIndustry = info.jobCompanyIndustry + this.info.jobCompanyNature = info.jobCompanyNature + this.info.jobCompanyDescription = info.jobCompanyDescription + this.info.callName = info.callName + this.info.callTel = info.callTel + this.info.callNumber = info.callNumber + this.info.address = info.address + return + } const { manager, companyTid, @@ -638,6 +667,9 @@ worktypeNames: names[0], // 工种名称 skillNames: names[1], // 工种二级名称 } + if (this.company.reviewState === 9) { + params.id = this.company.id + } let that = this this.$refs.form1.validate().then(res => { if (!this.info.wageUnitCategory) { diff --git a/pages/recruit/subPage/updataTaskorWork/updataTaskorWork.vue b/pages/recruit/subPage/updataTaskorWork/updataTaskorWork.vue new file mode 100644 index 0000000..67dc24b --- /dev/null +++ b/pages/recruit/subPage/updataTaskorWork/updataTaskorWork.vue @@ -0,0 +1,75 @@ +<template> + <view class="app_container"> + <view v-if="jobType === 0"> + <TaskVue :company="info"></TaskVue> + </view> + <view v-if="jobType === 1"> + <WorkVue :company="info"></WorkVue> + </view> + </view> +</template> + +<script> + import { + getuserrecruitDetailApp + } from '@/api/userrecruit.js' + import { + userrecruitDetail + } from '@/api/userrecruit.js' + import TaskVue from '../task.vue' + import WorkVue from '../work.vue' + export default { + components: { + TaskVue, + WorkVue + }, + data() { + return { + workId: '', + isShow: '', + type: '', + id: '', + jobType: 0, + info: {} + } + }, + onLoad(option) { + if (option.workId) { + this.workId = decodeURIComponent(option.workId); + } + if (option.isCan) { + this.isShow = option.isCan; //isShow为'0'则为我的任务、我的评价过来的,需要隐藏抢任务按钮 + } + if (option.type) { + this.type = option.type; //type为1则为消息邀请过来的,需要设置消息已读; + } + if (option.id) { + this.id = option.id; //消息id + } + if (option.jobType) { + this.jobType = Number(option.jobType) + } + this.getData() + }, + methods: { + async getData() { + const self = this; + let resData = null + resData = await getuserrecruitDetailApp({ + id: this.id, + jobType: this.jobType + }) + if (resData.data?.code === 200) { + console.log(resData.data.data) + self.info = resData.data.data; + } + }, + } + } +</script> + +<style scoped> + .app_container { + padding: 24rpx; + } +</style> \ No newline at end of file diff --git a/pages/recruit/subPage/work.vue b/pages/recruit/subPage/work.vue index efddbe4..781b3ab 100644 --- a/pages/recruit/subPage/work.vue +++ b/pages/recruit/subPage/work.vue @@ -385,6 +385,12 @@ default: null, } }, + watch: { + company(val) { + if (!val) return; + this.getDataInit(val) + } + }, components: { PickerTree }, @@ -402,7 +408,7 @@ this.getWorkTypes() this.dictionary() if (this.company) { - this.getDataInit() + this.getDataInit(this.company) } }, methods: { @@ -431,7 +437,35 @@ this.wallMaxAndMin = arr } }, - async getDataInit() { + async getDataInit(info) { + if (info.reviewState === 9) { + this.info.wage = info.wage + this.info.jobName = info.jobName + this.info.stime = info.stime + this.info.etime = info.etime + this.info.peopleNum = info.peopleNum + this.info.tradeId = info.tradeId + this.info.tradeNames = info.tradeNames + this.info.worktypeIds = info.worktypeIds + this.info.skillNames = info.skillNames + this.info.jobDescription = info.jobDescription + this.info.ageDesc = info.ageDesc + this.info.education = info.education + this.info.educationLabel = dic.eduArr[0].filter((vitem) => vitem.value === info.education)[0] + .label + this.info.experienceDesc = info.experienceDesc + this.info.cityId = info.cityId + this.info.jobCompanyName = info.jobCompanyName + this.info.jobCompanyScale = info.jobCompanyScale + this.info.jobCompanyIndustry = info.jobCompanyIndustry + this.info.jobCompanyNature = info.jobCompanyNature + this.info.jobCompanyDescription = info.jobCompanyDescription + this.info.callName = info.callName + this.info.callTel = info.callTel + this.info.callNumber = info.callNumber + this.info.address = info.address + return + } const { companyTid, comname, @@ -613,6 +647,10 @@ worktypeIds: ids.join(','), worktypeNames: names.join(',') } + console.log(this.company) + if (this.company.reviewState === 9) { + params.id = this.company.id + } let that = this this.$refs.form1.validate().then(res => { if (!this.info.wageUnitCategory) { diff --git a/vue.config.js b/vue.config.js index 5771477..178dbe6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,7 +3,7 @@ module.exports = { port: 1887, proxy: { '/api': { - target: 'http://10.165.0.173:8000', + target: 'http://192.168.1.105:8000', ws: true, pathRewrite: { '^/api': '/'