update point tier rule
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
<span v-if="!(item.roleCodeList || []).length" class="muted" v-text="'未配置'" />
|
||||
</div>
|
||||
<div class="line" v-text="getLimitText(item)" />
|
||||
<div class="line" v-text="getValueDefinitionText(item)" />
|
||||
</div>
|
||||
</template>
|
||||
</t-cell>
|
||||
@@ -81,6 +82,7 @@ import ManagedUserAPI from "@/api/ManagedUserAPI";
|
||||
import { useCurrentStoreStore } from "@/store/currentStoreStore";
|
||||
import { useNavBarStore } from "@/store/navBarStore";
|
||||
import type { EventItem, EventLimitType, EventStatus } from "@/types/EventItem";
|
||||
import { getEventValueUnitText } from "@/utils/eventValue";
|
||||
import { gaoRoleCodes, permissionCodes } from "@/utils/permission";
|
||||
|
||||
defineOptions({
|
||||
@@ -199,6 +201,14 @@ function getLimitText(item: EventItem): string {
|
||||
return limitTextMap[item.limitType || "NONE"];
|
||||
}
|
||||
|
||||
function getValueDefinitionText(item: EventItem): string {
|
||||
if (item.valueType !== "NUMBER") {
|
||||
return "不携带数值";
|
||||
}
|
||||
const unitText = getEventValueUnitText(item.valueUnit);
|
||||
return `整数数值|${unitText}${item.requireValue ? "|登记必填" : "|登记可选"}`;
|
||||
}
|
||||
|
||||
function resolveLimitValue(value?: number): number {
|
||||
if (value !== undefined && Number.isFinite(value) && 0 < value) {
|
||||
return Math.floor(value);
|
||||
|
||||
Reference in New Issue
Block a user