Merge remote-tracking branch 'origin/master'
This commit is contained in:
+13
-7
@@ -115,7 +115,8 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void editById(DummyInventoryBaseEO dummyInventoryBaseEO) {
|
public void editById(DummyInventoryBaseEO dummyInventoryBaseEO) {
|
||||||
DummyInventoryBaseEO baseEO = queryById(dummyInventoryBaseEO.getId());
|
List<String> baseIdList = Arrays.asList(dummyInventoryBaseEO.getId().split(","));
|
||||||
|
List<DummyInventoryBaseEO> baseEOList = listByIds(baseIdList);
|
||||||
List<String> createByNameList =new ArrayList<>();
|
List<String> createByNameList =new ArrayList<>();
|
||||||
if (StringUtils.isNotBlank(dummyInventoryBaseEO.getCreateBy())) {
|
if (StringUtils.isNotBlank(dummyInventoryBaseEO.getCreateBy())) {
|
||||||
createByNameList = Arrays.asList(dummyInventoryBaseEO.getCreateBy().split(","));
|
createByNameList = Arrays.asList(dummyInventoryBaseEO.getCreateBy().split(","));
|
||||||
@@ -124,14 +125,19 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
// 增加创建者校验
|
// 增加创建者校验
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
String loginUserName = sysUser.getUsername();
|
String loginUserName = sysUser.getUsername();
|
||||||
|
StringBuilder messageBuilder = new StringBuilder();
|
||||||
if (!baseEO.getCreateBy().contains(loginUserName)) {
|
for (DummyInventoryBaseEO baseEO : baseEOList) {
|
||||||
if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
|
if (!baseEO.getCreateBy().contains(loginUserName)) {
|
||||||
throw new JeroBootException("当前用户非创建者,无法编辑");
|
messageBuilder.append(baseEO.getName()).append(",");
|
||||||
} else {
|
|
||||||
throw new JeroBootException("The current user is not the creator and cannot be edited.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
String message = messageBuilder.substring(0, messageBuilder.length() - 1);
|
||||||
|
if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
|
||||||
|
throw new JeroBootException("当前用户非"+message+"的创建者,无法编辑");
|
||||||
|
} else {
|
||||||
|
throw new JeroBootException(
|
||||||
|
"The current user is not the creator of "+message+" and cannot be edited.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,13 @@
|
|||||||
this.visibleTree = false
|
this.visibleTree = false
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
|
if (this.userName.length > 1) {
|
||||||
|
this.$message.warning(this.$t('onlyOnePersonCanBeSelected'))
|
||||||
|
return
|
||||||
|
} else if (this.userName.length == 0) {
|
||||||
|
this.$message.warning(this.$t('pleaseSelectPersonFirst'))
|
||||||
|
return
|
||||||
|
}
|
||||||
let query = {
|
let query = {
|
||||||
id: this.tableKey,
|
id: this.tableKey,
|
||||||
createBy: this.userName.join(',')
|
createBy: this.userName.join(',')
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
<updateLog :url="url" ref="updateLogRef"/>
|
<updateLog :url="url" ref="updateLogRef"/>
|
||||||
<historicalVersionList ref="historicalVersionListRef"/>
|
<historicalVersionList ref="historicalVersionListRef"/>
|
||||||
<commentList ref="commentListRef"/>
|
<commentList ref="commentListRef"/>
|
||||||
|
<JLoading :loading="loading"></JLoading>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -103,6 +104,7 @@
|
|||||||
isDisplayNum: '',
|
isDisplayNum: '',
|
||||||
textTitle: '',
|
textTitle: '',
|
||||||
isTrue: true,
|
isTrue: true,
|
||||||
|
loading: false,
|
||||||
url: {
|
url: {
|
||||||
logList: '/project/projectLawsInventoryLogEO/page',
|
logList: '/project/projectLawsInventoryLogEO/page',
|
||||||
historicalVersionUrl: '',
|
historicalVersionUrl: '',
|
||||||
@@ -224,10 +226,14 @@
|
|||||||
postAction('/project/projectRelatedPersonnel/page', query).then((res) => {
|
postAction('/project/projectRelatedPersonnel/page', query).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let dataSource = res.result || []
|
let dataSource = res.result || []
|
||||||
|
console.log(dataSource)
|
||||||
dataSource.forEach(res => {
|
dataSource.forEach(res => {
|
||||||
this.engineeringInterfacePerson += res.engineeringInterfacePerson + ','
|
if (res.engineeringInterfacePerson || res.certificationEngineer || res.lawEngineer) {
|
||||||
|
this.engineeringInterfacePerson += res.engineeringInterfacePerson + ',' + res.certificationEngineer + ',' + res.lawEngineer + ','
|
||||||
|
}
|
||||||
})
|
})
|
||||||
if (this.engineeringInterfacePerson.includes(this.userInfo().id)) {
|
if (this.engineeringInterfacePerson.includes(this.userInfo().id) ||
|
||||||
|
this.$route.query.studioEngineer == this.userInfo().id) {
|
||||||
this.isTrue = true
|
this.isTrue = true
|
||||||
} else {
|
} else {
|
||||||
this.isTrue = false
|
this.isTrue = false
|
||||||
@@ -235,8 +241,10 @@
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.textColor(0)
|
this.textColor(0)
|
||||||
})
|
})
|
||||||
|
this.loading = false
|
||||||
} else {
|
} else {
|
||||||
this.textColor(0)
|
this.textColor(0)
|
||||||
|
this.loading = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -264,6 +272,7 @@
|
|||||||
.doc-detail {
|
.doc-detail {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
.Virtual-detail-header {
|
.Virtual-detail-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user