ow
This commit is contained in:
1 parent
5d0b0c751a
commit
d2278826fb
6 files changed
+83
-31
No files matched your search
@@ -529,6 +529,17 @@ const onSearch = async () => {
|
||||
? dayjs(data.value.FamilyPerson.DeathDate)
|
||||
: null;
|
||||
hasData.value = true;
|
||||
|
||||
// 无权限且未公开(Privacy='N'):强制回到查看模式,只显示基本资料
|
||||
if (readonlyBasicOnly.value && mode.value == "amend") {
|
||||
mode.value = "view";
|
||||
isEdit.value = false;
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "该族员资料未公开,您仅有查看基本资料的权限",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const onReset = () => {
|
||||
|
||||
@@ -91,7 +91,7 @@ const visible = computed<boolean>({
|
||||
|
||||
const { width } = useWindowSize();
|
||||
const { getPolicyOptionsComputed } = useLocalePolicy();
|
||||
const genderOptions = getPolicyOptionsComputed("GenderPolicy") as SelectOption[];
|
||||
const genderOptions = getPolicyOptionsComputed("GenderPolicy");
|
||||
|
||||
const surnameInputRef = ref<any>(null);
|
||||
const saving = ref<boolean>(false);
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
<span class="ft-item-label">当前?</span>
|
||||
<a-select v-if="isEdit" size="large" style="width: 100%" v-model:value="record.IsCurrent">
|
||||
<a-select-option v-for="o in yesNoPolicy" :value="o.BindValue">{{ o.DisplayName
|
||||
}}</a-select-option>
|
||||
}}</a-select-option>
|
||||
</a-select>
|
||||
<span v-else class="ft-item-text">{{
|
||||
getPolicyText(yesNoPolicy, record.IsCurrent) || "-"
|
||||
@@ -315,8 +315,7 @@
|
||||
</div>
|
||||
<div v-if="data.IsManager && !isEdit" class="ft-item-actions">
|
||||
<CheckCircleTwoTone class="ft-action" @click="approvePermission(record, 'N')" />
|
||||
<CrownOutlined class="ft-action" style="color: #faad14"
|
||||
@click="approvePermission(record, 'Y')" />
|
||||
<CrownOutlined class="ft-action" style="color: #faad14" @click="approvePermission(record, 'Y')" />
|
||||
<CloseCircleOutlined class="ft-action ft-action-delete" @click="rejectPermission(record)" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -730,11 +729,11 @@ onMounted(() => {
|
||||
if (treeId.value && treeId.value.trim().length > 0) {
|
||||
onSearch();
|
||||
}
|
||||
isCreate.value=false;
|
||||
isCreate.value = false;
|
||||
if (mode.value && mode.value == "create") {
|
||||
onCreate();
|
||||
isEdit.value = true;
|
||||
isCreate.value=true;
|
||||
isCreate.value = true;
|
||||
} else if (mode.value && mode.value == "amend") {
|
||||
isEdit.value = true;
|
||||
}
|
||||
@@ -903,33 +902,53 @@ const onChartSelectChild = async (personId: string) => {
|
||||
};
|
||||
|
||||
const onSearch = async () => {
|
||||
if (!treeId.value || treeId.value.trim().length == 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请输入族谱编号",
|
||||
placement: "topRight",
|
||||
try {
|
||||
loading.value = true;
|
||||
if (!treeId.value || treeId.value.trim().length == 0) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "请输入族谱编号",
|
||||
placement: "topRight",
|
||||
});
|
||||
hasData.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
data.value = await familyTreeService.FindByCurrentPerson({
|
||||
key: treeId.value.trim(),
|
||||
personId: data.value.CurrentPerson.FamilyPerson.PersonId,
|
||||
});
|
||||
hasData.value = false;
|
||||
return;
|
||||
|
||||
if (data.value.FamilyTree == null) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "记录不存在",
|
||||
placement: "topRight",
|
||||
});
|
||||
data.value = new FamilyTreeData();
|
||||
hasData.value = false;
|
||||
return;
|
||||
}
|
||||
|
||||
hasData.value = true;
|
||||
|
||||
// 无修改权限:强制回到查看模式
|
||||
if (!data.value.IsCanAmend && mode.value == "amend") {
|
||||
mode.value = "view";
|
||||
isEdit.value = false;
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "您没有该族谱的修改权限",
|
||||
placement: "topRight",
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
loading.value = false;
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
data.value = await familyTreeService.FindByCurrentPerson({
|
||||
key: treeId.value.trim(),
|
||||
personId: data.value.CurrentPerson.FamilyPerson.PersonId,
|
||||
});
|
||||
|
||||
if (data.value.FamilyTree == null) {
|
||||
notification.info({
|
||||
message: "系统提示:",
|
||||
description: "记录不存在",
|
||||
placement: "topRight",
|
||||
});
|
||||
data.value = new FamilyTreeData();
|
||||
hasData.value = false;
|
||||
return;
|
||||
finally {
|
||||
loading.value = false;
|
||||
}
|
||||
|
||||
hasData.value = true;
|
||||
};
|
||||
|
||||
const onReset = () => {
|
||||
|
||||
Reference in new issue
Block a user