Browse Source

css(work/edit): 设置主表最小高度

wangpx 1 year ago
parent
commit
a1e2c3e35e
1 changed files with 13 additions and 15 deletions
  1. 13 15
      pages/work/edit/index.vue

+ 13 - 15
pages/work/edit/index.vue

@@ -1,14 +1,15 @@
 <template>
 	<view class="process_container">
-		<view class="main_container">
-			<uni-card spacing="0">
+		<uni-card spacing="0">
+			<view class="main_container">
 				<uni-forms label-position="left" :label-width="125" :border="true">
 					<uni-forms-item v-for="(item, index) in formElements" :label="item.elementName" :key="index">
 						<uni-easyinput v-if="'多少小时' == item.elementName" :disabled="true" placeholder=""
 							v-model="diffHours"></uni-easyinput>
 						<!-- 输入框 -->
 						<uni-easyinput v-else-if="'0' == item.type" :disabled="'0' == item.canEdit"
-							:placeholder="'0' == item.canEdit ? '' : '请输入内容'" v-model="item.defaultValue"></uni-easyinput>
+							:placeholder="'0' == item.canEdit ? '' : '请输入内容'"
+							v-model="item.defaultValue"></uni-easyinput>
 						<!-- 富文本输入框 -->
 						<uni-easyinput v-else-if="'1' == item.type" :disabled="'0' == item.canEdit"
 							:placeholder="'0' == item.canEdit ? '' : '请输入内容'" v-model="item.defaultValue"
@@ -39,11 +40,10 @@
 						<uni-datetime-picker v-else-if="'3' == item.type" v-model="item.defaultValue" type="date" />
 					</uni-forms-item>
 				</uni-forms>
-			</uni-card>
-		</view>
+			</view>
+		</uni-card>
 		<view v-if="repeatingForm.elementItem.length > 0" class="repeating_table">
-			<uni-card v-for="(table, tableIndex) in repeatingForm.elements" spacing="0"
-				:key="tableIndex">
+			<uni-card v-for="(table, tableIndex) in repeatingForm.elements" spacing="0" :key="tableIndex">
 				<uni-forms label-position="left" :label-width="125" :border="true">
 					<uni-forms-item v-for="(item, itemIndex) in table"
 						:label="repeatingForm.elementItem[itemIndex].elementName.slice(3)" :key="itemIndex">
@@ -293,12 +293,6 @@ function submitProcess() { // 提交表单
 		})
 		processInfo.form.push(...newItem)
 	})
-	// console.log('submitProcessForm', processInfo.form);
-	// console.log('repeatingForm', repeatingForm.value);
-	// console.log('formElements', formElements.value);
-	// console.log('fileList', fileList.value);
-	// console.log('fileSeqs', fileSeqs.value);
-	// console.log('filePicker', filePicker.value);
 	button_state.value = true
 	// return
 	submitProcessForm(userStore.user, processInfo, fileSeqs.value).then(res => {
@@ -309,7 +303,9 @@ function submitProcess() { // 提交表单
 			$modal.msgError(res.returnMsg)
 		} else {
 			$modal.msgSuccess(res.returnMsg)
-			setTimeout(()=> {
+			// 通知列表刷新数据
+			uni.$emit('ReloadProcessData', '测试$emit');
+			setTimeout(() => {
 				// 返回上一页
 				$tab.navigateBack();
 			}, 1000)
@@ -323,6 +319,7 @@ function submitProcess() { // 提交表单
 	.main_container {
 		min-height: 70vh;
 	}
+
 	.picker_container {
 		border: 1px solid #e5e5e5;
 		background-color: #fff;
@@ -370,8 +367,9 @@ function submitProcess() { // 提交表单
 		background-color: #007aff !important;
 		color: #fff !important;
 	}
+
 	.submit_button::after {
-		border: 1px solid rgba(0,0,0,.2);
+		border: 1px solid rgba(0, 0, 0, .2);
 		border-radius: 10px;
 		box-sizing: border-box;
 		content: " ";