[update] 新法规导入流程

This commit is contained in:
lideqin
2024-07-08 14:30:00 +08:00
parent c3e83bad67
commit 401f15d761
3 changed files with 129 additions and 13 deletions
@@ -0,0 +1,88 @@
<template>
<div class="selection-wrapper">
<div class="box-title-text">
<a-input class="box-input"
:value="nameStr || value"
:title="value"
disabled
:max-length="500"
:placeholder="placeholder">
</a-input>
<a-button type="primary" class="button-box" @click="standardClick">
{{ $t('lookDetail') }}
</a-button>
</div>
</div>
</template>
<script>
import { StandardSource } from '../../enums/commonEnums'
export default {
name: 'StandardDetail',
props: {
value: {
type: String,
default: ''
},
// 回显内容的字符串
nameStr: {
type: String,
required: false,
default: null
},
// 标准来源
source: {
type: String,
required: false,
default: null
},
// 标准id
standardId: {
type: String,
required: false,
default: null
}
},
methods: {
// 点击选择标准按钮
standardClick () {
let path = ''
if (this.source === StandardSource.FOREIGN.value) {
path = '/standardRegulationLibrary/foreignStandardDetailPage'
} else if (this.source === StandardSource.ENTERPRISE.value) {
path = '/enterpriseStandardLibrary/enterpriseStandardDetail'
}
this.$openPageNewSheet({
path: path,
query: {
id: this.standardId
}
})
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
.selection-wrapper {
height: 40px;
line-height: 40px;
}
.box-title-text {
height: 100%;
display: flex;
align-items: center;
.box-input {
width: 100%;
}
.button-box {
margin-left: 10px;
}
}
</style>
@@ -64,12 +64,12 @@
<!-- 业务基本信息 --> <!-- 业务基本信息 -->
<div class="process-part-title">{{ $t('basicServiceInformation') }}</div> <div class="process-part-title">{{ $t('basicServiceInformation') }}</div>
<!-- 节点1、法规工程师发起 --> <!-- 节点1、法规工程师发起 -->
<base-info-form v-if="currentNode === 1" ref="baseInfoRef" @processNameChange="processNameChange"></base-info-form> <base-info-form v-if="currentNode === 1" ref="baseInfoRef" :current-node="currentNode" @processNameChange="processNameChange"></base-info-form>
<!-- 节点2、高级经理校对 --> <!-- 节点2、高级经理校对 -->
<!-- 节点3、总监审核 --> <!-- 节点3、总监审核 -->
<!-- 节点4、公司标准法规责任领导批准 --> <!-- 节点4、公司标准法规责任领导批准 -->
<!-- 节点5、公司标准法规责任领导批准 --> <!-- 节点5、公司标准法规责任领导批准 -->
<base-info-form v-else ref="baseInfoRef" disabled></base-info-form> <base-info-form v-else ref="baseInfoRef" :current-node="currentNode" disabled></base-info-form>
<!-- 流程审批信息 --> <!-- 流程审批信息 -->
<div class="process-part-title">{{ $t('processApprovalInformation') }}</div> <div class="process-part-title">{{ $t('processApprovalInformation') }}</div>
@@ -11,7 +11,8 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="standardNumber"> <a-form-model-item class="item-model" prop="standardNumber">
<standard-selection :source="StandardSource.FOREIGN.value" <standard-selection v-if="currentNode === 1"
:source="StandardSource.FOREIGN.value"
:placeholder="$t('pleaseSelect') + $t('standardNumber')" :placeholder="$t('pleaseSelect') + $t('standardNumber')"
:disabled="disabled" :disabled="disabled"
:disabledSourceSearch="true" :disabledSourceSearch="true"
@@ -19,6 +20,10 @@
:selectOnly="true" :selectOnly="true"
v-model="formInline.standardNumber" v-model="formInline.standardNumber"
@listChange="listChange" /> @listChange="listChange" />
<standard-detail v-else
:name-str="formInline.standardNumber"
:source="StandardSource.FOREIGN.value"
:standard-id="formInline.standardId"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 标准名称 --> <!-- 标准名称 -->
@@ -65,7 +70,8 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.standardType')" :placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.standardType')"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
dictCode="esp_standard_type" /> :disabled="disabled"
dictCode="standard_type" />
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 所处阶段 --> <!-- 所处阶段 -->
@@ -82,7 +88,8 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.stageWeAreIn')" :placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.stageWeAreIn')"
:type="'select'" :type="'select'"
:triggerChange="false" :triggerChange="false"
dictCode="esp_standard_type" /> :disabled="disabled"
dictCode="stage_we_are_in" />
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 实施日期 --> <!-- 实施日期 -->
@@ -111,12 +118,12 @@
</span> </span>
</div> </div>
<a-form-model-item class="item-model" prop="applicableMarket"> <a-form-model-item class="item-model" prop="applicableMarket">
<j-dict-select-tag class="box-input" <s-tree-select
v-model="formInline.applicableMarket" v-model="formInline.applicableMarket"
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.applicableMarket')" :tree-data="countryOptions"
:type="'select'" tree-checkable
:triggerChange="false" treeCheckStrictly
dictCode="esp_standard_type" /> :placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.applicableMarket')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
<!-- 抄送人员 --> <!-- 抄送人员 -->
@@ -159,17 +166,25 @@
<script> <script>
import StandardSelection from '@/components/selection/StandardSelection' import StandardSelection from '@/components/selection/StandardSelection'
import UserSelection from '@/components/selection/UserSelection' import UserSelection from '@/components/selection/UserSelection'
import STreeSelect from '@/components/STreeSelect'
import { StandardSource } from '@/enums/commonEnums' import { StandardSource } from '@/enums/commonEnums'
import { getForeignStandardDetail } from '../../../../api/standardRegulationLibraryApi' import { getForeignStandardDetail } from '../../../../api/standardRegulationLibraryApi'
import StandardDetail from '../../../../components/selection/StandardDetail'
import { getFormDictTreeList } from '../../../../api/api'
export default { export default {
name: 'BaseInfoForm', name: 'BaseInfoForm',
components: { StandardSelection, UserSelection }, components: { StandardDetail, StandardSelection, UserSelection, STreeSelect },
props: { props: {
disabled: { disabled: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false default: false
},
currentNode: {
type: Number,
required: false,
default: 1
} }
}, },
data () { data () {
@@ -219,9 +234,13 @@ export default {
} }
] ]
}, },
isGetDataAfter: false // 是否获取完数据了,获取完数据有的字段不显示placeholder isGetDataAfter: false, // 是否获取完数据了,获取完数据有的字段不显示placeholder
countryOptions: [] // 适用市场下拉框
} }
}, },
mounted () {
this.getCountryOption()
},
methods: { methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了 // 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) { initData (data) {
@@ -248,6 +267,13 @@ export default {
}) })
return data return data
}, },
getCountryOption () {
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
if (res.success) {
this.countryOptions = res.result
}
})
},
// 选择用户得到用户名 // 选择用户得到用户名
userSelectNameChange (value, fieldName) { userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value this.formInline[fieldName + '_dictText'] = value
@@ -259,6 +285,8 @@ export default {
this.formInline = {} this.formInline = {}
} else { } else {
this.loading = true this.loading = true
// 标准id
this.formInline.standardId = value[0].id
// 标准名称 // 标准名称
this.formInline.standardName = value[0].standardName this.formInline.standardName = value[0].standardName
// 根据返回的id查询标准数据 // 根据返回的id查询标准数据