Эх сурвалжийг харах

feat: 待审批、我收到、认领、已审批、我的申请 查询条件联调 100%

luoyali 1 жил өмнө
parent
commit
a7c0a1b0e6

+ 1 - 0
src/views/approve/components/approvedContent.vue

@@ -511,6 +511,7 @@ watch(
 		height: 52px;
 		//border-top: 1px solid var(--color-neutral-3);
 		border-top: 1px solid var(--el-border-color-light);
+		background: var(--el-bg-color);
 		padding: 0 20px;
 	}
 }

+ 54 - 46
src/views/approve/components/approvedItem.vue

@@ -22,36 +22,27 @@
 					</template>
 					<div class="title">高级筛选</div>
 					<el-scrollbar max-height="400px">
-						<!-- 发起人 -->
-						<el-select v-if="currentTaskType !== 'myApplication'" v-model="value" placeholder="发起人" style="margin-bottom: 10px; width: 240px">
-							<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
-						</el-select>
-						<!-- 流程分组 -->
-						<el-select v-if="currentTaskType !== 'pendingApproval'" v-model="value1" placeholder="流程分组" style="margin-bottom: 10px; width: 240px">
-							<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
-						</el-select>
+						<!-- 创建人 -->
+						<el-input v-model="createBy" style="width: 240px; margin-bottom: 10px" placeholder="请输入创建人名称" />
 						<!-- 流程状态 -->
-						<el-select v-model="value2" placeholder="流程状态" style="margin-bottom: 10px; width: 240px">
-							<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
+						<el-select v-model="instanceState" placeholder="流程状态" style="margin-bottom: 10px; width: 240px">
+							<el-option v-for="item in instanceStateOps" :key="item.value" :label="item.label" :value="item.value" />
 						</el-select>
-						<!-- 最小/大提交时间 -->
 						<el-date-picker
-							v-model="value3"
-							style="margin-bottom: 10px; width: 240px"
-							type="daterange"
-							start-placeholder="最小提交时间"
-							end-placeholder="最大提交时间"
-							:default-value="[new Date(2010, 9, 1), new Date(2010, 10, 1)]"
+							v-model="beginTime"
+							style="width: 240px; margin-bottom: 10px"
+							type="date"
+							format="YYYY-MM-DD"
+							value-format="YYYY-MM-DD"
+							placeholder="开始时间"
 						/>
-						<!-- 最小/大完成时间 -->
 						<el-date-picker
-							v-if="currentTaskType !== 'pendingApproval'"
-							v-model="value4"
-							style="width: 240px"
-							type="daterange"
-							start-placeholder="最小完成时间"
-							end-placeholder="最大完成时间"
-							:default-value="[new Date(2010, 9, 1), new Date(2010, 10, 1)]"
+							v-model="endTime"
+							style="width: 240px; margin-bottom: 10px"
+							type="date"
+							format="YYYY-MM-DD"
+							value-format="YYYY-MM-DD"
+							placeholder="结束时间"
 						/>
 					</el-scrollbar>
 					<div class="footer">
@@ -160,41 +151,51 @@ const props = defineProps({
  * 我收到的:发起人 流程分组 流程状态 最小提交时间 最大提交时间 最小完成时间 最大完成时间
  * 已审批:发起人 流程分组 流程状态 最小提交时间 最大提交时间 最小完成时间 最大完成时间
  */
-const options = [
+const instanceStateOps = [
+	{
+		value: 0,
+		label: '审批中'
+	},
 	{
-		value: 'Option1',
-		label: 'Option1'
+		value: 1,
+		label: '审批通过'
 	},
 	{
-		value: 'Option2',
-		label: 'Option2'
+		value: 2,
+		label: '审批拒绝'
 	},
 	{
-		value: 'Option3',
-		label: 'Option3'
+		value: 3,
+		label: '撤销审批'
 	},
 	{
-		value: 'Option4',
-		label: 'Option4'
+		value: 4,
+		label: '超时结束'
 	},
 	{
-		value: 'Option5',
-		label: 'Option5'
+		value: 5,
+		label: '强制终止'
 	}
 ]
-const value = ref(null)
-const value1 = ref(null)
-const value2 = ref(null)
-const value3 = ref(null)
-const value4 = ref(null)
+const createId = ref(null) // 发起人
+const createBy = ref(null) // 创建人
+const instanceState = ref(null) // 流程状态
+const beginTime = ref(null) // 开始时间
+const endTime = ref(null) // 结束时间
 const searchMoreVisible = ref(false)
+// 重置
 const searchReset = () => {
-	console.error('searchReset')
-	searchMoreVisible.value = false
+	createBy.value = undefined
+	instanceState.value = undefined
+	beginTime.value = undefined
+	endTime.value = undefined
+	// searchMoreVisible.value = false
 }
+
+// 搜索条件更多
 const searchSubmit = () => {
-	console.error('searchSubmit')
 	searchMoreVisible.value = false
+	getPagedSatellites('clear')
 }
 
 // store值
@@ -231,14 +232,18 @@ const loadList = () => {
 }
 
 // 获取分页数据
-const getPagedSatellites = async () => {
+const getPagedSatellites = async from => {
 	try {
 		let responseData = {}
 		const { currentTaskType } = props
 		const params = {
 			...condition,
 			data: {
-				processName: processName.value
+				processName: processName.value,
+				createBy: createBy.value,
+				instanceState: instanceState.value,
+				beginTime: beginTime.value,
+				endTime: endTime.value
 			}
 		}
 		if (currentTaskType === 'pendingApproval') {
@@ -266,6 +271,9 @@ const getPagedSatellites = async () => {
 		})
 		totalNumber.value = total
 		totalPages.value = pages
+		// if (from === 'clear') {
+		// 	searchReset()
+		// }
 		loading.value = false
 		if (condition.page > totalPages.value) {
 			console.log('没有更多数据了')