mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
merge
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user