瀏覽代碼

请假调整 我的日程调整

wangqiang 1 年之前
父節點
當前提交
37dc5a07a4
共有 3 個文件被更改,包括 70 次插入69 次删除
  1. 65 65
      pages/calendar/MyCalendar.vue
  2. 3 2
      pages/jy/holiday/HolidayForm.vue
  3. 2 2
      pages/workbench/task/TaskForm.vue

+ 65 - 65
pages/calendar/MyCalendar.vue

@@ -11,15 +11,15 @@
 						:class="{ 'is-selected': data.isSelected }"
 				>
 					{{ data.day.split("-").slice(1).join("-") }} <br /><br />
-<!--					<div v-for="(event, index) in calendarEvents" :key="index" style="text-align: center;margin-top: -15px; overflow: hidden; white-space: nowrap;">-->
-<!--						<el-tag-->
-<!--								style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;"-->
-<!--								@click.stop="handleEventClick(event)"-->
-<!--								v-if="data.day === event.startDate.substring(0, 10)"-->
-<!--						>-->
-<!--							{{ event.title }}-->
-<!--						</el-tag>-->
-<!--					</div>-->
+					<!--					<div v-for="(event, index) in calendarEvents" :key="index" style="text-align: center;margin-top: -15px; overflow: hidden; white-space: nowrap;">-->
+					<!--						<el-tag-->
+					<!--								style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;"-->
+					<!--								@click.stop="handleEventClick(event)"-->
+					<!--								v-if="data.day === event.startDate.substring(0, 10)"-->
+					<!--						>-->
+					<!--							{{ event.title }}-->
+					<!--						</el-tag>-->
+					<!--					</div>-->
 					<div style="text-align: center; margin-top: -15px;overflow: hidden; white-space: nowrap;">
 						<el-tag
 								v-for="(event, index) in calendarEvents"
@@ -37,67 +37,67 @@
 	</view>
 </template>
 <script>
-import myCalendarService from "@/api/calendar/myCalendarService";
-export default {
-	data() {
-		return {
-			showForm: false,
-			calendarDates: [], // 你的日期数据
-			startDate: new Date(),
-			endDate: new Date(),
-			calendarEvents: [],
-		};
-	},
-	components: {
-	},
-	activated() {
-		this.refreshList();
-	},
-	methods: {
-		// 选择月份
-		selectHandler(data) {
-			this.startDate = data.day;
-			this.endDate = data.day;
-			// 使用 $nextTick 确保组件已经准备好
-			// this.$nextTick(() => {
-			// 	this.$refs.myCalendarForm.init(
-			// 			"add",
-			// 			"",
-			// 			this.startDate,
-			// 			this.endDate
-			// 	);
-			// });
-			uni.navigateTo({
-				url: '/pages/calendar/MyCalendarForm?method=' + 'add' + '&startDate=' + this.startDate + '&endDate=' + this.endDate // DialogPage 对应的页面路径
-			});
+	import myCalendarService from "@/api/calendar/myCalendarService";
+	export default {
+		data() {
+			return {
+				showForm: false,
+				calendarDates: [], // 你的日期数据
+				startDate: new Date(),
+				endDate: new Date(),
+				calendarEvents: [],
+			};
 		},
-		handleEventClick(info) {
-			uni.navigateTo({
-				url: '/pages/calendar/MyCalendarForm?id=' + info.id + '&method=' + 'edit' // DialogPage 对应的页面路径
-			});
+		components: {
 		},
-		refreshList() {
-			myCalendarService.list().then((data) => {
-				this.calendarEvents = data;
-			});
+		activated() {
+			this.refreshList();
 		},
-		formatStartDate(date) {
-			const formattedDate = new Date(date);
-			const year = formattedDate.getFullYear();
-			const month = String(formattedDate.getMonth() + 1).padStart(2, '0');
-			const day = String(formattedDate.getDate()).padStart(2, '0');
-			const hours = String(formattedDate.getHours()).padStart(2, '0');
-			const minutes = String(formattedDate.getMinutes()).padStart(2, '0');
-			const seconds = String(formattedDate.getSeconds()).padStart(2, '0');
+		methods: {
+			// 选择月份
+			selectHandler(data) {
+				this.startDate = data.day;
+				this.endDate = data.day;
+				// 使用 $nextTick 确保组件已经准备好
+				// this.$nextTick(() => {
+				// 	this.$refs.myCalendarForm.init(
+				// 			"add",
+				// 			"",
+				// 			this.startDate,
+				// 			this.endDate
+				// 	);
+				// });
+				uni.navigateTo({
+					url: '/pages/calendar/MyCalendarForm?method=' + 'add' + '&startDate=' + this.startDate + '&endDate=' + this.endDate // DialogPage 对应的页面路径
+				});
+			},
+			handleEventClick(info) {
+				uni.navigateTo({
+					url: '/pages/calendar/MyCalendarForm?id=' + info.id + '&method=' + 'edit' // DialogPage 对应的页面路径
+				});
+			},
+			refreshList() {
+				myCalendarService.list().then((data) => {
+					this.calendarEvents = data;
+				});
+			},
+			formatStartDate(date) {
+				const formattedDate = new Date(date);
+				const year = formattedDate.getFullYear();
+				const month = String(formattedDate.getMonth() + 1).padStart(2, '0');
+				const day = String(formattedDate.getDate()).padStart(2, '0');
+				const hours = String(formattedDate.getHours()).padStart(2, '0');
+				const minutes = String(formattedDate.getMinutes()).padStart(2, '0');
+				const seconds = String(formattedDate.getSeconds()).padStart(2, '0');
 
-			return `${year}-${month}-${day}`;
-		},
+				return `${year}-${month}-${day}`;
+			},
 
-	},
-};
+		},
+	};
 </script>
 <style>
-.is-selected {
-	color: #1989fa;
-}
+	.is-selected {
+		color: #1989fa;
+	}
 </style>

+ 3 - 2
pages/jy/holiday/HolidayForm.vue

@@ -64,7 +64,7 @@
 			<u-form-item label="附件">
 				<el-upload
 						class="upload-demo"
-						:action="`http://localhost:2800/api/public-modules-server/oss/file/webUpload/upload`"
+						:action="`http://mn79i2.natappfree.cc/api/public-modules-server/oss/file/webUpload/upload`"
 						:on-remove="(file, fileList) => handleRemove(file, fileList, '','')"
 						:file-list="inputForm.files"
 						:on-success="(response, file, fileList) => handleUploadSuccess(response, file, fileList,'','')"
@@ -326,7 +326,7 @@
 					return {
 						name: fileItem.name,
 						size: fileItem.size,
-						url: '/' + fileItem.response.url,
+						url: fileItem.response ? '/' + fileItem.response.url : fileItem.url,
 						createBy: this.userInfo,
 						by: this.userInfo.id,
 						createTime: this.formatDateNew(new Date())
@@ -408,6 +408,7 @@
 						this.$refs.inputForm.validate().then(res => {
 							this.inputForm.status = '2'
 							this.inputForm.userId = this.userInfo.id
+							console.log('this.inputForm.files', this.inputForm.files)
 							holidayService.saveForm(this.inputForm).then((data) => {
 								this.inputForm.id = data.businessId
 								callback(data.businessTable, data.businessId, this.inputForm)

+ 2 - 2
pages/workbench/task/TaskForm.vue

@@ -377,10 +377,10 @@
 					title: this.title,
 					assignee: assignee,
 					days: this.days
-				  }).then((data) => {
+				  }).then( (data) => {
 					  uni.showToast({ title: "启动成功", icon: "success" });
 					  uni.navigateTo({
-						  url: '/pages/workbench/task/TodoList'
+						  url: '/pages/index/index'
 					  })
 					  this.cc(data)
 				  })