[update] 修改各页面搜索条件label宽度,以及企标立项变更流程
This commit is contained in:
@@ -270,4 +270,7 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
/deep/ .ant-form-item-label{
|
||||
min-width: 70px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -515,4 +515,7 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
/deep/ .ant-form-item-label{
|
||||
min-width: 90px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -277,4 +277,7 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
/deep/ .ant-form-item-label{
|
||||
min-width: 70px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -237,4 +237,7 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
/deep/ .ant-form-item-label{
|
||||
min-width: 70px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -224,4 +224,7 @@ export default {
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
/deep/ .ant-form-item-label{
|
||||
min-width: 70px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -459,4 +459,8 @@ export default {
|
||||
/deep/ .table-page-search-wrapper .ant-form-inline .ant-form-item > .ant-form-item-label {
|
||||
min-width: 60px;
|
||||
}
|
||||
|
||||
/deep/ .ant-form-item-label{
|
||||
min-width: 40px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -99,6 +99,7 @@
|
||||
<a-select v-else-if="formInline.applicationCategory === ApplicationCategory.CHANGE.value"
|
||||
v-model="formInline.projectType"
|
||||
:disabled="disabled"
|
||||
@change="projectTypeChange"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.itemCategory')">
|
||||
<a-select-option :value="ProjectType.COMPLETE_TIME_CHANGE.value">{{ $t('workCenter.enterpriseInitChangePlan.completionTimeChange') }}</a-select-option>
|
||||
<a-select-option :value="ProjectType.WORK_TERMINATE.value">{{ $t('workCenter.enterpriseInitChangePlan.terminationOfWork') }}</a-select-option>
|
||||
@@ -455,7 +456,6 @@ export default {
|
||||
// }
|
||||
},
|
||||
mounted () {
|
||||
console.log(this.$route.query.taskId)
|
||||
// 查询流程定义列表,通过查出的数据获取到流程定义id,如果已经发起过流程,用这个id和流程实例id去查人员信息数据
|
||||
this.getPersonInfoStructure(ProcessKey.ES_INIT_CHANGE.value)
|
||||
if (this.$route.query.taskId) {
|
||||
@@ -556,7 +556,8 @@ export default {
|
||||
},
|
||||
userForm: this.$form.createForm(this), // 部分节点需要选人的表单
|
||||
approvalInfoForm: this.$form.createForm(this), // 审批信息表单
|
||||
personnelInfoData: [],
|
||||
personnelInfoDataAll: [], // 整体人员信息
|
||||
personnelInfoData: [], // 传给人员信息组件的人员信息
|
||||
url: {
|
||||
list: '' // 人员信息的右侧表格获取接口
|
||||
}
|
||||
@@ -578,10 +579,31 @@ export default {
|
||||
// 处理人员信息数据
|
||||
// 筛选出是立项、责任部门变更,其他变更
|
||||
// 每个节点是否能选人
|
||||
this.personnelInfoData = res.result
|
||||
this.personnelInfoDataAll = res.result.map(item => {
|
||||
return {
|
||||
...item,
|
||||
chooseType: item.variableType === 'string' ? 'radio' : 'checkbox'
|
||||
}
|
||||
})
|
||||
if (!this.$route.query.processInstanceId) {
|
||||
// 说明是在新发起一个节点,初始化发起人员信息
|
||||
this.personnelInfoDataAll[0].linkUserIds = Vue.ls.get(USER_INFO).id
|
||||
this.personnelInfoDataAll[0].userList = Vue.ls.get(USER_INFO).realname + '(' + Vue.ls.get(USER_INFO).username + ')'
|
||||
// 筛选出立项的人员信息
|
||||
this.personnelInfoData = this.personnelInfoDataAll.filter(item => item.branchType.split(',').includes('1'))
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 切换立项、变更、责任部门变更修改人员信息结构数据
|
||||
* @param type: 1,立项;2,变更;3, 责任部门变更
|
||||
*/
|
||||
resetPersonInfoStructure (type) {
|
||||
// 筛选出人员信息
|
||||
this.personnelInfoData = this.personnelInfoDataAll.filter(item => item.branchType.split(',').includes(type))
|
||||
console.log(this.personnelInfoData)
|
||||
},
|
||||
// 根据流程id获取数据并回显
|
||||
getProcessData (taskId) {
|
||||
getProcessDataById(taskId).then(res => {
|
||||
@@ -719,34 +741,6 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取人员信息数据
|
||||
getPersonInfoData () {
|
||||
const param = {}
|
||||
param.processDefinitionId = this.processDefinitionId
|
||||
// 有流程实例id就需要传流程实例id
|
||||
if (this.$route.query.processInstanceId) {
|
||||
param.processInstanceId = this.$route.query.processInstanceId
|
||||
}
|
||||
getNodeList(param).then(res => {
|
||||
if (res.success) {
|
||||
console.log(res.result)
|
||||
// 处理人员信息数据
|
||||
if (this.formInline.applicationCategory) {
|
||||
// 有申请类型,根据申请类型返回不同的人员信息,区分【立项、普通变更、责任部门变更(责任部门变更时某些节点不可跳过)】
|
||||
if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
|
||||
// 是立项,从result中拿出立项有的人员信息
|
||||
} else if (this.formInline.applicationCategory === ApplicationCategory.CHANGE.value) {
|
||||
// 是变更
|
||||
if (this.formInline.projectType === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) {
|
||||
// 是责任部门变更,从result中拿出责任部门变更有的人员信息
|
||||
} else {
|
||||
// 是别的变更,从result中拿出需要的人员信息
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 头部tab改变
|
||||
switchChange (value) {
|
||||
this.switchValue = value
|
||||
@@ -755,15 +749,28 @@ export default {
|
||||
applicationCategoryChange (value) {
|
||||
if (value) {
|
||||
if (this.formInline.applicationCategory === ApplicationCategory.INITIATION.value) {
|
||||
this.personnelInfoData = approvalPersonalInfo
|
||||
this.resetPersonInfoStructure('1')
|
||||
} else {
|
||||
this.personnelInfoData = changePersonalInfo
|
||||
this.resetPersonInfoStructure('2')
|
||||
}
|
||||
}
|
||||
if (this.formInline.projectType) {
|
||||
this.formInline.projectType = undefined
|
||||
}
|
||||
},
|
||||
// 项目类别改变
|
||||
projectTypeChange (value) {
|
||||
console.log(value, this.formInline.applicationCategory)
|
||||
if (value) {
|
||||
if (value === ProjectType.RESPONSIBLE_DEPT_CHANGE.value) {
|
||||
// 是责任部门变更
|
||||
this.resetPersonInfoStructure('3')
|
||||
} else {
|
||||
// 是其他类型变更
|
||||
this.resetPersonInfoStructure('3')
|
||||
}
|
||||
}
|
||||
},
|
||||
// 业务基本信息组件中获取到流程名称改变后的值
|
||||
processNameChange (value) {
|
||||
const param = { prcName: value }
|
||||
@@ -883,21 +890,9 @@ export default {
|
||||
handleStart () {
|
||||
if (this.loading) return
|
||||
// 人员信息的数据, 处理成对象
|
||||
const personnelInfo = this.$refs.personnelInfo.stepsData
|
||||
const personnelObj = {}
|
||||
for (const item of personnelInfo) {
|
||||
if (item.fieldName && item.canChoose) {
|
||||
personnelObj[item.fieldName] = item.user
|
||||
}
|
||||
}
|
||||
// 发起人设置为当前登录人
|
||||
personnelObj.createUser = Vue.ls.get(USER_INFO).id
|
||||
// 后端需要单独传主起草人
|
||||
personnelObj.mainDraftUser = Vue.ls.get(USER_INFO).id
|
||||
console.log(personnelObj)
|
||||
const personnelObj = this.$refs.personnelInfo.getDataObjVerify()
|
||||
// 校验是否填了所有能填的人员信息
|
||||
if (!Object.values(personnelObj).every(v => !!v)) {
|
||||
this.$message.warning(this.$t('pleaseEnterPersonnelInfo'))
|
||||
if (!personnelObj) {
|
||||
return
|
||||
}
|
||||
// 专家审批至少需要选两个专家 todo: 后端选多人流程进行不下去,暂时不限制传多人
|
||||
|
||||
@@ -365,13 +365,14 @@
|
||||
</span>
|
||||
</div>
|
||||
<a-form-model-item class="item-model" prop="componentName">
|
||||
<a-tree-select v-model="formInline.componentName"
|
||||
:disabled="disabled"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
style="width: 100%"
|
||||
:tree-data="partNameOptions"
|
||||
:label-in-value="false"
|
||||
:placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.partName')" />
|
||||
<tree-selection :placeholder="$t('pleaseSelect')+$t('workCenter.enterpriseInitChangePlan.partName')"
|
||||
v-model="formInline.componentName"
|
||||
@nameChange="treeSelectNameChange"
|
||||
filedName="componentName"
|
||||
type="radio"
|
||||
:nameStr="formInline.componentName_dictText"
|
||||
dict-id="1696007957666533377"
|
||||
:disabled="disabled" />
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
<!-- 授权部门 -->
|
||||
@@ -600,13 +601,14 @@ import { StandardSource, ProjectType } from '@/enums/commonEnums.js'
|
||||
import StandardSelection from '@/components/selection/StandardSelection'
|
||||
import UserSelection from '@/components/selection/UserSelection'
|
||||
import UploadFile from '@/components/UploadFile'
|
||||
import TreeSelection from '@/components/selection/TreeSelection'
|
||||
import { getFormDictTreeList } from '@/api/api'
|
||||
import { getEnStandardNo } from '@/api/workCenter'
|
||||
import { getTreeList } from '../../../../api/enterpriseStandardLibraryApi'
|
||||
|
||||
export default {
|
||||
name: 'ApprovalBaseInfo',
|
||||
components: { StandardSelection, UserSelection, UploadFile },
|
||||
components: { StandardSelection, UserSelection, UploadFile, TreeSelection },
|
||||
props: {
|
||||
projectType: {
|
||||
type: [Number, String],
|
||||
@@ -935,6 +937,10 @@ export default {
|
||||
nameChange (value) {
|
||||
this.formInline.originEnStandardName = value
|
||||
},
|
||||
// 零部件名称选择完成的回调
|
||||
treeSelectNameChange (value, fieldName) {
|
||||
this.formInline[fieldName + '_dictText'] = value
|
||||
},
|
||||
// 点击文件上传
|
||||
clickButtonToUpload (fieldName) {
|
||||
if (fieldName === 'uploadAttachment') {
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
</template>
|
||||
</a-tabs>
|
||||
<div class="tabs-table-box">
|
||||
<component
|
||||
:is="comp"
|
||||
ref="compModel"
|
||||
v-if="comp">
|
||||
</component>
|
||||
<keep-alive>
|
||||
<component
|
||||
:is="comp"
|
||||
ref="compModel"
|
||||
v-if="comp">
|
||||
</component>
|
||||
</keep-alive>
|
||||
</div>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
@@ -141,12 +141,15 @@ export default {
|
||||
let path = ''
|
||||
// 跳转到对应流程页面
|
||||
switch (record.prcType + '') {
|
||||
// 企标立项、变更计划
|
||||
case '7':
|
||||
path = '/workCenter/enterpriseStandardInitChange/planApprovalChangeFlow'
|
||||
break
|
||||
// 年度制修订计划(各部门主动上报)
|
||||
case '8':
|
||||
path = '/workCenter/annualRevisionPlanActivelyReport/revisionPlanActivelyReportFlow'
|
||||
break
|
||||
// 年度制修订计划(标准化发起)
|
||||
case '9':
|
||||
path = '/workCenter/annualRevisionPlanStandardizationInit/revisionPlanStandardizationInitFlow'
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user