From dc8cdf113e5026d61775e850f351876651576cfc Mon Sep 17 00:00:00 2001 From: lc Date: Tue, 7 Mar 2023 20:43:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=9C=8D=E5=8A=A1=E8=B4=B9?= =?UTF-8?q?=E5=BE=85=E5=AE=9A=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FirstJob/components/timepicker.vue | 47 +++++++++++++++++++++-- src/components/FirstJob/detail.vue | 40 +++++++++++++++++-- src/components/FirstJob/recordBill.vue | 47 +++++++++++++++++++++++ src/utils/commonUtil.js | 7 +++- src/utils/request.js | 6 +-- vue.config.js | 13 ++++++- 6 files changed, 149 insertions(+), 11 deletions(-) diff --git a/src/components/FirstJob/components/timepicker.vue b/src/components/FirstJob/components/timepicker.vue index 3897c32..a24a62d 100644 --- a/src/components/FirstJob/components/timepicker.vue +++ b/src/components/FirstJob/components/timepicker.vue @@ -149,6 +149,10 @@ export default { 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, ], + hourListTmp: [ + 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, + 17, 18, 18, + ], year: new Date().getFullYear(), month: new Date().getMonth() + 1, day: new Date().getDate(), @@ -181,8 +185,8 @@ export default { let box = document.querySelector(".time-container"); box.style.opacity = 1; if (this.isShow) { + this.initHours(); // console.log(this.selectHour); - this.$nextTick(() => { this.selectDate = new Date( new Date(this.datetime || new Date()).format("yyyy-MM-dd 00:00") @@ -198,7 +202,7 @@ export default { ? new Date(this.datetime || new Date()).getHours() : "8"; let ind = - (this.selectHour - 8) * 2 + (this.selectMinute === "0" ? 0 : 1); + (this.selectHour - 8 - (this.hourListTmp.length - this.hourList.length) / 2) * 2 + (this.selectMinute === "0" ? 0 : 1); that.$emit( "update:datetime", new Date( @@ -220,6 +224,41 @@ export default { }, }, methods: { + initHours(timestr = '') { + var today = new Date(); + var todayStr = `${today.getFullYear()}-${today.getMonth() < 10 ? ('0' + (today.getMonth() + 1)) : (today.getMonth() + 1)}-${today.getDate() < 10 ? ('0' + today.getDate()) : today.getDate()}`; + if(timestr != '' && timestr != todayStr) { + this.hourList = [ + 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, + 17, 18, 18, + ] + return; + } + if(this.datetime.split(" ")[0] == todayStr || timestr == todayStr) { + var currhour = today.getHours(); + if(currhour > 17) { + this.hourList = []; + } else if(currhour <= 7) { + this.hourList = [ + 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, + 17, 18, 18, + ] + } else { + var arr = []; + currhour += 1; + for(var i = currhour; i != 19; ++i) { + arr.push(i); + arr.push(i); + } + this.hourList = arr; + } + } else { + this.hourList = [ + 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, + 17, 18, 18, + ] + } + }, getLangText(item) { if (item) { if (this.langType == "en") { @@ -397,7 +436,7 @@ export default { this.year = new Date(time).getFullYear(); this.month = new Date(time).getMonth() + 1; this.day = new Date(time).getDate(); - console.log(this.selectMinute); + // console.log(this.selectMinute); // console.log(this.year, "--------", this.month, "--------", this.day); this.$emit( "update:datetime", @@ -410,6 +449,8 @@ export default { // let data12 = this.getabandonDate(new Date("2022-03-25").getTime()); // console.dir(this.getabandonDate); // console.log(data12); + var selDate = new Date(time); + this.initHours(`${selDate.getFullYear()}-${selDate.getMonth() < 10 ? ('0' + (selDate.getMonth() + 1)) : (selDate.getMonth() + 1)}-${selDate.getDate() < 10 ? ('0' + selDate.getDate()) : selDate.getDate()}`); }, getabandonDate(date) { // 禁用日期的回调 diff --git a/src/components/FirstJob/detail.vue b/src/components/FirstJob/detail.vue index 3360016..085aba7 100644 --- a/src/components/FirstJob/detail.vue +++ b/src/components/FirstJob/detail.vue @@ -289,11 +289,16 @@ > 财务结算 + 职位通告 - + -
+
代理须知
@@ -716,6 +721,16 @@
+
+
+
职位通告
+
+
复制
+ +
{{ jobDetail.jobDesp || "-" }}
+
+
+
@@ -1441,6 +1456,25 @@ export default { color: #333; } } + .copy { + width: 46px !important; + position: relative; + padding: 0px 8px !important; + float: right; + top: 6px; + /* right: 20px; */ + bottom: 4px; + font-size: 14px !important; + border: 1px solid #ff4400 !important; + color: #ff4400 !important; + line-height: 22px; + text-align: center; + cursor: pointer; + &:hover { + color: #fff !important; + background-color: #ff4400 !important; + } + } .jobinformationbox { h1 { position: relative; diff --git a/src/components/FirstJob/recordBill.vue b/src/components/FirstJob/recordBill.vue index d25014e..dde7f8a 100644 --- a/src/components/FirstJob/recordBill.vue +++ b/src/components/FirstJob/recordBill.vue @@ -825,12 +825,59 @@ export default { getDom() { console.log(1); }, + formatDateYMD(val) { + // model -> view,在更新 `` 元素之前格式化值 + if (val == null || val == "") { + return null; + } + + if ((val != null || val == "") && typeof val == "string") { + if (val.indexOf("T")) { + val = val.replace("T", " "); //原来L端可能返回的时间格式有带T的格式,处理一下 + } + val = val.replace("-", "/").replace("-", "/"); + } + var value = new Date(val); + //console.log(val); + var fmt = "yyyy-MM-dd"; + var o = { + "M+": value.getMonth() + 1, //月份 + "d+": value.getDate(), //日 + // "H+": value.getHours(), //小时 + //"h+": val.getHours()%12 == 0 ? 12 : val.getHours()%12, //小时 + // "m+": value.getMinutes(), //分 + // "s+": value.getSeconds() //秒 + //"S": val.getMilliseconds() //毫秒 + //"q+": Math.floor((val.getMonth() + 3) / 3) //季度 + }; + if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (value.getFullYear() + "").substr(4 - RegExp.$1.length)); + for (var k in o) { + if (new RegExp("(" + k + ")").test(fmt)) { + fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); + } + } + return fmt; + }, getDateinfo() { this.isShow = true; + if(isEmptyCheck(this.form.interviewTime)) {//设置默认值 + //判断当前时间是不是在16:00之后,如果在16:00之后,默认显示次日09:00,如果在16:00之前,则显示下一个整点时间 + var mydate = new Date(); + var tomorrow = new Date(); + tomorrow.setDate(tomorrow.getDate() + 1); + this.form.interviewTime = mydate.toTimeString() >= '16:00' ? (this.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (this.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`); + } console.log(this.form.interviewTime); }, getDateinfo1() { this.isShow1 = true; + if(isEmptyCheck(this.form.receptionTime)) {//设置默认值 + //判断当前时间是不是在16:00之后,如果在16:00之后,默认显示次日09:00,如果在16:00之前,则显示下一个整点时间 + var mydate = new Date(); + var tomorrow = new Date(); + tomorrow.setDate(tomorrow.getDate() + 1); + this.form.receptionTime = mydate.toTimeString() >= '16:00' ? (this.formatDateYMD(tomorrow.toLocaleDateString()) + " " + "09:00") : (this.formatDateYMD(mydate.toLocaleDateString()) + " " + `${mydate.getHours() + 1}:00`); + } console.log(this.form.receptionTime); }, verify() { diff --git a/src/utils/commonUtil.js b/src/utils/commonUtil.js index 836ff4a..125b6f1 100644 --- a/src/utils/commonUtil.js +++ b/src/utils/commonUtil.js @@ -1276,7 +1276,9 @@ export function disposeJobListData(jobList) { if (isNotEmptyCheck(item.distance)) { item["distanceKm"] = getDistanceName(item.distance); } - + if (isNotEmptyCheck(item.jobDesp)) { + item["jobDesp"] = item['jobDesp'].replaceAll("*****", ""); + } //年龄 // console.log(jobList); var ageStr = ""; @@ -1444,6 +1446,9 @@ export function disposeJobListData(jobList) { if (isNotEmptyCheck(jobList.distance)) { jobList["distanceKm"] = getDistanceName(jobList.distance); } + if (isNotEmptyCheck(jobList.jobDesp)) { + jobList["jobDesp"] = jobList['jobDesp'].replaceAll("*****", ""); + } //年龄 var ageStr = ""; if (isNotEmptyCheck(jobList.minAge) && isNotEmptyCheck(jobList.maxAge)) { diff --git a/src/utils/request.js b/src/utils/request.js index 8cbe857..e8f7d82 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -4,12 +4,12 @@ import Cookies from "js-cookie"; // import Vue from "vue"; // const baseURL = "http://1shoudan.com"; // 正式环境线上 // const baseURL = "http://idaotian.com"; // 正式环境线上 -const baseURL = "http://idagou.cn"; // 正式环境线上 -console.log(baseURL); +// const baseURL = "http://idagou.cn"; // 正式环境线上 +// console.log(baseURL); // const baseURL = "https://d.matripe.com.cn"; // 正式环境本地 // const baseURL = "http://bl7.matripe.com.cn:8001"; // 测试环境本地 // const baseURL = "http://1shoudan.renminshitang.com.cn"; // 测试环境线上 -// const baseURL = "http://localhost:8001"; +const baseURL = "http://localhost:8001"; // const data1 = require.context("./", false, /\.js$/); // 测试用 // console.log(data1.keys()); axios.defaults.withCredentials = true; //添加这行代码 diff --git a/vue.config.js b/vue.config.js index 9e90b17..fc350e8 100644 --- a/vue.config.js +++ b/vue.config.js @@ -34,13 +34,24 @@ module.exports = { // target: "http://localhost:8001/", // target: "http://bl7.matripe.com.cn:8001", // target: "http://1shoudan.renminshitang.com.cn", - target: "https://d.matripe.com.cn", + target: "https://idaotian.com", ws: true, // proxy websockets changeOrigin: true, // 确定是否跨域 pathRewrite: { "^/api_prod": "", }, }, + "/yishoudan": { + // target: "http://localhost:8001/", + // target: "http://bl7.matripe.com.cn:8001", + // target: "http://1shoudan.renminshitang.com.cn", + target: "https://idaotian.com", + ws: true, // proxy websockets + changeOrigin: true, // 确定是否跨域 + pathRewrite: { + "^/yishoudan": "/yishoudan", + }, + }, // '/api_prod': { // target: 'http://a.matripe.com.cn', // ws: true, // proxy websockets