diff --git a/front/src/main.js b/front/src/main.js index 2fdb8ec3..7b3ccf72 100644 --- a/front/src/main.js +++ b/front/src/main.js @@ -21,7 +21,6 @@ import 'vue3-video-play-emiyagm/dist/style.css' // 引入css import ElementPlus from 'element-plus' import 'element-plus/dist/index.css' import * as ElementPlusIconsVue from '@element-plus/icons-vue' -import animate from 'animate.css' /** * @author chuzhixin 1204505056@qq.com * @description 正式环境默认使用mock,正式项目记得注释后再打包 @@ -43,7 +42,6 @@ app .use(Antd) .use(ElementPlus) .mount('#app') - .use(animate) for (const [key, component] of Object.entries(ElementPlusIconsVue)) { app.component(key, component) } diff --git a/front/src/views/home/apply.vue b/front/src/views/home/apply.vue index d14234f6..d472eea5 100644 --- a/front/src/views/home/apply.vue +++ b/front/src/views/home/apply.vue @@ -82,7 +82,6 @@ 1 ? '等能力申请' + num.value + '个' : '能力申请' ) : list.value[0].arr[0].resourceName.concat('能力申请'), // 标题 - applicationSystem: [], // 应用系统 + applicationSystem: '', // 应用系统 // applicationSystem: [], // 应用系统 applicationScene: [], // 应用领域 applicationBackground: '', // 应用背景 @@ -338,7 +337,7 @@ getApplyForm(id).then((res) => { console.log('修改==============>', res.data.data) // formName.id = res.data.data.id || '' - formName.applicationSystem = res.data.data.applicationSystem || [] + formName.applicationSystem = res.data.data.applicationSystem || '' formName.applicationScene = res.data.data.applicationScene || [] formName.applicationBackground = res.data.data.applicationBackground || '' @@ -506,7 +505,7 @@ ) if (formName.system.length !== 0) { if (formName.applicationSystem.length == 0) { - formName.applicationSystem = [] + formName.applicationSystem = '' } submitApply(formName).then((res) => { // applySuccess.value = false @@ -648,7 +647,7 @@ ) if (formName.system.length !== 0) { if (formName.applicationSystem.length == 0) { - formName.applicationSystem = [] + formName.applicationSystem = '' } submitApply(formName).then((res) => { // applySuccess.value = false @@ -682,7 +681,7 @@ } } } else { - formName.applicationSystem = [] + formName.applicationSystem = '' applyAllApplication(formName).then((res) => { if (res.data.code == 0) { message.success('申请提交成功,请到消息中心查看!') @@ -803,11 +802,21 @@ console.log(`selected ${value}`) } const systemHandleSearch = (value) => { - console.log(`search ${value}`) - text.value = value - systemOptions.value = systemOptions2.value.filter( - (item) => item.label.search(text.value) > -1 - ) + // console.log(`search ${value}`) + // text.value = value + // systemOptions.value = systemOptions2.value.filter( + // (item) => item.label.search(text.value) > -1 + // ) + let valueArray = [] + systemOptions.value.map((val) => { + valueArray.push(val.value) + }) + if (valueArray.indexOf(value) == -1) { + systemOptions.value.push({ + value: value, + label: value, + }) + } } pageWithAttrs({ pageNum: 1, @@ -839,7 +848,14 @@ console.log('focus') // console.log(formName.applicationSystem) // formName.applicationSystem = [] - systemOptions.value = systemOptions2.value + let arrId = [] + for (var valueIndex of systemOptions2.value) { + if (arrId.indexOf(valueIndex['value']) == -1) { + arrId.push(valueIndex['value']) + systemOptions.value.push(valueIndex) + } + } + // systemOptions.value = systemOptions2.value // systemOptions.value = [] } // const filterOption = (input, option) => { diff --git a/front/src/views/newHome/components/Navigation.vue b/front/src/views/newHome/components/Navigation.vue index fdc13701..51bda04f 100644 --- a/front/src/views/newHome/components/Navigation.vue +++ b/front/src/views/newHome/components/Navigation.vue @@ -1,5 +1,5 @@