[update] 法规符合性排查流程发起节点分解单来源下拉修改
This commit is contained in:
+39
-7
@@ -42,12 +42,18 @@
|
||||
<!-- 分解单来源是添加标准的标准的话,显示下拉框,否则显示上传的分解单或者空 -->
|
||||
<template v-slot:splitFileSource="{record}" class="action-span-cell">
|
||||
<!-- 通过添加标准新增的 -->
|
||||
<j-dict-select-tag v-if="record.standardId"
|
||||
style="width: 100%"
|
||||
v-model="record.splitFileSource"
|
||||
dict-code="decomposition_single_source"
|
||||
:disabled="disabled"
|
||||
:placeholder="$t('pleaseSelect')" />
|
||||
<a-select v-if="record.standardId"
|
||||
v-model="record.splitFileSource"
|
||||
:disabled="disabled || isRejectedData"
|
||||
@change="splitFileSourceChange"
|
||||
:placeholder="$t('pleaseSelect')"
|
||||
style="width: 100%;">
|
||||
<a-select-option v-for="item in splitFileSourceList"
|
||||
:disabled="item.isDisabled === '1'"
|
||||
:key="item.value" :value="item.value">
|
||||
{{ item.text || item.title }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<!-- 手动新增的显示上传的分解单或者空 -->
|
||||
<a-tooltip v-else overlay-class-name="tooltip-style">
|
||||
<template slot="title">{{ record.splitFile_dictText ? record.splitFile_dictText : global.emptyLine }}</template>
|
||||
@@ -227,6 +233,7 @@ import { ACCESS_TOKEN, USER_INFO } from '@/store/mutation-types'
|
||||
import { previewPdf } from '@/utils/previewPdf'
|
||||
import { getFileAccessHttpUrl, downloadFile } from '@/api/manage'
|
||||
import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||
import { interpretGetFileByStandardId } from '../../../../api/workCenter'
|
||||
|
||||
const FILE_TYPE_IMGS = ['jpg', 'jpeg', 'png', 'raw']
|
||||
const FILE_TYPE_PDF = 'pdf'
|
||||
@@ -257,6 +264,7 @@ export default {
|
||||
StandardSource,
|
||||
loading: false,
|
||||
formInline: {},
|
||||
splitFileSourceList: [], // 标准分解单下拉
|
||||
rules: {
|
||||
// 车型项目
|
||||
modelFile: [
|
||||
@@ -458,6 +466,10 @@ export default {
|
||||
initData (data) {
|
||||
// 给表单赋值
|
||||
this.standardDataSource[0] = Object.assign({}, data.standardInfo)
|
||||
// 有标准id的话获取标准分解单来源下拉数据
|
||||
if (this.standardDataSource[0].standardId) {
|
||||
this.initInterpretGetFileByStandardId(this.standardDataSource[0].standardId)
|
||||
}
|
||||
const formInline = {}
|
||||
formInline.modelFile = data.standardInfo.modelFile
|
||||
formInline.applicableMarket = data.standardInfo.applicableMarket
|
||||
@@ -503,6 +515,22 @@ export default {
|
||||
})
|
||||
return data
|
||||
},
|
||||
/**
|
||||
* 获取分解单来源下拉
|
||||
* @param standardId - 标准id
|
||||
*/
|
||||
initInterpretGetFileByStandardId (standardId) {
|
||||
this.splitFileSourceList = []
|
||||
interpretGetFileByStandardId({ standardId }).then(res => {
|
||||
if (res.success) {
|
||||
this.splitFileSourceList = res.result || []
|
||||
}
|
||||
})
|
||||
},
|
||||
// 分解单来源修改
|
||||
splitFileSourceChange () {
|
||||
this.$forceUpdate()
|
||||
},
|
||||
getCountryOption () {
|
||||
getFormDictTreeList({ dictId: '1801130851452059649' }).then(res => {
|
||||
if (res.success) {
|
||||
@@ -532,6 +560,10 @@ export default {
|
||||
obj = {}
|
||||
} else {
|
||||
this.loading = true
|
||||
// 有标准id的话获取标准分解单来源下拉数据
|
||||
if (value[0].id) {
|
||||
this.initInterpretGetFileByStandardId(value[0].id)
|
||||
}
|
||||
// 标准id
|
||||
obj.standardId = value[0].id
|
||||
// 标准编号
|
||||
@@ -546,7 +578,7 @@ export default {
|
||||
obj.standardState = result.standard_state
|
||||
obj.standardState_dictText = result.standard_state_dictText
|
||||
// 分解单来源初始化成发布稿
|
||||
obj.splitFileSource = '2'
|
||||
obj.splitFileSource = 'publish_of_original'
|
||||
// 新生产车实施日期
|
||||
obj.newProductImplDate = result.new_product_impl_date
|
||||
// 新认证车实施日期
|
||||
|
||||
Reference in New Issue
Block a user