|
|
@@ -3,8 +3,9 @@
|
|
|
<view class="search_container">
|
|
|
<uni-row>
|
|
|
<uni-col :xs="6" :sm="4">
|
|
|
- <view class="popup_button_container">
|
|
|
- <button @click="openPopup" class="button">{{ searchItem }}</button>
|
|
|
+ <view @click="openPopup" class="popup_button_container">
|
|
|
+ <text class="ygoa-icon icon-filter"></text>
|
|
|
+ <text class="button_text">{{ searchItem }}</text>
|
|
|
</view>
|
|
|
</uni-col>
|
|
|
<uni-col :xs="18" :sm="20">
|
|
|
@@ -53,11 +54,16 @@ const userStore = useUserStore();
|
|
|
const items = reactive(['我的', '待办', '在办', '办结'])
|
|
|
// 分段器选项
|
|
|
const current = ref(0)
|
|
|
+// 子组件
|
|
|
const processListRef = ref(null)
|
|
|
+
|
|
|
+// 待办列表
|
|
|
+const processes = ref([])
|
|
|
// 分段器点击事件 调用子组件刷新数据
|
|
|
function clickSegmentItem({ currentIndex }) {
|
|
|
- current.value = currentIndex
|
|
|
- processListRef.value.onClickItem()
|
|
|
+ processes.value = [] // 清空列表数据
|
|
|
+ current.value = currentIndex // 更新分段器状态
|
|
|
+ processListRef.value.onClickItem() // 调用子组件刷新数据
|
|
|
}
|
|
|
|
|
|
// 搜索项
|
|
|
@@ -66,29 +72,33 @@ const candidates = ref(['全局', '类型', '创建时间'])
|
|
|
const searchItem = ref('全局')
|
|
|
// 搜索项弹出层
|
|
|
const searchItemPopup = ref(null)
|
|
|
-function openPopup() { // 打开搜索项弹出层
|
|
|
+// 打开搜索项弹出层
|
|
|
+function openPopup() {
|
|
|
searchItemPopup.value.open()
|
|
|
}
|
|
|
-function closePopup() { // 关闭搜索项弹出层
|
|
|
+// 关闭搜索项弹出层
|
|
|
+function closePopup() {
|
|
|
searchItemPopup.value.close()
|
|
|
}
|
|
|
-function clickSearchItem(item) { // 选中搜索项
|
|
|
+// 选中搜索项
|
|
|
+function clickSearchItem(item) {
|
|
|
searchItem.value = item
|
|
|
closePopup()
|
|
|
}
|
|
|
-function search(e) { // 搜索
|
|
|
- console.log('search', e)
|
|
|
+// 搜索
|
|
|
+function search(e) {
|
|
|
+ // console.log('search', e)
|
|
|
}
|
|
|
-function searchCancel() { // 取消搜索
|
|
|
+// 取消搜索
|
|
|
+function searchCancel() {
|
|
|
return
|
|
|
}
|
|
|
-function searchOnBlur(e) { // 搜索栏失去焦点
|
|
|
- console.log('searchOnBlur', e);
|
|
|
+// 搜索栏失去焦点
|
|
|
+function searchOnBlur(e) {
|
|
|
+ // console.log('searchOnBlur', e);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// 待办列表
|
|
|
-const processes = ref([])
|
|
|
+// 获取待办列表数据
|
|
|
function getProcessData({ pageNo, pSize }, callback) {
|
|
|
const params = {
|
|
|
staffId: userStore.user.useId,
|
|
|
@@ -108,6 +118,7 @@ function getProcessData({ pageNo, pSize }, callback) {
|
|
|
callback(returnParams.list, returnParams.total, pageNo)
|
|
|
})
|
|
|
}
|
|
|
+// 分页获取待办列表数据
|
|
|
function getProcessPage({ pageNo, pSize }, callback) {
|
|
|
const params = {
|
|
|
staffId: userStore.user.useId,
|
|
|
@@ -127,31 +138,31 @@ function getProcessPage({ pageNo, pSize }, callback) {
|
|
|
callback(returnParams.list, returnParams.total, pageNo)
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+// 跳转到流程详情页
|
|
|
function handleToProcessDetail({ insId, insName }) {
|
|
|
$tab.navigateTo('/pages/process/detail/index?insId=' + insId + '&insName=' + insName)
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="scss">
|
|
|
+<style lang="scss" scoped>
|
|
|
@import url("@/static/font/ygoa/iconfont.css");
|
|
|
|
|
|
-.ygoa-icon {
|
|
|
- font-size: 3rem;
|
|
|
-}
|
|
|
-
|
|
|
.search_container {
|
|
|
.popup_button_container {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ margin-left: 5px;
|
|
|
+ height: 36px;
|
|
|
+ line-height: 36px;
|
|
|
width: 100%;
|
|
|
padding-top: 10px;
|
|
|
-
|
|
|
- .button {
|
|
|
- font-size: 14px;
|
|
|
- font-weight: bold;
|
|
|
- color: #ffffff;
|
|
|
- background-color: #1aad19;
|
|
|
- height: 36px;
|
|
|
- width: 100%;
|
|
|
+ background-color: #f5f5f5;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 16px;
|
|
|
+ color: #333;
|
|
|
+ .button_text {
|
|
|
+ width: 64px;
|
|
|
+ margin-left: 4px;
|
|
|
}
|
|
|
}
|
|
|
|