Merge remote-tracking branch 'origin/master'

This commit is contained in:
liyawei
2022-05-20 10:56:01 +08:00
11 changed files with 365 additions and 141 deletions
@@ -16,9 +16,11 @@ import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
import com.jero.modules.project.mapper.ProjectTaskInventoryEOMapper;
import com.jero.modules.project.service.IConditionAssessmentEOService;
import com.jero.modules.project.service.IProjectLibraryBaseService;
import com.jero.modules.system.entity.SysDictItem;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.mapper.SysDictItemMapper;
import com.jero.modules.system.mapper.SysUserMapper;
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
import com.jero.modules.system.util.StringUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.poi.hssf.usermodel.HSSFSheet;
@@ -68,6 +70,9 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
@Autowired
private IConditionAssessmentEOService conditionAssessmentEOService;
@Autowired
private SysDictItemServiceImpl sysDictItemServiceImpl;
/**
* 保存
*
@@ -321,7 +326,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
if(org.apache.commons.lang3.StringUtils.isEmpty(projectLibraryId)){
throw new JeroBootException("项目库id不能为空!");
}
String cut = (String) params.get("cut");
Map<String,Object> result = new HashMap<>();
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryEOQueryWrapper = new QueryWrapper<>();
@@ -334,30 +339,35 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
if(StringUtils.equals(OperatorTypeEnum.QUERY_CURRENT_PROJECT_STATUS_STATISTICS.getValue(),operatorType)){
params.put("projectLawsInventoryIdList",projectLawsInventoryIdList);
List<Map<String, Object>> conditionAssessmentMapList = this.conditionAssessmentEOService.getProjectStatusAssessStatisticsGroupByTerritory(params);
result.put("conditionAssessmentMapList",conditionAssessmentMapList);
disposeData(conditionAssessmentMapList,cut);
result.put("dataList",conditionAssessmentMapList);
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_LISTING_TO_CONFIRM_STATISTICS.getValue(),operatorType)){
//清单确认 状态
String inventoryAffirmStatus = (String) params.get("inventoryAffirmStatus");
List<Map<String,Object>> listingToConfirmList = this.projectLawsInventoryEOMapper.getListingToConfirmStatisticsGroupByTerritory(projectLibraryId,inventoryAffirmStatus);
result.put("listingToConfirmList",listingToConfirmList);
disposeData(listingToConfirmList,cut);
result.put("dataList",listingToConfirmList);
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_TASK_TO_CONFIRM_STATISTICS.getValue(),operatorType)){
//任务确认 状态
String taskAffirmStatus = (String) params.get("taskAffirmStatus");
List<Map<String,Object>> taskToConfirmList = this.projectLawsInventoryEOMapper.getTaskToConfirmStatisticsGroupByTerritory(projectLibraryId,taskAffirmStatus);
result.put("taskToConfirmList",taskToConfirmList);
disposeData(taskToConfirmList,cut);
result.put("dataList",taskToConfirmList);
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_DESIGN_STATISTICS.getValue(),operatorType)){
//设计符合性 流程任务状态
String designFlowTaskStatus = (String) params.get("designFlowTaskStatus");
if(CollectionUtils.isNotEmpty(projectLawsInventoryIdList)){
List<Map<String,Object>> designComplianceList = this.projectTaskInventoryEOMapper.getDesignComplianceStatisticeGroupByTerritory(projectLawsInventoryIdList,designFlowTaskStatus);
result.put("designComplianceList",designComplianceList);
disposeData(designComplianceList,cut);
result.put("dataList",designComplianceList);
}
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_PREHOMO_STATISTICS.getValue(),operatorType)){
//prehomo确认 流程任务状态
String prehomoFlowTaskStatus = (String) params.get("prehomoFlowTaskStatus");
if(CollectionUtils.isNotEmpty(projectLawsInventoryIdList)){
List<Map<String,Object>> prehomoList = this.projectTaskInventoryEOMapper.getPrehomoStatisticeGroupByTerritory(projectLawsInventoryIdList,prehomoFlowTaskStatus);
result.put("prehomoList",prehomoList);
disposeData(prehomoList,cut);
result.put("dataList",prehomoList);
}
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_VERIFY_STATISTICS.getValue(),operatorType)){
//验证符合性 流程任务状态
@@ -365,7 +375,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
if(CollectionUtils.isNotEmpty(projectLawsInventoryIdList)){
List<Map<String,Object>> verifyComplianceList = this.projectTaskInventoryEOMapper.getVerifyComplianceStatisticeGroupByTerritory(projectLawsInventoryIdList,verifyFlowTaskStatus);
result.put("verifyComplianceList",verifyComplianceList);
disposeData(verifyComplianceList,cut);
result.put("dataList",verifyComplianceList);
}
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_CERTIFICATION_PROGRESS_STATISTICS.getValue(),operatorType)){
//认证进度 流程任务状态
@@ -373,7 +384,8 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
if(CollectionUtils.isNotEmpty(projectLawsInventoryIdList)){
List<Map<String,Object>> certificationProgressList = this.projectTaskInventoryEOMapper.getCertificationProgressStatisticsGroupByTerritory(projectLawsInventoryIdList,certificationProgress);
result.put("certificationProgressList",certificationProgressList);
disposeData(certificationProgressList,cut);
result.put("dataList",certificationProgressList);
}
}
return result;
@@ -458,23 +470,7 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
public void createSheetData(HSSFSheet sheet,Map<String, Object> projectDetailsStatisticsGroupByTerritory, Map<String, Object> params){
List<Map<String,Object>> exportData = new ArrayList<>();
String operatorType = (String) params.get("operatorType");
if(StringUtils.equals(OperatorTypeEnum.QUERY_CURRENT_PROJECT_STATUS_STATISTICS.getValue(),operatorType)){
exportData = (List<Map<String, Object>>) projectDetailsStatisticsGroupByTerritory.get("conditionAssessmentMapList");
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_LISTING_TO_CONFIRM_STATISTICS.getValue(),operatorType)){
exportData = (List<Map<String, Object>>) projectDetailsStatisticsGroupByTerritory.get("listingToConfirmList");
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_TASK_TO_CONFIRM_STATISTICS.getValue(),operatorType)){
exportData = (List<Map<String, Object>>) projectDetailsStatisticsGroupByTerritory.get("taskToConfirmList");
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_DESIGN_STATISTICS.getValue(),operatorType)){
exportData = (List<Map<String, Object>>) projectDetailsStatisticsGroupByTerritory.get("designComplianceList");
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_PREHOMO_STATISTICS.getValue(),operatorType)){
exportData = (List<Map<String, Object>>) projectDetailsStatisticsGroupByTerritory.get("prehomoList");
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_VERIFY_STATISTICS.getValue(),operatorType)){
exportData = (List<Map<String, Object>>) projectDetailsStatisticsGroupByTerritory.get("verifyComplianceList");
}else if(StringUtils.equals(OperatorTypeEnum.QUERY_CERTIFICATION_PROGRESS_STATISTICS.getValue(),operatorType)){
exportData = (List<Map<String, Object>>) projectDetailsStatisticsGroupByTerritory.get("certificationProgressList");
}
exportData = (List<Map<String, Object>>) projectDetailsStatisticsGroupByTerritory.get("dataList");
int rowIndex = 1;
for (int dataIndex = 0; dataIndex < exportData.size(); dataIndex++) {
Row dataRow = sheet.createRow(rowIndex);
@@ -483,6 +479,25 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
rowIndex ++;
}
}
/**
* 处理 根据领域统计的数据
* @param datas
* @param cut
*/
public void disposeData(List<Map<String,Object>> datas,String cut){
List<SysDictItem> dictItemList = sysDictItemServiceImpl.selectItemsByDictCode("duty_territory");
if(CollectionUtils.isNotEmpty(datas)){
for (Map<String, Object> data : datas) {
List<SysDictItem> dutyTerritory = dictItemList.stream().filter(dict -> StringUtils.equals(dict.getItemValue(), data.get("dutyTerritory").toString())).collect(Collectors.toList());
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
data.put("dutyTerritory",dutyTerritory.get(0).getItemText());
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
data.put("dutyTerritory",dutyTerritory.get(0).getEnName());
}
}
}
}
}
+3
View File
@@ -708,6 +708,8 @@ module.exports = {
uploadTime: 'Upload time',
enclosure: 'enclosure',
// 认证
from: 'from',
ReferenceTo: 'Reference To',
checkTheDeadline: 'Select the collection deadline of the parameter item',
accountNumber: 'account Number',
fullName: 'full Name',
@@ -857,4 +859,5 @@ module.exports = {
sponsorReview:'Sponsor review',
fillInProjectDelivery:'Fill in project delivery',
Resubmit:'Resubmit',
Quantity:'Quantity',
}
+3
View File
@@ -718,6 +718,8 @@ module.exports = {
uploadTime: '上传时间',
enclosure: '附件',
// 认证
from: '从',
ReferenceTo: '引用到',
checkTheDeadline: '选中参数项收集截止时间',
accountNumber: '账号',
fullName: '姓名',
@@ -862,4 +864,5 @@ module.exports = {
sponsorReview:'发起人审查',
fillInProjectDelivery:'填写工程交付',
Resubmit:'重新提交',
Quantity:'数量',
}
@@ -4,55 +4,43 @@
<a-form-model
class='tag-module'
ref='ruleForm'
:model='form'
:model='formInline'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='9'>
<a-form-model-item ref='paramsTemplateName' :label="$t('fullName')" prop='paramsTemplateName'>
<a-input
v-model='form.realname' />
<a-col :span='20'>
<a-form-model-item ref='paramsTemplateName' :label="$t('from')" prop='paramsTemplateName'>
<div style='display: flex'>
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.sourceConfigId">
<a-select-option v-for="(item, key) in fromDate" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
<div style='width: 60px'>&nbsp;&nbsp;&nbsp;&nbsp;配置</div>
</div>
</a-form-model-item>
</a-col>
<a-col :span='9'>
<a-form-model-item ref='paramsTemplateName' :label="$t('accountNumber')" prop='paramsTemplateName'>
<a-input
v-model='form.workNo' />
<a-col :span='20'>
<a-form-model-item ref='paramsTemplateName' :label="$t('ReferenceTo')" prop='paramsTemplateName'>
<div style='display: flex'>
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.targetConfigIds">
<a-select-option v-for="(item, key) in fromDateTo" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
<div style='width: 60px'>&nbsp;&nbsp;&nbsp;&nbsp;配置</div>
</div>
</a-form-model-item>
</a-col>
<a-col :span='6'>
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
<a-button class='box-button' style='margin-left: 8px' @click='searchReset'>{{ $t('reset') }}</a-button>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<a-table
class='table-area'
ref='table'
size='middle'
rowKey='id'
:columns='columns'
:dataSource='areaTable'
:pagination='false'
:loading='loading'
:scroll='{x: 600}'
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
</a-table>
<div class="page">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
<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>
@@ -71,26 +59,9 @@ export default {
data() {
return {
token:Vue.ls.get(ACCESS_TOKEN),
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('fullName'),
dataIndex: 'realname',
key: 'showArea',
align: 'center',
ellipsis: true
},
{
title: this.$t('accountNumber'),
align: 'center',
dataIndex: 'username',
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
@@ -100,18 +71,23 @@ export default {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
formInline: {},
rules: {},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10
fromDate: [],
fromDateTo: [],
}
},
props: {
paramsManifest: {
type: Object,
default: {},
require: true
},
selectedRowKeysArray: {
type: String,
default: '',
@@ -119,33 +95,71 @@ export default {
}
},
mounted() {
this.loadData()
this.loadData(),
this.loadDataTo()
},
methods: {
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
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
let _this = this
let param = {paramsManifestId: this.paramsManifest.id,configFlag: 1}
axios({
url: '/jero-boot/params/collectManifest/getConfigLableListR',
method: 'post',
data: param,
transformRequest: [function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':_this.token
}
}).finally(() => {
this.loading = false
})
.then( (res) =>{
console.log(res)
if (res.data.success) {
this.fromDate = res.data.result
}else{
_this.$message.warning(res.data.result)
}
})
.catch( (error) =>{
console.log(error);
});
},
loadDataTo() {
let _this = this
let param = {paramsManifestId: this.paramsManifest.id,configFlag: 2}
axios({
url: '/jero-boot/params/collectManifest/getConfigLableListR',
method: 'post',
data: param,
transformRequest: [function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':_this.token
}
})
.then( (res) =>{
console.log(res)
if (res.data.success) {
this.fromDateTo = res.data.result
}else{
_this.$message.warning(res.data.result)
}
})
.catch( (error) =>{
console.log(error);
});
},
searchQuery() {
this.loadData()
@@ -163,17 +177,12 @@ export default {
},
handleTableChange(val) {
},
//新增
// 引用参数确定
handleSubmit() {
let _this = this
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
let param = {ids: this.selectedRowKeysArray, projectId: this.$route.query.id, dre:this.selectedRowKeysDate[0].username }
let param = {ids: this.selectedRowKeysArray, ...this.formInline }
axios({
url: '/jero-boot/params/collectManifest/updateDreBatch',
url: '/jero-boot/params/collectManifest/referParams',
method: 'post',
data: param,
transformRequest: [function (data) {
@@ -191,7 +200,6 @@ export default {
.then( (res) =>{
if (res.data.success) {
_this.$message.success(res.data.result)
_this.loadData()
this.$emit('areaVisibleAssignedbyflag', false)
}else{
_this.$message.warning(res.data.result)
@@ -200,7 +208,6 @@ export default {
.catch( (error) =>{
console.log(error);
});
}
}
}
}
@@ -195,7 +195,7 @@
this.loading = true
getAction(this.url.list, query).then((res) => {
if (res.success) {
this.queryPersonInCharge = res.result[1] || {}
this.queryPersonInCharge = res.result[0] || {}
if (this.$route.query.taskIds) {
this.isDisplay = false
this.queryTaskDetailByTask(function() {
@@ -274,7 +274,17 @@
deliveryRequirements: val.deliveryRequirements
}
putAction(this.url.dreSubmit, query).then((res) => {
if (res.success) {
this.loading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$router.push({
path: '/ProjectDetails',
query: this.$route.query
})
}else{
this.loading = false
this.$message.warning(this.$t('operationFailed'))
}
})
},
completeTask(value) {
@@ -114,7 +114,7 @@
{{$t('sendBack')}}
</div>
<!-- 引用参数-->
<div @click="handleAdd" class="operator-text">
<div @click="referenceparameter" class="operator-text">
<a-icon type="plus"/>
{{$t('referenceparameter')}}
</div>
@@ -172,6 +172,10 @@
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('TaskCutOffTime')" width='650px' :footer="null">
<task-cut-off-time v-if='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray' @areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/>
</a-modal>
<!-- 引用参数--->
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">
<reference-parameter v-if='areaVisiblereferenceparameter' :paramsManifest='paramsManifest' :selectedRowKeysArray='selectedRowKeysArray'/>
</a-modal>
</a-card>
</template>
@@ -180,6 +184,7 @@ import TableCollection from '@/components/tableCollection/index'
import { getAction,postAction } from '../../../api/manage'
import ParameterLibraryAdd from '@/components/ParameterLibraryAdd/index'
import TaskCutOffTime from '@/components/TaskCutOffTime/index'
import ReferenceParameter from '@/components/ReferenceParameter/index'
import AssignedBy from '@/components/AssignedBy/index'
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
@@ -191,7 +196,8 @@ export default {
TableCollection,
ParameterLibraryAdd,
AssignedBy,
TaskCutOffTime
TaskCutOffTime,
ReferenceParameter
},
data(){
return{
@@ -276,6 +282,7 @@ export default {
areaVisibleFreeze: false, // 冻结配置
areaVisibleAssignedby: false, // 分配填写人弹框
areaVisibleTaskCutOffTime: false, // 截至时间弹框
areaVisiblereferenceparameter: false, // 引用参数弹框
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
@@ -592,6 +599,10 @@ export default {
this.areaVisibleTaskCutOffTime = val
this.$refs.CollectionTabel.getTableList()
},
//引用参数
referenceparameter() {
this.areaVisiblereferenceparameter = true
},
handleModule() {
},
@@ -275,8 +275,6 @@
},
verifyTaskClick(val, num, isTrue) {
let query = {}
console.log(typeof isTrue)
return
switch (num) {
case 1:
query = {
@@ -19,15 +19,20 @@
</a-table>
</div>
</div>
<responsibilityList ref="responsibilityListRef"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
export default {
name: 'certificationProgress',
components: {
responsibilityList
},
data() {
return {
loading: false,
@@ -89,35 +94,40 @@
if (res.certificationProgress == 'NA') {
data.push({
value: res.certificationProgressCount,
name: this.$t('notInvolved')
name: this.$t('notInvolved'),
status: res.certificationProgress
})
color.push('#9DB9D4')
this.dataSource[0].notInvolved = res.certificationProgressCount
} else if (res.certificationProgress == 'Not start') {
data.push({
value: res.certificationProgressCount,
name: this.$t('toBeStarted')
name: this.$t('toBeStarted'),
status: res.certificationProgress
})
color.push('#FDB033')
this.dataSource[0].toBeStarted = res.certificationProgressCount
} else if (res.certificationProgress == 'In progress') {
data.push({
value: res.certificationProgressCount,
name: this.$t('inProgress')
name: this.$t('inProgress'),
status: res.certificationProgress
})
color.push('#FF8543')
this.dataSource[0].inProgress = res.certificationProgressCount
} else if (res.certificationProgress == 'Test failed') {
data.push({
value: res.certificationProgressCount,
name: this.$t('experimentFailed')
name: this.$t('experimentFailed'),
status: res.certificationProgress
})
color.push('#FF8543')
this.dataSource[0].experimentFailed = res.certificationProgressCount
} else if (res.certificationProgress == 'Test passed') {
data.push({
value: res.certificationProgressCount,
name: this.$t('experimentPassed')
name: this.$t('experimentPassed'),
status: res.certificationProgress
})
color.push('#2F8DF3')
this.dataSource[0].experimentPassed = res.certificationProgressCount
@@ -161,6 +171,15 @@
}
]
})
myChart.on('click', (params) => {
let query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id,
operatorType: 'queryCertificationProgressStatistics',
certificationProgress: params.data.status
}
this.$refs.responsibilityListRef.getData(query)
})
},
mainLeftEcharts(data, color) {
this.getEcharts('main-left', this.$t('CertificationProgress'), color, data)
@@ -1,6 +1,7 @@
<template>
<div class="box-content">
<div class="headerText">
<div class="headerText"
:title="this.$t('redSchedule') + this.$t('yellowSchedule')+this.$t('greenRequirements')+this.$t('blueUndeterminedState')">
{{this.$t('redSchedule')}};
{{this.$t('yellowSchedule')}};
{{this.$t('greenRequirements')}};
@@ -25,15 +26,20 @@
</a-table>
</div>
</div>
<responsibilityList ref="responsibilityListRef"/>
</div>
</template>
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
export default {
name: 'CurrentStatusOfTheProjectEcharts',
components: {
responsibilityList
},
data() {
return {
loading: false,
@@ -115,6 +121,15 @@
}
]
})
myChart.on('click', (params) => {
let query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id,
operatorType:'queryCurrentProjectStatusStatistics',
conditionAssessment:params.data.value
}
this.$refs.responsibilityListRef.getData(query)
})
},
mainLeftEcharts(dataSource) {
let data = []
@@ -199,5 +214,9 @@
color: #040B29;
font-weight: 400;
position: absolute;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
@@ -21,6 +21,7 @@
<div id="main-bottom"></div>
</div>
</div>
<responsibilityList ref="responsibilityListRef"/>
</div>
</template>
@@ -28,9 +29,13 @@
<script>
import * as echarts from 'echarts'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import responsibilityList from './responsibilityList'
export default {
name: 'DeliverableStatusEchart',
components: {
responsibilityList
},
data() {
return {
url: {
@@ -70,25 +75,29 @@
if (res.inventoryAffirmStatus == 'Not started' || res.taskAffirmStatus == 'Not started') {
data.push({
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
name: this.$t('notLaunch')
name: this.$t('notLaunch'),
status: res.inventoryAffirmStatus || res.taskAffirmStatus
})
color.push('#00BEBE')
} else if (res.inventoryAffirmStatus == 'List to confirm' || res.taskAffirmStatus == 'List to confirm') {
data.push({
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
name: this.$t('toBeConfirmed')
name: this.$t('toBeConfirmed'),
status: res.inventoryAffirmStatus || res.taskAffirmStatus
})
color.push('#FDB033')
} else if (res.inventoryAffirmStatus == 'Accepted' || res.taskAffirmStatus == 'Accepted') {
data.push({
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
name: this.$t('accept')
name: this.$t('accept'),
status: res.inventoryAffirmStatus || res.taskAffirmStatus
})
color.push('#2F8DF3')
} else if (res.inventoryAffirmStatus == 'Rejected' || res.taskAffirmStatus == 'Rejected') {
data.push({
value: res.inventoryAffirmStatusCount || res.taskAffirmStatusCount,
name: this.$t('refuse')
name: this.$t('refuse'),
status: res.inventoryAffirmStatus || res.taskAffirmStatus
})
color.push('#9DB9D4')
}
@@ -108,31 +117,36 @@
if (res.designFlowTaskStatus == 'No rating' || res.prehomoFlowTaskStatus == 'No rating' || res.verifyFlowTaskStatus == 'No rating') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('toBeConfirmed')
name: this.$t('toBeConfirmed'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#37CED1')
} else if (res.designFlowTaskStatus == 'Compliance' || res.prehomoFlowTaskStatus == 'Compliance' || res.verifyFlowTaskStatus == 'Compliance') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('accord')
name: this.$t('accord'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#2F8DF3')
} else if (res.designFlowTaskStatus == 'Non-Compliance' || res.prehomoFlowTaskStatus == 'Non-Compliance' || res.verifyFlowTaskStatus == 'Non-Compliance') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('nonConformity')
name: this.$t('nonConformity'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#FF8543')
} else if (res.designFlowTaskStatus == 'To be tracked' || res.prehomoFlowTaskStatus == 'To be tracked' || res.verifyFlowTaskStatus == 'To be tracked') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('Tracked')
name: this.$t('Tracked'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#FDB033')
} else if (res.designFlowTaskStatus == 'NA' || res.prehomoFlowTaskStatus == 'NA' || res.verifyFlowTaskStatus == 'NA') {
data.push({
value: res.designFlowTaskStatusCount || res.prehomoFlowTaskStatusCount || res.verifyFlowTaskStatusCount,
name: this.$t('notInvolved')
name: this.$t('notInvolved'),
status: res.designFlowTaskStatus || res.prehomoFlowTaskStatus || res.verifyFlowTaskStatus
})
color.push('#9DB9D4')
}
@@ -147,7 +161,7 @@
this.mainBottomEcharts(data, color)
}
},
getEcharts(chart, title, color, data) {
getEcharts(chart, title, color, data, num) {
var myChart = echarts.init(document.getElementById(chart))
myChart.setOption({
title: {
@@ -182,26 +196,49 @@
}
]
})
myChart.on('click', (params) => {
let query = {
title: params.seriesName,
projectLibraryId: this.$route.query.id
}
if (num === 1) {
query.operatorType = 'queryListingToConfirmStatistics'
query.inventoryAffirmStatus = params.data.status
} else if (num === 2) {
query.operatorType = 'queryTaskToConfirmStatistics'
query.taskAffirmStatus = params.data.status
} else if (num === 3) {
query.operatorType = 'queryDesignStatistics'
query.designFlowTaskStatus = params.data.status
} else if (num === 4) {
query.operatorType = 'queryPrehomoStatistics'
query.prehomoFlowTaskStatus = params.data.status
} else if (num === 5) {
query.operatorType = 'queryVerifyStatistics'
query.verifyFlowTaskStatus = params.data.status
}
this.$refs.responsibilityListRef.getData(query)
})
}
,
mainLeftEcharts(data, color) {
this.getEcharts('main-left', this.$t('listConfirmationProgress'), color, data)
this.getEcharts('main-left', this.$t('listConfirmationProgress'), color, data, 1)
}
,
mainRightEcharts(data, color) {
this.getEcharts('main-right', this.$t('taskConfirmationProgress'), color, data)
this.getEcharts('main-right', this.$t('taskConfirmationProgress'), color, data, 2)
}
,
mainLeftContentEcharts(data, color) {
this.getEcharts('main-left-content', this.$t('designComplianceConfirmationProgress'), color, data)
this.getEcharts('main-left-content', this.$t('designComplianceConfirmationProgress'), color, data, 3)
}
,
mainRightContentEcharts(data, color) {
this.getEcharts('main-right-content', this.$t('preHomeConfirmProgress'), color, data)
this.getEcharts('main-right-content', this.$t('preHomeConfirmProgress'), color, data, 4)
}
,
mainBottomEcharts(data, color) {
this.getEcharts('main-bottom', this.$t('verificationComplianceConfirmationProgress'), color, data)
this.getEcharts('main-bottom', this.$t('verificationComplianceConfirmationProgress'), color, data, 5)
}
}
}
@@ -0,0 +1,102 @@
<template>
<a-modal
:title="title"
:width="800"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@cancel="visible = false"
>
<template slot="footer">
<a-button key="back" @click="visible = false">
{{$t('cancel')}}
</a-button>
</template>
<div style="text-align: right;margin-bottom: 10px">
<div @click="handleExport" class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{$t('export')}}
</div>
</div>
<a-table
ref="table"
:loading="loading"
:pagination="false"
:scroll="{x: true,y:400}"
:data-source="dataSource"
:columns="columns"
>
</a-table>
</a-modal>
</template>
<script>
import { getAction, postAction, downloadFile } from '@/api/manage'
import moment from 'moment'
export default {
name: 'responsibilityList',
data() {
return {
visible: false,
title: '',
confirmLoading: false,
loading: false,
dataSource: [],
queryParam: {},
url: {
groupByTerritoryXls: '/project/projectLibraryBase/exportProjectDetailsStatisticsGroupByTerritoryXls',
GroupByTerritory: '/project/projectLibraryBase/getProjectDetailsStatisticsGroupByTerritory'
},
columns: [
{
title: this.$t('areaOfResponsibility'),
dataIndex: 'dutyTerritory',
align: 'center',
width:400,
ellipsis: true
},
{
title: this.$t('Quantity'),
dataIndex: 'amount',
align: 'center',
ellipsis: true,
width:300,
}
]
}
},
mounted() {
},
methods: {
getData(data) {
this.visible = true
this.title = data.title
this.queryParam = data
this.getList(data)
},
getList(data) {
this.loading = true
getAction(this.url.GroupByTerritory, data).then((res) => {
if (res.success) {
this.loading = false
this.dataSource = res.result.dataList || []
} else {
this.loading = false
this.dataSource = []
}
})
},
handleExport() {
downloadFile(this.url.groupByTerritoryXls, this.title + '.xls', this.queryParam)
},
handleCancel() {
this.visible = false
}
}
}
</script>
<style scoped>
</style>