Browse Source

日期格式处理

zhangchong 2 years ago
parent
commit
0e879fd0ab

+ 1 - 1
src/views/business/order/accept/orderAdd.vue

@@ -286,7 +286,7 @@
 										v-model="state.ruleForm.incidentTime"
 										type="date"
 										placeholder="请选择事发时间"
-										value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+										value-format="YYYY-MM-DD[T]HH:mm:ss"
 										class="w100"
 									/>
 									<!-- value-format="YYYY-MM-DD" -->

+ 1 - 1
src/views/business/order/accept/orderEdit.vue

@@ -292,7 +292,7 @@
 										v-model="state.ruleForm.incidentTime"
 										type="date"
 										placeholder="请选择事发时间"
-										value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+										value-format="YYYY-MM-DD[T]HH:mm:ss"
 										class="w100"
 									/>
 									<!-- value-format="YYYY-MM-DD" -->

+ 2 - 2
src/views/business/order/components/ExpandForm.vue

@@ -343,7 +343,7 @@
 								placeholder="请选择争议发生时间"
 								class="w100"
 								clearable
-								value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+								value-format="YYYY-MM-DD[T]HH:mm:ss"
 							/>
 							<!-- value-format="YYYY-MM-DD HH:mm:ss" -->
 						</el-form-item>
@@ -534,7 +534,7 @@
 								type="date"
 								placeholder="请选择产品有效期"
 								class="w100"
-								value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+								value-format="YYYY-MM-DD[T]HH:mm:ss"
 							/>
 							<!-- value-format="YYYY-MM-DD HH:mm:ss" -->
 						</el-form-item>

+ 2 - 2
src/views/business/order/index.vue

@@ -88,7 +88,7 @@
 										end-placeholder="结束日期"
 										:shortcuts="shortcuts"
 										@change="timeStartChangeCr"
-										value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+										value-format="YYYY-MM-DD[T]HH:mm:ss"
 									/>
 									<!-- value-format="YYYY-MM-DD" -->
 								</el-form-item>
@@ -121,7 +121,7 @@
 										end-placeholder="结束日期"
 										:shortcuts="shortcuts"
 										@change="timeStartChangeEx"
-										value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+										value-format="YYYY-MM-DD[T]HH:mm:ss"
 									/>
 									<!-- value-format="YYYY-MM-DD" -->
 								</el-form-item>

+ 1 - 1
src/views/knowledge/apply/index.vue

@@ -25,7 +25,7 @@
 							end-placeholder="结束日期"
 							:shortcuts="shortcuts"
 							@change="tiemChange"
-							value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+							value-format="YYYY-MM-DD[T]HH:mm:ss"
 						/>
 						<!-- value-format="YYYY-MM-DD" -->
 					</el-form-item>

+ 1 - 1
src/views/knowledge/apply/my/component/MyApplyAdd.vue

@@ -78,7 +78,7 @@
 								type="date"
 								placeholder="请选择截止日期"
 								class="w100"
-								value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+								value-format="YYYY-MM-DD[T]HH:mm:ss"
 							/>
 						</el-form-item>
 					</el-col>

+ 1 - 1
src/views/knowledge/apply/my/component/MyApplyEdit.vue

@@ -78,7 +78,7 @@
 								type="date"
 								placeholder="请选择截止日期"
 								class="w100"
-								value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+								value-format="YYYY-MM-DD[T]HH:mm:ss"
 							/>
 						</el-form-item>
 					</el-col>

+ 1 - 1
src/views/knowledge/apply/my/index.vue

@@ -29,7 +29,7 @@
 							end-placeholder="结束日期"
 							:shortcuts="shortcuts"
 							@change="tiemChange"
-							value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+							value-format="YYYY-MM-DD[T]HH:mm:ss"
 						/>
 						<!-- value-format="YYYY-MM-DD" -->
 					</el-form-item>

+ 1 - 1
src/views/knowledge/knowledge/component/UpdateKnowledge.vue

@@ -42,7 +42,7 @@
 								type="date"
 								placeholder="请选择截止日期"
 								class="w100"
-								value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+								value-format="YYYY-MM-DD[T]HH:mm:ss"
 							/>
 						</el-form-item>
 					</el-col>

+ 5 - 8
src/views/knowledge/knowledge/component/editKnowledge.vue

@@ -115,7 +115,7 @@
 								type="date"
 								placeholder="请选择失效时间"
 								class="w100"
-								value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+								value-format="YYYY-MM-DD[T]HH:mm:ss"
 							/>
 						</el-form-item>
 					</el-col>
@@ -128,7 +128,7 @@
 						<el-form-item>
 							<el-button type="primary" @click="onSubmitReview(ruleFormRef)" :loading="state.loading">提交审核</el-button>
 							<el-button class="default-button" @click="onPreview" :loading="state.loading">预览 </el-button>
-							<el-button @click="onSaveOnly(ruleFormRef)" class="default-button" :loading="state.loading">{{ saveText }}</el-button>
+							<el-button @click="onSaveOnly(ruleFormRef)" class="default-button" :loading="state.loading">{{ state.saveText }}</el-button>
 						</el-form-item>
 					</el-col>
 				</el-row>
@@ -142,7 +142,7 @@
 </template>
 
 <script setup lang="ts" name="knowledgeEdit">
-import { reactive, ref, defineAsyncComponent, onMounted, computed } from 'vue';
+import { reactive, ref, defineAsyncComponent, onMounted } from 'vue';
 import { ElMessage } from 'element-plus';
 import type { FormInstance } from 'element-plus';
 import mittBus from '/@/utils/mitt';
@@ -174,6 +174,7 @@ const state = reactive<any>({
 	loading: false,
 	hotspotExternal: [],
 	knowledgeOptions: [], //关联知识
+	saveText: '保存到草稿箱',
 });
 const route = useRoute();
 const router = useRouter();
@@ -221,11 +222,6 @@ const getselKnowledgeList = () => {
 	state.ruleForm.parentName = currentNode[0]?.label ?? '';
 	state.ruleForm.knowledgeTypeName = currentNode[0]?.text ?? '';
 };
-// 保存
-const saveText = computed(() => {
-	if (route.params.isDraft) return '保存';
-	else return '保存到草稿箱';
-});
 // 提交审核
 const onSubmitReview = async (formEl: FormInstance | undefined) => {
 	if (!formEl) return;
@@ -313,6 +309,7 @@ onMounted(async () => {
 		let res: any;
 		if (route.params.isDraft && route.params.id) {
 			res = await draftsinfo(route.params.id); //草稿详情
+			state.saveText = '保存';
 		} else if (route.params.id) {
 			res = await KnowledgeDetail(route.params.id); //知识详情
 		}

+ 1 - 1
src/views/knowledge/knowledge/delApply/index.vue

@@ -28,7 +28,7 @@
 							end-placeholder="结束日期"
 							:shortcuts="shortcuts"
 							@change="tiemChange"
-							value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+							value-format="YYYY-MM-DD[T]HH:mm:ss"
 						/>
 						<!-- value-format="YYYY-MM-DD" -->
 					</el-form-item>

+ 1 - 1
src/views/knowledge/knowledge/draft/index.vue

@@ -31,7 +31,7 @@
 						end-placeholder="结束日期"
 						:shortcuts="shortcuts"
 						@change="tiemChange"
-						value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+						value-format="YYYY-MM-DD[T]HH:mm:ss"
 					/>
 					<!-- value-format="YYYY-MM-DD" -->
 				</el-form-item>

+ 3 - 3
src/views/knowledge/knowledge/index.vue

@@ -110,7 +110,7 @@
 										end-placeholder="结束日期"
 										:shortcuts="shortcuts"
 										@change="timeStartChangeCr"
-										value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+										value-format="YYYY-MM-DD[T]HH:mm:ss"
 									/>
 								</el-form-item>
 								<el-form-item label="上架时间" prop="sjTime">
@@ -123,7 +123,7 @@
 										end-placeholder="结束日期"
 										:shortcuts="shortcuts"
 										@change="timeStartChangeSj"
-										value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+										value-format="YYYY-MM-DD[T]HH:mm:ss"
 									/>
 								</el-form-item>
 								<el-form-item label="下架时间" prop="xjTime">
@@ -136,7 +136,7 @@
 										end-placeholder="结束日期"
 										:shortcuts="shortcuts"
 										@change="timeStartChangeXj"
-										value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+										value-format="YYYY-MM-DD[T]HH:mm:ss"
 									/>
 								</el-form-item>
 								<el-form-item>

+ 2 - 2
src/views/system/parameter/index.vue

@@ -58,7 +58,7 @@
 								<template v-else-if="item.valueType === 7">
 									<el-date-picker
 										v-model="item.settingValue"
-										value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+										value-format="YYYY-MM-DD[T]HH:mm:ss"
 										type="date"
 										:placeholder="'请选择' + item.settingName"
 										@change="changeVal($event, item.id)"
@@ -69,7 +69,7 @@
 									<div>
 										<el-date-picker
 											v-model="item.settingValue"
-											value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+											value-format="YYYY-MM-DD[T]HH:mm:ss"
 											type="daterange"
 											:placeholder="'请选择' + item.settingName"
 											@change="changeVal($event, item.id)"

+ 1 - 1
src/views/tels/blacklist/component/addBlacklist.vue

@@ -46,7 +46,7 @@
                                 range-separator="至"
                                 start-placeholder="开始时间"
                                 end-placeholder="结束时间"
-                                value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+                                value-format="YYYY-MM-DD[T]HH:mm:ss"
                             />
                         </el-form-item>
                     </el-col>

+ 1 - 1
src/views/tels/blacklist/index.vue

@@ -23,7 +23,7 @@
 						range-separator="至"
 						start-placeholder="开始时间"
 						end-placeholder="结束时间"
-						value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+						value-format="YYYY-MM-DD[T]HH:mm:ss"
 					/>
 				</el-form-item>
 				<el-form-item>

+ 1 - 1
src/views/tels/telsLog/index.vue

@@ -10,7 +10,7 @@
 						range-separator="至"
 						start-placeholder="开始时间"
 						end-placeholder="结束时间"
-						value-format="YYYY-MM-DD[T]HH:mm:ss.sss[Z]"
+						value-format="YYYY-MM-DD[T]HH:mm:ss"
 					/>
 				</el-form-item>
 				<el-form-item>