修改项目编号,只存编号

This commit is contained in:
zhangsir
2024-09-09 15:39:36 +08:00
parent 4227e83c28
commit dac3f8292f
2 changed files with 3 additions and 6 deletions

View File

@@ -21,14 +21,12 @@ import {computed, defineEmits, defineProps, onMounted, ref, watch} from 'vue';
import { useStore } from "vuex";
const props = defineProps({
value: String,
label: String,
})
const emit = defineEmits(['update:value','update:label'])
const emit = defineEmits(['update:value'])
const store = useStore();
const numValue = ref(props.value||null)
const numValue = computed(()=>store.state.project_number.find(item=>item.value == props.value)?.name || null)
const handleChange = (value,option)=>{
emit('update:value',value || '')
emit('update:label',option?.label || '')
}
onMounted(() => {
// console.log(store.state.project_number,'store.state.project_number')

View File

@@ -151,7 +151,7 @@
<div class="num_text">项目编号</div>
<div class="num_input">
<!-- <a-input style="border-radius: 8px;" show-count allowClear maxlength="30" v-model:value="projectInfo.numValue" placeholder="请输入项目编号" /> -->
<ProjectNumber v-model:value="projectInfo.numValue" v-model:label="projectInfo.numLabel"></ProjectNumber>
<ProjectNumber v-model:value="projectInfo.numValue"></ProjectNumber>
</div>
</div>
</div>
@@ -345,7 +345,6 @@ export default {
watch(()=>state.projectInfo.boeFlag,(val)=>{
if(!val){
state.projectInfo.numValue = ''
state.projectInfo.numLabel = ''
}
})