cyl/dev
wangxia 4 years ago
parent 46a4f0ae45
commit fc134e0e03

@ -130,7 +130,7 @@
</li> </li>
<li> <li>
<span>{{ item.statusTag }}</span <span>{{ item.statusTag }}</span
><span>面试时间: {{ item.interviewTime }}</span> ><span>{{ statusTimeInfo }}: {{ statusShowTime }}</span>
</li> </li>
</ul> </ul>
</div> </div>
@ -195,8 +195,8 @@
import { userBillApi } from "../../../../api/userinfo"; import { userBillApi } from "../../../../api/userinfo";
import { import {
getUserApplyOrderStatusById, getUserApplyOrderStatusById,
formatDateYMDHMS,
isEmptyCheck, isEmptyCheck,
formatDateYMDHM,
} from "../../../../utils/commonUtil"; } from "../../../../utils/commonUtil";
export default { export default {
@ -225,6 +225,8 @@ export default {
billList: [], billList: [],
isunfold: false, isunfold: false,
statusTimeInfo: "", //
statusShowTime: "", //
}; };
}, },
// //
@ -268,7 +270,7 @@ export default {
}, },
async getBill() { async getBill() {
console.log("click"); console.log("click");
// let that = this; let that = this;
console.log(this.pagination.status); console.log(this.pagination.status);
try { try {
this.isspinning = true; this.isspinning = true;
@ -328,15 +330,17 @@ export default {
item.isDown = false; item.isDown = false;
} }
item.statusTag = getUserApplyOrderStatusById(item.status); item.statusTag = getUserApplyOrderStatusById(item.status);
item.interviewTime = formatDateYMDHMS(item.interviewTime); item.interviewTime = formatDateYMDHM(item.interviewTime);
item.entryTime = formatDateYMDHM(item.entryTime);
item.leaveTime = formatDateYMDHM(item.leaveTime);
// item.updateTime = formatDateYMDHMS(item.updateTime); // item.updateTime = formatDateYMDHMS(item.updateTime);
// item.createTime = formatDateYMDHMS(item.createTime); // item.createTime = formatDateYMDHMS(item.createTime);
item.updateTime = isEmptyCheck(item.updateTime) item.updateTime = isEmptyCheck(item.updateTime)
? "2022-03-16 14:19" ? "2022-03-16 14:19"
: formatDateYMDHMS(item.updateTime); : formatDateYMDHM(item.updateTime);
item.createTime = isEmptyCheck(item.createTime) item.createTime = isEmptyCheck(item.createTime)
? "2022-03-16 14:19" ? "2022-03-16 14:19"
: formatDateYMDHMS(item.createTime); : formatDateYMDHM(item.createTime);
item.index = index + 1; item.index = index + 1;
// console.log(that.$refs["Control" + index][0]); // console.log(that.$refs["Control" + index][0]);
@ -356,11 +360,24 @@ export default {
item.isunfold = false; item.isunfold = false;
} }
item.controlUnfold = true; item.controlUnfold = true;
if (item.status == 10 || item.status == 20 || item.status == 30) {
that.statusTimeInfo = "面试时间";
that.statusShowTime = item.interviewTime;
} else if (item.status == 40 || item.status == 50) {
that.statusTimeInfo = "入职时间";
that.statusShowTime = item.entryTime;
} else {
that.statusTimeInfo = "离职时间";
that.statusShowTime = item.leaveTime;
}
// console.log("controlUnfold", item.controlUnfold); // console.log("controlUnfold", item.controlUnfold);
// console.log("isunfold", item.isunfold); // console.log("isunfold", item.isunfold);
console.log(item);
}); });
}, 0); }, 100);
this.pagination.total = data.data.recordCount; this.pagination.total = data.data.recordCount;
this.$forceUpdate();
this.totop(); this.totop();
} }
} catch (error) { } catch (error) {

@ -1143,7 +1143,50 @@ export function formatDateYMDHMS(val) {
return fmt; return fmt;
} }
} }
/**
* 时间格式化 2017-01-01 01:01
* @param val
* @returns {string}
*/
export function formatDateYMDHM(val) {
// model -> view在更新 `<input>` 元素之前格式化值
if (isEmptyCheck(val)) {
return "";
} else {
if ((val != null || val == "") && typeof val == "string") {
val = val.replace("-", "/").replace("-", "/");
}
var value = new Date(val);
//console.log(val);
var fmt = "yyyy-MM-dd HH:mm";
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;
}
}
function getJobSpecialLabelNamesArray(jobSpecialLabelNames) { function getJobSpecialLabelNamesArray(jobSpecialLabelNames) {
if (isNotEmptyCheck(jobSpecialLabelNames)) { if (isNotEmptyCheck(jobSpecialLabelNames)) {
return jobSpecialLabelNames.split(", "); return jobSpecialLabelNames.split(", ");

Loading…
Cancel
Save