update 属性类型新增年份选择
This commit is contained in:
@@ -73,12 +73,13 @@
|
||||
<script>
|
||||
import '@assets/less/common.less'
|
||||
import { TagsTypeEnums } from '../../../enums/commonEnums'
|
||||
import { getDomesticStandardFormModal, shareDomesticStandard } from '../../../api/standardRegulationLibraryApi'
|
||||
import { getDomesticStandardFormModal, shareDomesticStandard, getDomesticStandardDetail } from '../../../api/standardRegulationLibraryApi'
|
||||
import UploadRecordModal from './modules/UploadRecordModal.vue'
|
||||
import SubmitQuestionModal from './modules/SubmitQuestionModal.vue'
|
||||
import UserSelectModal from '../../../components/selection/UserSelectModal.vue'
|
||||
import StandardResolutionSheetModal from './modules/StandardResolutionSheetModal.vue'
|
||||
|
||||
// 国内标准权限
|
||||
const DomesticStandardPermission = {
|
||||
updateRecord: 'domesticStandard:updateRecord', // 更新记录
|
||||
submitQuestion: 'domesticStandard:submitQuestion', // 提交问题
|
||||
@@ -88,6 +89,12 @@ const DomesticStandardPermission = {
|
||||
unwatermarkedDownload: 'domesticStandard:unwatermarkedDownload' // 无水印下载
|
||||
}
|
||||
|
||||
// 国内标准接口
|
||||
const DomesticApi = {
|
||||
getFormFunc: getDomesticStandardFormModal, // 获取字段
|
||||
getDetailData: getDomesticStandardDetail // 获取详情数据
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'StandardDetailPage',
|
||||
components: { UploadRecordModal, SubmitQuestionModal, UserSelectModal, StandardResolutionSheetModal },
|
||||
@@ -112,9 +119,11 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
// 页面标题
|
||||
pageTitle () {
|
||||
return TagsTypeEnums.nameOfIndex(this.$route.query.type)
|
||||
},
|
||||
// 按钮权限
|
||||
btnPermission () {
|
||||
let permission = {}
|
||||
switch (this.$route.query.type) {
|
||||
@@ -126,17 +135,30 @@ export default {
|
||||
break
|
||||
}
|
||||
return permission
|
||||
},
|
||||
// 操作接口
|
||||
operateApiFunc () {
|
||||
let func = {}
|
||||
switch (this.$route.query.type) {
|
||||
case TagsTypeEnums.DOMESTIC_LIST.value + '':
|
||||
func = DomesticApi
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
return func
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.initForm()
|
||||
this.initDetailData()
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 获取页面字段
|
||||
*/
|
||||
initForm () {
|
||||
getDomesticStandardFormModal().then(res => {
|
||||
this.operateApiFunc.getFormFunc().then(res => {
|
||||
if (res.success) {
|
||||
const data = res.result || {}
|
||||
this.partList = Object.keys(data)
|
||||
@@ -146,6 +168,19 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取数据
|
||||
initDetailData () {
|
||||
this.loading = true
|
||||
this.operateApiFunc.getDetailData({ id: this.$route.query.id }).then(res => {
|
||||
if (res.success) {
|
||||
this.detailData = Object.assign({}, res.result || {})
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 更新记录
|
||||
*/
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@ export default {
|
||||
standard_number: `${this.$t('standardRegulationLibrary.inputExample')}7258`
|
||||
},
|
||||
defaultValue: {
|
||||
year_number: new Date().getFullYear()
|
||||
year_number: new Date().getFullYear() + ''
|
||||
},
|
||||
isEdit: null // 是否编辑
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user