前端模糊查

This commit is contained in:
a0049873 2022-11-11 19:35:40 +08:00
parent 722385e3a8
commit 688c7eb295
1 changed files with 30 additions and 2 deletions

View File

@ -34,6 +34,24 @@
</template> </template>
</div> </div>
</div> </div>
<a-form
:model="formState"
name="basic"
:label-col="{ span: 8 }"
:wrapper-col="{ span: 16 }"
autocomplete="off"
@submit="onSubmit"
v-if="typeIndex == 6 || typeIndex == 7"
style="display: flex; margin-top: 10px; margin-left: -35px"
>
<a-form-item label="名称" name="name">
<a-input v-model:value="formState.name" />
</a-form-item>
<a-form-item :wrapper-col="{ offset: 8, span: 16 }">
<a-button type="primary" html-type="submit">搜索</a-button>
</a-form-item>
</a-form>
<div v-if="contentList.data.length > 0"> <div v-if="contentList.data.length > 0">
<div class="content"> <div class="content">
<div <div
@ -299,6 +317,7 @@
'云视频申请', '云视频申请',
// '', // '',
]) ])
const formState = ref({ name: '' })
// 西- // 西-
let isXiHaiAn = whoShow.itShowXiHaiAn let isXiHaiAn = whoShow.itShowXiHaiAn
const itShowXiHaiAn = ref(isXiHaiAn) const itShowXiHaiAn = ref(isXiHaiAn)
@ -314,6 +333,7 @@
} }
let tabList = ref(['全部', '审核中', '审核完成']) let tabList = ref(['全部', '审核中', '审核完成'])
const contentList = reactive({ data: [] }) const contentList = reactive({ data: [] })
const contentList2 = reactive({ data: [] }) // 使
let tabIndex = ref(0) let tabIndex = ref(0)
let typeIndex = ref(0) let typeIndex = ref(0)
let typeName = ref(typeList.value[0]) let typeName = ref(typeList.value[0])
@ -356,6 +376,7 @@
// //
const changeType = (item, index) => { const changeType = (item, index) => {
formState.value.name = ''
console.log('item, index-----选择类型------->', item, index) console.log('item, index-----选择类型------->', item, index)
numFlag.value = true numFlag.value = true
num.value = [] num.value = []
@ -702,6 +723,7 @@
(res) => { (res) => {
console.log('数据资源申请===============>', res.data.data) console.log('数据资源申请===============>', res.data.data)
contentList.data = res.data.data contentList.data = res.data.data
contentList2.data = res.data.data
num.value = [] num.value = []
total.value = 0 total.value = 0
showType.value = '云资源' showType.value = '云资源'
@ -711,6 +733,7 @@
getVideoBusinessList({ userAccount: 'zfcxjsjkjc' }).then((res) => { getVideoBusinessList({ userAccount: 'zfcxjsjkjc' }).then((res) => {
console.log('数据资源申请===============>', res.data.data) console.log('数据资源申请===============>', res.data.data)
contentList.data = res.data.data contentList.data = res.data.data
contentList2.data = res.data.data
num.value = [] num.value = []
total.value = 0 total.value = 0
showType.value = '云资源' showType.value = '云资源'
@ -798,6 +821,11 @@
showType.value = '' showType.value = ''
} }
} }
const onSubmit = () => {
contentList.data = contentList2.data.filter(
(val) => val.BUSINESS_NAME.indexOf(formState.value.name) > -1
)
}
const handleCurrentChange = (val) => { const handleCurrentChange = (val) => {
page.value = val page.value = val
getApplyList() getApplyList()
@ -949,7 +977,6 @@
flex-direction: column; flex-direction: column;
font-size: 16px; font-size: 16px;
justify-content: left; justify-content: left;
.title { .title {
font-size: 20px; font-size: 20px;
color: #000000; color: #000000;
@ -1011,7 +1038,8 @@
.content { .content {
padding-right: 10px; padding-right: 10px;
height: 510px; height: 610px;
overflow-y: scroll;
.content-body { .content-body {
padding-bottom: 20px; padding-bottom: 20px;