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