[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>
<!-- 节点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高级经理校对 -->
<!-- 节点3总监审核 -->
<!-- 节点4公司标准法规责任领导批准 -->
<!-- 节点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>
@@ -11,7 +11,8 @@
</span>
</div>
<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')"
:disabled="disabled"
:disabledSourceSearch="true"
@@ -19,6 +20,10 @@
:selectOnly="true"
v-model="formInline.standardNumber"
@listChange="listChange" />
<standard-detail v-else
:name-str="formInline.standardNumber"
:source="StandardSource.FOREIGN.value"
:standard-id="formInline.standardId"/>
</a-form-model-item>
</div>
<!-- 标准名称 -->
@@ -65,7 +70,8 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.standardType')"
:type="'select'"
:triggerChange="false"
dictCode="esp_standard_type" />
:disabled="disabled"
dictCode="standard_type" />
</a-form-model-item>
</div>
<!-- 所处阶段 -->
@@ -82,7 +88,8 @@
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.stageWeAreIn')"
:type="'select'"
:triggerChange="false"
dictCode="esp_standard_type" />
:disabled="disabled"
dictCode="stage_we_are_in" />
</a-form-model-item>
</div>
<!-- 实施日期 -->
@@ -111,12 +118,12 @@
</span>
</div>
<a-form-model-item class="item-model" prop="applicableMarket">
<j-dict-select-tag class="box-input"
v-model="formInline.applicableMarket"
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.applicableMarket')"
:type="'select'"
:triggerChange="false"
dictCode="esp_standard_type" />
<s-tree-select
v-model="formInline.applicableMarket"
:tree-data="countryOptions"
tree-checkable
treeCheckStrictly
:placeholder="$t('pleaseSelect')+$t('workCenter.newRegulationImportProcess.applicableMarket')" />
</a-form-model-item>
</div>
<!-- 抄送人员 -->
@@ -159,17 +166,25 @@
<script>
import StandardSelection from '@/components/selection/StandardSelection'
import UserSelection from '@/components/selection/UserSelection'
import STreeSelect from '@/components/STreeSelect'
import { StandardSource } from '@/enums/commonEnums'
import { getForeignStandardDetail } from '../../../../api/standardRegulationLibraryApi'
import StandardDetail from '../../../../components/selection/StandardDetail'
import { getFormDictTreeList } from '../../../../api/api'
export default {
name: 'BaseInfoForm',
components: { StandardSelection, UserSelection },
components: { StandardDetail, StandardSelection, UserSelection, STreeSelect },
props: {
disabled: {
type: Boolean,
required: false,
default: false
},
currentNode: {
type: Number,
required: false,
default: 1
}
},
data () {
@@ -219,9 +234,13 @@ export default {
}
]
},
isGetDataAfter: false // 是否获取完数据了,获取完数据有的字段不显示placeholder
isGetDataAfter: false, // 是否获取完数据了,获取完数据有的字段不显示placeholder
countryOptions: [] // 适用市场下拉框
}
},
mounted () {
this.getCountryOption()
},
methods: {
// 拿到外面传进来的数据初始化,因为套了几层就不在外层初始化数据了
initData (data) {
@@ -248,6 +267,13 @@ export default {
})
return data
},
getCountryOption () {
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
if (res.success) {
this.countryOptions = res.result
}
})
},
// 选择用户得到用户名
userSelectNameChange (value, fieldName) {
this.formInline[fieldName + '_dictText'] = value
@@ -259,6 +285,8 @@ export default {
this.formInline = {}
} else {
this.loading = true
// 标准id
this.formInline.standardId = value[0].id
// 标准名称
this.formInline.standardName = value[0].standardName
// 根据返回的id查询标准数据