完成投诉管理
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
</div>
|
||||
<div v-else class="overflow-auto overflow-hidden w-full text-ellipsis text-nowrap">
|
||||
<span>姓名:{{ multipleSelection[0] && multipleSelection[0].nickName }}</span>
|
||||
<span class="ml-20px">联系方式:{{ multipleSelection[0] && multipleSelection[0].phonenumber }}</span>
|
||||
<span v-show="multipleSelection[0] && multipleSelection[0].phonenumber" class="ml-20px">联系方式:{{ multipleSelection[0].phonenumber }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -67,9 +67,16 @@ interface tableType extends ResidentVO {
|
||||
housePath?: string;
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
userid: string | number;
|
||||
}>();
|
||||
const props = defineProps({
|
||||
userid: {
|
||||
type: String || Number
|
||||
},
|
||||
returnvalue: {
|
||||
type: String,
|
||||
default: 'id',
|
||||
required: true
|
||||
}
|
||||
});
|
||||
const { userid } = toRefs(props);
|
||||
const emit = defineEmits<{
|
||||
change: [value: string | number];
|
||||
@@ -113,8 +120,9 @@ const handleRowClick = (row) => {
|
||||
// 统一回显 userid 选中(安全版)
|
||||
const handleUserSelection = () => {
|
||||
if (!userid.value || !tableData.value.length) return;
|
||||
console.log('user', userid, tableData.value);
|
||||
|
||||
const target = tableData.value.find((item) => item.id == userid.value);
|
||||
const target = tableData.value.find((item) => item.userId == userid.value);
|
||||
if (target) {
|
||||
multipleSelection.value = [target];
|
||||
nextTick(() => {
|
||||
@@ -172,7 +180,11 @@ function conback() {
|
||||
function confim() {
|
||||
dialog.value.dialogVisible = false;
|
||||
if (multipleSelection.value.length > 0) {
|
||||
emit('change', multipleSelection.value[0].id);
|
||||
if (props.returnvalue === 'id') {
|
||||
emit('change', multipleSelection.value[0].id);
|
||||
} else if (props.returnvalue === 'value') {
|
||||
emit('change', multipleSelection.value[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user