<template>
	<view class="g-new">
		<view class="" style="position: relative">
			<view class="g_c_3 g_flex_row_between">
				<view class="g_fw_600 g_flex_1 g_fs_17 g_flex_row_start flex_center">
					<span v-if="from == 'tob'"> {{ info.userName }}{{ info.sex == 1 ? "/男" : info.sex == 2 ? "/女" : "" }}{{ info.age ? `/${info.age}` : "" }}{{ info.nation ? `/${info.nation}` : "" }} </span>
					<span v-else>
						<view class="g_ell_1 g_flex_1">{{ ((classify == 20 || classify == 30) && item.dataType == "简历") || classify == 50 || classify == 60 ? "" : "" }}{{ info.storeJobName ? info.storeJobName : info.jobName ? info.jobName : "-" }}</view>
					</span>
					<span class="g_flex_none g_flex_column_center" style="margin: 0 0 0 4px" v-if="info.prevFollowUserId && Number(info.prevFollowUserId) > 0">
						<span class="g_w_18 g_h_18 g_flex_c" style="color: #faad14; border: 1px solid #faad14; border-radius: 4px; font-size: 12px; transform: scale(0.85)">转</span>
					</span>
					<span class="g_flex_none g_flex_column_center" style="margin: 0 0 0 4px" v-if="info.commonResourceType == 1">
						<span class="g_w_18 g_h_18 g_flex_c" style="color: #52c41a; border: 1px solid #52c41a; border-radius: 4px; font-size: 12px; transform: scale(0.85)">分</span>
					</span>
					<span class="g_flex_none g_flex_column_center" style="margin: 0 0 0 4px" v-if="info.commonResourceType == 2">
						<span class="g_w_18 g_h_18 g_flex_c" style="color: #1677ff; border: 1px solid #1677ff; border-radius: 4px; font-size: 12px; transform: scale(0.85)">领</span>
					</span>
				</view>
				<!-- 上右 -->
				<view v-if="from != 'townsman'">
					<view :style="{ color: String(item.status_notify).indexOf('-') > -1 ? '#ff4d4f' : '#999' }" v-if="classify == 20 || classify == 30" class="g_flex_none g_ml_16 g_flex_column_center g_fs_16" :class="String(info.status_notify) && String(info.status_notify).indexOf('-') > -1 ? 'g_c_f40' : 'g_c_9'">
						{{ info.status_notify }}
					</view>
					<view class="g_c_9" v-if="classify == 40 || classify == 70">
						{{ info.intervie_Time ? info.intervie_Time + " 面试" : "-" }}
					</view>
					<view class="g_c_9" v-if="classify == 80">
						{{ info.willEntry_Time ? info.willEntry_Time + " 入职" : "-" }}
					</view>
					<view class="g_c_9" v-if="classify == 90">
						{{ info.entry_Time ? info.entry_Time + " 入职" : "-" }}
					</view>
					<view class="g_c_9" v-if="classify == 50 || classify == 60">
						{{ info.update_Time ? info.update_Time : "-" }}
					</view>

					<view class="" :class="info.isMinus ? 'g_c_9' : 'g_c_9'" v-if="classify == 110">
						{{ info.statusFailOperate_Time ? info.statusFailOperate_Time : "-" }}
					</view>
				</view>
			</view>
			<!-- <view v-if="info.statusChangeFlag == 1" class="g_dot_6 g_bg_f40" style="position: absolute; right: -4px; top: -4px"> </view> -->
			<!-- {{ classify }} -->
			<view class="g_c_6 g_fs_14 g_mt_8 g_flex_row_between">
				<!-- 旧样式 -->
				<span v-if="from == 'toc'"> {{ info.userName }}{{ info.sex == 1 ? "/男" : info.sex == 2 ? "/女" : "" }}{{ info.age ? `/${info.age}` : "" }}{{ info.nation ? `/${info.nation}` : "" }} </span>
				<view class="g_ell_1 g_flex_1" v-else>{{ ((classify == 20 || classify == 30) && item.dataType == "简历") || classify == 50 || classify == 60 ? "" : "" }}{{ info.storeJobName ? info.storeJobName : info.jobName ? info.jobName : "-" }}{{ info.clueType == 9 ? "@" + info.address : "" }}</view>
				<!-- 下右 -->
				<view v-if="from != 'townsman'">
					<view class="g_flex_none g_ml_16 g_c_9 g_fs_14 f" v-if="classify == 20 || classify == 30 || classify == 40 || classify == 50 || classify == 60 || classify == 70">
						<span class=" " v-if="info.status == 0">新简历</span>
						<span class=" " v-if="info.status == 1">推工作</span>
						<span class=" " v-if="info.status == 2">已放弃</span>
						<span class=" " v-if="info.status == 10">待审核</span>
						<span class=" " v-if="info.status == 20">待接待</span>
						<span class=" " v-if="info.status == 25">待面试</span>
						<span class=" " v-if="info.status == 30">待入职</span>
						<span class=" " v-if="info.status == 40">在职中</span>
						<span class=" " v-if="info.status == 21">审核失败</span>
						<span class=" " v-if="info.status == 26">未接到</span>
						<span class=" " v-if="info.status == 35">面试未通过</span>
						<span class=" " v-if="info.status == 45">未入职</span>
						<span class=" " v-if="info.status == 50">已离职</span>
					</view>
					<span class="g_fs_14 g_c_9 a" v-if="classify == 80">
						{{ info.status_after || '' }}
					</span>
					<span class="g_fs_14 g_c_9 b" v-if="classify == 90">
						{{ info.status_text || '' }}
					</span>
					<span class="g_fs_14 g_c_9 c" v-if="classify == 110">
						<span v-if="info.status == 21 && info.reCreated == 1">审核失败</span>
						<span v-else-if="info.status == 26 && info.reCreated == 1">未接到</span>
						<span v-else-if="info.status == 35 && info.reCreated == 1">面试未通过</span>
						<span v-else-if="info.status == 45 && info.reCreated == 1">未入职</span>
						<span v-else-if="info.status == 50 && info.reCreated == 1">已离职</span>
						<span v-else-if="info.status == 21 || info.status == 26 || info.status == 35">跟面试放弃</span>
						<span v-else-if="info.status == 45">跟入职放弃</span>
						<span v-else-if="info.status == 50">已离职放弃</span>
						<span v-else-if="info.telMark == 1">空号放弃</span>
						<span v-else-if="info.telMark == 2">停机放弃</span>
						<span v-else-if="info.weChatMark == 1">无法添加放弃</span>
						<span v-else-if="info.telMark == 0 && info.weChatMark == 0">新简历放弃</span>
						<span v-else>推工作放弃</span>
					</span>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
/* 职位列表 - 上方面板
 * @params item 对象
 */
export default {
	data() {
		return {
			localBaseImg: this.G.store().localBaseImg,
			info: {
				userName: "",
				sex: "",
				age: "",
				nation: "",
				status_notify: "",
			},
			corpUserFlag: false,
		};
	},
	props: {
		item: {
			type: Object,
			dafault: () => {
				return {};
			},
		},
		isSelf: {
			type: Boolean,
			default: () => {
				return false;
			},
		},
		classify: {
			type: Number,
			default: () => {
				return 0;
			},
		},
		from: {
			type: String,
			default: () => {
				return "default";
			},
		},
		recordStatus: {
			default: () => {
				return 1;
			},
		},
	},
	watch: {
		item(val) {
			this.info = val;
			console.log("this.infothis.infothis.infothis.info", this.info);
			this.$forceUpdate();
		},
	},
	mounted() {
		this.info = this.item;
		this.corpUserFlag = uni.getStorageSync("apply-userinfo").corpUserFlag;
		// console.log(uni.getStorageSync("apply-userinfo").corpUserFlag);
	},
};
</script>

<style lang="scss">
.g-new {
	.new-obj {
		top: -16px; /* 调整位置 */
		left: -16px; /* 调整位置 */
		border-top: 16px solid #ff4d4f;
		border-bottom: 16px solid transparent;
		border-left: 16px solid #ff4d4f;
		border-right: 16px solid transparent;
		border-top-left-radius: 8px;
		.wors {
			position: absolute;
			left: -12px;
			top: -13px;
		}
	}
}
</style>
