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

View File

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