wiz-frameworks
Version:
wizlong react framework
49 lines (45 loc) • 1.5 kB
JavaScript
import React from "react";
import "./index.less";
export default (function (_ref) {
var isAll = _ref.isAll,
orgIds = _ref.orgIds,
personIds = _ref.personIds,
positionCategoryIds = _ref.positionCategoryIds,
positionIds = _ref.positionIds;
var arr = [{ title: "组织选择", value: orgIds }, { title: "岗位分类", value: positionCategoryIds }, { title: "岗位选择", value: positionIds }, { title: "指定人员", value: personIds }];
var filterArr = arr.filter(function (val) {
return val.value && val.value.length;
});
return filterArr.length ? arr.map(function (val, index) {
return val.value && val.value.length ? React.createElement(
"div",
{ className: "audience-group-value", key: index },
React.createElement(
"div",
{ className: "audience-group-value__title" },
val.title,
"\uFF1A"
),
React.createElement(
"div",
{ className: "audience-group-value__value" },
val.title === "指定人员" ? val.value.map(function (val, index) {
return React.createElement(
"span",
{ key: index },
val.fullName,
"(",
val.userName,
")"
);
}) : val.value.map(function (val, index) {
return React.createElement(
"span",
{ key: index },
val.name
);
})
)
) : null;
}) : isAll ? "所有人" : "暂无";
});