[update] 市场法规清单
This commit is contained in:
@@ -142,6 +142,8 @@ const getMarketRegulationListByIdNoPerm = (params) => getAction('', params)
|
||||
const marketRegulationListAdd = (params) => postAction('/laws/marketStandard/add', params)
|
||||
// 市场法规清单-编辑
|
||||
const marketRegulationListEdit = (params) => postAction('/laws/marketStandard/edit', params)
|
||||
// 市场法规清单-获取详情列表
|
||||
const marketRegulationDetailListById = (params) => getAction('/laws/marketStandardDetail/list', params)
|
||||
|
||||
export {
|
||||
// 国内标准
|
||||
@@ -224,5 +226,6 @@ export {
|
||||
getMarketRegulationListById,
|
||||
getMarketRegulationListByIdNoPerm,
|
||||
marketRegulationListAdd,
|
||||
marketRegulationListEdit
|
||||
marketRegulationListEdit,
|
||||
marketRegulationDetailListById
|
||||
}
|
||||
|
||||
+31
-12
@@ -112,7 +112,7 @@
|
||||
import InternalDetailPage from '../../../components/InternalDetailPage'
|
||||
import FileEcho from '../../../components/FileEcho'
|
||||
import HistoryVersionModal from './modules/HistoryVersionModal'
|
||||
import { getMarketRegulationListById } from '../../../api/standardRegulationLibraryApi'
|
||||
import { getMarketRegulationListById, marketRegulationDetailListById } from '../../../api/standardRegulationLibraryApi'
|
||||
import JTable from '../../../components/jero/JTable'
|
||||
import { StandardSource } from '../../../enums/commonEnums'
|
||||
import { mapGetters } from 'vuex'
|
||||
@@ -324,18 +324,37 @@ export default {
|
||||
this.loading = true
|
||||
const param = Object.assign({}, this.filters)
|
||||
param.manifestId = ids
|
||||
getMarketRegulationListById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.model = Object.assign({}, res.result)
|
||||
if (!this.model.manifest) {
|
||||
this.model.manifest = {}
|
||||
if (this.ids.length <= 1) {
|
||||
// 只有一条数据,需要获取基础信息和列表
|
||||
getMarketRegulationListById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.model = Object.assign({}, res.result)
|
||||
if (!this.model.manifest) {
|
||||
this.model.manifest = {}
|
||||
}
|
||||
marketRegulationDetailListById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.model.lists = res.result
|
||||
this.dataSource = JSON.parse(JSON.stringify(this.model.lists))
|
||||
this.dataList = JSON.parse(JSON.stringify(this.model.lists))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
this.dataSource = JSON.parse(JSON.stringify(this.model.lists))
|
||||
this.dataList = JSON.parse(JSON.stringify(this.model.lists))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
} else {
|
||||
// 有多条数据只需要调用获取列表的接口
|
||||
marketRegulationDetailListById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.model.lists = res.result
|
||||
this.dataSource = JSON.parse(JSON.stringify(this.model.lists))
|
||||
this.dataList = JSON.parse(JSON.stringify(this.model.lists))
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
// 查询
|
||||
searchQuery () {
|
||||
|
||||
+14
-7
@@ -211,6 +211,7 @@ import MarketRegulationsListSelectionModal from '../../../components/selection/M
|
||||
import {
|
||||
getForeignStandardDocumentInfo,
|
||||
getMarketRegulationListById,
|
||||
marketRegulationDetailListById,
|
||||
marketRegulationListAdd,
|
||||
marketRegulationListEdit
|
||||
} from '../../../api/standardRegulationLibraryApi'
|
||||
@@ -509,6 +510,7 @@ export default {
|
||||
this.loading = true
|
||||
const param = {}
|
||||
param.manifestId = id
|
||||
// 获取基础信息和历史版本
|
||||
getMarketRegulationListById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.model = Object.assign({}, res.result)
|
||||
@@ -517,17 +519,22 @@ export default {
|
||||
return { value: item }
|
||||
})
|
||||
}
|
||||
for (const item of this.model.lists) {
|
||||
const uid = uidGenerator()
|
||||
this.dataSource.push({ ...item, uid })
|
||||
this.dataList.push({ ...item, uid })
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model.manifest, 'country', 'manifestNo', 'customName', 'drivePosition', 'securityLevel', 'manifestDesc', 'file'))
|
||||
})
|
||||
marketRegulationDetailListById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.model.lists = res.result
|
||||
for (const item of this.model.lists) {
|
||||
const uid = uidGenerator()
|
||||
this.dataSource.push({ ...item, uid })
|
||||
this.dataList.push({ ...item, uid })
|
||||
}
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
// 点击历史版本
|
||||
|
||||
Reference in New Issue
Block a user