Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
wangzhijiang
2022-08-05 10:55:47 +08:00
4 changed files with 52 additions and 129 deletions
@@ -60,13 +60,12 @@
</select> </select>
<select id="queryById" resultType="com.jero.modules.project.entity.ProjectRelatedPersonnel"> <select id="queryById" resultType="com.jero.modules.project.entity.ProjectRelatedPersonnel">
SELECT SELECT *
<include refid="select_item"/>
FROM FROM
project_related_personnel AS prp project_related_personnel
<where> <where>
prp.id=#{id} id=#{id}
</where> </where>
order by prp.create_time desc order by create_time desc
</select> </select>
</mapper> </mapper>
@@ -34,14 +34,7 @@ import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.openxml4j.exceptions.InvalidFormatException; import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.*;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.VerticalAlignment;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.apache.poi.ss.util.CellRangeAddress; import org.apache.poi.ss.util.CellRangeAddress;
import org.apache.shiro.SecurityUtils; import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@@ -475,8 +468,9 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
if (id.contains(",")) {//多个id if (id.contains(",")) {//多个id
List<String> idList = Arrays.asList(id.split(",")); List<String> idList = Arrays.asList(id.split(","));
QueryWrapper<ProjectRelatedPersonnel> queryWrapper = new QueryWrapper<>(); QueryWrapper<ProjectRelatedPersonnel> queryWrapper = new QueryWrapper<>();
queryWrapper.in("id",idList); queryWrapper.lambda().in(ProjectRelatedPersonnel::getId, idList);
records = list(queryWrapper); records = list(queryWrapper);
disposeData(records);
} else {//1个id } else {//1个id
records = queryById(id); records = queryById(id);
@@ -486,8 +480,12 @@ public class ProjectRelatedPersonnelServiceImpl extends ServiceImpl<ProjectRelat
} }
//id无值,传全部 //id无值,传全部
disposeDutyTerritory(records,cut); disposeDutyTerritory(records,cut);
records = records.stream()
.sorted(Comparator.comparing(ProjectRelatedPersonnel::getDutyTerritory))
.collect(Collectors.toList());
return records; return records;
} }
public void disposeDutyTerritory(List<ProjectRelatedPersonnel> records,String cut) { public void disposeDutyTerritory(List<ProjectRelatedPersonnel> records,String cut) {
//查标签内容里的责任领域数据 //查标签内容里的责任领域数据
List<SysDictItem> sysDictItemValueList = sysDictItemMapper.selectItemsByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue()); List<SysDictItem> sysDictItemValueList = sysDictItemMapper.selectItemsByDictCode(DictCodeEnum.DUTY_TERRITORY.getValue());
@@ -2,7 +2,7 @@
<div class='diolag-area'> <div class='diolag-area'>
<a-spin :spinning='spinLoading'> <a-spin :spinning='spinLoading'>
<a-form-model <a-form-model
class='formAdd' class='tag-module'
ref='ruleForm' ref='ruleForm'
:model='form' :model='form'
:rules='rules' :rules='rules'
@@ -10,35 +10,30 @@
:wrapper-col='wrapperCol' :wrapper-col='wrapperCol'
> >
<a-row :gutter='24'> <a-row :gutter='24'>
<a-col :span="12"> <a-col :span="24">
<div class="box-title-text"> <a-form-model-item ref='region' :label="$t('areaOfResponsibility')" prop='dutyTerritory'>
<div class="title-text"> <j-dict-select-tag class="box-input" v-model="form.dutyTerritory"
<span class="Required">*</span> @input="handleInput('dutyTerritory')"
<span class="title-text-text" :title="$t('areaOfResponsibility')"> :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
{{$t('areaOfResponsibility')}}</span> :type="'select'"
</div> :triggerChange="false" :dictCode="'duty_territory'"/>
<a-form-model-item class="itemModel" prop="dutyTerritory"> </a-form-model-item>
<j-dict-select-tag class="box-input" v-model="form.dutyTerritory"
style='width: 200px'
@input="handleInput('queryzr')"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
<!-- <a-col :span='24'>-->
<!-- <span style='display: flex;justify-content: center;margin-bottom: 20px;'> <span style='margin-top: 6px;margin-right: 7px'>{{$t('cutoffTime')}}</span>-->
<!-- <a-date-picker :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="onChange" @ok="onOk" />-->
<!-- </span>-->
<!-- </a-col>-->
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
<div class="imports-footer">
<div class="imports-footer-wrap">
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmit">{{$t('submit')}}
</a-button>
<a-button class="imports-btn" type="primary" @click="handleCancel">{{$t('cancel')}}</a-button>
</div>
</div>
</a-spin> </a-spin>
<div class='drawer-bootom-button'> <!-- <div class='drawer-bootom-button'>-->
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-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> <!-- <a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>-->
</div> <!-- </div>-->
<!-- 错误数据提示--> <!-- 错误数据提示-->
<a-modal <a-modal
:title="$t('operationFailed')" :title="$t('operationFailed')"
@@ -125,7 +120,6 @@ export default {
} }
}, },
mounted() { mounted() {
this.loadData()
this.bodystyle = { this.bodystyle = {
height: '480px', height: '480px',
overflow: 'hidden', overflow: 'hidden',
@@ -133,55 +127,17 @@ export default {
} }
}, },
methods: { methods: {
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
}
getAction(`sys/user/page`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result.records]
this.total = res.result.total
}
}).finally(() => {
this.loading = false
})
},
handleInput(value) { handleInput(value) {
this.$nextTick(() => { this.$nextTick(() => {
this.form = { ...this.form } this.form = { ...this.form }
this.$refs.ruleFormOne.validateField([value]) this.$refs.ruleForm.validateField([value])
}) })
}, },
searchQuery() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() { handleCancel() {
this.$emit('areaVisibleTaskCutOffTimeflag', false) this.$emit('AdjustareasofresponAll', false)
},
handleTableChange(val) {
}, },
//保存 //保存
handleSubmit() { handleSubmit() {
// let _this = this
// let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
// this.confirmLoading = true
// postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
// if (res.success) {
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
// this.$message.success(_this.$t('OperationSuccessful'))
// this.confirmLoading = false
// } else {
// this.$message.warning(_this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if(valid){ if(valid){
let long = localStorage.getItem('language') let long = localStorage.getItem('language')
@@ -205,62 +161,32 @@ export default {
} }
this.textLoading = true this.textLoading = true
axios({ postAction('/params/collectManifest/updateBatchDutyTerritory', param).then((res) => {
url: '/jero-boot/params/collectManifest/issueCollection', if (res.success) {
method: 'post', if(res.result.length == 0){
data: param, this.visibleoperationFailed = false
transformRequest: [function(data) { this.textLoading = false
let ret = '' this.$message.success(this.$t('OperationSuccessful'))
for (let it in data) { this.$emit('AdjustareasofresponAll', false)
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&' this.$emit('GetgetTableList')
}else{
this.NotSelectedRowKeysValue = res.result
this.visibleoperationFailed = true
this.textLoading = false
} }
return ret } else {
}], this.$message.warning(this.$t('operationFailed'))
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': _this.token
} }
}) })
.then((res) => {
if (res.data.success) {
// _this.$message.success(this.$t('OperationSuccessful'))
if(res.data.result.length == 0){
this.visibleoperationFailed = false
this.textLoading = false
_this.$message.success(this.$t('OperationSuccessful'))
this.$emit('areaVisibleTaskCutOffTimeflag', false)
this.$emit('GetgetTableList')
}else{
this.NotSelectedRowKeysValue = res.data.result
this.visibleoperationFailed = true
this.textLoading = false
}
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
// this.$emit('GetgetTableList')
} else {
_this.$message.warning(this.$t('operationFailed'))
}
})
.catch((error) => {
this.textLoading = false
})
} }
}) })
}, },
// 错误数据的弹框 // 错误数据的弹框
cancleoperationFailed() { cancleoperationFailed() {
this.visibleoperationFailed = false this.visibleoperationFailed = false
this.$emit('areaVisibleTaskCutOffTimeflag', false) this.$emit('AdjustareasofresponAll', false)
this.$emit('GetgetTableList') this.$emit('GetgetTableList')
// this.GetgetTableList()
},
onChange(val) {
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
},
onOk(val) {
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
}, },
} }
} }
@@ -300,10 +300,10 @@
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/> @areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
</a-modal> </a-modal>
<!-- 调整责任领域--> <!-- 调整责任领域-->
<a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='400px' :footer="null"> <a-modal v-model="Adjustareasofrespon" :title="$t('Adjustareasofresponsibility')" width='620px' :footer="null">
<adjustarea-sofrespon v-if='Adjustareasofrespon' :selectedRowKeysArray='selectedRowKeysArray' <adjustarea-sofrespon v-if='Adjustareasofrespon' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList' @GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='AdjustareasofresponAll'/> @AdjustareasofresponAll='AdjustareasofresponAll'/>
</a-modal> </a-modal>
<!-- 引用参数---> <!-- 引用参数--->
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null"> <a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">