This commit is contained in:
zhangyc
2022-12-14 16:04:10 +08:00
parent 117dd5f184
commit 4b12a51f51
8 changed files with 867 additions and 799 deletions

View File

@@ -1,46 +1,54 @@
<!--
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-12-14 15:46:36
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-14 15:47:48
* @FilePath: /fe-manage/src/components/project/ProjectClass.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<!-- 评估管理-创建评估页面 -->
<template>
<a-select
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="id"
placeholder="请选择分类"
style="width: 100%"
:options="options"
allowClear
@change="change"
:disabled="disabled"
:getPopupContainer="
(triggerNode) => {
return triggerNode.parentNode || document.body;
}
"
v-model:value="id"
placeholder="请选择分类"
style="width: 100%"
:options="options"
allowClear
@change="change"
:disabled="disabled"
>
</a-select>
</template>
<script setup>
import {computed, defineEmits, defineProps, onMounted, ref} from "vue";
import {useStore} from "vuex";
import { computed, defineEmits, defineProps } from "vue";
import { useStore } from "vuex";
const store = useStore();
const props = defineProps({
value: String,
disabled: String
})
const emit = defineEmits({})
disabled: String,
});
const emit = defineEmits({});
const options = ref([])
const options = computed(() =>
store.state.projectClass.map((e) => ({
value: parseInt(e.dictCode),
label: e.dictName,
}))
);
const id = computed(() => {
return props.value
})
onMounted(() => {
options.value = store.state.projectClass.map(e => ({value: parseInt(e.dictCode), label: e.dictName}))
})
return props.value;
});
function change(key, obj) {
emit('update:name', obj[0])
emit('update:value', key)
emit("update:name", obj[0]);
emit("update:value", key);
}
</script>