Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

be:3.9b #837

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion @rbv
Submodule @rbv updated from 860315 to 1d45ff
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,13 @@ private void appendConfig4Db(Document config) {
.addAttribute("deletable", "true");

// 实体扩展配置
JSONObject extraAttrs;
JSONObject extraAttrs = null;
if (StringUtils.isBlank((String) c[9])) {
extraAttrs = new JSONObject();
} else {
extraAttrs = JSON.parseObject((String) c[9]);
try {
extraAttrs = new JSONObject();
} catch (Exception ignored){}
}
if (extraAttrs == null) extraAttrs = new JSONObject();

extraAttrs.put("metaId", c[4]);
extraAttrs.put("comments", c[5]);
Expand Down Expand Up @@ -165,12 +166,13 @@ else if (dt == DisplayType.BARCODE) {
}

// 字段扩展配置
JSONObject extraAttrs;
JSONObject extraAttrs = null;
if (JSONUtils.wellFormat((String) c[14])) {
extraAttrs = JSON.parseObject((String) c[14]);
} else {
extraAttrs = new JSONObject();
try {
extraAttrs = JSON.parseObject((String) c[14]);
} catch (Exception ignored){}
}
if (extraAttrs == null) extraAttrs = new JSONObject();

extraAttrs.put("metaId", c[12]);
extraAttrs.put("comments", c[13]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public Record getAfterRecord() {

/**
* NOTE!!! 请注意当共享时得到的是共享实体 Record
* 如果是为了获取源纪录 ID 推荐使用 {@link #getFixedRecordId()}
* 如果是为了获取源记录 ID 推荐使用 {@link #getFixedRecordId()}
*
* @return
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
*
* 场景举例:
* 1.1 新建记录:产品A + 仓库A分组(组合A+A)
* 1.2 修改记录:仓库A > B(组合B+A),此时原(组合A+A)纪录不会触发更新
* 2. 因此需要通过强制更新原纪录刷新原组合(组合A+A)记录
* 1.2 修改记录:仓库A > B(组合B+A),此时原(组合A+A)记录不会触发更新
* 2. 因此需要通过强制更新原记录刷新原组合(组合A+A)记录
* 3. NOTE 如果组合值均为空,则无法匹配任何原目标记录,此时需要全量刷新(性能差)(可通过任一字段必填解决)
* 4. NOTE 如果只有一个分组字段,因为无法获知之前的值,则需要全量刷新(性能差)
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ private String buildCustomPlanSql(String planKey, ID projectId) {
return baseSql + String.format("modifiedOn < '%s'", dtf.format(CalendarUtils.addDay(-14)));
}
} else if (planKey.equals("0-0")) {
return "1=1";
// 列表视图
return "projectId = '" + projectId + "'";
}

throw new InvalidParameterException(Language.L("无效请求参数 (%s=%s)", "id", planKey));
Expand Down
13 changes: 13 additions & 0 deletions src/main/resources/web/assets/css/feeds.css
Original file line number Diff line number Diff line change
Expand Up @@ -725,3 +725,16 @@ See LICENSE and COMMERCIAL in the project root for license information.
width: 24px;
height: 24px;
}

.side-wrapper + .announcement-wrapper {
margin-top: 20px;
}

.side-wrapper + .announcement-wrapper > div + div {
margin-top: 5px;
}

.side-wrapper + .announcement-wrapper > div p {
white-space: unset !important;
max-height: 84px;
}
14 changes: 12 additions & 2 deletions src/main/resources/web/assets/js/feeds/announcement.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,10 @@ const $showAnnouncement = function () {
$.get('/commons/announcements', (res) => {
if (res.error_code !== 0 || !res.data || res.data.length === 0) return

const shows = res.data.map((item) => {
let popup39 = []
const anShows = res.data.map((item) => {
const stateClazz = item.readState === 1 ? 'read-state1' : typeof item.readState === 'string' ? 'read-state2' : null
if (item.readState === 1) popup39.push(`anno-${item.id}`)
return (
<div key={item.id} id={`anno-${item.id}`} className={`bg-warning ${stateClazz}`} title={$L('查看详情')} onClick={() => renderRbcomp(<AnnouncementModal {...item} />)}>
<i className="icon zmdi zmdi-notifications-active" />
Expand All @@ -99,10 +101,18 @@ const $showAnnouncement = function () {
)
})

renderRbcomp(<RF>{shows}</RF>, $aw, function () {
renderRbcomp(<RF>{anShows}</RF>, $aw, function () {
$(this)
.find('p>a[href]')
.on('click', (e) => e.stopPropagation())

// v3.9 弹窗
// 登录页不弹、已读不弹
if (location.pathname.includes('/login')) popup39 = []
if (location.pathname.includes('/feeds/home')) $('.side-wrapper').css('position', 'static')
setTimeout(() => {
popup39.forEach((p) => $('#' + p)[0].click())
}, 600)
})
})
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/web/assets/js/general/rb-assignshare.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,11 @@ class DlgTransform extends RbModalHandler {
<div className="col-sm-7" style={{ paddingTop: 6 }}>
<label className="custom-control custom-control-sm custom-radio custom-control-inline mb-1">
<input className="custom-control-input" type="radio" name="transType" checked={this.state.transType === 0} onChange={() => this.setState({ transType: 0 })} />
<span className="custom-control-label">{$L('新纪录')}</span>
<span className="custom-control-label">{$L('新记录')}</span>
</label>
<label className="custom-control custom-control-sm custom-radio custom-control-inline mb-1">
<input className="custom-control-input J_word4" type="radio" name="transType" checked={this.state.transType === 1} onChange={() => this.setState({ transType: 1 })} />
<span className="custom-control-label">{$L('已有纪录')}</span>
<span className="custom-control-label">{$L('已有记录')}</span>
</label>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/web/assets/js/general/rb-forms.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ class RbForm extends React.Component {
}

componentDidMount() {
// 新纪录初始值
// 新记录初始值
if (this.isNew || this.props.forceInitFieldValue) {
this.props.children.map((child) => {
let iv = child.props.value
Expand Down
15 changes: 10 additions & 5 deletions src/main/resources/web/assets/js/project/task-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,19 @@ class TaskForm extends React.Component {
}

componentDidMount() {
__TaskViewer.setLoadingState(false)
this.fetch()
this.fetch(() => {
__TaskViewer.setLoadingState(false)
})
}

fetch() {
fetch(cb) {
$.get(`/project/tasks/details?task=${this.props.id}`, (res) => {
if (res.error_code === 0) this.setState({ ...res.data }, () => $(this._status).prop('checked', this.state.status === 1))
else RbHighbar.error(res.error_msg)
if (res.error_code === 0) {
this.setState({ ...res.data }, () => $(this._status).prop('checked', this.state.status === 1))
} else {
RbHighbar.error(res.error_msg)
}
typeof cb === 'function' && cb()
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/web/assets/js/trigger/trigger-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class TriggerEdit extends ConfigFormDlg {
$.get('/admin/robot/trigger/available-actions', (res) => {
let actions = res.data || []
if (!window.__BOSSKEY) {
actions = actions.filter((item) => !['PROXYTRIGGERACTION', 'AUTOGENREPORT', 'AUTOREVOKE'].includes(item[0]))
actions = actions.filter((item) => !['PROXYTRIGGERACTION', 'AUTOREVOKE'].includes(item[0]))
}

this.setState({ actions }, () => {
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/web/feeds/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<th:block th:replace="~{/_include/nav-top}" />
<th:block th:replace="~{/_include/nav-left(active='nav_entity-Feeds')}" />
<div class="rb-content">
<div class="announcement-wrapper"></div>
<div class="main-content container container-smart">
<div class="row">
<div class="col-lg-8 col-12">
Expand All @@ -36,14 +35,14 @@
</span>
</div>
<div class="input-group input-group-sm">
<input type="text" class="form-control search J_date-begin" th:placeholder="${bundle.L('发布时间') + ' (' + bundle.L('起') + ')'}" />
<input type="text" class="form-control search J_date-begin" th:placeholder="${bundle.L('发布日期') + ' (' + bundle.L('起') + ')'}" />
<span class="append">
<a><i class="icon zmdi zmdi-close"></i></a>
<i class="icon zmdi zmdi-calendar"></i>
</span>
</div>
<div class="input-group input-group-sm">
<input type="text" class="form-control search J_date-end" th:placeholder="${bundle.L('发布时间') + ' (' + bundle.L('止') + ')'}" />
<input type="text" class="form-control search J_date-end" th:placeholder="${bundle.L('发布日期') + ' (' + bundle.L('止') + ')'}" />
<span class="append">
<a><i class="icon zmdi zmdi-close"></i></a>
<i class="icon zmdi zmdi-calendar"></i>
Expand Down Expand Up @@ -94,6 +93,7 @@
</div>
</div>
</div>
<div class="announcement-wrapper"></div>
</div>
</div>
</div>
Expand Down
Loading