Merge branch 'zcwy_0827_pingcode817' into dev_master

This commit is contained in:
nisen
2024-09-03 16:53:09 +08:00
2 changed files with 15 additions and 14 deletions

View File

@@ -11,7 +11,7 @@
:options="options" :options="options"
showSearch showSearch
allowClear allowClear
@select="handleSelect" @change="handleChange"
> >
</a-select> </a-select>
</template> </template>
@@ -25,19 +25,20 @@ const props = defineProps({
}) })
const emit = defineEmits(['update:value','update:label']) const emit = defineEmits(['update:value','update:label'])
const store = useStore(); const store = useStore();
const numValue = ref(props.value) const numValue = ref(props.value||null)
const handleSelect = (value,option) => { const handleChange = (value,option)=>{
emit('update:value',value) emit('update:value',value || '')
emit('update:label',option.id) emit('update:label',option?.label || '')
}; }
onMounted(() => { onMounted(() => {
// console.log(store.state.project_number,'xixixixii') // console.log(store.state.project_number,'store.state.project_number')
}); });
const options = ref([ const options = computed(()=>store.state.project_number.map(e => {
{id:4,value:1,label:1}, return{
{id:5,value:2,label:2}, value: e.value,
{id:6,value:3,label:3}, label: e.name
]) }
}))
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@@ -344,8 +344,8 @@ export default {
}); });
watch(()=>state.projectInfo.boeFlag,(val)=>{ watch(()=>state.projectInfo.boeFlag,(val)=>{
if(!val){ if(!val){
state.projectInfo.numValue = null state.projectInfo.numValue = ''
state.projectInfo.numLabel = null state.projectInfo.numLabel = ''
} }
}) })