[update] 新法规导入流程
This commit is contained in:
@@ -143,7 +143,7 @@ export const IsReadOnlyEnums = {
|
|||||||
// 流程key,获取人员信息前需要获取流程定义id,传这里的名字到WorkCenterMixin的getFlowDefinition方法中
|
// 流程key,获取人员信息前需要获取流程定义id,传这里的名字到WorkCenterMixin的getFlowDefinition方法中
|
||||||
export const ProcessKey = {
|
export const ProcessKey = {
|
||||||
// 新法规导入流程
|
// 新法规导入流程
|
||||||
NEW_REGULATIONS_IMPORT: { text: '', value: '' },
|
NEW_REGULATIONS_IMPORT: { text: 'new_standard_import', value: 'new_standard_import' },
|
||||||
// 标准解读流程
|
// 标准解读流程
|
||||||
STANDARD_INTERPRETATION_PROCESS: { text: 'standard_interpret', value: 'standard_interpret' },
|
STANDARD_INTERPRETATION_PROCESS: { text: 'standard_interpret', value: 'standard_interpret' },
|
||||||
// 法规符合性排查流程
|
// 法规符合性排查流程
|
||||||
|
|||||||
+34
-31
@@ -27,7 +27,7 @@
|
|||||||
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
<a-input :placeholder="$t('pleaseEnter') + $t('processName')"
|
||||||
disabled
|
disabled
|
||||||
:maxLength="50"
|
:maxLength="50"
|
||||||
v-decorator="['prcName', validatorRules.prcName]" />
|
v-decorator="['processName', validatorRules.processName]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12">
|
<a-col :span="12">
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
v-decorator="['dueTime']" />
|
v-decorator="['processDueDate']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
v-decorator="['prcMes']" />
|
v-decorator="['processDescription']" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -79,11 +79,11 @@
|
|||||||
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
<a-textarea :placeholder="$t('pleaseEnter') + $t('remarks')"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
:rows="4"
|
:rows="4"
|
||||||
v-decorator="['commitText', validatorRules.commitText]" />
|
v-decorator="['handleText', validatorRules.handleText]" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!--附件-->
|
<!--附件-->
|
||||||
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
|
<a-form-item :labelCol="longLabelCol" :wrapperCol="longWrapperCol" :label="$t('attach')" :colon="formItemColon">
|
||||||
<j-upload v-decorator="['commitFile']" return-id multiple />
|
<j-upload v-decorator="['handleFile']" return-id multiple />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
@@ -249,13 +249,13 @@ export default {
|
|||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
// 流程名称
|
// 流程名称
|
||||||
prcName: {
|
processName: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
|
{ required: true, message: this.$t('pleaseEnter') + this.$t('processName') }
|
||||||
],
|
],
|
||||||
validateTrigger: 'blur'
|
validateTrigger: 'blur'
|
||||||
},
|
},
|
||||||
commitText: {
|
handleText: {
|
||||||
rules: [
|
rules: [
|
||||||
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
|
{ required: false, message: this.$t('pleaseEnter') + this.$t('remarks') }
|
||||||
],
|
],
|
||||||
@@ -286,19 +286,19 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (type === 'todo') {
|
if (type === 'todo') {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
this.processInfoForm.setFieldsValue(pick(this.model.common, 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(this.model.common, 'processName', 'processDueDate', 'processDescription'))
|
||||||
}
|
}
|
||||||
// 有草稿json按草稿进来的回显
|
// 有草稿json按草稿进来的回显
|
||||||
if (this.model.infoJsonStr) {
|
if (this.model.infoJsonStr) {
|
||||||
// 初始化流程信息
|
// 初始化流程信息
|
||||||
const prcObj = Object.assign({}, this.model)
|
const prcObj = Object.assign({}, this.model)
|
||||||
prcObj.dueTime = this.model.processDueDate
|
prcObj.processDueDate = this.model.processDueDate
|
||||||
prcObj.prcMes = this.model.processDescription
|
prcObj.processDescription = this.model.processDescription
|
||||||
this.processInfoForm.setFieldsValue(pick(prcObj, 'prcName', 'dueTime', 'prcMes'))
|
this.processInfoForm.setFieldsValue(pick(prcObj, 'processName', 'processDueDate', 'processDescription'))
|
||||||
// 初始化流程审批信息
|
// 初始化流程审批信息
|
||||||
prcObj.commitText = this.model.handleText
|
prcObj.handleText = this.model.handleText
|
||||||
prcObj.commitFile = this.model.handleFile
|
prcObj.handleFile = this.model.handleFile
|
||||||
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'commitText', 'commitFile'))
|
this.approvalInfoForm.setFieldsValue(pick(prcObj, 'handleText', 'handleFile'))
|
||||||
this.model.data = JSON.parse(this.model.infoJsonStr).data
|
this.model.data = JSON.parse(this.model.infoJsonStr).data
|
||||||
// 如果是节点1的保存回显人员信息
|
// 如果是节点1的保存回显人员信息
|
||||||
if (this.currentNode === 1) {
|
if (this.currentNode === 1) {
|
||||||
@@ -323,9 +323,9 @@ export default {
|
|||||||
},
|
},
|
||||||
// 业务基本信息组件中获取到流程名称改变后的值
|
// 业务基本信息组件中获取到流程名称改变后的值
|
||||||
processNameChange (value) {
|
processNameChange (value) {
|
||||||
const param = { prcName: value }
|
const param = { processName: value }
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.processInfoForm.setFieldsValue(pick(param, 'prcName'))
|
this.processInfoForm.setFieldsValue(pick(param, 'processName'))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
// 保存
|
// 保存
|
||||||
@@ -353,14 +353,9 @@ export default {
|
|||||||
const paramObj = {}
|
const paramObj = {}
|
||||||
// 流程信息
|
// 流程信息
|
||||||
paramObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
|
paramObj.basicProcessInfoDTO = Object.assign({}, processInfoForm)
|
||||||
paramObj.basicProcessInfoDTO.processName = paramObj.basicProcessInfoDTO.prcName
|
|
||||||
paramObj.basicProcessInfoDTO.processDueDate = paramObj.basicProcessInfoDTO.dueTime
|
|
||||||
paramObj.basicProcessInfoDTO.processDescription = paramObj.basicProcessInfoDTO.prcMes
|
|
||||||
paramObj.basicProcessInfoDTO.processInstanceId = this.$route.query.processInstanceId
|
paramObj.basicProcessInfoDTO.processInstanceId = this.$route.query.processInstanceId
|
||||||
// 流程审批信息
|
// 流程审批信息
|
||||||
paramObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
|
paramObj.basicTaskInfoDTO = Object.assign({}, approvalInfoForm)
|
||||||
paramObj.basicTaskInfoDTO.handleText = paramObj.basicTaskInfoDTO.commitText
|
|
||||||
paramObj.basicTaskInfoDTO.handleFile = paramObj.basicTaskInfoDTO.commitFile
|
|
||||||
paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId
|
paramObj.basicTaskInfoDTO.taskId = this.$route.query.taskId
|
||||||
// 草稿id
|
// 草稿id
|
||||||
if (this.model.infoJsonStr) {
|
if (this.model.infoJsonStr) {
|
||||||
@@ -390,6 +385,7 @@ export default {
|
|||||||
this.processInfoForm.validateFields((err, values) => {
|
this.processInfoForm.validateFields((err, values) => {
|
||||||
// 流程审批信息的校验
|
// 流程审批信息的校验
|
||||||
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
this.approvalInfoForm.validateFields(async (approvalErr, approvalValues) => {
|
||||||
|
// 获取业务信息businessInfoDTO
|
||||||
const data = await this.$refs.baseInfoRef.getDataValidate()
|
const data = await this.$refs.baseInfoRef.getDataValidate()
|
||||||
if (!err && !approvalErr && data) {
|
if (!err && !approvalErr && data) {
|
||||||
// 人员信息的数据, 处理成对象
|
// 人员信息的数据, 处理成对象
|
||||||
@@ -400,13 +396,20 @@ export default {
|
|||||||
}
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const paramObj = {} // 需要传给后端的数据
|
const paramObj = {} // 需要传给后端的数据
|
||||||
paramObj.common = { ...values, ...approvalValues }
|
// 流程信息
|
||||||
|
paramObj.basicProcessInfoDTO = values
|
||||||
|
// 流程审批信息
|
||||||
|
paramObj.basicTaskInfoDTO = approvalValues
|
||||||
// 草稿id
|
// 草稿id
|
||||||
if (this.model.infoJsonStr) {
|
if (this.model.infoJsonStr) {
|
||||||
paramObj.common.draftId = this.model.id
|
paramObj.draftId = this.model.id
|
||||||
}
|
}
|
||||||
paramObj.flowUser = personnelObj
|
// 人员信息
|
||||||
paramObj.data = data.formInline
|
paramObj.userInfoMap = personnelObj
|
||||||
|
// 业务信息
|
||||||
|
paramObj.businessInfoDTO = data
|
||||||
|
// JSON字符串
|
||||||
|
paramObj.infoJsonStr = JSON.stringify(paramObj)
|
||||||
let func
|
let func
|
||||||
if (this.$route.query.taskId) {
|
if (this.$route.query.taskId) {
|
||||||
// 有taskId说明是驳回的提交
|
// 有taskId说明是驳回的提交
|
||||||
@@ -459,9 +462,9 @@ export default {
|
|||||||
// 同意
|
// 同意
|
||||||
handleAgree () {
|
handleAgree () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.validatorRules.commitText.rules[0].required = false
|
this.validatorRules.handleText.rules[0].required = false
|
||||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
if (!this.approvalInfoForm.getFieldValue('handleText')) {
|
||||||
this.approvalInfoForm.setFieldsValue({ commitText: '同意' })
|
this.approvalInfoForm.setFieldsValue({ handleText: '同意' })
|
||||||
}
|
}
|
||||||
this.approvalInfoForm.validateFields((err, values) => {
|
this.approvalInfoForm.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
@@ -484,8 +487,8 @@ export default {
|
|||||||
// 驳回
|
// 驳回
|
||||||
handleReject () {
|
handleReject () {
|
||||||
if (this.loading) return
|
if (this.loading) return
|
||||||
this.validatorRules.commitText.rules[0].required = true
|
this.validatorRules.handleText.rules[0].required = true
|
||||||
if (!this.approvalInfoForm.getFieldValue('commitText')) {
|
if (!this.approvalInfoForm.getFieldValue('handleText')) {
|
||||||
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
this.$message.warning(this.$t('pleaseEnterRemarks'))
|
||||||
this.switchValue = 'base'
|
this.switchValue = 'base'
|
||||||
}
|
}
|
||||||
@@ -505,7 +508,7 @@ export default {
|
|||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.validatorRules.commitText.rules[0].required = false
|
this.validatorRules.handleText.rules[0].required = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -82,9 +82,9 @@
|
|||||||
{{ $t('workCenter.newRegulationImportProcess.stageWeAreIn') }}
|
{{ $t('workCenter.newRegulationImportProcess.stageWeAreIn') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="stageWeAreIn">
|
<a-form-model-item class="item-model" prop="eventPhase">
|
||||||
<j-dict-select-tag class="box-input"
|
<j-dict-select-tag class="box-input"
|
||||||
v-model="formInline.stageWeAreIn"
|
v-model="formInline.eventPhase"
|
||||||
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.stageWeAreIn')"
|
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.stageWeAreIn')"
|
||||||
:type="'select'"
|
:type="'select'"
|
||||||
:triggerChange="false"
|
:triggerChange="false"
|
||||||
@@ -134,13 +134,13 @@
|
|||||||
{{ $t('workCenter.newRegulationImportProcess.ccPerson') }}
|
{{ $t('workCenter.newRegulationImportProcess.ccPerson') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="ccPerson">
|
<a-form-model-item class="item-model" prop="copyUser">
|
||||||
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.ccPerson')"
|
<user-selection :placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.ccPerson')"
|
||||||
v-model="formInline.ccPerson"
|
v-model="formInline.copyUser"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
filedName="ccPerson"
|
filedName="copyUser"
|
||||||
@nameChange="userSelectNameChange"
|
@nameChange="userSelectNameChange"
|
||||||
:nameStr="formInline.ccPerson_dictText"
|
:nameStr="formInline.copyUser_dictText"
|
||||||
type="checkbox" />
|
type="checkbox" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -151,11 +151,11 @@
|
|||||||
{{ $t('workCenter.newRegulationImportProcess.briefDescription') }}
|
{{ $t('workCenter.newRegulationImportProcess.briefDescription') }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="item-model" prop="archiveReason">
|
<a-form-model-item class="item-model" prop="requireBriefDesc">
|
||||||
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.newRegulationImportProcess.briefDescription')"
|
<a-textarea :placeholder="$t('pleaseEnter')+$t('workCenter.newRegulationImportProcess.briefDescription')"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
:maxLength="500"
|
:maxLength="500"
|
||||||
v-model="formInline.briefDescription" :rows="4" />
|
v-model="formInline.requireBriefDesc" :rows="4" />
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -210,7 +210,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 所处阶段
|
// 所处阶段
|
||||||
stageWeAreIn: [
|
eventPhase: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('workCenter.newRegulationImportProcess.stageWeAreIn') + this.$t('cannotEmpty'),
|
message: this.$t('workCenter.newRegulationImportProcess.stageWeAreIn') + this.$t('cannotEmpty'),
|
||||||
@@ -226,7 +226,7 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
// 抄送人员
|
// 抄送人员
|
||||||
ccPerson: [
|
copyUser: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
message: this.$t('workCenter.newRegulationImportProcess.ccPerson') + this.$t('cannotEmpty'),
|
message: this.$t('workCenter.newRegulationImportProcess.ccPerson') + this.$t('cannotEmpty'),
|
||||||
@@ -242,7 +242,7 @@ export default {
|
|||||||
this.getCountryOption()
|
this.getCountryOption()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
|
// 拿到外面传进来的businessInfoDTO
|
||||||
initData (data) {
|
initData (data) {
|
||||||
// 给表单赋值
|
// 给表单赋值
|
||||||
this.formInline = Object.assign({}, data)
|
this.formInline = Object.assign({}, data)
|
||||||
@@ -250,17 +250,17 @@ export default {
|
|||||||
},
|
},
|
||||||
// 外层要获取数据
|
// 外层要获取数据
|
||||||
getData () {
|
getData () {
|
||||||
// 把数据抛出
|
// 组合businessInfoDTO,抛出
|
||||||
const data = {}
|
const data = Object.assign({}, this.formInline)
|
||||||
data.formInline = this.formInline
|
|
||||||
return data
|
return data
|
||||||
},
|
},
|
||||||
// 外层获取数据要过校验,返回false表示没有通过校验
|
// 外层获取数据要过校验,返回false表示没有通过校验
|
||||||
async getDataValidate () {
|
async getDataValidate () {
|
||||||
|
// 内部校验完成后抛出businessInfoDTO需要的格式数据,抛出
|
||||||
let data = {}
|
let data = {}
|
||||||
await this.$refs.ruleForm.validate(valid => {
|
await this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
data.formInline = this.formInline
|
data = Object.assign({}, this.formInline)
|
||||||
} else {
|
} else {
|
||||||
data = false
|
data = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user