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