|
|
|
@ -3,7 +3,20 @@ import { onBeforeMount, onMounted, ref } from 'vue'
|
|
|
|
|
import type { FormItemRule, FormRules } from 'naive-ui'
|
|
|
|
|
import { useDictionary } from '@/store/modules/dictonary'
|
|
|
|
|
import { onUpdated } from 'vue';
|
|
|
|
|
import { useConfig } from '@/store/modules/asideConfig'
|
|
|
|
|
|
|
|
|
|
const configUseStore = useConfig()
|
|
|
|
|
|
|
|
|
|
configUseStore.$subscribe(() => {
|
|
|
|
|
let asideValue = configUseStore.getAsideValue;
|
|
|
|
|
if(asideValue['izprojecttype']) {
|
|
|
|
|
let list = asideValue['izprojecttype'].split(',');
|
|
|
|
|
formValue.value.plans = list;
|
|
|
|
|
console.log("formValue.value.izprojecttype", formValue.value.plans);
|
|
|
|
|
}else {
|
|
|
|
|
formValue.value.plans = [];
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
value: string[] | null
|
|
|
|
|
label: string
|
|
|
|
@ -16,7 +29,10 @@ const emit = defineEmits<{
|
|
|
|
|
const formValue = ref({
|
|
|
|
|
plans: props.value,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if(typeof formValue.value.plans == "string") {
|
|
|
|
|
let list = formValue.value.plans.split(',');
|
|
|
|
|
formValue.value.plans = list;
|
|
|
|
|
}
|
|
|
|
|
const rules: FormRules = {
|
|
|
|
|
plans: [
|
|
|
|
|
{
|
|
|
|
@ -32,13 +48,7 @@ const configStore = useDictionary()
|
|
|
|
|
const labStyle = {
|
|
|
|
|
fontWeight: 'bold',
|
|
|
|
|
}
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
if(props.value) {
|
|
|
|
|
let list = props.value.split(',');
|
|
|
|
|
formValue.value.plans = list;
|
|
|
|
|
console.log("formValue.value.plans", formValue.value.plans);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
|
const list = await configStore.fetchizizprojecttypeList()
|
|
|
|
|
options.value = list
|
|
|
|
|