|
|
|
@ -56,7 +56,7 @@ |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
<div class="dialog-footer"> |
|
|
|
|
<el-button @click="$emit('update:modelValue', false)">关闭</el-button> |
|
|
|
|
<el-button @click="closeDialog">关闭</el-button> |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
@click=" |
|
|
|
@ -65,7 +65,8 @@ |
|
|
|
|
$emit( |
|
|
|
|
'selected', |
|
|
|
|
tableData.find((o) => o.id === selectedRowId) || {}, |
|
|
|
|
) |
|
|
|
|
); |
|
|
|
|
selectedRowId = null; // 清空 selectedRowId 的值 |
|
|
|
|
} |
|
|
|
|
" |
|
|
|
|
> |
|
|
|
@ -94,6 +95,7 @@ watch( |
|
|
|
|
// 数据 |
|
|
|
|
const tableData = reactive<any[]>([]) |
|
|
|
|
const selectedRowId = ref() |
|
|
|
|
// const selectedRowId = ref<number | null>(null); // 使用 null 作为初始值 |
|
|
|
|
|
|
|
|
|
// 分页 |
|
|
|
|
const total = ref(0) |
|
|
|
@ -112,6 +114,12 @@ const search = () => { |
|
|
|
|
params.work_no="*"+name.value+"*" |
|
|
|
|
getList() |
|
|
|
|
} |
|
|
|
|
//取消 |
|
|
|
|
const closeDialog = ()=>{ |
|
|
|
|
$emit('update:modelValue', false) |
|
|
|
|
$emit('selected', {}); |
|
|
|
|
selectedRowId.value = null |
|
|
|
|
} |
|
|
|
|
const loading = ref(false) |
|
|
|
|
const getList = async () => { |
|
|
|
|
if (!props.modelValue) return |
|
|
|
|