mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 21:36:44 +08:00
修改项目编号,只存编号
This commit is contained in:
@@ -21,14 +21,12 @@ import {computed, defineEmits, defineProps, onMounted, ref, watch} from 'vue';
|
|||||||
import { useStore } from "vuex";
|
import { useStore } from "vuex";
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
value: String,
|
value: String,
|
||||||
label: String,
|
|
||||||
})
|
})
|
||||||
const emit = defineEmits(['update:value','update:label'])
|
const emit = defineEmits(['update:value'])
|
||||||
const store = useStore();
|
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)=>{
|
const handleChange = (value,option)=>{
|
||||||
emit('update:value',value || '')
|
emit('update:value',value || '')
|
||||||
emit('update:label',option?.label || '')
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// console.log(store.state.project_number,'store.state.project_number')
|
// console.log(store.state.project_number,'store.state.project_number')
|
||||||
|
|||||||
@@ -151,7 +151,7 @@
|
|||||||
<div class="num_text">项目编号:</div>
|
<div class="num_text">项目编号:</div>
|
||||||
<div class="num_input">
|
<div class="num_input">
|
||||||
<!-- <a-input style="border-radius: 8px;" show-count allowClear maxlength="30" v-model:value="projectInfo.numValue" placeholder="请输入项目编号" /> -->
|
<!-- <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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -345,7 +345,6 @@ export default {
|
|||||||
watch(()=>state.projectInfo.boeFlag,(val)=>{
|
watch(()=>state.projectInfo.boeFlag,(val)=>{
|
||||||
if(!val){
|
if(!val){
|
||||||
state.projectInfo.numValue = ''
|
state.projectInfo.numValue = ''
|
||||||
state.projectInfo.numLabel = ''
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user