lsw 11 ay önce
ebeveyn
işleme
5dbdeb4885

+ 1 - 3
app/common/common.scss

@@ -542,8 +542,6 @@
 				float: left;
 				width: 71%;
 				font-weight: bold;
-				.icon {
-				}
 			}
 			.salary {
 				font-size: 15px;
@@ -568,7 +566,7 @@
 			overflow: hidden;
 			.tag {
 				float: left;
-				padding: 1px 8px 8px 0px;
+				padding: 1px 5px 8px 0px;
 				border-radius: 3px;
 				margin-right: 7px;
 			}

+ 13 - 1
app/common/util.js

@@ -67,6 +67,17 @@ const getDaysBetween = (dateString1, dateString2) => {
 	let days = (endDate - startDate) / (1 * 24 * 60 * 60 * 1000);
 	return days;
 }
+const days = (date1, date2) => {
+	// 将日期字符串转换为 Date 对象
+	const startDate = new Date(date1);
+	const endDate = new Date(date2);
+	// 计算两个日期之间的毫秒数差
+	const timeDifference = endDate - startDate;
+	// 将毫秒数转换为天数
+	const dayDifference = Math.ceil(timeDifference / (1000 * 60 * 60 * 24));
+	// 如果不足一天,取1天
+	return Math.max(1, dayDifference);
+}
 /**
  * 乘法函数,用来得到精确的乘法结果
  * @param {Object} arg1
@@ -247,5 +258,6 @@ module.exports = {
 	getDaysBetween: getDaysBetween,
 	getdiffdate: getdiffdate,
 	getData: getData,
-	distance: distance
+	distance: distance,
+	days: days
 }

+ 14 - 0
app/pages.json

@@ -281,6 +281,20 @@
 			{
 				"navigationBarTitleText" : "发布兼职"
 			}
+		},
+		{
+			"path" : "pages/job/position/manage/full_time",
+			"style" : 
+			{
+				"navigationBarTitleText" : "职位管理"
+			}
+		},
+		{
+			"path" : "pages/job/position/manage/full_time_push",
+			"style" : 
+			{
+				"navigationBarTitleText" : "发布职位"
+			}
 		}
 	],
 	"tabBar": {

+ 7 - 12
app/pages/job/position/manage/part_time.vue

@@ -24,9 +24,9 @@
 					</view>
 				</view>
 				<view class="desc">
-					<text class="tag">{{ item.experience }}</text>
-					<text class="tag">费用:{{ item.salary }}¥</text>
+					<text class="tag org">{{ item.salary }}¥</text>
 					<text class="tag">{{ item.regionName || '地点不限' }}</text>
+					<text class="tag">周期:{{ item.days }}天</text>
 					<text class="date">{{ item.createTime }}</text>
 				</view>
 				<view class="flex">
@@ -58,8 +58,7 @@ export default {
 			current: 0,
 			list: [],
 			param: { pageNum: 1, pageSize: 10, type: 1 },
-			loadMore: true,
-			show: false
+			loadMore: true
 		};
 	},
 	onLoad(e) {
@@ -78,21 +77,17 @@ export default {
 					this.loadMore = res.data.pages > this.param.pageNum ? true : false;
 					res.data.rows.forEach((item) => {
 						item.createTime = uni.$u.timeFrom(Date.parse(item.createTime));
+						item.days = this.util.days(item.startDate, item.endDate);
 						this.list.push(item);
 					});
 				}
 			});
 		},
-		click(e, tag) {
-			this.param[tag] = this[tag][e.index].value;
-			if (tag == 'audit') {
-				this.current = e.index;
-			}
+		click(e) {
+			this.param.audit = this.audit[e.index].value;
+			this.current = e.index;
 			this.refresh();
 		},
-		selectClick(e) {
-			uni.navigateTo({ url: '/pages/job/position/manage/push?type=' + e.value });
-		},
 		go(url) {
 			uni.navigateTo({ url: url });
 		},

+ 2 - 2
app/pages/user/index.vue

@@ -72,9 +72,9 @@
 		</view>
 		<!--企业服务-->
 		<view v-if="user.type == 1">
-			<view class="mtt">企业服务</view>
+			<view class="mtt">招聘服务</view>
 			<view class="menu">
-				<view class="cd" @click="go('/pages/job/position/manage/list')">
+				<view class="cd" @click="go('/pages/job/position/manage/full_time')">
 					<view class="out">
 						<view class="int">
 							<view class="icon" style="background-color: #ff9800">&#xe602;</view>

+ 1 - 1
ruoyi-admin/src/main/java/com/ruoyi/web/work/service/impl/PositionServiceImpl.java

@@ -159,7 +159,7 @@ public class PositionServiceImpl extends ServiceImpl<PositionMapper, Position> i
             return AjaxResult.error("职位不存在或非法操作");
         }
         if (position.getAudit() == 1) {
-            // return AjaxResult.error("该职位已审核通过不允许编辑");
+            return AjaxResult.error("该职位已审核通过不允许编辑");
         }
         BeanUtils.copyProperties(dto, position);
         Column region = columnService.selectRegion(new Column().setTitle(position.getRegionName()).setLevel(3));