eslint
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
<template>
|
||||
<el-select @change="changeFun" v-model="nodeUuid" placeholder="阶段" :options="nodeLevel2ListOptions">
|
||||
<el-select
|
||||
@change="changeFun"
|
||||
v-model="nodeUuid"
|
||||
placeholder="阶段"
|
||||
:options="nodeLevel2ListOptions"
|
||||
>
|
||||
</el-select>
|
||||
</template>
|
||||
<script lang='ts' setup>
|
||||
<script lang="ts" setup>
|
||||
import { getChildrenNodeListApi } from '@/api/project/node';
|
||||
import { NODE_TYPE } from '@/utils/enum/node';
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
@@ -45,15 +50,20 @@ const changeFun = () => {
|
||||
};
|
||||
|
||||
// 将选中数据回滚到上一个版本
|
||||
const rollBackValue = (value:string) => {
|
||||
const rollBackValue = (value: string) => {
|
||||
// emits('update:phaseUuid', value);
|
||||
emits('change', { phaseUuid: value, type: 'rollBack' });
|
||||
};
|
||||
|
||||
const nodeLevel2ListApi = async() => {
|
||||
const res:any = await getChildrenNodeListApi({ current: 1, size: 999, nodeType: NODE_TYPE.PHASE, nodeId: props.projectUuid });
|
||||
const nodeLevel2ListApi = async () => {
|
||||
const res: any = await getChildrenNodeListApi({
|
||||
current: 1,
|
||||
size: 999,
|
||||
nodeType: NODE_TYPE.PHASE,
|
||||
nodeId: props.projectUuid,
|
||||
});
|
||||
if (res && res.code === 200) {
|
||||
nodeLevel2ListOptions.value = res.data.map((item: { nodeName: string; uuid: string; }) => {
|
||||
nodeLevel2ListOptions.value = res.data.map((item: { nodeName: string; uuid: string }) => {
|
||||
return { label: item.nodeName, value: item.uuid, info: item };
|
||||
});
|
||||
// console.log('nodeLevel2ListOptions', nodeLevel2ListOptions.value);
|
||||
@@ -66,8 +76,7 @@ const nodeLevel2ListApi = async() => {
|
||||
nodeLevel2ListOptions.value = [];
|
||||
}
|
||||
};
|
||||
onMounted(() => {
|
||||
});
|
||||
onMounted(() => {});
|
||||
watch(
|
||||
() => props.projectUuid,
|
||||
() => {
|
||||
@@ -82,4 +91,4 @@ watch(
|
||||
);
|
||||
defineExpose({ rollBackValue });
|
||||
</script>
|
||||
<style lang='scss' scoped></style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user