diff --git a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/system/query/QueryRuleEnum.java b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/system/query/QueryRuleEnum.java index bd8391377..c94510aeb 100644 --- a/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/system/query/QueryRuleEnum.java +++ b/jero-boot/jero-boot-base/jero-boot-base-core/src/main/java/com/jero/common/system/query/QueryRuleEnum.java @@ -24,8 +24,8 @@ public enum QueryRuleEnum { SQL_RULES("USE_SQL_RULES","ext","自定义SQL片段"); private String value; - - private String condition; + + private String condition; private String msg; @@ -70,4 +70,16 @@ public enum QueryRuleEnum { } return null; } + + public static QueryRuleEnum getByCondition(String condition){ + if(oConvertUtils.isEmpty(condition)) { + return null; + } + for(QueryRuleEnum val :values()){ + if (val.getCondition().equals(condition)){ + return val; + } + } + return null; + } } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java index 601c15d16..831ba4f35 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/controller/ParamsCollectManifestEOController.java @@ -1,5 +1,6 @@ package com.jero.modules.cert.collect.controller; +import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -70,13 +71,14 @@ public class ParamsCollectManifestEOController extends JeroController queryList(ParamsCollectManifestVO paramsCollectManifestVO, - @RequestParam(name="pageNo", defaultValue="1") Integer pageNo, - @RequestParam(name="pageSize", defaultValue="100") Integer pageSize, - @RequestParam(name = "cut") String cut, - HttpServletRequest req) { + public Result queryList(@RequestBody JSONObject json) { + String cut = json.getString("cut"); + Integer pageNo = json.getInteger("pageNo"); + Integer pageSize = json.getInteger("pageSize"); + ParamsCollectManifestVO paramsCollectManifestVO = JSONObject.parseObject(JSONObject.toJSONString(json),ParamsCollectManifestVO.class); + // if (StringUtils.isNotEmpty(paramsCollectManifestEO.getNioNumber())) { // paramsCollectManifestEO.setNioNumber(paramsCollectManifestEO.getNioNumber().replace("%","\\%")); // } @@ -88,7 +90,7 @@ public class ParamsCollectManifestEOController extends JeroController queryByParamManifestId(@Param("paramsManifestId") String paramsManifestIdString); - IPage selectpage(@Param("page") IPage page, @Param("ew") Wrapper queryWrapper, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO); + IPage selectpage(@Param("page") IPage page, @Param("sqlJoin") String sqlJoin, @Param("paramsManifestEO")ParamsManifestEO paramsManifestEO); List queryByProjectId(@Param("projectId") String projectId); } diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml index c41200b25..a64c16f48 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/collect/mapper/xml/ParamsCollectManifestEOMapper.xml @@ -134,7 +134,7 @@ from params_collect_manifest pcm where pcm.params_manifest_id = #{paramsManifestEO.id} ) temp - ${ew.customSqlSegment} + ${sqlJoin} - \ No newline at end of file + diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java index a90866929..d47626efc 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/controller/ParamsInfoEOController.java @@ -10,13 +10,16 @@ import com.jero.common.api.vo.Result; import com.jero.common.aspect.annotation.AutoLog; import com.jero.common.constant.enums.CutEnum; import com.jero.common.system.base.controller.JeroController; +import com.jero.modules.cert.template.entity.CertCategoryParamsInfoEO; import com.jero.modules.cert.template.entity.ParamsInfoEO; +import com.jero.modules.cert.template.service.ICertCategoryParamsInfoEOService; import com.jero.modules.cert.template.service.IParamsInfoEOService; import com.jero.modules.cert.template.service.IParamsInfoPublishEOService; import com.jero.modules.cert.template.vo.ParamsInfoVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; @@ -29,6 +32,7 @@ import javax.servlet.http.HttpServletResponse; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** @@ -47,7 +51,10 @@ public class ParamsInfoEOController extends JeroController queryWrapper = new QueryWrapper<>(); String finalAllNumber = allNumber; - queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId()) - .and(StringUtils.isNotEmpty(allNumber), wrapper->wrapper.eq("pi.nio_number", finalAllNumber).or().eq("ccpi.params_number", finalAllNumber)) - .like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName()) + queryWrapper.eq("pi.params_template_id", paramsInfoEO.getParamsTemplateId()); + if(StringUtils.isNotEmpty(allNumber)){ + queryWrapper.and(wrapper->wrapper.eq("pi.nio_number", finalAllNumber)); + + QueryWrapper categoryParamsQueryWrap = new QueryWrapper<>(); + categoryParamsQueryWrap.lambda().eq(CertCategoryParamsInfoEO::getParamsNumber,finalAllNumber); + List certCategoryParamsInfoEOList = this.certCategoryParamsInfoEOService.list(categoryParamsQueryWrap); + + if(CollectionUtils.isNotEmpty(certCategoryParamsInfoEOList)){ + List nioNumberList = certCategoryParamsInfoEOList.stream().map(CertCategoryParamsInfoEO::getNioNumber).collect(Collectors.toList()); + if(CollectionUtils.isNotEmpty(nioNumberList)){ + queryWrapper.or(wrap -> { + wrap.in("pi.nio_number",nioNumberList); + }); + } + } + } + queryWrapper.like(StringUtils.isNotEmpty(paramsInfoEO.getParamsName()), "pi.params_name", paramsInfoEO.getParamsName()) .eq(StringUtils.isNotEmpty(paramsInfoEO.getDutyTerritory()), "pi.duty_territory", paramsInfoEO.getDutyTerritory()) .orderBy(true, "asc".equals(orderBy)?true:false, "pi.nio_number"); Page page = new Page(pageNo, pageSize); diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml index 55da74b69..fd915712e 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/template/mapper/xml/ParamsInfoEOMapper.xml @@ -180,7 +180,6 @@ - \ No newline at end of file + diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index b57ccfc50..25ca4a443 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1376,4 +1376,6 @@ module.exports = { Updateparametercolumn:'Update The Parameter Column', columnfirst:'Reference the parameter column first', columnforced:'Confirm a forced retraction?', + customize:'Customize the header', + customColumn:'Custom column', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 3f62cbed7..ecda6ea34 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1477,4 +1477,6 @@ module.exports = { brand:'品牌', allsubitemsitem:'该项目下拥有子项目,是否全部删除', contactTheFounder:'联系创建人', + customize:'自定义表头', + customColumn:'自定义列', } \ No newline at end of file diff --git a/jero-web/src/components/tableCollection/index.vue b/jero-web/src/components/tableCollection/index.vue index 18c5465eb..8dafa8e93 100644 --- a/jero-web/src/components/tableCollection/index.vue +++ b/jero-web/src/components/tableCollection/index.vue @@ -853,20 +853,23 @@ // userTypes: this.currentPersonRole } let url + let action this.loading = true this.$emit('listReset', '') // todo if (this.$route.query.it === undefined) { // 页面跳转 url = this.url.tableList + action = postAction params.paramsManifestId = this.$route.query.id params.userTypes = this.currentPersonRole } else { // 历史版本 + action = getAction url = 'params/collectManifestHistory/list' params.paramsManifestId = this.$route.query.it } - getAction(url, params).then((res) => { + action(url, params).then((res) => { if (res.success) { let tt = [] if (this.currentPersonRole !== 'dre') { @@ -915,12 +918,15 @@ getTableList(currentPersonRole) { let paramsManifestid let url + let action if (this.$route.query.it === undefined) { // 页面跳转 paramsManifestid = this.$route.query.id url = this.url.tableList + action = postAction } else { // 历史版本 + action = getAction paramsManifestid = this.$route.query.it url = 'params/collectManifestHistory/list' } @@ -934,7 +940,7 @@ ...this.queryParamQuery } this.loading = true - getAction(url, params).then((res) => { + action(url, params).then((res) => { if (res.success) { // console.log(res.result,'res.result') // let tt = [] diff --git a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue index bcb6359d8..5e60fffb1 100644 --- a/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue +++ b/jero-web/src/views/businessSupport/collectionOfRegulatoryOpinions/index.vue @@ -213,7 +213,7 @@ }, { title: this.$t('brand'), - align: 'center', + align: 'left', ellipsis: true, width: 140, dataIndex: 'brand_text' diff --git a/jero-web/src/views/businessSupport/technologyAssessment/index.vue b/jero-web/src/views/businessSupport/technologyAssessment/index.vue index ff076ae87..277567333 100644 --- a/jero-web/src/views/businessSupport/technologyAssessment/index.vue +++ b/jero-web/src/views/businessSupport/technologyAssessment/index.vue @@ -282,7 +282,7 @@ }, { title: this.$t('brand'), - align: 'center', + align: 'left', ellipsis: true, width: 140, dataIndex: 'brand_text' diff --git a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue index 2c2aa64cd..dcdcd4fbf 100644 --- a/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue +++ b/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue @@ -667,7 +667,7 @@ }, { type: 'string', - value: 'paramsBatch', + value: 'params_batch', text: this.$t('parameterBatch'), dictCode: 'params_batch' }, @@ -1038,9 +1038,14 @@ this.$refs.globalAdvancedQueryRef.superQueryFlag = false } else { this.$refs.globalAdvancedQueryRef.superQueryFlag = true - sqp['superQueryParams'] = encodeURI(JSON.stringify(params)) + // sqp['superQueryParams'] = encodeURI(JSON.stringify(params)) + params.forEach((item) => { + item.type = matchType + }) + sqp['queryConditionVOListStr'] = JSON.stringify(params) sqp['superQueryMatchType'] = matchType } + console.log(sqp) this.queryParamQuery = sqp this.$refs.CollectionTabel.pageNo = 1 // this.$refs.CollectionTabel.getTableList(this.queryParamQuery) diff --git a/jero-web/src/views/projectManagement/components/customizeList.vue b/jero-web/src/views/projectManagement/components/customizeList.vue new file mode 100644 index 000000000..0624fa28e --- /dev/null +++ b/jero-web/src/views/projectManagement/components/customizeList.vue @@ -0,0 +1,275 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 04be80b4c..4134cfba6 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -161,6 +161,10 @@ ...{{ $t('more') }} +
+ + {{ $t('customize') }} +
{{ $t('bringInRelevantPersonnel') }} @@ -311,6 +315,7 @@ + 0) { diff --git a/jero-web/src/views/projectManagement/projectLibrary/index.vue b/jero-web/src/views/projectManagement/projectLibrary/index.vue index fea8392cd..2d27a619d 100644 --- a/jero-web/src/views/projectManagement/projectLibrary/index.vue +++ b/jero-web/src/views/projectManagement/projectLibrary/index.vue @@ -243,7 +243,7 @@ }, { title: this.$t('brand'), - align: 'center', + align: 'left', width: 180, ellipsis: true, dataIndex: 'brandText' diff --git a/jero-web/src/views/system/modules/RoleAssignment.vue b/jero-web/src/views/system/modules/RoleAssignment.vue index 6612e56a3..64091e859 100644 --- a/jero-web/src/views/system/modules/RoleAssignment.vue +++ b/jero-web/src/views/system/modules/RoleAssignment.vue @@ -25,17 +25,24 @@ - - - - - - - - + + + + + + + {{$t('selectAll')}} + + + {{ item.title }} + + @@ -75,6 +82,8 @@ export default { title: this.$t('add'), total: 0, selectedRowKeysDate: {}, + dutylist: [], + jobsStr:'', loading: false, editId: '', newVisible: false, @@ -113,8 +122,50 @@ export default { mounted() { this.loadData() this.initDictData() + this.getdutylist() }, methods: { + getdutylist(){ + getAction('/sys/dict/getDictItems/duty_territory', {}).then((res) => { + if (res.success) { + this.dutylist = res.result + } else { + this.dutylist = [] + } + }) + }, + onChange(val) { + // val 拿到的是数组格式的数据,比如:['测试1','测试3'] + const res = this.dutyTerritories.join(',') + this.jobsStr = res + this.dutyTerritories = this.checkAll(val, this.dutylist) + }, + checkAll(arr, modelList) { + // arr是onChange中的val数组 modelList是下拉框List + let length = arr.length + let list = arr + // 遍历已经选中的选项 + arr.forEach(element => { + // 当数组中存在0,说明此时进行全选/取消全选 + if (element === '0') { + // 当数组长度为最大长度且最后一个元素为0时,说明此时在全选的基础上又点击全选,则取消全选 + if (length - 1 === modelList.length && arr[length - 1] === '0') { + list = [] + // 取消全选时,jobsStr需要重置为空,否则全选的数据还会展示在下拉输入框中 + this.jobsStr = '' + } else { + // 当不是取消全选操作,只要数组中出现了0则说明进行了全选操作 + list = [] + for (let i in modelList) { + list.push(modelList[i].title) + // 全选时,也需要给jobsStr 赋值,拿到所有的下拉选项,并进行数据格式转换 + this.jobsStr = list.join(',') + } + } + } + }) + return list + }, initDictData() { //优先从缓存中读取字典配置 if (getDictItemsFromCache(this.dictCode)) { diff --git a/jero-web/src/views/system/modules/UserModal.vue b/jero-web/src/views/system/modules/UserModal.vue index 2be2d4173..ed5f18123 100644 --- a/jero-web/src/views/system/modules/UserModal.vue +++ b/jero-web/src/views/system/modules/UserModal.vue @@ -76,10 +76,24 @@ - + + + + + + + {{$t('selectAll')}} + + + {{ item.title }} + + @@ -240,8 +254,10 @@ confirmDirty: false, viewshow: false, viewshowbrand: false, + jobsStr:'', selectedDepartKeys: [], //保存用户选择部门id brandsList: [], //保存用户选择部门id + dutylist: [], //保存用户选择部门id checkedDepartKeys: [], checkedDepartNames: [], // 保存部门的名称 =>title checkedDepartNameString: '', // 保存部门的名称 =>title @@ -380,6 +396,15 @@ } }) }, + getdutylist(){ + getAction('/sys/dict/getDictItems/duty_territory', {}).then((res) => { + if (res.success) { + this.dutylist = res.result + } else { + this.dutylist = [] + } + }) + }, loadUserRoles(userid) { queryUserRole({ userid: userid }).then((res) => { if (res.success) { @@ -494,12 +519,45 @@ this.refresh() this.edit({ activitiSync: '1' }) }, + onChange(val) { + // val 拿到的是数组格式的数据,比如:['测试1','测试3'] + const res = this.dutyTerritories.join(',') + this.jobsStr = res + this.dutyTerritories = this.checkAll(val, this.dutylist) + }, + checkAll(arr, modelList) { + // arr是onChange中的val数组 modelList是下拉框List + let length = arr.length + let list = arr + // 遍历已经选中的选项 + arr.forEach(element => { + // 当数组中存在0,说明此时进行全选/取消全选 + if (element === '0') { + // 当数组长度为最大长度且最后一个元素为0时,说明此时在全选的基础上又点击全选,则取消全选 + if (length - 1 === modelList.length && arr[length - 1] === '0') { + list = [] + // 取消全选时,jobsStr需要重置为空,否则全选的数据还会展示在下拉输入框中 + this.jobsStr = '' + } else { + // 当不是取消全选操作,只要数组中出现了0则说明进行了全选操作 + list = [] + for (let i in modelList) { + list.push(modelList[i].title) + // 全选时,也需要给jobsStr 赋值,拿到所有的下拉选项,并进行数据格式转换 + this.jobsStr = list.join(',') + } + } + } + }) + return list + }, edit(record) { this.resetScreenSize() // 调用此方法,根据屏幕宽度自适应调整抽屉的宽度 let that = this this.disabled = false that.initialRoleList() that.barndslist() + that.getdutylist() if (record.activitiSync) { this.disabled = true }