husq
2023-08-30 0ea6ac4348196458aa5f2ded68aec2ec308d4432
src/pages/page-web/projects/project_list/list_page/list.vue
File was renamed from src/pages/page-web/projects/project_list/list_page.vue/list.vue
@@ -3,7 +3,7 @@
    <div class="side-header">
      <div class="side-option flex-display flex-align-center flex-justify-between">
        <h2 class="title">项目列表</h2>
        <PlusCircleOutlined :style="{ fontSize: '20px' }" />
        <PlusCircleOutlined @click="goAdd" :style="{ fontSize: '20px' }" />
      </div>
      <div class="border-bottom"></div>
    </div>
@@ -12,12 +12,13 @@
        <Select :bordered="false" :options="statusOption" v-model="params.projectStatus" @handleChange="handleChange" />
        <Select :bordered="false" :options="projectOption" v-model="params.project" @handleChange="handleChange" />
        <Select :bordered="false" :options="sortOption" v-model="sort" @handleChange="sortHandleChange" />
        <MonitorOutlined :style="{ fontSize: '24px', display: 'flex', alignItems: 'center', marginRight: '12px' }" />
        <MonitorOutlined @click="() => searchInput = !searchInput"
          :style="{ color: searchInput ? '#1180ff' : '', fontSize: '24px', display: 'flex', alignItems: 'center', marginRight: '12px' }" />
      </div>
      <div class="side-filter-input">
      <div class="side-filter-input" v-if="searchInput">
        <a-input v-model:value="params.projectName" placeholder="按项目名称搜索">
          <template #suffix>
            <MonitorOutlined :style="{color: '#fff',fontSize: '18px'}" />
            <MonitorOutlined :style="{ color: '#fff', fontSize: '18px' }" />
          </template>
        </a-input>
      </div>
@@ -38,10 +39,8 @@
import Select from '/@/components/Search/Select.vue'
import List from './components/ProjectList.vue'
const router = useRouter()
const goDetail = () => {
  console.log(router, '==========')
  router.push({ name: ERouterName.WORKSPACE })
}
const sort = ref('createTime')
const searchInput = ref(false)
const params = ref({
  projectStatus: '',
  project: '',
@@ -53,11 +52,17 @@
  ],
  projectName: '',
})
const sort = ref('createTime')
const goDetail = () => {
  router.push({ name: ERouterName.WORKSPACE })
}
const goAdd = () => {
  router.push({ name: ERouterName.ADD_PROJECT })
}
const cardList = ref<projectCard[]>([])
// 全部状态、全部项目筛选方法
const handleChange = (e: any) => {
  console.log(e, params.value, '=============')
  init()
}
// 排序方法
const sortHandleChange = (e: string) => {
@@ -67,7 +72,9 @@
      asc: map.get(e)
    }
  ]
  init()
}
// 页面初始化
const init = async () => {
  const res = await getProjectPage(params.value)
  cardList.value = res.data.records
@@ -99,6 +106,7 @@
        color: $text-white-basic;
        font-size: 18px;
        margin: 0;
        font-weight: 700;
      }
    }
  }
@@ -128,9 +136,11 @@
    border: none;
    color: #fff;
  }
  :deep(.ant-input-affix-wrapper){
  :deep(.ant-input-affix-wrapper) {
    background: #101010;
  }
  :deep(.ant-select-item-option-selected) {
    color: #1180ff !important;
    background-color: #333333 !important;
@@ -148,5 +158,4 @@
    flex: 1;
    overflow-y: auto;
  }
}
</style>
}</style>