Merge remote-tracking branch 'origin/master'

This commit is contained in:
liyawei
2022-04-29 17:26:46 +08:00
10 changed files with 83 additions and 13 deletions
@@ -67,8 +67,8 @@ public class ProjectCommentEOController extends JeroController<ProjectCommentEO,
@AutoLog(value = "法规清单评论表-列表查询")
@ApiOperation(value="法规清单评论表-列表查询", notes="法规清单评论表-列表查询")
@GetMapping(value = "/list")
public Result<List<ProjectCommentVO>> queryList() {
List<ProjectCommentVO> list = projectCommentEOService.getInfoList();
public Result<List<ProjectCommentVO>> queryList(ProjectCommentEO projectCommentEO) {
List<ProjectCommentVO> list = projectCommentEOService.getInfoList(projectCommentEO);
return Result.OK(list);
}
@@ -80,7 +80,7 @@ public class ProjectReplyEOController extends JeroController<ProjectReplyEO, IPr
@AutoLog(value = "法规清单回复表-添加")
@ApiOperation(value="法规清单回复表-添加", notes="法规清单回复表-添加")
@PostMapping(value = "/add")
public Result<?> add(ProjectReplyEO projectReplyEO) {
public Result<?> add(@RequestBody ProjectReplyEO projectReplyEO) {
projectReplyEOService.add(projectReplyEO);
return Result.OK("添加成功!");
}
@@ -62,5 +62,5 @@ public interface IProjectCommentEOService extends IService<ProjectCommentEO> {
List<ProjectCommentEO> queryList();
List<ProjectCommentVO> getInfoList();
List<ProjectCommentVO> getInfoList(ProjectCommentEO projectCommentEO);
}
@@ -101,11 +101,11 @@ public class ProjectCommentEOServiceImpl extends ServiceImpl<ProjectCommentEOMap
}
@Override
public List<ProjectCommentVO> getInfoList() {
public List<ProjectCommentVO> getInfoList(ProjectCommentEO projectCommentEOTemp) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//评论的内容
LambdaQueryWrapper<ProjectCommentEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectCommentEO::getCreateBy,sysUser.getUsername());
wrapper.in(ProjectCommentEO::getCreateBy,sysUser.getUsername()).in(ProjectCommentEO::getProjectLibraryId,projectCommentEOTemp.getProjectLibraryId());
List<ProjectCommentEO> projectCommentEOS = this.list(wrapper);
List<String> projectCommentIdList = projectCommentEOS.stream().map(ProjectCommentEO::getId).collect(Collectors.toList());
+2
View File
@@ -706,6 +706,8 @@ module.exports = {
uploadTime: 'Upload time',
enclosure: 'enclosure',
// 认证
pleaseSelectData: 'please Select Data',
templateCopy: 'template Copy',
NiOnumberalreadyexists: 'NiO number already exists, please replace NiO number',
attachmentTemplate: 'attachment Template',
controlAlternatives: 'control Alternatives',
+2
View File
@@ -712,6 +712,8 @@ module.exports = {
uploadTime:'上传时间',
enclosure:'附件',
// 认证
pleaseSelectData: '请选择数据',
templateCopy: '模板复制',
NiOnumberalreadyexists: 'NIO编号已存在,请更换NIO编号',
attachmentTemplate: '附件模板',
controlAlternatives: '控件备选值',
@@ -40,6 +40,10 @@
dummyInventoryBaseId: {
type: String,
default: ''
},
paramsTemplateId: {
type: String,
default: ''
}
},
data() {
@@ -54,6 +58,8 @@
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&projectId=' + this.projectId
} else if (this.dummyInventoryBaseId) {
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&dummyInventoryBaseId=' + this.dummyInventoryBaseId
} else if (this.paramsTemplateId) {
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut + '&paramsTemplateId=' + this.paramsTemplateId
}
return window._CONFIG['domianURL'] + '/' + this.url.importZipUrl + '?cut=' + this.cut
}
@@ -88,6 +88,25 @@
/>
</div>
<addModel :url="url" ref="addModelRef" @addModelList="addModelList"/>
<a-modal class="show-copy" v-model="areaVisible" :title="$t('templateCopy')" :footer="null" @cancel="hideModal">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<span class="title-text-text"
:title="$t('parameterTemplate')">{{$t('parameterTemplate')}}</span>
<a-input class="box-input"
v-model="paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"/>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<div class="drawer-bootom-button">
<a-button style="margin-right: .8rem" @click="handleCancel">{{$t('cancel')}}</a-button>
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
</div>
</a-modal>
</a-card>
</template>
@@ -120,7 +139,8 @@ export default {
add: 'params/template/add',
edit: 'params/template/edit',
deleteBatch: 'params/template/delete',
deleteAll: 'params/template/deleteBatch'
deleteAll: 'params/template/deleteBatch',
copy: 'params/template/copyById'
},
total: 0,
pageSize: 10,
@@ -169,13 +189,29 @@ export default {
scopedSlots: { customRender: 'operation' }
}
],
queryParam: {}
queryParam: {},
areaVisible:false,
paramsTemplateName: '',
}
},
mounted() {
this.getList()
},
methods: {
handleCancel() {
this.areaVisible=false
},
handleSubmit() {
getAction(this.url.copy + `?id=${this.selectedRowKeys[0]}&paramsTemplateName=${this.paramsTemplateName}`, {}).then((res) => {
if (res.success) {
this.areaVisible=false
this.$message.success(res.message)
this.getList()
} else {
this.$message.warning(res.message)
}
})
},
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
@@ -189,7 +225,16 @@ export default {
},
// 复制
handlecody(){
if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else if(this.selectedRowKeys.length == 0){
this.$message.warning(this.$t('pleaseSelectData'))
} else {
this.areaVisible=true
}
},
hideModal(){
this.visible = false;
},
//批量删除
handleDel() {
@@ -53,7 +53,7 @@
{{$t('templateDownload')}}
</div>
<div class="operator-text" v-has="'document:importZip'">
<ImportFile :url="url" :isTrue="false" :accept="'.zip'"/>
<ImportFile :url="url" :isTrue="false" :accept="'.zip'" :paramsTemplateId='this.$route.query.id'/>
</div>
<div @click="handleDel" class="operator-text" v-has="'document:deleteBatch'">
<a-icon type="delete"/>
@@ -49,6 +49,7 @@
</div>
</div>
<div class="comment-box-text" v-else>{{$t('noComment')}}</div>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
</a-drawer>
<a-modal
:title="title"
@@ -64,6 +65,7 @@
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="title">{{title}}</span>
</div>
<a-form-model-item v-if="title == $t('replyToComments')" class="itemModel" :prop="'replyContent'">
@@ -97,6 +99,7 @@
visible: false,
dataList: [],
formInline: {},
loading: false,
title: this.$t('comment'),
confirmLoading: false,
visibleComment: false,
@@ -137,12 +140,18 @@
this.title = this.$t('publishComment')
this.formInline = {}
this.visibleComment = true
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
},
getList() {
getAction(this.url.list, {}).then((res) => {
this.loading = true
getAction(this.url.list, { projectLibraryId: this.$route.query.id }).then((res) => {
if (res.success) {
this.loading = false
this.dataList = res.result || []
} else {
this.loading = false
this.dataList = []
}
})
@@ -165,17 +174,20 @@
projectCommentId: this.formInline.projectCommentId
}
}
this.confirmLoading = true
postAction(url, query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visibleComment = false
this.confirmLoading = false
this.getList()
} else {
this.confirmLoading = false
this.$message.success(this.$t('operationFailed'))
}
})
}
})
this.visibleComment = false
},
handleCancelComment() {
this.visibleComment = false
@@ -185,6 +197,9 @@
this.formInline.projectCommentId = row.id
this.title = this.$t('replyToComments')
this.visibleComment = true
this.$nextTick(() => {
this.$refs.ruleForm.clearValidate()
})
}
}
}
@@ -308,7 +323,7 @@
}
.title-text {
width: 64px;
width: 74px;
text-align: right;
display: inline-block;
font-weight: 500;