add 标准法规入库/变更流程

This commit is contained in:
赵霄
2023-10-07 13:37:36 +08:00
parent 9bb7eb05bc
commit cb7134f81a
4 changed files with 607 additions and 1 deletions
@@ -0,0 +1,80 @@
<template>
<internal-detail-page :title="pageTitle">
<div class="process-part-title">流程信息</div>
<a-form :form="form">
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" :label="$t('standardRegulationLibrary.nodeName')">
<a-input :placeholder="$t('pleaseEnter') + $t('standardRegulationLibrary.nodeName')"
@change="event => event.target.value = event.target.value.trim()"
:maxLength="50"
v-decorator="['nodeName']" />
</a-form-item>
</a-form>
<div class="process-part-title">业务基本信息</div>
<collapsible-panel-form ref="addForm"
:flag="StandardSource.DOMESTIC.value"
:get-form-func="getFormFunc"
:get-document-info-func="getDocumentInfoFunc"
:special-placeholder="specialPlaceholder"
:default-value="defaultValue"
:disabled-field-list="disabledField"
@submitFormData="submitFormData" />
</internal-detail-page>
</template>
<script>
import InternalDetailPage from '../../../components/InternalDetailPage.vue'
import CollapsiblePanelForm from '../../../components/CollapsiblePanelForm.vue'
import { StandardSource } from '../../../enums/commonEnums.js'
import { getDomesticStandardDocumentInfo, getDomesticStandardFormModal } from '../../../api/standardRegulationLibraryApi.js'
export default {
name: 'StandardEntryOrChangeProcess',
components: { InternalDetailPage, CollapsiblePanelForm },
data () {
return {
labelCol: {
xs: { span: 24 },
sm: { span: 4 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 20 }
},
StandardSource,
getFormFunc: getDomesticStandardFormModal,
getDocumentInfoFunc: getDomesticStandardDocumentInfo,
// 特殊的placeholder
specialPlaceholder: {
standard_number_temp: `${this.$t('standardRegulationLibrary.inputExample')}7258`
},
defaultValue: {
year_number: new Date().getFullYear() + ''
}
}
},
computed: {
pageTitle () {
return `流程中心——${this.$route.meta.title}(法规工程师发起)`
},
// 不可编辑的字段
disabledField () {
if (this.isEdit) {
// 标准编号,被代替标准号,被引用标准号,标准类别,年代号
return ['standard_number_temp', 'replaced_by_standard_number', 'referenced_standard', 'standard_class', 'year_number']
}
return ['replaced_by_standard_number', 'referenced_standard']
}
},
methods: {
// 表单提交的回调,获取表单数据
submitFormData (formInline) {
console.log(formInline)
}
}
}
</script>
<style scoped lang="less">
</style>