no message

master
jscyl13849007907 5 months ago
parent bba2525e2f
commit 820d843430

@ -0,0 +1,11 @@
<template>
<div class="p-apply-form" data-remark=''>
</div>
</template>
<script>
</script>
<style>
</style>

@ -1,650 +1,11 @@
<template>
<view class="p-root-home-quick g_w_all g_bg_f_5 g_kuaishou">
<AiApply class="" @outputInfo="getTownsManInfo" ref="AiApplyRef" />
<view class="">
<view class="card-tip g_pt_12 g_pb_8 g_pl_20 g_c_6">工友信息</view>
<view>
<view class="g_bg_f g_pl_15 g_pr_15 g_pt_10 g_ml_10 g_mr_10 g_radius_8 g_mb_12" v-for="(item, index) in persenInfo" :key="index" style="margin-bottom: 12px">
<view class="g_pb_2 g_flex_row_between">
<view class="g_flex_1 g_flex_column_center g_mr_10">
<view class="g_flex_row_start g_fs_16 g_fw_bold">
<view> {{ item.userName ? item.userName + "/" : "姓名/" }} </view>
<view v-if="!item.sex">/</view>
<view v-if="item.sex == 1">/</view>
<view v-if="item.sex == 2">/</view>
<view> {{ item.age ? item.age + "岁/" : "年龄/" }} </view>
<view> {{ item.nation ? item.nation : "民族" }} </view>
</view>
</view>
<view class="g_flex_none g_flex_row_end">
<view class="g_flex_row_end g_pl_16 g_pr_16 g_pt_9 g_pb_9" style="background-color: #f0fff8; border-radius: 17px">
<view class="g_flex_row_end" @click="goFellow(item, index)">
<view class="g_flex_column_center">
<i class="iconfont icon-bianji g_c_3"></i>
</view>
<view class="g_fs_12 g_c_3 g_ml_8">编辑</view>
</view>
</view>
</view>
</view>
<view class="g_pb_4 g_fs_16 g_c_6">{{ item.address ? item.address : "家庭住址" }}</view>
<view class="g_flex_row_start g_pb_15">
<view class="g_flex_row_start g_mr_14">
<view class="g_flex_none g_mr_4 g_w_28 g_h_28 g_radius_50 g_flex_c">
<image :src="cdnBaseImg + 'order_idcard.svg'" class="g_w_28 g_h_28"></image>
</view>
<view class="g_flex_column_center g_c_6">{{ item.idCard ? item.idCard : "身份证号" }}</view>
</view>
<view class="g_flex_row_start">
<view class="g_flex_none g_mr_4 g_w_28 g_h_28 g_radius_50 g_flex_c">
<image :src="cdnBaseImg + 'order_tel.svg'" class="g_w_28 g_h_28"></image>
</view>
<view class="g_flex_column_center g_c_6">{{ item.tel ? item.tel : "手机号" }}</view>
</view>
</view>
<view class="g_pb_17 g_flex_row_start">
<g-panel-image :url="item.idCardImageUrl" v-if="item.idCardImageUrl" radius="4" size="112" @clickItem="handleClickIDcard" />
<view v-if="item.imgs" class="g_flex_row_start">
<view v-for="i in item.imgs" class="g_ml_10">
<g-panel-image :url="i" radius="4" size="112" @clickItem="handleClickIDcard" />
</view>
</view>
</view>
</view>
</view>
<view class="g_flex_row_center flex_center g_flex_1 g_h_48 g_bg_f g_fs_16 g_c_main g_ml_10 g_mr_10 g_radius_8" @click="goFellow('')" v-if="persenInfo.length <= 5">
<!-- <view class="g_w_18 g_h_18 g_mr_6 g_text_c g_radius_20 g_border_main g_fsi_18" style="line-height: 13px">+</view> -->
<view class="g_flex_column_center">
<i class="iconfont icon-jia1 g_c_min g_mr_6" style="font-size: 18px"></i>
</view>
<view class="">添加工友</view>
</view>
<view>
<view class="card-tip g_pt_24 g_pb_8 g_pl_20 g_c_6">职位信息</view>
<view class="fs_top text-wrap">
<g-panel-form-slot :list="jobData" @clickResult="changePage" @changeTime="getInviteTime" @changeAddress="changeAddress" @chooseAddress="chooseAddress"> </g-panel-form-slot>
</view>
</view>
<view>
<view class="card-tip g_pt_24 g_pb_8 g_pl_20 g_c_6">报名备注</view>
<view class="g_flex_row_center g_p_10 g_pt_16 g_ml_10 g_mr_10 g_bg_f g_radius_8" style="width: calc(100vw- 20px)">
<textarea class="weui-input g_flex_1 g_fs_16" placeholder="请输入报名备注" v-model="updateInfo.desp" placeholder-style="color:#999" :maxlength="-1" auto-height style="min-height: 137px; width: 100%; z-index: 0"></textarea>
</view>
</view>
<view class="g_mt_12">
<view class="g_flex_row_center g_mb_12" style="color: rgba(0, 0, 0, 0.45)">
<u-checkbox-group @change="radioGroupChange" shape="circle">
<u-checkbox v-model="agreeRadio" name="agree" active-color="#00b666">
<view class="g_flex_row_center g_fs_12">
<view>我已阅读并同意</view>
<view @click.stop="goPage('/root/person/agreeUser')">用户协议</view>
<view></view>
<view @click.stop="goPage('/root/person/agreePrive')">隐私政策</view>
</view>
</u-checkbox>
</u-checkbox-group>
</view>
<view class="g_h_84"></view>
<g-panel-fixed>
<slot>
<view class="g_flex_row_between g_pl_16 g_pr_16" style="z-index: 99">
<div class="" style="width:82px">
<!-- <view class="g_fs_16 g_c_main g_flex_c g_pl_8 g_pr_8 g_radius_6 g_ml_16 g_border_main" hover-class="thover" @click="goReturn"></view> -->
<rh-button primaryColor="#00b666" btnText="取消" size="small_auto" type="default" @clickBtn="goReturn" />
</div>
<div class="g_flex_1 g_flex_row_end">
<rh-button primaryColor="#00b666" btnText="立即报名" type="primary" :loading="btnLoading" @clickBtn="submitForm" />
</div>
</view>
</slot>
</g-panel-fixed>
</view>
</view>
</view>
<rh-apply :dataoptions='options'></rh-apply>
</template>
<script>
import { nationlist } from "../../utils/nation.js";
import dateUtil from "../../utils/dateUtil.js";
import AiApply from "../../components/AiApply.vue";
export default {
components: {
AiApply,
},
onReady() {
this.G.setNavStyle();
let that = this;
uni.$on("getTownsman", (data) => {
console.log("getTownsman", data);
//
if (data.info.idCard && (data.info.idCard.length == 15 || data.info.idCard.length == 18)) {
let infoByIDcard = this.G.getInfoByIDcard(data.info.idCard);
data.info.age = infoByIDcard.age;
}
if (that.persenInfo.length == 0) {
that.persenInfo[0] = {
...data.info,
index: that.persenInfo.length,
};
} else if (data.info.index || data.info.index === 0) {
that.persenInfo[data.info.index] = data.info;
} else {
that.persenInfo[that.persenInfo.length] = {
...data.info,
index: that.persenInfo.length,
};
}
console.log("that.persenInfo", that.persenInfo);
that.$forceUpdate();
});
uni.$on("changeJobInfo", function (data) {
that.updateInfo.jobId = data.info.leafCateId;
that.updateInfo.jobName = data.info.title;
that.currentJobInfo = data.info;
that.jobType = data.info.jobType;
console.log("data.info", data.info);
that.getJobDetail(data.info);
that.$forceUpdate();
});
uni.$on("resetTownsman", function (data) {
if (data.reset) {
that.persenInfo = [];
}
that.$forceUpdate();
});
},
onShareAppMessage() {
return this.G.shareFun();
},
onLoad(options) {
let that = this;
console.log("options", options);
console.log("options.jobId", options.jobId);
let params = options.params ? JSON.parse(options.params) : {};
if (params.jobId) {
that.currentJobInfo = JSON.parse(JSON.stringify(params));
this.updateInfo.jobId = params.jobId;
this.updateInfo.jobName = params.jobName;
export default{
onLoad(options) {
this.options = options
}
uni.setNavigationBarTitle({
title: params.title ? params.title : "报名",
});
if (params.type == 1 || params.type == 2) that.jobType = params.type;
if (params.agencyId) that.updateInfo.upAgencyId = params.agencyId;
(params.isFans === 0 || params.isFans) && (that.isFans = params.isFans);
params.agencyUserId && (that.updateInfo.agencyUserId = params.agencyUserId); // id
params.shareUserAgencyId && (that.updateInfo.agencyId = params.shareUserAgencyId); // id
this.updateInfo.interviewTimeStr = "";
setTimeout(() => {
that.IS_CREATOR = uni.getStorageSync("IS_CREATOR") == 1 ? true : false;
that.updateInfo.interviewTimeStr = "";
console.log("获取面试时间:", that.updateInfo.interviewTimeStr);
//
let hour = new Date().getHours();
if (hour < 20 && hour >= 6) {
this.updateInfo.interviewTimeStr = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " " + (hour + 1) + ":00";
} else if (hour >= 20) {
this.updateInfo.interviewTimeStr = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " 19:30";
} else if (hour < 6) {
this.updateInfo.interviewTimeStr = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " 6:00";
}
// that.updateInfo.interviewTimeStr = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " 06:00";
that.$forceUpdate();
if (that.updateInfo.jobId) {
that.setFormList();
that.getJobDetail({
leafCateId: that.updateInfo.jobId,
});
} else {
that.setFormList();
}
}, 1);
},
data() {
return {
detailRes: {},
IS_CREATOR: false,
jobType: 2,
isFans: 2,
currentJobInfo: {},
cdnBaseImg: this.G.store().cdnBaseImg,
nation: nationlist.map((item, index) => {
return item.name;
}),
nationIndex: 0,
userTel: "",
info: {
name: "",
sex: "男",
age: "",
nation: "",
idCard: "",
address: "",
},
updateInfo: {
jobId: 0,
jobName: "请选择报名职位",
desp: "",
interviewTimeStr: "",
},
persenInfo: [],
agreeRadio: ["agree"],
jobData: [],
zhengceTextList: [],
btnLoading: false,
};
},
onShow() {
let that = this;
that.pageSpeed = -1;
},
methods: {
getTownsManInfo(info) {
console.log("info", info);
uni.$emit("getTownsman", {
info,
});
},
getJobDetail($data) {
let that = this;
that.G.Get(
that.api.job_personDetail + "/" + $data.leafCateId,
{
id: $data.leafCateId,
},
(res) => {
that.detailRes = res.record;
let policyStr;
if (that.isFans == 2) {
policyStr = "1. 佣金:" + (res.record.returnFeeType !== "" ? that.G.setReturnFee(res.record.returnFee, res.record.returnFeeType) : "费用待定") + " \n\n" + "2. 佣金详情:" + (res.record.returnFeeDesp || "费用待定") + " \n\n" + "3. 薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n";
} else {
policyStr = "薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n";
}
console.log("政策列表:", res);
that.setFormList(policyStr);
}
);
},
setFormList(policyStr) {
let that = this;
// console.log("that.updateInfo", that.updateInfo);
if (that.isFans == 2) {
that.jobData = [
{
icon: "",
label: "报名职位",
result: that.updateInfo.jobName,
path: "/root/other/search?from=record",
placeholder: "请选择报名职位",
fontColor: that.updateInfo.jobName == "请选择报名职位" ? "g_c_9" : "g_c_3",
tip: "applia-job",
require: true,
customRequire: true,
pColumn: 12,
},
{
icon: "",
label: "面试时间",
result: "",
path: "",
value: that.updateInfo.interviewTimeStr,
tip: "slot-time",
require: true,
customRequire: true,
type: "slot",
pColumn: 12,
from: "reservation-time",
},
that.updateInfo["interviewAddress"]
? {
icon: "",
label: "面试地址",
result: "",
value: that.updateInfo["interviewAddress"],
path: "",
addressDetail: {
latitude: that.updateInfo["interviewLat"],
longitude: that.updateInfo["interviewLng"],
},
tip: "slot-choose&input-address",
uneditable: that.currentJobInfo.agencyId == uni.getStorageSync("apply-userinfo").agencyId ? false : true,
placeholder: "请选择面试地址",
type: "slot",
fontSize: "16px",
pColumn: 5,
pRow: 12,
require: false,
suffix: "icon-dizhi1",
}
: null,
that.updateInfo.jobId
? {
icon: "",
label: "项目政策",
result: "",
path: "",
value: policyStr || "-",
tip: "slot-caiwu",
require: false,
customRequire: false,
type: "slot",
pColumn: 12,
from: "slot-caiwu",
}
: null,
];
} else {
that.jobData = [
{
icon: "",
label: "报名职位",
result: that.updateInfo.jobName,
path: "",
placeholder: "请选择报名职位",
fontColor: that.updateInfo.jobName == "请选择报名职位" ? "g_c_9" : "g_c_3",
tip: "applia-job",
require: true,
customRequire: true,
pColumn: 12,
},
{
icon: "",
label: "面试时间",
result: "",
path: "",
value: that.updateInfo.interviewTimeStr,
tip: "slot-time",
require: true,
customRequire: true,
type: "slot",
pColumn: 12,
from: "reservation-time",
},
that.updateInfo.jobId
? {
icon: "",
label: "项目政策",
result: "",
path: "",
value: policyStr || "-",
tip: "slot-caiwu",
require: false,
customRequire: false,
type: "slot",
pColumn: 12,
from: "slot-caiwu",
}
: null,
];
}
that.$forceUpdate();
},
handleClickIDcard(e) {
this.info.idCard = e;
},
clickDesp(e) {
this.updateInfo.desp = e.value;
},
changePage(e) {
uni.navigateTo({
url: e.path,
});
},
getInviteTime(e) {
console.log("获取预约面试时间:", e);
this.updateInfo.interviewTimeStr = e;
},
updateDom() {},
chooseAddress(e) {
let that = this;
console.log(e);
this.updateInfo.interviewLat = e.lat;
this.updateInfo.interviewLng = e.lng;
this.updateInfo.interviewAddress = e.address;
this.jobData[1].value = this.updateInfo.interviewAddress;
// billForm.value.storeAddr = e.address;
console.log("this.updateInfo", this.updateInfo);
console.log("e", e);
this.$forceUpdate();
},
changeAddress(e) {
this.updateInfo.interviewAddress = e;
console.log("this.updateInfo", this.updateInfo);
console.log("e", e);
// this.info.address = e;
this.$forceUpdate();
},
radioGroupChange(e) {},
goReturn() {
uni.navigateBack();
},
goPage($path) {
uni.navigateTo({
url: $path,
});
},
goFellow($item, $index) {
let that = this,
params = {},
info = null;
// ,
// if (!that.persenInfo[0].userName && $item === "") {
// uni.showToast({
// title: "",
// icon: "none",
// });
// return;
// }
if ($item) {
info = $item;
params = {
name: info.userName || "",
sex: info.sex,
age: info.age || "",
nation: info.nation || "",
tel: info.tel ? info.tel : "" || "",
idCard: info.idCard ? info.idCard : "" || "",
idCardImageUrl: info.idCardImageUrl ? info.idCardImageUrl : "",
address: info.address ? info.address : "",
imgs: info.imgs || "",
userName: info.userName || "",
index: $index,
};
}
console.log("params", params);
if (info) {
uni.navigateTo({
url: "/root/home/editTownsman?" + that.G.objToStr(params),
});
} else {
uni.navigateTo({
url: "/root/home/editTownsman",
});
}
},
handleClickMobile() {},
submitForm() {
let that = this;
if (!that.agreeRadio) {
uni.showToast({
icon: "none",
title: "请阅读协议",
});
return false;
}
if (!that.updateInfo.jobId) {
uni.showToast({
icon: "none",
title: "请选择职位",
});
return false;
}
if (that.persenInfo.length == 0) {
uni.showToast({
icon: "none",
title: "请输入工友信息",
});
return false;
}
if (that.btnLoading) {
return false;
}
that.btnLoading = true;
let submitInfo = {
...that.updateInfo,
};
submitInfo.applyUserJson = JSON.stringify(
that.persenInfo.map((item) => {
return {
// interviewTime: dayjs(item.interviewTime).format("YYYY-MM-DD HH:mm"),
// receptionTime: item.receptionTime ? dayjs(item.receptionTime).format("YYYY-MM-DD HH:mm") : dayjs(item.interviewTime).format("YYYY-MM-DD HH:mm"),
idCard: item.idCard,
idCardImageUrl: item.idCardImageUrl,
userName: item.userName,
sex: item.sex,
age: item.age,
nation: item.nation,
tel: item.tel,
address: item.address,
userApplyOrderFiles:
item.imgs && item.imgs.length > 0
? item.imgs
.map((itm) => {
return itm;
})
.join(",")
: "",
// desp: item.desp,
// policyIdx: item.policyIdx,
// pickerStr: item.pickerStr,
};
})
);
// let _upAgencyName = '';
// if (that.detailRes.status == 0) {
// _upAgencyName = that.detailRes.fullName;
// } else if (that.detailRes.status == 1) {
// if (that.detailRes.providerNameAll) {
// _upAgencyName = `${that.detailRes.providerName}${that.detailRes.providerNameAll}`;
// } else {
// _upAgencyName = that.detailRes.providerName;
// }
// } else {
// _upAgencyName = that.detailRes.userName;
// }
// submitInfo.upAgencyName = _upAgencyName ? _upAgencyName : '';
console.log("submitInfo", submitInfo);
that.G.Post("/yishoudan/common/order/addBatch", submitInfo, (res) => {
// uni.hideLoading();
uni.showToast({
icon: "success",
title: "报名成功",
duration: 2000,
});
// that.persenInfo = [];
that.btnLoading = false;
that.$refs.AiApplyRef.ressetAitext();
// that.$forceUpdate();
setTimeout(() => {
uni.navigateTo({
url: "/root/home/applicationSuccess?jobId=" + that.updateInfo.jobId,
});
}, 1500);
});
},
submitFormSub($item) {
let that = this;
// uni.navigateTo({
// url: "/root/home/applicationSuccess",
// });
// return;
let submitInfo = {
...that.updateInfo,
...$item,
};
if (!submitInfo.userName) {
uni.showToast({
icon: "none",
title: "请编辑用户信息",
});
return false;
}
uni.showLoading({
title: "提交中",
});
// submitInfo.sex = submitInfo.sex == "" ? 1 : 2;
if (submitInfo.imgs && submitInfo.imgs.length > 0) {
submitInfo.imgs = submitInfo.imgs.join(",");
}
that.G.Post(that.api.job_recordJob, submitInfo, (res) => {
// uni.hideLoading();
uni.showToast({
icon: "success",
title: "报名成功",
duration: 2000,
});
// that.persenInfo = [];
that.$refs.AiApplyRef.ressetAitext();
// that.$forceUpdate();
setTimeout(() => {
uni.navigateTo({
url: "/root/home/applicationSuccess",
});
}, 1500);
});
// setTimeout(() => {
// uni.navigateTo({
// url: "/root/home/applicationSuccess",
// });
// }, 500);
},
},
};
</script>
<style lang="scss">
.p-root-home-quick {
min-height: 100%;
.fs_top {
.m-set {
}
}
.fs_bottom {
.m-set {
border-top-left-radius: 0;
border-top-right-radius: 0;
.item {
position: relative;
&::before {
content: "";
position: absolute;
top: 0;
left: 10px;
border-top: 1rpx solid #eee;
height: 1rpx solid #eee;
width: calc(100% - 20px);
}
}
}
}
.text-wrap {
white-space: pre-wrap;
}
}
</style>
</script>
<style></style>

@ -1,3 +1,21 @@
## 1.0.9172026-01-14
迭代
## 1.0.9162026-01-14
新增组件
## 1.0.9152026-01-07
迭代
## 1.0.9142026-01-07
迭代
## 1.0.9132026-01-05
迭代
## 1.0.9122025-12-29
迭代
## 1.0.9112025-12-19
优化
## 1.0.9102025-12-10
迭代
## 1.0.9092025-12-09
优化
## 1.0.9082025-12-08
迭代
## 1.0.9072025-12-08

@ -0,0 +1,262 @@
<template>
<div class="g-rh-ai-super-input g_p_10 g_position_rela">
<div class="g_bg_f g_p_10 g_radius_8">
<u-line-progress class="g_position_abso" v-if="ailoading" style="position: fixed; width: 100%; top: -2px; left: 0px; z-index: 99999" active-color="#3578f6" :percent="defaultPercent" :round="false" height="8" :show-percent="false" inactiveColor="#f5f5f5"></u-line-progress>
<gao-ChatSSEClient ref="sseTest" @onOpen="openCore" @onError="errorCore" @onMessage="messageCore" @onFinish="finishCore" />
<div class="g_pb_8" v-if="currentImg" @click="currentImg = ''">
<img :src="currentImg" class="g_w_48 g_h_48 g_radius_8" alt />
</div>
<textarea class data-type="desp" v-model="aitext" placeholder="粘贴工友信息, 用AI识别 " placeholder-style="color:#999" :maxlength="-1" :style="{ width: '100%', 'height': true ? '84px' : '84px' }"></textarea>
<div class>
<view class="g_flex_row_end flex_center">
<view class="iconfont icon-jia1 g_c_9 g_mr_8 g_fs_20 g_position_rela biggerSize" @click="chooseImgShow = true"></view>
<view class="g_mr_8 g_w_72 g_fw_600">
<rh-button primaryColor='#00b666' size="small_auto" type="default" height="24" :fontSize="12" @clickBtn="getClipboard" :btnText="(aitext ? '清空' : '粘贴') + '内容'"></rh-button>
</view>
<view class="g_w_72 g_fw_600">
<rh-button primaryColor='#00b666' size="small_auto" gradual="linear-gradient(-130deg, #5c6cf7, #9963f9)" icon="icon-aitubiao" type="gradual" height="24" :fontSize="12" btnText="AI识别" @clickBtn="getCoze"></rh-button>
</view>
</view>
</div>
</div>
<u-popup v-model="chooseImgShow" mode="bottom" z-index="999999" border-radius="12" :closeable="false" :mask-close-able="true" @close="chooseImgShow = false">
<div class="g_text_c g_bg_f_5 g_fs_17">
<div class="g_bg_f">
<div class="g_c_3">
<div class="g_p_16 g_border_e_t" @click="uploadPhoto('camera')"></div>
<div class="g_p_16 g_border_e_t" @click="uploadPhotoByChat"></div>
<div class="g_p_16 g_border_e_t" @click="uploadPhoto('album')"></div>
</div>
</div>
<div class="g_p_16 g_mt_10 g_bg_f" style="padding-bottom: calc(constant(safe-area-inset-bottom) + 16px); padding-bottom: calc(env(safe-area-inset-bottom) + 16px)" @click="chooseImgShow = false">取消</div>
</div>
</u-popup>
</div>
</template>
<script>
export default {
data() {
return {
aitext: "",
timer: null,
timer1: null,
defaultPercent: 0,
ailoading: false,
aiConfig: {
token: "",
id: "",
},
chooseImgShow: false,
currentImg: "",
};
},
created() {
this.getAiToken();
},
methods: {
openCore(respons) {
// console.log("open sse", respons);
},
errorCore(err) {
// console.log("error sse", err);
},
messageCore(msg) {
let that = this;
// console.log("message sse", msg);
if (msg.event == "Done") {
clearInterval(that.timer);
that.ailoading = false;
} else if (msg.event == "Message") {
let info = JSON.parse(msg.data);
if (info.node_type == "End") {
this.setInfo(info);
}
}
},
getAiToken() {
let that = this;
that.G.Get("/yishoudan/common/structure/getConfig", {}, (res) => {
// console.log("res", res);
that.aiConfig = {
token: res.token,
id: res.workflowId,
};
});
},
uploadPhoto($sourceType) {
let that = this;
// console.log("$sourceType", $sourceType);
uni.chooseImage({
count: 1, //9
sizeType: ["original"], //
sourceType: [$sourceType], //album camera 使
success: function (res) {
// console.log("", res);
that.uploadCozeFile(res.tempFilePaths[0]);
},
});
},
uploadCozeFile(tempFilePath) {
let that = this;
that.chooseImgShow = false;
that.currentImg = tempFilePath;
uni.uploadFile({
url: "https://api.coze.cn/v1/files/upload",
method: "POST",
filePath: tempFilePath,
name: "file",
header: {
Authorization: "Bearer " + that.aiConfig.token,
"Content-Type": "multipart/form-data",
},
formData: {},
success: function (res) {
// console.log("", res);
let data = JSON.parse(res.data);
that.appCoze(data.data.id);
},
fail: function (err) {
// console.log(err);
},
});
},
uploadPhotoByChat() {
let that = this;
uni.chooseMessageFile({
count: 1,
type: "image",
success(res) {
// console.log("resresresresresres", res);
if (res.errMsg == "chooseMessageFile:ok") {
// console.log("res", res);
that.uploadCozeFile(res.tempFiles[0].path);
}
},
});
},
getClipboard() {
let that = this;
if (this.aitext) {
this.aitext = "";
} else {
uni.getClipboardData({
success(res) {
// console.log(res);
if (res.data) {
that.aitext = res.data;
} else {
uni.showToast({
title: "请先复制内容",
icon: "none",
});
}
},
fail() {
uni.showToast({
title: "读取剪切板失败",
icon: "none",
});
},
});
}
},
setInfo(parsed) {
let that = this;
const finalData = JSON.parse(parsed.content);
if (finalData) {
// console.log(":", finalData);
let info = {
idCard: finalData.idcard,
address: finalData.address,
name: finalData.username,
nation: finalData.nation,
userName: finalData.username,
sex: finalData.sex ? (finalData.sex == "男" ? 1 : 2) : "",
age: finalData.age,
tel: finalData.tel,
};
// uni.$emit('getTownsman', { info })
that.$emit("outputInfo", info);
//
that.ailoading = false;
} else {
that.ailoading = false;
}
clearInterval(that.timer);
},
getCoze() {
let that = this;
if (!that.aitext) {
uni.showToast({
title: "请粘贴内容",
icon: "none",
});
return false;
}
this.appCoze();
},
appCoze(_id) {
let that = this;
let parameters = {};
//
that.ailoading = true;
that.defaultPercent = 3;
that.timer = setInterval(() => {
that.defaultPercent = that.defaultPercent < 15 ? (that.defaultPercent = 15) : that.defaultPercent + 3;
// // console.log('12313123123123123')
if (that.defaultPercent >= 99) {
clearInterval(that.timer);
}
}, 150);
that.timer1 = setTimeout(() => {
// console.log("5687678678678678678");
that.ailoading = false;
clearInterval(that.timer);
// setLoading()
}, 30000);
if (_id) {
parameters = {
img: {
file_id: _id,
},
};
} else {
parameters = {
txt: that.aitext,
};
}
this.$refs.sseTest.startChat({
/**
* 将它换成你的地址
* 注意
* 如果使用 sse-server.js 要在手机端使用的话请确保你的手机和电脑处在一个局域网下并且是正常的ip地址
*/
url: "https://api.coze.cn/v1/workflow/stream_run",
//
headers: {
// that.aiConfig.token
Authorization: "Bearer " + that.aiConfig.token,
"Content-Type": "application/json",
},
// post
method: "post",
body: {
parameters,
// workflow_id: that.aiConfig.id,
workflow_id: "7520814905613664310",
// workflow_id: '7492238568816656410',
},
});
},
ressetAitext() {
this.aitext = "";
},
},
};
</script>
<style></style>

@ -0,0 +1,643 @@
<template>
<view class="g-rh-apply g_w_all g_bg_f_5 g_kuaishou">
<rh-ai-super-input class="" @outputInfo="getTownsManInfo" ref="AiApplyRef" />
<view class="">
<view class="card-tip g_pt_12 g_pb_8 g_pl_20 g_c_6">工友信息</view>
<view>
<view class="g_bg_f g_pl_15 g_pr_15 g_pt_10 g_ml_10 g_mr_10 g_radius_8 g_mb_12" v-for="(item, index) in persenInfo" :key="index" style="margin-bottom: 12px">
<view class="g_pb_2 g_flex_row_between">
<view class="g_flex_1 g_flex_column_center g_mr_10">
<view class="g_flex_row_start g_fs_16 g_fw_bold">
<view> {{ item.userName ? item.userName + "/" : "姓名/" }} </view>
<view v-if="!item.sex">/</view>
<view v-if="item.sex == 1">/</view>
<view v-if="item.sex == 2">/</view>
<view> {{ item.age ? item.age + "岁/" : "年龄/" }} </view>
<view> {{ item.nation ? item.nation : "民族" }} </view>
</view>
</view>
<view class="g_flex_none g_flex_row_end">
<view class="g_flex_row_end g_pl_16 g_pr_16 g_pt_9 g_pb_9" style="background-color: #f0fff8; border-radius: 17px">
<view class="g_flex_row_end" @click="goFellow(item, index)">
<view class="g_flex_column_center">
<i class="iconfont icon-bianji g_c_3"></i>
</view>
<view class="g_fs_12 g_c_3 g_ml_8">编辑</view>
</view>
</view>
</view>
</view>
<view class="g_pb_4 g_fs_16 g_c_6">{{ item.address ? item.address : "家庭住址" }}</view>
<view class="g_flex_row_start g_pb_15">
<view class="g_flex_row_start g_mr_14">
<view class="g_flex_none g_mr_4 g_w_28 g_h_28 g_radius_50 g_flex_c">
<image :src="cdnBaseImg + 'order_idcard.svg'" class="g_w_28 g_h_28"></image>
</view>
<view class="g_flex_column_center g_c_6">{{ item.idCard ? item.idCard : "身份证号" }}</view>
</view>
<view class="g_flex_row_start">
<view class="g_flex_none g_mr_4 g_w_28 g_h_28 g_radius_50 g_flex_c">
<image :src="cdnBaseImg + 'order_tel.svg'" class="g_w_28 g_h_28"></image>
</view>
<view class="g_flex_column_center g_c_6">{{ item.tel ? item.tel : "手机号" }}</view>
</view>
</view>
<view class="g_pb_17 g_flex_row_start">
<g-panel-image :url="item.idCardImageUrl" v-if="item.idCardImageUrl" radius="4" size="112" @clickItem="handleClickIDcard" />
<view v-if="item.imgs" class="g_flex_row_start">
<view v-for="i in item.imgs" class="g_ml_10">
<g-panel-image :url="i" radius="4" size="112" @clickItem="handleClickIDcard" />
</view>
</view>
</view>
</view>
</view>
<view class="g_flex_row_center flex_center g_flex_1 g_h_48 g_bg_f g_fs_16 g_c_main g_ml_10 g_mr_10 g_radius_8" @click="goFellow('')" v-if="persenInfo.length <= 5">
<view class="g_flex_column_center">
<i class="iconfont icon-jia1 g_c_min g_mr_6" style="font-size: 18px"></i>
</view>
<view class="">添加工友</view>
</view>
<view>
<view class="card-tip g_pt_24 g_pb_8 g_pl_20 g_c_6">职位信息</view>
<view class="fs_top text-wrap">
<g-panel-form-slot :list="jobData" @clickResult="changePage" @changeTime="getInviteTime" @changeAddress="changeAddress" @chooseAddress="chooseAddress"> </g-panel-form-slot>
</view>
</view>
<view>
<view class="card-tip g_pt_24 g_pb_8 g_pl_20 g_c_6">报名备注</view>
<view class="g_flex_row_center g_p_10 g_pt_16 g_ml_10 g_mr_10 g_bg_f g_radius_8" style="width: calc(100vw- 20px)">
<textarea class="weui-input g_flex_1 g_fs_16" placeholder="请输入报名备注" v-model="updateInfo.desp" placeholder-style="color:#999" :maxlength="-1" auto-height style="min-height: 137px; width: 100%; z-index: 0"></textarea>
</view>
</view>
<view class="g_mt_12">
<view class="g_flex_row_center g_mb_12" style="color: rgba(0, 0, 0, 0.45)">
<u-checkbox-group @change="radioGroupChange" shape="circle">
<u-checkbox v-model="agreeRadio" name="agree" active-color="#00b666">
<view class="g_flex_row_center g_fs_12">
<view>我已阅读并同意</view>
<view @click.stop="goPage('/root/person/agreeUser')">用户协议</view>
<view></view>
<view @click.stop="goPage('/root/person/agreePrive')">隐私政策</view>
</view>
</u-checkbox>
</u-checkbox-group>
</view>
<view class="g_h_84"></view>
<g-panel-fixed>
<slot>
<view class="g_flex_row_between g_pl_16 g_pr_16" style="z-index: 99">
<div class="" style="width:82px">
<rh-button primaryColor="#00b666" btnText="取消" size="small_auto" type="default" @clickBtn="goReturn" />
</div>
<div class="g_flex_1 g_flex_row_end">
<rh-button primaryColor="#00b666" btnText="立即报名" type="primary" :loading="btnLoading" @clickBtn="submitForm" />
</div>
</view>
</slot>
</g-panel-fixed>
</view>
</view>
</view>
</template>
<script>
import { nationlist } from "../../libs/utils/nation.js";
import dateUtil from "../../libs/utils/dateUtil.js";
export default {
onReady() {
this.G.setNavStyle();
let that = this;
uni.$on("getTownsman", (data) => {
console.log("getTownsman", data);
//
if (data.info.idCard && (data.info.idCard.length == 15 || data.info.idCard.length == 18)) {
let infoByIDcard = this.G.getInfoByIDcard(data.info.idCard);
data.info.age = infoByIDcard.age;
}
if (that.persenInfo.length == 0) {
that.persenInfo[0] = {
...data.info,
index: that.persenInfo.length,
};
} else if (data.info.index || data.info.index === 0) {
that.persenInfo[data.info.index] = data.info;
} else {
that.persenInfo[that.persenInfo.length] = {
...data.info,
index: that.persenInfo.length,
};
}
console.log("that.persenInfo", that.persenInfo);
that.$forceUpdate();
});
uni.$on("changeJobInfo", function (data) {
that.updateInfo.jobId = data.info.leafCateId;
that.updateInfo.jobName = data.info.title;
that.currentJobInfo = data.info;
that.jobType = data.info.jobType;
console.log("data.info", data.info);
that.getJobDetail(data.info);
that.$forceUpdate();
});
uni.$on("resetTownsman", function (data) {
if (data.reset) {
that.persenInfo = [];
}
that.$forceUpdate();
});
},
onShareAppMessage() {
return this.G.shareFun();
},
props:{
dataoptions:{
default:{}
}
},
mounted() {
let that = this;
let options = this.dataoptions;
console.log("0114 options mounted", options);
let params = options.params ? JSON.parse(options.params) : {};
if (params.jobId) {
that.currentJobInfo = JSON.parse(JSON.stringify(params));
this.updateInfo.jobId = params.jobId;
this.updateInfo.jobName = params.jobName;
}
uni.setNavigationBarTitle({
title: params.title ? params.title : "报名",
});
if (params.type == 1 || params.type == 2) that.jobType = params.type;
if (params.agencyId) that.updateInfo.upAgencyId = params.agencyId;
(params.isFans === 0 || params.isFans) && (that.isFans = params.isFans);
params.agencyUserId && (that.updateInfo.agencyUserId = params.agencyUserId); // id
params.shareUserAgencyId && (that.updateInfo.agencyId = params.shareUserAgencyId); // id
this.updateInfo.interviewTimeStr = "";
setTimeout(() => {
that.IS_CREATOR = uni.getStorageSync("IS_CREATOR") == 1 ? true : false;
that.updateInfo.interviewTimeStr = "";
console.log("获取面试时间:", that.updateInfo.interviewTimeStr);
//
let hour = new Date().getHours();
if (hour < 20 && hour >= 6) {
this.updateInfo.interviewTimeStr = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " " + (hour + 1) + ":00";
} else if (hour >= 20) {
this.updateInfo.interviewTimeStr = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " 19:30";
} else if (hour < 6) {
this.updateInfo.interviewTimeStr = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " 6:00";
}
// that.updateInfo.interviewTimeStr = dateUtil.formatDateYMD(new Date().toLocaleDateString()) + " 06:00";
that.$forceUpdate();
if (that.updateInfo.jobId) {
that.setFormList();
that.getJobDetail({
leafCateId: that.updateInfo.jobId,
});
} else {
that.setFormList();
}
}, 1);
},
data() {
return {
detailRes: {},
IS_CREATOR: false,
jobType: 2,
isFans: 2,
currentJobInfo: {},
cdnBaseImg: this.G.store().cdnBaseImg,
nation: nationlist.map((item, index) => {
return item.name;
}),
nationIndex: 0,
userTel: "",
info: {
name: "",
sex: "男",
age: "",
nation: "",
idCard: "",
address: "",
},
updateInfo: {
jobId: 0,
jobName: "请选择报名职位",
desp: "",
interviewTimeStr: "",
},
persenInfo: [],
agreeRadio: ["agree"],
jobData: [],
zhengceTextList: [],
btnLoading: false,
};
},
onShow() {
let that = this;
that.pageSpeed = -1;
},
methods: {
getTownsManInfo(info) {
console.log("info", info);
uni.$emit("getTownsman", {
info,
});
},
getJobDetail($data) {
let that = this;
that.G.Get(
that.api.job_personDetail + "/" + $data.leafCateId,
{
id: $data.leafCateId,
},
(res) => {
that.detailRes = res.record;
let policyStr;
if (that.isFans == 2) {
policyStr = "1. 佣金:" + (res.record.returnFeeType !== "" ? that.G.setReturnFee(res.record.returnFee, res.record.returnFeeType) : "费用待定") + " \n\n" + "2. 佣金详情:" + (res.record.returnFeeDesp || "费用待定") + " \n\n" + "3. 薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n";
} else {
policyStr = "薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n";
}
console.log("政策列表:", res);
that.setFormList(policyStr);
}
);
},
setFormList(policyStr) {
let that = this;
// console.log("that.updateInfo", that.updateInfo);
if (that.isFans == 2) {
that.jobData = [
{
icon: "",
label: "报名职位",
result: that.updateInfo.jobName,
path: "/root/other/search?from=record",
placeholder: "请选择报名职位",
fontColor: that.updateInfo.jobName == "请选择报名职位" ? "g_c_9" : "g_c_3",
tip: "applia-job",
require: true,
customRequire: true,
pColumn: 12,
},
{
icon: "",
label: "面试时间",
result: "",
path: "",
value: that.updateInfo.interviewTimeStr,
tip: "slot-time",
require: true,
customRequire: true,
type: "slot",
pColumn: 12,
from: "reservation-time",
},
that.updateInfo["interviewAddress"]
? {
icon: "",
label: "面试地址",
result: "",
value: that.updateInfo["interviewAddress"],
path: "",
addressDetail: {
latitude: that.updateInfo["interviewLat"],
longitude: that.updateInfo["interviewLng"],
},
tip: "slot-choose&input-address",
uneditable: that.currentJobInfo.agencyId == uni.getStorageSync("apply-userinfo").agencyId ? false : true,
placeholder: "请选择面试地址",
type: "slot",
fontSize: "16px",
pColumn: 5,
pRow: 12,
require: false,
suffix: "icon-dizhi1",
}
: null,
that.updateInfo.jobId
? {
icon: "",
label: "项目政策",
result: "",
path: "",
value: policyStr || "-",
tip: "slot-caiwu",
require: false,
customRequire: false,
type: "slot",
pColumn: 12,
from: "slot-caiwu",
}
: null,
];
} else {
that.jobData = [
{
icon: "",
label: "报名职位",
result: that.updateInfo.jobName,
path: "",
placeholder: "请选择报名职位",
fontColor: that.updateInfo.jobName == "请选择报名职位" ? "g_c_9" : "g_c_3",
tip: "applia-job",
require: true,
customRequire: true,
pColumn: 12,
},
{
icon: "",
label: "面试时间",
result: "",
path: "",
value: that.updateInfo.interviewTimeStr,
tip: "slot-time",
require: true,
customRequire: true,
type: "slot",
pColumn: 12,
from: "reservation-time",
},
that.updateInfo.jobId
? {
icon: "",
label: "项目政策",
result: "",
path: "",
value: policyStr || "-",
tip: "slot-caiwu",
require: false,
customRequire: false,
type: "slot",
pColumn: 12,
from: "slot-caiwu",
}
: null,
];
}
that.$forceUpdate();
},
handleClickIDcard(e) {
this.info.idCard = e;
},
clickDesp(e) {
this.updateInfo.desp = e.value;
},
changePage(e) {
uni.navigateTo({
url: e.path,
});
},
getInviteTime(e) {
console.log("获取预约面试时间:", e);
this.updateInfo.interviewTimeStr = e;
},
updateDom() {},
chooseAddress(e) {
let that = this;
console.log(e);
this.updateInfo.interviewLat = e.lat;
this.updateInfo.interviewLng = e.lng;
this.updateInfo.interviewAddress = e.address;
this.jobData[1].value = this.updateInfo.interviewAddress;
// billForm.value.storeAddr = e.address;
console.log("this.updateInfo", this.updateInfo);
console.log("e", e);
this.$forceUpdate();
},
changeAddress(e) {
this.updateInfo.interviewAddress = e;
console.log("this.updateInfo", this.updateInfo);
console.log("e", e);
// this.info.address = e;
this.$forceUpdate();
},
radioGroupChange(e) {},
goReturn() {
uni.navigateBack();
},
goPage($path) {
uni.navigateTo({
url: $path,
});
},
goFellow($item, $index) {
let that = this,
params = {},
info = null;
// ,
// if (!that.persenInfo[0].userName && $item === "") {
// uni.showToast({
// title: "",
// icon: "none",
// });
// return;
// }
if ($item) {
info = $item;
params = {
name: info.userName || "",
sex: info.sex,
age: info.age || "",
nation: info.nation || "",
tel: info.tel ? info.tel : "" || "",
idCard: info.idCard ? info.idCard : "" || "",
idCardImageUrl: info.idCardImageUrl ? info.idCardImageUrl : "",
address: info.address ? info.address : "",
imgs: info.imgs || "",
userName: info.userName || "",
index: $index,
};
}
console.log("params", params);
if (info) {
uni.navigateTo({
url: "/root/home/editTownsman?" + that.G.objToStr(params),
});
} else {
uni.navigateTo({
url: "/root/home/editTownsman",
});
}
},
handleClickMobile() {},
submitForm() {
let that = this;
if (!that.agreeRadio) {
uni.showToast({
icon: "none",
title: "请阅读协议",
});
return false;
}
if (!that.updateInfo.jobId) {
uni.showToast({
icon: "none",
title: "请选择职位",
});
return false;
}
if (that.persenInfo.length == 0) {
uni.showToast({
icon: "none",
title: "请输入工友信息",
});
return false;
}
if (that.btnLoading) {
return false;
}
that.btnLoading = true;
let submitInfo = {
...that.updateInfo,
};
submitInfo.applyUserJson = JSON.stringify(
that.persenInfo.map((item) => {
return {
// interviewTime: dayjs(item.interviewTime).format("YYYY-MM-DD HH:mm"),
// receptionTime: item.receptionTime ? dayjs(item.receptionTime).format("YYYY-MM-DD HH:mm") : dayjs(item.interviewTime).format("YYYY-MM-DD HH:mm"),
idCard: item.idCard,
idCardImageUrl: item.idCardImageUrl,
userName: item.userName,
sex: item.sex,
age: item.age,
nation: item.nation,
tel: item.tel,
address: item.address,
userApplyOrderFiles:
item.imgs && item.imgs.length > 0
? item.imgs
.map((itm) => {
return itm;
})
.join(",")
: "",
// desp: item.desp,
// policyIdx: item.policyIdx,
// pickerStr: item.pickerStr,
};
})
);
// let _upAgencyName = '';
// if (that.detailRes.status == 0) {
// _upAgencyName = that.detailRes.fullName;
// } else if (that.detailRes.status == 1) {
// if (that.detailRes.providerNameAll) {
// _upAgencyName = `${that.detailRes.providerName}${that.detailRes.providerNameAll}`;
// } else {
// _upAgencyName = that.detailRes.providerName;
// }
// } else {
// _upAgencyName = that.detailRes.userName;
// }
// submitInfo.upAgencyName = _upAgencyName ? _upAgencyName : '';
console.log("submitInfo", submitInfo);
that.G.Post("/yishoudan/common/order/addBatch", submitInfo, (res) => {
// uni.hideLoading();
uni.showToast({
icon: "success",
title: "报名成功",
duration: 2000,
});
// that.persenInfo = [];
that.btnLoading = false;
that.$refs.AiApplyRef.ressetAitext();
// that.$forceUpdate();
setTimeout(() => {
uni.navigateTo({
url: "/root/home/applicationSuccess?jobId=" + that.updateInfo.jobId,
});
}, 1500);
});
},
submitFormSub($item) {
let that = this;
// uni.navigateTo({
// url: "/root/home/applicationSuccess",
// });
// return;
let submitInfo = {
...that.updateInfo,
...$item,
};
if (!submitInfo.userName) {
uni.showToast({
icon: "none",
title: "请编辑用户信息",
});
return false;
}
uni.showLoading({
title: "提交中",
});
// submitInfo.sex = submitInfo.sex == "" ? 1 : 2;
if (submitInfo.imgs && submitInfo.imgs.length > 0) {
submitInfo.imgs = submitInfo.imgs.join(",");
}
that.G.Post(that.api.job_recordJob, submitInfo, (res) => {
// uni.hideLoading();
uni.showToast({
icon: "success",
title: "报名成功",
duration: 2000,
});
// that.persenInfo = [];
that.$refs.AiApplyRef.ressetAitext();
// that.$forceUpdate();
setTimeout(() => {
uni.navigateTo({
url: "/root/home/applicationSuccess",
});
}, 1500);
});
// setTimeout(() => {
// uni.navigateTo({
// url: "/root/home/applicationSuccess",
// });
// }, 500);
},
},
};
</script>
<style lang="scss">
.g-rh-apply {
min-height: 100%;
.fs_top {
.m-set {
}
}
.fs_bottom {
.m-set {
border-top-left-radius: 0;
border-top-right-radius: 0;
.item {
position: relative;
&::before {
content: "";
position: absolute;
top: 0;
left: 10px;
border-top: 1rpx solid #eee;
height: 1rpx solid #eee;
width: calc(100% - 20px);
}
}
}
}
.text-wrap {
white-space: pre-wrap;
}
}
</style>

@ -1,6 +1,6 @@
<template>
<view class="g-rh-button g-components-button">
<button class="bocai-btn" :class="['bocai_btn_size_' + size, 'bocai_btn_mode_' + mode, 'bocai_btn_type_' + type, 'g_w_' + width, 'g_h_' + height, customBgColor ? 'customBgColor' : '']" :style="buttonStyle" :hover-stop-propagation="true" hover-class="thover" @click="handleClick" :form-type="formType" :open-type="openType" @getphonenumber="getphonenumber">
<button class="bocai-btn" :class="['bocai_btn_size_' + size, 'bocai_btn_mode_' + mode, 'bocai_btn_type_' + type, 'g_w_' + width, 'g_h_' + height, customBgColor ? 'customBgColor' : '']" :style="{ ...buttonStyle, lineHeight: customLH }" :hover-stop-propagation="true" hover-class="thover" @click="handleClick" :form-type="formType" :open-type="openType" @getphonenumber="getphonenumber">
<view class="g_flex_row_center">
<view class="g_flex_column_center g_mr_4" v-if="loading">
<u-loading mode="flower"></u-loading>
@ -128,10 +128,34 @@ export default {
},
},
},
data() {
return {
customLH: "40px",
};
},
mounted() {
const query = uni.createSelectorQuery().in(this);
query
.select(".bocai-btn")
.fields(
{
computedStyle: ["height", "border"],
},
(res) => {
console.log("resresresresres", res);
if (res.border && res.border.indexOf("1px") > -1) {
this.customLH = `calc(${res.height} - 2px)`;
} else {
this.customLH = res.height;
}
}
)
.exec();
},
computed: {
buttonStyle() {
const baseStyle = {
lineHeight: this.height - 2 + "px",
// lineHeight: this.height - 2 + "px",
padding: 0,
color: this.color || "",
};
@ -190,13 +214,11 @@ export default {
&_medium {
height: 56px;
font-size: 18px;
line-height: 56px;
}
&_default {
width: 250px !important;
height: 42px;
font-size: 18px;
line-height: 42px;
.icon {
font-size: 27px;
}
@ -204,14 +226,12 @@ export default {
width: 100%;
height: 42px;
font-size: 18px;
line-height: 42px;
}
}
&_small {
width: 120px !important;
height: 40px;
font-size: 16px;
line-height: 40px;
.icon {
font-size: 27px;
}
@ -219,14 +239,12 @@ export default {
width: 100%;
height: 40px;
font-size: 16px;
line-height: 40px;
}
}
&_160 {
width: 160px !important;
height: 40px;
font-size: 16px;
line-height: 40px;
.icon {
font-size: 27px;
}
@ -234,14 +252,12 @@ export default {
width: 100%;
height: 40px;
font-size: 16px;
line-height: 40px;
}
}
&_mini {
height: 28px !important;
padding: 0 12px !important;
font-size: 14px !important;
line-height: 28px !important;
.icon {
font-size: 12px;
}
@ -249,7 +265,6 @@ export default {
&_height {
height: 40px;
font-size: 16px;
line-height: 40px;
.icon {
font-size: 27px;
}
@ -257,7 +272,6 @@ export default {
width: 100%;
height: 40px;
font-size: 16px;
line-height: 40px;
}
}
}
@ -335,7 +349,6 @@ export default {
&_gradual {
background: linear-gradient(-130deg, #5c6cf7, #9963f9);
color: #fff;
line-height: 24px !important;
opacity: 1;
&.thover {
opacity: 0.8;
@ -351,7 +364,6 @@ export default {
}
.g_h_48 {
height: 48px !important;
line-height: 48px !important;
}
}
</style>

@ -4,39 +4,39 @@
<rh-empty :text="emptyText" :image='image' />
<div style="margin-top: 32px;"></div>
<div class="g_flex_row_center" style="width: 100vw;">
<rh-button primaryColor='#00b666' :btnText="btnText" type="primary" :size="size" class="g_mt_32" @clickBtn="goLogin" />
<rh-button :btnText="btnText" type="primary" :size="size" height="40" class="g_mt_32" @clickBtn="goLogin" />
</div>
</div>
</template>
<script>
export default{
props:{
image:{
default:()=>{
export default {
props: {
image: {
default: () => {
return 'https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/noData.svg'
}
},
emptyText:{
default:()=>{
emptyText: {
default: () => {
return '您还有没有登录,请登录后查看'
}
},
btnText:{
default:()=>{
btnText: {
default: () => {
return '去登录'
}
},
size:{
default:()=>{
size: {
default: () => {
return 'small'
}
}
},
methods:{
goLogin(){
methods: {
goLogin() {
uni.navigateTo({
url:'/root/person/loginIndex'
url: '/root/person/loginIndex'
})
}
}

@ -1,6 +1,6 @@
<template>
<div class="g-rh-rh-quickconfirm">
<div class="choice_more c6" bindtap="showDropdown">
<div class="choice_more c6">
<slot name="title"></slot>
<div class="dropdown_box" @touchmove="modalMove" v-if="dropdownShow">
<div class="dropdown_mask" @click="hideDropdown"></div>
@ -27,9 +27,7 @@ export default {
},
methods: {
hideDropdown() {
console.log(123123);
console.log("this.$emit", this.$emit);
this.$emit("dropdownShow", false);
this.$emit("hideDropdown", false);
},
modalMove() {
return false;

@ -220,6 +220,7 @@ export default {
},
setToken($data) {
let that = this;
uni.setStorageSync("apply-token", $data.token);
that.$emit('exportSetToken',$data)
},
getCode(callback = () => {}) {

@ -7,9 +7,8 @@
<view class="g_fs_13 g_c_9 g_mb_32 g_text_c g_ml_20 g_mr_20"> {{ !isLogin ? "相关功能仅对注册用户开放,请注册登录后查看。" : "平台仅面向企业用户开放,您需完成企业认证后使用。" }} </view>
</view>
<view class="" style="margin-bottom: 80px">
<rh-button primaryColor='#00b666' :btnText="!isLogin ? '登录查看' : '马上认证'" type="primary" @clickBtn="goPage('/root/other/tobeAgencyChoose')" />
<rh-button :btnText="!isLogin ? '登录查看' : '马上认证'" type="primary" @clickBtn="goPage('/root/other/tobeAgencyChoose')" />
<view class="g_c_sub g_flex_row_center flex_center g_fs_14 g_mt_32" @click="serverPopShow = true"> <i class="iconfont icon-kefu"> </i>联系客服 </view>
<!-- <view class="g_c_sub g_flex_row_center flex_center g_fs_14 g_mt_32" @click="kefu"> <i class="iconfont icon-kefu"> </i>联系客服 </view> -->
</view>
</view>
<rh-serverpopup

@ -0,0 +1,986 @@
const formatTime = (date) => {
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
return [year, month, day].map(formatNumber).join("/") + " " + [hour, minute, second].map(formatNumber).join(":");
};
//开始年份
const yearStart = 1978;
//结束年份
const yearEnd = 2100;
const formatNumber = (n) => {
n = n.toString();
return n[1] ? n : "0" + n;
};
function withData(param) {
return param < 10 ? "0" + param : "" + param;
}
function getLoopArray(start, end) {
var start = start || 0;
var end = end || 1;
var array = [];
for (var i = start; i <= end; i++) {
array.push(withData(i));
}
return array;
}
function getMonthDay(year, month) {
var flag = year % 400 == 0 || (year % 4 == 0 && year % 100 != 0),
array = null;
switch (month) {
case "01":
case "03":
case "05":
case "07":
case "08":
case "10":
case "12":
case "1":
case "3":
case "5":
case "7":
case "8":
array = getLoopArray(1, 31);
break;
case "4":
case "6":
case "9":
case "04":
case "06":
case "09":
case "11":
array = getLoopArray(1, 30);
break;
case "02":
case "2":
array = flag ? getLoopArray(1, 29) : getLoopArray(1, 28);
break;
default:
//array = '月份格式不正确,请重新输入!'
array = getLoopArray(1, 30);
}
return array;
}
function getNewDateArry() {
// 当前时间的处理
var newDate = new Date();
var year = withData(newDate.getFullYear()),
mont = withData(newDate.getMonth() + 1),
date = withData(newDate.getDate()),
hour = withData(newDate.getHours()),
minu = withData(newDate.getMinutes()),
seco = withData(newDate.getSeconds());
return [year, mont, date, hour, minu, seco];
}
/**
* 返回传入时间对应的值
* 对应的值显示年月日时分秒时分秒不为00:00:00
*/
function dateTimePickerNowDate(date, startYear, endYear) {
// 返回默认显示的数组和联动数组的声明
var dateTime = [],
dateTimeArray = [[], [], [], [], [], []];
var start = startYear || yearStart;
var end = endYear || yearEnd;
// 默认开始显示数据
// var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
var defaultDate;
if (date != null && date != "") {
// if (date.indexOf('T')) {
// date = date.replace('T', ' ');//原来L端可能返回的时间格式有带T的格式处理一下
// }
date = formatDateYMDHMS(date); //先格式化一下时间
defaultDate = [...date.split(" ")[0].split("-"), ...date.split(" ")[1].split(":")];
} else {
defaultDate = getNewDateArry();
}
// 处理联动列表数据
/*年月日 时分秒*/
dateTimeArray[0] = getLoopArray(start, end);
dateTimeArray[1] = getLoopArray(1, 12);
dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
dateTimeArray[3] = getLoopArray(0, 23);
dateTimeArray[4] = getLoopArray(0, 59);
dateTimeArray[5] = getLoopArray(0, 59);
dateTimeArray.forEach((current, index) => {
dateTime.push(current.indexOf(defaultDate[index]));
});
return {
dateTimeArray: dateTimeArray,
dateTime: dateTime,
};
}
/**
* 返回传入时间对应的值 分钟只显示 00和30
* 对应的值显示年月日时分秒时分秒不为00:00:00
*/
function dateTimePickerNowDate2(date, startYear, endYear) {
// 返回默认显示的数组和联动数组的声明
var dateTime = [],
dateTimeArray = [[], [], [], [], [], []];
var start = startYear || yearStart;
var end = endYear || yearEnd;
// 默认开始显示数据
// var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
var defaultDate;
if (date != null && date != "") {
// if (date.indexOf('T')) {
// date = date.replace('T', ' ');//原来L端可能返回的时间格式有带T的格式处理一下
// }
date = formatDateYMDHMS(date); //先格式化一下时间
defaultDate = [...date.split(" ")[0].split("-"), ...date.split(" ")[1].split(":")];
} else {
defaultDate = getNewDateArry();
}
// 处理联动列表数据
/*年月日 时分秒*/
dateTimeArray[0] = getLoopArray(start, end);
dateTimeArray[1] = getLoopArray(1, 12);
dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
dateTimeArray[3] = getLoopArray(0, 23);
dateTimeArray[4] = ["00", "30"];
dateTimeArray[5] = getLoopArray(0, 59);
dateTimeArray.forEach((current, index) => {
dateTime.push(current.indexOf(defaultDate[index]));
});
return {
dateTimeArray: dateTimeArray,
dateTime: dateTime,
};
}
/**
* 返回传入时间对应的值
* 对应的值显示年月日时分秒时分秒为00:00:00
*/
function dateTimePicker(date, startYear, endYear) {
// 返回默认显示的数组和联动数组的声明
var dateTime = [],
dateTimeArray = [[], [], [], [], [], []];
var start = startYear || yearStart;
var end = endYear || yearEnd;
// 默认开始显示数据
// var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
var defaultDate;
if (date != null && date != "") {
// if (date.indexOf('T')) {
// date = date.replace('T', ' ');//原来L端可能返回的时间格式有带T的格式处理一下
// }
date = formatDateYMDHMS(date); //先格式化一下时间
defaultDate = [...date.split(" ")[0].split("-"), ...date.split(" ")[1].split(":")];
} else {
defaultDate = getNewDateArry();
}
defaultDate[3] = "00";
defaultDate[4] = "00";
defaultDate[5] = "00";
// 处理联动列表数据
/*年月日 时分秒*/
dateTimeArray[0] = getLoopArray(start, end);
dateTimeArray[1] = getLoopArray(1, 12);
dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
dateTimeArray[3] = getLoopArray(0, 23);
dateTimeArray[4] = getLoopArray(0, 59);
dateTimeArray[5] = getLoopArray(0, 59);
dateTimeArray.forEach((current, index) => {
dateTime.push(current.indexOf(defaultDate[index]));
});
return {
dateTimeArray: dateTimeArray,
dateTime: dateTime,
};
}
function dateTimePicker2(date, startYear, endYear) {
// 返回默认显示的数组和联动数组的声明
var dateTime = [],
dateTimeArray = [[], [], [], [], [], []];
var start = startYear || yearStart;
var end = endYear || yearEnd;
// 默认开始显示数据
// var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
var defaultDate;
// debugger;
if (date != null && date != "") {
// if (date.indexOf('T')) {
// date = date.replace('T', ' ');//原来L端可能返回的时间格式有带T的格式处理一下
// }
date = formatDateYMDHMS(date); //先格式化一下时间
defaultDate = [...date.split(" ")[0].split("-"), ...date.split(" ")[1].split(":")];
} else {
defaultDate = getNewDateArry();
}
// defaultDate[3] = '00';
// defaultDate[4] = '00';
// defaultDate[5] = '00';
// 处理联动列表数据
/*年月日 时分秒*/
dateTimeArray[0] = getLoopArray(start, end);
dateTimeArray[1] = getLoopArray(1, 12);
dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
dateTimeArray[3] = getLoopArray(0, 23);
//dateTimeArray[4] = ['00'];
dateTimeArray[4] = getLoopArray(0, 59);
dateTimeArray[5] = getLoopArray(0, 59);
dateTimeArray.forEach((current, index) => {
dateTime.push(current.indexOf(defaultDate[index]));
});
return {
dateTimeArray: dateTimeArray,
dateTime: dateTime,
};
}
function dateTimePickerYMDHM(date, startYear, endYear) {
// 返回默认显示的数组和联动数组的声明
var dateTime = [],
dateTimeArray = [[], [], [], [], []];
var start = startYear || yearStart;
var end = endYear || yearEnd;
// 默认开始显示数据
var defaultDate;
if (date != null && date != "") {
// if (date.indexOf('T')) {
// date = date.replace('T', ' ');//原来L端可能返回的时间格式有带T的格式处理一下
// }
date = formatDateYMDHMS(date); //先格式化一下时间
defaultDate = [...date.split(" ")[0].split("-"), ...date.split(" ")[1].split(":")];
} else {
defaultDate = getNewDateArry();
}
defaultDate[3] = "00";
defaultDate[4] = "00";
defaultDate[5] = "00";
// var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
// 处理联动列表数据
/*年月日 时分秒*/
dateTimeArray[0] = getLoopArray(start, end);
dateTimeArray[1] = getLoopArray(1, 12);
dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
dateTimeArray[3] = getLoopArray(0, 23);
dateTimeArray[4] = getLoopArray(0, 59);
// dateTimeArray[5] = getLoopArray(0, 59);
dateTimeArray.forEach((current, index) => {
dateTime.push(current.indexOf(defaultDate[index]));
});
return {
dateTimeArray: dateTimeArray,
dateTime: dateTime,
};
}
function dateTimePickerYMDHM2(date, startYear, endYear) {
//分钟为00和30
// 返回默认显示的数组和联动数组的声明
var dateTime = [],
dateTimeArray = [[], [], [], [], []];
var start = startYear || yearStart;
var end = endYear || yearEnd;
// 默认开始显示数据
var defaultDate;
if (date != null && date != "") {
// if (date.indexOf('T')) {
// date = date.replace('T', ' ');//原来L端可能返回的时间格式有带T的格式处理一下
// }
date = formatDateYMDHMS(date); //先格式化一下时间
defaultDate = [...date.split(" ")[0].split("-"), ...date.split(" ")[1].split(":")];
} else {
defaultDate = getNewDateArry();
}
defaultDate[3] = "00";
defaultDate[4] = "00";
defaultDate[5] = "00";
// var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
// 处理联动列表数据
/*年月日 时分秒*/
dateTimeArray[0] = getLoopArray(start, end);
dateTimeArray[1] = getLoopArray(1, 12);
dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
dateTimeArray[3] = getLoopArray(0, 23);
dateTimeArray[4] = ["00", "30"];
// dateTimeArray[5] = getLoopArray(0, 59);
dateTimeArray.forEach((current, index) => {
dateTime.push(current.indexOf(defaultDate[index]));
});
return {
dateTimeArray: dateTimeArray,
dateTime: dateTime,
};
}
function dateTimePickerYMD(date, startYear, endYear) {
// 返回默认显示的数组和联动数组的声明
var dateTime = [],
dateTimeArray = [[], [], [], [], []];
var start = startYear || yearStart;
var end = endYear || yearEnd;
// 默认开始显示数据
var defaultDate;
if (date != null && date != "") {
// if (date.indexOf('T')) {
// date = date.replace('T', ' ');//原来L端可能返回的时间格式有带T的格式处理一下
// }
date = formatDateYMDHMS(date); //先格式化一下时间
defaultDate = [...date.split(" ")[0].split("-"), ...date.split(" ")[1].split(":")];
} else {
defaultDate = getNewDateArry();
}
// var defaultDate = date ? [...date.split(' ')[0].split('-'), ...date.split(' ')[1].split(':')] : getNewDateArry();
// 处理联动列表数据
/*年月日 时分秒*/
dateTimeArray[0] = getLoopArray(start, end);
dateTimeArray[1] = getLoopArray(1, 12);
dateTimeArray[2] = getMonthDay(defaultDate[0], defaultDate[1]);
// dateTimeArray[3] = getLoopArray(0, 23);
// dateTimeArray[4] = getLoopArray(0, 59);
// dateTimeArray[5] = getLoopArray(0, 59);
dateTimeArray.forEach((current, index) => {
dateTime.push(current.indexOf(defaultDate[index]));
});
return {
dateTimeArray: dateTimeArray,
dateTime: dateTime,
};
}
/**
* 时间格式化 2017-01-01 01:01:01
* @param val
* @returns {string}
*/
function formatDateYMDHMS(val) {
// model -> view在更新 `<input>` 元素之前格式化值
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 HH:mm:ss";
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;
}
/**
* 时间格式化 2017-01-01 01:01:01
* @param val
* @returns {string}
*/
function formatDateYMDHM(val) {
// model -> view在更新 `<input>` 元素之前格式化值
if (val != null && val != "") {
if (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 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 || "";
} else {
return "-";
}
}
// 年月日
function formatDateYMD(val) {
// model -> view在更新 `<input>` 元素之前格式化值
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;
}
/**
* 时间格式化 mm:ss
* @param val
* @returns {string}
*/
function formatDateMS(val) {
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);
var fmt = "HH:mm";
var o = {
"H+": value.getHours(), //小时
"m+": value.getMinutes(), //分
};
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;
}
/**
格式化为苹果手机能认的时间格式yyyy/MM/dd HH:mm:ss
*/
function formatDateYMDHMS_TO_APPLE(val) {
// model -> view在更新 `<input>` 元素之前格式化值
if (val != null || val == "") {
val = val + "";
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 HH:mm:ss";
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 getNowYear() {
return new Date().getFullYear();
}
/**
获取当前时间所在月
*/
function getNowMonth() {
return new Date().getMonth() + 1;
}
/**
获取当前时间的年月
*/
function getNowYearMonth() {
var date = new Date();
var month = date.getMonth() + 1;
if (month < 10) {
month = "0" + month;
}
return date.getFullYear() + "-" + month;
}
/**
获取当前时间的年月日
*/
function getNowYearMonthDay() {
var date = new Date();
var month = date.getMonth() + 1;
if (month < 10) {
month = "0" + month;
}
return date.getFullYear() + "-" + month + "-" + date.getDate();
}
/**
获取时间的上午下午格式
*/
function formateTimeAMPM(date) {
if (date == null || date == "") {
return "";
}
if (typeof date == "string") {
date = date.replace("-", "/").replace("-", "/");
}
var d = new Date(date);
var hour = d.getHours();
if (hour <= 12) {
return "AM " + (hour + 1) + ":" + d.getMinutes();
} else if (hour > 12) {
return "PM " + (hour + 1) + ":" + d.getMinutes();
} else {
return "";
}
}
function getTodayYYYYMMDD() {
var date = new Date();
return date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate();
}
function formateMonthDay(dateTime) {
// debugger;
var dt = dateTime.split("-");
return dt[1] * 1 + "月" + dt[2] * 1 + "日";
}
// 时间对比
function subTimes(_val1, _val2) {
var start_date = new Date(_val1.replace(/-/g, "/"));
var end_date = new Date(_val2.replace(/-/g, "/"));
var days = end_date.getTime() - start_date.getTime();
return days / (1000 * 60); //返回分钟数
}
// 时间对比
function subDays(sDate1) {
//sDate1和sDate2是2017-9-25格式
sDate1 = formatDateYMD(sDate1);
var sDate2 = getTodayYYYYMMDD();
var aDate, oDate1, oDate2, iDays;
aDate = sDate1.split("-");
oDate1 = new Date(aDate[1] + "/" + aDate[2] + "/" + aDate[0]); //转换为9-25-2017格式
aDate = sDate2.split("-");
oDate2 = new Date(aDate[1] + "/" + aDate[2] + "/" + aDate[0]);
iDays = parseInt((oDate2 - oDate1) / 1000 / 60 / 60 / 24); //把相差的毫秒数转换为天数
return iDays;
}
function subDays1(_val1) {
var start_date = new Date(_val1.replace(/-/g, "/"));
// console.log(start_date.toLocaleDateString()+"pppp");
var end_date = new Date();
// var days = end_date - start_date;
var days = parseInt((end_date.getTime() - start_date.getTime()) / 1000 / 3600 / 24);
var day = parseInt(days);
return day;
}
/**
* 获取今天明天后天
*/
function getDataName(dateTemp) {
var timeStr = "";
if (isNotEmptyCheck(dateTemp)) {
var str = formatDateYMD(dateTemp);
var date = str.split(" ")[0];
if (getFutureDateYMD(0) == date) {
timeStr = "(今天)";
} else if (getFutureDateYMD(1) == date) {
timeStr = "(明天)";
} else if (getFutureDateYMD(2) == date) {
timeStr = "(后天)";
}
}
return timeStr;
}
/**
* 如果是null '' 'null' 'undefined'
* @param item
* @returns
*/
function isEmptyCheck(value) {
if (value == null || value === "" || value == "null" || typeof value == "undefined") {
return true;
}
return false;
}
/**
* 如果不是是null '' 'null' 'undefined'
* @param item
* @returns
*/
function isNotEmptyCheck(value) {
return !isEmptyCheck(value);
}
/**
* 获取未来第几天
* 1传入正数返回未来几天
* 2传入负数返回过去几天
*/
function getFutureDateYMD(dayNum) {
// 开始时间
var date = new Date();
date.setDate(date.getDate() + dayNum);
var prevYear = date.getFullYear();
var prevMonth = date.getMonth() + 1;
var prevDay = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
return prevYear + "-" + (prevMonth >= 10 ? prevMonth : "0" + prevMonth) + "-" + prevDay;
}
function getDateYMDHM() {
// 开始时间
let date = new Date();
let prevYear = date.getFullYear();
let prevMonth = date.getMonth() + 1;
let prevDay = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
let hour = date.getHours();
let minute = date.getMinutes();
// let second = date.getSeconds();
return prevYear + "-" + (prevMonth >= 10 ? prevMonth : "0" + prevMonth) + "-" + prevDay + " " + hour + ":" + minute;
}
// function getDateYMDHM() {
// // 开始时间
// let date = new Date();
// let prevYear = date.getFullYear();
// let prevMonth = date.getMonth() + 1;
// let prevDay = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
// let hour = date.getHours();
// let minute = date.getMinutes();
// // let second = date.getSeconds();
// return prevYear + "-" + (prevMonth >= 10 ? prevMonth : ('0' + prevMonth)) + "-" + prevDay + " " + hour + ":" + minute;
// }
function getDateYMD() {
// 开始时间
let date = new Date();
let prevYear = date.getFullYear();
let prevMonth = date.getMonth() + 1;
let prevDay = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
// let second = date.getSeconds();
return prevYear + "-" + (prevMonth >= 10 ? prevMonth : "0" + prevMonth) + "-" + prevDay;
}
function getHour() {
// 开始时间
let date = new Date();
let hour = date.getHours();
// let second = date.getSeconds();
return hour;
}
function timeShow(val) {
if (isEmptyCheck(val)) {
return "";
}
if (typeof val == "string") {
val = val + "";
if (val.indexOf("T")) {
val = val.replace("T", " "); //原来L端可能返回的时间格式有带T的格式处理一下
}
val = val.replace("-", "/").replace("-", "/");
}
var date = new Date();
var value = new Date(val);
const year0 = date.getFullYear();
const month0 = date.getMonth() + 1;
const day0 = date.getDate();
const hour0 = date.getHours();
const minute0 = date.getMinutes();
// const second = date.getSeconds()
const year1 = value.getFullYear();
const month1 = value.getMonth() + 1;
const day1 = value.getDate();
const hour1 = value.getHours();
const minute1 = value.getMinutes();
// const second = value.getSeconds()
if (year0 == year1 && month0 == month1 && day0 == day1) {
return hour1 + ":" + (minute1 >= 10 ? minute1 : "0" + minute1);
}
let d = new Date(val).setHours(0, 0, 0, 0);
let today = new Date().setHours(0, 0, 0, 0);
if (d - today == -86400000) {
return "昨天";
}
if (year0 == year1) {
return month1 + "月" + day1 + "日";
}
return (year1 + "").slice(2) + "年" + month1 + "月" + day1 + "日";
return hour;
}
function timeShowXXX(val) {
if (isEmptyCheck(val)) {
return "";
}
let date = "";
let differenceTime = new Date().getTime() - new Date(val).getTime();
var D = Math.floor(differenceTime / (24 * 60 * 60 * 1000));
var level1 = differenceTime % (24 * 3600 * 1000);
var H = Math.floor(level1 / (3600 * 1000));
var level2 = level1 % (3600 * 1000);
var M = Math.floor(level2 / (60 * 1000));
var level3 = level2 % (60 * 1000);
var S = Math.floor(level3 / 1000);
date = null;
if (D > 0 && D <= 100) {
date = D + "天前";
} else if (D > 0) {
let date1 = new Date(val);
var y = date1.getFullYear();
var m = date1.getMonth() + 1;
m = m < 10 ? "0" + m : m;
var d = date1.getDate();
d = d < 10 ? "0" + d : d;
var h = date1.getHours();
h = h < 10 ? "0" + h : h;
var minute = date1.getMinutes();
minute = minute < 10 ? "0" + minute : minute;
var second = date1.getSeconds();
second = second < 10 ? "0" + second : second;
date = y + "-" + m + "-" + d + " " + h + ":" + minute;
} else if (H > 0) {
date = H + "小时前";
} else if (M > 0) {
date = M + "分钟前";
} else {
date = S + "秒前";
}
return date;
}
/**
* 处理工单状态
*/
export function userApplyOrderStatusArray() {
// let orderStatus = [
// { id: "10", name: "审核中", value: "10", text: "审核中" },
// { id: "20", name: "待面试", value: "20", text: "待面试" },
// { id: "30", name: "待入职", value: "30", text: "待入职" },
// { id: "40", name: "在职中", value: "40", text: "在职中" },
// { id: "50", name: "待离职", value: "50", text: "待离职" },
// { id: "60", name: "已完成", value: "60", text: "已完成" },
// ];
let orderStatus = [
{
id: "10",
name: "审核中",
value: "10",
text: "审核中",
num: 0,
},
{
id: "20",
name: "待接待",
value: "20",
text: "待接待",
num: 0,
},
{
id: "21",
name: "审核未通过",
value: "21",
text: "审核未通过",
num: 0,
},
{ id: "25", name: "待面试", value: "25", text: "待面试", num: 0 },
{ id: "26", name: "未接到", value: "26", text: "未接到", num: 0 },
{
id: "30",
name: "待入职",
value: "30",
text: "待入职",
num: 0,
},
{ id: "35", name: "面试未通过", value: "35", text: "面试未通过", num: 0 },
{ id: "40", name: "在职中", value: "40", text: "在职中", num: 0 },
{
id: "45",
name: "通过未入职",
value: "45",
text: "通过未入职",
num: 0,
},
{
id: "48",
name: "约离职",
value: "48",
text: "约离职",
num: 0,
},
{ id: "50", name: "已离职", value: "50", text: "已完成", num: 0 },
// { id: "60", name: "已完成", value: "60", text: "已完成", num: 0 }
];
return orderStatus;
}
/*
截取备注字段
*/
export function splitRemark(info) {
let index = info.lastIndexOf("备注");
let remark = info.substr(index + 3);
// console.log(remark);
return remark;
}
/**
* 根据工单类型获取名称
*/
export function getUserApplyOrderTypeByType(type) {
let typeStr = "";
let array = userApplyOrderStatusArray();
array.forEach((item) => {
if (item.type == type) {
typeStr = item.text;
}
});
return typeStr;
}
/**
* 根据工单状态ID获取名称
*/
export function getUserApplyOrderStatusById(id) {
let str = "";
let array = userApplyOrderStatusArray();
array.forEach((item) => {
if (item.id == id) {
str = item.name;
}
});
return str;
}
export function spliceStr (str) {
return String(str).split('_')[1]
}
export function formatDateYYYYMMDDHHMM (time) {
var date = getDate(time);
var m = date.getMonth() + 1;
if (m < 10) {
m = "0" + m;
}
var d = date.getDate();
if (d < 10) {
d = "0" + d;
}
var h = date.getHours();
if (h < 10) {
h = "0" + h;
}
var mm = date.getMinutes();
if (mm < 10) {
mm = "0" + mm;
}
return date.getFullYear() + '-' + m + '-' + d + ' ' + h + ':' + mm;
}
export default {
formatTime,
getFutureDateYMD: getFutureDateYMD,
isEmptyCheck: isEmptyCheck,
isNotEmptyCheck: isNotEmptyCheck,
dateTimePickerNowDate: dateTimePickerNowDate,
dateTimePickerNowDate2: dateTimePickerNowDate2,
dateTimePicker: dateTimePicker,
dateTimePicker2: dateTimePicker2,
dateTimePickerYMDHM: dateTimePickerYMDHM,
dateTimePickerYMDHM2: dateTimePickerYMDHM2,
dateTimePickerYMD: dateTimePickerYMD,
getMonthDay: getMonthDay,
formatDateYMDHMS: formatDateYMDHMS,
formatDateYMDHM: formatDateYMDHM,
formatDateYMD: formatDateYMD,
formatDateMS: formatDateMS,
formatDateYMDHMS_TO_APPLE: formatDateYMDHMS_TO_APPLE,
getNowYear: getNowYear,
getNowMonth: getNowMonth,
getNowYearMonth: getNowYearMonth,
getNowYearMonthDay: getNowYearMonthDay,
formateTimeAMPM: formateTimeAMPM,
getTodayYYYYMMDD: getTodayYYYYMMDD,
formateMonthDay: formateMonthDay,
subTimes: subTimes,
subDays: subDays,
getDataName: getDataName,
getDateYMDHM: getDateYMDHM,
getDateYMD: getDateYMD,
getHour: getHour,
timeShowXXX: timeShowXXX,
getUserApplyOrderStatusById,
getUserApplyOrderTypeByType,
splitRemark,
timeShow,
spliceStr,
formatDateYYYYMMDDHHMM
};

@ -0,0 +1,234 @@
export let nationlist = [
{
id: "01",
name: "汉族",
},
{
id: "02",
name: "蒙古族",
},
{
id: "03",
name: "回族",
},
{
id: "04",
name: "藏族",
},
{
id: "05",
name: "维吾尔族",
},
{
id: "06",
name: "苗族",
},
{
id: "07",
name: "彝族",
},
{
id: "08",
name: "壮族",
},
{
id: "09",
name: "布依族",
},
{
id: "10",
name: "朝鲜族",
},
{
id: "11",
name: "满族",
},
{
id: "12",
name: "侗族",
},
{
id: "13",
name: "瑶族",
},
{
id: "14",
name: "白族",
},
{
id: "15",
name: "土家族",
},
{
id: "16",
name: "哈尼族",
},
{
id: "17",
name: "哈萨克族",
},
{
id: "18",
name: "傣族",
},
{
id: "19",
name: "黎族",
},
{
id: "20",
name: "傈僳族",
},
{
id: "21",
name: "佤族",
},
{
id: "22",
name: "畲族",
},
{
id: "23",
name: "高山族",
},
{
id: "24",
name: "拉祜族",
},
{
id: "25",
name: "水族",
},
{
id: "26",
name: "东乡族",
},
{
id: "27",
name: "纳西族",
},
{
id: "28",
name: "景颇族",
},
{
id: "29",
name: "柯尔克孜族",
},
{
id: "30",
name: "土族",
},
{
id: "31",
name: "达斡尔族",
},
{
id: "32",
name: "仫佬族",
},
{
id: "33",
name: "羌族",
},
{
id: "34",
name: "布朗族",
},
{
id: "35",
name: "撒拉族",
},
{
id: "36",
name: "毛难族",
},
{
id: "37",
name: "仡佬族",
},
{
id: "38",
name: "锡伯族",
},
{
id: "39",
name: "阿昌族",
},
{
id: "40",
name: "普米族",
},
{
id: "41",
name: "塔吉克族",
},
{
id: "42",
name: "怒族",
},
{
id: "43",
name: "乌孜别克族",
},
{
id: "44",
name: "俄罗斯族",
},
{
id: "45",
name: "鄂温克族",
},
{
id: "46",
name: "崩龙族",
},
{
id: "47",
name: "保安族",
},
{
id: "48",
name: "裕固族",
},
{
id: "49",
name: "京族",
},
{
id: "50",
name: "塔塔尔族",
},
{
id: "51",
name: "独龙族",
},
{
id: "52",
name: "鄂伦春族",
},
{
id: "53",
name: "赫哲族",
},
{
id: "54",
name: "门巴族",
},
{
id: "55",
name: "珞巴族",
},
{
id: "56",
name: "基诺族",
},
{
id: "57",
name: "其他",
},
{
id: "58",
name: "外国血统中国人士",
},
];

@ -1,7 +1,7 @@
{
"id": "rh-ui",
"displayName": "rh-ui",
"version": "1.0.908",
"version": "1.0.917",
"description": "公司内部UI框架",
"keywords": [
"ui框架"
@ -61,11 +61,11 @@
},
"nvue": "-",
"android": {
"extVersion": "1.0.908",
"extVersion": "1.0.917",
"minVersion": "19"
},
"ios": {
"extVersion": "1.0.908",
"extVersion": "1.0.917",
"minVersion": "12"
},
"harmony": "-"

Loading…
Cancel
Save