Merge branch 'master' into 'fix_bug_first_stage'

# Conflicts:
#   jero-boot/jero-boot-modules/src/main/java/com/jero/modules/problemKnowledgeBase/service/impl/ProblemKnowledgeBaseEOServiceImpl.java
#   jero-web/src/common/lang/en-us.js
#   jero-web/src/common/lang/zh-cn.js
This commit is contained in:
肖文钰
2022-08-24 10:15:59 +08:00
45 changed files with 1746 additions and 706 deletions
@@ -80,6 +80,12 @@
<!-- <a-icon type="setting"/>-->
<!-- {{ $t('batSetting') }}-->
<!-- </div>-->
<div @click="BatchMaintenanceProgress" class="operator-text">
{{$t('BatchMaintenanceProgress')}}
</div>
<div @click="BatchChangeStatus" class="operator-text">
{{$t('BatchChangeStatus')}}
</div>
<div @click="CertificationDirectory" class="operator-text">
<a-icon type="bulb"/>
{{$t('CertificationDirectory')}}
@@ -100,6 +106,8 @@
:pagination="false"
:scroll="{x: true}"
:data-source="dataSource"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:columns="columns"
>
<div slot="standardInformation" slot-scope="text,result" class="box-left">
@@ -178,11 +186,38 @@
<certificationDirectory :isDisplayNum="isDisplayNum" :url="url" ref="certificationDirectoryRef"/>
<TaskListModel @TaskListModelList="TaskListModelList" ref="TaskListModelRef"/>
<taskBatSetting @taskBatSettingForm="taskBatSettingForm" ref="taskBatSettingRef"></taskBatSetting>
<batchChangeModel @batchChangeModel="batchChangeModel" ref="batchChangeModelRef"/>
<batchModel @batchModel="batchModel" ref="batchModelRef"/>
<!-- 错误数据提示-->
<a-modal
:title="$t('operationFailed')"
:width="860"
v-model="visibleoperationFailed"
:maskClosable="false"
@cancel='cancleoperationFailed'
:footer="null"
>
<a-row :gutter="24">
<a-col :span="24">
<span style='font-size: 16px;margin-bottom: 20px;display: flex;justify-content: center'
v-for='(item,key) in NotSelectedNoEngineerValue'>
<span v-html='item'></span>
</span>
</a-col>
</a-row>
<div class="imports-footer">
<div class="imports-footer-wrap" style='text-align: center'>
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
</div>
</div>
</a-modal>
</a-card>
</template>
<script>
import certificationDirectory from './certificationDirectory'
import batchChangeModel from './batchChangeModel'
import batchModel from './batchModel'
import TaskListModel from './TaskListModel'
import taskBatSetting from './taskBatSetting'
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
@@ -194,6 +229,8 @@
components: {
certificationDirectory,
TaskListModel,
batchChangeModel,
batchModel,
taskBatSetting
},
props: ['isDisplayNum', 'areaOfResponsibility'],
@@ -259,6 +296,7 @@
}
],
selectedRowKeys: [],
status: {
'NotDone': '待办',
'haveDone': '已办',
@@ -305,7 +343,11 @@
exportXls: '/project/projectTaskInventoryEO/exportXls'
},
loading: false,
visibleoperationFailed:false,
NotSelectedNoEngineerValue:[],
dataSource: [],
selectionRowsArray:[],
roleCodes:[],
long: ''
}
},
@@ -352,8 +394,15 @@
taskBatSettingForm() {
this.getList()
},
onSelectChange(value) {
batchChangeModel() {
this.getList()
},
batchModel() {
this.getList()
},
onSelectChange(value, selectionRows) {
this.selectedRowKeys = value
this.selectionRowsArray = selectionRows
},
handleExport() {
let query = {
@@ -450,6 +499,7 @@
CertificationDirectory() {
this.$refs.certificationDirectoryRef.addModel()
},
getList() {
let queryParam = JSON.parse(JSON.stringify(this.queryParam))
Object.keys(queryParam).forEach(val => {
@@ -484,6 +534,77 @@
let item = JSON.parse(JSON.stringify(val))
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentStatus'))
},
//批量维护进度
BatchMaintenanceProgress() {
if(this.selectionRowsArray.length <1){
this.$message.warning(this.$t('selectLeastOne'))
}else{
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
this.selectionRowsArray.forEach((item,index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
operation:'1',
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
postAction('/project/projectTaskInventoryEO/verifyRoleCode', query).then((res) => {
if (res.success) {
if(res.result.length == 0){
this.$refs.batchModelRef.getData(this.selectedRowKeys)
}else{
this.NotSelectedNoEngineerValue = res.result
this.visibleoperationFailed = true
}
} else {
}
})
}
},
//批量修改状态
BatchChangeStatus() {
if(this.selectionRowsArray.length <1){
this.$message.warning(this.$t('selectLeastOne'))
}else{
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
this.selectionRowsArray.forEach((item,index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
operation:'2',
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
postAction('/project/projectTaskInventoryEO/verifyRoleCode', query).then((res) => {
if (res.success) {
if(res.result.length == 0){
this.$refs.batchChangeModelRef.getData(this.selectionRowsArray)
}else{
this.NotSelectedNoEngineerValue = res.result
this.visibleoperationFailed = true
}
} else {
}
})
}
},
cancleoperationFailed(){
this.visibleoperationFailed = false
},
TaskListModelList() {
this.getList()
},
@@ -0,0 +1,216 @@
<!--批量当前状态-->
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<div class="headerText">
{{this.$t('redSchedule')}}<br/>
{{this.$t('yellowSchedule')}}<br/>
{{this.$t('greenRequirements')}}<br/>
{{this.$t('blueUndeterminedState')}}
</div>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CurrentProjectStatusEvaluation')">{{$t('CurrentProjectStatusEvaluation')}}</span>
</div>
<a-form-model-item class="itemModel" prop="conditionAssessment">
<a-select
:disabled="disabled"
v-model="formInline.conditionAssessment"
:placeholder="$t('PleaseSelect')+$t('CurrentProjectStatusEvaluation')">
<a-select-option :value="'1'">
<span style="display: inline-block;width: 100%">
{{ $t('red') }}
</span>
</a-select-option>
<a-select-option :value="'2'">
<span style="display: inline-block;width: 100%">
{{ $t('yellow') }}
</span>
</a-select-option>
<a-select-option :value="'3'">
<span style="display: inline-block;width: 100%">
{{ $t('green') }}
</span>
</a-select-option>
<a-select-option :value="'4'" disabled>
<span style="display: inline-block;width: 100%">
{{ $t('blue') }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" prop="remark">
<a-textarea
:placeholder="$t('remarks')"
:disabled="disabled"
v-model="formInline.remark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'TaskListModel',
data() {
return {
formInline: {},
rules: {},
selectionRowsArray:[],
projectLawsInventoryIds:[],
roleCodes:[],
visible: false,
title:'',
confirmLoading: false,
studioList: [],
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
}
},
mounted() {
},
methods: {
getData(val) {
this.visible = true
this.title = this.$t('BatchChangeStatus')
this.selectionRowsArray = val
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
getList(val) {
getAction(this.url.list, { projectLawsInventoryId: val.projectLawsInventoryId }).then((res) => {
if (res.success) {
this.studioList = res.result || []
} else {
this.studioList = []
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleOk() {
if (this.disabled) {
this.visible = false
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {}
let projectLawsInventoryIds = []
let roleCodes = []
let Action
this.selectionRowsArray.forEach((item,index) => {
projectLawsInventoryIds.push(item.projectLawsInventoryId)
roleCodes.push(item.roleCode)
})
query = {
roleCodes: roleCodes.join(','),
remark: this.formInline.remark,
conditionAssessment: this.formInline.conditionAssessment,
projectLawsInventoryIds: projectLawsInventoryIds.join(',')
}
Action = postAction
this.confirmLoading = true
Action('/project/projectTaskInventoryConditionAssessmentEO/addOrUpdateBatch', query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('batchChangeModel')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text {
width: 134px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
}
</style>
@@ -0,0 +1,180 @@
<!--批量维护进度-->
<template>
<a-modal
:title="title"
:width="700"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="visible = false"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('CertificationProgress')">{{$t('CertificationProgress')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgress':''">
<j-dict-select-tag class="box-input" v-model="formInline.certificationProgress"
:disabled="disabled"
@input="handleInput('certificationProgress')"
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')"
:type="'select'"
:triggerChange="false" :dictCode="'certification_progress'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('remarks')">{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="!disabled?'certificationProgressRemark':''">
<a-textarea
:placeholder="$t('PleaseEnter')+$t('remarks')"
:disabled="disabled"
v-model="formInline.certificationProgressRemark" :rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { postAction, putAction, getAction } from '@/api/manage'
export default {
name: 'TaskListModel',
data() {
return {
formInline: {},
selectionRowsArray:[],
rules: {},
title:'',
visible: false,
confirmLoading: false,
studioList: [],
ids:'',
disabled: false,
url: {
edit: '/project/projectTaskInventoryEO/edit',
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
}
}
},
mounted() {
},
methods: {
getData(val) {
this.visible = true
this.title = this.$t('BatchMaintenanceProgress')
this.selectionRowsArray = val
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
getList(val) {
getAction(this.url.list, { projectLawsInventoryId: val.projectLawsInventoryId }).then((res) => {
if (res.success) {
this.studioList = res.result || []
} else {
this.studioList = []
}
})
},
handleInput(value) {
this.$nextTick(() => {
this.formInline = { ...this.formInline }
this.$refs.ruleForm.validateField([value])
})
},
handleOk() {
if (this.disabled) {
this.visible = false
return
}
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {}
this.ids = this.selectionRowsArray.join(',')
query = {
ids: this.ids,
certificationProgress: this.formInline.certificationProgress,
certificationProgressRemark: this.formInline.certificationProgressRemark
}
this.confirmLoading = true
postAction('/project/projectTaskInventoryEO/editBatch', query).then((res) => {
if (res.success) {
this.visible = false
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.$emit('batchModel')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text {
width: 134px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.headerText {
margin-left: 30px;
color: #040B29;
font-weight: 400;
}
</style>